/* TEAM TOWER — 作り込み版（ペーパークラフト建築。よく晴れた昼の空） */
:root {
    --ink: #23324A;
    --mute: #5E6B80;
    --paper: #FFFDF7;
    --cream: #FFF5E2;
    --sky: #BDE6FF;
    --blue: #4AA9FF;
    --blue-d: #2580D6;
    --orange: #FF9F43;
    --orange-d: #E07B1F;
    --mint: #2FC79A;
    --red: #F2504B;
    --gold: #F7C948;
    --shadow: rgba(38, 92, 150, .2);
    --c-movie: #E63946;
    --c-web: #2F9BFF;
    --c-game: #8B5CF6;
    --c-sales: #FFC23C;
    --disp: "Fredoka", "M PLUS Rounded 1c", sans-serif;
    --body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
    background: var(--sky); color: var(--ink);
    font-family: var(--body); font-weight: 700;
    touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none;
}
button { font: inherit; color: inherit; }

/* PC で舞台の外に見える空と紙の雲 */
.tt-backdrop {
    position: fixed; inset: 0; overflow: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(180deg, #59BEFF 0%, #A9DFFF 55%, #EEF9FF 100%);
}
.tt-backdrop i {
    position: absolute; display: block; width: 240px; height: 70px; border-radius: 70px;
    background: #fff; box-shadow: 56px -26px 0 8px #fff, 120px -6px 0 0 #fff, 10px 10px 0 4px rgba(38, 92, 150, .1);
    animation: ttDrift 70s linear infinite;
}
.tt-backdrop i:nth-child(1) { top: 10%; left: -10%; }
.tt-backdrop i:nth-child(2) { top: 38%; left: 72%; transform: scale(1.3); animation-duration: 90s; animation-delay: -30s; }
.tt-backdrop i:nth-child(3) { top: 70%; left: 8%; transform: scale(.8); animation-duration: 80s; animation-delay: -12s; }
.tt-backdrop i:nth-child(4) { top: 22%; left: 42%; transform: scale(.6); animation-duration: 100s; animation-delay: -50s; }
.tt-backdrop i:nth-child(5) { top: 84%; left: 60%; transform: scale(1.1); animation-duration: 85s; animation-delay: -64s; }
@keyframes ttDrift { from { translate: -30vw 0; } to { translate: 110vw 0; } }

.tt-stage {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    overflow: hidden; background: var(--sky); border-radius: 22px;
    box-shadow: 0 0 0 4px #fff, 12px 14px 0 4px var(--shadow), 0 30px 80px rgba(38, 92, 150, .25);
    container-type: size;
}
.tt-stage.tt-full { border-radius: 0; box-shadow: none; }
.tt-stage [hidden] { display: none !important; }
.tt-stage #cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ───── 紙の文字（白＋オレンジのふち＋水色の紙を重ねた影） ───── */
.tt-ptext, .tt-floor, .tt-banner b, .tt-pause-head, .tt-res-head span, .tt-intro-name, .tt-logo-text span {
    color: #fff; -webkit-text-stroke: .1em var(--orange); paint-order: stroke fill;
    text-shadow: 0 .07em 0 var(--orange), 0 .14em 0 var(--blue), .06em .22em 0 var(--shadow);
}

/* ───── HUD ───── */
.tt-hud {
    position: absolute; left: 0; right: 0; top: 0;
    display: flex; align-items: center; gap: 2cqw;
    padding: max(2.4cqw, env(safe-area-inset-top)) 2.6cqw 0;
    pointer-events: none; font-size: clamp(11px, 3.4cqw, 18px);
}
.tt-icon {
    pointer-events: auto; cursor: pointer; flex: none;
    width: max(44px, 2.8em); height: max(44px, 2.8em); border-radius: 14px;
    border: 0; background: var(--paper); box-shadow: 3px 4px 0 var(--shadow);
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.tt-icon span { display: block; width: 5px; height: 16px; border-radius: 2px; background: var(--ink); }
.tt-goal {
    flex: 1; min-width: 0; background: var(--paper); border-radius: 14px; padding: .45em .8em .55em;
    box-shadow: 3px 4px 0 var(--shadow); display: flex; flex-direction: column; gap: .35em;
}
.tt-goal b { font: 800 .9em/1 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-goal i { display: block; height: .55em; min-height: 6px; border-radius: 999px; background: #E3EEF9; overflow: hidden; }
.tt-goal em { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--blue)); transition: width .3s; }
.tt-score { background: var(--paper); border-radius: 14px; padding: .4em .8em .45em; box-shadow: 3px 4px 0 var(--shadow); text-align: right; flex: none; }
.tt-score small { display: block; font: 600 .58em/1 var(--disp); letter-spacing: .14em; color: var(--mute); }
.tt-score b { font: 700 1.25em/1.1 var(--disp); font-variant-numeric: tabular-nums; color: var(--orange-d); }
.tt-floor {
    position: absolute; left: 0; right: 0; top: calc(max(2.4cqw, env(safe-area-inset-top)) + 15cqw);
    display: flex; justify-content: center; align-items: baseline; gap: .04em;
    pointer-events: none; font-family: var(--disp); font-weight: 700;
}
.tt-floor b { font-size: clamp(46px, 17cqw, 96px); line-height: 1; font-variant-numeric: tabular-nums; }
.tt-floor small { font-size: clamp(24px, 8cqw, 46px); line-height: 1; }
.tt-floor span { font-size: clamp(16px, 5.2cqw, 30px); line-height: 1; margin-left: .2em; -webkit-text-stroke: .1em var(--blue); text-shadow: 0 .1em 0 var(--blue-d); }
.tt-floor.pop b { animation: ttPop .32s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ttPop { from { transform: scale(1.4) rotate(-4deg); } }
.tt-combo {
    position: absolute; left: 50%; top: calc(max(2.4cqw, env(safe-area-inset-top)) + 35cqw);
    transform: translateX(-50%) rotate(-3deg); pointer-events: none;
    font: 700 clamp(13px, 4cqw, 22px)/1 var(--disp); letter-spacing: .08em; color: #fff;
    background: var(--orange); padding: .4em .9em .45em; border-radius: 999px; box-shadow: 3px 4px 0 var(--blue);
}
.tt-combo b { font-size: 1.35em; }
.tt-combo.pop { animation: ttCombo .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ttCombo { from { transform: translateX(-50%) rotate(-3deg) scale(1.5); } }
.tt-side { position: absolute; left: 2.6cqw; top: calc(max(2.4cqw, env(safe-area-inset-top)) + 16cqw); display: flex; flex-direction: column; gap: 1.6cqw; pointer-events: none; }
.tt-gim {
    display: flex; align-items: center; gap: .4em; background: var(--paper); border-radius: 999px; padding: .3em .8em .3em .3em;
    font: 800 clamp(11px, 3.2cqw, 16px)/1 var(--body); box-shadow: 3px 3px 0 var(--shadow);
}
.tt-gim em { font: 700 1.2em/1 var(--disp); font-style: normal; color: var(--blue-d); }
.tt-gim.warn { background: #FFF0C7; animation: ttShakeX .3s linear infinite; }
.tt-gim.on { background: #DDF0FF; }
@keyframes ttShakeX { 50% { transform: translateX(3px); } }
.tt-next {
    position: absolute; right: 2.6cqw; top: calc(max(2.4cqw, env(safe-area-inset-top)) + 16cqw);
    display: flex; align-items: center; gap: .45em; pointer-events: none;
    background: var(--paper); border-radius: 999px; padding: .32em .9em .32em .35em; box-shadow: 3px 3px 0 var(--shadow);
    font: 800 clamp(11px, 3.2cqw, 16px)/1 var(--body); white-space: nowrap;
}
.tt-next small { font: 600 .7em/1 var(--disp); letter-spacing: .12em; color: #fff; background: var(--ink); border-radius: 999px; padding: .5em .7em; }
.tt-next i { width: 1em; height: 1em; border-radius: 4px; background: var(--c-movie); flex: none; }
.tt-next.sp { background: #FFF6D8; box-shadow: 3px 3px 0 var(--shadow), inset 0 0 0 2px var(--gold); }
.tt-next.rush span::after { content: " 急ぎ"; color: var(--red); }
.tt-hint {
    position: absolute; left: 0; right: 0; bottom: max(6cqw, env(safe-area-inset-bottom)); margin: 0; text-align: center; pointer-events: none;
    font: 900 clamp(13px, 4cqw, 20px)/1 var(--body); color: var(--ink);
    text-shadow: 0 0 .3em #fff, 0 0 .6em #fff, 0 0 .9em #fff; animation: ttBlinkSoft 1.4s ease-in-out infinite;
}
@keyframes ttBlinkSoft { 50% { opacity: .35; } }
/* 小さなアイコン（専用画像が届くと、そちらに差し替わる） */
[class^="ic-"] { display: inline-block; flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--blue) center / cover no-repeat; position: relative; }
[class^="ic-"]::after { position: absolute; inset: 0; display: grid; place-content: center; color: #fff; font: 700 .9em/1 var(--disp); }
.ic-wind::after { content: "〜"; }
.ic-sway::after { content: "⇆"; }
.ic-rush { background-color: var(--red); }
.ic-rush::after { content: "!"; }
[class^="ic-"].img::after { content: none; }

/* ───── チュートリアルの吹き出し ───── */
.tt-tip {
    position: absolute; left: 3cqw; right: 3cqw; top: calc(max(2.4cqw, env(safe-area-inset-top)) + 47cqw);
    display: flex; gap: 2.4cqw; align-items: center; pointer-events: none;
    animation: ttIn .4s cubic-bezier(.34, 1.56, .64, 1);
}
.tt-tip img { width: 19cqw; height: 19cqw; flex: none; border-radius: 50%; background: var(--paper); object-fit: cover; box-shadow: 3px 4px 0 var(--shadow); border: 3px solid #fff; }
.tt-tip p {
    flex: 1; margin: 0; background: var(--paper); border-radius: 18px; padding: 2.6cqw 3.4cqw; text-align: left;
    font: 800 clamp(13px, 3.8cqw, 19px)/1.6 var(--body); word-break: keep-all; overflow-wrap: anywhere;
    box-shadow: 4px 5px 0 var(--shadow); border: 2px solid #E3EEF9;
}
.tt-tip p b { color: var(--orange-d); }
@keyframes ttIn { from { opacity: 0; transform: translateY(3cqw) scale(.94); } }

/* ───── 告知・ステージのカード ───── */
.tt-banner {
    position: absolute; left: 0; right: 0; top: 21%;
    display: flex; flex-direction: column; align-items: center; gap: .4em;
    pointer-events: none; animation: ttBanner 1.4s ease forwards;
}
.tt-banner.short { animation-duration: .8s; }
.tt-banner small { font: 600 clamp(12px, 3.4cqw, 17px)/1 var(--disp); letter-spacing: .24em; color: var(--blue-d); background: var(--paper); padding: .5em 1.1em; border-radius: 999px; box-shadow: 3px 3px 0 var(--shadow); }
.tt-banner small:empty { display: none; }
.tt-banner b { font: 700 clamp(36px, 13cqw, 70px)/1.1 var(--disp); white-space: nowrap; }
.tt-banner b.ja { font-family: var(--body); font-weight: 900; font-size: clamp(30px, 10.5cqw, 58px); }
@keyframes ttBanner { 0% { opacity: 0; transform: scale(1.5) rotate(-6deg); } 15% { opacity: 1; transform: scale(1) rotate(-2deg); } 78% { opacity: 1; transform: scale(1) rotate(-2deg); } 100% { opacity: 0; transform: scale(.9) translateY(-4cqw); } }
.tt-intro {
    position: absolute; left: 7cqw; right: 7cqw; top: 26%;
    background:
        linear-gradient(rgba(74, 169, 255, .12) 1px, transparent 1px) 0 0 / 14px 14px,
        linear-gradient(90deg, rgba(74, 169, 255, .12) 1px, transparent 1px) 0 0 / 14px 14px, var(--paper);
    border-radius: 22px; padding: 5cqw 5cqw 4.4cqw; text-align: center;
    box-shadow: 8px 10px 0 var(--shadow); animation: ttCard 1.9s ease forwards; pointer-events: none;
}
@keyframes ttCard { 0% { opacity: 0; transform: translateY(-14cqw) rotate(-6deg); } 14% { opacity: 1; transform: translateY(0) rotate(-1.5deg); } 84% { opacity: 1; transform: translateY(0) rotate(-1.5deg); } 100% { opacity: 0; transform: translateY(8cqw) rotate(3deg); } }
.tt-intro p { margin: 0; }
.tt-intro-no { font: 600 clamp(12px, 3.6cqw, 18px)/1 var(--disp); letter-spacing: .3em; color: var(--blue-d); }
.tt-intro-name { font: 900 clamp(32px, 11cqw, 60px)/1.2 var(--body); margin: .15em 0 .2em !important; }
.tt-intro-bld { font: 800 clamp(13px, 4cqw, 20px)/1.4 var(--body); }
.tt-intro-lead { font: 700 clamp(12px, 3.5cqw, 17px)/1.6 var(--body); color: var(--mute); margin-top: .6em !important; word-break: keep-all; }
.tt-intro-gims { display: flex; justify-content: center; gap: 2cqw; margin-top: 3cqw; flex-wrap: wrap; }
.tt-intro-gims span { display: flex; align-items: center; gap: .4em; background: #fff; border-radius: 999px; padding: .3em .8em .3em .3em; font: 800 clamp(11px, 3.2cqw, 15px)/1 var(--body); box-shadow: 2px 3px 0 var(--shadow); }

/* ───── 共通の画面・ボタン ───── */
.tt-screen {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw;
    padding: max(4cqw, env(safe-area-inset-top)) 5cqw max(4cqw, env(safe-area-inset-bottom));
    text-align: center;
}
.tt-screen.tt-in { animation: ttScreen .42s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes ttScreen { from { opacity: 0; transform: translateY(6cqw) rotate(1.5deg) scale(.97); } }
.tt-btn {
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
    min-height: 44px; border-radius: 16px; border: 0; padding: .8em 2em .85em;
    font: 900 clamp(14px, 4.4cqw, 22px)/1.2 var(--body); letter-spacing: .06em; word-break: keep-all;
    transition: transform .12s;
}
.tt-btn:active { transform: translate(2px, 3px); }
.tt-btn-main { color: #fff; background: var(--orange); box-shadow: 0 .3em 0 var(--orange-d), 6px calc(.3em + 6px) 0 var(--shadow); text-shadow: 0 2px 0 var(--orange-d); }
.tt-btn-sub { color: var(--ink); background: var(--paper); box-shadow: 0 .26em 0 #CFE2F5, 5px calc(.26em + 5px) 0 var(--shadow); }
.tt-btn-s { font-size: clamp(12px, 3.5cqw, 17px); padding: .6em 1.1em .65em; }
.tt-btn[disabled] { opacity: .45; pointer-events: none; }
.tt-row { display: flex; gap: 2.4cqw; justify-content: center; flex-wrap: wrap; }
.tt-link { color: var(--mute); font: 800 clamp(12px, 3.4cqw, 16px)/1.4 var(--body); text-decoration: underline; text-underline-offset: .25em; }
.tt-link-btn { background: none; border: 0; cursor: pointer; padding: .6em 1em; min-height: 44px; }
.tt-pill { background: var(--paper); border-radius: 999px; padding: .45em .9em; box-shadow: 3px 3px 0 var(--shadow); font: 800 clamp(12px, 3.4cqw, 16px)/1 var(--body); white-space: nowrap; }
.tt-pill b { font-family: var(--disp); color: var(--orange-d); }

/* ───── タイトル ───── */
.tt-title { justify-content: flex-end; gap: 2.6cqw; padding-bottom: max(4cqw, env(safe-area-inset-bottom)); }
.tt-title-logo { position: absolute; left: 0; right: 0; top: max(11cqw, calc(env(safe-area-inset-top) + 8cqw)); display: flex; justify-content: center; pointer-events: none; }
.tt-logo { width: 88cqw; height: auto; filter: drop-shadow(6px 8px 0 rgba(38, 92, 150, .18)); animation: ttFloat 3.4s ease-in-out infinite; }
@keyframes ttFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-1.6cqw) rotate(1deg); } }
.tt-logo-text { margin: 2cqw 0 0; display: flex; flex-direction: column; align-items: center; line-height: .95; font-family: var(--disp); font-weight: 700; transform: rotate(-3deg); animation: ttFloat 3.4s ease-in-out infinite; }
.tt-logo-text span:first-child { font-size: clamp(34px, 13cqw, 74px); letter-spacing: .12em; -webkit-text-stroke-color: var(--blue); text-shadow: 0 .07em 0 var(--blue), 0 .14em 0 var(--orange), .06em .22em 0 var(--shadow); }
.tt-logo-text span:last-child { font-size: clamp(60px, 23cqw, 128px); letter-spacing: .02em; }
.tt-crew { position: absolute; left: 0; right: 0; top: max(70cqw, calc(env(safe-area-inset-top) + 67cqw)); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 1cqw; pointer-events: none; }
.tt-crew img { width: 19cqw; height: auto; filter: drop-shadow(4px 6px 0 rgba(38, 92, 150, .18)); animation: ttHop 1.6s ease-in-out infinite; }
.tt-crew img:nth-child(2) { animation-delay: -.4s; margin-right: auto; }
.tt-crew img:nth-child(3) { animation-delay: -.8s; margin-left: auto; }
.tt-crew img:nth-child(4) { animation-delay: -1.2s; }
@keyframes ttHop { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-2.4cqw) rotate(2deg); } }
.tt-title-panel {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2.8cqw;
    background: rgba(255, 253, 247, .94); border-radius: 24px; padding: 4.4cqw 4cqw 3.6cqw;
    box-shadow: 8px 10px 0 var(--shadow);
}
.tt-catch { margin: 0; font: 900 clamp(15px, 4.8cqw, 26px)/1.45 var(--body); letter-spacing: .04em; word-break: keep-all; }
.tt-title-panel > .tt-btn-main { font-size: clamp(20px, 6.6cqw, 34px); padding: .6em 3em .65em; animation: ttPulse 1.6s ease-in-out infinite; }
@keyframes ttPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.tt-title-stats { display: flex; gap: 4cqw; justify-content: center; font: 800 clamp(12px, 3.5cqw, 17px)/1 var(--body); color: var(--mute); }
.tt-title-stats b { font-family: var(--disp); color: var(--orange-d); font-size: 1.25em; }
.tt-title-stats i { font-style: normal; }
.tt-note { margin: 0; font-size: clamp(11px, 3cqw, 14px); font-weight: 700; color: var(--mute); line-height: 1.6; word-break: keep-all; }
.tt-demo-tag {
    position: absolute; top: max(3cqw, env(safe-area-inset-top)); left: 3cqw; z-index: 1;
    font: 600 clamp(10px, 2.8cqw, 14px)/1 var(--disp); letter-spacing: .2em; background: var(--ink); color: #fff; padding: .6em 1em; border-radius: 999px;
}
.tt-demo-tag::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--orange); margin-right: .6em; animation: ttBlink 1s steps(2) infinite; }
@keyframes ttBlink { 50% { opacity: 0; } }
.tt-sound {
    position: absolute; top: max(3cqw, env(safe-area-inset-top)); right: 3cqw; z-index: 1; min-height: 44px; min-width: 44px;
    cursor: pointer; border: 0; background: var(--paper); border-radius: 999px; padding: .55em 1em; box-shadow: 3px 3px 0 var(--shadow);
    font: 700 clamp(11px, 3cqw, 15px)/1 var(--disp);
}

/* ───── パネルの画面（ステージ選択・あそびかた・まちなみ・図鑑・結果） ───── */
.tt-panel-screen {
    justify-content: flex-start; overflow-y: auto; touch-action: pan-y; gap: 3cqw;
    background:
        linear-gradient(rgba(74, 169, 255, .1) 1px, transparent 1px) 0 0 / 20px 20px,
        linear-gradient(90deg, rgba(74, 169, 255, .1) 1px, transparent 1px) 0 0 / 20px 20px,
        rgba(240, 249, 255, .96);
    padding-top: max(3cqw, env(safe-area-inset-top));
}
.tt-panel-screen > * { flex: none; }
.tt-topbar { width: 100%; display: flex; align-items: center; gap: 2cqw; justify-content: space-between; }
.tt-back { cursor: pointer; border: 0; width: 44px; height: 44px; border-radius: 14px; background: var(--paper); box-shadow: 3px 4px 0 var(--shadow); font: 700 28px/1 var(--disp); padding-bottom: 4px; }
.tt-screen-title { margin: 0; font: 900 clamp(15px, 5cqw, 28px)/1.2 var(--body); color: var(--ink); letter-spacing: .06em; white-space: nowrap; background: var(--paper); padding: .3em .9em .35em; border-radius: 12px; box-shadow: 0 .16em 0 var(--orange), 4px calc(.16em + 4px) 0 var(--shadow); transform: rotate(-1.5deg); }
.tt-lead { margin: 0; font: 700 clamp(12px, 3.5cqw, 16px)/1.6 var(--body); color: var(--mute); word-break: keep-all; }
.tt-sub-head { margin: 1cqw 0 0; align-self: flex-start; font: 900 clamp(13px, 3.9cqw, 19px)/1.3 var(--body); }
.tt-sub-head b { font-family: var(--disp); color: var(--orange-d); margin-left: .4em; }
.tt-card { width: 100%; background: var(--paper); border-radius: 20px; box-shadow: 6px 8px 0 var(--shadow); text-align: left; }

/* ステージ選択のカード */
.tt-stage-list { width: 100%; display: flex; flex-direction: column; gap: 3.4cqw; padding-bottom: 6cqw; }
.tt-st {
    position: relative; width: 100%; cursor: pointer; border: 0; text-align: left; overflow: hidden;
    background: var(--paper) right bottom / auto 62% no-repeat; border-radius: 20px; padding: 3.2cqw 3.6cqw 3.4cqw;
    box-shadow: 6px 8px 0 var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: .2em 3cqw; align-items: center;
    transition: transform .12s; min-height: 44px;
}
.tt-st:active { transform: translate(2px, 3px); }
.tt-st-no { grid-row: span 3; width: 13cqw; height: 13cqw; border-radius: 14px; display: grid; place-content: center; background: var(--blue); color: #fff; font: 700 clamp(18px, 6.4cqw, 34px)/1 var(--disp); box-shadow: 3px 4px 0 var(--blue-d); }
.tt-st.final .tt-st-no { background: var(--orange); box-shadow: 3px 4px 0 var(--orange-d); }
.tt-st.endless .tt-st-no { background: var(--mint); box-shadow: 3px 4px 0 #1FA67D; font-size: clamp(20px, 7cqw, 38px); }
.tt-st-name { font: 900 clamp(16px, 5cqw, 26px)/1.2 var(--body); }
.tt-st-name small { font: 600 .55em/1 var(--disp); letter-spacing: .16em; color: var(--blue-d); margin-left: .5em; }
.tt-st-bld { font: 700 clamp(11px, 3.3cqw, 15px)/1.3 var(--body); color: var(--mute); }
.tt-st-meta { display: flex; align-items: center; gap: 2.2cqw; flex-wrap: wrap; padding-right: 20cqw; font: 800 clamp(11px, 3.2cqw, 15px)/1 var(--body); }
.tt-st-meta .stars { color: #D8DDE6; letter-spacing: .1em; font-size: 1.2em; }
.tt-st-meta .stars b { color: var(--gold); -webkit-text-stroke: .02em var(--orange-d); }
.tt-st-meta .best { color: var(--mute); }
.tt-st-meta [class^="ic-"] { width: 1.5em; height: 1.5em; font-size: .9em; }
.tt-st.locked { cursor: default; filter: grayscale(.7); opacity: .7; }
.tt-st.locked::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .35); }
.tt-st-lock { position: absolute; right: 3.6cqw; top: 3.2cqw; font: 800 clamp(11px, 3cqw, 14px)/1 var(--body); background: var(--ink); color: #fff; padding: .4em .8em; border-radius: 999px; z-index: 1; }
.tt-st-clear { position: absolute; right: 3.6cqw; bottom: 3.2cqw; font: 700 clamp(11px, 3cqw, 14px)/1 var(--disp); letter-spacing: .1em; background: var(--mint); color: #fff; padding: .4em .8em; border-radius: 999px; transform: rotate(4deg); }

/* あそびかた */
.tt-steps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 2.4cqw; counter-reset: st; }
.tt-steps li { display: flex; align-items: center; gap: 3cqw; text-align: left; background: var(--paper); border-radius: 18px; padding: 2.2cqw 3cqw; box-shadow: 5px 6px 0 var(--shadow); position: relative; }
.tt-steps li::before { counter-increment: st; content: counter(st); position: absolute; left: -1.4cqw; top: -1.8cqw; width: 2em; height: 2em; border-radius: 50%; display: grid; place-content: center; background: var(--orange); color: #fff; font: 700 clamp(11px, 3.2cqw, 16px)/1 var(--disp); box-shadow: 2px 2px 0 var(--orange-d); }
.tt-steps svg { width: 23cqw; flex: none; height: auto; }
.tt-steps p { margin: 0; font: 700 clamp(12px, 3.7cqw, 18px)/1.6 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
.tt-steps b, .tt-depts b, .tt-gimlist b { color: var(--orange-d); }
.tt-gimlist, .tt-depts { width: 100%; text-align: left; }
.tt-gimlist ul, .tt-depts ul { list-style: none; margin: 1.6cqw 0 0; padding: 0; display: grid; gap: 1.6cqw; }
.tt-gimlist li { display: flex; align-items: center; gap: .6em; background: var(--paper); border-radius: 14px; padding: .5em .7em; box-shadow: 3px 4px 0 var(--shadow); font: 700 clamp(11px, 3.3cqw, 16px)/1.4 var(--body); }
.tt-gimlist li span { display: flex; flex-direction: column; }
.tt-depts ul { grid-template-columns: 1fr 1fr; }
.tt-depts li { display: flex; align-items: center; gap: .5em; background: var(--paper); border-radius: 14px; padding: .45em .6em; box-shadow: 3px 4px 0 var(--shadow); font: 700 clamp(12px, 3.3cqw, 15px)/1.3 var(--body); }
.tt-depts li i { flex: none; width: 1.1em; height: 1.1em; border-radius: 4px; }
.tt-depts li span { display: flex; flex-direction: column; min-width: 0; }
.tt-depts li b { color: var(--ink); font-weight: 900; }
.tt-depts li small { color: var(--mute); font-size: max(12px, .85em); }
.tt-depts-note { margin: 2cqw 0 0; font: 700 clamp(12px, 3.5cqw, 17px)/1.6 var(--body); word-break: keep-all; }
.tt-howto > .tt-btn-main { margin: 1cqw 0 5cqw; padding: .65em 3em .7em; font-size: clamp(18px, 6cqw, 30px); }

/* まちなみ */
.tt-city-scroll { width: calc(100% + 10cqw); margin: 0 -5cqw; overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.tt-city-scroll canvas { display: block; height: 110cqw; max-height: 520px; }
.tt-sp-list { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.tt-sp { background: var(--paper); border-radius: 16px; padding: 2.4cqw 1.6cqw; box-shadow: 4px 5px 0 var(--shadow); display: flex; flex-direction: column; align-items: center; gap: .3em; font: 800 clamp(11px, 3.1cqw, 15px)/1.3 var(--body); }
.tt-sp canvas { width: 14cqw; height: 14cqw; }
.tt-sp small { font: 700 .82em/1.3 var(--body); color: var(--mute); }
.tt-sp.off { color: #9AA6B8; }
.tt-sp.perfect { box-shadow: 4px 5px 0 var(--shadow), inset 0 0 0 3px var(--gold); }
.tt-records { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; padding-bottom: 6cqw; }
.tt-records div { background: var(--paper); border-radius: 16px; padding: 2.6cqw 3cqw; box-shadow: 4px 5px 0 var(--shadow); text-align: left; font: 700 clamp(11px, 3.1cqw, 14px)/1.3 var(--body); color: var(--mute); }
.tt-records b { display: block; font: 700 clamp(18px, 6cqw, 30px)/1.2 var(--disp); color: var(--ink); }

/* 職種図鑑 */
.tt-book-list { width: 100%; display: flex; flex-direction: column; gap: 3.4cqw; padding-bottom: 6cqw; }
.tt-job { padding: 3.4cqw 3.8cqw; }
.tt-job-head { display: flex; align-items: center; gap: 3cqw; }
.tt-job-head img { width: 20cqw; height: 20cqw; border-radius: 50%; object-fit: cover; background: var(--cream); flex: none; border: 3px solid #fff; box-shadow: 3px 4px 0 var(--shadow); }
.tt-job-head div { min-width: 0; flex: 1; }
.tt-job-dept { margin: 0; font: 800 clamp(11px, 3cqw, 14px)/1.3 var(--body); color: var(--mute); }
.tt-job-name { margin: .1em 0 .3em; font: 900 clamp(17px, 5.2cqw, 26px)/1.2 var(--body); }
.tt-job-prog { display: flex; align-items: center; gap: .6em; font: 700 clamp(11px, 3cqw, 14px)/1 var(--body); color: var(--mute); }
.tt-job-prog i { flex: 1; height: .7em; border-radius: 999px; background: #E3EEF9; overflow: hidden; }
.tt-job-prog em { display: block; height: 100%; border-radius: inherit; }
.tt-pages { list-style: none; margin: 3cqw 0 0; padding: 0; display: flex; flex-direction: column; gap: 2cqw; }
.tt-pages li { border-radius: 14px; padding: 2.4cqw 3cqw; background: #F6FAFF; border: 2px dashed #CFE2F5; font: 500 clamp(12px, 3.5cqw, 16px)/1.7 var(--body); }
.tt-pages li b { display: block; font-weight: 900; margin-bottom: .2em; }
.tt-pages li.off { color: #9AA6B8; background: #F4F6F9; border-color: #E1E6EE; font-weight: 700; }
.tt-pages li.new { animation: ttNew 1s ease 2; border-color: var(--gold); border-style: solid; }
@keyframes ttNew { 50% { background: #FFF6D8; } }

/* 一時停止 */
.tt-pause { background: rgba(240, 249, 255, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tt-pause-head { margin: 0 0 2cqw; font: 700 clamp(40px, 14cqw, 76px)/1 var(--disp); }
.tt-pause .tt-btn { min-width: 62cqw; }

/* ───── リザルト ───── */
.tt-result { gap: 3cqw; padding-top: max(5cqw, env(safe-area-inset-top)); }
.tt-res-head { height: clamp(90px, 32cqw, 170px); display: flex; align-items: center; justify-content: center; }
.tt-res-head img { height: 100%; width: auto; max-width: 92cqw; animation: ttWord .6s cubic-bezier(.34, 1.56, .64, 1); }
.tt-res-head span { font: 700 clamp(36px, 13cqw, 74px)/1 var(--disp); animation: ttWord .6s cubic-bezier(.34, 1.56, .64, 1); display: inline-block; white-space: nowrap; }
@keyframes ttWord { from { opacity: 0; transform: scale(1.6) rotate(-8deg); } }
.tt-res-stage { margin: -1cqw 0 0; font: 800 clamp(12px, 3.7cqw, 18px)/1.4 var(--body); color: var(--mute); word-break: keep-all; }
.tt-res-tower { width: 100%; display: flex; gap: 3cqw; align-items: stretch; background: var(--paper); border-radius: 20px; padding: 2.6cqw; box-shadow: 6px 8px 0 var(--shadow); }
.tt-res-tower canvas { width: 44cqw; height: 64cqw; flex: none; border-radius: 14px; display: block; background: #CBEBFF; }
.tt-res-stats { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqw; text-align: left; }
.tt-res-stats p { margin: 0; }
.tt-res-floors { display: flex; align-items: baseline; gap: .15em; flex-wrap: wrap; }
.tt-res-floors b { font: 700 clamp(42px, 15cqw, 84px)/1 var(--disp); color: #fff; -webkit-text-stroke: .1em var(--orange); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--blue), .05em .14em 0 var(--shadow); font-variant-numeric: tabular-nums; }
.tt-res-floors small { font: 900 clamp(14px, 4.4cqw, 22px)/1 var(--body); }
.tt-res-m { font: 700 clamp(14px, 4.4cqw, 22px)/1 var(--disp); color: var(--blue-d); }
.tt-res-score small { display: block; font: 600 clamp(10px, 2.8cqw, 13px)/1 var(--disp); letter-spacing: .16em; color: var(--mute); }
.tt-res-score b { font: 700 clamp(22px, 7.4cqw, 38px)/1.1 var(--disp); font-variant-numeric: tabular-nums; color: var(--orange-d); }
.tt-res-best { font: 700 clamp(11px, 3.2cqw, 15px)/1 var(--body); color: var(--mute); }
.tt-res-record { align-self: flex-start; font: 700 clamp(12px, 3.6cqw, 18px)/1 var(--disp); letter-spacing: .06em; color: #fff; background: var(--red); border-radius: 999px; padding: .45em .9em; box-shadow: 3px 3px 0 var(--shadow); animation: ttWord .6s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.tt-res-record img { height: 2.4em; display: block; }
.tt-res-record:has(img) { background: none; box-shadow: none; padding: 0; }
.tt-res-missions { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 1.6cqw; }
.tt-res-missions li { display: flex; align-items: center; gap: 2.4cqw; background: var(--paper); border-radius: 999px; padding: .45em 1em .45em .5em; text-align: left; font: 800 clamp(12px, 3.6cqw, 16px)/1.3 var(--body); box-shadow: 3px 4px 0 var(--shadow); }
.tt-res-missions li i { flex: none; width: 2em; height: 2em; border-radius: 50%; display: grid; place-content: center; background: #E6EBF2; color: #fff; font: 700 1em/1 var(--disp); font-style: normal; }
.tt-res-missions li.done i { background: var(--gold); box-shadow: 0 2px 0 var(--orange-d); }
.tt-res-missions li.show i { animation: ttStar .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ttStar { from { transform: scale(0) rotate(-90deg); } }
.tt-res-missions li span { flex: 1; }
.tt-res-missions li b { font: 700 .8em/1 var(--disp); color: #fff; background: var(--red); border-radius: 999px; padding: .35em .6em; }
.tt-res-btns-top { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2.6cqw; }
.tt-res-btns-top .tt-btn-main { min-width: 80cqw; }
.tt-res-match { width: 100%; background: var(--paper); border-radius: 20px; padding: 3.6cqw 4cqw; text-align: left; box-shadow: 6px 8px 0 var(--shadow); }
.tt-res-lead { margin: 0 0 1.6cqw; font: 800 clamp(12px, 3.6cqw, 17px)/1.4 var(--body); color: var(--mute); }
.tt-res-job { display: flex; align-items: center; gap: 3cqw; }
.tt-res-job img { width: 24cqw; height: 24cqw; border-radius: 50%; object-fit: cover; border: 3px solid #fff; background: var(--cream); flex: none; box-shadow: 4px 5px 0 var(--shadow); }
.tt-res-job > div { min-width: 0; }
.tt-res-type { margin: 0 0 .3em; font: 800 clamp(12px, 3.3cqw, 15px)/1.3 var(--body); color: var(--orange-d); }
.tt-res-name { margin: 0; font: 900 clamp(18px, 5.6cqw, 30px)/1.25 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
.tt-res-reason { margin: 2.6cqw 0 0; font: 800 clamp(13px, 3.8cqw, 18px)/1.65 var(--body); background: #FFF6E3; border-radius: 12px; padding: .6em .8em; }
.tt-res-desc { margin: 2cqw 0 2.4cqw; font: 500 clamp(13px, 3.7cqw, 17.6px)/1.75 var(--body); }
.tt-res-bars-head { margin: 0 0 1.2cqw; font: 800 clamp(12px, 3.2cqw, 14px)/1 var(--body); color: var(--mute); }
.tt-res-bars { display: flex; flex-direction: column; gap: 1.2cqw; }
.tt-res-bar { display: grid; grid-template-columns: 7.4em 1fr 3.4em; align-items: center; gap: .8em; font: 700 clamp(12px, 3.2cqw, 14px)/1 var(--body); }
.tt-res-bar i { height: 1.1em; background: #E3EEF9; border-radius: 999px; overflow: hidden; }
.tt-res-bar em { display: block; height: 100%; border-radius: inherit; width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.tt-res-bar span:last-child { text-align: right; font-family: var(--disp); font-weight: 700; }
.tt-res-bar.top span:first-child { font-weight: 900; color: var(--orange-d); }
.tt-res-unlock { margin: 2.4cqw 0 0; font: 800 clamp(12px, 3.5cqw, 16px)/1.5 var(--body); background: #E6FFF4; border-radius: 12px; padding: .6em .8em; color: #148A65; }
.tt-res-small { margin: 2cqw 0 0; font-size: clamp(12px, 3.2cqw, 13.6px); font-weight: 700; color: var(--mute); line-height: 1.6; }
.tt-res-btns { display: flex; flex-direction: column; gap: 3cqw; align-items: center; padding-bottom: 6cqw; }
.tt-res-btns .tt-btn { min-width: 74cqw; }

/* 紙をめくる切り替え */
.tt-wipe { position: absolute; inset: -10%; background: var(--paper); transform: translateX(-120%) rotate(-6deg); pointer-events: none; box-shadow: 14px 0 0 var(--blue), 26px 0 0 var(--orange); }
.tt-wipe.go { animation: ttWipe .7s cubic-bezier(.7, 0, .3, 1); }
@keyframes ttWipe { 0% { transform: translateX(-120%) rotate(-6deg); } 45%, 55% { transform: translateX(0) rotate(-6deg); } 100% { transform: translateX(130%) rotate(-6deg); } }

/* 読み込み中 */
.tt-loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 2cqw; justify-items: center; background: var(--sky); font: 600 clamp(12px, 3cqw, 15px)/1 var(--disp); letter-spacing: .3em; transition: opacity .4s; }
.tt-loading i { width: 14cqw; height: 4cqw; border-radius: 6px; background: var(--orange); box-shadow: 0 -5cqw 0 var(--blue), 0 -10cqw 0 var(--mint); animation: ttBounce .6s ease-in-out infinite alternate; }
@keyframes ttBounce { to { transform: translateY(-2cqw); } }
.tt-loading.off { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .tt-logo, .tt-logo-text, .tt-title-panel > .tt-btn-main, .tt-backdrop i, .tt-hint, .tt-crew img { animation: none; }
}
