/* ダンゴロン */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fd3ff; color: #2b2340;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer;
  background: #fff; color: #2b2340; box-shadow: 0 4px 0 rgba(43, 35, 64, .25); }
button:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(43, 35, 64, .25); }
button.big { background: linear-gradient(#ff8fb1, #ff5c8a); color: #fff; font-size: 22px; padding: 12px 34px; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
html:not(.touch) .touch-only { display: none !important; }
html.touch .pc-only { display: none !important; }

#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.2); }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.screen.dim { background: rgba(30, 60, 110, .35); }

/* タイトル */
#title { justify-content: flex-start; padding-top: max(5vh, 12px); }
.logo { text-align: center; }
.logo h1 { margin: 0; font-size: clamp(44px, 11vmin, 92px); line-height: 1; letter-spacing: .04em; color: #fff;
  -webkit-text-stroke: 3px #ff5c8a; paint-order: stroke fill; text-shadow: 0 6px 0 #ff5c8a, 0 10px 18px rgba(0,0,0,.18); }
.logo .en { margin: 6px 0 0; font-weight: 800; letter-spacing: .4em; color: #ff5c8a; text-shadow: 0 2px 0 #fff; font-size: clamp(14px, 3.2vmin, 22px); }
#start { margin-top: auto; font-size: 26px; padding: 14px 52px; animation: bob 1.6s ease-in-out infinite; }
.howto { margin: 0 0 4px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.75); font-size: 14px; }
.top { position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); color: #2b2340; text-decoration: none;
  font-weight: 800; background: rgba(255,255,255,.8); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* HUD */
#hud .time { position: fixed; left: max(14px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top));
  font-weight: 800; font-size: 26px; color: #fff; text-shadow: 0 2px 0 rgba(43,35,64,.45), 0 0 8px rgba(43,35,64,.25); font-variant-numeric: tabular-nums; }
#hud .time small { display: block; font-size: 14px; }
#pause { position: fixed; right: max(14px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); width: 46px; height: 46px; padding: 0;
  background: rgba(255,255,255,.85); font-size: 16px; }
#jump { position: fixed; right: max(22px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 112px; height: 112px; padding: 0; font-size: 18px; color: #fff;
  background: radial-gradient(circle at 40% 35%, #ffb3c8, #ff5c8a 70%); border: 4px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 0 rgba(160, 30, 70, .45), 0 8px 18px rgba(0,0,0,.2); opacity: .92; touch-action: none; }
#jump.on { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 rgba(160, 30, 70, .45); }
.keyhint { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.6); font-size: 12px; white-space: nowrap; }
body:not([data-state="play"]):not([data-state="fall"]):not([data-state="countdown"]) #jump { display: none; }

#count { position: fixed; left: 0; right: 0; top: 30%; text-align: center; font-size: clamp(60px, 18vmin, 140px); font-weight: 800; color: #fff;
  -webkit-text-stroke: 4px #3aa0ff; paint-order: stroke fill; pointer-events: none; opacity: 0; }
#count.pop { animation: pop .9s ease-out forwards; }
@keyframes pop { 0% { transform: scale(2); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
#msg { position: fixed; left: 0; right: 0; top: 35%; text-align: center; font-size: clamp(40px, 12vmin, 90px); font-weight: 800; color: #fff;
  -webkit-text-stroke: 4px #6b6bff; paint-order: stroke fill; pointer-events: none; animation: pop 1.5s ease-out forwards; }
#note { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); padding: 10px 16px; border-radius: 14px;
  background: rgba(255,255,255,.95); box-shadow: 0 4px 14px rgba(0,0,0,.18); font-size: 14px; line-height: 1.5; }
#debug { position: fixed; left: 8px; bottom: 6px; margin: 0; font: 12px/1.3 monospace; color: #000; background: rgba(255,255,255,.7); padding: 2px 6px; pointer-events: none; }

#goal { background: none; align-items: flex-end; padding-right: max(24px, env(safe-area-inset-right)); }
#goal .card { width: min(330px, 46%); }
/* カード(ゴール・メニュー) */
.card { background: #fff; border-radius: 24px; padding: 18px 24px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-height: 100%; overflow: auto; }
.card.wide { width: min(560px, 100%); text-align: left; }
.card h2 { margin: 0 0 6px; font-size: 26px; color: #ff5c8a; text-align: center; }
.card h3 { margin: 14px 0 6px; font-size: 15px; color: #3aa0ff; border-bottom: 2px dashed #d9ecff; }
.card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.gtime { font-size: 46px; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }
.best { color: #ff9f1a; font-weight: 800; }
.card p { margin: 4px 0; }
.card label { display: grid; grid-template-columns: 11.5em 1fr 3em; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.card .checks { display: flex; gap: 18px; flex-wrap: wrap; }
.card .checks label { display: flex; gap: 6px; }
.card input[type=range] { width: 100%; accent-color: #ff5c8a; }
.card input[type=checkbox] { width: 20px; height: 20px; accent-color: #ff5c8a; }
.small { font-size: 12px; color: #776; }
.tilt { display: flex; gap: 16px; align-items: center; }
.tilt .pad { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #eef6ff; border: 2px solid #cfe5ff; flex: none; }
.tilt .pad::before { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; border: 2px dashed #9cc9ff; }
#tiltdot { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: #ff5c8a; }
.scroll { touch-action: pan-y; }

/* 紙ふぶき */
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fallc linear forwards; }
@keyframes fallc { to { transform: translateY(110vh) rotate(var(--r)); } }

/* 縦向きの案内 */
#rotate { position: fixed; inset: 0; z-index: 50; background: #8fd3ff; display: grid; place-items: center; text-align: center; color: #2b2340; font-size: 20px; font-weight: 800; }
#rotate .phone { width: 56px; height: 96px; margin: 0 auto 16px; border: 5px solid #2b2340; border-radius: 12px; animation: turn 2s ease-in-out infinite; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

@media (max-height: 420px) {
  #title { gap: 8px; }
  #start { font-size: 22px; padding: 10px 42px; }
  .card { padding: 12px 18px; }
  .gtime { font-size: 36px; }
  #jump { width: 100px; height: 100px; }
}

/* メインメニュー(2026-10-13) */
.mainmenu { margin-top: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.mainmenu #start { margin-top: 0; }
.mainmenu button:not(.big) { font-size: 17px; padding: 12px 22px; }
#settings.side { align-items: flex-end; padding-right: max(24px, env(safe-area-inset-right)); }
#settings .card { width: min(420px, 56%); }
.seg { display: inline-flex; background: #eef6ff; border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { box-shadow: none; background: transparent; padding: 7px 16px; font-size: 15px; color: #6a7a99; }
.seg button.on { background: #ff5c8a; color: #fff; box-shadow: 0 2px 0 rgba(160, 30, 70, .35); }
.senslabel { display: flex; align-items: center; gap: 12px; font-size: 14px; margin: 6px 0; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.color { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; background: #f7f9ff;
  box-shadow: 0 2px 0 rgba(43,35,64,.12); font-size: 13px; border: 3px solid transparent; }
.color i { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 19%), var(--c);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; }
.color.on { border-color: #ff5c8a; background: #fff; }
.color.locked { color: #aab; }
.color.locked i { background: #d5dbe8; }
.newcolor { margin: 8px 0 0; padding: 8px 10px; border-radius: 14px; background: #fff7d6; font-size: 14px; display: grid; gap: 4px; }
.newcolor span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.newcolor i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.newcolor small { color: #998; }
@media (max-height: 420px) { .color { padding: 5px 4px; } .color i { width: 28px; height: 28px; } }
/* アイコン撮影(?debug=1&icon=1)では画面の部品を全部隠す */
html.iconmode .screen, html.iconmode #debug, html.iconmode #hud, html.iconmode #note { display: none !important; }
/* 色はまだ出さない(main.js の COLORS_ON) */
html.nocolors .colorsec, html.nocolors #goal-new { display: none !important; }

/* 縦のまま横に描く(main.js の setRot)。body を回すと、中の position: fixed は body 基準になる */
html.rot body { position: fixed; left: 0; top: 0; width: var(--vh); height: var(--vw); transform-origin: 0 0; }
html.rot.r90 body { transform: translateX(var(--vw)) rotate(90deg); }
html.rot.r270 body { transform: translateY(var(--vh)) rotate(-90deg); }

/* ステージせんたく・星(2026-10-14) */
#stages .card { width: min(620px, 100%); }
#stagelist h3 { margin-top: 4px; }
.stagegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stagebtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; background: #fff7fa;
  border: 3px solid #ffd0de; font-size: 13px; }
.stagebtn b { font-size: 20px; color: #ff5c8a; }
.stagebtn.tut b { font-size: 14px; }
.stagebtn .st { color: #ffb400; letter-spacing: 2px; font-size: 16px; }
.stagebtn small { color: #998; font-variant-numeric: tabular-nums; }
.stagebtn.locked { background: #f1f2f6; border-color: #e1e4ec; color: #aab; }
.stagebtn.locked b { color: #aab; }
.stagebtn.boss { border-color: #ff8a3c; }
.stars { margin: 2px 0; font-size: 40px; line-height: 1; letter-spacing: 6px; }
.stars i { font-style: normal; color: #d8dbe6; display: inline-block; }
.stars i.on { color: #ffb400; text-shadow: 0 2px 0 #e08a00; animation: starpop .45s ease-out both; }
@keyframes starpop { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }
#hud .time small#stagename { font-size: 13px; opacity: .9; }
#goal .card { padding-top: 12px; }
/* ゴールのボタンはいつも見える所に(2026-10-14 ユーザー「ルーレットで装飾ゲットしたあと戻るボタンが出ない」。お知らせ・新しい色・装飾が重なると背が高くなり、ボタンがカードの下にはみ出してスクロールしないと届かなかった) */
#goal .card { padding-bottom: 0; }
#goal .card .row { position: sticky; bottom: 0; background: #fff; margin: 6px -24px 0; padding: 8px 24px 14px; box-shadow: 0 -6px 10px -6px rgba(0,0,0,.12); }
@media (max-height: 420px) { #goal .gtime { font-size: 30px; } #goal .card h2 { font-size: 22px; margin-bottom: 2px; } #goal .newcolor { margin-top: 4px; padding: 5px 8px; font-size: 13px; gap: 2px; } #goal .card p { margin: 2px 0; } }
@media (max-height: 420px) { .stars { font-size: 32px; } .stagebtn { padding: 6px 4px; } .stagebtn b { font-size: 17px; } }

/* つづきから・ライフ・ゲームオーバー(2026-10-14) */
.runrow { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.runbtn b { font-size: 26px; margin: 0 4px; }
.runbtn:disabled { background: #d5dbe8; color: #fff; }
.hearts { color: #ff3b5c; letter-spacing: 1px; }
#hud .time .hearts { font-size: 18px; text-shadow: 0 1px 0 #fff; }
.stagegrid { grid-template-columns: repeat(5, 1fr); }
.stagebtn.nopick { cursor: default; }
.stagebtn.now { border-color: #ff5c8a; box-shadow: 0 0 0 3px #ffd0de; }
.goalmsg { margin: 6px 0 0; padding: 6px 10px; border-radius: 12px; background: #fff7d6; font-weight: 800; font-size: 14px; }
body[data-mode="run"] #restart { display: none; }

/* おんがくを きく(2026-10-14) */
.songs { display: flex; flex-wrap: wrap; gap: 8px; }
.songs button { font-size: 13px; padding: 7px 12px; background: #eef6ff; box-shadow: none; }
.songs button.on { background: #3aa0ff; color: #fff; }

/* タイトルの BGM ON/OFF(ダンゴリンと同じ形) */
.sndchip { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top));
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; font-size: 13px; background: rgba(255,255,255,.85); }
.sndchip svg { width: 17px; height: 17px; }
.sndchip.off { color: #8a8fa3; }
.sndchip.off svg { opacity: .5; }
.sndchip.off span::after { content: " OFF"; } .sndchip:not(.off) span::after { content: " ON"; color: #ff5c8a; }

/* ステージ画面を1画面に収める(2026-10-14 ユーザー「スクロールがうまくいかない、枠が大きい」) */
#stages .stagecard { width: min(640px, 100%); padding: 10px 14px 12px; }
.stagehead { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 6px; }
.stagehead h2 { margin: 0; font-size: 22px; }
.stagehead > button:first-child { position: absolute; left: 0; top: 50%; transform: translateY(-50%); padding: 6px 12px; font-size: 13px; }
.stagehead > button:first-child:active { transform: translateY(-50%) translateY(2px); }
#stagelist h3 { margin: 6px 0 4px; font-size: 13px; }
.runrow { margin-bottom: 2px; gap: 8px; }
.runrow .runbtn { font-size: 17px; padding: 8px 22px; }
.runbtn b { font-size: 20px; }
.runrow button:not(.runbtn) { font-size: 13px; padding: 8px 14px; }
.stagegrid { gap: 6px; }
.stagebtn { padding: 4px 2px; border-radius: 12px; border-width: 2px; gap: 0; box-shadow: 0 2px 0 rgba(43,35,64,.15); }
.stagebtn b { font-size: 16px; line-height: 1.2; }
.stagebtn .st { font-size: 13px; letter-spacing: 1px; line-height: 1.2; }
.stagebtn small { font-size: 11px; line-height: 1.2; }
/* ゲームの画面を回して描いている時は、指の動きも回るので両方向のスクロールを許す */
html.rot .scroll { touch-action: pan-x pan-y; }

/* ゲームオーバーはゴールと同じく右に(左に しょんぼりのダンゴウオ) */
#over { background: none; align-items: flex-end; padding-right: max(24px, env(safe-area-inset-right)); }
#over .card { width: min(330px, 46%); }
#over h2 { color: #6b7bff; }

/* 検証モード(プレイとランキングを同時に押す) */
.testbadge { display: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 3px 10px; border-radius: 999px; background: #6b7bff; color: #fff; font-size: 12px; font-weight: 800; }
html.testmode .testbadge { display: inline-block; }

/* ステージ画面: ワールドを ◀ ▶ で切りかえ(2026-10-14、ワールドが3つ以上になって1画面に入らないため) */
.worldnav { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.worldnav h3 { margin: 0 !important; border: 0 !important; font-size: 15px !important; min-width: 10em; text-align: center; }
.worldnav button { padding: 4px 0; width: 64px; height: 40px; font-size: 22px; line-height: 1; box-shadow: 0 2px 0 rgba(43,35,64,.2); } /* 2026-10-14 ユーザー「左右のボタン小さい」で大きく(前は 4px 14px・14px) */
.worldnav button:disabled { opacity: .3; }
.worldnav .w10 { width: 56px; font-size: 18px; letter-spacing: -3px; } /* 10ワールドずつ(2026-10-18)。左右のはじっこ */
.worldnav .w10l { margin-right: auto; } .worldnav .w10r { margin-left: auto; }

/* セーブしました(左下に小さく) */
#saved { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #2b2340; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.15); pointer-events: none; }
#saved.show { animation: savedin 1.8s ease-out forwards; }
@keyframes savedin { 0% { opacity: 0; transform: translateY(8px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ゴールのカードを横画面の高さに収める(2026-10-14 ユーザー「1-5 クリアで つぎへ が見えない」。ワールドクリアの文で1行ふえてはみ出していた) */
#goal .card { padding: 10px 16px; max-height: calc(100% - 8px); }
#goal .card h2 { font-size: 22px; margin: 0; }
#goal .card p { margin: 1px 0; }
#goal #goal-stage { margin: 0; }
#goal .stars { font-size: 30px; margin: 0; }
#goal .gtime { font-size: 34px; line-height: 1.15; }
#goal #goal-falls, #goal .best { font-size: 13px; }
#goal .goalmsg { font-size: 12px; padding: 4px 8px; margin-top: 3px; }
#goal .card .row { margin-top: 6px; gap: 6px; }
#goal .card .row button { padding: 8px 14px; font-size: 14px; }
#goal .card .row button.big { font-size: 18px; padding: 8px 22px; }
@media (max-height: 360px) {
  #goal .stars { font-size: 24px; } #goal .gtime { font-size: 28px; } #goal .card h2 { font-size: 18px; }
}

/* ステージ名(はじまる時に大きく、ボタンにも小さく) */
#banner { position: fixed; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; z-index: 20;
  font-size: clamp(26px, 8vmin, 54px); font-weight: 800; color: #fff; -webkit-text-stroke: 3px #ff5c8a; paint-order: stroke fill; text-shadow: 0 4px 10px rgba(0,0,0,.2); }
#banner small { display: block; font-size: .5em; -webkit-text-stroke: 2px #ff5c8a; }
#banner.show { animation: bannerin 2.6s ease-out forwards; }
@keyframes bannerin { 0% { opacity: 0; transform: translateY(-14px) scale(.9); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
body[data-state="countdown"] #count { top: 46%; }
.stagebtn .stt { font-style: normal; font-size: 10px; color: #8a7f99; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* ニックネーム */
.who { margin-top: 6px; padding: 6px 16px; font-size: 14px; background: rgba(255,255,255,.88); }
.who .pen { opacity: .6; }
#nameDlg .card { width: min(360px, 100%); }
#nameInput { width: 100%; margin: 8px 0 2px; padding: 10px 14px; font: inherit; font-size: 18px; font-weight: 800; border: 3px solid #ffd0de; border-radius: 14px; outline: none; text-align: center; user-select: text; -webkit-user-select: text; }
#nameInput:focus { border-color: #ff5c8a; }
#nameSave:disabled { opacity: .5; }

/* ランキング(到達ステージ) */
#rank .rankcard { width: min(520px, 100%); display: flex; flex-direction: column; max-height: calc(100% - 8px); padding: 10px 14px; }
.rankhint { text-align: center; margin: 0 0 4px; }
#ranklist { overflow-y: auto; flex: 1; min-height: 0; }
#ranklist ol { list-style: none; margin: 0; padding: 0; }
#ranklist li { display: grid; grid-template-columns: 2.2em 1fr 3.4em 3.4em; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; font-size: 14px; }
#ranklist li:nth-child(odd) { background: #f7f9ff; }
#ranklist li.me { background: #ffe8ef; outline: 2px solid #ff5c8a; }
#ranklist .no { font-weight: 800; color: #3aa0ff; text-align: center; }
#ranklist li:nth-child(1) .no { color: #ffb400; } #ranklist li:nth-child(2) .no { color: #9aa4b8; } #ranklist li:nth-child(3) .no { color: #c98a4a; }
#ranklist .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ranklist .sg { font-weight: 800; color: #ff5c8a; text-align: center; }
#ranklist .sr { color: #ffb400; font-weight: 800; text-align: right; }
/* 名前を押すとプロフィール・1時間以内に遊んだ人は緑の丸(2026-10-14) */
#ranklist button.nm { all: unset; cursor: pointer; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#ranklist .nm .on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fbf5b; margin-left: 6px; vertical-align: 1px; box-shadow: 0 0 0 2px rgba(47,191,91,.25); }
#prof .profcard { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
#prof h2 { margin: 0; overflow-wrap: anywhere; text-align: center; }
#profBody { width: 100%; }
#profBody dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 0; font-size: 15px; }
#profBody dt { color: #7a8299; text-align: left; } #profBody dd { margin: 0; text-align: right; font-weight: 800; }
.proflast { margin: 8px 0 0; text-align: center; font-weight: 800; font-size: 14px; }
.profnote { text-align: center; margin: 4px 0 0; }
#prof .profrep { all: unset; cursor: pointer; font-size: 12px; color: #7a8299; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }

/* ステージのボタンの背景に、そのステージの見どころの画像(2026-10-14 ユーザー指示)。上は画像をそのまま、文字の所だけ白く。
   画像は ::before に敷く(まだ開いていないステージは、うすく ぼかす = ユーザー指示) */
.stagebtn.pic { position: relative; overflow: hidden; isolation: isolate; min-height: 128px; /* 2026-10-18 ユーザー「もう少し縦に」(前は 104px) */ justify-content: flex-end; }
@media (max-height: 420px) { .stagebtn.pic { min-height: 104px; } } /* 前は 88px */
.stagebtn.pic::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,247,250,0) 40%, rgba(255,247,250,.88) 78%), var(--pic); background-size: cover; background-position: center; }
.stagebtn.pic.locked::before { inset: -8px; filter: blur(4px) grayscale(.4); opacity: .45;
  background-image: linear-gradient(rgba(236,238,244,0) 40%, rgba(236,238,244,.9) 78%), var(--pic); }
.stagebtn.pic b { padding: 0 6px; border-radius: 8px; background: rgba(255,255,255,.85); line-height: 1.25; }
.stagebtn.pic .stt { padding: 0 4px; border-radius: 6px; background: rgba(255,255,255,.8); color: #5e5470; font-weight: 700; }

/* ダンゴウオの色は7色(2026-10-14)。2行に収める */
.colors { grid-template-columns: repeat(4, 1fr); gap: 6px; }

/* 右上の小さな地図(2026-10-14 ユーザー指示: 真上から、右上・横 1/6・縦 1/4)。大きさは minimap.js の resize。一時停止ボタンの左 */
#minimap { position: fixed; top: max(10px, env(safe-area-inset-top)); right: calc(max(14px, env(safe-area-inset-right)) + 54px); border-radius: 10px; border: 2px solid rgba(255,255,255,.75); box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none; }

/* 装飾(2026-10-14): かぶり物・目元・模様 各30。小さなボタンをならべる */
#decos h4 { margin: 8px 0 4px; font-size: 14px; color: #6a7a99; }
.decogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 5px; }
.deco { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 12px; background: #f7f9ff; border: 2px solid transparent;
  box-shadow: 0 2px 0 rgba(43,35,64,.12); font-size: 10px; line-height: 1.2; min-width: 0; }
.deco em { font-style: normal; font-size: 22px; line-height: 1.1; }
.deco span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.deco.on { border-color: #ff5c8a; background: #fff; }
.deco.locked { color: #aab; }
.deco.locked em { color: #c8cfdc; font-weight: 800; }
.newdeco em { font-style: normal; font-size: 20px; }
#decocount { font-size: 12px; color: #998; font-weight: 600; }

/* 装飾のルーレット(2026-10-14) */
#roulette { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(20,16,40,.45); }
#roulette[hidden] { display: none; }
#roulette .rbox { width: min(300px, 80%); padding: 14px 16px 12px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: rpop .3s ease-out; }
#roulette .rtitle { margin: 0 0 8px; font-weight: 800; color: #ff5c8a; font-size: 16px; }
#roulette .rwin { margin: 0 auto; width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(#fff7d6, #ffe8a8); border: 4px solid #ffd23f; }
#roulette .rwin em { font-style: normal; font-size: 64px; line-height: 1; }
#roulette.done .rwin { animation: rwin .5s ease-out; border-color: #ff5c8a; box-shadow: 0 0 0 6px #ffd0de, 0 0 30px #ffd23f; }
#roulette .rname { margin: 10px 0 2px; font-size: 16px; min-height: 1.3em; }
#roulette .rname b { color: #ff5c8a; }
#roulette small { color: #998; font-size: 12px; }
@keyframes rpop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes rwin { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-6deg); } 100% { transform: scale(1); } }
@media (max-height: 420px) { #roulette .rwin { width: 84px; height: 84px; } #roulette .rwin em { font-size: 48px; } }

/* 設定は1画面(2026-10-14 ユーザー指示): 上にタブ、スクロールなし */
#settings .setcard { display: flex; flex-direction: column; height: min(100%, 380px); overflow: hidden; padding: 12px 16px; }
.sethead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sethead h2 { margin: 0; font-size: 22px; }
.sethead button { font-size: 14px; padding: 6px 16px; }
.settabs { display: flex; gap: 4px; margin: 8px 0 6px; background: #eef6ff; border-radius: 999px; padding: 3px; }
.settabs button { flex: 1; box-shadow: none; background: transparent; padding: 6px 4px; font-size: 13px; color: #6a7a99; white-space: nowrap; }
.settabs button.on { background: #ff5c8a; color: #fff; }
.setpane { flex: 1; min-height: 0; overflow: hidden; }
.setpane h3 { margin: 6px 0 4px; }
.decotabs { display: flex; gap: 4px; margin-bottom: 6px; }
.decotabs button { flex: 1; box-shadow: none; background: #f2f4fa; padding: 4px 2px; font-size: 13px; color: #6a7a99; border: 2px solid transparent; }
.decotabs button.on { border-color: #ff5c8a; color: #ff5c8a; background: #fff; }
.decotabs small { font-size: 10px; color: #998; }
#settings .decogrid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
#settings .deco { padding: 3px 0; border-radius: 10px; }
#settings .deco em { font-size: 22px; }
#settings .deco span { font-size: 9px; }
#settings .songs { gap: 5px; }
#settings .songs button { font-size: 12px; padding: 5px 9px; }
#settings .colors { gap: 6px; }
#settings .color { padding: 5px 4px; }
#settings .color i { width: 28px; height: 28px; }
@media (max-height: 420px) { #settings .setcard { height: calc(100% - 8px); } .settabs button { padding: 4px 2px; } }
#settings .settabs button[hidden] { display: none; }

/* 設定の中の「きせかえ」「おんがく」ボタン(2026-10-14) */
.setgo { display: flex; gap: 10px; margin-top: 14px; }
.setgo button { flex: 1; font-size: 16px; padding: 10px 8px; }
.setgo button[hidden] { display: none; }
#settings .colorsec[hidden], #decosec[hidden] { display: none; }
#settings .colorsec .colors { grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
#settings .colorsec .color { padding: 3px 1px; font-size: 10px; }
#settings .colorsec .color i { width: 24px; height: 24px; }
#settings [data-pane="kise"] .small { margin: 2px 0 0; min-height: 0; }
