html.story-modal-open { overflow: hidden; }
.story-strip { min-width: 0; margin: 0 0 14px; }
.story-circles { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 8px; scrollbar-width: thin; }
.story-person { position: relative; flex: 0 0 72px; width: 72px; display: grid; justify-items: center; gap: 5px; align-content: start; }
.story-avatar { position: relative; width: 60px; height: 60px; border: 2px solid #606575; border-radius: 50%; overflow: hidden; background: #252b39; color: #fff; display: grid; place-items: center; padding: 3px; font-size: 22px; }
.story-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.story-active { border-color: #31d4ae; }
.story-avatar.story-unseen { border: 3px solid #31d4ae; padding: 2px; }
.story-avatar.story-seen { border-color: #737b8e; }
.story-new { position: absolute; top: 0; right: 0; padding: 1px 4px; border: 2px solid #111521; border-radius: 4px; background: #31d4ae; color: #061b15; font-size: 10px; font-weight: 700; line-height: 14px; pointer-events: none; }
.story-person-name { display: block; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: inherit; }
.story-add { position: absolute; top: 39px; right: 4px; height: 24px; width: 24px; padding: 0; border: 2px solid #111521; border-radius: 50%; background: #32cca7; color: #06130f; font-size: 20px; line-height: 20px; }
.story-strip-status { font-size: 12px; margin: 4px 0; }
.story-dialog { color: #f5f7fa; background: #11151d; border: 1px solid #454b59; border-radius: 8px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
.story-dialog::backdrop { background: rgba(0,0,0,.8); }
.story-dialog * { box-sizing: border-box; letter-spacing: 0; }
.story-create-head, .story-create-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.story-create-head h2 { font-size: 18px; margin: 0; }
.story-create-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.story-pickers { display: flex; gap: 8px; flex-wrap: wrap; }
.story-pickers button { display: inline-flex; align-items: center; gap: 6px; }
.story-pickers img { width: 16px; height: 16px; }
.story-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; padding: 6px; border: 1px solid #5c6573; border-radius: 6px; background: #1d2532; color: white; font-size: 17px; line-height: 1; }
.story-icon img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.story-icon:focus-visible, .story-avatar:focus-visible, .story-add:focus-visible { outline: 2px solid #f8d357; outline-offset: 2px; }
.story-create-preview { background: #050608; width: 100%; max-height: min(38vh, 360px); object-fit: contain; display: block; }
.story-dialog [hidden] { display: none !important; }
.story-trim { display: grid; gap: 8px; }
.story-trim label { font-size: 13px; display: grid; gap: 4px; }
.story-trim input { width: 100%; min-width: 0; accent-color: #32cca7; }
.story-field { display: grid; gap: 4px; font-size: 13px; }
.story-dialog select, .story-dialog textarea { width: 100%; min-width: 0; background: #1e2633; color: #fff; border: 1px solid #586474; border-radius: 5px; padding: 8px; }
.story-create-progress { width: 100%; height: 8px; accent-color: #32cca7; }
.story-message { font-size: 13px; overflow-wrap: anywhere; margin: 0; min-height: 20px; }
.story-error { color: #ffacae; }
.story-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; background: #050608; overflow: hidden; }
.story-screen { position: relative; height: 100%; width: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #080c12; }
.story-view-head { position: absolute; inset: 0 0 auto; z-index: 3; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); background: #101925eb; display: grid; gap: 8px; }
.story-segments { display: flex; gap: 4px; min-width: 0; }
.story-segments progress { flex: 1 1 0; width: 0; min-width: 0; height: 4px; accent-color: #f5f7fa; }
.story-view-toolbar { display: flex; gap: 6px; align-items: center; }
.story-view-toolbar > .story-icon { border: 0; background: transparent; width: 36px; height: 38px; }
.story-view-author { display: grid; min-width: 0; gap: 2px; margin-right: auto; }
.story-view-name { color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.story-view-time { color: #bdcbdc; font-size: 11px; }
.story-view-avatar { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; overflow: hidden; border-radius: 50%; background: #315752; color: #d6fff2; font-size: 12px; }
.story-view-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-stage { position: absolute; inset: 0; min-height: 0; min-width: 0; display: grid; place-items: center; overflow: hidden; }
.story-stage > video, .story-stage > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.story-view-status { position: absolute; z-index: 4; inset: auto 12px max(95px, calc(env(safe-area-inset-bottom) + 85px)); text-align: center; background: #141b25; color: #fff; padding: 8px; border-radius: 5px; overflow-wrap: anywhere; pointer-events: none; font-size: 13px; }
.story-resume { position: absolute; z-index: 4; inset: 50% auto auto 50%; transform: translate(-50%, -50%); max-width: calc(100% - 32px); min-height: 44px; padding: 10px 16px; white-space: normal; border-radius: 6px; }
.story-view-footer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.story-view-actions { position: absolute; z-index: 7; top: calc(var(--story-header-height, 75px) + 4px); right: max(10px, env(safe-area-inset-right)); width: min(210px, calc(100% - 20px)); max-height: calc(100% - var(--story-header-height, 75px) - 14px); overflow: auto; padding: 5px; background: #1a2839; border: 1px solid #4d617d; border-radius: 6px; box-shadow: 0 10px 28px #0005; }
.story-view-actions > .story-icon { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; height: auto; min-height: 42px; border: 0; border-radius: 4px; background: transparent; text-align: left; font-size: 13px; line-height: 1.4; padding: 8px; }
.story-view-actions > .story-icon:hover { background: #2b3e57; }
.story-view-actions .story-icon img { width: 18px; height: 18px; flex-shrink: 0; }
.story-prev, .story-next { position: absolute; z-index: 1; top: 23%; bottom: 27%; width: 18%; height: auto; display: flex; align-items: center; padding: 6px; border: 0; background: transparent; }
.story-prev { left: 0; justify-content: flex-start; }
.story-next { right: 0; justify-content: flex-end; }
.story-prev img, .story-next img { width: 24px; height: 24px; padding: 4px; border-radius: 4px; background: #77818c9c; }
.story-prev img { transform: rotate(-90deg); }
.story-next img { transform: rotate(90deg); }
.story-viewer [data-story-stage-pause] { position: absolute; z-index: 1; left: 20%; right: 20%; top: 26%; bottom: 27%; width: auto; height: auto; border: 0; background: transparent; }
.story-viewer [data-story-stage-pause] img { visibility: hidden; width: 42px; height: 42px; padding: 11px; border-radius: 6px; background: #c3c9d0; }
.story-viewer[data-paused=true] [data-story-stage-pause] img { visibility: visible; }
.story-report { position: absolute; z-index: 7; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; right: 12px; max-height: calc(100% - var(--story-header-height, 75px) - 12px); overflow: auto; max-width: 480px; margin: auto; padding: 12px; background: #151c29; border: 1px solid #536175; border-radius: 8px; display: grid; gap: 8px; }
@media (max-width: 360px) { .story-view-toolbar { gap: 4px; } .story-icon { width: 32px; height: 32px; } .story-view-head { padding-inline: 8px; } }
@media (max-height: 500px) { .story-create-preview { max-height: 120px; } .story-view-head { padding-block: 5px; gap: 4px; } }

.story-viewer { inset: var(--story-visible-top, 0px) 0 auto; height: var(--story-visible-height, 100dvh); }
.story-view-layout { display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.story-social { position: absolute; z-index: 5; bottom: 0; left: 0; right: 0; height: min(60%, 500px); max-height: calc(100% - var(--story-header-height, 75px)); min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #151e2b; border: 1px solid #526078; border-bottom: 0; border-radius: 8px 8px 0 0; overflow: hidden; }
.story-social-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 12px; border-bottom: 1px solid #354257; }
.story-social-head h2 { margin: 0; font-size: 16px; }
.story-social-head p { margin: 4px 0 0; font-size: 11px; color: #b6c2d4; overflow-wrap: anywhere; }
.story-social-head > div { min-width: 0; }
.story-comments-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px 12px; }
.story-comments-list { display: grid; gap: 18px; padding: 0; margin: 0; list-style: none; }
.story-comment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; min-width: 0; }
.story-comment-avatar { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #33465e; color: #d6e6ff; font-size: 11px; }
.story-comment-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-comment-body { min-width: 0; }
.story-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.story-comment-head a { color: #eef4ff; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.story-comment-head small { font-size: 11px; color: #b6c2d4; }
.story-comment-body > p { margin: 5px 0; color: #e0e8f4; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-comment-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: #b6c2d4; }
.story-comment-delete { display: grid; place-items: center; width: 30px; min-height: 30px; padding: 5px; border: 0; background: transparent; }
.story-comment-delete img { width: 14px; height: 14px; filter: brightness(0) invert(1); }
.story-social-status { margin: 10px 0 0; color: #b6c2d4; font-size: 12px; overflow-wrap: anywhere; }
.story-comments-older, .story-social-retry { margin-bottom: 12px; width: 100%; white-space: normal; font-size: 12px; }
.story-comment-form { padding: 10px; border-top: 1px solid #354257; }
.story-comment-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px 36px; align-items: end; gap: 3px; padding: 4px 4px 4px 8px; border: 1px solid #526078; border-radius: 8px; background: #101825; }
.story-dialog .story-comment-input-row textarea { height: 36px; max-height: 100px; margin: 0; padding: 6px 0; resize: none; border: 0; background: transparent; font-size: 14px; }
.story-comment-input-row textarea::placeholder { color: #b6c2d4; opacity: 1; }
.story-comment-input-row .story-icon { border: 0; }
.story-comment-send { background: #29486e; }
.story-comment-error { margin: 6px 0 0; color: #ffc0c9; font-size: 12px; overflow-wrap: anywhere; }
.story-comment-emojis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.story-comment-emojis button { min-width: 40px; min-height: 40px; border: 1px solid #526078; border-radius: 6px; background: #24324a; }
.story-social-actions { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: calc(var(--story-preview-height, 55px) + max(12px, env(safe-area-inset-bottom)) + 12px); display: grid; gap: 8px; background: transparent; min-width: 0; pointer-events: auto; }
.story-reaction-button { display: grid; justify-items: center; align-content: center; gap: 4px; width: 44px; height: auto; min-height: 57px; padding: 0; font-size: 12px; line-height: 1.25; border: 0; background: transparent; color: #fff; text-shadow: 0 1px 4px #000, 0 0 3px #000; }
.story-reaction-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #142135a6; box-shadow: 0 2px 7px #0003; }
.story-reaction-button.liked .story-reaction-icon { background: #5d294bd9; }
.story-heart-icon { display: block; width: 20px; height: 20px; background: currentColor; mask: url('/icons/navigation/heart.svg') center / contain no-repeat; }
[data-story-like][aria-pressed='true'] .story-heart-icon { mask-image: url('/icons/navigation/heart-filled.svg'); color: #f2a8bd; }
.story-reaction-button span { font-variant-numeric: tabular-nums; }
.story-comment-preview { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); display: grid; gap: 3px; min-width: 0; min-height: 48px; padding: 7px 10px; border: 0; border-radius: 6px; background: #121e2d; color: #f2f6fc; text-align: left; font: inherit; font-size: 12px; line-height: 1.4; pointer-events: auto; }
.story-preview-label { display: flex; align-items: center; gap: 6px; min-width: 0; color: #d5e6fc; }
.story-preview-label img { width: 15px; height: 15px; filter: brightness(0) invert(1); }
.story-preview-label img:last-child { margin-left: auto; }
.story-preview-copy { display: flex; gap: 5px; min-width: 0; }
.story-preview-copy strong { max-width: 38%; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.story-preview-copy > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-comments-open .story-view-footer { visibility: hidden; }
.story-comment-preview:focus-visible, .story-viewer [data-story-menu]:focus-visible, .story-viewer [data-story-stage-pause]:focus-visible { outline: 2px solid #a9c8ff; outline-offset: -2px; }
.story-comment-form :is(button, textarea):focus-visible, .story-social :is(a, button):focus-visible { outline: 2px solid #a9c8ff; outline-offset: 2px; }
@media (max-width: 899px) {
  .story-social-head { padding: 10px; }
  .story-comment-form { padding: 8px; }
  .story-dialog .story-comment-input-row textarea { font-size: 16px; }
  .story-reaction-button, .story-comment-input-row .story-icon { min-height: 40px; }
}
.story-compact .story-social { height: calc(100% - var(--story-header-height, 60px)); }
.story-compact .story-social-actions { display: flex; }
.story-compact .story-social-head { padding: 6px 10px; }
.story-compact .story-social-head p { display: none; }
@media (max-height: 500px) {
  .story-social-head { padding: 6px 10px; }
  .story-social-head p { display: none; }
  .story-comment-form { padding-block: 5px; }
}
