/* Damascus Watch feed: Instagram-shaped (/watch, /u/<person>). Builds on hub.css for buttons, dialog and bars. */
body.ig-body { margin: 0; background: var(--surface-0); color: var(--ink); font: 400 16px/24px var(--font-body); }
.ig-body a { color: inherit; text-decoration: none; }
.ig-body button { font-family: inherit; color: inherit; }
.ig-body a.hb-btn { color: var(--on-gold); }
.ig-body .hb-btn { color: var(--on-gold); }
.ig-body .hb-btn--ghost { color: var(--ink); }
.ig { display: grid; grid-template-columns: 72px minmax(0, 820px) 320px; justify-content: center; gap: 0 var(--space-6); min-height: 100vh; }
.ig-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.ig-rail { position: sticky; top: 0; align-self: start; height: 100vh; box-sizing: border-box; padding: 20px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ig-logo { display: flex; justify-content: center; }
.ig-logo span, .ig-nav-item span { display: none; }
.ig-logo img { width: 34px; height: 34px; }
.ig-logo b { color: var(--gold-text); }
.ig-nav { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.ig-nav-item { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; font: 400 17px/1 var(--font-body); text-align: left; }
.ig-nav-item:hover { background: var(--surface-2); }
.ig-nav-item.on { font-weight: 600; color: var(--gold-text); }
.ig-nav-item.on .ig-ico { stroke-width: 2.4; }
.ig-nav-create .ig-ico { color: var(--gold-text); }

.ig-main { min-width: 0; padding: var(--space-4) 0 var(--space-16); }
.ig-main, .ig-side { padding-top: 20px; }
.ig-searchbar { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); }
.ig-searchbar input { flex: 1; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 var(--space-6); border-radius: 20px; border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink); font: 400 16px var(--font-body); }
.ig-searchbar input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.ig-filterbtn { display: none; height: 40px; padding: 0 20px; border: 0; border-radius: 20px; background: var(--surface-2); cursor: pointer; font: 600 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }

.ig-stories { display: flex; gap: var(--space-4); overflow-x: auto; padding: var(--space-2) 0 var(--space-4); scrollbar-width: none; }
.ig-story { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); border: 0; background: none; cursor: pointer; padding: 0; }
.ig-ring { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; padding: 3px; box-sizing: border-box; }
.ig-ring--unseen { background: conic-gradient(var(--gold-bright), var(--gold-deep), var(--gold-bright)); }
.ig-ring--seen { background: var(--line-strong); }
.ig-ring--new { background: repeating-conic-gradient(var(--gold-deep) 0 12deg, transparent 12deg 24deg); }
.ig-ring .ig-av { width: 100%; height: 100%; border: 3px solid var(--surface-0); box-sizing: border-box; }
.ig-plus { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--font-body); font-style: normal; color: var(--on-gold); background: var(--gold); box-shadow: 0 0 0 3px var(--surface-0); }
.ig-story-name { width: 100%; font-size: 13px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.ig-av { border-radius: 50%; object-fit: cover; background: var(--iron); display: block; }
.ig-av--letter { display: grid; place-items: center; font: 700 22px var(--font-display); color: var(--gold-text); }
.ig-av--sm { width: 32px; height: 32px; font-size: 15px; }
.ig-av--lg { width: 92px; height: 92px; font-size: 38px; }

.ig-prof { display: flex; gap: var(--space-6); align-items: center; padding: var(--space-4) 0 var(--space-6); border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); }
.ig-prof h1 { margin: 0; font: 700 28px/32px var(--font-display); letter-spacing: .04em; }
.ig-prof p { margin: var(--space-1) 0 var(--space-3); color: var(--ink-muted); }
.ig-prof-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.ig-active { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ig-active:not(:empty) { margin-bottom: var(--space-4); }
.ig-pill { height: 30px; padding: 0 var(--space-4); border: 0; border-radius: 15px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--gold-deep); color: var(--gold-text); cursor: pointer; font: 500 14px var(--font-body); }

.ig-feed { display: flex; flex-direction: column; gap: var(--space-8); }
.ig-post { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.ig-post-head { display: flex; align-items: center; gap: var(--space-2); height: 52px; }
.ig-who { display: flex; align-items: center; gap: var(--space-3); border: 0; background: none; padding: 0; cursor: pointer; font-size: 16px; }
.ig-time { color: var(--ink-muted); font-size: 14px; }
.ig-kind { margin-left: auto; font: 600 10px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); padding: 5px 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.ig-post[data-studio="1"] .ig-kind { color: var(--gold-text); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.ig-media { position: relative; border-radius: 6px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px var(--line); }
.ig-post[data-studio="1"] .ig-media { box-shadow: 0 0 0 1px var(--gold-deep); }
.ig-media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-media--image { aspect-ratio: auto; max-height: 720px; }
.ig-media--image > img { height: auto; max-height: 720px; object-fit: contain; }
.ig-media video, .ig-media audio { width: 100%; height: 100%; display: block; background: #000; }
.ig-media audio { height: 54px; position: absolute; bottom: 0; left: 0; }
a.ig-playbtn, .ig-playbtn { position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .5)); }
.ig-playbtn .ig-ico { width: 64px; height: 64px; padding: 18px 14px 18px 22px; box-sizing: border-box; border-radius: 50%; fill: var(--on-gold); stroke: none; background: var(--gold); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
.ig-playbtn:hover .ig-ico { filter: brightness(1.1); transform: scale(1.05); }
.ig-open { position: absolute; inset: 0; }
.ig-badge { position: absolute; left: 10px; top: 10px; padding: 4px 8px; border-radius: 4px; font: 700 10px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-gold); background: var(--gold); }
.ig-dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 6px; border-radius: 4px; font: 500 12px/1 var(--font-mono); background: rgba(0, 0, 0, .8); color: #fff; }
.ig-actions { display: flex; align-items: center; gap: var(--space-2); height: 46px; }
.ig-act { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ig-act:hover { background: var(--surface-2); }
.ig-like.on .ig-ico { fill: var(--wax); stroke: var(--wax); }
.ig-act.on .ig-ico { stroke: var(--gold-text); }
.ig-body a.ig-act-text { margin-left: auto; font: 600 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.ig-meta { font-size: 15px; }
.ig-meta span { color: var(--ink-muted); }
.ig-cap p { margin: var(--space-1) 0 0; }
.ig-cap .ig-desc { color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ig-tags { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.ig-tag { border: 0; background: none; padding: 0; cursor: pointer; color: var(--gold-text); font-size: 15px; }
.ig-tag:hover { text-decoration: underline; }
.ig-more { align-self: center; }
.ig-continue h2 { margin: 0 0 var(--space-3); font: 600 12px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.ig-continue-row { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: var(--space-3); overflow-x: auto; scrollbar-width: thin; }
.ig-cc { display: flex; flex-direction: column; gap: var(--space-1); font-size: 14px; line-height: 18px; }
.ig-cc img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.ig-cc .hb-bar { margin-top: -10px; margin-bottom: 4px; border-radius: 0 0 6px 6px; }
.ig-cc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ig-nudge, .ig-cta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6); border-radius: 12px; background: linear-gradient(135deg, var(--surface-2), var(--surface-1)); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.ig-nudge strong, .ig-cta strong { font: 700 20px/26px var(--font-display); letter-spacing: .04em; color: var(--gold-text); }
.ig-nudge span, .ig-cta span { color: var(--ink-muted); }
.ig-first { padding: var(--space-8) 0; text-align: center; }
.ig-first h2 { margin: 0 0 var(--space-3); font: 700 34px/40px var(--font-display); letter-spacing: .04em; color: var(--gold-text); }
.ig-first p { margin: 0 auto var(--space-6); max-width: 44ch; color: var(--ink-muted); }
.ig-dropbig { display: grid; place-items: center; min-height: 260px; border: 2px dashed var(--gold-deep); border-radius: 16px; cursor: pointer; color: var(--ink-muted); font-size: 18px; }
.ig-dropbig:hover, .ig-dropbig.on { border-color: var(--gold); background: var(--surface-1); color: var(--ink); }
.ig-none { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-12) 0; color: var(--ink-muted); }

.ig-side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; box-sizing: border-box; padding: var(--space-4) 0 var(--space-8); display: flex; flex-direction: column; gap: 20px; scrollbar-width: thin; }
.ig-group h3 { margin: 0 0 var(--space-2); font: 600 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.ig-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ig-chip { height: 30px; padding: 0 var(--space-3); border: 0; border-radius: 15px; background: var(--surface-2); cursor: pointer; font: 500 14px var(--font-body); }
.ig-chip:hover { background: var(--iron); }
.ig-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface-0); }
.ig-chip--studio { color: var(--gold-text); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.ig-chip--studio[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.ig-people { display: flex; flex-direction: column; }
.ig-person { display: flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 var(--space-2); border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: 15px; }
.ig-person:hover, .ig-person.on { background: var(--surface-2); }
.ig-person span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-person small { color: var(--ink-muted); font: 500 12px var(--font-mono); }
.ig-clear { align-self: flex-start; }

.ig-tabbar { display: none; }

.ig-manage { display: flex; flex-direction: column; gap: var(--space-4); }
.ig-manage-row { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-4); }
.ig-mthumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; background: var(--surface-2); }
.ig-minfo { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.ig-minfo span { font: 500 12px/18px var(--font-mono); color: var(--ink-muted); }

@media (max-width: 1180px) {
  .ig { grid-template-columns: 72px minmax(0, 820px); }
  .ig-filterbtn { display: block; }
  .ig-side { position: fixed; z-index: 40; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); max-height: none; padding: var(--space-6); background: var(--surface-1); box-shadow: -20px 0 60px rgba(0, 0, 0, .6); transform: translateX(105%); transition: transform 180ms; }
  .ig-side.open { transform: none; }
}
@media (max-width: 760px) {
  .ig { display: block; }
  .ig-rail { display: none; }
  .ig-main { padding: var(--space-3) var(--space-4) 96px; }
  .ig-tabbar { display: flex; justify-content: space-around; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: 60px; background: var(--surface-0); border-top: 1px solid var(--line-strong); }
  .ig-tabbar .ig-nav-item { flex: 1; width: auto; height: 60px; border-radius: 0; }
  .ig-manage-row { grid-template-columns: 110px 1fr; }
}

/* compact, even rhythm: one 16px unit between blocks, 8px inside them */
.ig { --g: 16px; grid-template-columns: 64px minmax(0, 760px) 280px; gap: 0 var(--g); }
.ig-rail { padding: var(--g) 0; gap: var(--g); }
.ig-main, .ig-side { padding-top: var(--g); }
.ig-main { padding-bottom: 64px; }
.ig-searchbar { margin-bottom: var(--g); }
.ig-stories { gap: var(--space-3); padding: 0 0 var(--g); }
.ig-feed { gap: var(--g); }
.ig-post { padding-bottom: var(--g); }
.ig-post-head { height: 44px; }
.ig-actions { height: 40px; }
.ig-act { width: 36px; height: 36px; }
.ig-active:not(:empty), .ig-prof { margin-bottom: var(--g); }
.ig-prof { padding: 0 0 var(--g); }
.ig-side { gap: var(--g); padding-bottom: var(--g); }
.ig-group h3 { margin: 0 0 var(--space-2); font-size: 10px; }
.ig-chips { gap: 6px; }
.ig-chip { height: 26px; padding: 0 10px; font-size: 13px; }
.ig-segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 2px; border-radius: 16px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line); }
.ig-segs .ig-chip { height: 28px; padding: 0 4px; background: none; border-radius: 14px; font-size: 13px; text-align: center; }
.ig-segs .ig-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface-0); }
.ig-cta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 10px; }
.ig-cta strong { flex: 1 1 100%; font-size: 16px; line-height: 20px; }
.ig-cta span { flex: 1; font-size: 14px; line-height: 18px; }
.hb-btn--sm { height: 30px; padding: 0 var(--space-4); }
.ig-nudge { padding: var(--space-4); gap: var(--space-2); }
.ig-nudge strong { font-size: 17px; line-height: 22px; }
.ig-person { height: 36px; }
.ig-clear { height: 30px; padding: 0 var(--space-4); }
.ig-continue-row { grid-auto-columns: 160px; }
@media (max-width: 1180px) {
  .ig { grid-template-columns: 64px minmax(0, 760px); }
}
@media (max-width: 760px) {
  .ig { --g: 12px; }
  .ig-main { padding: var(--g) var(--g) 84px; }
  .ig-side { padding: var(--g); }
}

/* fill the screen: rail on the left edge, side panel on the right edge, posts flow in as many columns as fit */
.ig { grid-template-columns: 64px minmax(0, 1fr) 280px; justify-content: stretch; gap: 0; }
.ig-main { padding: var(--g) var(--g) 64px; }
.ig-side { padding: var(--g) var(--g) var(--g) 0; }
.ig-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; gap: var(--g); }
.ig-continue, .ig-first, .ig-none, .ig-more, .ig-manage { grid-column: 1 / -1; }
.ig-more { justify-self: center; }
@media (max-width: 1180px) {
  .ig { grid-template-columns: 64px minmax(0, 1fr); }
  .ig-side { padding: var(--g); }
}
@media (max-width: 760px) {
  .ig { display: block; }
  .ig-feed { grid-template-columns: 1fr; }
}

.ig-fav { margin-left: auto; }
.ig-fav.on .ig-ico { fill: var(--gold); stroke: var(--gold); }
.ig-body a.ig-act-text { margin-left: 0; }
.ig-actions .ig-act-text { margin-left: auto; }
.ig-actions .ig-act-text + .ig-fav { margin-left: 0; }

/* pages under /v share the rail */
.ig.ig--page { grid-template-columns: 64px minmax(0, 1fr); gap: 0; }
.ig-pagemain { min-width: 0; }
.ig-mh { margin: 0 0 var(--g, 16px); font: 700 22px/28px var(--font-display); letter-spacing: .04em; }
@media (max-width: 760px) { .ig-pagemain { padding-bottom: 72px; } }

/* image wall */
.ig-feed.ig-feed--wall { display: block; column-width: 230px; column-gap: 12px; }
.ig-tile { position: relative; display: block; break-inside: avoid; margin: 0 0 12px; border-radius: 12px; overflow: hidden; background: var(--surface-1); }
.ig-tile img { display: block; width: 100%; height: auto; }
.ig-tile-cap { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; gap: 2px; padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); opacity: 0; transition: opacity .15s; }
.ig-tile-cap strong { font: 600 15px/20px var(--font-body); }
.ig-tile-cap span { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--ink-muted); }
.ig-tile:hover .ig-tile-cap, .ig-tile:focus-visible .ig-tile-cap { opacity: 1; }
@media (hover: none) { .ig-tile-cap { opacity: 1; } }
.ig-feed--wall > .ig-more, .ig-feed--wall > .ig-none { column-span: all; }

/* text posts */
.ig-textbox { display: block; padding: 20px; border-radius: 12px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line); }
.ig-textbox:hover { box-shadow: inset 0 0 0 1px var(--gold-deep); }
.ig-textbox h3 { margin: 0 0 8px; font: 700 22px/28px var(--font-display); letter-spacing: .03em; }
.ig-textbox p { margin: 0 0 12px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ig-textbox em { font: 600 11px var(--font-mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }

.ig-body a.hb-btn--ghost { color: var(--ink); }
