/* JE — local Instagram-style profile (prototype) */
* { box-sizing: border-box; }
body {
  margin: 0; background: #FAFAFA; color: #111;
  font-family: var(--je-text); font-size: 15px; line-height: 1.6;
}
.ig { max-width: 430px; margin-inline: auto; background: #fff; min-height: 100dvh; border-inline: 1px solid #E3E3E3; }

.ig-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-block-end: 1px solid #EFEFEF; position: sticky; top: 0; background: #fff; z-index: 5;
}
.ig-user { font-weight: 700; font-size: 17px; }
.ig-dots { font-size: 22px; line-height: 1; }

.ig-head { display: flex; gap: 22px; padding: 18px 16px 6px; align-items: center; }
.ig-avatar {
  width: 88px; height: 88px; flex: none; border-radius: 50%;
  background: var(--je-ink); display: grid; place-items: center;
  border: 2px solid #E3E3E3; padding: 20px;
}
.ig-avatar img { width: 100%; height: 100%; object-fit: contain; }
.ig-id h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.ig-role { margin: 2px 0 8px; color: #737373; font-size: 13.5px; }
.ig-bio { margin: 0; font-size: 14.5px; }

.ig-actions { display: flex; gap: 8px; padding: 12px 16px; }
.ig-btn {
  flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: #EFEFEF;
  font: inherit; font-weight: 600; cursor: pointer;
}
.ig-btn-primary { background: var(--je-ink); color: #fff; }

.ig-highlights { display: flex; gap: 20px; padding: 10px 16px 16px; }
.hl { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: #262626; }
.hl-ring {
  width: 62px; height: 62px; border-radius: 50%; border: 1px solid #C7C7C7;
  display: grid; place-items: center; padding: 14px; background: #F5F5F5; overflow: hidden;
}
.hl-ring img { width: 100%; height: 100%; object-fit: contain; }
.hl-ring.hl-photo { padding: 0; }
.hl-ring.hl-photo img { object-fit: cover; }

.ig-tabs { display: flex; border-block-start: 1px solid #EFEFEF; }
.ig-tab { flex: 1; display: grid; place-items: center; padding: 10px 0; border-block-start: 1px solid transparent; }
.ig-tab.on { border-block-start-color: #262626; }
.ig-tab svg { width: 22px; height: 22px; fill: #262626; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.ig-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-grid li { position: relative; }
.ig-grid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ig-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.car-ico { position: absolute; top: 8px; inset-inline-end: 8px; width: 18px; height: 18px; fill: #fff; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 45%)); }
.ig-grid button:focus-visible { outline: 3px solid var(--je-ink); outline-offset: -3px; }

.ig-note { margin: 0; padding: 18px 16px 26px; color: #8E8E8E; font-size: 12.5px; text-align: center; }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 60; background: rgb(20 20 20 / 92%);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
}
.lb[hidden] { display: none; }
.lb-fig { margin: 0; display: grid; justify-items: center; gap: 10px; }
.lb-fig img { max-width: min(86vw, 460px); max-height: 76vh; }
.lb-fig figcaption { color: #ddd; font-size: 13.5px; }
.lb-x {
  position: absolute; top: 12px; inset-inline-end: 14px; width: 44px; height: 44px;
  background: none; border: 0; color: #fff; font-size: 32px; cursor: pointer;
}
.lb-nav { width: 44px; height: 64px; background: none; border: 0; color: #fff; font-size: 42px; cursor: pointer; justify-self: center; }
.lb-nav:disabled { opacity: 0.25; }
.lb :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
