  :root {
    --bg: #0a0c0e;
    --panel: #12151a;
    --line: #2b322f;
    --text: #c8ccc9;
    --dim: #6f7772;
    --gold: #b8893d;
    --gold-lit: #e0b877;
    --gz-textscale: 1;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    background: var(--bg); color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  body.gz-playing { overflow: hidden; overscroll-behavior: none; }

  /* ------------------------------------------------ landing */
  #gz-landing { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 22px 64px; position: relative; overflow: hidden; }
  .gz-land-bg { position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
    background:
      radial-gradient(ellipse 60% 40% at 20% 20%, rgba(20,22,29,0.9), transparent),
      radial-gradient(ellipse 50% 35% at 80% 75%, rgba(217,212,199,0.05), transparent),
      radial-gradient(ellipse 30% 22% at 60% 30%, rgba(184,137,61,0.07), transparent);
  }
  .gz-overline { font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
  .gz-cover { max-width: 420px; width: 100%; height: auto; border-radius: 10px; margin: 0 auto 22px; display: block; box-shadow: 0 20px 60px rgba(0,0,0,0.55); }
  h1.gz-title { font-size: clamp(34px, 7vw, 62px); font-weight: normal; font-style: italic; letter-spacing: 0.01em; color: #e8e4d8; }
  h1.gz-title .black { color: #565d70; }
  .gz-dek { max-width: 560px; margin: 22px auto 8px; font-size: 17px; color: var(--text); font-style: italic; }
  .gz-dek2 { max-width: 520px; margin: 0 auto 34px; font-size: 14.5px; color: var(--dim); }
  .gz-cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
  .gz-cta {
    font-family: Georgia, serif; font-size: 17px; font-style: italic;
    padding: 15px 34px; min-height: 54px; cursor: pointer;
    background: linear-gradient(180deg, #1c1712, #15120d);
    color: var(--gold-lit); border: 1px solid #4a3a1e; border-radius: 6px;
    transition: border-color .25s, transform .15s;
  }
  .gz-cta:hover, .gz-cta:focus-visible { border-color: var(--gold); transform: translateY(-1px); }
  .gz-cta.gz-secondary { background: var(--panel); color: var(--text); border-color: var(--line); }
  .gz-cta .gz-cta-sub { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; letter-spacing: 0.04em; }
  /* the quiet facts under the doors: what is free, what the pass is */
  .gz-passline { max-width: 560px; margin: 0 auto 26px; text-align: center; }
  .gz-passline p { font-size: 13.5px; color: var(--dim); margin-bottom: 10px; }
  .gz-passline p b { color: var(--text); font-weight: normal; }
  .gz-smallbtn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .gz-smallbtn {
    font-family: Georgia, serif; font-size: 13.5px; font-style: italic;
    padding: 10px 20px; min-height: 42px; cursor: pointer; border-radius: 6px;
    background: var(--panel); color: var(--text); border: 1px solid var(--line);
    transition: border-color .25s;
  }
  .gz-smallbtn:hover, .gz-smallbtn:focus-visible { border-color: var(--gold); color: var(--gold-lit); }
  /* the landing Trace Board modal */
  .gz-land-modal {
    position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
    background: rgba(5,6,9,0.8); padding: 18px;
  }
  .gz-land-modal .gz-land-panel {
    width: min(94vw, 460px); max-height: 82vh; overflow-y: auto; text-align: center;
    background: #101318; border: 1px solid rgba(120,126,120,0.4); border-radius: 16px; padding: 24px;
  }
  .gz-land-panel h2 { font-weight: normal; font-style: italic; color: var(--gold-lit); font-size: 20px; margin-bottom: 12px; }
  .gz-land-panel ul { list-style: none; text-align: left; margin: 0 0 14px; }
  .gz-land-panel li { padding: 6px 0; border-bottom: 1px solid rgba(120,126,120,0.12); font-size: 14px; }
  .gz-howto { max-width: 560px; margin: 0 auto; text-align: left; border-top: 1px solid var(--line); padding-top: 20px; }
  .gz-howto details { border-bottom: 1px solid var(--line); }
  .gz-howto summary {
    cursor: pointer; padding: 13px 4px; font-size: 14.5px; font-style: italic; color: var(--text);
    list-style: none; position: relative; padding-right: 26px; user-select: none;
  }
  .gz-howto summary::-webkit-details-marker { display: none; }
  .gz-howto summary::after {
    content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    color: var(--gold); font-style: normal; font-size: 17px; line-height: 1;
  }
  .gz-howto details[open] summary::after { content: '\2212'; }
  .gz-howto summary:hover { color: var(--gold-lit); }
  .gz-howto details p { font-size: 13.5px; color: var(--dim); padding: 0 4px 13px; line-height: 1.55; }
  .gz-howto details p strong { color: var(--text); font-weight: normal; }
  .gz-loveline { margin-top: 26px; font-size: 12.5px; font-style: italic; color: var(--gold); opacity: 0.75; }
  .gz-backlink { margin-top: 12px; font-size: 13.5px; }
  .gz-backlink a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
  .gz-backlink a:hover { color: var(--gold-lit); border-color: var(--gold); }

  /* ------------------------------------------------ stage */
  #gz-stage { display: none; position: fixed; inset: 0; background: #0a0c0e; z-index: 50; }
  #game-root { position: absolute; inset: 0; touch-action: none; }
  #game-root canvas { display: block; image-rendering: pixelated; transition: filter 0.7s ease-in-out; }
  #gz-ui { position: absolute; inset: 0; pointer-events: none; font-size: calc(15px * var(--gz-textscale)); }
  #gz-ui > * { pointer-events: auto; }

  .gz-topbar { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none !important; }
  .gz-topbar > * { pointer-events: auto; }
  .gz-iconbtn {
    width: 46px; height: 46px; border-radius: 10px; font-size: 19px; cursor: pointer;
    background: rgba(14,16,20,0.72); color: var(--text); border: 1px solid rgba(90,96,90,0.4);
    backdrop-filter: blur(2px);
  }
  .gz-iconbtn:active { background: rgba(60,52,32,0.8); }
  /* the top chip is a tappable teaching surface now: one contextual
     hint at a time, dismissed by a tap. Its hit area is exactly itself. */
  .gz-statechip {
    margin: 0 auto; padding: 6px 16px; border-radius: 20px; font-style: italic; font-size: calc(13px * var(--gz-textscale));
    background: rgba(20,17,10,0.88); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.45);
    cursor: pointer; font-family: Georgia, serif;
    min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: normal;
    max-height: 3.2em; line-height: 1.35; text-align: center;
  }
  .gz-statechip:active { background: rgba(60,52,32,0.9); }
  .gz-passchip {
    flex: none; min-height: 38px; padding: 7px 12px; border-radius: 20px; cursor: pointer;
    background: rgba(20,17,10,0.88); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.55);
    font-family: Georgia, serif; font-size: calc(11.5px * var(--gz-textscale)); font-style: italic;
    white-space: nowrap; backdrop-filter: blur(2px);
  }
  .gz-passchip:active, .gz-passchip:focus-visible { background: rgba(60,52,32,0.9); border-color: var(--gold-lit); }
  .gz-walletchip {
    display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; cursor: pointer;
    background: rgba(14,16,20,0.72); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.35);
    font-size: calc(13px * var(--gz-textscale)); backdrop-filter: blur(2px);
  }
  .gz-walletchip:active { background: rgba(60,52,32,0.8); }
  .gz-walletcoin {
    width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3d9, #e0b877 60%, #b8893d);
    box-shadow: 0 0 4px rgba(224,184,119,0.6); flex: none;
  }
  .gz-walletnum { font-variant-numeric: tabular-nums; }
  /* the nav container itself never intercepts a click — only the
     visible buttons do. Collapsed tools are display:none, gone entirely. */
  .gz-navbar { position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none !important; }
  .gz-navbar > * { pointer-events: auto; }
  .gz-toolswrap { display: none; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none !important; }
  .gz-toolswrap > * { pointer-events: auto; }
  .gz-toolstoggle.gz-toolson { border-color: var(--gold); color: var(--gold-lit); }
  .gz-toolbtn { min-width: 96px; }
  .gz-hudrestore {
    position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center;
    background: rgba(14,16,20,0.55); color: var(--dim); border: 1px solid rgba(90,96,90,0.35);
    font-size: 17px; cursor: pointer;
  }
  .gz-hudrestore:active { color: var(--gold-lit); }
  .gz-navbtn {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    min-width: 62px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
    background: rgba(14,16,20,0.72); color: var(--text); border: 1px solid rgba(90,96,90,0.4);
    font-family: Georgia, serif; font-size: calc(11.5px * var(--gz-textscale)); font-style: italic;
  }
  .gz-navbtn:active { background: rgba(60,52,32,0.8); color: var(--gold-lit); }
  .gz-navicon { font-size: 20px; line-height: 1.1; color: var(--gold-lit); }
  .gz-flybtn { position: relative; overflow: hidden; }
  .gz-flybar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(120,126,120,0.25); }
  .gz-flybar-fill { display: block; height: 100%; background: var(--gold-lit); transition: width 0.3s linear; }
  .gz-flybtn.gz-flying { border-color: var(--gold); color: var(--gold-lit); }
  .gz-flybtn.gz-flyok { border-color: #7fae7a; box-shadow: 0 0 10px rgba(127,174,122,0.45); }
  .gz-flybtn.gz-flyno { border-color: #7a4a3e; opacity: 0.85; }
  .gz-lifewrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: -6px 0 14px; }
  .gz-lifelabel { font-style: italic; font-size: calc(13px * var(--gz-textscale)); color: var(--dim); }
  .gz-lifewrap .gz-thread { width: min(260px, 60vw); }

  /* the overture: the maze speaks once, on darkness, before the first step */
  .gz-overture {
    position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    background: rgba(4,5,7,0); transition: background 0.9s ease; cursor: pointer;
    padding: 24px;
  }
  .gz-overture.on { background: rgba(4,5,7,0.96); }
  .gz-overture-line {
    max-width: min(86vw, 560px); text-align: center; font-style: italic;
    font-size: calc(19px * var(--gz-textscale)); line-height: 1.6; color: var(--text);
    opacity: 0; transition: opacity 1.1s ease;
  }
  .gz-overture-line.on { opacity: 1; }

  /* corner status cluster: thread, lean, mission — tap to Look Inward */
  .gz-lifebars {
    position: absolute; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
    background: transparent; border: none; padding: 8px 10px 8px 6px; margin: -8px -10px -8px -6px;
    cursor: pointer; font-family: Georgia, serif; text-align: left;
  }
  /* the body's weather: condition chips just above the thread bar */
  .gz-condrow {
    position: absolute; left: 12px; bottom: calc(96px + env(safe-area-inset-bottom));
    display: flex; flex-wrap: wrap; gap: 5px; max-width: 240px;
    background: transparent; border: none; cursor: pointer; padding: 4px;
    font-family: Georgia, serif;
  }
  .gz-condchip {
    font-size: calc(10.5px * var(--gz-textscale)); font-style: italic; letter-spacing: 0.04em;
    padding: 2px 8px; border-radius: 9px; border: 1px solid;
    text-shadow: 0 1px 3px rgba(5,6,10,0.8); background: rgba(10,12,16,0.55);
  }
  .gz-condchip.gz-cond-harm { color: #d99a80; border-color: rgba(217,154,128,0.5); }
  .gz-condchip.gz-cond-help { color: var(--gold-lit); border-color: rgba(224,184,119,0.45); }
  .gz-cond-panelrow { text-align: left; padding: 9px 2px; border-bottom: 1px solid rgba(120,126,120,0.14); }
  .gz-cond-panelrow .gz-cond-name { font-style: italic; font-size: 15px; }
  .gz-cond-panelrow.gz-cond-harm .gz-cond-name { color: #d99a80; }
  .gz-cond-panelrow.gz-cond-help .gz-cond-name { color: var(--gold-lit); }
  .gz-cond-remain { font-size: 11.5px; color: var(--dim); font-style: normal; margin-left: 6px; }
  .gz-cond-effect { font-size: 13px; color: var(--text); margin-top: 2px; }
  .gz-cond-mech { font-size: 12px; color: var(--dim); margin-top: 2px; }
  .gz-cond-treat { font-size: 12.5px; color: var(--gold-lit); margin-top: 3px; font-style: italic; }
  /* the way-home chip */
  .gz-guidechip {
    position: absolute; left: 50%; transform: translateX(-50%);
    /* clears the condition chips, which sit at 96px above the thread bar */
    bottom: calc(132px + env(safe-area-inset-bottom));
    font-family: Georgia, serif; font-style: italic; font-size: calc(12px * var(--gz-textscale));
    color: var(--gold-lit); background: rgba(10,12,16,0.72);
    border: 1px solid rgba(224,184,119,0.5); border-radius: 14px; padding: 5px 14px;
    cursor: pointer; text-shadow: 0 1px 3px rgba(5,6,10,0.8);
  }
  .gz-guidechip:hover { border-color: var(--gold); }
  /* the explored-world map */
  .gz-map-legend { font-size: 11.5px; color: var(--dim); margin: 6px 0 10px; line-height: 1.5; }
  .gz-map-subhead {
    font-weight: normal; font-style: italic; color: var(--dim); font-size: 12px;
    letter-spacing: 0.1em; text-transform: uppercase; margin: 4px 0;
  }
  /* the pendulum's recent-causes ledger */
  .gz-pend-causes { text-align: left; margin: 6px 0 12px; }
  .gz-pend-causes h3 {
    font-weight: normal; font-style: italic; color: var(--dim); font-size: 12px;
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px;
  }
  .gz-pend-causes ul { list-style: none; margin: 0; }
  .gz-pend-causes li { font-size: 13px; padding: 3px 0; color: var(--text); border-bottom: 1px solid rgba(120,126,120,0.1); }
  /* the reckoning of an ended life */
  .gz-recap { text-align: left; }
  .gz-recap .gz-recap-cause { font-size: 15px; margin-bottom: 12px; }
  .gz-recap .gz-recap-cause strong { color: var(--gold-lit); font-weight: normal; }
  .gz-recap-col { margin-bottom: 10px; }
  .gz-recap-col h3 {
    font-weight: normal; font-style: italic; color: var(--dim); font-size: 12.5px;
    letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px;
  }
  .gz-recap-col ul { list-style: none; margin: 0; }
  .gz-recap-col li { font-size: 13.5px; padding: 3px 0; border-bottom: 1px solid rgba(120,126,120,0.1); }
  .gz-lifebars:active .gz-lifebar-label { color: var(--gold-lit); }
  .gz-lifebar-mission {
    max-width: 200px; font-size: calc(10.5px * var(--gz-textscale)); font-style: italic;
    color: var(--dim); text-shadow: 0 1px 3px rgba(5,6,10,0.8);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .gz-lifebar-row { display: flex; align-items: center; gap: 7px; }
  .gz-lifebar-label {
    width: 46px; text-align: right; font-size: 10px; letter-spacing: 0.14em;
    text-transform: uppercase; font-style: italic; color: var(--dim);
    text-shadow: 0 1px 3px rgba(5,6,10,0.8);
  }
  .gz-lifebars .gz-thread { width: 86px; background: rgba(20,22,28,0.55); box-shadow: 0 0 0 1px rgba(120,126,140,0.25); }
  .gz-karma {
    position: relative; display: block; width: 86px; height: 5px; border-radius: 3px;
    background: linear-gradient(90deg, #0c0e14, #7d8299, #efece0);
    box-shadow: 0 0 0 1px rgba(120,126,140,0.3);
  }
  .gz-karma-dot {
    position: absolute; top: -2px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff3d9, #e0b877 60%, #b8893d);
    box-shadow: 0 0 5px rgba(224,184,119,0.7);
    transition: left 0.6s ease;
  }
  .gz-flybtn.gz-flylow .gz-flybar-fill { background: #8a6a3a; }

  .gz-toasts { position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 480px); pointer-events: none !important; }
  .gz-toast {
    padding: 9px 18px; border-radius: 8px; font-size: calc(13.5px * var(--gz-textscale)); font-style: italic; text-align: center;
    background: rgba(12,14,18,0.85); color: var(--text); border: 1px solid rgba(184,137,61,0.3);
    opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s;
  }
  .gz-toast.on { opacity: 1; transform: translateY(0); }

  /* the guided passage's standing instruction */
  .gz-guide {
    position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 12px;
    max-width: min(66vw, 380px); padding: 10px 16px; border-radius: 10px;
    background: rgba(20,17,10,0.92); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.5);
    font-size: calc(13.5px * var(--gz-textscale)); font-style: italic; line-height: 1.5;
    pointer-events: none !important; display: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
  }

  .gz-sellabel {
    position: absolute; bottom: calc(148px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    padding: 6px 16px; border-radius: 14px; font-style: italic; font-size: calc(13px * var(--gz-textscale));
    background: rgba(12,14,18,0.85); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.4);
    opacity: 0; transition: opacity .3s; pointer-events: none !important; white-space: nowrap;
    max-width: 86vw; overflow: hidden; text-overflow: ellipsis;
  }
  .gz-sellabel.on { opacity: 1; }
  .gz-hint {
    position: absolute; bottom: calc(156px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    max-width: min(88vw, 440px); padding: 10px 20px; border-radius: 10px; text-align: center;
    background: rgba(20,17,10,0.9); color: var(--gold-lit); border: 1px solid rgba(184,137,61,0.4);
    font-size: calc(14px * var(--gz-textscale)); font-style: italic;
    opacity: 0; transition: opacity .5s; pointer-events: none !important;
  }
  .gz-hint.on { opacity: 1; }

  /* overlap chooser: several meetable things under one tap */
  .gz-chooser-backdrop { position: absolute; inset: 0; z-index: 24; background: transparent; }
  .gz-chooser {
    position: absolute; bottom: calc(88px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    z-index: 25; width: min(88vw, 340px); display: flex; flex-direction: column; gap: 8px;
    background: rgba(10,12,15,0.94); border: 1px solid rgba(184,137,61,0.45); border-radius: 14px;
    padding: 12px 14px; box-shadow: 0 6px 30px rgba(0,0,0,0.55); backdrop-filter: blur(3px);
  }
  .gz-chooser-title {
    text-align: center; font-style: italic; font-size: calc(12px * var(--gz-textscale));
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  }

  .gz-prompt {
    position: absolute; bottom: calc(88px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    min-height: 52px; padding: 12px 34px; border-radius: 26px; cursor: pointer;
    background: linear-gradient(180deg, #241d12, #191309); color: var(--gold-lit);
    border: 1px solid var(--gold); font-family: Georgia, serif; font-size: calc(16px * var(--gz-textscale)); font-style: italic;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  }
  .gz-prompt:active { background: #2e2517; }
  .gz-invertbtn {
    position: absolute; bottom: calc(88px + env(safe-area-inset-bottom)); left: calc(50% + 130px);
    width: 52px; height: 52px; border-radius: 50%; display: none; align-items: center; justify-content: center;
    background: rgba(20,17,10,0.9); color: var(--gold-lit); border: 1px solid var(--gold);
    font-size: 22px; box-shadow: 0 4px 18px rgba(0,0,0,0.5); cursor: pointer; touch-action: manipulation;
  }
  .gz-invertbtn:active { background: #2e2517; }

  /* dialogue */
  .gz-dialogue {
    position: absolute; left: 50%; transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(96vw, 660px); max-height: 54vh;
    display: flex; flex-direction: column; gap: 8px;
    background: rgba(10,12,15,0.92); border: 1px solid rgba(120,126,120,0.35); border-radius: 14px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)/2);
    backdrop-filter: blur(3px);
    overflow: hidden; /* nothing ever paints past the panel */
  }
  .gz-high-contrast .gz-dialogue { background: rgba(5,6,8,0.99); border-color: #8d949a; }
  .gz-dlg-top { display: flex; align-items: center; gap: 12px; }
  .gz-dlg-portrait { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); flex-shrink: 0; }
  .gz-dlg-namewrap { flex: 1; min-width: 0; }
  .gz-dlg-name { font-style: italic; color: var(--gold-lit); font-size: calc(15px * var(--gz-textscale)); }
  .gz-dlg-life { height: 12px; margin-top: 3px; }
  .gz-thread { position: relative; display: block; width: min(180px, 40vw); height: 3px; background: rgba(120,126,140,0.25); border-radius: 2px; }
  .gz-thread-live { position: absolute; left: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-lit)); border-radius: 2px; }
  .gz-thread-spark { position: absolute; top: -2.5px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
    background: radial-gradient(circle, #fff3d9, rgba(224,184,119,0)); }
  /* the season's ceiling: the part of the thread this life can no longer refill */
  .gz-thread-capped {
    position: absolute; right: 0; top: 0; height: 3px; width: 0%;
    background: repeating-linear-gradient(45deg, rgba(60,64,78,0.85), rgba(60,64,78,0.85) 2px, rgba(20,22,28,0.6) 2px, rgba(20,22,28,0.6) 4px);
    border-radius: 0 2px 2px 0; transition: width 1.2s ease;
  }
  .gz-dlg-close { width: 44px; height: 44px; border-radius: 10px; background: transparent; border: 1px solid var(--line); color: var(--dim); font-size: 20px; cursor: pointer; flex-shrink: 0; }
  .gz-dlg-close:active { color: var(--text); }
  /* long messages scroll inside the panel instead of being cut off;
     the choice list keeps at least one visible row and scrolls too */
  .gz-dlg-text { font-size: calc(15.5px * var(--gz-textscale)); color: var(--text); white-space: pre-line; min-height: 44px; flex: 0 1 auto; overflow-y: auto; padding-right: 6px; overscroll-behavior: contain; }
  .gz-dlg-choices { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 0 1 auto; min-height: 62px; overscroll-behavior: contain; }
  .gz-choice {
    text-align: left; padding: 12px 16px; min-height: 48px; border-radius: 9px; cursor: pointer;
    background: rgba(30,33,40,0.65); color: var(--text); border: 1px solid rgba(120,126,120,0.3);
    font-family: Georgia, serif; font-size: calc(14.5px * var(--gz-textscale)); font-style: italic;
    transition: border-color .15s;
  }
  .gz-choice:hover, .gz-choice:focus-visible { border-color: var(--gold); color: var(--gold-lit); }
  .gz-choice:active { background: rgba(60,52,32,0.6); }

  .gz-dlg-typerow { display: flex; gap: 8px; align-items: center; }
  .gz-dlg-typeinput {
    flex: 1; min-width: 0; min-height: 48px; padding: 12px 14px; border-radius: 9px;
    background: rgba(30,33,40,0.65); border: 1px solid rgba(120,126,120,0.35); color: var(--text);
    font-family: Georgia, serif; font-size: calc(15px * var(--gz-textscale)); font-style: italic;
  }
  .gz-dlg-typeinput:focus { outline: none; border-color: var(--gold); }
  .gz-dlg-typeinput:disabled { opacity: 0.55; }
  .gz-dlg-sendbtn {
    min-height: 48px; padding: 0 20px; border-radius: 9px; cursor: pointer;
    background: linear-gradient(180deg, #241d12, #191309); color: var(--gold-lit);
    border: 1px solid var(--gold); font-family: Georgia, serif; font-size: calc(14.5px * var(--gz-textscale)); font-style: italic;
  }
  .gz-dlg-sendbtn:disabled { opacity: 0.5; }
  .gz-dlg-typerow-sent .gz-dlg-typeinput { border-color: rgba(120,126,120,0.2); }
  .gz-dlg-thinking { display: inline-flex; gap: 3px; padding: 0 4px; }
  .gz-dlg-thinking span {
    width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
    animation: gz-think 1.2s infinite ease-in-out;
  }
  .gz-dlg-thinking span:nth-child(2) { animation-delay: 0.15s; }
  .gz-dlg-thinking span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes gz-think { 0%, 60%, 100% { opacity: 0.25; transform: scale(0.8); } 30% { opacity: 1; transform: scale(1); } }
  .gz-dlg-stepaway { text-align: center; font-size: calc(13px * var(--gz-textscale)); opacity: 0.75; padding: 10px 16px; min-height: 40px; }
  /* the conversation-voice label: Live AI / Written / Pass / unavailable */
  .gz-dlg-mode {
    margin-top: 3px; padding: 2px 10px; border-radius: 10px; width: fit-content; max-width: 100%;
    font-size: calc(10.5px * var(--gz-textscale)); font-style: italic; letter-spacing: 0.05em;
    color: var(--gold-lit); background: rgba(184,137,61,0.12); border: 1px solid rgba(184,137,61,0.35);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-family: Georgia, serif;
  }
  .gz-dlg-mode:active, .gz-dlg-mode:focus-visible { background: rgba(184,137,61,0.24); border-color: var(--gold-lit); }
  /* a quiet system note in the transcript — the game speaking, not the being */
  .gz-dlg-system {
    margin: 8px 0; text-align: center; font-size: calc(12.5px * var(--gz-textscale));
    font-style: italic; color: var(--dim);
  }
  /* Mission / Trace tabs */
  .gz-tabrow { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
  .gz-tab {
    flex: 1; max-width: 200px; padding: 10px 12px; min-height: 44px; border-radius: 9px; cursor: pointer;
    background: rgba(30,33,40,0.5); color: var(--dim); border: 1px solid rgba(120,126,120,0.3);
    font-family: Georgia, serif; font-size: calc(13.5px * var(--gz-textscale)); font-style: italic;
  }
  .gz-tab.gz-tabon { color: var(--gold-lit); border-color: var(--gold); background: rgba(184,137,61,0.1); }
  /* the being action selector: Talk / Give / Trade / Step Away */
  .gz-actionrow { display: flex; gap: 8px; flex-wrap: wrap; }
  .gz-actionbtn { flex: 1 1 40%; text-align: center; min-width: 0; }
  /* trace alias row */
  .gz-aliasrow { display: flex; gap: 8px; margin-top: 6px; align-items: stretch; }
  .gz-aliasrow .gz-aliasinput { flex: 1; min-width: 0; }
  .gz-aliasrow .gz-bigbtn { margin: 0; flex: none; }
  .gz-checkout-err { color: #d99a80 !important; }
  /* transcript turns: the conversation keeps its history on screen */
  .gz-dlg-turn { margin-bottom: 10px; }
  .gz-dlg-you {
    margin: 2px 0 10px; padding-left: 14px; border-left: 2px solid rgba(184,137,61,0.5);
    color: var(--dim); font-style: italic; font-size: calc(14px * var(--gz-textscale));
  }
  .gz-dlg-thinking-solo { padding: 6px 0; transform: scale(1.3); transform-origin: left center; }

  /* item reveal: blows up close to the screen, unmistakably */
  .gz-reveal-wrap {
    position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
    background: rgba(4,5,7,0); transition: background 0.35s ease;
  }
  .gz-reveal-wrap.on { background: rgba(4,5,7,0.82); }
  .gz-reveal-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transform: scale(0.15); opacity: 0;
    transition: transform 0.5s cubic-bezier(.2,1.4,.4,1), opacity 0.35s ease;
  }
  .gz-reveal-wrap.on .gz-reveal-card { transform: scale(1); opacity: 1; }
  .gz-reveal-eyebrow { font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
  .gz-reveal-img { width: min(64vw, 260px); height: auto; filter: drop-shadow(0 10px 40px rgba(0,0,0,0.6)); }
  .gz-reveal-name { font-style: italic; font-size: calc(17px * var(--gz-textscale)); color: var(--text); text-align: center; max-width: 80vw; }
  .gz-reveal-copy { font-size: calc(13.5px * var(--gz-textscale)); color: var(--text); opacity: 0.85; text-align: center; max-width: min(78vw, 380px); line-height: 1.55; margin: 2px 0 0; }
  .gz-reveal-link {
    font-size: calc(12.5px * var(--gz-textscale)); color: var(--gold-lit); text-decoration: none;
    border-bottom: 1px solid rgba(224,184,119,0.4); padding-bottom: 1px; margin-top: 2px;
  }
  .gz-reveal-link:hover, .gz-reveal-link:focus-visible { border-color: var(--gold-lit); }
  .gz-reveal-btn { margin-top: 6px; }

  /* overlays */
  .gz-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(5,6,9,0.72); z-index: 20; padding: 18px;
  }
  /* live panels float over a world that keeps moving behind them */
  .gz-overlay-live { background: rgba(5,6,9,0.45); z-index: 22; }
  .gz-mapcanvas {
    display: block; margin: 0 auto 6px; max-width: 100%; border-radius: 8px;
    border: 1px solid rgba(120,126,120,0.3); image-rendering: pixelated;
  }
  .gz-mapline { margin: 2px 0 12px !important; font-size: calc(12.5px * var(--gz-textscale)) !important; color: var(--dim); }
  .gz-place-row { display: flex; align-items: stretch; gap: 6px; }
  .gz-place-row .gz-place-go { flex: 1; min-width: 0; }
  .gz-place-home { border-color: rgba(184,137,61,0.5); }
  .gz-place-small {
    width: 44px; border-radius: 9px; cursor: pointer; flex: none;
    background: rgba(30,33,40,0.65); color: var(--dim); border: 1px solid rgba(120,126,120,0.3);
    font-size: 15px;
  }
  .gz-place-small:hover { color: var(--gold-lit); border-color: var(--gold); }
  .gz-bag-row { display: flex; align-items: center; gap: 8px; }
  .gz-bag-row .gz-bag-name { flex: 1; min-width: 0; }
  .gz-panel {
    width: min(94vw, 520px); max-height: 86vh; overflow-y: auto;
    background: #101318; border: 1px solid rgba(120,126,120,0.4); border-radius: 16px;
    padding: 26px 26px 22px; text-align: center;
  }
  .gz-panel h2 { font-weight: normal; font-style: italic; color: var(--gold-lit); font-size: calc(21px * var(--gz-textscale)); margin-bottom: 16px; }
  .gz-wywa { list-style: none; text-align: left; margin-bottom: 20px; }
  .gz-wywa li { padding: 7px 0 7px 20px; position: relative; font-size: calc(14.5px * var(--gz-textscale)); font-style: italic; color: var(--text); border-bottom: 1px solid rgba(120,126,120,0.12); }
  .gz-wywa li::before { content: ''; position: absolute; left: 2px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .7; }
  .gz-reading { text-align: center; margin: 14px 0 18px; }
  .gz-threaddots { color: var(--gold-lit); letter-spacing: 3px; margin-left: 8px; font-style: normal; }
  .gz-mission { background: rgba(184,137,61,0.08); border: 1px solid rgba(184,137,61,0.35); border-radius: 10px; padding: 12px 16px; text-align: center; }
  .gz-mission p { font-style: italic; font-size: calc(15px * var(--gz-textscale)); margin: 4px 0; }
  .gz-mission-diff { display: inline-block; font-size: calc(11px * var(--gz-textscale)); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
  .gz-mission-count { font-size: calc(12.5px * var(--gz-textscale)) !important; color: var(--dim); }
  .gz-standings li { font-style: normal; }
  .gz-standings-you { color: var(--gold-lit); background: rgba(184,137,61,0.08); border-radius: 6px; }
  .gz-reading p { font-style: italic; font-size: calc(15px * var(--gz-textscale)); margin: 6px 0; }
  #gz-pend { max-width: 100%; }
  .gz-bigbtn {
    display: inline-block; margin: 6px 4px 0; padding: 13px 26px; min-height: 50px; border-radius: 9px; cursor: pointer;
    background: linear-gradient(180deg, #1c1712, #15120d); color: var(--gold-lit); border: 1px solid #4a3a1e;
    font-family: Georgia, serif; font-size: calc(15px * var(--gz-textscale)); font-style: italic;
  }
  .gz-bigbtn.gz-quiet { background: rgba(30,33,40,0.6); color: var(--text); border-color: var(--line); }
  .gz-bigbtn.gz-danger { border-color: #7a3a2e; color: #d99a80; }
  .gz-btnrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .gz-keyrow { display: flex; justify-content: center; gap: 6px; margin-top: 16px; opacity: 0.35; }
  .gz-keyrow:focus-within, .gz-keyrow:hover { opacity: 0.8; }
  .gz-keyinput {
    width: 120px; min-height: 30px; padding: 4px 8px; border-radius: 6px; font-size: 11px;
    background: rgba(30,33,40,0.5); border: 1px solid rgba(120,126,120,0.25); color: var(--dim);
    font-family: Georgia, serif;
  }
  .gz-keybtn {
    min-height: 30px; padding: 0 12px; border-radius: 6px; font-size: 11px; cursor: pointer;
    background: transparent; border: 1px solid rgba(120,126,120,0.25); color: var(--dim);
    font-family: Georgia, serif;
  }
  .gz-keybtn:disabled { opacity: 0.6; }
  .gz-subcode {
    margin: 16px 0; padding: 14px; border-radius: 10px;
    border: 1px solid rgba(184,137,61,0.32); background: rgba(20,17,10,0.28);
  }
  .gz-subcode .gz-dlg-typerow { margin-top: 10px; }
  .gz-subcode .gz-bigbtn { min-width: 138px; }
  .gz-subcode [data-role="subnote"] { color: var(--gold-lit); margin-top: 10px; }
  .gz-setgrid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; text-align: left; }
  .gz-set { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: calc(14px * var(--gz-textscale)); font-style: italic; }
  .gz-set input[type=range] { flex: 1; max-width: 220px; accent-color: var(--gold); height: 30px; }
  .gz-set input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--gold); }

  @media (max-width: 640px) {
    .gz-topbar { gap: 6px; }
    .gz-passchip { padding: 7px 9px; }
    .gz-walletchip { padding: 8px 10px; }
    .gz-navbtn { min-width: 56px; padding: 7px 8px; }
    .gz-dialogue { max-height: 52vh; }
  }

/* ---------------------------------------------------------------
   The magnet board. Nine hundred words that must never take over the
   screen: search on top, a tray of a fixed height under it that
   scrolls with the wheel, and the sentence always in view.
   --------------------------------------------------------------- */
.gz-wp { display: flex; flex-direction: column; gap: 8px; }
.gz-wp-line {
  min-height: 2.2em; padding: 8px 10px; border-radius: 6px;
  background: rgba(0,0,0,0.28); border: 1px solid rgba(150,150,160,0.22);
  font-family: Georgia, serif; font-style: italic; font-size: 1.05rem;
  color: #f0ede2; line-height: 1.4;
}
.gz-wp-line.gz-wp-empty { color: #8b8b86; font-style: normal; font-size: 0.9rem; }
.gz-wp-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gz-wp-search {
  flex: 1 1 140px; min-width: 120px; min-height: 40px; padding: 6px 10px;
  border-radius: 6px; border: 1px solid rgba(150,150,160,0.32);
  background: rgba(0,0,0,0.32); color: #f0ede2;
  font-family: Georgia, serif; font-size: 0.95rem;
}
.gz-wp-search:focus { outline: none; border-color: #b8893d; }
.gz-wp-btn {
  min-height: 40px; min-width: 44px; padding: 4px 10px; cursor: pointer;
  border-radius: 6px; border: 1px solid rgba(150,150,160,0.32);
  background: rgba(255,255,255,0.05); color: #d8d5cc;
  font-family: Georgia, serif; font-size: 0.9rem;
}
.gz-wp-btn:hover { background: rgba(255,255,255,0.1); }
.gz-wp-count { color: #8b8b86; font-size: 0.85rem; margin-left: auto; }
.gz-wp-shelves { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.gz-wp-shelf {
  flex: 0 0 auto; min-height: 32px; padding: 3px 10px; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(150,150,160,0.28);
  background: transparent; color: #a8a59f;
  font-family: Georgia, serif; font-size: 0.82rem; letter-spacing: 0.04em;
}
.gz-wp-shelf.on { background: rgba(184,137,61,0.18); border-color: #b8893d; color: #e8dcc0; }
/* the tray: a window, never the whole wall */
.gz-wp-tray {
  /* a window onto the words, never the whole wall. The min-height is a
     floor: a vh cap with no floor collapses to nothing on odd viewports
     and the tray disappears entirely. */
  height: 190px; min-height: 132px; max-height: max(132px, 34vh);
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px;
  padding: 8px; border-radius: 6px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(150,150,160,0.18);
}
.gz-wp-tray:focus { outline: 1px solid rgba(184,137,61,0.5); }
.gz-wp-word {
  min-height: 34px; padding: 3px 9px; cursor: pointer;
  border-radius: 5px; border: 1px solid rgba(150,150,160,0.3);
  background: rgba(255,255,255,0.06); color: #e4e1d8;
  font-family: Georgia, serif; font-size: 0.92rem; line-height: 1.2;
}
.gz-wp-word:hover { background: rgba(184,137,61,0.22); border-color: #b8893d; }
.gz-wp-word:active { transform: translateY(1px); }
.gz-wp-none { width: 100%; color: #8b8b86; font-size: 0.85rem; padding: 6px 2px; }
.gz-wp-send { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .gz-wp-tray { height: 150px; min-height: 120px; max-height: max(120px, 30vh); }
  .gz-wp-count { margin-left: 0; }
}
