/* Story viewer matches the personal account. */
    .stories-modal {
      position: fixed;
      inset: 0;
      z-index: 99999;
      display: none;
    }
    .stories-modal.open {
      display: block;
    }
    .stories-overlay-hit {
      position: absolute;
      inset: 0;
      background: rgba(15, 34, 64, 0.85);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .stories-viewer {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: min(420px, calc(100vw - 32px));
      height: min(720px, calc(100vh - 48px));
      border-radius: 24px;
      background: #0f172a;
      overflow: hidden;
      box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
    }
    .stories-progress {
      position: absolute;
      top: 12px;
      left: 12px;
      right: 54px;
      z-index: 10;
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 1fr;
      gap: 4px;
    }
    .story-progress-seg {
      height: 3.5px;
      border-radius: 99px;
      background: rgba(255, 255, 255, 0.3);
      overflow: hidden;
    }
    .story-progress-fill {
      display: block;
      height: 100%;
      width: 0;
      background: #ffffff;
      border-radius: 99px;
      transition: width 0.1s linear;
    }
    .stories-close {
      position: absolute;
      top: 10px;
      right: 12px;
      z-index: 10;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.4);
      color: #ffffff;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }
    .stories-close:hover {
      background: rgba(0, 0, 0, 0.7);
    }
    .stories-media {
      flex: 1;
      width: 100%;
      height: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000;
      cursor: pointer;
      user-select: none;
    }
    .stories-media img, .stories-media video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .stories-footer {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 5;
      padding: 40px 20px 24px;
      background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .stories-title {
      color: #ffffff;
      font-size: 16px;
      font-weight: 800;
      line-height: 1.35;
      text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    }
    .stories-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 0 20px;
      border-radius: 99px;
      background: var(--orange, #f4632a);
      color: #ffffff;
      font-size: 13.5px;
      font-weight: 900;
      text-decoration: none;
      box-shadow: 0 6px 16px rgba(244, 99, 42, 0.35);
      transition: transform 0.2s;
      align-self: flex-start;
    }
    .stories-link:hover {
      transform: translateY(-1px);
    }
    body.stories-open {
      overflow: hidden;
    }

.stories-viewer { right:auto; bottom:auto; border:0; }
.stories-media { inset:auto; min-height:0; }

@supports (height: 100dvh) { .stories-viewer { height:min(720px, calc(100dvh - 48px)); } }

.stories-footer { align-items:stretch; justify-content:flex-start; }
