/* Tilt Rooms: paper dollhouse plan. Cream sheet, ink lines, one red ball. */
.tr{--paper:#e9dfc8;--paper2:#d9cca9;--plate:#f8f1de;--ink:#2b2a33;--ink2:#4d495a;--red:#e0452b;--teal:#1f7a8c;--brass:#c9962b;--blue:#2b5fa8;--gold:#f2c14e;
  color:var(--ink);font-family:"Trebuchet MS","Segoe UI",system-ui,sans-serif;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.tr *{box-sizing:border-box}
.tr h2{font-family:Georgia,"Palatino Linotype",serif;margin:0}
.tr-hud{background:var(--paper);border:3px solid var(--ink);border-bottom:0;border-radius:14px 14px 0 0;padding:.5rem .6rem .35rem}
.tr-hud-top{display:flex;align-items:center;justify-content:space-between;gap:.4rem}
.tr-level{font-family:Georgia,serif;font-size:1.15rem;white-space:nowrap}
.tr-tools{display:flex;gap:6px}
.tr-ico{width:44px;height:44px;border:2px solid var(--ink);border-radius:10px;background:var(--plate);box-shadow:2px 3px 0 var(--ink);display:grid;place-items:center;padding:0;cursor:pointer;color:var(--ink);touch-action:manipulation}
.tr-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tr-ico:active{transform:translate(2px,3px);box-shadow:0 0 0 var(--ink)}
.tr-ico:disabled{opacity:.4;cursor:default}
.tr-ico:focus-visible,.tr-btn:focus-visible,.lv:focus-visible,#cv:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
#b-mute .slash{display:none}
#b-mute.is-off .slash{display:block;stroke:var(--red)}
#b-mute.is-off .wave{display:none}
.tr-stats{display:flex;gap:.9rem;font-size:.9rem;margin-top:.3rem;font-weight:700}
.tr-stats span:last-child{margin-left:auto;font-weight:400;color:var(--ink2)}
.tr-stage{position:relative;min-height:440px;border:3px solid var(--ink);border-radius:0 0 14px 14px;background:var(--paper);overflow:hidden;display:flex;justify-content:center;align-items:flex-start}
#cv{display:block;touch-action:none;max-width:100%;margin:0 auto}
.tr-banner{position:absolute;left:8px;right:8px;bottom:8px;background:var(--ink);color:var(--plate);border-radius:12px;padding:.6rem .75rem;display:flex;gap:.6rem;align-items:center;justify-content:space-between;font-size:.95rem;line-height:1.3;z-index:3}
.tr-banner.bad{background:var(--red)}
.tr-banner-act{display:flex;gap:6px;flex-shrink:0}
.tr-panel{position:absolute;inset:0;background:rgba(233,223,200,.9);display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto;z-index:4;padding-bottom:max(12px,env(safe-area-inset-bottom))}
.tr-panel[hidden],.tr-banner[hidden],.tr-btn[hidden]{display:none}
.tr-card{width:100%;max-width:320px;background:var(--plate);border:3px solid var(--ink);border-radius:16px;box-shadow:5px 6px 0 var(--ink);padding:1.1rem;text-align:center;margin:auto}
.tr-card.wide{max-width:380px;align-self:flex-start}
.tr-card p{margin:.5rem 0;line-height:1.35}
.tr-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}
.tr-mark{font-size:2.4rem;line-height:1;letter-spacing:-.02em}
.tr-mark span{color:var(--red);display:inline-block;transform:rotate(-4deg)}
.tr-small{font-size:.85rem;color:var(--ink2)}
.tr-row{display:flex;gap:8px;margin-top:8px}
.tr-row .tr-btn{flex:1}
.tr-btn{min-height:48px;min-width:48px;padding:.5rem 1rem;border:2px solid var(--ink);border-radius:12px;background:var(--plate);color:var(--ink);font:inherit;font-weight:700;box-shadow:2px 3px 0 var(--ink);cursor:pointer;touch-action:manipulation;width:100%}
.tr-btn:active{transform:translate(2px,3px);box-shadow:0 0 0 var(--ink)}
.tr-btn.main{background:var(--red);color:#fff;font-size:1.15rem;min-height:56px;margin-top:.4rem}
.tr-btn.small{min-height:44px;width:auto;padding:.3rem .8rem;font-size:.9rem}
.tr-banner .tr-btn{background:var(--plate)}
.tr-daily{display:flex;gap:.6rem;align-items:center;margin-bottom:.6rem}
.tr-daily .tr-btn{width:auto;flex-shrink:0}
.tr-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.lv{position:relative;min-height:52px;border:2px solid var(--ink);border-radius:10px;background:var(--plate);color:var(--ink);font:inherit;font-weight:700;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:2px;touch-action:manipulation}
.lv:disabled{opacity:.35;cursor:default;background:var(--paper2)}
.lv.cur{background:var(--gold)}
.medal{display:inline-block;width:12px;height:12px;border-radius:50%;border:2px solid var(--ink);background:var(--paper2)}
.medal.m3{background:var(--gold)}.medal.m2{background:#cfd3d8}.medal.m1{background:#b9784a}
.medal.big{width:56px;height:56px;border-width:3px;box-shadow:inset -5px -5px 0 rgba(43,42,51,.15)}
.tr-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tr-how{margin-top:1rem;font-size:.95rem;line-height:1.45;user-select:text;-webkit-user-select:text}
.tr-how h2{font-size:1.15rem;margin-bottom:.3rem}
@media (max-width:420px){.tr-ico{width:44px}.tr-tools{gap:4px}.tr-level{font-size:1rem}}
@media (prefers-reduced-motion:reduce){.tr *{animation:none!important;transition:none!important}.tr-ico:active,.tr-btn:active{transform:none}}

.tr-stage{background-color:var(--paper);background-image:linear-gradient(rgba(43,42,51,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(43,42,51,.07) 1px,transparent 1px),radial-gradient(ellipse at 50% 40%,rgba(255,250,235,.55),transparent 70%);background-size:24px 24px,24px 24px,100% 100%}
.pace{padding:0 .45rem;border-radius:999px;border:2px solid var(--ink);background:var(--plate)}
.pace.p3{background:var(--gold)}.pace.p2{background:#cfd3d8}.pace.p1{background:#d9a77f}
.pace.bump{animation:trbump .22s ease-out}
@keyframes trbump{0%{transform:scale(1.25)}100%{transform:scale(1)}}
.tr-card{animation:trpop .26s ease-out}
@keyframes trpop{0%{transform:translateY(14px) scale(.96);opacity:0}100%{transform:none;opacity:1}}
.tr-goal{font-weight:700;color:var(--red)}
.tr-goal:empty{display:none}
.tr-stats span:nth-child(2){font-weight:400;color:var(--ink2)}
.tr-stats{flex-wrap:wrap;gap:.2rem .7rem}
.lv .medal{width:14px;height:14px}
.tr-banner{animation:trpop .2s ease-out}

/* Full screen (native and immersive): board fills the stage under the dock */
.game-wrap.pip-stage{display:flex;flex-direction:column;box-sizing:border-box;padding-left:8px;padding-right:8px;padding-bottom:max(6px,env(safe-area-inset-bottom))}
.game-wrap.pip-stage>.tr{flex:1 1 0;min-height:0;display:flex;flex-direction:column;width:100%;max-width:640px;margin:0 auto}
.game-wrap.pip-stage .tr-how,.game-wrap.pip-stage .tr-sr+noscript{display:none}
.game-wrap.pip-stage .tr-hud{flex:0 0 auto;padding:.35rem .5rem .25rem}
.game-wrap.pip-stage .tr-stage{flex:1 1 0;min-height:0;height:auto;align-items:center}
.game-wrap.pip-stage #cv{margin:auto}
@media (orientation:landscape) and (max-height:560px){
  .game-wrap.pip-stage>.tr{flex-direction:row;max-width:none}
  .game-wrap.pip-stage .tr-hud{width:132px;border-bottom:3px solid var(--ink);border-right:0;border-radius:14px 0 0 14px;display:flex;flex-direction:column;justify-content:flex-start;gap:.3rem}
  .game-wrap.pip-stage .tr-hud-top{flex-direction:column;align-items:flex-start}
  .game-wrap.pip-stage .tr-tools{flex-wrap:wrap;gap:4px;width:100%}
  .game-wrap.pip-stage .tr-stage{border-radius:0 14px 14px 0}
}
.tr-stage{box-shadow:inset 0 0 60px rgba(43,42,51,.14)}
