/* Tilt Armies: ink-and-paper war map on a dark desk. */
.ta-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.ta-top h1{font:800 1.25rem Georgia,"Times New Roman",serif;letter-spacing:.14em;text-transform:uppercase;text-align:center;flex:1}
.tbtn,.btn{font:700 .95rem system-ui,sans-serif;min-height:46px;min-width:46px;padding:0 .9rem;border:2px solid #0b0f13;border-radius:8px;background:#eadfc4;color:#2a2418;box-shadow:0 3px 0 #0b0f13;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .08s,box-shadow .08s}
.tbtn:active,.btn:active{transform:translateY(3px);box-shadow:0 0 0 #0b0f13}
.tbtn:focus-visible,.btn:focus-visible,.lv:focus-visible{outline:3px solid #f2b84b;outline-offset:2px}
.btn:disabled{opacity:.45;cursor:default}
.btn.primary{background:#c8452d;color:#fff6e0}
.btn.small{min-height:44px}
.ta-info{display:flex;justify-content:space-between;margin:.55rem 0 .15rem;font:700 .95rem Georgia,serif;letter-spacing:.04em}
#ta-moves.warn{color:#f19a7c}
.ta-note{min-height:2.6em;font-size:.88rem;line-height:1.3;color:#cdbf9c;margin-bottom:.4rem}
.ta-stage{position:relative;display:flex;justify-content:center;align-items:flex-start;min-height:400px;outline:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#ta-canvas{display:block;touch-action:none;max-width:100%;border-radius:10px;box-shadow:0 8px 0 rgba(0,0,0,.35);will-change:transform;cursor:grab}
.ta-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(20,26,32,.72);border-radius:10px;overflow:auto;padding:.6rem;z-index:3;touch-action:pan-y}
.ta-ov[hidden]{display:none}
.card{background:#eadfc4;color:#2a2418;border:3px solid #0b0f13;border-radius:12px;padding:1rem;width:100%;max-width:300px;box-shadow:6px 6px 0 #0b0f13;display:flex;flex-direction:column;gap:.6rem;text-align:center}
.card.wide{max-width:100%;max-height:100%;overflow:auto;text-align:left}
.card h2{font:800 1.3rem Georgia,serif}
.card .logo{font:900 2.6rem/1 Georgia,"Times New Roman",serif;letter-spacing:.12em;color:#c8452d;text-shadow:2px 2px 0 #2a2418}
.card .tag{font-size:.9rem;line-height:1.35}
.card .meta{font-size:.85rem;color:#5d5238}
.card .btn{width:100%}
.card .btn.primary{font-size:1.1rem;min-height:52px}
.row2{display:flex;gap:.5rem}
.row2 .btn{flex:1;padding:0 .4rem}
.bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.lvgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:.4rem}
.lv{min-height:56px;border:2px solid #2a2418;border-radius:8px;background:#f6edd4;color:#2a2418;font:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;touch-action:manipulation}
.lv b{font:800 1rem Georgia,serif}
.lv.cur{background:#f2b84b}
.lv.locked{opacity:.4;cursor:default}
.stars{display:inline-flex;gap:3px;justify-content:center}
.star{width:14px;height:14px;background:#b9a77c;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.star.on{background:#e59a1a}
.card>.stars .star{width:30px;height:30px}
.ta-ctl{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin-top:.8rem}
.ta-how{margin-top:1rem;font-size:.82rem;line-height:1.5;color:#a99f86}
.ta-foot{max-width:420px;margin:1rem auto;padding:0 1rem;font-size:.8rem;color:#8a8270}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* full screen (native or immersive): board fills the stage, extras hidden */
html.pip-immersive .game-header,html.pip-native .game-header,html.pip-immersive .ad-well,html.pip-native .ad-well,html.pip-immersive .ta-how,html.pip-native .ta-how,html.pip-immersive .ta-foot,html.pip-native .ta-foot,html.pip-immersive #similar-games,html.pip-native #similar-games{display:none!important}
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:flex;flex-direction:column;gap:.3rem;padding:.4rem .75rem calc(.4rem + env(safe-area-inset-bottom,0px));overflow:hidden;max-width:none;margin:0;background:#1c2229}
html.pip-native .game-wrap{width:100%;height:100%;padding-top:.5rem}
html.pip-immersive .game-wrap>*,html.pip-native .game-wrap>*{flex:none}
html.pip-immersive .ta-stage,html.pip-native .ta-stage{flex:1 1 0;min-height:0;align-items:center;overflow:hidden}
html.pip-immersive .ta-note,html.pip-native .ta-note{min-height:0;margin:0;font-size:.82rem}
html.pip-immersive .ta-info,html.pip-native .ta-info{margin:.1rem 0}
html.pip-immersive .ta-ctl,html.pip-native .ta-ctl{margin-top:.2rem}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .game-wrap,html.pip-native .game-wrap{display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:auto auto 1fr auto;column-gap:.8rem}
html.pip-immersive .ta-stage,html.pip-native .ta-stage{grid-column:1;grid-row:1/5}
html.pip-immersive .ta-top,html.pip-native .ta-top{grid-column:2;grid-row:1}
html.pip-immersive .ta-info,html.pip-native .ta-info{grid-column:2;grid-row:2}
html.pip-immersive .ta-note,html.pip-native .ta-note{grid-column:2;grid-row:3;overflow:auto}
html.pip-immersive .ta-ctl,html.pip-native .ta-ctl{grid-column:2;grid-row:4;grid-template-columns:1fr}
html.pip-immersive .ta-top h1,html.pip-native .ta-top h1{display:none}
}
/* finish: panel pop-in, soft felt behind the board */
.ta-ov:not([hidden]) .card{animation:taPop .28s cubic-bezier(.2,.9,.3,1.2) both}
@keyframes taPop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
.ta-stage{background:radial-gradient(ellipse at 50% 40%,rgba(234,223,196,.07),transparent 70%)}
