    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      /* OKLCH palette — logo champagne gold (#d1c077) anchors hue family */
      --oklch-logo-l: 80.58%;
      --oklch-logo-c: 0.0951;
      --oklch-logo-h: 96.63;
      --logo-gold: oklch(var(--oklch-logo-l) var(--oklch-logo-c) var(--oklch-logo-h));

      /* Surfaces & neutrals (perceptual match to legacy hex) */
      --bg:          oklch(17.38% 0.0084 274.39);
      --surface:     oklch(18.79% 0.0103 276.44);
      --ink-soft:    oklch(16.62% 0.0092 276.86);
      --subtle:      oklch(26.04% 0.0096 303.81);
      --text:        oklch(86.86% 0.0163 82.79);
      --muted:       oklch(52.09% 0.0120 67.56);
      --cream:       oklch(91.42% 0.0174 84.59);
      --cream-warm:  oklch(89.75% 0.0148 81.72);
      --cream-pale:  oklch(94.58% 0.0124 84.59);
      --cream-chat:  oklch(93.82% 0.0132 84.59);
      --gold:        oklch(89.03% 0.1246 105.67);
      --gold-bright: oklch(93.59% 0.1213 105.47);
      --gold-dim:    oklch(71.47% 0.1120 107.75);
      --gold-alt:    oklch(88.12% 0.1241 105.67);
      --gold-chat:   oklch(91.87% 0.1383 106.14);
      --gold-pale:   oklch(94.12% 0.0892 105.47);
      --ink:         oklch(14.73% 0.0107 285.01);
      --white:       oklch(100% 0 0);
      --black:       oklch(14.48% 0.0053 285.01);
      --ivory:       oklch(99.42% 0.0186 106.77);

      /* Borders & overlays */
      --border:   oklch(100% 0 0 / 0.18);
      --border-h: oklch(100% 0 0 / 0.30);

      /* Gold alpha ramps (from --gold) */
      --gold-a012: oklch(from var(--gold) l c h / 0.012);
      --gold-a015: oklch(from var(--gold) l c h / 0.015);
      --gold-a055: oklch(from var(--gold) l c h / 0.055);
      --gold-a06:  oklch(from var(--gold) l c h / 0.06);
      --gold-a07:  oklch(from var(--gold) l c h / 0.07);
      --gold-a10:  oklch(from var(--gold) l c h / 0.10);
      --gold-a12:  oklch(from var(--gold) l c h / 0.12);
      --gold-a13:  oklch(from var(--gold) l c h / 0.13);
      --gold-a14:  oklch(from var(--gold) l c h / 0.14);
      --gold-a15:  oklch(from var(--gold) l c h / 0.15);
      --gold-a18:  oklch(from var(--gold) l c h / 0.18);
      --gold-a22:  oklch(from var(--gold) l c h / 0.22);
      --gold-a25:  oklch(from var(--gold) l c h / 0.25);
      --gold-a28:  oklch(from var(--gold) l c h / 0.28);
      --gold-a30:  oklch(from var(--gold) l c h / 0.30);
      --gold-a40:  oklch(from var(--gold) l c h / 0.40);
      --gold-a42:  oklch(from var(--gold) l c h / 0.42);
      --gold-a45:  oklch(from var(--gold) l c h / 0.45);
      --gold-a55:  oklch(from var(--gold) l c h / 0.55);
      --gold-a60:  oklch(from var(--gold) l c h / 0.60);
      --gold-a65:  oklch(from var(--gold) l c h / 0.65);
      --gold-a70:  oklch(from var(--gold) l c h / 0.70);
      --gold-a90:  oklch(from var(--gold) l c h / 0.90);
      --gold-a92:  oklch(from var(--gold) l c h / 0.92);
      --gold-a95:  oklch(from var(--gold) l c h / 0.95);

      /* Bright gold alpha (search/hover gradients) */
      --gold-bright-a012: oklch(from var(--gold-bright) l c h / 0.012);
      --gold-bright-a015: oklch(from var(--gold-bright) l c h / 0.015);
      --gold-bright-a06:  oklch(from var(--gold-bright) l c h / 0.06);
      --gold-bright-a10:  oklch(from var(--gold-bright) l c h / 0.10);
      --gold-bright-a12:  oklch(from var(--gold-bright) l c h / 0.12);
      --gold-bright-a14:  oklch(from var(--gold-bright) l c h / 0.14);
      --gold-bright-a18:  oklch(from var(--gold-bright) l c h / 0.18);
      --gold-bright-a22:  oklch(from var(--gold-bright) l c h / 0.22);
      --gold-bright-a25:  oklch(from var(--gold-bright) l c h / 0.25);
      --gold-bright-a28:  oklch(from var(--gold-bright) l c h / 0.28);
      --gold-bright-a30:  oklch(from var(--gold-bright) l c h / 0.30);
      --gold-bright-a40:  oklch(from var(--gold-bright) l c h / 0.40);
      --gold-bright-a42:  oklch(from var(--gold-bright) l c h / 0.42);
      --gold-bright-a45:  oklch(from var(--gold-bright) l c h / 0.45);
      --gold-bright-a55:  oklch(from var(--gold-bright) l c h / 0.55);
      --gold-bright-a60:  oklch(from var(--gold-bright) l c h / 0.60);
      --gold-bright-a70:  oklch(from var(--gold-bright) l c h / 0.70);
      --gold-bright-a90:  oklch(from var(--gold-bright) l c h / 0.90);
      --gold-bright-a92:  oklch(from var(--gold-bright) l c h / 0.92);
      --gold-bright-a100: oklch(from var(--gold-bright) l c h / 1);

      /* White / black alpha ramps */
      --white-a03:  oklch(100% 0 0 / 0.03);
      --white-a035: oklch(100% 0 0 / 0.035);
      --white-a04:  oklch(100% 0 0 / 0.04);
      --white-a045: oklch(100% 0 0 / 0.045);
      --white-a05:  oklch(100% 0 0 / 0.05);
      --white-a052: oklch(100% 0 0 / 0.052);
      --white-a07:  oklch(100% 0 0 / 0.07);
      --white-a08:  oklch(100% 0 0 / 0.08);
      --white-a10:  oklch(100% 0 0 / 0.10);
      --white-a15:  oklch(100% 0 0 / 0.15);
      --white-a18:  oklch(100% 0 0 / 0.18);
      --white-a22:  oklch(100% 0 0 / 0.22);
      --white-a30:  oklch(100% 0 0 / 0.30);
      --white-a35:  oklch(100% 0 0 / 0.35);
      --white-a40:  oklch(100% 0 0 / 0.40);
      --white-a45:  oklch(100% 0 0 / 0.45);
      --white-a65:  oklch(100% 0 0 / 0.65);
      --white-a88:  oklch(100% 0 0 / 0.88);
      --black-a16:  oklch(0% 0 0 / 0.16);
      --black-a18:  oklch(0% 0 0 / 0.18);
      --black-a20:  oklch(0% 0 0 / 0.20);
      --black-a22:  oklch(0% 0 0 / 0.22);
      --black-a25:  oklch(0% 0 0 / 0.25);
      --black-a28:  oklch(0% 0 0 / 0.28);
      --black-a30:  oklch(0% 0 0 / 0.30);
      --black-a32:  oklch(0% 0 0 / 0.32);
      --black-a35:  oklch(0% 0 0 / 0.35);
      --black-a40:  oklch(0% 0 0 / 0.40);
      --black-a42:  oklch(0% 0 0 / 0.42);

      /* Typography */
      --font-head: 'Cormorant Garamond', serif;
      --font-body: 'Inter', sans-serif;

      /* Type scale */
      --text-xs: 13px;
      --text-sm: 15px;
      --text-md: 16px;
      --text-lg: 18px;
      --text-xl: 28px;

      /* Line heights */
      --lh-tight: 1.1;
      --lh-heading: 1.2;
      --lh-body: 1.55;

      /* HUD expand/collapse — soft ease, no overshoot */
      --hud-ease: cubic-bezier(0.4, 0, 0.15, 1);
      --hud-radius-ease: cubic-bezier(0.33, 0, 0.2, 1);
      --hud-dur: 0.92s;
    }

    html, body {
      min-height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      font-weight: 300;
      overflow-x: hidden;
    }

    /* ── background orb glow ── */
    body::before {
      content: '';
      position: fixed;
      top: -30%;
      left: 50%;
      transform: translateX(-50%);
      width: 700px;
      height: 700px;
      background: radial-gradient(ellipse at center,
        var(--gold-a055) 0%,
        var(--gold-a015) 40%,
        transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    /* ── noise grain overlay ── */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
      background-size: 180px;
      pointer-events: none;
      z-index: 0;
      opacity: 0.6;
    }

    /* ── nav ── */
    nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 24px 48px;
      z-index: 10;
      transition: background 0.4s;
    }
    nav.scrolled {
      background: transparent;
      backdrop-filter: none;
      border-color: transparent;
    }
    .nav-logo {
      font-family: 'Cormorant Garamond', serif;
      font-size: 18px;
      font-weight: 600;
      letter-spacing: 0.04em;
      color: var(--text);
      text-decoration: none;
    }
    .nav-logo span { color: var(--gold); }
    .nav-links {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .nav-links a {
      text-decoration: none;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: var(--muted);
      padding: 8px 16px;
      border-radius: 100px;
      border: 1px solid transparent;
      transition: color 0.2s, border-color 0.2s;
    }
    .nav-links a:hover { color: var(--text); }
    .nav-links .btn-sign {
      color: var(--text);
      border-color: var(--border);
      overflow: hidden;
      white-space: nowrap;
      max-width: 160px;
      transition: opacity 0.28s ease, transform 0.28s ease,
                  max-width 0.38s cubic-bezier(0.4,0,0.2,1),
                  padding 0.38s ease, border-color 0.28s ease,
                  background 0.3s ease;
    }
    .nav-links .btn-sign.nav-swapping-out {
      opacity: 0;
      transform: scale(0.9);
      max-width: 0;
      padding-left: 0;
      padding-right: 0;
      border-color: transparent;
      pointer-events: none;
    }
    .nav-links .btn-sign:hover {
      border-color: var(--border-h);
      background: var(--white-a04);
    }

    /* ── main layout ── */
    main {
      position: relative;
      z-index: 1;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: clamp(80px, 8vh, 120px) 24px clamp(120px, 18vh, 200px);
    }


    /* ── logo radial glow / dimming ── */
    .logo-glow {
      position: absolute;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: radial-gradient(ellipse at center,
        var(--gold-bright-a012) 0%,
        oklch(93.59% 0.1213 105.47 / 0.006) 40%,
        transparent 70%);
      pointer-events: none;
      z-index: 0;
      opacity: 0;
      animation: fadeIn 2.0s 0.28s ease forwards;
      transform: translateY(-20px);
    }

    /* ── oracle mark ── */
    .oracle-mark {
      width: auto;
      height: 120px;
      margin-bottom: 12px;
      opacity: 0;
      animation: fadeIn 1.6s 0.28s ease forwards;
      position: relative;
      z-index: 1;
      
    }

    /* ── heading ── */
    .headline {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(29px, 4.7vw, 51px);
      font-weight: 300;
      line-height: var(--lh-heading);
      letter-spacing: -0.025em;
      text-align: center;
      color: var(--text);
      opacity: 0;
      animation: fadeIn 0.55s 0.28s ease forwards;
    }
    .headline em {
      font-style: italic;
      color: var(--gold);
    }

    .tagline {
      margin-top: 16px;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 300;
      color: var(--muted);
      letter-spacing: 0.14em;
      text-transform: uppercase;
      text-align: center;
      opacity: 0;
      animation: fadeIn 0.45s 0.48s ease forwards;
    }

    /* ── search box shape (smooth 1-line pill → multi-line card) ── */
    @property --search-expand {
      syntax: '<number>';
      inherits: false;
      initial-value: 0;
    }
    @property --search-r-pill {
      syntax: '<length>';
      inherits: false;
      initial-value: 29px;
    }

    /* ── search box ── */
    .search-wrap {
      margin-top: 48px;
      width: 100%;
      max-width: 680px;
      opacity: 0;
      animation: searchEntrance 0.75s 0.05s cubic-bezier(0.4, 0, 0.2, 1) forwards;
      transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .search-box {
      position: relative;
      background: var(--surface);
      border: 1px solid var(--border);
      --search-expand: 0;
      --search-r-pill: 29px;
      border-radius: calc(16px + (var(--search-r-pill) - 16px) * (1 - var(--search-expand)));
      box-shadow: 0 0 0 3px var(--white-a03), 0 0 20px var(--white-a05), 0 4px 28px var(--black-a32), 0 1px 8px var(--black-a18);
      transition:
        box-shadow 0.25s,
        --search-expand 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        --search-r-pill 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s,
        border-color 0.25s;
    }
    .search-box:hover {
      border: 1px solid transparent;
      box-shadow: 0 0 0 3px var(--gold-bright-a10), 0 0 28px var(--gold-bright-a14), 0 6px 36px var(--black-a42), 0 2px 10px var(--black-a20);
      background-image:
        linear-gradient(var(--surface), var(--surface)),
        linear-gradient(135deg,
          var(--gold-bright-a100) 0%,
          var(--white-a65) 35%,
          var(--white-a30) 60%,
          var(--gold-bright-a90) 100%);
      background-origin: border-box;
      background-clip: padding-box, border-box;
    }
    .search-box:hover textarea::placeholder {
      color: var(--white-a45);
    }
    .search-box:focus-within {
      border: 1px solid transparent;
      background-image:
        linear-gradient(var(--surface), var(--surface)),
        linear-gradient(135deg,
          var(--gold-bright-a90) 0%,
          var(--white-a40) 35%,
          var(--white-a15) 60%,
          var(--gold-bright-a70) 100%);
      background-origin: border-box;
      background-clip: padding-box, border-box;
      box-shadow: 0 0 0 3px var(--gold-bright-a06), 0 8px 40px var(--black-a40), 0 4px 28px var(--black-a35);
    }
    .search-box:focus-within textarea::placeholder {
      color: var(--white-a45);
    }
    .search-box textarea {
      width: 100%;
      min-height: 58px;
      max-height: 308px;
      background: transparent;
      border: none;
      outline: none;
      resize: none;
      padding: 16px 48px 16px 24px;
      font-family: 'Inter', sans-serif;
      font-size: 18px;
      font-weight: 300;
      color: var(--text);
      line-height: var(--lh-body);
      overflow-y: hidden;
      padding-bottom: calc(16px + 36px * var(--search-expand, 0));
      padding-right: calc(48px - 30px * var(--search-expand, 0));
      transition:
        padding 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      -webkit-font-smoothing: subpixel-antialiased;
    }
    .search-box textarea::placeholder { color: var(--white-a45); }
    .search-box textarea::-webkit-scrollbar { width: 22px; }
    .search-box textarea::-webkit-scrollbar-track { background: transparent; margin: 12px 0 48px 0; }
    .search-box textarea::-webkit-scrollbar-thumb {
      background: var(--white-a22);
      border-radius: 10px;
      border: solid transparent 9px;
      background-clip: padding-box;
    }

    .send-btn {
      position: absolute;
      right: 10px;
      bottom: calc(10px + (50% - 10px) * (1 - var(--search-expand, 0)));
      transform: translateY(calc(50% * (1 - var(--search-expand, 0))));
      width: 36px;
      height: 36px;
      border-radius: 999px;
      background: var(--gold);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition:
        background 0.2s,
        bottom 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .send-btn:hover {
      background: var(--white);
      transform: translateY(calc(50% * (1 - var(--search-expand, 0))))
        scale(calc(1 + 0.05 * var(--search-expand, 0)));
    }

    .search-box.scrollable textarea {
      padding-left: 24px;
      padding-right: 28px;
      padding-bottom: 72px;
      -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 28px,
        black calc(100% - 80px),
        transparent 100%
      );
      mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 28px,
        black calc(100% - 80px),
        transparent 100%
      );
    }
    .search-box.scrollable .send-btn {
      bottom: 14px;
      right: 14px;
    }
    .search-box.scrollable .send-btn:hover { transform: scale(1.05); }
    .search-box.scrollable .send-btn:active { transform: scale(0.97); }
    .send-btn:active {
      transform: translateY(calc(50% * (1 - var(--search-expand, 0)))) scale(0.97);
    }
    .send-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--black); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

    /* ── source pills row ── */
    .source-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 24px;
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }
    .source-label {
      font-size: 13px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      margin-right: 4px;
    }
    .pill {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 12px;
      border-radius: 100px;
      border: 1px solid var(--border);
      box-shadow: 0 0 0 3px var(--white-a03), 0 0 16px var(--white-a05), 0 2px 14px var(--black-a28), 0 1px 4px var(--black-a16);
      background: transparent;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: var(--muted);
      cursor: pointer;
      transition: border-color 0.2s, color 0.2s, background 0.2s;
      user-select: none;
    }
    .pill:hover { border-color: var(--border-h); color: var(--text); }
    .pill.active {
      border-color: var(--gold-bright-a45);
      color: var(--gold);
      background: var(--gold-bright-a06);
    }
    .pill-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: currentColor;
    }
    .pill.active .pill-dot {
      box-shadow: 0 0 5px var(--gold-bright-a60), 0 0 10px var(--gold-bright-a25);
    }

    /* ── suggested prompts ── */
    .suggestions {
      margin-top: 16px;
      display: flex;
      flex-wrap: nowrap;
      flex-direction: column;
      justify-content: center;
      align-items: stretch;
      gap: 8px;
      width: 100%;
      max-width: 680px;
      opacity: 1;
      animation: none;
      transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.35s ease;
      max-height: 240px;
      overflow: visible;
    }
    .suggestions.hidden {
      opacity: 0 !important;
      transform: translateY(6px);
      max-height: 0;
      margin-top: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .sug-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 100px;
      box-shadow: 0 0 0 3px var(--white-a03), 0 0 16px var(--white-a05), 0 2px 14px var(--black-a28), 0 1px 4px var(--black-a16);
      padding: 12px 24px;
      cursor: pointer;
      transition: background 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      opacity: 0;
      animation: dropFromInput 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .sug-card:nth-child(1) { animation-delay: 0.55s; }
    .sug-card:nth-child(2) { animation-delay: 0.65s; }
    .sug-card:hover {
      border: 1px solid transparent;
      background-image:
        linear-gradient(var(--white-a04), var(--white-a04)),
        linear-gradient(135deg,
          var(--gold-bright-a42) 0%,
          var(--white-a18) 40%,
          var(--white-a07) 65%,
          var(--gold-bright-a30) 100%);
      background-origin: border-box;
      background-clip: padding-box, border-box;
    }
    .sug-card .sug-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: transparent;
      flex-shrink: 0;
      transition: background 0.2s;
    }
    .sug-card:hover .sug-icon {
      background: transparent;
    }
    .sug-card .sug-icon svg {
      width: 16px;
      height: 16px;
      stroke: var(--white-a88);
      fill: none;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
      transition: stroke 0.3s ease;
    }
    .sug-card .sug-text {
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 300;
      color: var(--white-a88);
      line-height: var(--lh-body);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.3s ease, font-weight 0.3s ease;
    }
    .sug-card:hover .sug-text { color: var(--cream-pale); font-weight: 300; }
    .sug-card:hover .sug-icon svg { stroke: oklch(100% 0 0 / 1); }

    /* ── bottom caption ── */
    .bottom-note {
      margin-top: 24px;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 300;
      color: var(--muted);
      letter-spacing: 0.04em;
      opacity: 0;
      animation: fadeIn 0.4s 0.75s ease forwards;
    }
    .bottom-note a { color: var(--gold-dim); text-decoration: none; }
    .bottom-note a:hover { color: var(--gold); }

    /* ── animations ── */

    /* 입력창: 제자리에서 부드럽게 — 살짝 스케일 + 은은한 블러 */
    @keyframes searchEntrance {
      0%   { opacity: 0; transform: scale(0.95); filter: blur(3px); }
      100% { opacity: 1; transform: scale(1);    filter: blur(0px); }
    }

    /* 나머지 모든 요소: 제자리에서 스르륵 */
    @keyframes fadeIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    /* 제안 카드: 입력창에서 뚝 떨어짐 */
    @keyframes dropFromInput {
      from { opacity: 0; transform: translateY(-10px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── chat area ── */
    .chat-area {
      display: none;
      flex-direction: column;
      gap: 16px;
      width: 100%;
      max-width: 680px;
      transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: visible;
      padding: 0;
      margin-bottom: 24px;
    }
    .chat-area.active { display: flex; animation: fadeUp 0.4s ease forwards; }

    .msg { display: flex; flex-direction: column; }
    .msg-user { align-items: flex-end; }
    .msg-ai   { align-items: flex-start; }

    .msg-bubble {
      max-width: 88%;
      padding: 16px 24px;
      border-radius: 16px;
      font-family: 'Inter', sans-serif;
      font-size: 18px;
      font-weight: 300;
      line-height: var(--lh-body);
      white-space: pre-wrap;
      word-break: break-word;
      -webkit-font-smoothing: antialiased;
    }
    .msg-user .msg-bubble {
      background: var(--white-a08);
      color: var(--cream-pale);
      border-bottom-right-radius: 4px;
      font-weight: 400;
      box-shadow: 0 4px 16px var(--black-a28), 0 2px 8px var(--black-a18);
      -webkit-font-smoothing: antialiased;
    }

    /* ── AI response text ── */
    .msg-ai-text {
      font-family: 'Inter', sans-serif;
      font-size: 18px;
      font-weight: 380;
      line-height: var(--lh-body);
      color: var(--cream-warm);
      white-space: pre-wrap;
      word-break: break-word;
      padding: 8px 0 8px 4px;
      max-width: 65ch;
      -webkit-font-smoothing: antialiased;
      letter-spacing: -0.01em;
      font-feature-settings: 'kern' 1, 'liga' 1;
    }
    .msg-ai-text p + p,
    .msg-ai-text > * + * {
      margin-top: 16px;
    }

    .gold-text { color: var(--gold-alt); font-weight: 500; -webkit-font-smoothing: antialiased; }
    .msg-loading { display: flex; align-items: center; gap: 4px; padding: 16px 4px; }
    .msg-loading span {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--gold-dim);
      animation: dotBounce 1.2s infinite ease-in-out;
    }
    .msg-loading span:nth-child(2) { animation-delay: 0.18s; }
    .msg-loading span:nth-child(3) { animation-delay: 0.36s; }
    @keyframes dotBounce {
      0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
      30% { opacity: 1; transform: translateY(-5px); }
    }

    /* 채팅 전환: 헤더 요소 페이드아웃 */
    @keyframes fadeOut {
      from { opacity: 1; }
      to   { opacity: 0; }
    }

    main.chat-active {
      justify-content: flex-start;
      padding-top: 100px;
      padding-bottom: 160px;
      min-height: 100vh;
    }
    main.chat-active .chat-area { max-width: 800px; width: 100%; }
    main.chat-active .search-wrap {
      position: fixed !important;
      bottom: 36px;
      left: 50% !important;
      transform: translate3d(-50%, 0, 0) !important;
      -webkit-transform: translate3d(-50%, 0, 0) !important;
      width: min(800px, calc(100% - 48px)) !important;
      max-width: none !important;
      padding: 0 !important;
      margin: 0 !important;
      z-index: 100;
      opacity: 1 !important;
      will-change: transform;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    /* 채팅 전환 중: 헤더 요소 부드럽게 페이드아웃 */
    main.chat-transitioning .logo-glow,
    main.chat-transitioning .oracle-mark,
    main.chat-transitioning .headline,
    main.chat-transitioning .tagline,
    main.chat-transitioning .bottom-note {
      animation: fadeOut 0.22s ease forwards;
      pointer-events: none;
    }
    main.chat-active .logo-glow,
    main.chat-active .oracle-mark,
    main.chat-active .headline,
    main.chat-active .tagline,
    main.chat-active .bottom-note { display: none !important; }

    /* ── mobile ── */
    @media (max-width: 600px) {
      nav { padding: 16px 24px; }
      .suggestions { flex-direction: column; }
      .sug-card { justify-content: center; }
      .sug-card .sug-text { white-space: normal; overflow: visible; }
      .headline { font-size: 28px; }

      /* Mobile input performance: disable heavy effects */
      .search-box {
        transition: none;
      }
      .search-box:hover,
      .search-box:focus-within {
        background-image: none;
        background: var(--surface);
        border: 1px solid var(--border-h);
        box-shadow: 0 4px 24px var(--black-a35), 0 1px 3px var(--black-a18);
      }
      .search-box textarea {
        transition: none;
        -webkit-mask-image: none;
        mask-image: none;
      }
    }

    /* Touch devices: disable heavy effects for better input performance */
    @media (pointer: coarse) {
      .search-box {
        transition: border-color 0.2s;
      }
      .search-box:hover,
      .search-box:focus-within {
        background-image: none;
        background: var(--surface);
        border: 1px solid var(--border-h);
        box-shadow: 0 4px 24px var(--black-a35), 0 1px 3px var(--black-a18);
      }
      .search-box textarea {
        transition: none;
      }

      /* ── Mobile performance: backdrop-filter is the #1 cause of jank ──
         Replace expensive real-time blur with more opaque solid backgrounds. */
      #missionHUD,
      #signInOverlay,
      #signInOverlay.open,
      #profileOverlay,
      #profileOverlay.open,
      .modal-overlay,
      #loginReminderModal,
      #abandonModal,
      #scrollDownBtn,
      #responseCompleteToast,
      #missionLimitToast {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
      }

      /* Bump overlay opacity so content behind no longer shows through without blur */
      #signInOverlay.open    { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      #profileOverlay.open   { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      .modal-overlay         { background: oklch(14.62% 0.0064 285.58 / 0.94); }
      #loginReminderModal    { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      #subMissionTimerModal  { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      #abandonModal          { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      #missionLimitToast     { background: oklch(13.60% 0.0068 285.45 / 0.94); }
      #scrollDownBtn         { background: oklch(25.36% 0.0075 285.86 / 0.92); }
      #responseCompleteToast { background: oklch(25.36% 0.0075 285.86 / 0.92); }

      /* The always-visible HUD: drop the live blur + costly box-shadow transition */
      #missionHUD {
        transition:
          transform 0.52s cubic-bezier(0.16,1,0.3,1),
          opacity 0.38s ease,
          width var(--hud-dur) var(--hud-ease),
          border-radius var(--hud-dur) var(--hud-radius-ease);
      }

      /* Infinite box-shadow / border-color animations repaint every frame — stop them */
      .mission-accept-btn.accepted { animation: none; }
    }

    /* ── page scrollbar ── */
    html {
      scrollbar-width: thin;
      scrollbar-color: var(--white-a10) transparent;
    }
    ::-webkit-scrollbar { width: 3px; background: transparent; }
    ::-webkit-scrollbar-button { display: none !important; height: 0 !important; width: 0 !important; min-height: 0 !important; max-height: 0 !important; background: transparent !important; }
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-track-piece { background: transparent !important; border: none !important; box-shadow: none !important; }
    ::-webkit-scrollbar-corner { background: transparent !important; }
    ::-webkit-scrollbar-thumb { background: var(--white-a18); border-radius: 99px; }

    /* ── sign-in modal ── */
    #signInOverlay {
      position: fixed; inset: 0; z-index: 1000;
      background: oklch(13.60% 0.0068 285.45 / 0);
      backdrop-filter: blur(0px) saturate(1);
      -webkit-backdrop-filter: blur(0px) saturate(1);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
      pointer-events: none;
      transition:
        background 0.9s cubic-bezier(0.16,1,0.3,1),
        backdrop-filter 0.9s cubic-bezier(0.16,1,0.3,1);
    }
    #signInOverlay.open {
      background: oklch(13.60% 0.0068 285.45 / 0.72);
      backdrop-filter: blur(14px) saturate(0.88);
      -webkit-backdrop-filter: blur(14px) saturate(0.88);
      pointer-events: auto;
    }
    #signInCard {
      background:
        radial-gradient(ellipse at 50% -10%, oklch(89.03% 0.1246 105.67 / 0.065) 0%, oklch(89.03% 0.1246 105.67 / 0.014) 44%, transparent 66%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.024) 0%, transparent 40%),
        var(--ink-soft);
      border: 1px solid var(--white-a10);
      border-top: 1px solid oklch(100% 0 0 / 0.2);
      border-radius: 16px;
      padding: 48px 40px 40px;
      width: 100%; max-width: 460px;
      min-height: 260px;
      position: relative;
      box-shadow: 0 40px 90px oklch(0% 0 0 / 0.64), 0 0 100px oklch(89.03% 0.1246 105.67 / 0.05), inset 0 1px 0 var(--white-a05), inset 0 0 0 0.5px var(--white-a045);
      opacity: 0;
      transform: translateY(18px) scale(0.972);
      filter: blur(2px);
      transition:
        opacity 1.05s cubic-bezier(0.16,1,0.3,1),
        transform 1.05s cubic-bezier(0.16,1,0.3,1),
        filter 1.05s cubic-bezier(0.16,1,0.3,1);
    }
    #signInOverlay.open #signInCard {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0px);
    }
    /* top shimmer line */
    #signInCard::before {
      content: '';
      position: absolute;
      top: 0; left: 10%; right: 10%; height: 1px;
      background: linear-gradient(90deg,
        transparent 0%,
        oklch(100% 0 0 / 0.09) 20%,
        var(--gold-bright-a28) 50%,
        oklch(100% 0 0 / 0.09) 80%,
        transparent 100%);
      border-radius: 999px;
    }
    .signin-close {
      position: absolute; top: 18px; right: 22px;
      background: none; border: none; cursor: pointer;
      color: var(--white-a22); font-size: 18px; line-height: var(--lh-tight);
      transition: color 0.3s ease;
      font-weight: 300; padding: 4px;
    }
    .signin-close:hover { color: oklch(100% 0 0 / 0.55); }
    .signin-heading {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px; font-weight: 300;
      color: var(--text);
      letter-spacing: -0.025em;
      margin-bottom: 24px;
      line-height: var(--lh-heading);
      transition: opacity 0.5s ease;
    }
    .signin-fields {
      display: flex; flex-direction: column; gap: 12px;
      margin-bottom: 24px;
    }
    .signin-fields input {
      background: oklch(100% 0 0 / 0.032);
      border: 1px solid oklch(100% 0 0 / 0.09);
      border-radius: 16px;
      padding: 16px 16px;
      font-family: 'Inter', sans-serif;
      font-size: 15px; font-weight: 300;
      color: var(--text);
      outline: none;
      transition:
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
      width: 100%;
      letter-spacing: 0.01em;
    }
    .signin-fields input::placeholder { color: oklch(75.24% 0.0182 84.59 / 0.4); }
    .signin-fields input:hover {
      background: oklch(100% 0 0 / 0.048);
      border-color: var(--white-a15);
    }
    .signin-fields input:focus {
      border: 1px solid transparent;
      background-image:
        linear-gradient(oklch(16.45% 0.0086 274.34 / 1), oklch(16.45% 0.0086 274.34 / 1)),
        linear-gradient(135deg,
          oklch(89.03% 0.1246 105.67 / 0.5) 0%,
          oklch(100% 0 0 / 0.2) 40%,
          var(--white-a08) 65%,
          oklch(89.03% 0.1246 105.67 / 0.38) 100%);
      background-origin: border-box;
      background-clip: padding-box, border-box;
      box-shadow: 0 0 0 3px var(--gold-a055), 0 4px 18px var(--black-a22);
    }
    .signin-footer {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0;
    }
    .signin-btn {
      background: linear-gradient(135deg, var(--gold-a90) 0%, oklch(82.90% 0.1266 105.85 / 0.94) 100%);
      border: none; border-radius: 10px;
      padding: 12px 24px;
      font-family: 'Inter', sans-serif;
      font-size: 15px; font-weight: 500;
      color: var(--ink); cursor: pointer;
      letter-spacing: 0.03em;
      transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.25s cubic-bezier(0.16,1,0.3,1),
        opacity 0.4s ease;
      box-shadow: 0 3px 16px var(--gold-a18), 0 2px 4px var(--gold-a12);
      align-self: flex-end;
      white-space: nowrap;
      min-width: 110px;
      text-align: center;
    }
    .signin-btn:hover {
      background: linear-gradient(135deg, var(--ivory) 0%, oklch(91.87% 0.1383 106.14 / 0.96) 100%);
      box-shadow: 0 5px 24px oklch(89.03% 0.1246 105.67 / 0.26), 0 2px 6px var(--gold-a12);
      transform: translateY(-1px);
    }
    .signin-btn:active { transform: translateY(0) scale(0.98); }
    .signin-create-link {
      font-family: 'Inter', sans-serif;
      font-size: 13px; font-weight: 300;
      color: oklch(75.24% 0.0182 84.59 / 0.45);
      letter-spacing: 0.04em;
      cursor: pointer;
      border: none; background: none; padding: 12px 4px 0;
      transition:
        color 0.35s ease,
        opacity 0.55s cubic-bezier(0.4,0,0.2,1),
        max-height 0.55s cubic-bezier(0.4,0,0.2,1),
        transform 0.55s cubic-bezier(0.4,0,0.2,1);
      overflow: hidden;
      max-height: 40px;
      display: block;
      transform: translateY(0);
      opacity: 1;
    }
    .signin-create-link:hover { color: oklch(84.87% 0.0186 89.37 / 0.72); }
    .signin-create-link.hidden-link {
      opacity: 0;
      max-height: 0;
      padding-top: 0;
      transform: translateY(-6px);
      pointer-events: none;
    }

    /* Welcome state */
    #signInCard.welcome-state {
      background:
        radial-gradient(ellipse at 50% 30%, var(--gold-bright-a10) 0%, oklch(93.59% 0.1213 105.47 / 0.04) 35%, var(--gold-bright-a015) 55%, transparent 75%),
        linear-gradient(170deg, var(--white-a03) 0%, transparent 45%),
        var(--ink-soft);
      animation: portalBreath 3.5s ease-in-out infinite;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      width: 100%;
      max-width: 460px;
      aspect-ratio: 23 / 13;
      min-height: unset;
      padding: 60px 32px 48px;
      box-sizing: border-box;
      overflow: hidden;
    }
    /* Top-anchored so the logo stays put; only the gap below it controls the title */
    #signInCard.welcome-state .signin-welcome-content {
      margin: 0;
    }
    #signInCard.welcome-state .welcome-logo-wrap {
      margin: 0 auto 4px;
    }
    @keyframes portalBreath {
      0%,100% { box-shadow: 0 40px 90px oklch(0% 0 0 / 0.7), 0 0 60px oklch(93.59% 0.1213 105.47 / 0.05); }
      50%      { box-shadow: 0 40px 90px oklch(0% 0 0 / 0.7), 0 0 100px var(--gold-bright-a10), 0 0 160px oklch(93.59% 0.1213 105.47 / 0.04); }
    }
    .signin-welcome-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      width: 100%;
      opacity: 0;
      transform: scale(0.88);
      filter: blur(5px);
      transition:
        opacity 1.6s cubic-bezier(0.16,1,0.3,1),
        transform 1.6s cubic-bezier(0.16,1,0.3,1),
        filter 1.6s cubic-bezier(0.16,1,0.3,1);
    }
    .signin-welcome-content.visible {
      opacity: 1;
      transform: scale(1);
      filter: blur(0px);
    }

    /* ── Welcome logo (oracle mark) ── */
    .welcome-logo-wrap {
      width: 126px; height: auto;
      margin: 0 auto 24px;
      display: flex; align-items: center; justify-content: center;
      position: relative;
    }
    .welcome-logo-wrap::before {
      display: none;
    }
    .welcome-oracle-img {
      width: 123px; height: auto;
      object-fit: contain;
      opacity: 0.90;
      display: block;
      position: relative; z-index: 1;
    }

    .welcome-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px; font-weight: 300;
      color: var(--text);
      letter-spacing: 0.06em;
      margin-bottom: 0;
      line-height: var(--lh-heading);
    }

    /* ── Profile nav button ── */
    /* Pre-login-restore: hide sign-in and show profile instantly before JS runs */
    html[data-logged-in] .btn-sign {
      max-width: 0 !important;
      opacity: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
      pointer-events: none !important;
      transition: none !important;
    }
    html[data-logged-in] .nav-profile-btn {
      opacity: 1 !important;
      transform: scale(1) !important;
      max-width: 34px !important;
      border-color: var(--border) !important;
      pointer-events: auto !important;
      transition: none !important;
    }

    .nav-profile-btn {
      display: flex;
      opacity: 0;
      transform: scale(0.62);
      max-width: 0;
      overflow: hidden;
      pointer-events: none;
      border-color: transparent;
      align-items: center;
      justify-content: center;
      width: 34px; height: 34px;
      border-radius: 50%;
      border: 1px solid transparent;
      background: transparent;
      cursor: pointer;
      transition: opacity 0.36s ease,
                  transform 0.44s cubic-bezier(0.34, 1.56, 0.64, 1),
                  max-width 0.4s cubic-bezier(0.4,0,0.2,1),
                  border-color 0.36s ease,
                  background 0.35s ease;
      color: var(--text);
      padding: 0;
    }
    .nav-profile-btn.nav-active {
      opacity: 1;
      transform: scale(1);
      max-width: 34px;
      border-color: var(--border);
      pointer-events: auto;
    }
    .nav-profile-btn:hover {
      border-color: var(--gold-a45);
      background: var(--gold-a055);
    }
    .nav-profile-btn svg {
      width: 15px; height: 15px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* ── Profile card overlay ── */
    #profileOverlay {
      position: fixed; inset: 0; z-index: 1000;
      background: oklch(13.60% 0.0068 285.45 / 0);
      backdrop-filter: blur(0px) saturate(1);
      -webkit-backdrop-filter: blur(0px) saturate(1);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
      pointer-events: none;
      transition:
        background 0.9s cubic-bezier(0.16,1,0.3,1),
        backdrop-filter 0.9s cubic-bezier(0.16,1,0.3,1);
    }
    #profileOverlay.open {
      background: oklch(13.60% 0.0068 285.45 / 0.68);
      backdrop-filter: blur(14px) saturate(0.88);
      -webkit-backdrop-filter: blur(14px) saturate(0.88);
      pointer-events: auto;
    }
    #profileCard {
      background:
        radial-gradient(ellipse at 50% -10%, oklch(89.03% 0.1246 105.67 / 0.065) 0%, oklch(89.03% 0.1246 105.67 / 0.013) 46%, transparent 68%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.022) 0%, transparent 40%),
        var(--ink-soft);
      border: 1px solid var(--white-a10);
      border-top: 1px solid oklch(100% 0 0 / 0.2);
      border-radius: 16px;
      padding: 48px 32px 48px;
      width: 100%; max-width: 460px;
      aspect-ratio: 23 / 13;
      min-height: unset;
      box-sizing: border-box;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      position: relative;
      box-shadow: 0 40px 90px oklch(0% 0 0 / 0.64), 0 0 100px oklch(89.03% 0.1246 105.67 / 0.04), inset 0 0 0 0.5px oklch(100% 0 0 / 0.042);
      opacity: 0;
      transform: translateY(20px) scale(0.974);
      filter: blur(2.5px);
      transition:
        opacity 1.1s cubic-bezier(0.16,1,0.3,1),
        transform 1.1s cubic-bezier(0.16,1,0.3,1),
        filter 1.1s cubic-bezier(0.16,1,0.3,1);
    }
    #profileOverlay.open #profileCard {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0px);
    }
    #profileCard::before {
      content: '';
      position: absolute;
      top: 0; left: 10%; right: 10%; height: 1px;
      background: linear-gradient(90deg,
        transparent 0%,
        var(--white-a08) 20%,
        oklch(93.59% 0.1213 105.47 / 0.26) 50%,
        var(--white-a08) 80%,
        transparent 100%);
      border-radius: 999px;
    }
    .profile-close {
      position: absolute; top: 18px; right: 22px;
      background: none; border: none; cursor: pointer;
      color: var(--white-a22); font-size: 18px;
      transition: color 0.3s ease;
      font-weight: 300; padding: 4px;
    }
    .profile-close:hover { color: oklch(100% 0 0 / 0.55); }
    .profile-avatar {
      width: 123px; height: auto;
      border-radius: 0;
      background: transparent;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 4px;
      flex-shrink: 0;
    }
    .profile-logo-img {
      width: 123px; height: auto;
      object-fit: contain;
      opacity: 0.90;
    }
    #profileCard .profile-email,
    #profileCard .profile-avatar,
    #profileCard .profile-subtitle {
      transform: translateY(-10px);
    }
    .profile-email {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px; font-weight: 300;
      color: var(--text);
      text-align: center;
      margin-top: auto;
      margin-bottom: 4px;
      letter-spacing: 0.04em;
      line-height: var(--lh-heading);
      flex-shrink: 0;
    }
    .profile-subtitle {
      font-family: 'Inter', sans-serif;
      font-size: 13px; font-weight: 300;
      color: oklch(75.24% 0.0182 84.59 / 0.38);
      text-align: center;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: auto;
      flex-shrink: 0;
      line-height: var(--lh-tight);
    }
    .profile-signout {
      position: absolute;
      left: 24px; bottom: 20px;
      width: auto;
      background: oklch(100% 0 0 / 0.025);
      border: none;
      border-radius: 10px;
      padding: 7px 14px;
      font-family: 'Inter', sans-serif;
      font-size: 12px; font-weight: 300;
      color: oklch(75.24% 0.0182 84.59 / 0.48);
      cursor: pointer;
      letter-spacing: 0.04em;
      transition: background 0.35s ease, color 0.35s ease;
      text-align: center;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .profile-signout:hover {
      background: var(--white-a052);
      color: oklch(84.87% 0.0186 89.37 / 0.7);
    }

    /* ── contact modal ── */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: oklch(14.62% 0.0064 285.58 / 0.76);
      backdrop-filter: blur(12px) saturate(0.85);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
    }
    .modal-box {
      background:
        radial-gradient(ellipse at 50% -8%, var(--gold-a06) 0%, var(--gold-a012) 42%, transparent 64%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.022) 0%, transparent 38%),
        var(--bg);
      border-radius: 16px;
      padding: 32px 32px 24px;
      width: 100%; max-width: 460px;
      position: relative;
      box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30);
    }
    .modal-close {
      position: absolute; top: 16px; right: 20px;
      background: none; border: none; cursor: pointer;
      color: var(--white-a35); font-size: 18px; line-height: var(--lh-tight);
      transition: color 0.2s;
    }
    .modal-close:hover { color: var(--text); }
    .modal-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 24px; font-weight: 300;
      color: var(--text); margin-bottom: 8px;
      padding-left: 4px;
    }
    .modal-desc {
      font-size: 13px; color: var(--muted);
      margin-bottom: 24px; line-height: var(--lh-body);
      padding-left: 4px;
    }
    .modal-desc a { color: var(--gold-dim); text-decoration: none; }
    .modal-desc a:hover { color: var(--gold); }
    .modal-desc .contact-founder-email {
      font-weight: 500;
      letter-spacing: 0.02em;
      color: var(--gold);
      background: linear-gradient(135deg, var(--gold) 0%, oklch(82.90% 0.1266 105.85) 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .modal-desc .contact-founder-email:hover {
      background: linear-gradient(135deg, var(--ivory) 0%, var(--gold) 100%);
      -webkit-text-fill-color: transparent;
    }
    .contact-form { display: flex; flex-direction: column; gap: 12px; }
    .contact-hp {
      position: absolute;
      left: -9999px;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }
    .contact-form input,
    .contact-form textarea {
      background: var(--white-a035);
      border: 1px solid var(--white-a10);
      border-radius: 16px;
      padding: 12px 24px;
      font-family: 'Inter', sans-serif;
      font-size: 15px; font-weight: 300;
      color: var(--text);
      outline: none;
      transition: border 0.25s, background 0.25s, box-shadow 0.25s;
      resize: none;
      box-shadow: 0 2px 12px var(--black-a18), 0 1px 3px var(--black-a16);
      width: 100%;
    }
    .contact-form textarea {
      border-radius: 16px;
      min-height: 110px;
    }
    .contact-form input:hover,
    .contact-form textarea:hover {
      border: 1px solid var(--white-a18);
      background: var(--white-a05);
      box-shadow: 0 2px 16px var(--black-a22), 0 1px 3px var(--black-a18);
    }
    .contact-form input:focus,
    .contact-form textarea:focus {
      border: 1px solid transparent;
      background-image:
        linear-gradient(oklch(17.38% 0.0084 274.39 / 1), oklch(17.38% 0.0084 274.39 / 1)),
        linear-gradient(135deg,
          var(--gold-a55) 0%,
          var(--white-a22) 40%,
          var(--white-a08) 65%,
          var(--gold-a40) 100%);
      background-origin: border-box;
      background-clip: padding-box, border-box;
      box-shadow: 0 0 0 3px var(--gold-a06), 0 0 22px var(--gold-a07), 0 4px 20px var(--black-a25);
    }
    .contact-form input::placeholder,
    .contact-form textarea::placeholder { color: var(--muted); opacity: 0.7; }
    .contact-submit {
      margin-top: 4px;
      background: linear-gradient(135deg, var(--gold-a92) 0%, oklch(82.90% 0.1266 105.85 / 0.95) 100%);
      border: none; border-radius: 10px;
      padding: 12px;
      font-family: 'Inter', sans-serif;
      font-size: 15px; font-weight: 500;
      color: var(--ink); cursor: pointer;
      transition: background 0.2s, box-shadow 0.2s;
      box-shadow: 0 2px 14px var(--gold-a15), 0 2px 4px var(--gold-a12);
    }
    .contact-submit:hover {
      background: linear-gradient(135deg, var(--white) 0%, var(--gold-a90) 100%);
      box-shadow: 0 4px 20px var(--gold-a22), 0 2px 5px var(--gold-a12);
    }
    .contact-submit:active:not(:disabled) {
      transform: scale(0.98);
      box-shadow: 0 2px 10px var(--gold-a18), 0 2px 4px var(--gold-a12);
    }
    .contact-submit.is-sending {
      pointer-events: none;
      opacity: 0.88;
      letter-spacing: 0.08em;
    }
    .contact-submit.send-failed {
      animation: contactSubmitShake 0.45s ease;
      background: linear-gradient(135deg, oklch(64.65% 0.1547 31.30 / 0.85) 0%, oklch(54.11% 0.1453 28.05 / 0.9) 100%);
      color: var(--white);
    }
    @keyframes contactSubmitShake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-4px); }
      40% { transform: translateX(4px); }
      60% { transform: translateX(-3px); }
      80% { transform: translateX(2px); }
    }
    .contact-form.is-sending input,
    .contact-form.is-sending textarea {
      opacity: 0.72;
      pointer-events: none;
    }
    .modal-box.contact-send-sending .contact-submit {
      box-shadow: 0 0 24px var(--gold-a28), 0 0 8px var(--gold-a10);
    }
    .modal-box.contact-send-success {
      animation: contactBoxGlow 1.2s ease forwards;
    }
    @keyframes contactBoxGlow {
      0% { box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30); }
      35% {
        box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30), 0 0 48px var(--gold-a22), 0 0 80px var(--gold-a10);
      }
      100% {
        box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30), 0 0 28px var(--gold-a12);
      }
    }
    .modal-box.contact-send-success .modal-title,
    .modal-box.contact-send-success .modal-desc,
    .modal-box.contact-send-success .contact-form {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.38s ease, visibility 0.38s ease;
    }
    .contact-sent-panel {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 48px 40px;
      opacity: 0;
      transform: scale(0.94);
      pointer-events: none;
      transition: opacity 0.42s ease, transform 0.48s cubic-bezier(0.16,1,0.3,1);
    }
    .contact-sent-panel.visible {
      opacity: 1;
      transform: scale(1);
      pointer-events: auto;
    }
    .contact-sent-mark {
      position: relative;
      width: 40px;
      height: 40px;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      animation: contactSentPop 0.55s cubic-bezier(0.16,1,0.3,1) 0.08s both;
    }
    .contact-sent-mark::before {
      content: '';
      position: absolute;
      left: 50%;
      top: 52%;
      width: 200%;
      height: 220%;
      transform: translate(-50%, -50%);
      background: radial-gradient(
        ellipse 55% 48% at 50% 50%,
        var(--gold-bright-a42) 0%,
        oklch(89.03% 0.1246 105.67 / 0.16) 38%,
        transparent 68%
      );
      filter: blur(18px);
      opacity: 0.95;
      pointer-events: none;
    }
    @keyframes contactSentPop {
      0% { transform: scale(0.72); opacity: 0; }
      70% { transform: scale(1.04); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }
    .contact-sent-icon {
      position: relative;
      z-index: 1;
      width: 32px;
      height: 32px;
      display: block;
      background: transparent;
      overflow: visible;
    }
    .contact-sent-icon path {
      fill: none;
      stroke: oklch(93.59% 0.1213 105.47 / 0.96);
      stroke-width: 2;
      stroke-linecap: square;
      stroke-linejoin: miter;
      stroke-dasharray: 22;
      stroke-dashoffset: 22;
      animation: contactCheckDraw 0.55s ease 0.28s forwards;
    }
    @keyframes contactCheckDraw {
      to { stroke-dashoffset: 0; }
    }
    .contact-sent-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px;
      font-weight: 400;
      color: var(--cream);
      margin: 0;
      line-height: var(--lh-heading);
      opacity: 0;
      transform: translateY(8px);
      animation: contactSentFadeUp 0.5s ease 0.35s forwards;
    }
    @keyframes contactSentFadeUp {
      to { opacity: 1; transform: translateY(0); }
    }

    /* ── AI response extra spacing ── */
    .msg-ai { margin-top: 12px; margin-bottom: 12px; }
    /* ── pending white dot on user bubble ── */
    .msg-bubble { position: relative; }
    .pending-dot {
      position: absolute;
      bottom: -3px;
      right: -3px;
      width: 11px;
      height: 11px;
      border-radius: 50%;
      background: var(--white-a88);
      box-shadow: 0 0 6px var(--white-a45), 0 0 2px var(--white-a45);
      opacity: 1;
      transform: scale(1);
      filter: blur(0);
      transition:
        opacity 1.05s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 1.05s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 1.05s cubic-bezier(0.22, 0.61, 0.36, 1),
        filter 1.05s cubic-bezier(0.22, 0.61, 0.36, 1),
        background 1.05s cubic-bezier(0.22, 0.61, 0.36, 1);
      pointer-events: none;
      z-index: 2;
    }
    .pending-dot.fading {
      opacity: 0;
      transform: scale(0.52);
      background: var(--white-a15);
      box-shadow: 0 0 0 transparent;
      filter: blur(1.5px);
    }

    /* ── bottom shadow fade over chat text near input ── */
    main.chat-active::after {
      content: '';
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 170px;
      background: linear-gradient(to top,
        oklch(17.38% 0.0084 274.39 / 1) 0%,
        oklch(17.38% 0.0084 274.39 / 0.9) 20%,
        oklch(17.38% 0.0084 274.39 / 0.55) 45%,
        oklch(17.38% 0.0084 274.39 / 0.2) 68%,
        oklch(17.38% 0.0084 274.39 / 0.04) 85%,
        transparent 100%);
      pointer-events: none;
      z-index: 3;
    }

    /* ── top gradient fade when content scrolls under nav ── */
    main.chat-active::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 96px;
      background: linear-gradient(to bottom,
        oklch(17.38% 0.0084 274.39 / 1) 0%,
        oklch(17.38% 0.0084 274.39 / 0.72) 46%,
        oklch(17.38% 0.0084 274.39 / 0.14) 76%,
        transparent 100%);
      pointer-events: none;
      z-index: 10;
    }

    /* ── hide home orb when chat is active ── */
    body.chat-active::before { opacity: 0 !important; transition: opacity 0.8s ease; }

    /* ── scattered star glows (injected via JS) ── */
    .chat-star {
      position: fixed;
      border-radius: 50%;
      pointer-events: none;
      z-index: 0;
    }

    /* ── message shoot-up animation ── */
    @keyframes msgShootUp {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .msg-new {
      animation: msgShootUp 0.52s cubic-bezier(0.25, 1, 0.5, 1) both;
    }
    /* Warm cream for readability + positive feel in chat */
    body.chat-active .msg-ai-text { color: var(--cream) !important; }
    body.chat-active .msg-user .msg-bubble { color: var(--cream-chat) !important; }

    /* Gold — warm and vibrant */
    body.chat-active .gold-text { color: var(--gold-chat) !important; }

    /* Nav text — keep original colors in chat mode */
    /* body.chat-active nav a, body.chat-active .nav-logo intentionally not overridden */

    /* Input placeholder */
    .search-box textarea::placeholder { color: oklch(79.65% 0.0234 87.17 / 0.32) !important; }

    /* Reduce pure white anywhere in chat */
    body.chat-active .msg-ai-text, body.chat-active .msg-bubble { text-rendering: optimizeLegibility; }
    /* ──────────────────────────────────────────────────────────── */

    /* ── Mission Card — minimal ── */
    .mission-card {
      background: var(--surface);
      border: none;
      border-radius: 16px;
      padding: 24px 24px 24px;
      width: 100%;
      max-width: 800px;
      max-height: calc(100vh - 60px);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow:

        0 6px 28px oklch(0% 0 0 / 0.46),

        0 14px 44px oklch(0% 0 0 / 0.34),

        0 0 24px oklch(93.59% 0.1213 105.47 / 0.32),

        0 0 48px var(--gold-bright-a22),

        0 0 90px var(--gold-bright-a12);
      margin: 32px auto;
      align-self: center;
      animation: missionCardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
      transition: box-shadow 0.7s ease;
    }

    /* Header, title and footer stay fixed — only tasks scroll */
    .mission-card-header,
    .mission-card-title,
    .mission-card-footer { flex-shrink: 0; }

    /* Mission card: scrollbar on task list only — hidden until hover */
    .mission-card .mission-card-tasks::-webkit-scrollbar-thumb { background: transparent; transition: background 0.25s; }
    .mission-card:hover .mission-card-tasks::-webkit-scrollbar-thumb { background: var(--white-a18); }

    /* Accept 후 — gold 글로우만 제거, 깊이 그림자로 카드 경계 유지 */
    .mission-card.accepted-state {
      background: var(--surface);
      box-shadow: 0 6px 28px oklch(0% 0 0 / 0.46), 0 14px 44px oklch(0% 0 0 / 0.34), 0 22px 56px oklch(0% 0 0 / 0.26);
    }
    .mission-card.accepted-state::before {
      display: none;
    }

    /* footer 버튼 영역 — collapse 애니메이션 */
    .mission-card-footer {
      display: flex; justify-content: flex-end;
      overflow: visible;
      max-height: 80px;
      padding-top: 18px;
      transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1),
                  padding-top 0.38s ease,
                  opacity 0.30s ease;
      opacity: 1;
    }
    .mission-card-footer.collapsed {
      max-height: 0;
      padding-top: 0;
      opacity: 0;
      pointer-events: none;
    }

    /* ── HUD 다중 미션 내비게이션 ── */
    .hud-nav {
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      gap: 4px; padding: 8px 0 4px;
    }
    .hud-nav-arrow {
      font-size: 18px; color: oklch(100% 0 0 / 0.4); cursor: pointer;
      padding: 12px 16px; user-select: none; transition: color 0.2s; line-height: var(--lh-tight);
      border-radius: 10px;
    }
    .hud-nav-arrow:hover { color: oklch(100% 0 0 / 0.82); background: var(--white-a05); }
    .hud-nav-arrow.disabled { opacity: 0.12; pointer-events: none; }
    .hud-nav-dots { display: flex; gap: 16px; align-items: center; }
    .hud-nav-dot {
      width: 5px; height: 5px; border-radius: 50%;
      background: oklch(100% 0 0 / 0.28);
      transition: background 0.25s, transform 0.25s; cursor: pointer;
      padding: 8px; box-sizing: content-box;
      margin: -8px;
      background-clip: content-box;
    }
    .hud-nav-dot.active {
      background: oklch(93.59% 0.1213 105.47 / 0.85); transform: scale(1.15);
      background-clip: content-box;
      box-shadow: 0 0 6px var(--gold-bright-a55), 0 0 12px var(--gold-bright-a22);
    }
    @keyframes hudFlashNew {
      0%   { box-shadow: 0 8px 32px oklch(0% 0 0 / 0.48), 0 0 28px var(--gold-bright-a22); }
      8%   { box-shadow: 0 12px 50px oklch(0% 0 0 / 0.52), 0 0 50px oklch(93.59% 0.1213 105.47 / 0.72), 0 0 90px var(--gold-bright-a45), 0 0 140px var(--gold-bright-a22); }
      30%  { box-shadow: 0 10px 42px oklch(0% 0 0 / 0.54), 0 0 44px oklch(93.59% 0.1213 105.47 / 0.38); }
      100% { box-shadow: 0 10px 44px oklch(0% 0 0 / 0.62), 0 26px 90px var(--black-a40), 0 0 32px oklch(93.59% 0.1213 105.47 / 0.38), 0 0 70px oklch(93.59% 0.1213 105.47 / 0.24), 0 0 100px var(--gold-bright-a14); }
    }

    @keyframes missionCardIn {
      from { opacity: 0; transform: translateY(14px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .mission-card::before {
      display: none;
    }

    .mission-card::after { content: none; }

    .mission-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
    .mission-card-label {
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
      letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); opacity: 0.92;
    }
    .mission-card-due {
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 300;
      color: oklch(78.41% 0.0180 84.59 / 0.65); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
    }
    .mission-card-title {
      font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 400;
      color: oklch(94.90% 0.0165 91.55 / 0.92); line-height: var(--lh-heading);
      margin-top: 16px; margin-bottom: 28px;
      letter-spacing: -0.02em;
      text-shadow: 0 0 30px oklch(89.72% 0.1596 98.82 / 0.1);
    }
    .mission-card-tasks { margin-bottom: 16px; flex: 1; min-height: 0; overflow-y: hidden; }
    .mission-card.is-overflow .mission-card-tasks { overflow-y: auto; scrollbar-color: transparent transparent; }
    .mission-card.is-overflow:hover .mission-card-tasks { scrollbar-color: var(--white-a18) transparent; }
    .mission-task + .mission-task { margin-top: 8px; }
    .mission-task {
      display: flex;
      align-items: baseline;
      gap: 12px;
      padding: 12px 16px;
      border: none;
      border-radius: 10px;
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 300;
      line-height: var(--lh-body);
    }
    /* Mission card sub-tasks — match HUD expanded task surfaces (no gold fill/border) */
    .mission-task.unlocked {
      background: var(--white-a04);
      color: var(--cream-warm);
      box-shadow: 0 2px 8px var(--black-a18), 0 1px 3px var(--black-a16);
    }
    .mission-task.unlocked .task-label {
      font-weight: 400;
      color: var(--cream);
    }
    .mission-task.in-progress,
    .hud-exp-task.in-progress {
      position: relative;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      padding: 12px 72px 10px 16px;
      background: oklch(100% 0 0 / 0.07);
      color: var(--cream-warm);
      box-shadow: 0 2px 8px var(--black-a18), 0 1px 3px var(--black-a16);
    }
    .mission-task.in-progress .task-row-main,
    .hud-exp-task.in-progress .task-row-main {
      display: flex;
      align-items: baseline;
      gap: 12px;
      width: 100%;
      min-height: 0;
    }
    .mission-task.in-progress .task-timer,
    .hud-exp-task.in-progress .task-timer {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      margin-left: 0;
    }
    .mission-task.in-progress .task-label,
    .hud-exp-task.in-progress .task-label {
      font-weight: 500;
      color: var(--cream);
    }
    .mission-card-tasks:has(.in-progress) > .mission-task:not(.in-progress),
    .hud-exp-tasks:has(.in-progress) > .hud-exp-task:not(.in-progress) {
      opacity: 0.58;
    }
    .mission-card-tasks:has(.in-progress) > .mission-task.completed,
    .hud-exp-tasks:has(.in-progress) > .hud-exp-task.completed {
      opacity: 0.42;
    }
    .task-progress-track {
      flex-shrink: 0;
      height: 2px;
      margin-top: 10px;
      border-radius: 999px;
      background: var(--white-a06);
      overflow: hidden;
    }
    .task-progress-fill {
      display: block;
      height: 100%;
      width: calc(var(--task-pct, 1) * 100%);
      border-radius: inherit;
      background: oklch(93.59% 0.1213 105.47 / 0.5);
      transition: width 1s linear, background 0.35s ease;
    }
    .task-progress-track.task-progress-low .task-progress-fill {
      background: oklch(67.46% 0.1446 49.16 / 0.72);
    }
    .mission-task.locked {
      background: oklch(100% 0 0 / 0.02);
      color: var(--muted);
      opacity: 0.55;
      border: none;
      border-radius: 10px;
      box-shadow: 0 1px 4px oklch(0% 0 0 / 0.12), 0 1px 3px var(--black-a18);
    }
    .mission-task.completed {
      opacity: 0.5;
      text-decoration: line-through;
    }
    .mission-task.completed .task-check {
      margin-left: auto;
      color: var(--gold-bright);
      font-size: 13px;
    }
    .mission-card.mission-card-completed {
      opacity: 0.7;
      box-shadow: 0 6px 28px oklch(0% 0 0 / 0.46), 0 14px 44px oklch(0% 0 0 / 0.34), 0 22px 56px oklch(0% 0 0 / 0.26);
    }
    @keyframes cardUpdatedFlash {
      0%   { box-shadow: 0 8px 40px oklch(0% 0 0 / 0.38), 0 0 56px oklch(93.59% 0.1213 105.47 / 0.48); }
      100% { box-shadow: 0 8px 40px oklch(0% 0 0 / 0.38), 0 0 24px oklch(93.59% 0.1213 105.47 / 0.32), 0 0 48px var(--gold-bright-a22), 0 0 90px var(--gold-bright-a12); }
    }
    .mission-card.card-updated {
      animation: cardUpdatedFlash 0.6s ease forwards;
    }
    .task-num { color: oklch(82.04% 0.0158 90.26 / 0.65); font-weight: 500; flex-shrink: 0; font-size: 13px; }
    .task-lock {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      align-self: center;
      width: 14px;
      height: 14px;
      opacity: 0.22;
      transform: scale(0.88);
    }
    .task-lock svg {
      width: 13px;
      height: 13px;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .task-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task-due { color: oklch(78.41% 0.0180 84.59 / 0.65); font-size: 13px; flex-shrink: 0; white-space: nowrap; }
    .task-timer {
      flex-shrink: 0;
      margin-left: auto;
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.06em;
      color: oklch(93.59% 0.1213 105.47 / 0.82);
      padding: 3px 8px;
      border-radius: 8px;
      background: oklch(93.59% 0.1213 105.47 / 0.08);
      white-space: nowrap;
    }
    .task-timer.task-timer-low {
      color: oklch(86.53% 0.1162 75.55 / 0.95);
      background: oklch(67.46% 0.1446 49.16 / 0.12);
    }
    .task-timer.task-timer-expired {
      color: oklch(64.65% 0.1547 31.30 / 0.9);
      background: oklch(55.49% 0.1843 29.89 / 0.1);
    }

    /* ── Accept Button — gold (same as send btn) with spreading glow ── */
    .mission-accept-btn {
      background: var(--gold);
      border: 1px solid transparent;
      border-radius: 10px; padding: 12px 24px;
      font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
      color: var(--ink); cursor: pointer;
      transition: box-shadow 0.25s, transform 0.15s;
      box-shadow: 0 2px 14px var(--gold-a28), 0 2px 4px var(--gold-a12);
      letter-spacing: 0.05em; position: relative; overflow: hidden;
    }
    .mission-accept-btn::after { content: none; }
    .mission-accept-btn:hover {
      box-shadow: 0 4px 22px oklch(89.03% 0.1246 105.67 / 0.48), 0 2px 5px var(--gold-a12);
      transform: translateY(-1px);
    }
    .mission-accept-btn:active { transform: scale(0.97); }

    /* ── Accepted — 거의 정적인 은은한 글로우 ── */
    .mission-accept-btn.accepted {
      background: transparent;
      color: oklch(93.59% 0.1213 105.47 / 0.72);
      border: 1px solid transparent;
      box-shadow: 0 0 10px var(--gold-bright-a10), 0 0 10px var(--gold-bright-a12);
      cursor: default; transform: none;
      animation: acceptedGlowPulse 5s ease-in-out infinite;
    }
    .mission-accept-btn.accepted::after { content: none; }
    @keyframes acceptedGlowPulse {
      0%, 100% { box-shadow: 0 0 8px oklch(93.59% 0.1213 105.47 / 0.08), 0 0 10px var(--gold-bright-a12); }
      50%      { box-shadow: 0 0 14px var(--gold-bright-a14), 0 0 10px var(--gold-bright-a12); }
    }

    /* ── Accept 클릭 — 제자리 밝아지는 에너지 (일회성) ── */
    .mission-accept-btn.accept-ack {
      animation: acceptEnergyBtn 0.68s cubic-bezier(0.33,0,0.2,1) forwards;
    }
    @keyframes acceptEnergyBtn {
      0%, 100% {
        filter: brightness(1) saturate(1);
        box-shadow: 0 2px 14px var(--gold-a28), 0 2px 4px var(--gold-a12);
        background-color: var(--gold);
      }
      45% {
        filter: brightness(1.12) saturate(1.06);
        box-shadow: 0 3px 18px oklch(89.03% 0.1246 105.67 / 0.38), 0 0 20px var(--gold-bright-a22);
        background-color: var(--gold-pale);
      }
    }
    .mission-card.accept-card-ack {
      animation: acceptEnergyCard 0.72s cubic-bezier(0.33,0,0.2,1) forwards;
    }
    @keyframes acceptEnergyCard {
      0%, 100% {
        filter: brightness(1);
        box-shadow:

          0 6px 28px oklch(0% 0 0 / 0.46),

          0 14px 44px oklch(0% 0 0 / 0.34),

          0 0 24px oklch(93.59% 0.1213 105.47 / 0.32),

          0 0 48px var(--gold-bright-a22),

          0 0 90px var(--gold-bright-a12);
      }
      48% {
        filter: brightness(1.06);
        box-shadow:

          0 6px 28px oklch(0% 0 0 / 0.46),

          0 14px 44px oklch(0% 0 0 / 0.34),

          0 0 30px oklch(93.59% 0.1213 105.47 / 0.38),

          0 0 54px oklch(93.59% 0.1213 105.47 / 0.26),

          0 0 96px var(--gold-bright-a14);
      }
    }

    .mission-accept-btn.abandoned {
      background: oklch(55.49% 0.1843 29.89 / 0.1); color: oklch(58.60% 0.1574 31.65 / 0.8);
      border: 1px solid oklch(55.49% 0.1843 29.89 / 0.25); box-shadow: none;
      cursor: default; transform: none;
    }

    /* ── In-HUD Abandon Confirmation ── */
    /* ── Abandon confirm crossfade wrapper ── */
    .hud-content-switch { position: relative; }
    #missionHUD.expanded .hud-content-switch {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    .hud-main-content {
      transition: opacity 0.20s ease, transform 0.22s ease;
    }
    #missionHUD.expanded .hud-main-content {
      flex: 1;
      min-height: 0;
      max-height: min(560px, calc(100vh - 120px));
      display: flex;
      flex-direction: column;
    }
    .hud-main-content.confirming {
      opacity: 0;
      transform: translateY(-5px) scale(0.97);
      pointer-events: none;
    }
    .hud-abandon-confirm {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 12px 8px;
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      opacity: 0;
      transform: translateY(7px) scale(0.97);
      pointer-events: none;
      transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1);
    }
    .hud-abandon-confirm.visible {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }
    .hud-confirm-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; opacity: 0.80; color: oklch(64.67% 0.1780 30.65 / 0.92); }
    .hud-confirm-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 18px; font-weight: 400; color: var(--cream);
      margin-bottom: 8px; line-height: var(--lh-body);
    }
    .hud-confirm-desc {
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 300;
      color: oklch(58.60% 0.1574 31.65 / 0.78); margin-bottom: 16px; letter-spacing: 0.03em;
    }
    .hud-confirm-actions { display: flex; gap: 8px; justify-content: center; }

    /* ── Login Reminder Modal ── */
    #loginReminderModal {
      position: fixed; inset: 0; z-index: 300;
      background: oklch(13.60% 0.0068 285.45 / 0.8);
      backdrop-filter: blur(12px) saturate(0.85);
      -webkit-backdrop-filter: blur(12px) saturate(0.85);
      display: flex; align-items: center; justify-content: center; padding: 24px;
    }
    .login-reminder-box {
      background:
        radial-gradient(ellipse at 50% -8%, var(--gold-a07) 0%, oklch(89.03% 0.1246 105.67 / 0.01) 44%, transparent 66%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.02) 0%, transparent 38%), var(--bg);
      border-radius: 16px; padding: 64px 48px 56px;
      width: 100%; max-width: 440px; text-align: center;
      box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30);
    }
    .login-reminder-icon { font-size: 28px; margin-bottom: 24px; display: block; }
    .login-reminder-title {
      font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400;
      color: var(--cream); margin-bottom: 16px; line-height: var(--lh-heading);
    }
    .login-reminder-desc {
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 300;
      color: var(--muted); margin-bottom: 40px; line-height: var(--lh-body); letter-spacing: 0.02em;
    }
    .login-reminder-actions { display: flex; gap: 12px; justify-content: center; }
    .login-btn-primary {
      background: linear-gradient(135deg, var(--gold-a92) 0%, oklch(82.90% 0.1266 105.85 / 0.95) 100%);
      border: 1px solid var(--gold-a30);
      border-radius: 10px; padding: 12px 24px;
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
      color: var(--ink); cursor: pointer; letter-spacing: 0.04em;
      transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .login-btn-primary:hover {
      background: linear-gradient(135deg, var(--white) 0%, var(--gold-a95) 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 16px oklch(89.03% 0.1246 105.67 / 0.2), 0 2px 4px var(--gold-a12);
    }
    .login-btn-secondary {
      background: oklch(100% 0 0 / 0.06);
      border: none;
      border-radius: 10px; padding: 12px 24px;
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 400;
      color: var(--text); cursor: pointer; letter-spacing: 0.04em;
      transition: background 0.2s, transform 0.15s;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .login-btn-secondary:hover {
      background: var(--white-a10);
      transform: translateY(-1px);
    }

    /* ── Sub-mission step timer modal ── */
    #subMissionTimerModal {
      position: fixed; inset: 0; z-index: 310;
      background: oklch(13.60% 0.0068 285.45 / 0.8);
      backdrop-filter: blur(12px) saturate(0.85);
      -webkit-backdrop-filter: blur(12px) saturate(0.85);
      display: none; align-items: center; justify-content: center;
      padding: 24px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.26s ease;
    }
    #subMissionTimerModal.visible {
      opacity: 1;
      pointer-events: auto;
    }
    .sub-mission-timer-box {
      background:
        radial-gradient(ellipse at 50% -8%, var(--gold-a07) 0%, oklch(89.03% 0.1246 105.67 / 0.01) 44%, transparent 66%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.02) 0%, transparent 38%), var(--bg);
      border-radius: 16px;
      padding: 48px 40px 40px;
      width: 100%; max-width: 420px;
      text-align: center;
      box-shadow: 0 4px 24px var(--black-a40), 0 8px 40px var(--black-a30);
      transform: translateY(10px) scale(0.97);
      transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
    }
    #subMissionTimerModal.visible .sub-mission-timer-box {
      transform: translateY(0) scale(1);
    }
    .sub-mission-timer-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 24px; font-weight: 400;
      color: var(--cream); margin-bottom: 14px; line-height: var(--lh-heading);
    }
    .sub-mission-timer-desc {
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 300;
      color: var(--muted); margin-bottom: 12px; line-height: var(--lh-body);
      letter-spacing: 0.02em;
    }
    .sub-mission-timer-step {
      font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 400;
      color: oklch(93.59% 0.1213 105.47 / 0.75); margin-bottom: 32px;
      letter-spacing: 0.03em;
    }
    .sub-mission-timer-actions {
      display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    }
    .sub-mission-timer-retry {
      background: linear-gradient(135deg, var(--gold-a92) 0%, oklch(82.90% 0.1266 105.85 / 0.95) 100%);
      border: 1px solid var(--gold-a30);
      border-radius: 10px; padding: 12px 28px;
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
      color: var(--ink); cursor: pointer; letter-spacing: 0.04em;
      transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .sub-mission-timer-retry:hover {
      background: linear-gradient(135deg, var(--white) 0%, var(--gold-a95) 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 16px oklch(89.03% 0.1246 105.67 / 0.2), 0 2px 4px var(--gold-a12);
    }
    .sub-mission-timer-cancel {
      background: oklch(100% 0 0 / 0.06);
      border: none;
      border-radius: 10px; padding: 12px 28px;
      font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 400;
      color: var(--text); cursor: pointer; letter-spacing: 0.04em;
      transition: background 0.2s, transform 0.15s;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .sub-mission-timer-cancel:hover {
      background: var(--white-a10);
      transform: translateY(-1px);
    }

    /* ── Dynamic Island ambient shadow backdrop ── */
    #hudAmbientShadow {
      position: fixed;
      top: 0; left: 50%;
      transform: translateX(-50%);
      width: min(1000px, 100vw);
      height: 210px;
      background: radial-gradient(ellipse 56% 80% at 50% 6%,
        var(--gold-bright-a22) 0%,
        oklch(93.59% 0.1213 105.47 / 0.08) 18%,
        oklch(0% 0 0 / 0.52) 38%,
        var(--black-a22) 58%,
        transparent 100%);
      pointer-events: none;
      z-index: 195;
      opacity: 0;
      transition: opacity 0.55s ease;
    }
    #hudAmbientShadow.visible { opacity: 1; }

    /* ── Mission HUD — Dynamic Island pill ── */
    #missionHUD {
      position: fixed;
      top: 22px;
      left: 50%;
      transform: translateX(-50%) translateY(-30px);
      opacity: 0;
      z-index: 200;
      background: var(--surface);
      border: none;
      backdrop-filter: blur(10px) saturate(1.1);
      -webkit-backdrop-filter: blur(10px) saturate(1.1);
      border-radius: 50px;
      box-shadow:

        0 10px 44px oklch(0% 0 0 / 0.62),

        0 26px 90px var(--black-a40),

        0 0 28px var(--gold-bright-a42),

        0 0 56px var(--gold-bright-a28),

        0 0 100px oklch(93.59% 0.1213 105.47 / 0.16);
      transition:
        transform 0.52s cubic-bezier(0.16,1,0.3,1),
        opacity 0.38s ease,
        width var(--hud-dur) var(--hud-ease),
        border-radius var(--hud-dur) var(--hud-radius-ease);
      pointer-events: none;
      width: min(500px, calc(100vw - 24px));
      overflow: hidden;
      cursor: pointer;
      user-select: none;
    }
    #missionHUD.visible {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
      pointer-events: auto;
    }
    #missionHUD.expanded {
      width: min(640px, calc(100vw - 24px));
      border-radius: 16px;
      transition:
        width var(--hud-dur) var(--hud-ease),
        border-radius var(--hud-dur) var(--hud-radius-ease);
      box-shadow:

        0 20px 64px oklch(0% 0 0 / 0.6),

        0 36px 100px var(--black-a32),

        0 0 36px oklch(93.59% 0.1213 105.47 / 0.38),

        0 0 72px oklch(93.59% 0.1213 105.47 / 0.24),

        0 0 120px var(--gold-bright-a14);
    }
    /* Collapse/expand: skip blur + shadow transition (prevents radius jank) */
    #missionHUD.hud-animating {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      transition:
        transform 0.52s cubic-bezier(0.16,1,0.3,1),
        opacity 0.38s ease,
        width var(--hud-dur) var(--hud-ease),
        border-radius var(--hud-dur) var(--hud-radius-ease);
    }
    /* Expand: radius eases with width from the start */
    #missionHUD.expanded.hud-expanding {
      border-radius: 16px;
      transition:
        width var(--hud-dur) var(--hud-ease),
        border-radius var(--hud-dur) var(--hud-radius-ease);
    }
    /* Collapse: radius → pill after content folds partway (avoids tall-box snap) */
    #missionHUD.hud-collapsing:not(.expanded) {
      border-radius: 50px;
      transition:
        width var(--hud-dur) var(--hud-ease),
        border-radius calc(var(--hud-dur) * 0.62) var(--hud-radius-ease) calc(var(--hud-dur) * 0.28);
    }
    /* Pill row — 3-section layout: left | center | right */
    .hud-pill {
      display: flex;
      align-items: center;
      position: relative;
      width: 100%;
      padding: 16px 24px;
      box-sizing: border-box;
      min-width: 0;
    }
    .hud-pill-left {
      display: flex;
      align-items: center;
      flex: 1;
      min-width: 0;
    }
    .hud-pill-center {
      position: absolute;
      left: 50%;
      transform: translateX(-50%) scale(1);
      text-align: center;
      max-width: 40%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      pointer-events: none;
      transition: opacity var(--hud-dur) var(--hud-ease),
                  transform var(--hud-dur) var(--hud-ease);
    }
    .hud-pill-right {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      white-space: nowrap;
      min-width: 0;
    }
    /* Pill title fades out when expanded — replaced by larger title in body */
    #missionHUD.expanded .hud-pill-center {
      opacity: 0;
      transform: translateX(-50%) scale(0.98);
      pointer-events: none;
    }

    /* Expanded section — single grid height animation (no max-height fight) */
    .hud-expanded {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows var(--hud-dur) var(--hud-ease);
      overflow: hidden;
    }
    #missionHUD.expanded .hud-expanded {
      grid-template-rows: 1fr;
    }
    .hud-expanded-inner {
      min-height: 0;
      overflow: hidden;
      padding: 0 28px;
      display: flex;
      flex-direction: column;
      transition: padding var(--hud-dur) var(--hud-ease);
    }
    #missionHUD.expanded .hud-expanded-inner {
      padding: 0 28px 28px;
    }
    .hud-sep {
      flex-shrink: 0;
      height: 1px;
      background: var(--white-a07);
      margin-bottom: 16px;
      opacity: 0;
      transition: opacity 0.32s ease;
    }
    #missionHUD.expanded .hud-sep {
      opacity: 1;
      transition: opacity 0.55s var(--hud-ease) 0.06s;
    }
    .hud-exp-title {
      flex-shrink: 0;
      font-family: 'Cormorant Garamond', serif;
      font-size: 22px;
      font-weight: 400;
      color: var(--text);
      margin-top: 12px;
      margin-bottom: 24px;
      letter-spacing: -0.02em;
      line-height: var(--lh-heading);
      text-align: center;
      opacity: 0;
      transform: translateY(3px);
      transition: opacity 0.32s ease, transform 0.38s var(--hud-ease);
    }
    #missionHUD.expanded .hud-exp-title {
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.58s var(--hud-ease) 0.08s, transform 0.58s var(--hud-ease) 0.06s;
    }
    .hud-exp-tasks {
      margin-bottom: 16px;
      flex: 1;
      min-height: 0;
      overflow-y: hidden;
      opacity: 0;
      transform: translateY(2px);
      transition: opacity 0.32s ease, transform 0.38s var(--hud-ease);
    }
    #missionHUD.expanded .hud-exp-tasks {
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.55s var(--hud-ease) 0.12s, transform 0.55s var(--hud-ease) 0.1s;
    }
    .hud-exp-tasks.can-scroll {
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--white-a18) transparent;
    }
    .hud-exp-tasks.can-scroll::-webkit-scrollbar { width: 4px; }
    .hud-exp-tasks.can-scroll::-webkit-scrollbar-track { background: transparent; }
    .hud-exp-tasks.can-scroll::-webkit-scrollbar-thumb { background: var(--white-a18); border-radius: 2px; }
    .hud-exp-task + .hud-exp-task { margin-top: 8px; }
    .hud-exp-task {
      display: flex;
      align-items: baseline;
      gap: 12px;
      overflow: hidden;
      padding: 12px 16px;
      border-radius: 10px;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 300;
      line-height: var(--lh-body);
    }
    .hud-exp-task.unlocked {
      background: var(--white-a04);
      color: var(--cream-warm);
      box-shadow: 0 2px 8px var(--black-a18), 0 1px 3px var(--black-a16);
      border: none;
    }
    .hud-exp-task .task-label {
      white-space: normal;
      text-overflow: clip;
    }
    .hud-exp-task.unlocked .task-label {
      font-weight: 400;
      color: var(--cream);
    }
    .hud-exp-task.locked {
      background: oklch(100% 0 0 / 0.02);
      color: var(--muted);
      opacity: 0.55;
      border-radius: 10px;
      box-shadow: 0 1px 4px oklch(0% 0 0 / 0.12), 0 1px 3px var(--black-a18);
    }
    .hud-exp-task.completed {
      opacity: 0.5;
      text-decoration: line-through;
    }
    .hud-exp-task.completed .task-check {
      margin-left: auto;
      color: var(--gold-bright);
      font-size: 13px;
      text-decoration: none;
    }
    .hud-exp-footer {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 4px 0;
      opacity: 0;
      transition: opacity 0.32s ease;
    }
    #missionHUD.expanded .hud-exp-footer {
      opacity: 1;
      transition: opacity 0.5s var(--hud-ease) 0.18s;
    }
    .hud-exp-timer-large {
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 400;
      color: var(--gold);
      letter-spacing: 0.03em;
      font-variant-numeric: tabular-nums;
    }
    .hud-exp-accepted {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: var(--gold-dim);
      letter-spacing: 0.02em;
    }
    .hud-exp-right {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    /* Abandon button — generous hit area */
    .hud-exp-abandon {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: oklch(57.16% 0.1569 29.82 / 0.62);
      cursor: pointer;
      letter-spacing: 0.03em;
      transition: color 0.2s, background 0.2s;
      -webkit-user-select: none;
      user-select: none;
      padding: 8px 12px;
      border-radius: 10px;
    }
    .hud-exp-abandon:hover { color: oklch(63.14% 0.1671 31.01 / 0.95); background: oklch(55.49% 0.1843 29.89 / 0.08); }

    /* ── Mission Abandon Warning Modal ── */
    #abandonModal {
      position: fixed; inset: 0; z-index: 300;
      background: oklch(13.60% 0.0068 285.45 / 0.82);
      backdrop-filter: blur(14px) saturate(0.8);
      -webkit-backdrop-filter: blur(14px) saturate(0.8);
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
    }
    .abandon-box {
      background:
        radial-gradient(ellipse at 50% -10%, oklch(55.49% 0.1843 29.89 / 0.11) 0%, oklch(55.49% 0.1843 29.89 / 0.02) 48%, transparent 68%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.018) 0%, transparent 38%),
        var(--bg);
      border: 1px solid oklch(55.49% 0.1843 29.89 / 0.22);
      border-top: 1px solid oklch(61.11% 0.1845 30.81 / 0.38);
      border-radius: 16px;
      padding: 32px 32px 24px;
      width: 100%; max-width: 360px;
      text-align: center;
      position: relative;
      box-shadow: 0 28px 72px oklch(0% 0 0 / 0.62), 0 0 80px oklch(55.49% 0.1843 29.89 / 0.06), inset 0 0 0 0.5px var(--white-a04);
    }
    .abandon-icon {
      font-size: 28px; margin-bottom: 16px; display: block; opacity: 0.85;
    }
    .abandon-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px; font-weight: 400;
      color: var(--cream); margin-bottom: 12px; line-height: var(--lh-heading);
    }
    .abandon-desc {
      font-family: 'Inter', sans-serif;
      font-size: 13px; font-weight: 300;
      color: oklch(58.60% 0.1574 31.65 / 0.78);
      margin-bottom: 24px; letter-spacing: 0.03em; line-height: var(--lh-body);
    }
    .abandon-actions {
      display: flex; gap: 12px; justify-content: center;
    }
    .abandon-confirm-btn {
      background: oklch(55.49% 0.1843 29.89 / 0.14);
      border: none;
      border-radius: 10px; padding: 12px 24px;
      font-family: 'Inter', sans-serif; font-size: var(--text-xs); font-weight: 500;
      color: oklch(66.86% 0.1714 30.63 / 0.95); cursor: pointer;
      transition: background 0.2s, transform 0.15s; letter-spacing: 0.04em;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .abandon-confirm-btn:hover {
      background: oklch(55.49% 0.1843 29.89 / 0.22);
      transform: translateY(-1px);
    }
    .abandon-cancel-btn {
      background: oklch(100% 0 0 / 0.06);
      border: none;
      border-radius: 10px; padding: 12px 24px;
      font-family: 'Inter', sans-serif; font-size: var(--text-xs); font-weight: 400;
      color: var(--text); cursor: pointer;
      transition: background 0.2s, transform 0.15s; letter-spacing: 0.04em;
      box-shadow: 0 2px 8px var(--black-a20), 0 1px 3px var(--black-a18);
    }
    .abandon-cancel-btn:hover {
      background: var(--white-a10);
      transform: translateY(-1px);
    }
    /* Pill elements */
    .hud-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: oklch(100% 0 0 / 0.6);
      flex-shrink: 0;
      margin-right: 10px;
      opacity: 0.75;
      animation: hudPulse 2.6s ease-in-out infinite;
    }
    @keyframes hudPulse {
      0%, 100% { opacity: 0.75; transform: scale(1); }
      50% { opacity: 0.28; transform: scale(0.7); }
    }
    .hud-label {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: oklch(100% 0 0 / 0.5);
      flex-shrink: 0;
      margin-right: 11px;
      opacity: 0.85;
    }
    .hud-divider {
      width: 1px; height: 13px;
      background: var(--white-a10);
      flex-shrink: 0;
      margin: 0 11px;
    }
    .hud-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 15px;
      font-weight: 400;
      color: oklch(86.86% 0.0163 82.79 / 0.88);
      max-width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .hud-task {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 300;
      color: oklch(100% 0 0 / 0.38);
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 175px;
    }
    .hud-timer {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: var(--gold);
      flex-shrink: 0;
      margin-left: 11px;
      letter-spacing: 0.02em;
      opacity: 0.88;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .hud-timer-passive {
      font-size: 13px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      opacity: 0.72;
    }
    @media (max-width: 600px) {
      .hud-title { max-width: 130px; }
      .hud-task { max-width: 100px; }
      .hud-pill { padding: 12px 16px 12px 16px; }
    }

    /* ── Compact mission HUD on tablet/phone:
       keep only timer and avoid top-nav overlap ── */
    @media (max-width: 1024px) {
      #missionHUD {
        top: 22px;
        width: auto !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px);
        border-radius: 50px;
        overflow: hidden;
      }
      /* Take the expanded section out of the width calculation when collapsed */
      #missionHUD:not(.expanded) .hud-expanded {
        position: absolute;
        width: min(500px, calc(100vw - 24px));
        left: 50%;
        transform: translateX(-50%);
        top: 100%;
      }
      .hud-pill {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding: 8px 16px;
        min-height: 0;
        box-sizing: border-box;
      }
      .hud-pill-left,
      .hud-pill-center {
        display: none;
      }
      .hud-pill-right {
        width: auto;
        flex: 0 0 auto;
        justify-content: center;
        text-align: center;
      }
      .hud-timer {
        margin-left: 0;
        font-size: 13px;
        letter-spacing: 0.06em;
        white-space: nowrap;
      }
      #missionHUD.expanded {
        width: min(560px, calc(100vw - 24px)) !important;
        border-radius: 16px;
        overflow: hidden;
        box-shadow:

          0 10px 44px oklch(0% 0 0 / 0.62),

          0 26px 90px var(--black-a40),

          0 0 28px var(--gold-bright-a42),

          0 0 56px var(--gold-bright-a28),

          0 0 100px oklch(93.59% 0.1213 105.47 / 0.16);
      }
      #missionHUD.expanded .hud-expanded {
        position: static;
        width: auto;
        left: auto;
        transform: none;
        top: auto;
      }
      #missionHUD.expanded .hud-pill-left {
        display: flex;
      }
      #missionHUD.expanded .hud-pill-center {
        display: block;
      }
      #missionHUD.expanded .hud-pill {
        display: flex;
        width: 100%;
        min-height: 42px;
        padding: 12px 16px;
      }
      #missionHUD.expanded .hud-pill-right {
        flex: 1 0 auto;
        justify-content: flex-end;
        text-align: right;
      }
      #missionHUD.expanded .hud-timer {
        margin-left: 11px;
        font-size: 13px;
        letter-spacing: 0.04em;
      }
    }

    /* ── Phone: compact top bar — nav buttons + timer HUD share one row,
       aligned to the same height, without overlapping each other ── */
    @media (max-width: 600px) {
      nav { padding: 10px 14px; }
      .nav-logo { font-size: 16px; line-height: 34px; }
      .nav-links { gap: 4px; }
      .nav-links a {
        height: 34px;
        display: inline-flex;
        align-items: center;
        padding: 0 11px;
        font-size: 13px;
      }
      .nav-links .btn-sign { max-width: none; }
      .nav-profile-btn,
      .nav-profile-btn.nav-active,
      html[data-logged-in] .nav-profile-btn {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
      }
      /* Collapsed timer HUD: centered on the nav row, matching button height */
      #missionHUD:not(.expanded) {
        top: 10px;
        max-width: calc(100vw - 200px);
      }
      #missionHUD:not(.expanded) .hud-pill {
        height: 34px;
        min-height: 34px;
        padding: 0 16px;
      }
      #missionHUD:not(.expanded) .hud-timer {
        line-height: 34px;
        font-size: 13px;
        letter-spacing: 0.04em;
      }
    }

    /* ── Scroll-to-bottom button (shows when user scrolled up during response) ── */
    #scrollDownBtn {
      position: fixed;
      bottom: calc(36px + var(--search-box-offset-height, 58px) + 12px);
      left: 50%;
      transform: translateX(-50%) translateY(10px);
      opacity: 0;
      z-index: 250;
      width: 36px; height: 36px;
      border-radius: 999px;
      background: oklch(100% 0 0 / 0.11);
      backdrop-filter: blur(14px) saturate(1.1);
      -webkit-backdrop-filter: blur(14px) saturate(1.1);
      border: 1px solid oklch(100% 0 0 / 0.14);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      pointer-events: none;
      transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.16,1,0.3,1), background 0.18s;
      box-shadow: 0 4px 18px oklch(0% 0 0 / 0.38), 0 1px 4px var(--black-a22);
    }
    #scrollDownBtn.visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }
    #scrollDownBtn:hover {
      background: oklch(100% 0 0 / 0.2);
    }
    #scrollDownBtn:active { transform: translateX(-50%) scale(0.94); }
    #scrollDownBtn svg {
      width: 16px; height: 16px;
      fill: none; stroke: oklch(100% 0 0 / 0.72);
      stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    }

    /* ── Response Complete Notification Toast (top-right) ── */
    #responseCompleteToast {
      position: fixed;
      top: 96px;
      right: 24px;
      z-index: 249;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 8px 8px 16px;
      border-radius: 999px;
      background: var(--white-a07);
      backdrop-filter: blur(12px) saturate(1.1);
      -webkit-backdrop-filter: blur(12px) saturate(1.1);
      border: 1px solid oklch(100% 0 0 / 0.13);
      box-shadow: 0 4px 20px var(--black-a28), 0 1px 4px var(--black-a18);
      cursor: pointer;
      pointer-events: none;
      opacity: 0;
      transform: translateY(-6px);
      transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16,1,0.3,1);
      user-select: none;
      white-space: nowrap;
    }
    #responseCompleteToast.visible {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    #responseCompleteToast.fading-out {
      opacity: 0;
      transform: translateY(-4px);
      pointer-events: none;
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    #responseCompleteToast .toast-label {
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 400;
      color: oklch(91.09% 0.0145 84.58 / 0.8);
      letter-spacing: 0.02em;
    }
    #responseCompleteToast .toast-arrow {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--white);
      flex-shrink: 0;
    }
    #responseCompleteToast .toast-arrow svg {
      width: 12px; height: 12px;
      fill: none; stroke: var(--black);
      stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    }
    #responseCompleteToast:hover {
      background: oklch(100% 0 0 / 0.12);
      border-color: oklch(100% 0 0 / 0.2);
    }

    /* ── Quest Limit Toast Card ── */
    #missionLimitToast {
      position: fixed;
      inset: 0;
      z-index: 600;
      background: oklch(13.60% 0.0068 285.45 / 0.8);
      backdrop-filter: blur(12px) saturate(0.85);
      -webkit-backdrop-filter: blur(12px) saturate(0.85);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.26s ease;
    }
    #missionLimitToast.visible {
      opacity: 1;
      pointer-events: auto;
    }
    .mission-limit-card {
      background:
        radial-gradient(ellipse at 50% -8%, var(--gold-a07) 0%, oklch(89.03% 0.1246 105.67 / 0.01) 44%, transparent 66%),
        linear-gradient(170deg, oklch(100% 0 0 / 0.022) 0%, transparent 38%),
        var(--bg);
      border: 1px solid oklch(100% 0 0 / 0.12);
      border-top: 1px solid var(--white-a22);
      border-radius: 16px;
      padding: 32px 32px 32px;
      width: 100%;
      max-width: 360px;
      position: relative;
      text-align: center;
      box-shadow: 0 28px 68px oklch(0% 0 0 / 0.58), 0 0 80px var(--gold-a06), inset 0 0 0 0.5px var(--white-a04);
      transform: translateY(14px) scale(0.96);
      transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
    }
    #missionLimitToast.visible .mission-limit-card {
      transform: translateY(0) scale(1);
    }
    .mission-limit-close-btn {
      position: absolute;
      top: 13px; right: 16px;
      background: none; border: none;
      color: oklch(100% 0 0 / 0.28);
      font-size: 18px; line-height: var(--lh-tight);
      cursor: pointer; padding: 4px 8px;
      transition: color 0.2s;
      font-weight: 300;
    }
    .mission-limit-close-btn:hover { color: oklch(100% 0 0 / 0.68); }
    .mission-limit-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 14px;
      color: var(--gold-a70);
      width: 28px; height: 28px;
    }
    .mission-limit-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: 28px; font-weight: 400;
      color: var(--cream);
      margin-bottom: 12px; line-height: var(--lh-heading);
    }
    .mission-limit-desc {
      font-family: 'Inter', sans-serif;
      font-size: 13px; font-weight: 300;
      color: var(--muted);
      line-height: var(--lh-body); letter-spacing: 0.025em;
    }


    /* ── Burst canvas ── */
    #hudBurstCanvas {
      position: fixed; inset: 0;
      pointer-events: none; z-index: 9998;
    }

    /* ── Mission Complete popup ── */
    #missionCompletePopup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.82);
      background: var(--gold-bright);
      border: none;
      border-radius: 16px;
      padding: 28px 48px;
      z-index: 99999;
      pointer-events: none;
      opacity: 0;
      text-align: center;
      box-shadow: 0 8px 28px oklch(0% 0 0 / 0.1), 0 1px 3px var(--black-a18);
    }
    #missionCompletePopup.mc-visible {
      animation: mcPopIn 0.48s cubic-bezier(0.34, 1.42, 0.64, 1) forwards;
    }
    #missionCompletePopup.mc-fade-out {
      animation: mcPopOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    @keyframes mcPopIn {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.78);
        box-shadow: 0 6px 20px oklch(0% 0 0 / 0.08), 0 0 0 oklch(93.59% 0.1213 105.47 / 0);
      }
      52% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 16px 44px oklch(0% 0 0 / 0.14), 0 0 40px oklch(93.59% 0.1213 105.47 / 0.52), 0 0 80px var(--gold-bright-a28);
      }
      100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 14px 40px oklch(0% 0 0 / 0.12), 0 0 32px oklch(93.59% 0.1213 105.47 / 0.38), 0 0 72px var(--gold-bright-a18);
      }
    }
    @keyframes mcPopOut {
      to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
        box-shadow: 0 8px 24px oklch(0% 0 0 / 0.08), 0 0 20px var(--gold-bright-a10);
      }
    }
    #missionCompletePopup .mc-text {
      display: inline-block;
      font-family: 'Inter', sans-serif;
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: oklch(100% 0 0 / 0.96);
      text-shadow: 0 1px 10px oklch(50.77% 0.1043 95.27 / 0.22);
      white-space: nowrap;
    }
    #missionCompletePopup.mc-visible .mc-text {
      animation: mcTextPop 0.44s cubic-bezier(0.34, 1.35, 0.64, 1) 0.06s both;
    }
    @keyframes mcTextPop {
      0%   { transform: scale(0.88); opacity: 0.5; }
      65%  { transform: scale(1.04); opacity: 1; }
      100% { transform: scale(1); opacity: 1; }
    }
    /* 퍼지는 배경 글로우 */
    .mc-spread-glow {
      position: fixed;
      top: 50%;
      left: 50%;
      width: 140px;
      height: 100px;
      border-radius: 50%;
      pointer-events: none;
      z-index: 99997;
      background: radial-gradient(
        ellipse 75% 65% at 50% 50%,
        var(--gold-bright-a55) 0%,
        var(--gold-bright-a22) 42%,
        transparent 72%
      );
      animation: mcSpreadGlow 0.88s cubic-bezier(0.22, 0.9, 0.28, 1) forwards;
    }
    .mc-spread-glow--wide {
      width: 180px;
      height: 130px;
      animation-duration: 1.05s;
      background: radial-gradient(
        ellipse 80% 70% at 50% 50%,
        oklch(93.59% 0.1213 105.47 / 0.32) 0%,
        var(--gold-bright-a12) 50%,
        transparent 78%
      );
    }
    .mc-spread-glow--soft {
      animation-duration: 1.15s;
      animation-delay: 0.04s;
      opacity: 0.85;
    }
    @keyframes mcSpreadGlow {
      0% {
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(0.45);
        filter: blur(0);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3.6);
        filter: blur(14px);
      }
    }
    .mc-glow-pulse {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      border: none;
      border-radius: 16px;
      background: transparent;
      pointer-events: none;
      z-index: 99998;
      animation: mcGlowBloom 0.92s cubic-bezier(0.22, 0.85, 0.3, 1) forwards;
    }
    .mc-glow-pulse--soft {
      animation-duration: 1.05s;
      opacity: 0.75;
    }
    @keyframes mcGlowBloom {
      0% {
        opacity: 0.55;
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 12px oklch(93.59% 0.1213 105.47 / 0.35), 0 0 28px var(--gold-bright-a22);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.15);
        box-shadow: 0 0 24px var(--gold-bright-a12), 0 0 72px var(--gold-bright-a14), 0 0 140px oklch(93.59% 0.1213 105.47 / 0.08);
      }
    }

    /* ── All-missions celebration ── */
    #celebrationOverlay {
      position: fixed; inset: 0;
      background: oklch(13.60% 0.0068 285.45 / 0);
      pointer-events: none; z-index: 810;
      transition: background 1.4s cubic-bezier(0.4,0,0.2,1);
    }
    #celebrationOverlay.dim { background: oklch(13.60% 0.0068 285.45 / 0.86); }

    #missionHUD.celebrating {
      transition:
        top 0.95s cubic-bezier(0.16,1,0.3,1),
        left 0.95s cubic-bezier(0.16,1,0.3,1),
        transform 0.95s cubic-bezier(0.16,1,0.3,1),
        border-radius 0.55s cubic-bezier(0.4,0,0.2,1),
        box-shadow 0.7s ease,
        opacity 0.7s ease !important;
      position: fixed !important;
      z-index: 850;
    }

    @keyframes celebrateGlow {
      0%   { box-shadow: 0 8px 40px oklch(0% 0 0 / 0.58), 0 0 24px var(--gold-bright-a14); }
      20%  { box-shadow: 0 0 0 1px var(--gold-bright-a55), 0 0 50px var(--gold-bright-a40); }
      50%  { box-shadow: 0 0 0 3px oklch(98.07% 0.0667 104.82 / 0.88), 0 0 90px oklch(93.59% 0.1213 105.47 / 0.72); }
      78%  { box-shadow: 0 0 0 7px var(--gold-bright-a100), 0 0 160px var(--gold-bright-a92), 0 0 320px oklch(93.59% 0.1213 105.47 / 0.52); }
      100% { box-shadow: 0 0 0 16px oklch(93.59% 0.1213 105.47 / 0), 0 0 280px oklch(93.59% 0.1213 105.47 / 0); }
    }

    #petalCanvas {
      position: fixed; inset: 0;
      pointer-events: none; z-index: 900;
    }

  