/* Phase 3: feed, stories, posts, comments, ranks, waters. */

.me-link { text-decoration: none; }

/* Stories */
.stories { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: 0 0 auto; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.ring { width: 64px; height: 64px; border-radius: 50%; padding: 3px; display: grid; place-items: center; background: conic-gradient(var(--fin), var(--r-legend), var(--olive), var(--fin)); }
.ring.seen { background: var(--line); }
.ring.live { background: conic-gradient(#e2442a, #ff8a3d, #e2442a); }
.ring .av { box-shadow: 0 0 0 3px var(--bg); }
.livepill { margin-top: -12px; z-index: 1; background: #e2442a; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; border: 2px solid var(--bg); }
.story .n { max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Posts */
.feed { display: grid; gap: 22px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head a { text-decoration: none; }
.who { flex: 1; min-width: 0; }
.who .name { color: var(--ink); font-weight: 700; }
.who small { display: block; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small a { color: var(--fin); }
.rank-chip { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); margin-left: 4px; }
.media { position: relative; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.burst { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.3); font-family: var(--f-display); font-weight: 800; font-size: 64px;
  color: var(--fin); text-shadow: 0 4px 0 #7a2a0b, 0 10px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none; }
.burst.go { animation: burst .9s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(-8deg); } 25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) rotate(-6deg); }
  60% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(-6deg); } 100% { opacity: 0; transform: translate(-50%,-60%) rotate(-6deg); } }
.post-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.post-actions form.inline { display: inline; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 0; background: none; padding: 0; font: 600 14px var(--f-body); color: var(--ink); text-decoration: none; cursor: pointer; }
.act svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.act.fat.on { color: var(--fin); }
.act.fat.on svg { fill: currentColor; }
.post-actions .xpchip { margin-left: auto; }
.caption { margin: 4px 0 0; color: var(--ink-2); }
.caption b { color: var(--ink); }
.endcard { text-align: center; padding: 24px 16px; border: 1.5px dashed var(--line); border-radius: 22px; display: grid; gap: 8px; justify-items: center; }
.endcard h2 { font-size: 20px; }
.check { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--good); background: color-mix(in srgb, var(--good) 18%, transparent); }
.person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.person-link { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 400; }
.person-link small { display: block; color: var(--ink-3); }
.live-story { display: grid; justify-items: start; gap: 8px; padding: 20px; border-radius: 22px; color: #eef0e0; background: linear-gradient(160deg, #2f4e3f, #13261f); }
.livebig { background: #e2442a; color: #fff; padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.live-story .muted { color: #c7d6a4; }

/* Comments */
/* Grid and flex children default to min-width: auto, so one long word or a wide
   input could push the whole column past the screen. Let them shrink and wrap. */
.app > * { min-width: 0; }
.comment { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.comment .av { flex-shrink: 0; }
.comment p { flex: 1; min-width: 0; margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.comment small { color: var(--ink-3); }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input[type=text] { flex: 1; min-width: 0; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.comment-form .btn { flex-shrink: 0; }
.caption { overflow-wrap: anywhere; }

/* Ranks */
.chips a.chip { text-decoration: none; color: var(--ink); }
.chip.on { border-color: var(--ink); background: var(--surface); }
.league-hero { border-radius: 22px; padding: 16px; color: #fffaf0; background: linear-gradient(140deg, #8a6b3d, #4b3a20); }
.league-hero.tier-silver { background: linear-gradient(140deg, #8e9aa3, #4c565e); }
.league-hero.tier-gold { background: linear-gradient(140deg, #c99a1a, #7b5a07); }
.league-hero.tier-emerald { background: linear-gradient(140deg, #2f9a6a, #135a3c); }
.league-hero.tier-diamond { background: linear-gradient(140deg, #4b8fd6, #233f7a); }
.league-hero.tier-esox { background: linear-gradient(140deg, #3d5a2a, #e2622a); }
.league-hero .eyebrow { color: rgba(255,255,255,.75); }
.league-hero h2 { font-size: 26px; }
.league-hero .row { display: flex; justify-content: space-between; margin: 12px 0 0; font-size: 13px; }
.tiers { display: flex; gap: 6px; margin-top: 12px; }
.tiers i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); }
.tiers i.on { background: #fff; }
.lboard { list-style: none; padding: 6px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.lrow { display: grid; grid-template-columns: 28px 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; }
.lrow a { text-decoration: none; }
.lrow small { display: block; color: var(--ink-3); font-size: 11px; }
.lrow .pos { font-family: var(--f-mono); color: var(--ink-3); text-align: right; }
.lrow.zone-promote .pos { color: var(--good); font-weight: 700; }
.lrow.zone-drop .pos { color: var(--bad); }
.lrow.me { background: color-mix(in srgb, var(--fin) 14%, transparent); outline: 1.5px solid var(--fin); }
.water-row { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink); font-weight: 400; }
.water-row b { display: block; font-size: 17px; }
.water-row small { color: var(--ink-2); }
.crown-ic { color: var(--r-legend); font-size: 26px; }
.crown-ic.big { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--r-legend) 18%, transparent); }
.crown-ic.legend { color: var(--olive); background: color-mix(in srgb, var(--olive) 16%, transparent); }
.title-card { display: flex; gap: 12px; align-items: center; }
.title-card b { display: block; font-size: 17px; }
.title-card small { color: var(--ink-2); }

/* Story viewer */
.storyview { position: relative; margin: -12px calc(-1 * var(--gut-r)) -110px calc(-1 * var(--gut-l)); min-height: 100dvh;
  padding: 18px var(--gut-r) 32px var(--gut-l); background: #0b130e; color: #fff; display: grid; align-content: start; gap: 14px; }
.sv-bars { display: flex; gap: 4px; }
.sv-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.sv-bars b { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.sv-who { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.sv-close { color: #fff; font-size: 22px; text-decoration: none; padding: 6px 10px; }
.sv-item { position: relative; z-index: 1; display: grid; gap: 12px; }
.sv-item .card { aspect-ratio: 3 / 4; }
.sv-caption h1 { font-size: 28px; }
.sv-caption p, .sv-live p { color: #c7d6a4; margin: 4px 0 10px; }
.sv-caption .btn { position: relative; z-index: 3; }
.sv-live { display: grid; gap: 10px; justify-items: start; padding: 24px 0; }
.sv-live h1 { font-size: 30px; line-height: 1.1; }
.sv-live .fish { margin-top: 24px; }
.sv-prev, .sv-next { position: absolute; top: 70px; bottom: 120px; border: 0; background: none; z-index: 2; cursor: pointer; }
.sv-prev { left: 0; width: 35%; }
.sv-next { right: 0; width: 65%; }
