/* === module: letter_dispatch_reading === */
      /* ===== Letter Reading Phase Overlay ===== */
      .letter-reading-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 920;
        background: #06060c;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 24px 24px 40px;
        overflow-y: auto;
      }
      .letter-reading-overlay.visible {
        display: flex;
      }
      .letter-reading-overlay.fade-out {
        animation: readingFadeOut 1.2s ease forwards;
      }
      @keyframes readingFadeOut {
        to {
          opacity: 0;
        }
      }

      .reading-title {
        font-size: 14px;
        color: #888;
        letter-spacing: 2px;
        margin-bottom: 24px;
        opacity: 0;
        animation: readingFadeIn 0.8s ease 0.3s forwards;
      }
      @keyframes readingFadeIn {
        to {
          opacity: 1;
        }
      }

      .reading-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 16px;
        width: min(100%, 1000px);
        flex: 0 0 auto;
      }

      .reading-quadrant {
        background: #0e0e16;
        border: 1px solid #1a1a2a;
        border-radius: 12px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-height: 40vh;
        overflow-y: auto;
        opacity: 0;
        animation: readingFadeIn 0.6s ease forwards;
        transform: translateY(12px);
      }
      .reading-char-head {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .reading-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(0,0,0,0.34);
        flex: 0 0 auto;
      }
      .reading-name {
        font-size: 15px;
        font-weight: 800;
      }
      .reading-status {
        width: fit-content;
        margin-top: 3px;
        padding: 2px 7px;
        border-radius: 999px;
        font-size: 10px;
        color: #9aa4b8;
        background: rgba(145, 160, 190, 0.10);
        border: 1px solid rgba(145, 160, 190, 0.14);
      }
      .reading-status.waiting {
        color: #f0c040;
        background: rgba(240, 192, 64, 0.12);
        border-color: rgba(240, 192, 64, 0.22);
      }
      .reading-status.done {
        color: #8ce99a;
        background: rgba(81, 207, 102, 0.12);
        border-color: rgba(81, 207, 102, 0.24);
      }
      .reading-status.quiet {
        color: #737b8e;
        background: rgba(115, 123, 142, 0.10);
        border-color: rgba(115, 123, 142, 0.16);
      }
      .reading-quadrant:nth-child(1) {
        animation-delay: 0.4s;
      }
      .reading-quadrant:nth-child(2) {
        animation-delay: 0.6s;
      }
      .reading-quadrant:nth-child(3) {
        animation-delay: 0.8s;
      }
      .reading-quadrant:nth-child(4) {
        animation-delay: 1s;
      }

      .reading-char-name {
        font-size: 15px;
        font-weight: 700;
        color: #e0e0e0;
      }

      .reading-envelope {
        width: 44px;
        height: 34px;
        display: grid;
        place-items: center;
        align-self: center;
        font-size: 30px;
        transition: transform 0.5s ease;
        filter: grayscale(0.3);
        opacity: 0;
        transform: translateY(-18px) scale(0.82) rotateZ(7deg);
      }
      .reading-envelope.arrived {
        opacity: 1;
        transform: translateY(0) scale(1) rotateZ(0deg);
        animation: envelopeArrive 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
      }
      .reading-envelope.opened {
        transform: scale(1.15) rotateZ(-5deg);
        filter: grayscale(0);
      }
      @keyframes envelopeArrive {
        0% {
          opacity: 0;
          transform: translate3d(0, -46px, 0) scale(0.72) rotateZ(12deg);
          filter: blur(2px) grayscale(0.7);
        }
        70% {
          opacity: 1;
          transform: translate3d(0, 4px, 0) scale(1.04) rotateZ(-3deg);
          filter: blur(0) grayscale(0.35);
        }
        100% {
          opacity: 1;
          transform: translate3d(0, 0, 0) scale(1) rotateZ(0deg);
          filter: blur(0) grayscale(0.3);
        }
      }

      .reading-letter-info {
        text-align: left;
        width: 100%;
        opacity: 0;
        transition: opacity 0.6s ease;
        min-height: 52px;
      }
      .reading-letter-info.visible {
        opacity: 1;
      }

      .reading-letter-from {
        font-size: 11px;
        color: #666;
        margin-bottom: 4px;
      }
      .reading-letter {
        padding: 9px 10px;
        border-radius: 8px;
        background: #11111c;
        border: 1px solid #202033;
        margin-bottom: 6px;
      }
      .reading-letter.tampered {
        border-color: rgba(232, 65, 87, 0.36);
        background: rgba(32, 16, 24, 0.72);
      }
      .reading-letter-content {
        color: #d8d8e8;
        font-size: 12px;
        line-height: 1.45;
        white-space: pre-wrap;
        word-break: break-word;
      }
      .reading-letter-text {
        font-size: 13px;
        color: #ccc;
        line-height: 1.5;
        max-width: none;
        white-space: pre-wrap;
        word-break: break-word;
      }
      .reading-letter-text .redacted-char {
        background: #1a1a1a;
        color: #1a1a1a;
        padding: 0 1px;
        border-radius: 2px;
      }

      .reading-no-letter {
        font-size: 12px;
        color: #555;
        font-style: italic;
      }

      .reading-thought {
        font-size: 11px;
        color: #f0c040;
        font-style: italic;
        text-align: left;
        width: 100%;
        opacity: 0;
        transition: opacity 0.6s ease;
        max-width: none;
        line-height: 1.4;
        padding-top: 4px;
        border-top: 1px solid #1a1a2a;
      }
      .reading-thought.visible {
        opacity: 1;
      }
      .reading-thought.loading {
        color: #555;
        font-style: normal;
      }

      .reading-impression-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
        margin-top: 4px;
        opacity: 0;
        transition: opacity 0.6s ease;
      }
      .reading-impression-tags.visible {
        opacity: 1;
      }
      .reading-impression-tag,
      .reading-imp-tag {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 8px;
        background: rgba(240, 192, 64, 0.15);
        color: #f0c040;
        white-space: nowrap;
      }
      .reading-impression-tag.negative,
      .reading-imp-tag.negative {
        background: rgba(255, 80, 80, 0.15);
        color: #ff6666;
      }
      .reading-impression-tag.quiet,
      .reading-imp-tag.quiet {
        background: rgba(115, 123, 142, 0.12);
        color: #8a91a3;
      }

      /* ===== Relationship Summary Panel ===== */
      .reading-summary-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 925;
        background: rgba(6, 6, 12, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 32px;
        overflow-y: auto;
      }
      .reading-summary-overlay.visible {
        display: flex;
        animation: summaryZoomIn 0.6s ease forwards;
      }
      .reading-summary-overlay.fade-out {
        animation: readingFadeOut 0.8s ease forwards;
      }
      @keyframes summaryZoomIn {
        0% {
          opacity: 0;
          transform: scale(0.85);
        }
        100% {
          opacity: 1;
          transform: scale(1);
        }
      }
      .summary-title {
        font-size: 14px;
        color: #888;
        letter-spacing: 2px;
        margin-bottom: 20px;
      }
      .summary-changes {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-width: 500px;
        width: 100%;
        max-height: 56vh;
        overflow-y: auto;
        padding-right: 6px;
      }
      .summary-change-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: #0e0e16;
        border: 1px solid #1a1a2a;
        border-radius: 8px;
        opacity: 0;
        animation: readingFadeIn 0.4s ease forwards;
      }
      .summary-change-row:nth-child(1) {
        animation-delay: 0.2s;
      }
      .summary-change-row:nth-child(2) {
        animation-delay: 0.4s;
      }
      .summary-change-row:nth-child(3) {
        animation-delay: 0.6s;
      }
      .summary-change-row:nth-child(4) {
        animation-delay: 0.8s;
      }
      .summary-change-row:nth-child(5) {
        animation-delay: 1s;
      }
      .summary-change-row:nth-child(6) {
        animation-delay: 1.2s;
      }
      .summary-observer {
        font-size: 13px;
        font-weight: 600;
        color: #e0e0e0;
        min-width: 60px;
      }
      .summary-arrow {
        font-size: 11px;
        color: #555;
      }
      .summary-target {
        font-size: 13px;
        color: #ccc;
        min-width: 60px;
      }
      .summary-feeling {
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 8px;
        background: rgba(240, 192, 64, 0.15);
        color: #f0c040;
      }
      .summary-feeling.negative {
        background: rgba(255, 80, 80, 0.15);
        color: #ff6666;
      }
      .summary-no-changes {
        font-size: 13px;
        color: #555;
        font-style: italic;
        text-align: center;
        padding: 20px;
      }

      .reading-actions,
      .summary-actions {
        width: min(100%, 1000px);
        display: flex;
        justify-content: center;
        margin-top: 14px;
      }

      .reading-continue-btn {
        display: none;
        padding: 10px 28px;
        border-radius: 10px;
        border: 1px solid #3a3a4a;
        background: #1e2533;
        color: #e8eefc;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }

      .reading-continue-btn.visible {
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .reading-continue-btn:hover {
        background: #263044;
      }

      .reading-continue-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }

      @media (max-width: 900px) {
        .reading-grid {
          grid-template-columns: 1fr;
          grid-template-rows: none;
          gap: 12px;
        }

        .reading-quadrant {
          max-height: none;
        }
      }

      .reading-day-transition {
        position: fixed;
        inset: 0;
        z-index: 930;
        background: #000;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
      }
      .reading-day-transition.visible {
        display: flex;
        animation: dayFadeInOut 3s ease forwards;
      }
      @keyframes dayFadeInOut {
        0% {
          opacity: 0;
        }
        25% {
          opacity: 1;
        }
        75% {
          opacity: 1;
        }
        100% {
          opacity: 0;
        }
      }
      .reading-day-text {
        font-size: 22px;
        font-weight: 300;
        color: #888;
        letter-spacing: 4px;
      }

      /* Topic confirmed toast — shown after player commits a topic selection.
         Centered, semi-transparent; slides in from top-8px, auto-dismisses. */
      .topic-confirmed-toast {
        position: fixed;
        top: 18%;
        left: 50%;
        transform: translateX(-50%) translateY(-12px);
        z-index: 940;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.35s ease, transform 0.35s ease;
      }
      .topic-confirmed-toast.visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
      }
      .topic-confirmed-toast .tct-card {
        min-width: 260px;
        padding: 18px 26px 16px;
        background: linear-gradient(180deg, rgba(28, 22, 14, 0.95) 0%, rgba(16, 14, 20, 0.95) 100%);
        border: 1px solid rgba(232, 160, 64, 0.45);
        border-radius: 14px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                    0 0 24px rgba(232, 160, 64, 0.22);
        text-align: center;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
      }
      .topic-confirmed-toast .tct-label {
        font-size: 11px;
        color: #e8a040;
        letter-spacing: 3px;
        font-weight: 500;
        margin-bottom: 6px;
      }
      .topic-confirmed-toast .tct-name {
        font-size: 22px;
        font-weight: 600;
        color: #f4e0b8;
        letter-spacing: 1.5px;
        margin-bottom: 6px;
      }
      .topic-confirmed-toast .tct-sub {
        font-size: 10.5px;
        color: #888;
        letter-spacing: 0.5px;
      }

/* === end module: letter_dispatch_reading === */
