/* Shared drawn paper edges and ink. No bitmap labels or per-button images. */
#app .office-control{--office-ink:#273a44;--office-paper:#f1e6cb;position:relative;box-sizing:border-box;min-height:44px;max-width:100%;font:600 1rem/1.4 Arial,Helvetica,sans-serif;letter-spacing:0;white-space:normal;word-break:normal;overflow-wrap:break-word;border:2px solid #807459;border-radius:3px 5px 3px 4px;color:var(--office-ink);background:linear-gradient(175deg,#fff9e7 0%,var(--office-paper) 70%,#daccaa 100%);box-shadow:1px 2px 0 #142a3338,inset 0 0 0 2px #fff9;transition:transform 120ms ease,background-color 120ms ease;transform:none;padding:.65rem .85rem;text-align:center;text-decoration:none}
#app .office-control:hover:not(:disabled){transform:translateY(-1px);background-color:#fff4d5;box-shadow:1px 3px 0 #142a334d,inset 0 0 0 2px #fff9}
#app .office-control:active:not(:disabled){transform:translateY(1px);box-shadow:0 1px 0 #142a3338}
#app .office-control:focus-visible{outline:3px solid #e4ac2e;outline-offset:3px;z-index:2}
#app .office-control[aria-pressed=true],#app .office-control.selected{border-color:#45644d;background:#e3e9d4;box-shadow:inset 0 0 0 2px #45644d88,1px 2px 0 #142a3338}
#app .office-control:disabled{opacity:1;cursor:not-allowed;filter:saturate(.35);background:#ddd8c9;color:#626762;border-color:#a8a38f;box-shadow:inset 0 0 0 2px #ffffff50}
#app [data-office-control=stamp],#app [data-office-control=cover]{border:3px double #e6c597;background:linear-gradient(170deg,#9d3a30,#6f2925);color:#fff0d6;box-shadow:2px 3px 0 #2d201e70,inset 0 0 0 2px #4d1e1b;text-transform:none;font-weight:800;padding:.8rem 1rem}
#app [data-office-control=cover]{border-radius:7px 3px 3px 7px;border-left:8px solid #4e302b;background:linear-gradient(110deg,#993f32,#74352b)}
#app [data-office-control=proposal]{display:flex;text-align:left;border-left:5px solid #aa8a51;background:repeating-linear-gradient(0deg,transparent 0 27px,#ac97751c 28px 29px),linear-gradient(170deg,#fff9e9,#eadfc3);padding:.85rem;gap:.7rem;align-items:flex-start;width:100%}
#app [data-office-control=proposal] .choice-num{box-sizing:border-box;color:#8b3e30;border:1px solid #9f7560;border-radius:50%;width:1.75rem;min-width:1.75rem;max-width:1.75rem;height:1.75rem;min-height:1.75rem;padding:0;margin:0;display:flex;align-items:center;justify-content:center;flex:0 0 1.75rem;font:700 .75rem/1 Arial,Helvetica,sans-serif;letter-spacing:0;text-align:center;text-indent:0;background:#f4e8cf}
#app [data-office-control=tab]{border-radius:9px 9px 0 0;background:linear-gradient(#ddcba3,#b6a37e);color:#233643;border-bottom:3px solid #756646;box-shadow:inset 0 2px #fff6}
#app [data-office-control=tab][aria-current=page],#app [data-office-control=tab][aria-pressed=true]{background:#f4ebd5;color:#263844;border-bottom-color:#756646}
#app [data-office-control=calendar]{padding-left:2.8rem;background:linear-gradient(90deg,#ac4034 0 1.8rem,#f6ead0 1.8rem);border-color:#7f6244;color:#293c44;font-weight:800}
#app [data-office-control=note]{border:1px solid #9b8b6b;border-top:3px solid #bda97d;background:linear-gradient(175deg,#fff7dc,#e7d7ad);padding-left:1rem;border-radius:1px 4px 4px 2px}
#app [data-office-control=return]{border:0;border-bottom:2px solid #a48d62;background:#e9ddc2;color:#35454b;box-shadow:none;font-size:.9375rem;min-height:44px}
#app [data-office-control=instrument],#app [data-office-control=telephone]{background:revert;color:revert;border:revert;box-shadow:revert;border-radius:revert;padding:revert;transform:none}
#app .surface-header [data-office-control=instrument]{background:transparent;color:#f5ecd7;border:0;padding:10px;box-shadow:none}
#app .surface-hud [data-office-control=instrument]{background:transparent;color:#f4efe3;border:0;border-right:1px solid #56616a;border-radius:0;padding:2px 18px;box-shadow:none;text-align:left}
#app .surface-stage-top [data-office-control=instrument]{background:#102633e8;color:#e8e4da;border:1px solid #7b8b8c;padding:6px 9px;min-height:36px;font-size:.875rem}
#app .surface-folder.office-control{min-height:64px;padding:10px 8px}
#app .surface-nav [data-office-control=tab]{font-size:.9375rem;min-height:50px}
#app .surface-paper-tabs [data-office-control=tab]{font-size:.875rem;padding:.55rem;min-height:44px}
@media(max-width:700px){#app .office-control{font-size:1rem;padding:.65rem;min-height:44px}#app .surface-nav [data-office-control=tab]{font-size:.75rem;padding:.35rem .2rem;border-width:1px;overflow-wrap:normal}#app .surface-nav [data-office-control=tab] svg{width:19px;height:19px}#app [data-office-control=calendar]{padding-left:2.4rem}#app .surface-paper-tabs [data-office-control=tab]{font-size:.8125rem;padding:.5rem .35rem}}
body.surface-playing .government-shell[data-motion=false] .office-control{transition:none!important;transform:none!important}
@media(prefers-reduced-motion:reduce){#app .office-control{transition:none!important}#app .office-control:hover,#app .office-control:active{transform:none!important}}

#app .surface-nav .office-control svg{color:#5b503a}#app .surface-hud .office-control .surface-finance>b{color:inherit}
#app [data-office-control=note]::before{content:'';display:inline-block;width:.35rem;height:.85rem;border:2px solid #7a7c75;border-radius:5px;transform:rotate(-12deg);vertical-align:middle;margin-right:.45rem}
#app .office-control[aria-pressed=true]:not([data-office-control=tab]):not([data-office-control=instrument]):not([data-office-control=telephone]){border-style:double;border-width:3px}
/* Every responsive grid track may shrink to the viewport, including long Slovak labels. */
.government-shell{grid-template-columns:minmax(0,1fr)}.government-shell>*,.surface-nav{min-width:0}.surface-nav>.office-control{min-width:0;flex:1 1 0}
#app [data-office-control=proposal]{display:block;min-width:0}#app .choice[data-office-control=proposal]{display:grid;grid-template-columns:1.7rem minmax(0,1fr)}#app .choice[data-office-control=proposal]>span{min-width:0}.choice .player-forecast{grid-column:1/-1}
@media(max-width:900px){.surface-nav{height:64px;box-sizing:border-box}.surface-nav>.office-control{padding:.35rem .1rem!important;font-size:.6875rem!important}.workflow-primary{position:relative;bottom:auto;z-index:8}.surface-paper{padding-bottom:1.5rem}.government-shell .surface-inspector{max-width:100%;box-sizing:border-box}}
/* Welcome actions: regular labels, without the file-cover spine. */
#app .hero-actions{width:min(100%,20rem);min-width:0}
#app .hero-actions [data-office-control=cover]{width:100%;min-width:0;border:2px solid #d3ab78;border-radius:4px;padding:.85rem 1rem;box-shadow:inset 0 0 0 2px #59261e,1px 2px 0 #0003;background:linear-gradient(170deg,#a54736,#773126);text-align:center;line-height:1.4}
/* Keep the panorama zoom out of normal flow: no extra strip below the image. */
#app .intro-panorama>#intro-expand.office-control{position:absolute;inset:auto 14px 14px auto;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:9px;border-radius:50%;z-index:7}
#app .intro-panorama-image{height:auto;aspect-ratio:auto}
@media(max-width:700px){#app .intro-panorama figcaption{position:absolute;bottom:0;left:0;right:0;padding:12px 72px 12px 12px;background:linear-gradient(transparent,rgba(7,25,35,.83))}#app .intro-panorama figcaption span{font-size:.6875rem}#app .intro-panorama figcaption b{font-size:1rem}}

/* Fit the complete panorama inside the dialog on short and narrow screens. */
#intro-panorama-dialog{width:min(96vw,1900px);height:94dvh;max-height:94dvh;overflow:hidden}
#intro-panorama-dialog[open]{display:flex;flex-direction:column}
#intro-panorama-dialog .intro-panorama-dialog-top{flex:none;margin-bottom:12px;gap:12px}
#intro-panorama-dialog .intro-panorama-dialog-top h2{margin:0;min-width:0}
#intro-panorama-dialog .intro-panorama-dialog-top button{flex:none}
#intro-panorama-dialog .intro-panorama-scroll{flex:1;min-height:0;max-height:none;overflow:hidden;display:flex;align-items:center;justify-content:center}
#intro-panorama-dialog .intro-panorama-scroll img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
#intro-panorama-dialog{height:auto}
#intro-panorama-dialog .intro-panorama-scroll{flex:initial}
#intro-panorama-dialog .intro-panorama-scroll img{height:auto;max-height:calc(94dvh - 120px)}
#intro-panorama-dialog{top:50%;bottom:auto;margin-block:0;transform:translateY(-50%)}
/* A quiet text link to the optional illustration gallery. */
#app .intro-gallery-link #gallery.office-control{display:inline-block;width:auto;min-height:44px;padding:10px 0;border:0;border-radius:0;background:transparent;color:#cdbb95;box-shadow:none;font-size:.875rem;font-weight:400;line-height:1.5;letter-spacing:0;text-transform:none;text-align:left;text-decoration:underline;text-underline-offset:3px;transform:none}
#app .intro-gallery-link #gallery.office-control:hover{background:transparent;color:#fff0d3;box-shadow:none;transform:none}
/* Fix 1: the optional gallery stays at the bottom left. */
#app .intro-gallery-link{text-align:left;display:block;width:100%}
/* Fix 2: preserve the resting HUD; override only its hover/focus state. */
#app .surface-hud .office-control:hover:not(:disabled),#app .surface-hud .office-control:focus-visible{background:#244653;color:#fff3d9;box-shadow:inset 0 -2px #c6ac76;transform:none}
#app .surface-hud .office-control:hover .surface-finance>b,#app .surface-hud .office-control:focus-visible .surface-finance>b{color:inherit}
/* Fix 3: signed consequences share the HUD's green/red vocabulary. */
#app .case-delta-positive{color:#287b5b;font-weight:700}#app .case-delta-negative{color:#b33e32;font-weight:700}
/* Fix 5: percentage choices use the same paper and ink as recipient choices. */
#app .share-choices button.office-control{background:linear-gradient(175deg,#fff9e7,#f1e6cb 70%,#daccaa);color:#273a44;border:2px solid #807459;box-shadow:1px 2px #142a3338;min-height:44px;text-align:left}
#app .share-choices button.office-control small{color:inherit;font-size:.9375rem}
#app .share-choices button.office-control:hover{background:#fff2ce;color:#273a44}
/* Fix 6: ink labels float above the props, without boxes. */
#app .office-signal-badge{position:absolute;bottom:100%;top:auto;left:50%;right:auto;transform:translateX(-50%);margin:0 0 8px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#ffe2a0;text-shadow:0 1px 2px #211b12,1px 0 2px #211b12,-1px 0 2px #211b12;font:700 .875rem/1.3 Georgia,serif;white-space:nowrap;max-width:none;pointer-events:none}
#app #surface-phone .office-signal-badge{bottom:100%;margin-bottom:8px}
/* Separate proposal title from its explanation in press/mini scenes as well. */
#app [data-office-control=proposal] strong{display:block;font-size:1rem;line-height:1.5}
#app [data-office-control=proposal] small{display:block;margin-top:.5rem;font-size:.875rem;font-weight:400;line-height:1.6;letter-spacing:0}
#app [data-office-control=proposal] small[hidden]{display:none!important}
/* Original nav separators are obsolete inside the drawn tab buttons. */
#app .surface-nav>button+button::before{content:none;display:none}
/* Settings belong to the same dark office as the HUD and dialogue. */
#app .surface-settings-dialog{background:#17313c;color:#eee8d9;border-color:#667b79;scrollbar-color:#81918a #142b35;padding-top:52px}
#app .surface-settings-dialog h2{color:#f4ead3}
#app .surface-settings-dialog .surface-eyebrow{color:#d7bb80}
#app .surface-settings-dialog p,#app .surface-settings-dialog label{color:#d9e2df}
#app .surface-settings-dialog .keyboard-settings{border-color:#526962}
#app .surface-settings-dialog button.office-control{background:#27434b;color:#f2ead6;border:1px solid #71847a;box-shadow:inset 0 0 0 1px #102b333d;border-radius:4px;transform:none}
#app .surface-settings-dialog button.office-control:hover:not(:disabled){background:#36575b;color:#fff4d8;border-color:#c6ac76;box-shadow:inset 0 -2px #c6ac76;transform:none}
#app .surface-settings-dialog button.office-control:active:not(:disabled){background:#102b35;box-shadow:inset 0 2px 3px #0005;transform:translateY(1px)}
#app .surface-settings-dialog button.office-control[aria-pressed=true]{background:#31584c;border-color:#7aa58a;color:#f3edda}
#app .surface-settings-dialog button.office-control:focus-visible{outline:2px solid #e0bf78;outline-offset:3px}
#app .surface-settings-dialog #surface-settings-close.office-control{position:absolute;top:12px;right:12px;left:auto;display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:7px;margin:0;border:0;background:transparent;box-shadow:none;color:#e8dec6}
#app .surface-settings-dialog #surface-settings-close.office-control svg{width:20px;height:20px}
#app .surface-settings-dialog #surface-settings-close.office-control:hover{background:#36575b;color:#fff2d2;box-shadow:none}
#app .surface-settings-dialog .surface-import-label input{background:#102b35;color:#e7e9dd;border-color:#617a72;max-width:100%}
#app .surface-settings-dialog input::file-selector-button{background:#31514f;color:#f4ebd5;border:1px solid #829587;border-radius:3px;padding:8px 10px;margin-right:10px;cursor:pointer}
#app .surface-settings-dialog input::file-selector-button:hover{background:#42645d}
#app .surface-settings-dialog input[type=checkbox]{accent-color:#65a887}
#app .surface-settings-dialog #surface-new-game{background:#633d37;border-color:#9e7061;color:#fff0db}
#app .surface-settings-dialog #surface-new-game:hover{background:#7c4b40;border-color:#d0a073}
#app .surface-nav{border-top:0;box-shadow:none}
/* Scene zoom stays inside the art, clear of the premier label. */
#app .government-shell #surface-art-full.art-zoom{position:absolute;inset:auto 12px 12px auto;width:34px;height:34px;min-height:34px;padding:7px;border-radius:50%;z-index:7}
#app .government-shell #surface-art-full.art-zoom svg{width:20px;height:20px}
/* Only long case headings get the icon's spare space; other sidebar rows keep their layout. */
#app .surface-sidebar .surface-agenda.long-agenda-title>svg{display:none}
#app .surface-sidebar .surface-agenda.long-agenda-title>span{width:100%;overflow-wrap:normal;word-break:normal;hyphens:none;text-wrap:balance}
#app .surface-stage-top #surface-art-toggle.office-control:hover{background:#244653;color:#fff3d9;box-shadow:none;transform:none}
/* Dark office instruments must never inherit the pale paper hover. */
#app .surface-header button.office-control:hover:not(:disabled),
#app .surface-header button.office-control:focus-visible,
#app .surface-stage-top #surface-art-toggle.office-control:hover:not(:disabled),
#app .surface-stage-top #surface-art-toggle.office-control:focus-visible{background:#244653;color:#fff3d9;border-color:#c6ac76;box-shadow:none;transform:none}
#app .surface-header button.office-control:active:not(:disabled),
#app .surface-stage-top #surface-art-toggle.office-control:active:not(:disabled){background:#102b35;color:#ffe5ab;box-shadow:inset 0 2px 3px #0005;transform:none}
#app .surface-header button.office-control svg,#app .surface-stage-top #surface-art-toggle.office-control svg{color:inherit;stroke:currentColor}
/* Preserve complete scenes; expanded environments provide natural room around the subject. */
#app .surface-case-art{overflow:hidden;background:#102633}
#app .surface-case-art img,#app .surface-case-art .scene,#app .surface-case-art .ending-art .scene{display:block;position:absolute;inset:0;width:100%!important;height:100%!important;min-width:0;min-height:0;max-width:100%;max-height:100%!important;margin:0;padding:0;border:0;aspect-ratio:auto;object-fit:contain!important;object-position:center;background:transparent}
/* A fixed square hit area prevents legacy min-height/padding from making an ellipse. */
#app .government-shell #surface-art-full.art-zoom{box-sizing:border-box;display:grid;place-items:center;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;padding:7px!important;border:0!important;border-radius:50%!important;line-height:1;aspect-ratio:1;flex:none}
#app .government-shell #surface-art-full.art-zoom svg{display:block;width:20px!important;height:20px!important;min-width:20px;min-height:20px;aspect-ratio:1;flex:none}

/* Satirical shield: a white section sign above the blue three-peaked hill. */
#app .surface-shield{display:grid;place-items:start center;flex:none;font:700 22px/25px Georgia,serif;color:#fff;background-color:#b84438;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29 32'%3E%3Cpath fill='%23245baf' d='M0 27C0 20 8 19 10 25C9 13 20 13 19 25C22 19 29 20 29 27V32H0Z'/%3E%3C/svg%3E");background-size:100% 100%;background-repeat:no-repeat;border-top:2px solid #dfc389}

#app .surface-case-art img[data-expanded-environment="true"]{object-fit:cover!important;object-position:50% 50%}

/* The inspector reserves a grid row for the action; never lift it over the paper. */
@media(max-width:900px){#app .surface-inspector.has-workflow-primary{grid-template-rows:auto minmax(0,1fr) auto}#app .surface-inspector>.workflow-primary{position:relative;bottom:auto}}
#app #press-seconds{position:sticky;top:0;z-index:3;background:var(--surface-paper,#f6f1e4);padding:.4rem 0;border-bottom:1px solid #c7baa1}

/* Cabinet tabs join the paper only when selected; other tabs keep their base. */
#app .surface-paper-tabs [data-office-control=tab]:is(:hover,:focus-visible){border-color:#ffe3a0;transform:none}
#app .surface-paper-tabs [data-office-control=tab][aria-pressed=true]{background:var(--surface-paper,#f6f1e4);border-bottom-color:transparent;box-shadow:inset 0 2px #fff6;transform:none;z-index:1}
#app .surface-paper-tabs [data-office-control=tab][aria-pressed=true]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:4px;background:var(--surface-paper,#f6f1e4);pointer-events:none}

/* Open HUD sections keep their background. The underline is hover-only. */
#app .surface-hud .office-control[aria-current=page]{background:#244653;color:#fff3d9;box-shadow:none;transform:none}
#app .surface-hud .office-control:focus-visible:not(:hover){box-shadow:none}
#app .surface-hud .office-control:hover:not(:disabled){background:#244653;color:#fff3d9;box-shadow:inset 0 -2px #c6ac76;transform:none}

/* Every three-way decision uses the same numbered paper card. */
#app .decision-option[data-office-control=proposal]{display:grid;grid-template-columns:1.75rem minmax(0,1fr);align-items:start;gap:.75rem;min-width:0;width:100%;padding:.85rem;border:2px solid #807459;border-left:5px solid #aa8a51;border-radius:3px 5px 3px 4px;background:repeating-linear-gradient(0deg,transparent 0 27px,#ac97751c 28px 29px),linear-gradient(170deg,#fff9e9,#eadfc3);color:#273a44;text-align:left;box-shadow:1px 2px 0 #142a3338,inset 0 0 0 2px #fff9;letter-spacing:0}
#app .decision-option>.decision-option-copy{display:block;min-width:0;grid-column:2}
#app .decision-option>.player-forecast{grid-column:1/-1;margin:0;color:inherit}
#app .decision-option>.choice-arrow{display:none}
#app .decision-option .choice-num{align-self:start;justify-self:center}
#app .decision-option[data-office-control=proposal]:hover:not(:disabled){background:repeating-linear-gradient(0deg,transparent 0 27px,#ac97751c 28px 29px),linear-gradient(170deg,#fff5dc,#e6d7b5);border-color:#807459;border-left-color:#aa8a51}

/* Late explanatory notes belong below the card, never in the number column. */
#app .decision-option[data-office-control=proposal]>small{grid-column:1/-1;min-width:0;width:100%;margin:0;padding-top:.5rem;border-top:1px solid #bba987;white-space:normal;overflow-wrap:break-word;text-align:left}

/* Match the dossier reference across custom decision renderers. */
#app .decision-option>.decision-option-copy strong{display:block;font:800 1.05rem/1.45 Arial,Helvetica,sans-serif;color:inherit;text-transform:none;letter-spacing:0}
#app .decision-option .decision-option-copy small[hidden]{display:none!important}
#app .decision-option>.decision-option-copy>small{display:block;font-size:.9rem;font-weight:400;line-height:1.45;margin-top:.4rem}

#app .decision-option-details{margin:0 0 .8rem;padding:.4rem .7rem;border-bottom:1px solid #c7b98d;font-size:.9rem;line-height:1.5}
#app .decision-option-details summary{cursor:pointer;font-weight:700}
