/* v2.12：海辺の観光案内。絵と情報を囲む画面だけを整え、地形タイルは変えない。 */
:root {
  --surface: #fffefa;
  --surface-2: #f0f7ed;
  --ink: #183b43;
  --ink-2: #526e73;
  --line: #cfdfd3;
  --accent: #c93f60;
  --sea-ink: #286875;
  --paper-shadow: 0 3px 0 rgb(28 74 69 / .06), 0 8px 22px rgb(28 74 69 / .035);
  --r: 14px;
}
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] {
  --surface: #162d35; --surface-2: #203d43; --ink: #e5f2ed; --ink-2: #adbec1;
  --line: #3b575b; --accent: #ff86a2; --sea-ink: #93d4cf;
  --paper-shadow: 0 3px 0 rgb(0 0 0 / .18), 0 8px 22px rgb(0 0 0 / .09);
} }
:root[data-theme="dark"] {
  --surface: #162d35; --surface-2: #203d43; --ink: #e5f2ed; --ink-2: #adbec1;
  --line: #3b575b; --accent: #ff86a2; --sea-ink: #93d4cf;
  --paper-shadow: 0 3px 0 rgb(0 0 0 / .18), 0 8px 22px rgb(0 0 0 / .09);
}
body { margin: 0; background-image: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--surface) 66%, transparent), transparent 850px); }
.app { box-sizing: border-box; max-width: 704px; padding: 20px 20px 106px; gap: 16px; }
.app *, .tabs *, .sheet *, .modal * { box-sizing: border-box; }
.ui-icon { display: block; width: 22px; height: 22px; flex: none; }
.game-brand { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 2px; position: sticky; top: 0; z-index: 21; background: var(--bg); border-radius: 0 0 9px 9px; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--sea-ink); border-radius: 10px; color: var(--sea-ink); background: var(--surface); transform: rotate(-5deg); }
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: .03em; }
.brand-note { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.display-toggle { display: inline-flex; justify-content: center; align-items: center; gap: 4px; flex: none; min-height: 40px; padding: 6px 8px; margin-left: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; color: var(--ink-2); font-size: 10px; }
.display-toggle .ui-icon { width: 17px; height: 17px; }
.eyebrow { margin: 0; font-size: 11px; color: var(--sea-ink); font-weight: 700; letter-spacing: .09em; }
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--paper-shadow); }
.island-title { min-width: 0; display: grid; gap: 4px; }
.title-row { flex-wrap: wrap; gap: 6px 10px; }
.island-name { font-size: 23px; font-weight: 400; line-height: 1.4; }
.rank { font-size: 10px; padding: 4px 8px; background: var(--surface-2); color: var(--sea-ink); border: 1px solid var(--line); }
.wx { display: flex; align-content: center; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; max-width: 128px; margin-left: 0; font-size: 12px; }
.wx .ui-icon { width: 18px; height: 18px; color: var(--sea-ink); }
.turn-label { flex-basis: 100%; text-align: right; font-family: var(--f-display); font-size: 13px; }
.top > .stamina, .top > .res, .top > .kv, .top > .guest-note { grid-column: 1 / -1; }
.stamina { gap: 10px; }
.stamina .bar { height: 9px; border: 0; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.stamina .val { font-size: 14px; }
.stamina small { display: inline-block; margin-left: 4px; }
.res { margin: 0; gap: 8px; }
.res > div { padding: 10px 12px; border: 0; border-radius: 9px; background: var(--surface-2); }
.res dt { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.4; }
.res dt .ui-icon { width: 17px; height: 17px; color: var(--sea-ink); }
.res dd { font-size: 21px; margin-top: 4px; line-height: 1.3; }
.top > .kv { font-size: 11px; padding-top: 2px; }
.guest-note { border: 0; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); padding: 8px 10px; font-size: 11px; }
.island-layout, .island-management { display: grid; gap: 16px; min-width: 0; }
.island-scene { display: grid; gap: 12px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--paper-shadow); align-content: start; }
.scene-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scene-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.4; margin: 3px 0 0; }
.scene-head .btn { flex: none; }
.scene-head { flex-wrap: wrap; }
.scene-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.scene-weather { font-size: 11px; color: var(--ink-2); line-height: 1.6; }
.scene-weather > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.scene-weather .ui-icon { width: 17px; height: 17px; }
.scene-weather b { color: var(--accent); }
.app.scene-touring { max-width: 1100px; }
.scene-tour { display: grid; gap: 12px; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.scene-tour-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.scene-tour-head h1 { margin: 3px 0 0; font-family: var(--f-display); font-size: 23px; font-weight: 400; overflow-wrap: anywhere; }
.scene-tour-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scene-tour-tools .seg { display: flex; }
.scene-tour-tools .seg button { padding: 8px 12px; }
.scene-tour-tools .scene-weather { margin-left: auto; }
.scene-tour-viewport { overflow: auto; max-height: max(200px, calc(100dvh - 260px)); min-width: 0; background: var(--surface-2); border-radius: 9px; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.scene-tour-viewport:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.scene-tour-canvas { width: 100%; max-width: min(864px, max(220px, calc((100dvh - 310px) * 1.2558))); margin: auto; }
.scene-tour-canvas.zoomed { width: 1728px; max-width: none; margin: 0; }
.scene-tour-canvas .map-wrap { width: 100%; max-width: none; }
.scene-sights { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.scene-sights > span { color: var(--ink-2); margin-right: 3px; }
.scene-sights .btn { font-size: 11px; }
.hx-growth { position: absolute; z-index: 5; pointer-events: none; display: grid; justify-items: center; align-content: start; }
.hx-growth > b { position: relative; padding: 2px 4px; border-radius: 3px; color: #253344; background: #FAF6E5; white-space: nowrap; font-size: 10px; box-shadow: 0 1px 0 #E6BD67; animation: scene-label .65s ease-out both; }
.hx-growth > i { position: absolute; inset: 20% 0 0; border: 2px solid #E6BD67; border-radius: 50%; animation: scene-bloom 1.4s ease-out 2 both; }
@keyframes scene-bloom { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.2); opacity: 0; } }
@keyframes scene-label { from { transform: translateY(5px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 860px) { .scene-tour-canvas.zoomed { width: 864px; } }
@media (max-width: 420px) { .scene-head-actions .btn { padding: 7px 8px; font-size: 11px; } .scene-tour-tools .scene-weather { margin-left: 0; flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .hx-growth > b, .hx-growth > i { animation: none; } .hx-growth > i { opacity: .45; } }
.map-mode { padding: 0; }
.map-mode .seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 10px; width: 100%; }
.map-mode .seg button { font-size: 12px; min-width: 0; padding: 9px 4px; }
.map-mode p { margin-top: 7px; line-height: 1.5; }
.map-wrap { border-radius: 9px; }
.island-scene .legend { gap: 4px; line-height: 1.6; }
.scene-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); gap: 8px; }
.scene-stats > div { min-width: 0; }
.scene-stats dt { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); }
.scene-stats .ui-icon { width: 16px; height: 16px; color: var(--sea-ink); }
.scene-stats dd { margin: 4px 0 0; font-family: var(--f-display); font-size: 20px; }
.scene-stats small { font-family: var(--f-body); font-size: 10px; color: var(--ink-2); margin-left: 4px; }
.btn { min-height: 44px; border-radius: 10px; line-height: 1.5; transition: background-color .15s, box-shadow .15s; }
.btn.primary { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 74%, var(--ink)); }
.btn.small { min-height: 40px; font-size: 12px; padding: 7px 11px; }
.btn:not(:disabled):hover { border-color: var(--sea-ink); background: color-mix(in srgb, var(--sea-ink) 7%, var(--surface)); }
.btn.primary:not(:disabled):hover { border-color: transparent; background: color-mix(in srgb, var(--accent) 91%, var(--ink)); }
.btn:active:not(:disabled) { box-shadow: none; }
.controls { gap: 10px; }
.controls .btn { min-height: 62px; }
.controls .btn.primary { font-size: 15px; }
.panel { padding: 16px; gap: 10px; box-shadow: var(--paper-shadow); }
.panel h2 { color: var(--sea-ink); font-size: 17px; line-height: 1.5; }
.panel h3 { line-height: 1.5; }
.sub { line-height: 1.7; }
.hint { border: 1px dashed var(--line); background: var(--surface); font-size: 12px; line-height: 1.8; margin: 0; padding: 12px; }
.idle-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; gap: 8px; }
.idle-panel .lbl { font-weight: 700; color: var(--sea-ink); }
.idle-panel .seg button { min-height: 42px; font-size: 11px; }
.seg { border-radius: 10px; }
.seg button { min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--sea-ink); color: var(--surface); }
.fac-chip { padding: 5px 10px 5px 6px; min-height: 48px; background: var(--surface); }
.fac-chip:hover { border-color: var(--sea-ink); }
.card { padding: 12px; gap: 7px; box-shadow: var(--paper-shadow); }
.cards:not(.mini) { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.card.on { border-color: color-mix(in srgb, var(--sea-ink) 55%, var(--line)); }
.card .meta { line-height: 1.7; }
.card .row-btn { gap: 6px; }
.card .row-btn button { min-height: 36px; font-size: 12px; padding: 6px 9px; }
.pet-portrait { display: grid; place-items: center; width: 128px; max-width: 100%; height: 116px; border-radius: 40% 40% 18% 18%; background: linear-gradient(var(--surface-2) 76%, color-mix(in srgb, var(--good) 15%, var(--surface)) 76%); margin: 2px 0 4px; }
.pet-portrait .art, .pet-portrait .art-shiny { position: relative; }
.play-guide { border-left: 3px solid var(--sea-ink); }
.play-guide p { margin: 0; font-size: 12px; line-height: 1.8; }
.play-guide .panel-head { align-items: flex-start; gap: 8px; }
.play-guide .panel-head .linkish { flex: none; font-size: 11px; min-height: 36px; }
.guide-choices, .build-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-choices .btn { flex: 1 1 95px; }
.guide-choices [aria-pressed="true"], .build-filters [aria-pressed="true"] { color: var(--surface); background: var(--sea-ink); border-color: var(--sea-ink); }
.guide-reopen { min-height: 36px; font-size: 11px; text-align: left; }
.turn-outcome { display: grid; gap: 7px; padding: 13px; border: 1px solid var(--sea-ink); border-left-width: 4px; border-radius: 12px; background: var(--surface); }
.turn-outcome h3, .turn-outcome p { margin: 0; font-size: 13px; line-height: 1.7; }
.turn-outcome .sub { font-size: 10px; }
.turn-outcome .linkish { min-height: 36px; min-width: 36px; }
.island-details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.island-details > summary { min-height: 30px; color: var(--sea-ink); font-weight: 700; line-height: 1.7; }
.island-details[open] { display: block; }
.island-details > .panel { margin-top: 12px; box-shadow: none; padding: 10px; }
.pet-support { display: grid; gap: 3px; min-height: 46px; padding: 8px; border: 1px dashed var(--sea-ink); border-radius: 9px; background: var(--surface-2); color: var(--sea-ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.pet-support small { font-size: 10px; }
.support-list { display: grid; gap: 7px; }
.support-list .btn { text-align: left; }
.research-feedback { padding: 12px; background: var(--surface-2); border-radius: 9px; }
.research-feedback h4 { margin: 0 0 8px; font-size: 12px; }
.research-feedback ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.8; }
.research-feedback li + li { margin-top: 8px; }
.research-feedback .sub { margin: 8px 0 0; font-size: 10px; }
.build-filters { margin-bottom: 12px; }
.dex .card, .cards.mini .card { box-shadow: none; }
.dex { gap: 9px; }
.dex .card { border-style: dashed; background: color-mix(in srgb, var(--surface) 72%, var(--bg)); }
.tabs { box-shadow: 0 -4px 18px rgb(24 59 67 / .06); }
.tabs nav { max-width: 760px; padding: 6px 8px 8px; gap: 2px; }
.tabs button { border-radius: 10px; min-height: 60px; padding: 7px 0; font-size: 11px; gap: 5px; }
.tabs button .ic { display: grid; place-items: center; }
.tabs button .ui-icon { width: 23px; height: 23px; }
.tabs button[aria-current="page"] { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.tabs button[aria-current="page"]::after { content: ''; position: absolute; top: 2px; width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.tabs button:hover { background: var(--surface-2); }
.tabs .reply-count { right: 2px; top: 4px; }
.tabs .dot { position: absolute; right: 6px; top: 6px; }
.sheet { border-top: 3px solid var(--sea-ink); border-radius: 18px 18px 0 0; }
.sheet header .x { width: 44px; height: 44px; flex: none; font-size: 20px; }
.sheet .act { grid-template-columns: 36px minmax(0, 1fr) auto; min-height: 54px; }
.sheet .act .ic { display: grid; place-items: center; }
.sheet .act .cost { font-size: 12px; }
.sheet .act .ef { line-height: 1.6; }
.modal { max-height: calc(100dvh - 24px); overflow-y: auto; }
.post { padding: 14px; gap: 8px; }
.post-actions { gap: 6px 12px; }
.post-actions .linkish { min-height: 36px; }
.stamp { min-height: 34px; padding: 5px 10px; }
.research-scores > div { background: var(--surface-2); }
.welcome { width: 100%; max-width: 580px; padding: 26px 12px 20px; gap: 18px; }
.welcome h1 { font-size: clamp(27px, 5vw, 38px); line-height: 1.6; color: var(--sea-ink); }
.welcome > p { line-height: 1.9; }
.welcome-promise { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.welcome-vignette { width: 290px; max-width: 100%; height: 174px; position: relative; overflow: hidden; border-bottom: 1px dashed var(--line); }
.welcome-sun { position: absolute; top: 8px; right: 23px; width: 30px; height: 30px; background: #f0c66a; border-radius: 50%; }
.welcome-islet { position: absolute; left: 17px; top: 48px; width: 240px; height: 100px; }
.welcome-islet::before { content: ''; position: absolute; inset: 0; background: #afcf7a; clip-path: polygon(10% 15%, 30% 0, 65% 0, 92% 20%, 100% 57%, 76% 91%, 35% 100%, 5% 78%, 0 43%); box-shadow: inset 0 -13px #a98756; }
.welcome-islet > span { position: absolute; z-index: 1; }
.welcome-islet .px-ic2 { width: 48px; height: 72px; }
.welcome-hotel { left: 104px; top: -28px; }
.welcome-onsen { left: 55px; top: 2px; }
.welcome-park { left: 148px; top: 0; }
.welcome-light { left: 17px; top: -30px; }
.welcome-chinju { position: absolute; z-index: 2; width: 48px; height: 48px; left: 96px; top: 37px; image-rendering: pixelated; }
.welcome-waves { position: absolute; bottom: 1px; left: 64px; color: var(--sea-ink); font-size: 20px; letter-spacing: 12px; }
@media (min-width: 980px) {
  .app[data-screen="island"] { max-width: 1104px; }
  .island-layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 22px; }
  .island-layout > .top { grid-column: 2; grid-row: 1; padding: 14px; gap: 10px; }
  .island-layout > .top .res { grid-template-columns: 1fr 1fr; }
  .island-layout > .top .island-name { font-size: 20px; }
  .island-layout > .top .wx { font-size: 11px; max-width: 92px; }
  .island-layout > .top .stamina small { font-size: 10px; }
  .island-layout > .top .stamina .lbl { font-size: 10px; }
  .island-scene { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 64px; padding: 18px; }
  .island-management { grid-column: 2; grid-row: 2; }
  .island-management .panel { padding: 14px; }
  .island-management .panel h2 { font-size: 16px; }
}
@media (max-width: 620px) {
  .app { padding: 14px 12px 100px; gap: 12px; }
  .brand-note { display: none; }
  .brand-name { font-size: 13px; }
  .top { padding: 12px; gap: 10px; }
  .island-name { font-size: 20px; }
  .rank { font-size: 10px; }
  .wx { font-size: 11px; max-width: 96px; }
  .res { gap: 5px; }
  .res > div { padding: 8px 7px; }
  .res dt { display: block; font-size: 9px; min-height: 14px; }
  .res dt .ui-icon { display: none; }
  .res dd { font-size: 18px; }
  .stamina { grid-template-columns: auto minmax(28px, 1fr) auto; gap: 7px; }
  .stamina .lbl { font-size: 10px; }
  .stamina small { font-size: 10px; margin-left: 0; }
  .island-scene { padding: 12px; gap: 10px; }
  .scene-head h2 { font-size: 19px; }
  .scene-head .eyebrow { font-size: 10px; }
  .scene-stats dt { font-size: 10px; }
  .scene-stats .ui-icon { width: 13px; height: 13px; }
  .scene-stats dd { font-size: 19px; }
  .panel { padding: 14px; }
  .tabs nav { padding: 5px 4px 7px; gap: 0; }
  .tabs button { font-size: 10px; }
  .tabs button .ui-icon { width: 21px; height: 21px; }
}
@media (max-width: 360px) {
  .top { padding: 10px; }
  .island-name { font-size: 18px; }
  .wx { max-width: 88px; }
  .res dd { font-size: 16px; }
  .res dt { font-size: 9px; }
  .res-unit { display: none; }
  .map-mode .seg button { font-size: 10px; }
  .scene-stats dt .ui-icon { display: none; }
  .scene-stats small { display: block; margin: 0; }
  .scene-stats dd { font-size: 18px; }
  .sheet .act { grid-template-columns: 32px minmax(0, 1fr); }
  .sheet .act .cost { grid-column: 2; }
  .tabs button { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* 島の設計手帖とアルバム。絵のふちは変えず、読む印を施設に重ねる。 */
.map-insight { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.map-insight-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.map-insight-tools label, .notebook-select { display: grid; gap: 5px; flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); }
.map-insight select, .notebook-select select { width: 100%; min-height: 40px; padding: 7px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font: inherit; }
.insight-places { display: grid; gap: 6px; }
.insight-places button { text-align: left; overflow-wrap: anywhere; }
.hx-lens { position: absolute; z-index: 4; display: grid; place-items: center; pointer-events: none; font-size: clamp(7px, 1.15vw, 11px); }
.hx-lens b { padding: 1px 3px; border-radius: 4px; color: #183b43; background: #f8f5e8; border: 1px solid #738a81; line-height: 1.2; }
.hx-lens.tone-good b { color: #164936; background: #d9efbc; border-color: #387451; }
.hx-lens.tone-bad b { color: #713042; background: #ffe2cd; border-color: #b76249; }
.notebook-plans { margin: 8px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.notebook-plans h3, .album-caption h3 { margin: 0; color: var(--sea-ink); }
.notebook-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.notebook-slots article { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.notebook-slots article.selected { border-color: var(--sea-ink); box-shadow: inset 0 0 0 1px var(--sea-ink); }
.notebook-slot { font-size: 11px; color: var(--sea-ink); font-weight: 700; }
.notebook-slots b, .notebook-slots small { overflow-wrap: anywhere; }
.notebook-slots small { font-size: 11px; color: var(--ink-2); }
.notebook-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.notebook-buttons button { max-width: 100%; font-size: 12px; white-space: normal; }
.notebook-album .panel-head { flex-wrap: wrap; }
.album-pages summary { color: var(--sea-ink); cursor: pointer; font-size: 12px; }
.notebook-map { margin: 12px auto; width: 100%; max-width: 520px; }
.notebook-map .hx-cell:disabled { opacity: 1; cursor: default; }
.notebook-comparison { width: 100%; table-layout: fixed; margin: 10px 0 18px; }
.notebook-comparison th, .notebook-comparison td { overflow-wrap: anywhere; font-size: 12px; padding: 8px 5px; vertical-align: top; }
.notebook-comparison th:first-child { width: 30%; }
.notebook-consultation { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; text-align: left; }
.album-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) {
  .notebook-slots { grid-template-columns: 1fr; }
  .notebook-slots article { gap: 5px; padding: 10px; }
  .map-insight-tools > button { width: 100%; }
  .hx-lens { font-size: 7px; }
  .notebook-comparison th, .notebook-comparison td { font-size: 11px; padding: 7px 3px; }
}
