
      :root {
        color-scheme: light dark;
        --paper: #faf5ec;
        --paper-2: #f3ecdd;
        --card: #fffdf8;
        --ink: #1e2732;
        --ink-soft: #4c5866;
        --line: #ddd2bd;
        --ai: #27507e;          /* indigo — the sea around the islands */
        --ai-deep: #1b3a5f;
        --ai-tile: #dbe6f2;
        --ai-tile-ink: #274b74;
        --shu: #c2401f;         /* vermillion — torii gates */
        --shu-soft: #f7e3da;
        --gold: #b8860b;
        --gold-soft: #f6ecd2;
        --later: #e9e2d2;
        --later-ink: #8a8271;
        --shadow: 0 10px 30px rgba(30, 39, 50, .10);
      }
      @media (prefers-color-scheme: dark) {
        :root {
          --paper: #131a21;
          --paper-2: #182029;
          --card: #1c2631;
          --ink: #f0e9da;
          --ink-soft: #b3bac2;
          --line: #33404e;
          --ai: #7fa8d0;
          --ai-deep: #a9c6e4;
          --ai-tile: #22374f;
          --ai-tile-ink: #b9d2ec;
          --shu: #e2704e;
          --shu-soft: #3d2a24;
          --gold: #d9a83f;
          --gold-soft: #38301d;
          --later: #232c36;
          --later-ink: #77828e;
          --shadow: 0 10px 30px rgba(0, 0, 0, .35);
        }
      }
      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        * { transition: none !important; animation: none !important; }
      }
      body {
        margin: 0;
        background: var(--paper);
        color: var(--ink);
        font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
        line-height: 1.65;
        -webkit-font-smoothing: antialiased;
      }
      button, [role="button"], select, summary, input:not([type="checkbox"], [type="radio"]) { min-height: 2rem; }
      img { max-width: 100%; display: block; }
      a { color: var(--ai); }
      .wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
      h1, h2, h3, .serif { font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", serif; }
      .jp { font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif; }

      /* ---------- Intro ---------- */
      .intro { padding: 44px 0 8px; }
      .intro-grid { display: grid; grid-template-columns: 1.55fr .85fr; gap: 28px; align-items: center; }
      .brand-line { margin: 0 0 14px; font-size: .95rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
      .brand-line .jp { color: var(--shu); font-size: 1.05rem; font-weight: 900; }
      .brand-line::after { content: ""; flex: 0 0 44px; height: 1.5px; background: var(--line); }
      .intro h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); line-height: 1.18; margin: 0 0 14px; font-weight: 800; letter-spacing: .01em; }
      .intro h1 .accent { color: var(--shu); }
      .intro p.lede { font-size: 1.06rem; color: var(--ink-soft); margin: 0 0 20px; max-width: 34em; }
      .intro-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
      .btn {
        display: inline-flex; align-items: center; gap: 8px;
        min-height: 44px; padding: 10px 18px; border-radius: 999px;
        font-weight: 700; font-size: .95rem; text-decoration: none;
        border: 1.5px solid var(--ink); color: var(--ink); background: var(--card);
        cursor: pointer; transition: transform .15s ease, background .15s ease;
      }
      .btn:hover { transform: translateY(-1px); }
      .btn.primary { background: var(--shu); border-color: var(--shu); color: #fff8f2; }
      .btn.x { background: var(--ink); border-color: var(--ink); color: var(--paper); }
      .progress-note { font-size: .92rem; color: var(--ink-soft); }
      .progress-note strong { color: var(--shu); }
      .mascot {
        background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px;
        padding: 10px; box-shadow: var(--shadow);
      }
      .mascot .frame { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; }
      .mascot .frame img { width: 100%; height: 100%; object-fit: cover; }
      .mascot figcaption { font-size: .85rem; color: var(--ink-soft); padding: 8px 6px 2px; text-align: center; }

      /* ---------- Map ---------- */
      .map-section { padding: 34px 0 10px; }
      .section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 6px; }
      .section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0; font-weight: 800; }
      .section-head .sub { color: var(--ink-soft); font-size: .98rem; }
      .legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 18px; font-size: .88rem; color: var(--ink-soft); }
      .legend span { display: inline-flex; align-items: center; gap: 7px; }
      .swatch { width: 16px; height: 16px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.12); }
      .sw-exploring { background: var(--shu); }
      .sw-next { background: var(--gold-soft); border-color: var(--gold); }
      .sw-later { background: var(--later); }
      .map-layout { display: grid; grid-template-columns: 1.5fr .9fr; gap: 22px; align-items: start; }
      .map-scroll { overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
      .tilemap {
        display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-auto-rows: 46px; gap: 5px;
        min-width: 580px;
      }
      .tile {
        appearance: none; border: 1px solid transparent; cursor: pointer;
        background: var(--later); color: var(--later-ink);
        border-radius: 8px; padding: 5px 2px 4px; min-height: 46px;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
        font-family: inherit; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
      }
      .tile .en { font-size: .68rem; font-weight: 700; line-height: 1.12; text-align: center; }
      .tile .jpname { font-size: .6rem; line-height: 1.2; opacity: .85; }
      .tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
      .tile:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; }
      .tile[data-status="exploring"] { background: var(--shu); color: #fff6ef; box-shadow: var(--shadow); }
      .tile[data-status="next"] { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
      .tile[data-status="later"] { background: var(--ai-tile); color: var(--ai-tile-ink); }
      .tile[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 1px; }
      .map-hint { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }

      .panel {
        background: var(--card); border: 1px solid var(--line); border-radius: 16px;
        padding: 22px; box-shadow: var(--shadow); position: sticky; top: 16px;
      }
      .panel .status-tag {
        display: inline-block; font-size: .75rem; font-weight: 900; letter-spacing: .08em;
        padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; text-transform: uppercase;
      }
      .tag-exploring { background: var(--shu); color: #fff6ef; }
      .tag-next { background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold); }
      .tag-later { background: var(--ai-tile); color: var(--ai-tile-ink); }
      .panel h3 { margin: 0 0 2px; font-size: 1.65rem; line-height: 1.2; }
      .panel .panel-jp { color: var(--ink-soft); font-size: .95rem; margin-bottom: 10px; }
      .panel p { margin: 0 0 14px; color: var(--ink-soft); font-size: .97rem; }
      .panel .panel-facts { margin: 0 0 16px; padding: 0; list-style: none; font-size: .93rem; }
      .panel .panel-facts li { padding: 7px 0; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; }
      .panel .panel-facts li span:first-child { color: var(--ink-soft); }
      .panel .panel-facts li span:last-child { font-weight: 700; text-align: right; }

      /* ---------- Prefecture guide ---------- */
      .guide { padding: 46px 0 8px; }
      .guide-hero { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
      .guide-hero img { width: 100%; height: clamp(240px, 44vw, 460px); object-fit: cover; }
      .guide-hero figcaption { background: var(--card); padding: 10px 16px; font-size: .85rem; color: var(--ink-soft); }
      .guide-head { margin: 26px 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
      .guide-head h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: 0; font-weight: 800; }
      .guide-head .guide-jp { font-size: 1.15rem; color: var(--ink-soft); }
      .guide-intro { font-size: 1.05rem; max-width: 46em; color: var(--ink-soft); }
      .guide-intro strong { color: var(--ink); }
      .fact-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 6px; }
      .fact { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; }
      .fact .k { font-size: .74rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
      .fact .v { font-size: 1.12rem; font-weight: 900; margin-top: 3px; }
      .fact .n { font-size: .82rem; color: var(--ink-soft); }

      .stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
      .story { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
      .story img { width: 100%; height: 190px; object-fit: cover; }
      .story .body { padding: 18px 18px 20px; }
      .story .kind { font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--shu); }
      .story h3 { margin: 6px 0 8px; font-size: 1.28rem; line-height: 1.3; }
      .story p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

      .words { margin-top: 30px; background: var(--ai-deep); color: #eef3f9; border-radius: 18px; padding: 26px; }
      @media (prefers-color-scheme: dark) { .words { background: #1d2f47; } }
      .words h3 { margin: 0 0 4px; font-size: 1.45rem; color: #fff; }
      .words .words-sub { color: #b9cadd; font-size: .95rem; margin: 0 0 18px; }
      .word-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
      .word { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 14px 16px; }
      .word .term { font-size: 1.2rem; font-weight: 900; color: #fff; }
      .word .term .jp { font-size: .95rem; color: #ffd9a8; margin-left: 6px; font-weight: 700; }
      .word p { margin: 6px 0 0; font-size: .9rem; color: #cfdae8; }

      .notebook { margin-top: 30px; display: grid; grid-template-columns: .9fr 1.4fr; gap: 22px; align-items: start; }
      .notebook .nb-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
      .notebook h3 { margin: 0 0 12px; font-size: 1.35rem; }
      .notebook ul { margin: 0; padding-left: 1.15em; color: var(--ink-soft); font-size: .96rem; }
      .notebook li { margin-bottom: 9px; }
      .notebook li strong { color: var(--ink); }

      /* ---------- Day counter ---------- */
      .day-counter {
        margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
        background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--shu);
        border-radius: 12px; padding: 12px 16px; max-width: 34em;
      }
      .day-counter .day-big { font-family: "Shippori Mincho B1", serif; font-size: 1.55rem; font-weight: 800; line-height: 1.1; color: var(--ink); white-space: nowrap; }
      .day-counter .day-big strong { color: var(--shu); }
      .day-counter .day-sub { font-size: .88rem; color: var(--ink-soft); line-height: 1.45; }
      .intro-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .92rem; font-weight: 700; }

      /* ---------- Published posts ---------- */
      .posts { padding: 46px 0 8px; }
      .posts-empty {
        background: var(--card); border: 1.5px dashed var(--line); border-radius: 16px;
        padding: 26px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
      }
      .posts-empty h3 { margin: 0 0 6px; font-size: 1.3rem; }
      .posts-empty p { margin: 0; color: var(--ink-soft); font-size: .96rem; max-width: 46em; }
      .posts-empty .when { font-size: .86rem; color: var(--ink-soft); border: 1px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: 12px 14px; min-width: 210px; }
      .posts-empty .when strong { color: var(--ink); display: block; }

      /* ---------- Search + Tokyo index ---------- */
      .index-section { padding: 46px 0 8px; }
      .prep-note { font-size: .94rem; color: var(--ink-soft); max-width: 52em; }
      .prep-note strong { color: var(--ink); }
      .search-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); margin: 18px 0 8px; }
      .search-panel h3 { margin: 0 0 4px; font-size: 1.25rem; }
      .search-panel .search-sub { margin: 0 0 16px; font-size: .9rem; color: var(--ink-soft); }
      .search-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
      .field label { display: block; font-size: .76rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 5px; }
      .field input, .field select {
        width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px;
        background: var(--paper); color: var(--ink); padding: 9px 11px; font: inherit; font-size: .95rem;
      }
      .field input:focus, .field select:focus { outline: 3px solid var(--ai-tile); border-color: var(--ai); }
      .search-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 14px; }
      .btn.small { min-height: 40px; padding: 7px 14px; font-size: .9rem; }
      .result-count { font-size: .9rem; color: var(--ink-soft); }
      .result-count strong { color: var(--shu); }
      .no-results { display: none; margin-top: 16px; border: 1px dashed var(--line); border-radius: 12px; padding: 18px; background: var(--paper-2); color: var(--ink-soft); }
      .no-results.show { display: block; }
      .no-results strong { color: var(--ink); }
      .cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
      .cat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 10px; }
      .cat-card[hidden], .slot[hidden], .story-result[hidden] { display: none !important; }
      .cat-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 6px; }
      .cat-no { font-family: "Shippori Mincho B1", serif; font-size: 1.7rem; font-weight: 800; color: var(--shu); line-height: 1; }
      .cat-head h3 { margin: 0; font-size: 1.22rem; line-height: 1.25; }
      .cat-head .cat-jp { font-size: .88rem; color: var(--ink-soft); font-weight: 700; }
      .slot-list { list-style: none; margin: 0; padding: 0; }
      .slot { display: flex; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: .93rem; }
      .slot:first-child { border-top: 0; }
      .slot-code { flex: 0 0 42px; font-weight: 900; color: var(--ai); font-size: .86rem; padding-top: 2px; }
      .slot-theme { color: var(--ink); font-weight: 700; line-height: 1.4; }
      .slot-theme .jp { display: block; font-weight: 500; color: var(--ink-soft); font-size: .86rem; }
      .slot-kind { margin-left: auto; flex: 0 0 auto; font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
      .missing-rule { margin-top: 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: .92rem; color: var(--ink-soft); }
      .missing-rule strong { color: var(--ink); }
      .missing-rule .example { display: inline-flex; gap: 8px; align-items: center; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 5px 10px; margin-top: 8px; font-weight: 700; color: var(--later-ink); }
      .story-results { margin-top: 22px; }
      .story-results h3 { font-size: 1.3rem; margin: 0 0 6px; }
      .story-results p { color: var(--ink-soft); font-size: .93rem; margin: 0 0 12px; }
      .story-result { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
      .story-result .sr-kind { font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--shu); }
      .story-result .sr-title { font-weight: 900; }
      .story-result .sr-meta { font-size: .88rem; color: var(--ink-soft); }
      @media (max-width: 900px) {
        .search-grid { grid-template-columns: 1fr 1fr; }
        .cat-grid { grid-template-columns: 1fr; }
        .posts-empty { grid-template-columns: 1fr; }
      }
      @media (max-width: 640px) {
        .search-grid { grid-template-columns: 1fr; }
        .day-counter { align-items: flex-start; }
      }

      /* ---------- Roadmap ---------- */
      .roadmap { padding: 44px 0 10px; }
      .road-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }
      .step { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 16px; position: relative; }
      .step .no { font-size: .75rem; font-weight: 900; letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase; }
      .step .name { font-family: "Shippori Mincho B1", serif; font-size: 1.3rem; font-weight: 800; margin: 4px 0 2px; }
      .step .desc { font-size: .87rem; color: var(--ink-soft); }
      .step.current { border-color: var(--shu); background: var(--shu-soft); }
      .step.current .no { color: var(--shu); }
      .step.open-ended { border-style: dashed; background: transparent; }

      /* ---------- Language switcher ---------- */
      .lang-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:16px 0 0; }
      .lang-bar .lang-label { font-size:.82rem; font-weight:900; letter-spacing:.06em; color:var(--ink-soft); margin-right:2px; }
      .lang-btn { appearance:none; border:1.5px solid var(--line); background:var(--card); color:var(--ink-soft); border-radius:999px; padding:8px 14px; font:inherit; font-size:.88rem; font-weight:700; cursor:pointer; min-height:38px; }
      .lang-btn:hover { border-color:var(--ink); color:var(--ink); }
      .lang-btn[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:var(--paper); }
      .lang-note { font-size:.82rem; color:var(--ink-soft); margin-left:4px; }

      /* ---------- Glossary ---------- */
      .gloss, [data-gloss] {
        appearance: none; background: none; border: 0; padding: 0; margin: 0;
        font: inherit; color: inherit; cursor: pointer; text-align: inherit;
        text-decoration: underline dotted var(--shu) 1.6px;
        text-underline-offset: 3px; text-decoration-skip-ink: auto;
      }
      .gloss:hover, .gloss:focus-visible, [data-gloss]:hover, [data-gloss]:focus-visible { background: var(--gold-soft); }
      .gloss:focus-visible, [data-gloss]:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; }
      .words .gloss, .words [data-gloss] { text-decoration-color: #ffd9a8; }
      .words .gloss:hover, .words .gloss:focus-visible, .words [data-gloss]:hover, .words [data-gloss]:focus-visible { background: rgba(255,255,255,.16); }
      .words .gloss:focus-visible, .words [data-gloss]:focus-visible { outline-color: #ffd9a8; }
      .gloss-pop {
        position: fixed; z-index: 60; width: min(320px, calc(100vw - 24px));
        background: var(--card); color: var(--ink); border: 1px solid var(--line);
        border-radius: 14px; box-shadow: var(--shadow); padding: 16px 40px 16px 18px;
      }
      .gloss-pop[hidden] { display: none !important; }
      .gloss-pop .gloss-term { font-family: "Shippori Mincho B1", serif; font-size: 1.45rem; font-weight: 800; line-height: 1.25; }
      .gloss-pop .gloss-reading { font-size: .88rem; font-weight: 700; color: var(--shu); margin-top: 2px; }
      .gloss-pop .gloss-def { margin: 8px 0 0; font-size: .93rem; color: var(--ink-soft); line-height: 1.6; }
      .gloss-pop .gloss-close {
        position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; min-height: 32px;
        appearance: none; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
        border-radius: 999px; font-size: 1rem; line-height: 1; cursor: pointer;
      }
      footer { margin-top: 52px; border-top: 1px solid var(--line); padding: 26px 0 40px; }
      .foot-grid { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: flex-start; }
      footer p { margin: 0; font-size: .88rem; color: var(--ink-soft); max-width: 44em; }
      footer .credits { font-size: .78rem; margin-top: 10px; }

      @media (max-width: 900px) {
        .map-layout { grid-template-columns: 1fr; }
        .panel { position: static; }
        .stories { grid-template-columns: 1fr; }
        .story img { height: 210px; }
        .word-grid { grid-template-columns: 1fr; }
        .notebook { grid-template-columns: 1fr; }
        .road-steps { grid-template-columns: 1fr 1fr; }
        .fact-strip { grid-template-columns: 1fr 1fr; }
      }
      @media (max-width: 640px) {
        .intro { padding-top: 28px; }
        .brand-line { flex-direction: column; align-items: flex-start; gap: 0; }
        .brand-line .jp { white-space: nowrap; }
        .brand-line::after { display: none; }
        .intro-grid { grid-template-columns: 1fr; }
        .mascot { max-width: 300px; }
        .road-steps { grid-template-columns: 1fr; }
      }
    