/* チバリヨー！ パチパチアイランド：ボタンや文字は珠の森（クリーム・珠の黄・木の茶）。ゲームの中の沖縄の自然は緑・青も使う。
   黄の上は濃い茶の文字。 */
:root {
  color-scheme: light;
  --cream: #FFF8EA;
  --cream-2: #F6EAD2;
  --bead: #FABD00;
  --bead-soft: #FFE59A;
  --wood: #A38A78;
  --ink: #5A4636;
  --miss: #D9644A;
  --card: #FFFDF7;
  --sea: #1E7FC0;
  --sea-2: #43C6DB;
  --shadow: 0 4px 0 rgba(90, 70, 54, .22);
  --r: 20px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); }
body {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  font-weight: 500;
  min-height: 100dvh;
  -webkit-user-select: none; user-select: none;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
img { -webkit-user-drag: none; }

.screen { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.screen.sky { background: linear-gradient(#BEEBFA 0, #E9F8FC 180px, var(--cream) 420px); }
.screen.ocean { background: linear-gradient(#2A9BD8, #1C6FB0); color: var(--ink); }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  background: linear-gradient(#FFD54A, var(--bead)); color: var(--ink); font-weight: 900; font-size: 19px;
  box-shadow: 0 4px 0 #C99400, 0 6px 14px rgba(0,0,0,.12); transition: transform .08s;
  border: 3px solid #fff;
}
.btn.big { min-height: 62px; font-size: 22px; padding: 0 36px; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #C99400; }
.btn.sub { background: var(--card); border-color: var(--wood); box-shadow: 0 4px 0 rgba(90,70,54,.25); }
.btn:disabled { filter: grayscale(.7); opacity: .5; }
.link { color: var(--wood); font-size: 15px; text-decoration: underline; padding: 8px; align-self: center; }

.head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.head h2 { font-size: 20px; font-weight: 900; flex: 1; }
.ocean .head h2 { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.back { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; font-weight: 900; color: var(--ink); background: #fff; box-shadow: var(--shadow); line-height: 1; }
.qno { font-weight: 900; background: #fff; border-radius: 99px; padding: 4px 12px; box-shadow: var(--shadow); }

/* 上のステータス */
.hud { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 6px 10px 6px 6px; box-shadow: var(--shadow); cursor: pointer; }
.hud-av { width: 44px; height: 44px; }
.hud-name { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hud-name b { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-name span { font-size: 12px; color: var(--wood); font-weight: 700; }
.hud-chip { display: flex; align-items: center; gap: 2px; font-weight: 900; font-size: 16px; background: var(--cream); border-radius: 99px; padding: 2px 10px 2px 4px; }
.hud-chip img { width: 26px; height: 26px; object-fit: contain; }
.hud-chip small { font-size: 11px; }

/* シーサーのことば */
.guide { display: flex; align-items: center; gap: 10px; }
.guide img { width: 76px; flex: none; animation: bob 2s ease-in-out infinite; }
.guide p { background: #fff; border-radius: 18px; padding: 10px 14px; font-weight: 700; line-height: 1.6; box-shadow: var(--shadow); position: relative; font-size: 15px; }
.guide p::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* タイトル */
.title { flex: 1; min-height: 100dvh; background-size: cover; background-position: center bottom; display: flex; flex-direction: column; align-items: center; padding: 48px 16px calc(28px + env(safe-area-inset-bottom)); position: relative; overflow: hidden; }
.title::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.65), rgba(255,255,255,0) 40%, rgba(0,0,0,0) 70%, rgba(0,40,80,.35)); }
.logo-box { position: relative; text-align: center; }
.logo-box h1 { font-size: 52px; font-weight: 900; color: var(--bead); letter-spacing: .04em; line-height: 1.1;
  -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(90,70,54,.35); }
.logo-box h1 small { display: block; font-size: 26px; color: #fff; -webkit-text-stroke: 5px var(--ink); transform: rotate(-4deg); margin-bottom: 4px; }
.logo-box p { margin-top: 10px; display: inline-block; background: var(--ink); color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 99px; font-size: 14px; }
.title-shisa { display: none; position: relative; width: 170px; margin-top: auto; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.title-foot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; }
.title-foot .link { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.credit { color: #fff; font-weight: 700; letter-spacing: .2em; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.bar { width: 240px; height: 14px; border-radius: 99px; background: rgba(255,255,255,.7); overflow: hidden; border: 2px solid #fff; }
.bar i { display: block; height: 100%; background: var(--bead); width: 0; transition: width .15s; }

/* アイコンえらび */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.tab { flex: none; padding: 8px 14px; border-radius: 99px; background: #fff; font-weight: 900; font-size: 14px; box-shadow: var(--shadow); }
.tab.on { background: var(--bead); }
.avatars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.av { border-radius: 50%; padding: 4px; transition: transform .1s; }
.av img { width: 100%; display: block; }
.av.on { background: var(--bead); transform: scale(1.06); box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(0,0,0,.2); }
.name { display: flex; flex-direction: column; gap: 6px; font-weight: 900; }
.name input { font: inherit; font-size: 20px; padding: 12px 16px; border-radius: 16px; border: 3px solid var(--wood); background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }

/* コース */
.courses { display: grid; gap: 14px; }
.course { text-align: left; background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; border: 3px solid #fff; }
.course:active { transform: translateY(2px); }
.course img { width: 84px; flex: none; }
.course > div { flex: 1; }
.course b { display: block; font-size: 22px; font-weight: 900; }
.course span { color: var(--wood); font-size: 14px; font-weight: 700; }
.meter { height: 12px; background: var(--cream-2); border-radius: 99px; margin: 8px 0 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--bead), #FF9F1C); border-radius: 99px; }
.course small { font-weight: 900; }

/* いまの もくひょう */
.goal { display: flex; align-items: center; gap: 10px; background: linear-gradient(#FFF7DA, #FFE9A8); border: 3px solid #fff; border-radius: 18px; padding: 8px 12px; box-shadow: var(--shadow); }
.goal > img { width: 46px; }
.goal div { flex: 1; display: flex; flex-direction: column; }
.goal small { font-size: 12px; font-weight: 900; color: #fff; background: #FF8A3D; align-self: flex-start; padding: 1px 10px; border-radius: 99px; }
.goal b { font-size: 16px; font-weight: 900; margin-top: 2px; }
.goal .plane { width: 56px; animation: fly 3s ease-in-out infinite; }
@keyframes fly { 50% { transform: translate(4px, -6px) rotate(-6deg); } }

/* 地図（全体・エリア共通） */
.worldmap, .areamap { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 22px; margin-top: 30px; box-shadow: 0 6px 18px rgba(0,0,0,.25); border: 4px solid #fff; }
.worldmap .bg, .areamap .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route polyline { fill: none; stroke: #fff; stroke-width: .9; stroke-dasharray: .1 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.worldmap .route polyline, .areamap .route polyline { stroke-width: 7; stroke-dasharray: 1 13; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.osm { position: absolute; right: 6px; bottom: 4px; font-size: 9px; color: rgba(255,255,255,.8); }

.area, .stage { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; }
.area .pin, .stage .pin {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #FFE680, var(--bead) 60%, #E0A100); color: var(--ink);
  border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 0 3px rgba(250,189,0,.35);
}
.area .pin img { width: 30px; }
.area .label, .stage .label { background: rgba(255,255,255,.95); border-radius: 99px; padding: 2px 10px; font-weight: 900; font-size: 13px; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.2); display: flex; align-items: center; gap: 6px; }
.area .label small { display: inline-flex; align-items: center; gap: 1px; font-size: 11px; color: var(--wood); }
.area .label small img { width: 14px; }
.area.locked .pin { background: #E9E4DA; width: 36px; height: 36px; }
.area.locked .pin img { width: 20px; }
.area.locked .label { font-size: 11px; padding: 1px 8px; }
.area.locked .label { opacity: .8; }
.area.cleared .pin { background: radial-gradient(circle at 35% 30%, #FFF3B0, #FFD54A 60%, #E0A100); }
.area.now .pin, .stage.now .pin { animation: glow 1.4s ease-in-out infinite; }
/* 鍵のかかったステージは奥、いま進むステージはいちばん手前（重なっても押せるように） */
.stage.locked { z-index: 1; }
.stage.now { z-index: 4; }
@keyframes glow { 50% { box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 0 10px rgba(255,255,255,.55); transform: scale(1.08); } }
.area.coming { z-index: 1; }
.area.coming .cloud { width: 46px; opacity: .95; filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); animation: drift 6s ease-in-out infinite; }
.area.coming .label { font-size: 10px; opacity: .85; margin-top: -8px; padding: 0 6px; }
@keyframes drift { 50% { transform: translateX(6px); } }
.airport-go img { width: 64px; animation: fly 3s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.airport-go .label { flex-direction: column; gap: 0; padding: 4px 12px; line-height: 1.3; }
.airport-go .label small { font-size: 10px; color: var(--wood); }

.me { position: absolute; bottom: 100%; margin-bottom: 4px; animation: hop 1.1s ease-in-out infinite; z-index: 3; }
.me img { width: 52px; display: block; filter: drop-shadow(0 4px 3px rgba(0,0,0,.3)); }
@keyframes hop { 50% { transform: translateY(-8px); } }
.stage .buddy { position: absolute; width: 56px; left: 100%; top: -24px; margin-left: -6px; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 4px 3px rgba(0,0,0,.25)); }

.stage .pin { width: 52px; height: 52px; flex-direction: column; line-height: 1; font-size: 16px; position: relative; }
.stage .pin img { position: absolute; width: 34px; top: -22px; }
.stage.boss .pin { width: 62px; height: 62px; background: radial-gradient(circle at 35% 30%, #FF9C7A, #E8553A 60%, #B83A24); color: #fff; }
.stage.locked .pin { background: #E9E4DA; color: var(--wood); }
.stage.boss.locked .pin { background: #CFC5B8; }
.stage .stars { display: flex; gap: 1px; height: 18px; }
.st { width: 18px; height: 18px; }
.st.off { filter: grayscale(1) brightness(1.6); opacity: .7; }
.stage .label { font-size: 12px; }
.stage.locked .label { opacity: .75; }

.kuina-spot { position: absolute; transform: translate(-50%, -50%); z-index: 2; display: flex; align-items: center; pointer-events: none; }
.kuina-spot img { width: 64px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.3)); animation: bob 2.2s ease-in-out infinite; }
.kuina-spot .bubble { background: #fff; border-radius: 14px; padding: 6px 10px; font-size: 12px; font-weight: 900; line-height: 1.5; box-shadow: var(--shadow); margin-left: 4px; white-space: nowrap; }

/* ロゴと同じ見た目の文字（金色・こげ茶と白の二重ふち・立体の影） */
.game-text, .stage-hero h3, .result h2, .stage-no {
  font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif; font-weight: 900; letter-spacing: .02em;
  color: #FFC81E; background: linear-gradient(#FFF27A 0%, #FFD21F 45%, #F5A400 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(2.5px 0 0 #5A3A1E) drop-shadow(-2.5px 0 0 #5A3A1E) drop-shadow(0 2.5px 0 #5A3A1E) drop-shadow(0 -2.5px 0 #5A3A1E)
          drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 5px 0 rgba(90,58,30,.45));
  -webkit-text-stroke: 0; paint-order: normal; text-shadow: none;
}
.plate { font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif; }
.plate span.pt { color: var(--ink); }

/* 画面が切りかわるとき */
#app > * { animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(10px) scale(.99); } }

/* タイトルの読み込み：シーサーが走る */
.bar { overflow: visible; position: relative; }
.bar i { position: relative; border-radius: 99px; }
.bar i img { position: absolute; right: -26px; top: -34px; width: 48px; animation: hop .5s ease-in-out infinite; }
.loading { color: #fff; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.teacher { position: absolute; right: 0; bottom: -18px; font-size: 11px; color: rgba(255,255,255,.55); padding: 6px; }
.small-links { gap: 4px; }

/* 練習の10問：そろばんの珠 */
.play .dots i { width: 26px; height: 18px; border-radius: 0; border: 0; clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%); background: rgba(255,255,255,.85); box-shadow: none; }
.play .dots i.ok { background: linear-gradient(#FFE27A, var(--bead) 55%, #D79E00); }
.play .dots i.ng { background: linear-gradient(#C9B5A4, var(--wood)); }
.play .dots i.cur { background: #fff; animation: glow 1.4s ease-in-out infinite; }

/* 結果：名所の景色の中で紙吹雪 */
.result-screen::after { background: linear-gradient(rgba(255,248,234,.35), rgba(255,248,234,.82) 45%) !important; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 16px; background: var(--c); border-radius: 3px; animation: fall 3.2s var(--d) ease-in forwards; opacity: .95; }
.confetti i:nth-child(3n) { width: 14px; height: 9px; clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%); border-radius: 0; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .8; } }

/* 地図の上の名所（丸い絵） */
.stage .pin.photo { width: 64px; height: 64px; background-size: cover; background-position: center; border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 0 3px var(--bead); }
.stage.boss .pin.photo { width: 76px; height: 76px; box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 0 4px #E8553A; }
.stage.locked .pin.photo { filter: grayscale(.85) brightness(1.15); opacity: .85; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.stage.boss.locked .pin.photo { background-color: transparent; }
.stage.cleared .pin.photo { box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 0 4px #FFD54A, 0 0 14px 4px rgba(255,220,90,.8); }
.stage .pin .crown { position: absolute; width: 38px; top: -26px; }
.stage .pin .lockmark { position: absolute; width: 26px; top: auto; bottom: -6px; right: -6px; filter: none; }

/* ステージ：名所の景色の中 */
.screen.scene { position: relative; isolation: isolate; background: #9fd8f0; }
.screen.scene::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--scene) center / cover no-repeat; }
.screen.scene::after { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,0) 35%, rgba(255,248,234,.0) 50%, rgba(255,248,234,.55) 100%); }
.scene .head h2 { color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.stage-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; text-align: center; }
.plate { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(#FFD54A, var(--bead)); color: var(--ink); font-weight: 900; font-size: 16px; padding: 6px 18px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 4px 0 #C99400, 0 6px 12px rgba(0,0,0,.2); letter-spacing: .06em; }
.plate img { width: 24px; }
.boss-scene .plate { background: linear-gradient(#FF8A6A, #E8553A); color: #fff; box-shadow: 0 4px 0 #A8381F, 0 6px 12px rgba(0,0,0,.2); }
.stage-hero h3 { font-size: 44px; line-height: 1.25; padding: 4px 8px; transform: rotate(-2deg); white-space: nowrap; }
.mission { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; padding-top: 108px; }
.mission-shisa { position: absolute; top: 0; left: 4px; width: 104px; z-index: 2; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); }
.bubble-top { position: absolute; top: 22px; left: 108px; right: 0; background: #fff; border-radius: 16px; padding: 8px 12px; font-weight: 900; font-size: 14px; box-shadow: var(--shadow); z-index: 2; line-height: 1.5; }
.mission-card { width: 100%; background: rgba(255,253,247,.94); border: 4px solid #fff; border-radius: 22px; padding: 26px 14px 14px; box-shadow: 0 8px 20px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 10px; align-items: center; position: relative; }
.mission-title { position: absolute; top: -16px; background: var(--ink); color: var(--bead); font-weight: 900; padding: 4px 20px; border-radius: 99px; letter-spacing: .2em; border: 3px solid #fff; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.chip { background: var(--cream); border-radius: 12px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chip small { font-size: 11px; color: var(--wood); font-weight: 900; }
.chip b { font-size: 14px; font-weight: 900; text-align: center; line-height: 1.25; }
.goal-line { font-weight: 700; }
.goal-line b { color: #E8553A; font-size: 20px; }
.best { display: flex; align-items: center; gap: 4px; }
.best .st { width: 26px; height: 26px; }
.best small { font-size: 12px; color: var(--wood); font-weight: 900; margin-left: 4px; }
.play-screen::after { background: rgba(255,248,234,.72) !important; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* ステージの説明 */
.intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.stage-no { font-size: 60px; font-weight: 900; line-height: 1; color: var(--bead); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.intro h3 { font-size: 28px; font-weight: 900; }
.boss-label { display: inline-flex; align-items: center; gap: 6px; background: #E8553A; color: #fff; padding: 6px 18px; border-radius: 99px; font-weight: 900; border: 3px solid #fff; box-shadow: var(--shadow); }
.boss-label img { width: 26px; }
.intro .desc { font-size: 18px; font-weight: 700; line-height: 1.6; background: #fff; padding: 10px 20px; border-radius: 16px; box-shadow: var(--shadow); }
.intro .guide { text-align: left; }

/* れんしゅう */
.play { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.dots { display: flex; gap: 5px; justify-content: center; }
.dots i { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.dots i.ok { background: var(--bead); }
.dots i.ng { background: var(--wood); }
.dots i.cur { background: var(--bead-soft); animation: glow 1.4s ease-in-out infinite; }
.stagebox { text-align: center; color: var(--ink); font-size: 14px; font-weight: 700; }
.listen { flex: 1; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.listen .ring { width: 132px; height: 132px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); position: relative; border: 4px solid var(--bead-soft); }
.listen .ring img { width: 104px; }
.listen.on .ring::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 5px solid var(--bead); animation: wave 1.2s ease-out infinite; }
@keyframes wave { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.listen .msg { font-size: 18px; font-weight: 900; }
.answer {
  height: 72px; border-radius: var(--r); background: #fff; border: 4px solid var(--cream-2);
  display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 900; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.answer.ready { border-color: var(--bead); }
.answer .ph { color: var(--cream-2); font-size: 22px; letter-spacing: 0; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { height: 58px; border-radius: 18px; background: #fff; font-size: 28px; font-weight: 900; box-shadow: 0 4px 0 rgba(90,70,54,.22); font-variant-numeric: tabular-nums; }
.pad button:active { transform: translateY(3px); box-shadow: none; }
.pad .del { font-size: 18px; color: var(--wood); }
.pad .go { background: linear-gradient(#FFD54A, var(--bead)); font-size: 20px; box-shadow: 0 4px 0 #C99400; }
.pad .go:disabled { background: var(--cream-2); color: var(--wood); box-shadow: none; }

/* こたえあわせ */
.sheet { position: fixed; inset: 0; background: rgba(40,30,20,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet .in { width: 100%; max-width: 520px; background: var(--cream); border-radius: 28px 28px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; animation: up .2s ease-out; border-top: 4px solid #fff; }
.sheet .in.good { background: linear-gradient(#FFF3C4, var(--cream)); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-shisa { width: 110px; margin-top: -70px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.sheet .verdict { font-size: 36px; font-weight: 900; color: #FF8A3D; -webkit-text-stroke: 1px #fff; }
.sheet .verdict.ng { color: var(--ink); }
.sheet .ans { font-size: 18px; }
.sheet .ans b { font-size: 30px; }
.sheet .q { color: var(--wood); font-size: 15px; letter-spacing: .04em; word-spacing: .3em; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.earn { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 22px; background: #fff; border-radius: 99px; padding: 2px 14px 2px 4px; box-shadow: var(--shadow); }
.earn img { width: 34px; }
.earn.big { font-size: 28px; flex-wrap: wrap; justify-content: center; }
.earn small { font-size: 13px; color: #FF8A3D; width: 100%; }

/* けっか */
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.result-shisa { width: 150px; animation: bob 1.6s ease-in-out infinite; }
.bigstars { display: flex; gap: 8px; }
.bigstars .st { width: 64px; height: 64px; }
.result h2 { font-size: 48px; padding: 4px 8px; }
.result .score { font-size: 20px; }
.result .score b { font-size: 34px; }
.actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; margin-top: 6px; }
.letter { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow); text-align: left; border: 3px dashed var(--bead); }
.letter img { width: 54px; }
.letter p { font-size: 14px; line-height: 1.6; }
.pop { animation: pop .5s cubic-bezier(.3,1.6,.6,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

.logo-box h1 .logo { width: min(92vw, 470px); display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); animation: bob 3s ease-in-out infinite; }
.area .pin img.medal { width: 52px; }
.area.cleared .pin { width: 56px; height: 56px; background: none; border: 0; box-shadow: none; }
.golden { position: absolute; width: 18%; transform: translate(-50%, -50%); filter: drop-shadow(0 0 10px rgba(255,220,100,.9)); animation: bob 2.4s ease-in-out infinite; z-index: 2; }
.medal-big { width: 140px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.coming-map .bg { filter: saturate(.8); }
.veil { position: absolute; inset: 30% 8% auto; background: rgba(255,255,255,.93); border-radius: 22px; padding: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow); border: 4px solid #fff; }
.veil img { width: 120px; }
.veil b { font-size: 20px; font-weight: 900; }
.veil p { line-height: 1.7; font-weight: 700; }

/* 名所カード */
.card { position: relative; background: #fff; border-radius: 14px; padding: 6px 6px 8px; box-shadow: 0 4px 0 rgba(90,70,54,.22); border: 3px solid #fff; display: flex; flex-direction: column; gap: 4px; overflow: hidden; text-align: center; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.card b { font-size: 13px; font-weight: 900; }
.card p { font-size: 14px; line-height: 1.7; text-align: left; padding: 2px 6px; }
.card.big { max-width: 320px; width: 100%; }
.card-get .card.big { max-width: 250px; }
.card.big b { font-size: 18px; }
.card.kira { border-color: var(--bead); background: linear-gradient(135deg, #FFF6C9, #fff 40%, #FFE9F3 60%, #E6F7FF); }
.card.kira::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.75) 45%, rgba(255,240,150,.5) 50%, transparent 65%); background-size: 250% 100%; animation: shine 2.6s linear infinite; pointer-events: none; mix-blend-mode: screen; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.card.unknown { aspect-ratio: .82; justify-content: center; background: repeating-linear-gradient(45deg, #F6EAD2 0 10px, #FBF3E2 10px 20px); color: var(--wood); }
.card.unknown span { font-size: 40px; font-weight: 900; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card-slot { display: block; }
.card-get { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ribbon { background: linear-gradient(#FF9C7A, #E8553A); color: #fff; font-weight: 900; padding: 6px 18px; border-radius: 99px; border: 3px solid #fff; box-shadow: var(--shadow); }
.book-btn { display: flex; align-items: center; gap: 12px; background: linear-gradient(#FFF7DA, #FFE9A8); border: 3px solid #fff; border-radius: 18px; padding: 10px 16px; box-shadow: var(--shadow); text-align: left; }
.book-btn img { width: 48px; }
.book-btn span { display: flex; flex-direction: column; }
.book-btn b { font-size: 18px; font-weight: 900; }
.book-btn small { font-weight: 700; color: var(--wood); }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(5, 1fr); } }

/* せんせい用 */
.test { display: flex; flex-direction: column; gap: 14px; }
.test label { font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
.test input[type=text] { font: inherit; font-size: 20px; padding: 12px; border-radius: 12px; border: 2px solid var(--wood); background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.test input[type=range] { accent-color: var(--bead); }
.test .note { color: var(--wood); font-size: 14px; line-height: 1.6; }

/* タブレット・PC：地図を大きく、横にステータス */
@media (min-width: 900px) {
  #app { max-width: 980px; }
  .screen.ocean { display: grid; grid-template-columns: 1fr 360px; grid-template-areas: "head head" "map hud" "map goal" "map ."; align-content: start; column-gap: 20px; }
  .screen.ocean .head { grid-area: head; }
  .screen.ocean .hud { grid-area: hud; }
  .screen.ocean .goal { grid-area: goal; }
  .screen.ocean .worldmap, .screen.ocean .areamap { grid-area: map; }
  .avatars { grid-template-columns: repeat(6, 1fr); }
}

/* ===== UIキット（ChatGPTで作った部品）を使う ===== */
.screen.sky { background: linear-gradient(rgba(190,235,250,.75), rgba(255,248,234,0) 220px), url(img/ui/paper.webp) 0 0 / 320px repeat, var(--cream); }

/* ボタン：両はしの花はそのまま、真ん中だけ伸びる */
.btn { background: none; border: 0; box-shadow: none; border-style: solid; border-color: transparent;
  border-image: url(img/ui/btn_yellow.webp) 30% 27% fill / 18px 50px / 0 stretch; padding: 0 40px; min-height: 60px; color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.btn:active { transform: translateY(2px); box-shadow: none; border-image-source: url(img/ui/btn_yellow_on.webp); }
.btn.big { min-height: 72px; font-size: 23px; padding: 0 56px; border-image-width: 22px 62px; }
.btn.sub { border-image-source: url(img/ui/btn_cream.webp); box-shadow: none; }
.boss-scene .btn.big { border-image-source: url(img/ui/btn_red.webp); color: #fff; text-shadow: 0 2px 0 rgba(120,30,10,.5); }
.btn:disabled { filter: grayscale(.8); opacity: .55; }
.back { width: 54px; height: 54px; background: url(img/ui/round_cream.webp) center / contain no-repeat; box-shadow: none; font-size: 26px; padding-bottom: 2px; }

/* 吹き出し */
.guide p, .kuina-spot .bubble { background: none; box-shadow: none; border-radius: 0; border-style: solid; border-color: transparent;
  border-image: url(img/ui/bubble_left.webp) 26% 20% 34% 20% fill / 16px 18px 26px 18px; padding: 8px 14px 20px; }
.guide p::before { display: none; }
.bubble-top { background: none; box-shadow: none; border-radius: 0; border-style: solid; border-color: transparent;
  border-image: url(img/ui/bubble_down.webp) 26% 22% 34% 22% fill / 16px 20px 24px 20px; padding: 8px 14px 20px; }

/* 札（リボン） */
.plate { background: url(img/ui/plate_yellow.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; border-radius: 0;
  min-width: 250px; height: 82px; justify-content: center; padding: 0 60px 14px; font-size: 18px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.boss-scene .plate { background-image: url(img/ui/plate_red.webp); color: #fff; box-shadow: none; padding-top: 14px; text-shadow: 0 2px 0 rgba(120,30,10,.5); }
.boss-scene .plate img { display: none; }

/* ミッションの板（中の紙は 横12〜88%・縦39〜90%） */
.mission { padding-top: 64px; }
.bubble-top { top: 0; left: 12px; right: auto; max-width: 75%; }
.mission-card { aspect-ratio: 900 / 640; background: url(img/ui/mission.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none; border-radius: 0;
  padding: 26.5% 13% 6.5%; gap: 6px; justify-content: center; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); }
.mission-title { top: 27.5%; transform: translateY(-50%); z-index: 2; background: none; border: 0; color: var(--ink); font-size: 16px; padding: 0; letter-spacing: .25em; }
.chips { gap: 4px; }
.chip { background: rgba(255,255,255,.55); padding: 3px 2px; }
.chip b { font-size: 13px; }
.goal-line { font-size: 14px; }
.goal-line b { font-size: 17px; }
.best .st { width: 22px; height: 22px; }

/* 上のステータス */
.hud { background: none; box-shadow: none; border-radius: 0; border-style: solid; border-color: transparent;
  border-image: url(img/ui/status.webp) 45% 7% fill / 18px 26px; padding: 4px 12px 4px 8px; }
.hud-chip { background: url(img/ui/chip_coin.webp) center / 100% 100% no-repeat; width: 96px; height: 38px; padding: 0 8px 0 0; position: relative; justify-content: flex-end; border-radius: 0; }
.hud-chip.flame { background-image: url(img/ui/chip_flame.webp); }
.hud-chip img { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; }
.hud-chip.flame img { width: 20px; left: 6%; }
.hud-chip span { width: 58%; text-align: center; }

/* 答えの枠（そろばん） 中の窓は 横22〜77%・縦63〜88% */
.answer { position: relative; height: auto; aspect-ratio: 900 / 277; background: url(img/ui/answer_frame.webp) center / 100% 100% no-repeat; border: 0; border-radius: 0;
  align-items: flex-end; padding: 0 24% 3.2%; font-size: 30px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.answer .ph { font-size: 16px; color: var(--wood); }
.answer.ready { filter: drop-shadow(0 0 8px rgba(255,200,30,.9)); }
.play .listen { min-height: 120px; }

/* 数字キー */
.pad button { background: none; box-shadow: none; border-radius: 0; border-style: solid; border-color: transparent;
  border-image: url(img/ui/key.webp) 24% fill / 16px; height: 56px; }
.pad button:active { border-image-source: url(img/ui/key_on.webp); transform: none; }
.pad .go { background: none; box-shadow: none; border-image: url(img/ui/btn_yellow.webp) 30% 27% fill / 14px 28px; font-size: 18px; }
.pad .go:disabled { background: none; filter: grayscale(.9); opacity: .5; }

/* 10問の進み具合：そろばんの珠 */
.play .dots i { width: 28px; height: 21px; clip-path: none; background: url(img/ui/bead_pale.webp) center / contain no-repeat; }
.play .dots i.ok { background-image: url(img/ui/bead_gold.webp); }
.play .dots i.ng { background-image: url(img/ui/bead_wood.webp); }
.play .dots i.cur { background-image: url(img/ui/bead_pale.webp); background-color: transparent; }

/* 名所カード（枠の絵の窓は 横15〜85%・縦24〜77%、名前の札は 縦83〜95%） */
.card-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.card { aspect-ratio: 702 / 900; width: 100%; background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; overflow: visible; filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.card .pic { position: absolute; left: 15%; top: 24%; width: 70%; height: 53%; object-fit: cover; border-radius: 4px; aspect-ratio: auto; }
.card .frame { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; object-fit: fill; }
.card b { position: absolute; left: 15%; right: 15%; top: 83%; height: 12%; display: flex; align-items: center; justify-content: center; font-size: clamp(9px, 3.2vw, 14px); line-height: 1.1; white-space: nowrap; }
.card.kira { background: none; border: 0; }
.card.kira::after { inset: 24% 15% 23%; border-radius: 4px; }
.card.unknown { background: none; color: var(--wood); }
.card.unknown .q { position: absolute; left: 15%; top: 24%; width: 70%; height: 53%; display: grid; place-items: center; font-size: 40px; font-weight: 900; background: repeating-linear-gradient(45deg, #F6EAD2 0 10px, #FBF3E2 10px 20px); }
.card-wrap.big .card { max-width: 230px; }
.card-wrap .fact { background: rgba(255,253,247,.95); border-radius: 16px; padding: 10px 14px; line-height: 1.7; font-size: 14px; max-width: 320px; box-shadow: var(--shadow); text-align: left; }
.card-get .card.big, .card.big { max-width: none; }
.card-wrap.big b { font-size: 16px; }

/* 結果：お祝いの帯 */
.banner-wrap { width: min(340px, 92%); aspect-ratio: 900 / 285; background: url(img/ui/banner.webp) center / 100% 100% no-repeat; display: grid; place-items: center; padding-bottom: 6%; }
.banner-wrap h2 { font-size: 40px !important; }
.course, .book-btn, .goal { background: none; box-shadow: none; border-radius: 0; border-style: solid; border-color: transparent;
  border-image: url(img/ui/key.webp) 24% fill / 22px; filter: drop-shadow(0 4px 4px rgba(90,70,54,.25)); }
.course { padding: 16px 18px; }
.play .dots i.cur { animation: beadglow 1.2s ease-in-out infinite; box-shadow: none; }
@keyframes beadglow { 50% { filter: drop-shadow(0 0 5px rgba(255,210,60,1)); transform: scale(1.15); } }
.listen .ring { background: url(img/ui/round_gold.webp) center / contain no-repeat; border: 0; box-shadow: none; width: 170px; height: 150px; }
.listen .ring img { width: 92px; margin-top: 4px; }
.listen.on .ring::after { inset: 4px 26px; }
.sheet .in { background: url(img/ui/paper.webp) 0 0 / 320px repeat, var(--cream); border-top: 0; box-shadow: 0 -6px 20px rgba(0,0,0,.25); }
.sheet .in.good { background: linear-gradient(rgba(255,236,150,.6), rgba(255,248,234,0) 60%), url(img/ui/paper.webp) 0 0 / 320px repeat, var(--cream); }
.sheet .verdict.game-text { font-size: 44px; padding: 2px 8px; }
.sheet .verdict.ng { font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif; font-size: 36px; color: var(--ink); -webkit-text-stroke: 0; text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff; }
.sheet .ans b { font-family: "M PLUS Rounded 1c", sans-serif; font-size: 36px; color: #E8553A; }
.card .pic, .card.unknown .q { left: 13.5%; top: 22.5%; width: 73%; height: 56%; border-radius: 0; }
.card.kira::after { inset: 22.5% 13.5% 21.5%; }

/* ===== 全体マップ：画面いっぱい ===== */
.screen.ocean.world { background: linear-gradient(#2154B8 0%, #1F6FB4 60%, #2A7FAE 100%); padding-bottom: 0; }
.world .head h2.game-text { font-size: 24px; color: #FFC81E; text-shadow: none; }
.world .worldmap { width: calc(100% + 32px); margin: 0 -16px; aspect-ratio: 1024 / 1290; border: 0; border-radius: 0; box-shadow: none;
  -webkit-mask-image: linear-gradient(transparent 0, #000 5%, #000 97%, transparent 100%); mask-image: linear-gradient(transparent 0, #000 5%, #000 97%, transparent 100%); }
.world .worldmap .bg { height: auto; top: 0; border-radius: 0; object-fit: fill; }
.world .goal { padding: 6px 14px; }
.area .pin.medal-pin { width: 60px; height: 60px; background: none; border: 0; box-shadow: none; }
.area .pin.medal-pin img { width: 60px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.35)); }
.area.locked .pin.medal-pin { width: 46px; height: 46px; }
.area.locked .pin.medal-pin img { width: 46px; filter: grayscale(1) brightness(1.15) drop-shadow(0 3px 2px rgba(0,0,0,.3)); opacity: .9; }
.area.now .pin.medal-pin { animation: medalglow 1.6s ease-in-out infinite; }
@keyframes medalglow { 50% { filter: drop-shadow(0 0 12px rgba(255,230,120,1)); transform: scale(1.08); } }
.area.cleared .pin.medal-pin img { filter: drop-shadow(0 0 8px rgba(255,220,90,.9)); }
.area .label { background: url(img/ui/plate_yellow.webp) center / 100% 100% no-repeat; box-shadow: none; border-radius: 0; padding: 4px 22px 9px; font-size: 13px; }
.area .label small { color: var(--ink); }
.area.locked .label { filter: grayscale(.6); font-size: 12px; padding: 3px 18px 8px; }
.area.coming .cloud { width: 52px; }
.airport-go { flex-direction: column; gap: 0; }
.airport-go img { width: 74px; }
.goal-plate { background: url(img/ui/plate_red.webp) center / 100% 100% no-repeat; color: #fff; font-weight: 900; font-size: 15px; padding: 12px 34px 10px; white-space: nowrap; text-shadow: 0 2px 0 rgba(120,30,10,.5); }
.world .golden { width: 20%; }

/* 合言葉・だれが たびする？ */
.err-msg { color: var(--miss); font-weight: 900; min-height: 1.4em; text-align: center; }
.note-small { color: var(--wood); font-size: 13px; line-height: 1.7; text-align: center; }
.kids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kid { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-style: solid; border-color: transparent;
  border-image: url(img/ui/key.webp) 24% fill / 22px; filter: drop-shadow(0 4px 4px rgba(90,70,54,.2)); }
.kid img { width: 96px; }
.kid b { font-size: 18px; font-weight: 900; }
.kid.add span { width: 96px; height: 96px; display: grid; place-items: center; font-size: 48px; font-weight: 900; color: var(--wood); border: 4px dashed var(--cream-2); border-radius: 50%; }
.kid:active { transform: translateY(2px); }

/* おまけの島めぐり */
.islands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.isle { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; border-style: solid; border-color: transparent;
  border-image: url(img/ui/key.webp) 24% fill / 18px; filter: drop-shadow(0 4px 4px rgba(90,70,54,.2)); }
.isle > img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.isle b { font-size: 14px; font-weight: 900; }
.isle small { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; font-size: 14px; }
.isle small img { width: 18px; }
.isle.done > img { box-shadow: 0 0 0 3px var(--bead), 0 0 12px rgba(255,210,60,.9); }
.isle.done small { color: #E8553A; }
.isle.far { filter: grayscale(.9) opacity(.6); }
.isle-big { width: 70%; max-width: 260px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.isle-name { font-size: 30px; padding: 2px 6px; }
.island-btn img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.sheet .in { max-height: 92dvh; overflow-y: auto; }

/* ===== 島の旅の地図 ===== */
.screen.ocean.sea { background: linear-gradient(#1E86C8, #1B6FB0 40%, #155A98); }
.sea .head h2.game-text { font-size: 26px; }
.voyage { display: flex; flex-direction: column; align-items: center; padding: 10px 0 30px; position: relative;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0 / 46px 46px; }
.voy-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 62%; }
.voy-node.l { align-self: flex-start; }
.voy-node.r { align-self: flex-end; }
.isle-ring { position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.3); background: #2A8FD0; display: grid; place-items: center; }
.isle-ring .isle-pic { width: 100%; height: 100%; object-fit: cover; }
.isle-ring .q { color: #fff; font-size: 44px; font-weight: 900; }
.isle-ring .cloud { position: absolute; width: 80%; opacity: .95; }
.voy-node.locked .isle-ring { filter: grayscale(.7) brightness(1.1); }
.voy-node.cleared .isle-ring { border-color: #FFD54A; box-shadow: 0 0 0 4px rgba(255,213,74,.6), 0 0 18px rgba(255,220,90,.9); }
.voy-node.now .isle-ring { animation: medalglow 1.6s ease-in-out infinite; }
.voy-node .label { background: url(img/ui/plate_yellow.webp) center / 100% 100% no-repeat; padding: 6px 30px 14px; min-width: 150px; font-weight: 900; font-size: 14px; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.voy-node .label small { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--ink); }
.voy-node .label small img { width: 13px; }
.voy-node.locked .label { filter: grayscale(.6); }
.voy-node .me { bottom: auto; top: -30px; right: 8%; }
.voy-link, .voy-start { display: flex; align-items: center; gap: 4px; color: #fff; font-weight: 900; font-size: 13px; padding: 10px 0; text-shadow: 0 1px 2px rgba(0,0,0,.5); position: relative; }
.voy-link::before { content: ""; position: absolute; left: 50%; top: -14px; bottom: -14px; border-left: 4px dotted rgba(255,255,255,.7); z-index: -1; }
.voy-link svg, .voy-start svg { width: 40px; height: 26px; }
.voy-link img { width: 34px; }
.voy-link.l { transform: rotate(-8deg); }
.voy-link.r { transform: rotate(8deg); }
.voy-goal { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.voy-goal img { width: 150px; filter: drop-shadow(0 0 12px rgba(255,220,100,.9)); animation: bob 2.4s ease-in-out infinite; }
.course img { border-radius: 50%; width: 76px; height: 76px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }

/* おみやげ屋さん */
.store { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ware { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-style: solid; border-color: transparent;
  border-image: url(img/ui/key.webp) 24% fill / 18px; filter: drop-shadow(0 4px 4px rgba(90,70,54,.2)); min-height: 150px; }
.ware .omi { width: 70px; height: 70px; object-fit: contain; }
.ware b { font-size: 12px; font-weight: 900; line-height: 1.3; text-align: center; min-height: 2.6em; display: flex; align-items: center; }
.ware small { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; font-size: 14px; }
.ware small img { width: 18px; }
.ware small.short { color: var(--wood); opacity: .7; }
.ware.own small { color: #E8553A; }
.ware.special { border-image-source: url(img/ui/card_kira.webp); border-image-slice: 20% fill; }
.shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 10px 10px 4px; border-radius: 16px;
  background: repeating-linear-gradient(#C99B6A 0 6px, #A9784A 6px 10px, transparent 10px 74px) 0 64px / 100% 74px, linear-gradient(#F3E2C4, #EAD3AE); box-shadow: inset 0 0 0 6px #A9784A, 0 4px 10px rgba(0,0,0,.2); }
.slot { height: 74px; display: grid; place-items: end center; padding-bottom: 10px; }
.slot .omi { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.slot .omi.ghost { filter: brightness(0) opacity(.12); }
.omi.big { width: 160px; height: 160px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.omi-name { font-size: 28px; padding: 2px 6px; }
.shop-btn img { width: 48px; }

/* 海のなかま：地図を泳ぐ */
.swimmer { position: absolute; z-index: 1; width: 64px; left: var(--l); animation: swimx var(--dur) ease-in-out var(--delay) infinite alternate; }
.swimmer img { width: 100%; display: block; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); animation: flip calc(var(--dur) * 2) steps(1) var(--delay) infinite; }
.swimmer.still { animation: none; }
.swimmer.still img { animation: bob 3s ease-in-out infinite; }
@keyframes swimx { from { left: var(--l); } to { left: calc(var(--l) + var(--w)); } }
@keyframes flip { 0% { transform: scaleX(-1); } 50% { transform: scaleX(1); } }
.voyage .swimmer { width: 58px; }
.swim-big { width: 180px !important; height: auto !important; }
.store + .note-small { margin-top: 6px; }
.voy-start { flex-direction: column; }
.voy-ship { width: 130px; animation: bob 2.2s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); }

/* 島の中の画面：正方形の島の絵を切らずに見せる */
.areamap.square { aspect-ratio: 1 / 1; }

/* おみやげ屋さん：名前は言葉の区切り（空白）で折り返す。絵がふちにつかないように */
.ware { border-image-width: 14px; padding: 14px 4px 10px; }
.ware b { font-size: 12px; word-break: keep-all; overflow-wrap: normal; line-height: 1.35; letter-spacing: -.02em; }
.ware .omi { width: 64px; height: 64px; margin-top: 2px; }
/* おみやげ屋さんのタブ：3つとも画面の幅に収める */
.shop .tabs { overflow: visible; gap: 6px; }
.shop .tabs .tab { flex: 1 1 0; padding: 8px 2px; font-size: 13px; text-align: center; white-space: nowrap; }
/* 黄金のシーサー：ほかと同じ木の枠に、金の光 */
.ware.special { border-image-source: url(img/ui/key.webp); border-image-slice: 24% fill; border-image-width: 14px;
  filter: drop-shadow(0 0 6px rgba(255,205,60,.95)) drop-shadow(0 4px 4px rgba(90,70,54,.2)); }
.ware.special .omi { width: 72px; height: 72px; }
.ware.special { grid-column: 1 / -1; width: 60%; justify-self: center; }
.ware.special .omi { width: 96px; height: 96px; }

/* タイトル画面：ロゴに合わせた字 */
.logo-box p { background: url(img/ui/plate_yellow.webp) center / 100% 100% no-repeat; color: var(--ink); border-radius: 0;
  font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 15px;
  padding: 16px 46px 26px; margin-top: 2px; letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(255,255,255,.7); filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.btn { font-family: "M PLUS Rounded 1c", "Zen Maru Gothic", sans-serif; font-weight: 900; letter-spacing: .04em; }
.btn, .btn.sub { color: #5A3A1E;
  text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1.5px 1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px -1.5px 0 #fff, 0 4px 0 rgba(90,58,30,.35); }
.title-foot .btn.big { font-size: 28px; min-height: 80px; padding: 0 70px; border-image-width: 24px 68px; }
.boss-scene .btn.big { color: #fff; text-shadow: 2px 0 0 #7A2A16, -2px 0 0 #7A2A16, 0 2px 0 #7A2A16, 0 -2px 0 #7A2A16, 0 4px 0 rgba(0,0,0,.3); }
.logo-box p { background: none; filter: none; padding: 0; margin-top: 6px; font-size: 19px; line-height: 1.45; color: #fff;
  text-shadow: 2.5px 0 0 #5A3A1E, -2.5px 0 0 #5A3A1E, 0 2.5px 0 #5A3A1E, 0 -2.5px 0 #5A3A1E, 2px 2px 0 #5A3A1E, -2px 2px 0 #5A3A1E, 2px -2px 0 #5A3A1E, -2px -2px 0 #5A3A1E, 0 5px 0 rgba(90,58,30,.45); }

/* タイトル：手書き風のことば */
.logo-box p.catch { font-family: "Klee One", "Zen Maru Gothic", serif; font-weight: 600; font-size: 24px; letter-spacing: .08em; color: #fff;
  margin-top: 4px; padding: 0; background: none; filter: none;
  text-shadow: 0 0 2px #7A5235, 0 0 4px #7A5235, 0 0 6px rgba(122,82,53,.8), 0 3px 8px rgba(0,0,0,.35);
  animation: catchIn 1.6s ease-out .3s both; }
@keyframes catchIn { from { opacity: 0; transform: translateY(6px); } }
.logo-box h1 .logo { animation: logoIn 1.4s ease-out both, bob 6s ease-in-out 1.4s infinite; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* タイトル：朝日の海で しずかに（太陽の光がゆっくりきらめく） */
.title { animation: dawn 2.5s ease-out both; }
@keyframes dawn { from { filter: brightness(.82) saturate(.9); } }
.title::after { content: ""; position: absolute; left: 50%; top: 44%; width: 130%; height: 46%; transform: translateX(-38%);
  background: radial-gradient(ellipse at 62% 18%, rgba(255,236,170,.45), rgba(255,236,170,0) 45%);
  animation: sunbreath 7s ease-in-out infinite; pointer-events: none; }
@keyframes sunbreath { 50% { opacity: .55; } }
.sea-glow { position: absolute; inset: 46% 0 30% 0; pointer-events: none; }
.sea-glow i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 3px rgba(255,248,210,.9);
  opacity: 0; animation: glint 5.5s ease-in-out infinite; }
.sea-glow i:nth-child(1) { left: 58%; top: 10%; animation-delay: 0s; }
.sea-glow i:nth-child(2) { left: 66%; top: 22%; animation-delay: .8s; }
.sea-glow i:nth-child(3) { left: 72%; top: 6%; animation-delay: 1.7s; }
.sea-glow i:nth-child(4) { left: 61%; top: 34%; animation-delay: 2.6s; }
.sea-glow i:nth-child(5) { left: 78%; top: 28%; animation-delay: 3.3s; }
.sea-glow i:nth-child(6) { left: 54%; top: 46%; animation-delay: 4.1s; }
.sea-glow i:nth-child(7) { left: 84%; top: 14%; animation-delay: 2.1s; }
.sea-glow i:nth-child(8) { left: 69%; top: 52%; animation-delay: 4.8s; }
@keyframes glint { 0%, 100% { opacity: 0; transform: scale(.4); } 45% { opacity: .95; transform: scale(1.1); } 60% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .title, .title::after, .sea-glow i, .logo-box h1 .logo, .logo-box p.catch { animation: none !important; } }
.logo-box p.catch { font-size: 27px; letter-spacing: .04em; -webkit-text-stroke: .6px #fff;
  text-shadow: 2px 0 0 #6B4A30, -2px 0 0 #6B4A30, 0 2px 0 #6B4A30, 0 -2px 0 #6B4A30, 1.5px 1.5px 0 #6B4A30, -1.5px 1.5px 0 #6B4A30, 1.5px -1.5px 0 #6B4A30, -1.5px -1.5px 0 #6B4A30, 0 4px 10px rgba(0,0,0,.35); }
.logo-box p.catch { font-size: min(25px, 6.4vw); letter-spacing: .02em; white-space: nowrap; }

/* タイトル画面（ChatGPT で作った部品） */
.title.top { background-position: center bottom; background-size: cover; }
.title.top::before { background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,0) 35%); }
.title.top .logo-box h1 .logo { width: min(94vw, 480px); }
.title.top .sub { display: block; width: min(86vw, 420px); margin: 2px auto 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); animation: catchIn 1.6s ease-out .4s both; }
.top-shisa { position: absolute; left: -2%; bottom: 17%; width: min(58vw, 300px); filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); animation: shisaIn 1.2s ease-out .6s both, breathe 4s ease-in-out 1.8s infinite; transform-origin: bottom center; }
@keyframes shisaIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes breathe { 50% { transform: scale(1.02) translateY(-2px); } }
.start { width: min(84vw, 380px); filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); transition: transform .08s; animation: startPulse 2.6s ease-in-out 2s infinite; }
.start img { width: 100%; display: block; }
.start:active { transform: translateY(3px) scale(.98); }
@keyframes startPulse { 50% { transform: scale(1.03); } }
.title.top .title-foot { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .top-shisa, .start, .title.top .sub { animation: none !important; } }

/* 道のステージ（名所の間）：小さな珠 */
.stage.road { gap: 0; }
.stage.road .bead { width: 40px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.stage.road.now .bead { animation: beadglow 1.2s ease-in-out infinite; width: 46px; }
.stage.road .stars { height: 14px; }
.stage.road .stars .st { width: 13px; height: 13px; }
.stage.road .buddy { left: 70%; top: -30px; width: 48px; }
/* ミッション：このステージで のばす力 */
.focus { display: flex; flex-direction: column; align-items: center; background: linear-gradient(#FFF3C4, #FFE49A); border-radius: 12px; padding: 4px 12px; width: 100%; }
.focus small { font-size: 10px; font-weight: 900; color: var(--wood); }
.focus b { font-size: 16px; font-weight: 900; }

/* くいな：吹き出しは下に（道のステージに重ならないように） */
.kuina-spot { flex-direction: column; }
.kuina-spot img { width: 56px; }
.kuina-spot .bubble { margin: 2px 0 0; font-size: 11px; }

.title.top .teacher { position: absolute; right: 2px; bottom: -6px; padding: 0; width: 96px; opacity: .92; }
.title.top .teacher img { width: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
/* 完成見本に合わせる：シーサーは真ん中に大きく、下にボタン・塾名、右下に せんせい */
.title.top .top-shisa { left: 0; right: 0; margin: 0 auto; bottom: 21%; width: min(78vw, 400px); }
.title.top .title-foot { gap: 6px; }
.title.top .start { width: min(80vw, 380px); }
.title.top .credit { font-size: 15px; letter-spacing: .12em; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.title.top .teacher { right: -4px; bottom: -14px; width: 92px; }
/* 先生の完成見本（863×1823）の位置と大きさに そろえる（画面の高さ・幅に対する割合） */
.title.top { padding: 0; min-height: 100dvh; display: block; }
.title.top .logo-box { position: absolute; top: 7%; left: 0; right: 0; }
.title.top .logo-box h1 .logo { width: 90vw; max-width: 470px; margin: 0 auto; }
.title.top .sub { width: 70vw; max-width: 370px; margin-top: 1.5vh; }
.title.top .top-shisa { bottom: 25%; width: 66vw; max-width: 350px; transform: translateX(-5%); }
.title.top .title-foot { position: absolute; left: 0; right: 0; top: 79%; margin: 0; gap: 2vh; }
.title.top .start { width: 76vw; max-width: 400px; }
.title.top .credit { font-size: min(22px, 5.6vw); font-weight: 900; letter-spacing: .08em; }
.title.top .teacher { position: fixed; right: 3%; bottom: 3%; width: 22vw; max-width: 110px; }
@media (min-width: 521px) { .title.top .teacher { position: absolute; } }
