/* 100年前の東京、今のどこ？ */
:root {
  --accent: #9b3b22; --accent-ink: #fff8ec; --accent-soft: #f4e2d2;
  --bg: #f4ecdc; --surface: #fffaf0; --surface-2: #efe4cd; --line: #dccbaa; --text: #2f2418; --text-sub: #6e5e4a;
  --ht-sea: #b9d3d6; --ht-land: #e9e0c9; --ht-ward: #f8f1df; --ht-wardline: #b49a76; --ht-river: #4b8fb8; --ht-rail: #4a3a2c;
  --ht-palace: #b9cfa0; --ht-label: #5d4a35; --ht-pin: #c0392b; --ht-ans: #2d6a3e; --ht-frame: #fffaf0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #e39a72; --accent-ink: #1d140c; --accent-soft: #3a2619;
    --bg: #17120d; --surface: #221a12; --surface-2: #2c2218; --line: #3d3023; --text: #f1e6d4; --text-sub: #bba98f;
    --ht-sea: #1f3640; --ht-land: #3a3226; --ht-ward: #2c251c; --ht-wardline: #6d5a43; --ht-river: #6fb3dc; --ht-rail: #d8c6a8;
    --ht-palace: #3d5236; --ht-label: #e6d6bb; --ht-pin: #ff7a66; --ht-ans: #7fd39a; --ht-frame: #2c2218;
  }
}
:root[data-theme="dark"] {
  --accent: #e39a72; --accent-ink: #1d140c; --accent-soft: #3a2619;
  --bg: #17120d; --surface: #221a12; --surface-2: #2c2218; --line: #3d3023; --text: #f1e6d4; --text-sub: #bba98f;
  --ht-sea: #1f3640; --ht-land: #3a3226; --ht-ward: #2c251c; --ht-wardline: #6d5a43; --ht-river: #6fb3dc; --ht-rail: #d8c6a8;
  --ht-palace: #3d5236; --ht-label: #e6d6bb; --ht-pin: #ff7a66; --ht-ans: #7fd39a; --ht-frame: #2c2218;
}
.mn-title { font-family: var(--font-serif); }
.mn-app { max-width: 980px; }
.mn-app > section { max-width: 560px; margin: 0 auto; }
.mn-app > section:has(.ht-play) { max-width: 980px; }

/* 絵葉書 */
.ht-hero, .ht-photo { position: relative; margin: 0; background: var(--ht-frame); padding: 10px 10px 12px; border-radius: 6px; box-shadow: 0 6px 18px rgba(40, 25, 10, .22), 0 0 0 1px var(--line); transform: rotate(-.6deg); }
.ht-hero svg, .ht-photo svg, .ht-hero img, .ht-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 2px; }
.ht-photo img { object-fit: contain; background: #1d1610; filter: sepia(.25) contrast(1.02); }
.ht-photo { transform: none; }
.ht-stamp { position: absolute; right: 18px; top: 18px; font: 700 12px/1 var(--font-serif); letter-spacing: .2em; color: #9b3b22; border: 2px solid #9b3b22; padding: 6px 8px; border-radius: 4px; background: rgba(255, 248, 236, .7); transform: rotate(6deg); }

/* プレイ */
.ht-qno { font-size: 15px; }
.ht-grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .ht-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.ht-col > * + * { margin-top: 10px; }
.ht-meta { gap: 8px; }
.ht-hintbtn { min-height: 40px; padding: 6px 12px; font-size: 13px; }
.ht-hint { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 15px; margin: 0; }
.ht-hint:empty { display: none; }
.ht-mapwrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--ht-sea); }
.ht-map { display: block; width: 100%; aspect-ratio: 1000 / 1031; height: auto; cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ht-sea { fill: var(--ht-sea); }
.ht-land { fill: var(--ht-land); }
.ht-ward { fill: var(--ht-ward); stroke: var(--ht-wardline); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ht-palace { fill: var(--ht-palace); }
.ht-river { fill: none; stroke: var(--ht-river); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.ht-rail { fill: none; stroke: var(--ht-rail); stroke-width: 1.3; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; opacity: .75; }
.ht-labels { pointer-events: none; }
.ht-wl { fill: var(--ht-label); text-anchor: middle; dominant-baseline: middle; font-weight: 700; opacity: .8; paint-order: stroke; stroke: var(--ht-ward); stroke-width: calc(3px * var(--u, 1)); }
.ht-pl { opacity: .9; }
.ht-lm circle { fill: var(--surface); stroke: var(--ht-rail); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ht-lm text { fill: var(--text); font-size: .9em; font-weight: 700; paint-order: stroke; stroke: var(--ht-ward); stroke-width: calc(3px * var(--u, 1)); }
.ht-marks { pointer-events: none; }
.ht-pin path { stroke: var(--ht-pin); stroke-width: 2.5; fill: none; }
.ht-pin .ht-flag { fill: var(--ht-pin); stroke: none; }
.ht-pin circle { fill: var(--ht-pin); }
.ht-line { stroke: var(--ht-pin); fill: none; }
.ht-ans circle { fill: var(--ht-ans); stroke: #fff; stroke-width: 2; }
.ht-ans path { fill: #fff; }
.ht-zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 6px; }
.ht-zbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; font-weight: 900; cursor: pointer; box-shadow: var(--shadow); }
.ht-zbtn:disabled { opacity: .4; }
.ht-maphint { position: absolute; left: 8px; bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 12px; color: var(--text-sub); pointer-events: none; }
.ht-reveal:empty { display: none; }
.ht-reveal { max-width: 560px; margin: 14px auto 0; }
.ht-reveal > * + * { margin-top: 10px; }
.ht-ans-card { border-left: 6px solid var(--accent); }
.ht-grade { font-size: 22px; }
.ht-msg { font-size: 18px; }
.ht-km { font-weight: 900; color: var(--accent); }
.ht-ans-t { font-family: var(--font-serif); font-size: 19px; margin: 8px 0 4px; }
.ht-fact { font-size: 15px; }

/* 結果 */
.ht-result { text-align: center; border-top: 6px solid var(--type, var(--accent)); background: linear-gradient(180deg, var(--surface-2), var(--surface) 40%); }
.ht-r-label { margin: 0; font-size: 13px; letter-spacing: .1em; color: var(--text-sub); font-weight: 700; }
.ht-r-name { font-family: var(--font-serif); font-size: clamp(26px, 7.5vw, 36px); margin: 4px 0 8px; color: var(--text); }
.ht-r-big { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.ht-r-marks { font-size: 30px; letter-spacing: .1em; margin: 6px 0; }
.ht-cmp { font-weight: 900; font-size: 18px; color: var(--accent); }
.ht-list { margin: 6px 0 0; padding-left: 1.4em; font-size: 14px; }
.ht-album { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ht-album-i { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-sub); }
.ht-album-i.is-got { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

@media (max-width: 859px) {
  .ht-photo { padding: 6px; }
  .ht-photo svg, .ht-photo img { max-height: 30vh; }
  .ht-go { position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
}
.ht-go:disabled { position: static; box-shadow: none; }
