
.tf-page{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;max-width:1150px;padding:22px clamp(10px,3vw,30px) 75px;margin:0 auto;color:#203d55}
.tf-page *{box-sizing:border-box}.tf-crumb{font-size:13px;color:#547386}.tf-crumb a{color:#28758b;text-decoration:underline}
.tf-page h1{font-size:clamp(31px,5vw,49px);letter-spacing:-.04em;line-height:1.1;margin:10px 0;color:#20334c}
.tf-lead{max-width:800px;font-size:16px;line-height:1.58;color:#5c7286}
#tf-game{background:#203653;border:3px solid #253c5c;border-radius:23px;padding:clamp(10px,2vw,18px);color:#f0f9ff;box-shadow:0 18px 40px #162f4c34;position:relative}
.tf-bar{display:flex;align-items:center;gap:7px;justify-content:space-between;flex-wrap:wrap;padding-bottom:12px}
.tf-title{font-size:21px;font-weight:950;letter-spacing:-.02em;color:#fff4c8}
.tf-title small{display:block;font-size:11px;color:#accbdf;letter-spacing:.1em;text-transform:uppercase}
.tf-chips{display:flex;flex-wrap:wrap;gap:5px}
.tf-chip{font-size:12px;font-weight:850;border:1px solid #42617b;background:#183146;border-radius:10px;padding:8px 10px}
.tf-chip b{color:#ffe39c}
.tf-layout{display:grid;grid-template-columns:minmax(0,530px) minmax(250px,1fr);gap:18px;align-items:start}
.tf-scene{position:relative;max-width:530px;margin:auto;width:100%;border:4px solid #476480;border-radius:16px;overflow:hidden;
box-shadow:0 8px 25px #06142476;background:#1d2e46}
#tf-canvas{width:100%;height:auto;aspect-ratio:3/4;display:block;touch-action:none}
.tf-message{position:absolute;left:7px;right:7px;top:9px;text-align:center;z-index:4;pointer-events:none;
text-shadow:0 3px 4px #000e;font-size:13px;font-weight:900;min-height:20px}
.tf-controls{display:grid;grid-template-columns:1fr 1fr 1.2fr 1.2fr;gap:7px;max-width:530px;margin:11px auto 0}
.tf-control{border:1px solid #6682a2;color:white;min-height:65px;appearance:none;touch-action:none;user-select:none;
background:linear-gradient(155deg,#315479,#1e3858);border-radius:14px;font-weight:950;cursor:pointer;font-size:23px;
box-shadow:inset 0 2px #ffffff23,0 4px 0 #0b1f39}
.tf-control span{display:block;font-size:11px;font-weight:800;opacity:.86}
.tf-control:active,.tf-control.tf-active{transform:translateY(2px);box-shadow:inset 0 2px #ffffff20,0 2px 0 #0b1f39;background:#447390}
.tf-control.tf-jump{background:linear-gradient(140deg,#3caaa2,#1c7f81);border-color:#61d5c9}
.tf-control.tf-attack{background:linear-gradient(140deg,#ef9858,#ce5a4b);border-color:#f6c78d}
.tf-side{display:grid;gap:12px}
.tf-card{background:#f6f9f9;border-radius:15px;border:1px solid #b2cfd4;color:#274459;padding:15px}
.tf-card h2{font-size:17px;margin:0 0 9px;color:#1d5773}
.tf-card p{font-size:13px;line-height:1.48;color:#536b7e;margin:0 0 10px}
.tf-card p:last-child{margin:0}
.tf-card button,.tf-card select{border:1px solid #8bb7bd;padding:9px 10px;border-radius:9px;background:#eaf6f3;color:#26566c;
font-weight:800;font:inherit;cursor:pointer;min-height:39px}
.tf-card button:disabled{opacity:.4;cursor:not-allowed}
.tf-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:10px}
.tf-actions button{font-size:12px}
.tf-floor-head{display:flex;justify-content:space-between;align-items:center;gap:5px}
.tf-floor-head select{max-width:160px;font-size:12px}
.tf-floors{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;max-height:245px;overflow:auto}
.tf-floor{min-height:38px!important;padding:5px!important;font-size:12px!important;border-radius:8px!important}
.tf-floor.tf-current{background:#16778c;color:white;border:2px solid #1495a6}
.tf-floor.tf-cleared{background:#ddf6e7}
.tf-floor:focus-visible,.tf-control:focus-visible{outline:3px solid #ffcf6a;outline-offset:2px}
.tf-progress{height:9px;background:#d0e1e2;border-radius:99px;overflow:hidden;margin-top:13px}
.tf-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#1bb5ad,#f4c25a);transition:width .25s}
.tf-small{display:block;margin-top:5px;color:#64818c;font-size:11px;font-weight:800}
.tf-overlay{position:absolute;inset:0;background:#0c1d34d8;z-index:10;display:grid;place-items:center;padding:10px;border-radius:18px}
.tf-overlay[hidden]{display:none!important}
.tf-dialog{border:3px solid #cce3d6;max-width:380px;border-radius:20px;background:#f9fffc;padding:22px;color:#21415a;text-align:center;box-shadow:0 20px 60px #020e1c99}
.tf-dialog .tf-emoji{font-size:55px}
.tf-dialog h2{font-size:24px;margin:8px 0;color:#155e69}
.tf-dialog p{font-size:14px;line-height:1.5;color:#4c6879}
.tf-dialog button{background:#138b87;border:0;color:white;border-radius:10px;font-size:15px;font-weight:900;padding:13px 20px;cursor:pointer}
.tf-links{margin-top:18px;display:flex;gap:15px;flex-wrap:wrap;font-weight:800;font-size:13px}
.tf-links a{color:#2b788d}
@media(max-width:850px){.tf-layout{grid-template-columns:1fr}.tf-side{grid-template-columns:repeat(2,minmax(0,1fr))}.tf-scene{max-width:480px}.tf-controls{max-width:480px}}
@media(max-width:560px){.tf-page{padding:13px 8px 55px}.tf-page h1{font-size:31px}.tf-lead{font-size:14px}#tf-game{padding:8px;border-radius:15px}.tf-title{font-size:18px}.tf-chip{font-size:10px;padding:5px}.tf-chip b{font-size:11px}.tf-scene{border-width:2px}.tf-control{min-height:56px;font-size:21px}.tf-control span{font-size:10px}.tf-side{grid-template-columns:1fr}.tf-card{padding:12px}.tf-message{font-size:11px}.tf-controls{gap:5px}}
@media(prefers-reduced-motion:reduce){.tf-control,.tf-progress span{transition:none}}
