/* A stable canvas prevents Safari browser-bar/fullscreen resize feedback. */
html:has(.tb-shell),body:has(.tb-shell){overscroll-behavior:none;scroll-behavior:auto!important;background-color:#0c181a}
body:has(.tb-shell){background-attachment:scroll!important}
.tb-shell[data-orient]{right:auto;bottom:auto;width:var(--table-viewport-width,100vw);height:var(--table-viewport-height,100svh);isolation:isolate;contain:layout style}
/* Leave the top occupational cards visible; the live scene and resting cards
   share the free tabletop below that row in every landscape size. */
.tb-shell[data-orient="land"] .tb-stage-free{align-items:center;padding:calc(var(--C) + 24px) 0 0;box-sizing:border-box}
.tb-shell[data-orient="land"] .tb-pile{translate:0 7px;padding-bottom:0}
.tb-shell[data-orient="land"].is-opening .tb-stage-free{padding-top:calc(var(--C) + 14px)}
.new-game-options{display:grid;grid-template-columns:1fr 1.2fr;gap:10px;margin-top:18px}
.new-game-options>.btn{min-height:48px;border-radius:0;white-space:normal}
.new-game-choice .help-intro{line-height:1.6;margin:0;color:#d3d9c4}
.new-game-choice small{display:block;margin-top:9px;line-height:1.5;color:#9fb0a4;font-size:11px}
/* Edition31 uses a finished angry portrait, never an additional face mask. */
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot{background:none!important;filter:none!important;box-shadow:none!important}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot::after{content:none!important;display:none!important}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot>img,
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .arena-effects .role-expression-frame.is-redhot>img{filter:none!important}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot>.redhot-face,
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot>.redhot-heat,
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-art.is-redhot>.redhot-expression-v300{display:none!important}
@media(orientation:landscape) and (max-height:500px){
 .tb-shell[data-orient="land"] .tb-stage-free{padding-top:calc(var(--C) + 14px)}
 .tb-shell[data-orient="land"] .tb-pile{translate:0 3px}
}
@media(max-width:420px){.new-game-options{grid-template-columns:1fr}.new-game-options>.btn{min-height:44px}}
/* The same compact paper stamps now separate resources from buffs/debuffs.
   Delayed effects carry a clock; long press retains source, trigger and expiry. */
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-status-rail.is-progress{grid-column:2;grid-row:1;justify-self:center;align-self:start}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-status-rail.is-neutral{grid-row:2}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-status-rail.is-progress i[data-status]{background:#b9d9e3;border-color:#53889d;color:#173d53;white-space:nowrap}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-status-rail.is-progress i>b{font-variant-numeric:tabular-nums;letter-spacing:0}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-status-rail i[data-state-delayed]{position:relative;padding-right:10px}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .status-timer{position:absolute;right:1px;top:1px;font:normal 8px/1 var(--sans);opacity:.9}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .status-detail-group.is-progress{border-color:#74a4b8}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .status-detail-group.is-progress h4{color:#b9d9e3}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) :is(.tb-seat,.tb-me).is-action-original .tb-card{outline:1px dashed #d8d0ad;outline-offset:3px}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) :is(.tb-seat,.tb-me).is-action-relay .tb-plate{box-shadow:inset 0 -2px #ebbc65}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-prompt-primary.is-resolution{color:#ffce8b;font-weight:900}
.tb-shell:is([data-rules-edition="31"],[data-rules-edition="32"]) .tb-prompt-secondary{color:#e5dcc1}
/* Read the real skill name first. The drawing stays inside the existing safe
   theatre; the large name does not need another floating dialog or panel. */
.arena-effects .fx-role-skill.is-readable-skill{--sk-title-accent:#398777}
.arena-effects .fx-role-skill.is-readable-skill[data-skill-context="passive"]{--sk-title-accent:#7b8174}
.arena-effects .fx-role-skill.is-readable-skill[data-skill-context="break"]{--sk-title-accent:#bf4936}
.arena-effects .fx-role-skill.is-readable-skill:not(.fx-role-skill-mini) .sk19-copy{bottom:7px!important;gap:5px;left:4px!important;right:4px!important;align-items:center;text-align:center;transform:none;min-height:52px}
.arena-effects .fx-role-skill.is-readable-skill:not(.fx-role-skill-mini) .sk19-copy strong{font-size:var(--sk-name-size,36px)!important;line-height:1.12;letter-spacing:-.02em;-webkit-text-stroke:1px #142d25;paint-order:stroke fill;text-shadow:2px 3px #142d25,4px 5px var(--sk-title-accent);overflow-wrap:anywhere;opacity:1}
.arena-effects .fx-role-skill.is-readable-skill .fx-skill-meta{font-size:11px!important;line-height:14px;color:#fff0ce}
.arena-effects .fx-role-skill.is-readable-skill.fx-role-skill-mini{min-height:38px}
.arena-effects .fx-role-skill.is-readable-skill .fx-skill-tag{display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;column-gap:7px;row-gap:1px;min-height:50px;padding:5px 11px;background:#f0e0b8;border:1px solid #203c32;box-shadow:3px 3px #142d25}
.arena-effects .fx-role-skill.is-readable-skill .fx-skill-tag>i{grid-column:1;grid-row:1/3;width:24px;height:24px;display:grid;place-items:center;font-size:12px;align-self:center;background:var(--sk-title-accent);color:#fff3d2;border-radius:50%;font-style:normal}
.arena-effects .fx-role-skill.is-readable-skill .fx-skill-tag>b{grid-column:2;font-size:var(--sk-name-size,21px)!important;line-height:1.12;color:#18392e;white-space:normal;overflow:visible;text-overflow:clip;letter-spacing:-.015em;text-shadow:1px 1px #fff5d6,2px 2px #203c3222}
.arena-effects .fx-role-skill.is-readable-skill .fx-skill-tag>small{grid-column:2;font-size:10px;line-height:12px;text-align:left}
.tb-shell[data-rules-edition="32"] .equip-slot.is-cost-choice{outline:2px solid #f1c56a;outline-offset:1px;box-shadow:2px 2px #132e25;cursor:pointer}
@media(orientation:landscape) and (max-height:500px){.arena-effects .fx-role-skill.is-readable-skill:not(.fx-role-skill-mini) .sk19-copy{bottom:4px!important;min-height:46px;gap:3px}.arena-effects .fx-role-skill.is-readable-skill .fx-skill-tag{min-height:44px;padding:3px 10px}}
/* The launch belongs to the chosen table, with profession details below it. */
.lobby-v310 .site-tools{display:flex;align-items:center;gap:8px}
.lobby-v310 .site-tools>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:7px 10px;border:1px solid #6b8980;background:#1b3330;color:#e6ddbf;font:700 12px/1.2 var(--sans);cursor:pointer}
.lobby-v310 .site-tools>button:focus-visible{outline:3px solid #d9bc79;outline-offset:3px}
.lobby-v310 .site-tools .icon{width:17px;height:17px}
.lobby-v310 .setup>.lobby-launch{position:relative;top:auto;z-index:auto;margin:12px 0 22px;padding:12px 14px;gap:12px;box-shadow:3px 3px 0 #a84330}
.lobby-v310 .launch-caption{display:block;min-width:0}
.lobby-v310 .launch-caption strong{display:block;font-size:16px;line-height:1.45;letter-spacing:0;text-shadow:none;overflow-wrap:anywhere}
.lobby-v310 .launch-buttons{flex-direction:column;align-items:stretch;gap:7px}
.lobby-v310 .launch-start{min-height:48px;min-width:148px;padding:10px 13px;font-size:15px;letter-spacing:0}
.lobby-v310 .continue-btn{min-height:28px;align-self:center}
.lobby-v310 .mode-poster,.lobby-v310 .mode-poster:last-child{min-height:106px;padding:12px 13px}
.lobby-v310 .mode-poster-kicker,.lobby-v310 .mode-poster-tag{display:none}
.lobby-v310 .mode-poster strong,.lobby-v310 .mode-poster.active strong{font-size:18px;line-height:1.3}
.lobby-v310 .mode-poster small,.lobby-v310 .mode-poster.active small{font-size:11px;line-height:1.5;margin-top:7px}
@media(max-width:760px){
 .lobby-v310 .setup>.lobby-launch{grid-template-columns:minmax(0,1fr) auto;padding:10px 11px;margin:12px 0 18px;gap:10px}
 .lobby-v310 .launch-caption strong{font-size:14px}
 .lobby-v310 .launch-start{min-width:132px;font-size:14px;padding:9px 11px}
 .lobby-v310 .mode-poster,.lobby-v310 .mode-poster:last-child{min-height:100px;padding:10px}
 .lobby-v310 .mode-poster strong,.lobby-v310 .mode-poster.active strong{font-size:16px}
 .lobby-v310 .mode-poster small,.lobby-v310 .mode-poster.active small{font-size:10px}
}
@media(orientation:landscape) and (max-height:500px){.lobby-v310 .mode-poster,.lobby-v310 .mode-poster:last-child{min-height:92px}.lobby-v310 .setup>.lobby-launch{margin-top:10px;margin-bottom:16px}}
/* One 44px music control; the compact chooser stays above the response hand. */
.tb-shell[data-orient] .tb-music-control{position:relative;display:inline-flex;flex:none;width:44px;height:44px}
.tb-shell[data-orient] .tb-music-control .tb-music-toggle{width:44px;height:44px;min-height:44px;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center;gap:3px}
.tb-music-control .tb-music-toggle b{font-size:19px}.tb-music-control .tb-music-toggle small{font-size:10px;font-weight:900;font-variant-numeric:tabular-nums}
.tb-shell[data-orient] .tb-sys:has(.music-track-popover){z-index:90}
.music-track-popover{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));width:min(244px,calc(100vw - 24px));padding:10px;background:#ead7ae;color:#213d32;border:2px solid #213d32;box-shadow:4px 4px #132f2bd9;z-index:90;text-align:left}
.music-track-popover header{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.music-track-popover header b{font-size:13px}.music-track-popover header button{width:30px;height:30px;min-height:30px;border:0;background:#ad4936;color:#fff2d2;font-size:23px;line-height:1;cursor:pointer}
.music-track-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.music-track-grid button{min-width:0;min-height:34px;padding:0;border:1px solid #7d8266;background:#dfcc9f;color:#244235;font-size:12px;font-weight:900;cursor:pointer}.music-track-grid button.is-selected{background:#315e4d;color:#fff0c5;box-shadow:inset 0 -3px #b99b55}.music-track-popover>small{display:block;font-size:10px;line-height:1.4;margin-top:8px;color:#59664d}
.newbie-entry{display:flex;align-items:center;gap:10px;width:100%;min-height:58px;margin:10px 0 15px;padding:5px 12px 0 5px;border:2px solid #213d32;background:#e6d2a6;color:#213d32;box-shadow:3px 3px #183a2c55;text-align:left;cursor:pointer}
.newbie-entry-art{display:block;width:48px;height:54px;flex:none;overflow:hidden}.newbie-entry-art .role-portrait{width:48px;height:75px;object-fit:contain;object-position:center top}.newbie-entry>span:nth-child(2){display:flex;flex-direction:column;gap:3px}.newbie-entry b{font-size:16px;letter-spacing:.03em;font-weight:950}.newbie-entry small{font-size:11px;color:#59634d}.newbie-entry i{margin-left:auto;align-self:center;font-size:12px;font-style:normal;font-weight:900;color:#a03e2f}
.newbie-lesson{max-width:540px;margin:auto;color:#ead7ae}.newbie-lesson>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.newbie-lesson>header>b{font-size:12px;color:#d6b777}.newbie-lesson>header .text-btn{font-size:12px;min-height:36px}.newbie-rule{font-size:17px;line-height:1.5;font-weight:900;margin:5px 0 12px}.newbie-comic{position:relative;isolation:isolate;height:238px;overflow:hidden;background:#e4cfa1;color:#203c32;border:3px solid #213c32;box-shadow:4px 4px #0b201c;margin-right:4px;background-image:radial-gradient(#31513e22 .7px,transparent .7px);background-size:6px 6px}
.newbie-actor{position:absolute;bottom:-32px;width:116px;height:206px;opacity:.88;z-index:-1}.newbie-actor .role-portrait{width:100%;height:100%;object-fit:contain}.newbie-actor.actor-left{left:-20px;transform:rotate(-8deg)}.newbie-actor.actor-right{right:-23px;transform:rotate(7deg)}.newbie-speech{position:absolute;top:14px;left:14px;z-index:2;padding:5px 10px;background:#f6e8c5;border:2px solid #253f32;box-shadow:3px 3px #284332;font-size:16px;font-weight:950;transform:rotate(-3deg)}
.newbie-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;width:86px;height:117px;padding:4px;border:2px solid #213d32;background:#e9d6ae;color:#213d32;box-shadow:3px 4px #203c3266;cursor:pointer;flex:none;transform:rotate(-4deg)}.newbie-card .card-illustration{width:100%;height:88px;object-fit:contain}.newbie-card b{font-size:12px;line-height:1.3;white-space:normal}.newbie-card.is-picked,.newbie-card.is-result{transform:translateY(-8px) rotate(4deg);border-color:#a64230;box-shadow:4px 5px #af493366}.newbie-comic>.newbie-card{position:absolute;left:calc(50% - 43px);bottom:25px}.newbie-card-row{position:absolute;bottom:32px;left:50%;display:flex;align-items:center;justify-content:center;gap:14px;transform:translateX(-50%)}
.newbie-target{position:absolute;right:15px;top:36px;display:flex;flex-direction:column;align-items:center;border:2px dashed #65775a;background:#d5be8d70;color:#294331;width:83px;height:149px;cursor:pointer}.newbie-target .role-portrait{width:100%;height:116px;object-fit:contain}.newbie-target>span{font-size:13px;font-weight:950}.newbie-target.is-lit{background:#ecdbaf;border-color:#b64932;box-shadow:0 0 0 4px #ad49354d}.newbie-impact{position:absolute;z-index:4;right:22px;top:79px;max-width:75%;font-size:34px;font-weight:1000;font-style:italic;color:#a33c2c;-webkit-text-stroke:.6px #284332;text-shadow:2px 3px #f6e7bf;transform:rotate(-10deg);pointer-events:none}.newbie-impact.is-good{color:#2e7457}.newbie-counter{position:absolute;right:15px;top:14px;font-size:26px;font-weight:950}.newbie-caption{position:absolute;bottom:6px;left:0;right:0;text-align:center;font-size:10px}.newbie-plus{font-size:25px;color:#9f4331}.newbie-material-count{font-size:27px;font-weight:950}.newbie-hp{position:absolute;top:20px;left:calc(50% - 42px);color:#315d43;font-size:16px;font-weight:950}.newbie-worker{position:absolute;left:calc(50% - 65px);bottom:-25px;width:130px;height:228px}.newbie-worker .role-portrait{height:100%;width:100%;object-fit:contain}.newbie-skill{position:absolute;left:10px;top:43px;width:100px;min-height:52px;transform:skewX(-8deg);border:2px solid #254333;background:#47745a;color:#f3dfac;box-shadow:4px 5px #263d3277;font-size:17px;font-weight:950}.newbie-skill>span{display:block;font-size:10px;margin-top:3px}.newbie-gear{position:absolute;right:9px;top:30px;display:flex;flex-direction:column;align-items:center;width:105px;min-height:74px;padding:4px;border:2px solid #314f3e;background:#d2bd8e;color:#284332;cursor:pointer}.newbie-gear .equipment-thumbnail{width:78px;height:40px}.newbie-gear b{font-size:12px}.newbie-gear small{font-size:10px;color:#86651d}.newbie-gear.is-equipped{border-color:#b28d36;box-shadow:0 0 0 3px #ddae4e8c}.newbie-end{position:absolute;right:34px;bottom:23px;width:62px;height:62px;border-radius:50%;border:3px solid #423624;background:#b64632;color:#f7e8bd;box-shadow:0 5px #4e3024;font-weight:950;font-size:13px;line-height:1.25;cursor:pointer}
.newbie-hint{min-height:40px;margin:14px 0 10px;font-size:12px;line-height:1.5;color:#d2d4b5}.newbie-lesson>footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.newbie-lesson>footer .btn{min-height:42px;padding:8px 15px;font-size:12px}.newbie-dots{display:flex;gap:5px}.newbie-dots i{width:6px;height:6px;background:#6b8067;border-radius:50%}.newbie-dots i.is-current{background:#e3bb61}.newbie-note{display:block;text-align:center;color:#aebc9c;font-size:10px;margin-top:12px}
@media(max-width:400px){.newbie-comic{height:214px}.newbie-rule{font-size:15px}.newbie-actor{width:101px;height:189px}.newbie-card{width:79px;height:109px}.newbie-card b{font-size:11px}.newbie-skill{width:84px;left:6px}.newbie-gear{width:92px;right:6px}.newbie-impact{font-size:29px}.newbie-target{right:8px;width:72px}}
@media(orientation:landscape) and (max-height:500px){.newbie-lesson{display:grid;grid-template-columns:minmax(230px,1.1fr) minmax(180px,1fr);gap:6px 18px;max-width:720px}.newbie-lesson>header{grid-column:1/-1}.newbie-rule{grid-column:2;grid-row:2;font-size:16px;margin:0}.newbie-comic{grid-column:1;grid-row:2/5;height:192px}.newbie-hint{grid-column:2;grid-row:3;min-height:0;margin:0}.newbie-lesson>footer{grid-column:2;grid-row:4;align-self:end}.newbie-note{grid-column:1/-1;margin-top:6px}.newbie-actor{height:170px}.newbie-card{width:71px;height:98px}.newbie-target{height:125px;width:70px;top:25px}.newbie-target .role-portrait{height:96px}.newbie-speech{font-size:13px;top:8px}.newbie-skill{width:81px;left:6px;top:25px}.newbie-gear{width:90px;right:6px;top:18px}.newbie-end{width:52px;height:52px;right:24px;bottom:13px}.newbie-impact{font-size:28px;top:65px}.newbie-worker{height:190px}}
.tb-skillbar.is-unavailable{filter:grayscale(.8);opacity:.58;cursor:not-allowed}
.tb-music-control .tb-music-toggle{-webkit-touch-callout:none}

/* Current equipment uses the existing rack and portraits as its controls. */
.recorder-counter{position:absolute;right:2px;top:3px;border:1px solid #192a26;background:#eddaae;color:#263d35;font:bold 10px sans-serif;padding:1px 3px;line-height:1.1;pointer-events:none}.gear-chip.is-equipment-choice{outline:2px solid #e8c56b;box-shadow:0 0 8px #e8c56b99;cursor:pointer;z-index:3}.gear-choice-label{position:absolute;right:0;bottom:-1px;background:#d3b054;color:#172923;font-size:9px;padding:1px 3px;line-height:1.1;pointer-events:none}
