:root {
  color-scheme: light;
  --paper: #f2eddf; --white: #fffaf0; --ink: #2d352e; --muted: #72776b;
  --accent: #e66c43; --art-accent: #e5b783; --gap: 7px; --board-inset: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background-image: radial-gradient(#575b4626 .65px, transparent .65px); background-size: 7px 7px; -webkit-user-select: none; user-select: none; overscroll-behavior-y: contain; }
h1,h2,h3,p { margin: 0; }
button,input { font: inherit; }
button { min-height: 44px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; color: var(--ink); transition: background .15s, box-shadow .15s; }
button:disabled { cursor: default; }
button:focus-visible, summary:focus-visible, .board:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ink-icon { display: block; width: 100%; height: 100%; overflow: visible; }
.shell { width: min(100%, 958px); padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); margin: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 13px; margin-bottom: 18px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 49px; height: 54px; transform: rotate(-7deg); --art-accent: var(--accent); }
h1 { font-size: 35px; font-weight: 900; letter-spacing: -1.5px; line-height: 1; }
h1 > span { display: inline-block; font-size: 34px; color: var(--accent); transform: translateY(-1px); margin-left: 3px; }
.brand p { font-size: 10px; letter-spacing: 2px; margin-top: 7px; }
.edition { text-align: right; transform: rotate(3deg); border: 1.5px solid var(--accent); padding: 7px 10px; color: #ac462c; background: #fff4dd; }
.edition span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 3px; }
.edition b { display: block; font-size: 9px; font-weight: 500; margin-top: 2px; }
.game-layout { display: grid; grid-template-columns: minmax(0, min(470px, calc(100svh - 294px))) minmax(290px, 1fr); gap: 28px; justify-content: center; }
.play-area { min-width: 0; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 10px; }
.meter-label { display: block; font-size: 11px; font-weight: 800; }
.meter-label small { font-size: 9px; font-weight: 400; margin-left: 7px; color: var(--muted); }
.meter-value { display: flex; align-items: baseline; gap: 5px; height: 50px; }
.meter-value strong { font-size: 45px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -2px; line-height: 1.1; }
.meter-limit { font-size: 12px; color: var(--muted); } .negative { color: #b7432c; }
.toolbar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.toolbar-right > span { font-size: 10px; font-variant-numeric: tabular-nums; }
.restart { background: transparent; border: 1px solid #9da18b; border-radius: 4px; font-size: 11px; padding: 0 12px; min-height: 36px; }
.restart:hover { background: #e9dfc8; }
.career-strip { display: flex; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 9px; }
.career-label-mini { border: 1px solid #777e68; color: #65704f; font-size: 9px; padding: 2px 4px; transform: rotate(-4deg); }
#career-state { font-size: 13px; }
.board { position: relative; width: 100%; aspect-ratio: 1; background: #d8dccb; border: 2px solid #394332; border-radius: 9px; box-shadow: 4px 5px 0 #424b35; touch-action: none; -webkit-touch-callout: none; overscroll-behavior: none; }
.grid,.tiles,.player-layer,.coworker-layer { position: absolute; inset: var(--board-inset); }
.grid { display: grid; grid-template-columns: repeat(6,1fr); grid-template-rows: repeat(6,1fr); gap: var(--gap); }
.cell { border-radius: 4px; border: 1px solid #bcc3aa; background: #e8eadc; box-shadow: inset 0 1px 2px #4550360b; }
.tile,.player,.coworker { position: absolute; top: 0; left: 0; width: calc((100% - 5 * var(--gap)) / 6); height: calc((100% - 5 * var(--gap)) / 6); transform: translate(calc(var(--x) * (100% + var(--gap))), calc(var(--y) * (100% + var(--gap)))); }
.tile-face { position: relative; width: 100%; height: 100%; border-radius: 4px; border: 1.4px solid #777d6e; background: var(--tile-bg, #fff6df); color: var(--ink); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 1px 2px 0 #66705460; padding: 3px 1px; }
.tile-icon { display: block; width: 58%; height: 59%; max-width: 40px; }
.tile-name { font-size: 10px; line-height: 1.25; font-weight: 700; white-space: nowrap; letter-spacing: -.3px; margin-top: 1px; }
.tone-blue { --tile-bg: #f9f5e7; --art-accent: #a8c3d1; }
.tone-amber { --tile-bg: #f7edcb; --art-accent: #e7bd69; }
.tone-coral { --tile-bg: #f6e6d7; --art-accent: #dd9d81; }
.tone-purple { --tile-bg: #e9e8d7; --art-accent: #b6b793; }
.tone-gray { --tile-bg: #f3d7c8; --art-accent: #dc9579; }
.tone-green { --tile-bg: #e3ecd9; --art-accent: #adc49b; }
.tone-ironic { --tile-bg: #f4c7b3; --art-accent: #e5784c; }
.tile.opportunity .tile-face { border: 2px solid #967124; background: #ffedb1; --art-accent: #edc46b; border-radius: 7px 2px 7px 2px; }
.tile.pressure .tile-face { border: 1.5px solid #a84930; background: #f8cdbb; --art-accent: #e9754e; }
.tile.unknown .tile-face { border: 1.5px dashed #778064; background: #e8e5cc; --art-accent: #c4ba88; }
.tile.recovery .tile-face { border: 2px solid #50765a; background: #e0edd6; --art-accent: #adc89c; border-radius: 2px 8px 2px 8px; }
.tile.target .tile-face::before { content: ''; position: absolute; inset: -3px; border: 1px solid #56634e; border-radius: 6px; pointer-events: none; }
.tile .clock { position: absolute; top: -6px; right: -4px; height: 19px; min-width: 19px; padding: 0 4px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fffdf1; background: #876328; border: 1px solid #69502d; border-radius: 4px; z-index: 2; transform: rotate(5deg); }
.tile.pressure .clock { background: #a34f35; border-color: #88422b; }
.tile .group { position: absolute; left: -3px; top: -6px; font-size: 8px; font-weight: 700; padding: 1px 2px; background: #fff4d4; border: 1px solid #a78a4c; border-radius: 2px; }
.spawn-label { position: absolute; left: -3px; top: -6px; background: #fdf1d2; border: 1px solid #677052; font-size: 8px; padding: 1px 2px; border-radius: 2px; z-index: 1; animation: arrival .8s both; }
.grouped .spawn-label { top: auto; bottom: -4px; }
.tile.spawn .tile-face { animation: appear .18s ease-out; }
.tile.worsened .tile-face { animation: warning .6s ease-out; }
.tile.consumed, .tile.cleared { opacity: 0; transition: opacity .12s; }
.player-layer { pointer-events: none; }
.player { border: 2px solid #5d3725; background: #ef9265; border-radius: 5px; box-shadow: 0 0 0 2px #fff2bd, 2px 3px 0 #644930; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform var(--dash-duration,220ms) cubic-bezier(.18,.75,.3,1); }
.portrait > span { display: block; width: 94%; height: 94%; }
.portrait[data-form="person_tired"] { background: #dfa578; }
.portrait[data-form="person_exhausted"] { background: #d98971; border-color: #863e2c; }
.posture-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; list-style: none; text-align: center; }
.posture-guide li { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.posture-guide b { font-size: 12px; }
.posture-guide small { font-size: 10px; color: var(--muted); }
.posture-guide .portrait, .result-portrait .portrait { flex-shrink: 0; display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #5d3725; border-radius: 5px; background-color: #ef9265; }
.posture-guide [data-form="person_tired"], .result-portrait [data-form="person_tired"] { background-color: #dfa578; }
.posture-guide [data-form="person_exhausted"], .result-portrait [data-form="person_exhausted"] { background-color: #d98971; border-color: #863e2c; }
.result-portrait { display: flex; align-items: center; gap: 13px; margin: 16px 0; }
.player b { position: absolute; bottom: -4px; right: -4px; color: #fffbea; background: #343b2e; border: 1px solid #fff3c9; border-radius: 3px; padding: 0 4px; font-size: 9px; line-height: 15px; }
.player.changed { animation: promotion .5s ease-out; }
.player.teleport { transition: none; animation: teleport .15s ease-out; }
.board-footer { display: flex; justify-content: space-between; font-size: 9px; color: #68715e; margin-top: 12px; gap: 8px; }
.sheet-no { color: #74795f; letter-spacing: 2px; font-size: 9px; }
.absence-note { color: #766547; font-size: 10px; line-height: 1.5; margin-top: 8px; }
.danger-note { font-size: 10px; color: #816046; line-height: 1.5; padding-left: 9px; border-left: 3px solid #d5b385; }
.danger-note.active { color: #a03f27; border-color: #bd5736; background: #fae8d6; font-weight: 600; }
.feedback { padding: 11px 12px; background: #eee9d6; border: 1px solid #d0ccb4; height: 90px; overflow-y: auto; overscroll-behavior: contain; }
.feedback-label { display: inline-block; color: #7c5938; font-size: 9px; font-weight: 700; border-bottom: 1px solid #ab9570; padding-bottom: 3px; margin-bottom: 5px; letter-spacing: 2px; }
.status { font-size: 11px; line-height: 1.7; }
.secondary-controls { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-top: 18px; font-size: 11px; }
.action-row { display: flex; gap: 14px; }
.action-row button { border: 0; background: transparent; font-size: 11px; padding: 0; min-height: 36px; color: #526345; }
.action-row button:disabled { color: #999c8b; }
summary { cursor: pointer; min-height: 36px; padding: 10px 0; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 8px; border-top: 1px solid #a4ae95; font-size: 9px; color: #7b826c; }
.storage-warning { background: #f3dcc8; border: 1px solid #b97c52; padding: 8px; font-size: 11px; line-height: 1.7; }
.game-over { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #f3ecd8ef; backdrop-filter: blur(3px); text-align: center; padding: 20px; border-radius: 6px; }
.end-stamp { display: block; color: #a34c2e; border: 2px solid #ad5b38; transform: rotate(-8deg); font-size: 11px; padding: 7px 12px; letter-spacing: 2px; }
.game-over p { font-size: 23px; font-weight: 800; }
.primary { background: #e88b5e; border: 1.5px solid #8e4b2e; border-radius: 4px; box-shadow: 2px 3px 0 #9c5f3d; padding: 11px 17px; min-height: 46px; font-size: 13px; font-weight: 700; }
.wide { width: 100%; }
dialog { border: 2px solid #626d51; border-radius: 6px; color: var(--ink); background: #fff8e9; width: min(94vw,560px); max-width: calc(100vw - 20px); max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))); overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; box-shadow: 6px 7px 0 #353f3433; }
dialog::backdrop { background: #30392966; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -16px; background: #fff8e9; z-index: 2; padding: 5px 0 12px; border-bottom: 1px dashed #b7bea2; margin-bottom: 15px; }
.dialog-header h2 { font-size: 22px; }
.close-dialog { width: 44px; height: 44px; border: 1px solid #929e80; border-radius: 4px; background: #e8edd9; }
dialog p { font-size: 12px; line-height: 1.8; margin-bottom: 10px; }
dialog h3 { font-size: 14px; margin: 22px 0 10px; }
.note { color: #747b66; font-size: 11px; line-height: 1.8; }
.base-pool,.power-list,.recipe-list,.achievement-list { list-style: none; padding: 0; }
.base-pool { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.base-pool li { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.base-pool li > span { width: 29px; height: 31px; }
.base-pool small { color: #7c816a; font-size: 9px; }
.legend { display: flex; flex-wrap: wrap; gap: 7px 14px; font-size: 10px; color: #667457; }
.recipe-list li { display: grid; grid-template-columns: 1fr 12px 1fr; gap: 7px; font-size: 11px; line-height: 1.6; padding: 9px 0; border-bottom: 1px solid #dfdfca; }
.power-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.power-list li { display: flex; align-items: center; justify-content: space-between; font-size: 11px; gap: 4px; }
.power-list li > span { display: flex; align-items: center; gap: 4px; }
.power-list .ink-icon { width: 23px; height: 25px; }
.power-list b { color: #607d4d; white-space: nowrap; }
.achievement-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.7; padding: 7px 0; }
.achievement-list .ink-icon { width: 27px; height: 29px; flex-shrink: 0; }
.setting { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 13px; }
.setting input { width: 20px; height: 20px; accent-color: #587747; }
.eyebrow { font-size: 10px; color: #7a8367; letter-spacing: 1px; }
.career-label { font-size: 28px; margin: 17px 0 !important; }
.career-comment { border-left: 4px solid #dc7849; background: #f2e6c9; padding: 14px; color: #745031; }
.result-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.result-metrics span { display: block; font-size: 11px; color: #7d866d; }
.result-metrics strong { display: block; font-size: 38px; margin-top: 6px; }
.career-route { border: 1px solid #b2bd9d; padding: 12px; background: #ecf0df; }
.history-list { font-size: 12px; line-height: 1.8; padding-left: 18px; }
@keyframes gain { 0%,40% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-7px); } }
@keyframes appear { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes arrival { 0%,55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes warning { 45% { background: #ed9678; } }
@keyframes teleport { from { opacity: 0; } to { opacity: 1; } }
@keyframes promotion { 40% { box-shadow: 0 0 0 6px #eaba6f,2px 3px 0 #644930; } }
@media (max-width: 799px) {
  :root { --gap: 6px; --board-inset: 9px; }
  .shell { max-width: 490px; padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .masthead { margin-bottom: 6px; padding-bottom: 8px; }
  .brand { gap: 7px; }
  .brand-mark { width: 34px; height: 40px; }
  h1 { font-size: 28px; } h1 > span { font-size: 26px; }
  .brand p { font-size: 9px; letter-spacing: 1px; margin-top: 4px; }
  .edition { padding: 4px 6px; } .edition span { font-size: 10px; letter-spacing: 1px; } .edition b { font-size: 8px; }
  .game-layout { display: block; }
  .game-toolbar { height: 64px; }
  .meter-value { height: 40px; } .meter-value strong { font-size: 36px; }
  .meter-label { font-size: 10px; } .meter-label small { font-size: 8px; }
  .restart { min-height: 32px; font-size: 10px; }
  .career-strip { min-height: 26px; margin-bottom: 7px; }
  #career-state { font-size: 12px; }
  .board { max-width: calc(100svh - 325px); margin: auto; }
  .board-footer { margin-top: 9px; font-size: 8px; }
  .absence-note { font-size: 9px; margin-top: 5px; }
  .danger-note { font-size: 9px; }
  .feedback { height: 56px; padding: 6px 9px; }
  .feedback-label { display: none; } .status { font-size: 10px; line-height: 1.6; }
  .secondary-controls { margin-top: 7px; gap: 5px; font-size: 10px; }
  .action-row { gap: 12px; } .action-row button { font-size: 10px; min-height: 32px; }
  summary { min-height: 32px; padding: 8px 0; }
  .page-footer { margin-top: 3px; padding-top: 8px; font-size: 8px; }
}
@media (max-width: 360px) { :root { --gap: 5px; --board-inset: 7px; } .shell { padding-left: 10px; padding-right: 10px; } .tile-name { font-size: 9px; } .tile-icon { width: 53%; height: 53%; } .meter-label small { display: none; } .power-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } .spawn-label { animation: none; opacity: 1; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
.reduce-motion .spawn-label { animation: none; opacity: 1; }

/* 1.1: separate the formal post from the career identity; promotion never blocks input. */
.job-tag { display: inline-flex; align-items: center; gap: 6px; background: #394b38; color: #fff4ce; border-radius: 3px; padding: 4px 8px; margin-right: 5px; }
.job-tag small { font-size: 9px; opacity: .8; }
.job-tag b { font-size: 13px; white-space: nowrap; }
.record-label { font-size: 11px; font-weight: 700; padding-top: 8px; }
#job-state.promoted { animation: new-post .7s ease-out; }
.result-identity { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 15px 0; }
.result-identity span { display: flex; flex-direction: column; font-size: 10px; color: var(--muted); gap: 5px; }
.result-identity b { font-size: 23px; color: var(--ink); }
.promotion-counts b { font-size: 19px; color: #42633d; }
@keyframes appointment { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes new-post { 40% { transform: scale(1.3); color: #ffe174; } }

/* One coworker, in a blue badge; the archive stays after death. */
.coworker-layer { pointer-events: none; }
.coworker { border: 2px solid #314f68; background: #b7d2e0; border-radius: 50% 50% 5px 5px; box-shadow: 0 0 0 2px #eaf7ff,2px 3px 0 #456276; z-index: 3; display: flex; align-items: center; justify-content: center; transition: transform var(--dash-duration,220ms) cubic-bezier(.18,.75,.3,1); }
.coworker b { position: absolute; right: -4px; bottom: -4px; background: #314f68; color: #f4fbff; border: 1px solid #eff9ff; border-radius: 3px; font-size: 9px; line-height: 15px; padding: 0 3px; }
.coworker.teleport { transition: none; }
.coworker-line { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.coworker-line b { white-space: nowrap; }
.coworker-line strong { margin-left: auto; font-size: 9px; color: #895938; }
.coworker-result { padding: 12px; background: #e6edf0; border: 1px solid #8b9fac; }
@media (min-width: 800px) { .game-layout { grid-template-columns: minmax(0,min(470px,calc(100svh - 364px))) minmax(290px,1fr); } }

/* 1.3: bolted permanent fixtures and framed, timed visitors. */
.attendance { font-size: 10px; color: #626c57; min-height: 20px; line-height: 16px; margin: 0; }
.attendance.due { color: #a64d31; font-weight: 700; }
.tone-slate { --art-accent: #a4b4bd; }
.tone-gold { --art-accent: #d7b15c; }
.tone-teal { --art-accent: #85b9a9; }
.encounter .tile-face { border: 2px solid #65717a; background: #edf0eb; }
.permanent .tile-face { border-radius: 2px; box-shadow: inset 0 -4px 0 #86979f; background: #dce3e0; }
.fixture-label { position: absolute; top: 1px; left: 3px; font-size: 7px; line-height: 10px; color: #52616a; }
.permanent .tile-icon { transform: translateY(2px); }
.visitor .tile-face { border: 2px double #997a3d; border-radius: 11px 11px 3px 3px; background: #fbf0ce; }
.visitor[data-kind="client"] .tile-face { border-color: #52897e; background: #e0eee5; }
.visitor .clock { background: #3e6258; color: #fff9e8; }
#encounter-rules { display: block; }
#encounter-rules li { display: block; }

/* 1.4: a public silver trophy and a ceremonial ribbon; no screen direction pad. */
.input-hint { font-size: 10px; line-height: 1.8; color: #717760; margin-top: 12px; }
.result-inventory { display: flex; align-items: center; gap: 6px; min-height: 22px; margin-bottom: 3px; font-size: 11px; }
.result-inventory > span:first-child { width: 18px; height: 20px; }
.result-inventory b { font-size: 14px; }
.coworker-results { font-size: 10px; color: #536777; }
.achievement .tile-face { background: #f3f8f3; border: 2px solid #4d7272; border-radius: 3px; box-shadow: inset 0 -3px 0 #bacfca, 1px 2px 0 #66705460; }
.honor .tile-face { background: #f7e6e3; border: 1.5px dashed #ab7479; border-radius: 50% 50% 3px 3px; }
.honor .clock { background: #976f79; }
#result-rules li { display: block; }
@media (min-width: 800px) { .game-layout { grid-template-columns: minmax(0,min(470px,calc(100svh - 404px))) minmax(290px,1fr); } }

/* 1.5: readable collision receipt directly above the board. */
.player-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; }
.player-meta .result-inventory { margin: 0; }
.player-meta .attendance { min-height: 18px; font-size: 9px; }
.performance-status { font-size: 11px; line-height: 24px; color: #685842; }
.feedback { position: relative; height: auto; min-height: 80px; overflow: visible; padding: 8px 10px; margin: 0 0 12px; border: 1px solid #aa9778; border-left: 4px solid #bc6943; background: #fff5de; }
.feedback-label { display: block; border: 0; padding: 0; margin: 0 0 3px; font-size: 9px; color: #84664d; }
.feedback .status { font-size: 13px; font-weight: 600; line-height: 1.55; }
.performance-grades { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; text-align: center; }
.performance-grades > div { border: 1px solid #c3b594; padding: 12px 8px; background: #f4ecd8; }
.performance-grades span,.performance-grades small { display: block; font-size: 11px; }
.performance-grades span { font-weight: 700; margin-bottom: 6px; }
.performance-grades b { display: block; font-size: 54px; line-height: 1.15; margin: 4px 0; }
.grade-S { color: #956c21; }.grade-A { color: #486743; }.grade-B { color: #686b59; }.grade-C { color: #a25138; }
.review-stamp { transform: rotate(6deg); border: 2px solid #ad6143; color: #995335; padding: 6px; font-size: 11px; }
.performance-labels { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px 16px; margin: 14px 0; }
.performance-labels span { display: flex; justify-content: space-between; font-size: 12px; border-bottom: 1px dashed #c0b597; padding-bottom: 6px; }
#performance-dialog .calibration-note { margin: 12px 0; font-size: 12px; }
#performance-dialog .career-comment { padding: 10px 12px; }
#performance-dialog .dialog-header { margin-bottom: 12px; }
@media (min-width: 800px) { .game-layout { grid-template-columns: minmax(300px,min(470px,calc(100svh - 448px))) minmax(260px,1fr); gap: 24px; } }
@media (max-width: 799px) {
 .game-toolbar { height: 58px; }
 .career-strip { margin-bottom: 3px; }
 .feedback { min-height: 76px; padding: 6px 9px; margin-bottom: 9px; }
 .feedback .status { font-size: 12px; }
 .board { max-width: calc(100svh - 346px); }
 .performance-status { font-size: 10px; line-height: 22px; }
}

@media (min-width: 800px) {
 .game-layout { grid-template-columns: minmax(280px,min(470px,calc(100svh - 325px))) minmax(260px,1fr); column-gap: 24px; row-gap: 10px; align-items: start; }
 .play-area { display: contents; }
 .game-toolbar { grid-column: 1; grid-row: 1; }
 .office-meta { grid-column: 2; grid-row: 1 / 3; min-width: 0; }
 .feedback { grid-column: 1; grid-row: 2; margin: 0; }
 .board { grid-column: 1; grid-row: 3; }
 .board-footer { grid-column: 1; grid-row: 4; margin: 0; }
}
.feedback-label { padding-right: 130px; white-space: nowrap; }

.feedback .status.previewing { max-height: 3.1em; overflow-y: auto; overscroll-behavior: contain; font-weight: 400; }
.tone-meeting { --art-accent:#afb7c9; }.tile[data-kind="meeting"] .tile-face { background:#e2e2e9; border-color:#79788c; border-radius:3px; }
.tone-danger { --art-accent:#b16858; }.tile[data-kind="blame"] .tile-face { background:#dac1b5; border:2px solid #754d43; }
@media(min-width:800px) { }

/* 1.6.5: two personnel files above the desk, factual receipts below. */
:root { --ink:#302f2c; --muted:#767064; }
.shell { max-width:1050px; }
.masthead { margin-bottom:5px; padding-bottom:6px; }
.brand-mark { width:27px;height:32px; }.brand h1 { font-size:25px; }.brand h1>span { font-size:23px; }.brand p { font-size:9px; margin-top:2px; }
.game-toolbar { height:28px; display:flex; align-items:center; justify-content:space-between; font-size:10px; color:#746b5e; }
.restart { padding:3px 6px;min-height:28px; }
.people-cards { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px; }
.person-card { position:relative; min-width:0; background:#f7edda;border:1px solid #ad9c7c;border-top:3px solid #b36642; margin:0; }
.person-card summary { display:flex;flex-direction:column;gap:3px; padding:7px 8px;list-style:none;cursor:pointer; }
.person-card summary::-webkit-details-marker {display:none;}
.person-top { display:flex;align-items:center;gap:6px;font-size:11px;min-height:20px; }.person-top small { margin-left:auto;color:#8e8472;font-size:8px;white-space:nowrap; }.person-top>b {font-size:10px;}
.person-top .job-tag {padding:2px 5px;margin:0;}.job-tag b {font-size:12px;}
.real-state,#career-state {font-size:clamp(14px,3.8vw,20px);line-height:1.35;letter-spacing:-.5px; min-height:27px;display:flex;align-items:center;overflow-wrap:anywhere;}
.company-evaluation {font-size:9px;line-height:1.4;color:#837767;}
.person-bottom {display:flex;align-items:center;gap:6px;font-size:9px;min-height:31px;}.person-bottom strong {font-size:16px;}.person-bottom>span:last-child {margin-left:auto;white-space:nowrap;}
.card-portrait {width:28px;height:30px;flex-shrink:0;display:grid;place-items:center;border:1px solid #b57b53;background:#ebc69d;border-radius:3px;}
.person-bottom .meter {position:relative;white-space:nowrap;}
.persona-tag {font-size:9px;color:#975b40;}
.feedback {min-height:60px;margin-bottom:7px;padding:5px 8px;}.feedback .status {font-size:11px;line-height:1.5;max-height:3em;overflow:auto;}.feedback-label {font-size:8px;}.speech {color:#8a7864;font-size:10px;line-height:1.5;margin:3px 0;}.actual {color:#39382f;font-size:11px;line-height:1.5;}.actual small {color:#a14d36;font-weight:700;font-size:9px;}
#result-personality {font-size:12px;color:#6d614f;}
@media(min-width:800px) {
 .game-layout {display:grid;grid-template-columns:minmax(360px,460px) minmax(270px,1fr);gap:8px 24px;}
 .game-toolbar {grid-column:1;grid-row:1;}.office-meta {grid-column:2;grid-row:1 / 3;}.feedback {grid-column:1;grid-row:3;}.board {grid-column:1;grid-row:4;}.board-footer {grid-column:1;grid-row:5;}
 .real-state,#career-state {font-size:18px;min-height:49px;}.person-card summary {padding:10px;}
}
@media(max-width:799px) {
 .shell {padding-top:max(7px,env(safe-area-inset-top));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));}
 .game-layout {display:block;}.board {max-width:100%;}.edition span {font-size:9px;}.edition b {font-size:8px;}.board-footer {margin-top:6px;}.person-card .real-state {min-height:38px;}.real-state,#career-state {font-size:clamp(14px,4.1vw,18px);}
}
@media(max-width:360px) { .person-top {gap:3px;}.person-card summary {padding:6px;}.people-cards {gap:6px;}.person-top small {display:none;}.person-bottom {gap:4px;font-size:8px;}.company-evaluation {font-size:8px;}.card-portrait {width:24px;height:27px;}.real-state,#career-state {font-size:14px;}.person-top>b {font-size:9px;} }

@media(max-width:799px) { .person-card .real-state {min-height:24px;} .person-card summary {gap:2px;padding-top:5px;padding-bottom:5px;} .company-evaluation {min-height:13px;} }

/* 1.6.6: one viewport, explicit pages instead of vertical scrolling. */
html,body {height:100%;overflow:hidden;overscroll-behavior:none;}
.shell {height:100dvh;display:flex;flex-direction:column;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom));overflow:hidden;}
.masthead {flex:0 0 auto;}.game-layout {flex:1;min-height:0;display:flex;flex-direction:column;gap:0;}.play-area {display:flex;flex-direction:column;min-height:0;}.game-toolbar {flex:0 0 28px;}.office-meta {flex:0 0 auto;}.board {flex:none;}.board-footer {flex:none;margin-top:7px;font-size:8px;}.page-footer {display:none;}.secondary-controls {display:flex;justify-content:space-between;flex:0 0 40px;gap:5px;margin:6px 0 0;}.secondary-controls>button {min-width:0;flex:1;min-height:40px;padding:3px;border:1px solid #b6a68a;background:#eee4d2;border-radius:3px;font-size:11px;}
.people-cards {gap:7px;margin-bottom:6px;}.person-card summary {padding:4px 7px;gap:1px;}.person-card .real-state,#career-state {min-height:23px;font-size:16px;}.person-bottom {min-height:26px;}.card-portrait {height:25px;width:24px;}.person-top {min-height:19px;}.company-evaluation {font-size:9px;}
.feedback {min-height:52px;flex:0 0 auto;max-height:66px;}.feedback .status {max-height:3em;overflow:hidden;}
.paged-dialog[open] {display:flex;flex-direction:column;height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));padding:10px 14px;overflow:hidden;}
.paged-dialog .dialog-header {position:static;flex:none;padding:0 0 7px;margin-bottom:8px;}.paged-dialog .dialog-header h2 {font-size:20px;}.paged-dialog .close-dialog {width:36px;height:36px;min-height:36px;flex-shrink:0;}
.page-content {min-height:0;flex:1;overflow:hidden;}.page-content h3 {margin:8px 0;font-size:17px;}.page-content p {margin:5px 0;font-size:12px;line-height:1.65;}.page-content .note {font-size:10px;line-height:1.5;}.page-block {display:flow-root;}.page-navigation {flex:none;display:flex;gap:5px;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px dashed #b9aa91;}.page-navigation button {padding:5px 8px;min-height:38px;border:1px solid #aa967a;background:#ece0ca;border-radius:3px;font-size:11px;}.page-navigation button:disabled {opacity:.4;}.page-navigation span {font-size:10px;color:#7b6d59;}.page-navigation .primary {background:#dca277;box-shadow:none;}
.report-contrast {border-left:3px solid #b48b67;padding:8px 10px;background:#f2e7d4;margin-bottom:9px;}.report-contrast>span {font-size:9px;color:#967c61;}.report-contrast h3 {font-size:14px!important;margin:4px 0 8px!important;}.report-contrast p {font-weight:600;font-size:13px;}.report-highlight {padding:9px 0;border-bottom:1px dashed #bdae93;}.report-highlight>b {font-size:11px;color:#8c5e3e;}
#share-image {min-height:0;flex:1;object-fit:contain;width:100%;-webkit-touch-callout:default;user-select:auto;}.save-card {display:block;text-align:center;text-decoration:none;flex:none;margin-top:5px;font-size:13px;}
#performance-dialog {overflow:hidden;}.performance-grades {gap:6px;}.performance-grades>div {padding:7px;}.performance-grades b {font-size:40px;}
@media(min-width:800px){.shell {max-width:690px;}.people-cards {grid-template-columns:1fr 1fr;}.board {max-width:100%;}.real-state,#career-state {min-height:23px;font-size:19px;}.person-card summary {padding:5px 10px;}.secondary-controls {justify-content:center;}}
@media(max-height:660px){.masthead .brand-mark {height:25px;width:22px;}.brand h1 {font-size:21px;}.brand p {display:none;}.masthead {padding-bottom:4px;margin-bottom:3px;}.edition {padding:2px 4px;}.edition span {display:none;}.game-toolbar {flex-basis:25px;}.person-top {font-size:9px;min-height:17px;}.person-card .real-state,#career-state {font-size:14px;min-height:21px;}.person-bottom {min-height:22px;font-size:8px;}.card-portrait {height:22px;width:22px;}.company-evaluation {font-size:8px;}.feedback {min-height:48px;padding:3px 7px;}.feedback .status {font-size:10px;}.paged-dialog .dialog-header h2 {font-size:18px;}.page-content p {font-size:11px;}.performance-grades b {font-size:30px;}.performance-labels {margin:7px 0;gap:6px;}.performance-labels span {font-size:10px;}.performance-grades small {font-size:9px;}#performance-dialog p {font-size:10px;line-height:1.5;margin-bottom:6px;}#performance-dialog .dialog-header {margin-bottom:6px;}#performance-dialog .career-comment {padding:7px;}#performance-dialog {padding:10px 12px;}}
.feedback-label {padding:0;font-size:9px;}.feedback {border-left-color:#8e7352;}.feedback .status {font-size:10px;line-height:1.45;max-height:2.9em;}
.collision-float {position:absolute;z-index:7;pointer-events:none;width:max-content;max-width:148px;display:flex;flex-direction:column;align-items:center;gap:2px;opacity:0;transform:translate(-50%,-100%);}
.collision-float span {background:#fff7e7ee;border:1px solid #8f7655;color:#3b4b32;box-shadow:1px 2px 0 #33251925;border-radius:3px;padding:3px 6px;font-size:11px;font-weight:700;white-space:nowrap;}
.collision-float.below {transform:translate(-50%,0);}.collision-float.show {animation:collision-number 2.3s ease-out both;}
@keyframes collision-number {0%{opacity:0;}10%,78%{opacity:1;}100%{opacity:0;translate:0 -8px;}}
.reduce-motion .collision-float.show {animation:none;opacity:1;}

.game-layout {justify-content:flex-start;align-items:stretch;}
.play-area {width:100%;min-width:0;}

/* 1.7: personal discipline remains visible without adding a scrolling panel. */
.discipline-badge,.pending-badge{display:block;font-size:10px;line-height:17px;font-weight:700;color:#984331;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pending-badge{color:#8a651e;font-size:9px}.discipline-badge.at-risk{background:#903e2d;color:#fff3da;padding:0 4px;border-radius:2px}.hr-alert{position:absolute;z-index:5;right:2px;top:2px;width:17px;height:17px;line-height:17px;border-radius:50%;background:#a34732;color:#fff5da;font-size:14px;font-weight:900;text-align:center}.discipline-badge[hidden],.pending-badge[hidden]{display:none!important}
@media(max-height:660px){.discipline-badge,.pending-badge{font-size:8px;line-height:14px}}

/* Desktop keeps the playing surface still when notices or personal labels change. */
@media(min-width:800px){
 .person-card summary {height:150px;}
 .feedback {height:52px;min-height:52px;max-height:52px;}
 .board {margin-inline:auto;}
}

/* 1.7.5: one document, two actions. Only its optional archive is long. */
#result-dialog.single-report {width:min(560px,calc(100vw - 20px));height:fit-content;inset:max(10px,env(safe-area-inset-top)) 0 max(10px,env(safe-area-inset-bottom));max-height:calc(100dvh - max(10px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)));padding:16px 20px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;color:#302e2b;background:#f5eddd;}
.single-report .dialog-header {position:static;display:flex;align-items:center;justify-content:space-between;padding:0 0 8px;margin:0;border-bottom:1px solid #b9aa91;}
.single-report .dialog-header h2 {font-size:14px;letter-spacing:1px;}.single-report .close-dialog {min-height:30px;width:30px;height:30px;font-size:15px;}
.single-report h3,.single-report h4,.single-report p {margin:0;}.single-report h4 {font-size:10px;letter-spacing:1px;color:#847158;font-weight:500;}
.report-verdict {padding:12px 0 9px;}.report-verdict #result-label {font-size:34px;line-height:1.12;letter-spacing:-1px;margin:0 0 7px;}.report-evaluation {font-size:13px;font-weight:700;line-height:1.5;}.report-true-state {font-size:12px;line-height:1.5;color:#8a644b;margin-bottom:4px!important;}
.report-core {display:grid;grid-template-columns:.8fr 1.2fr 1fr;border-block:1px solid #cdbfa6;padding:8px 0;gap:8px;}.report-core span {font-size:9px;color:#81735d;}.report-core b {display:block;font-size:13px;line-height:1.5;color:#40372d;font-weight:600;}.report-grade-line {font-size:10px;line-height:1.5;padding-top:5px;color:#796c59;}
.report-strongest {padding:10px 0;border-bottom:1px solid #cdbfa6;}.report-strongest p {font-size:11px;line-height:1.55;}.report-strongest small {font-size:9px;color:#947a5d;margin-right:5px;}.report-strongest .report-actual {font-size:16px;line-height:1.4;margin-top:5px;}.report-actual small {color:#9a4935;}
.report-scenes {padding:9px 0 4px;}.report-scenes>p {display:grid;grid-template-columns:65px 1fr;gap:5px;margin:5px 0;font-size:11px;line-height:1.5;}.report-scenes time {font-size:10px;color:#8b7153;}.report-scenes .report-empty {display:block;color:#8c8170;font-size:10px;}
.report-numbers {display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-block:1px solid #cdbfa6;padding:8px 0;margin-top:4px;}.report-numbers:empty {display:none;}.report-numbers b {font-size:21px;font-weight:600;line-height:1.25;display:block;}.report-numbers small {font-size:10px;color:#857259;}
.report-last-word {padding:11px 0;}.report-last-word p {font-size:15px;line-height:1.45;margin-top:5px;}
.report-actions {display:grid;grid-template-columns:1.25fr 1fr;gap:9px;}.report-actions button {font-size:13px;min-height:42px;border:1px solid #a88d6b;border-radius:3px;padding:7px;box-shadow:none;background:#eee0c8;}.report-actions .primary {background:#cf9568;color:#38271d;}
#report-archive {font-size:11px;line-height:1.6;margin-top:8px;}#report-archive>summary {font-size:10px;color:#8b7961;min-height:28px;padding:5px 0;text-align:center;cursor:pointer;list-style:none;}#report-archive-content {border-top:1px dashed #b9aa91;padding-top:10px;}#report-archive-content h4 {font-size:12px;margin:15px 0 6px;}#report-archive-content p {font-size:11px;margin:6px 0;line-height:1.6;}.archive-stat-list {display:grid;grid-template-columns:1fr 1fr;gap:5px;}
@media(max-height:700px){#result-dialog.single-report {padding:10px 14px;}.report-verdict {padding:8px 0;}.report-verdict #result-label {font-size:29px;margin-bottom:5px;}.report-core {padding:6px 0;}.report-strongest {padding:7px 0;}.report-scenes {padding-top:7px;}.report-scenes>p {margin:4px 0;}.report-last-word {padding:8px 0;}.report-last-word p {font-size:14px;}.report-numbers {padding:6px 0;}}
.office-sidebar {display:contents;}.desktop-details {display:none;}
/* Wide desktops use the desk width for the board and a stable personnel sidebar. */
@media(min-width:1000px){
 .shell {width:min(1200px,100%);max-width:1200px;padding-inline:26px;}
 .play-area {display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:28px 60px auto 20px;column-gap:24px;align-items:start;}
 .game-toolbar {grid-column:1;grid-row:1;}.feedback {grid-column:1;grid-row:2;margin:0;height:52px;}
 .board {grid-column:1;grid-row:3;margin:0 auto;}.board-footer {grid-column:1;grid-row:4;margin-top:6px;}
 .office-sidebar {display:flex;flex-direction:column;grid-column:2;grid-row:1 / 5;min-width:0;gap:8px;}
 .people-cards {grid-template-columns:1fr;gap:8px;margin:0;}.person-card summary {height:154px;padding:9px 12px;gap:2px;}.person-card .real-state,#career-state {font-size:22px;line-height:1.2;min-height:27px;}.person-top {font-size:12px;}.company-evaluation {font-size:11px;}.person-bottom {font-size:11px;min-height:30px;}.person-bottom strong {font-size:21px;}.desktop-details {display:block;font-size:12px;line-height:1.6;border-top:1px solid #bbab8d;padding-top:8px;}.desktop-details h3 {font-size:11px;margin:0 0 6px;color:#877359;}.desktop-details p {margin:4px 0;}.desktop-details .desktop-hint {font-size:10px;color:#8c7c65;}.secondary-controls {gap:10px;}
 .tile-name {font-size:clamp(11px,1vw,15px);}.clock {font-size:13px;}
}
@media(min-width:1000px) and (max-height:720px){.person-card summary {height:145px;padding:6px 10px;}.desktop-details {font-size:11px;padding-top:5px;}.desktop-details p {margin:2px 0;}.desktop-details .desktop-hint {display:none;}}
@media(min-width:1000px){#result-dialog.single-report {width:600px;padding:18px 26px;}.report-verdict #result-label {font-size:40px;}.single-report .dialog-header h2 {font-size:15px;}.report-evaluation {font-size:14px;}.report-strongest p,.report-scenes>p {font-size:12px;}.report-strongest .report-actual {font-size:19px;}.report-last-word p {font-size:17px;}}

/* Permanent fixtures: a bolted dark chassis, not another disposable note. */
.permanent .tile-face {background:#aab7ba;border:3px solid #354a51;border-radius:1px;box-shadow:inset 0 -6px 0 #596b6e,0 3px 0 #34474c;isolation:isolate;padding-top:9px;padding-bottom:5px;}
.permanent .tile-face::after {content:"";position:absolute;inset:2px;pointer-events:none;background:radial-gradient(circle at 2px 2px,#e7e0cc 0 1.5px,#38494c 1.6px 2.3px,transparent 2.4px),radial-gradient(circle at calc(100% - 2px) 2px,#e7e0cc 0 1.5px,#38494c 1.6px 2.3px,transparent 2.4px),radial-gradient(circle at 2px calc(100% - 2px),#e7e0cc 0 1.5px,#38494c 1.6px 2.3px,transparent 2.4px),radial-gradient(circle at calc(100% - 2px) calc(100% - 2px),#e7e0cc 0 1.5px,#38494c 1.6px 2.3px,transparent 2.4px);}
.permanent .fixture-label {left:50%;top:-2px;transform:translateX(-50%);background:#354a51;color:#fff0d4;font-size:8px;line-height:12px;padding:0 4px;letter-spacing:1px;z-index:1;white-space:nowrap;}
.permanent .tile-name {color:#172e35;font-weight:800;}.permanent .tile-icon {transform:none;width:60%;height:56%;}.permanent.target .tile-face::before {inset:-4px;border:2px solid #334d55;border-radius:2px;}.permanent .hr-alert {right:-6px;top:-7px;border:1px solid #ffe8cb;width:18px;height:18px;line-height:16px;}
@media(min-width:1000px){.permanent .fixture-label {font-size:10px;line-height:15px;padding-inline:7px;}.permanent .tile-face {padding-top:14px;padding-bottom:8px;box-shadow:inset 0 -8px 0 #596b6e,0 4px 0 #34474c;}}


/* Management approval slips and withdrawn requests: fixed tile geometry. */
.tile.tone-management { --art-accent:#b9d3c6; color:#26483c; }
.tile.tone-cancellation { --art-accent:#d0c4b9; color:#645348; }
.tile.relief .tile-face { background:#dce8df; border:2px solid #547062; border-radius:3px 9px 3px 3px; box-shadow:inset 0 -4px #bdcec3; }
.tile.tone-cancellation .tile-face { background:#e5dfd7; border:2px dashed #8b7868; box-shadow:inset 0 -4px #d0c5b8; }
.relief-label { position:absolute; left:3px; top:2px; font-size:7px; letter-spacing:1px; font-weight:800; }
.tile.relief .tile-name { font-size:clamp(9px,2.5vw,13px); }
@media(min-width:1000px){.relief-label{font-size:10px;top:5px;left:5px}.tile.relief .tile-name{font-size:16px}}

/* 1.7.7: every notice is an overlay; never participates in board layout. */
.event-toast {position:absolute;inset:8px auto auto 50%;transform:translateX(-50%);z-index:15;width:min(440px,calc(100vw - 32px));text-align:left;padding:10px 13px;min-height:44px;border:1px solid #8b785e;border-left:5px solid #936b42;border-radius:3px;background:#fff5e5f5;color:#392f27;box-shadow:0 5px 18px #38281844;touch-action:manipulation;overflow-wrap:anywhere;animation:event-fade .12s ease-out;}
.event-toast .event-label {display:block;font-size:9px;letter-spacing:2px;color:#8e785e;}.event-toast strong {display:block;font-size:20px;line-height:1.3;margin:3px 0 4px;}.event-toast p {font-size:12px;line-height:1.5;}.event-toast .event-saying {font-size:11px;color:#7d6552;margin-top:4px;}.event-toast small {display:block;font-size:9px;color:#9d8975;text-align:right;margin-top:3px;}
.event-toast[data-level="1"] {padding:7px 10px;}.event-toast[data-level="1"] strong {font-size:13px;}.event-toast[data-level="1"] .event-label {display:none;}
.event-toast[data-level="3"] {border-top:4px solid #645047;}.event-toast[data-style="departure"],.event-toast[data-style="ending"] {background:#ece7ddf7;border-color:#544c45;}.event-toast[data-style="discipline"] {border-color:#9b4835;background:#fff0dcf7;}.event-toast[data-style="discipline"] strong {color:#8b3427;}.event-toast[data-style="promotion"] {border-color:#766634;}.event-toast[data-style="join"] {border-color:#537082;}
@keyframes event-fade {from{opacity:0}to{opacity:1}}
/* Reserve status rows on mobile too. New badges cannot push the board down. */
@media(max-width:999px){
 .shell {height:100svh;}
 .person-card summary {height:146px;position:relative;overflow:hidden;}
 .person-top,.person-bottom,.company-evaluation {flex-shrink:0;}
 .person-card .real-state,#career-state {height:23px;min-height:23px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 .company-evaluation {height:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 .person-card .discipline-badge,.person-card .pending-badge {height:17px;min-height:17px;line-height:17px;}
 .person-card .discipline-badge[hidden],.person-card .pending-badge[hidden] {display:block!important;visibility:hidden;}
 .person-card .persona-tag{position:absolute;bottom:3px;right:7px;left:7px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 .feedback {height:52px;min-height:52px;max-height:52px;}
 .board {margin-inline:auto;overflow-anchor:none;}
}
@media(max-width:999px) and (max-height:700px){
 .person-card summary {height:130px;}
 .person-card .discipline-badge,.person-card .pending-badge {height:14px;min-height:14px;line-height:14px;font-size:8px;}
 .person-top {min-height:17px;}.person-bottom {min-height:22px;}.person-card .real-state,#career-state {height:21px;min-height:21px;font-size:14px;}
 .event-toast {padding:7px 9px;}.event-toast strong {font-size:17px;}.event-toast p {font-size:11px;}.event-toast .event-label,.event-toast small {font-size:8px;}
}

/* 1.8: independent NPC layer and fixed-height strip, no board reflow. */
.npc-layer{position:absolute;inset:var(--board-inset);pointer-events:none}
.npc{position:absolute;top:0;left:0;width:calc((100% - 5 * var(--gap))/6);height:calc((100% - 5 * var(--gap))/6);transform:translate(calc(var(--x)*(100% + var(--gap))),calc(var(--y)*(100% + var(--gap))));display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:auto;transition:transform 220ms ease;border:2px solid #695731;box-shadow:inset 0 0 0 2px #f4e4bd,1px 3px 0 #554b38;background:#d2b675;border-radius:10px 10px 3px 3px;color:#393425;z-index:4;overflow:hidden}
.npc.customer{background:#9ec9bf;border-color:#315f56;box-shadow:inset 0 0 0 2px #daece5,1px 3px 0 #315f56;border-radius:3px 12px 3px 12px}
.npc[hidden]{display:none}.npc.teleport{transition:none}.npc-art{height:57%;width:65%;display:block}.npc-label,.npc b{font-size:9px;line-height:1.15;white-space:nowrap}.npc-label{font-weight:800;letter-spacing:1px}.npc b{font-weight:600}.npc .ink-icon{height:100%;width:100%}
.npc.dispatching{animation:npc-dispatch .55s ease-out}.source-mark{position:absolute;left:2px;bottom:2px;font-size:8px;font-weight:800;padding:0 2px;line-height:12px;border-radius:2px;background:#735e35;color:#fff7df}.source-customer{background:#396c60}.tile:has(.source-mark) .tile-face{border-left-width:3px}.tone-coffee{--tile-bg:#efe3d1;--art-accent:#b99672}.tone-paper{--tile-bg:#e8e3dd;--art-accent:#aab3bf}
#npc-brief{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.board-footer{height:14px;min-height:14px;line-height:14px;overflow:hidden}
@keyframes npc-dispatch{50%{box-shadow:0 0 0 4px #d9ae5388,inset 0 0 0 2px #f4e4bd}}
@media(min-width:1000px){.npc-label,.npc b{font-size:13px}.source-mark{font-size:11px;line-height:16px}}
@media(prefers-reduced-motion:reduce){.npc{transition:none}.npc.dispatching{animation:none}}

#npc-brief{font-size:9px}@media(min-width:1000px){#npc-brief{font-size:11px}}
/* 1.9: salary stays inside the reserved person card. */
.salary-line{display:block;height:14px;min-height:14px;font-size:10px;line-height:14px;color:#695848;white-space:nowrap;flex-shrink:0}
.report-core:has(>span:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}
.dispatch-flight{position:absolute;pointer-events:none;z-index:16;filter:drop-shadow(2px 5px 2px #51453455);transform-origin:center;will-change:transform,opacity}
.dispatch-flight .tile-face{width:100%;height:100%;border:2px solid #817158;border-radius:5px;background:var(--tile-bg,#fff5da);display:flex;flex-direction:column;justify-content:center;align-items:center}
.dispatch-flight .tile-icon{height:58%;width:62%}.dispatch-flight .tile-name{font-size:10px}.dispatch-flight .ink-icon{width:100%;height:100%}
.tile.dispatch-waiting{visibility:hidden}
.origin-player{--tile-bg:#ef9265;--art-accent:#ef9265}.origin-coworker{--tile-bg:#b7d2e0;--art-accent:#b7d2e0}
.origin-player .tile-face{background:var(--tile-bg);border:2px solid #5d3725;box-shadow:inset 0 -3px 0 #cf7750,1px 2px 0 #66705460}.origin-coworker .tile-face{background:var(--tile-bg);border:2px solid #314f68;box-shadow:inset 0 -3px 0 #8aaec3,1px 2px 0 #66705460}
.achievement .tile-name{font-size:10px}
.npc[data-state="fitness"] .npc-art{width:86%;height:60%}
@media(min-width:1000px){.salary-line{font-size:12px;height:17px;line-height:17px}.dispatch-flight .tile-name{font-size:14px}}
@media(max-height:700px) and (max-width:999px){.salary-line{font-size:9px;height:12px;min-height:12px;line-height:12px}}

/* Optional leader offers stay on the board; no decision modal. */
.tone-offer{--tile-bg:#f2e4d1;--art-accent:#cfa783}.tone-promise{--tile-bg:#f5d9bc;--art-accent:#dc9c65}
.pua .tile-face{border:2px dashed #9c694b;border-radius:8px 2px 8px 2px;box-shadow:inset 0 -3px 0 #d4b797,1px 2px 0 #66705460}
.pua[data-kind="promotion_promise"] .tile-face,.pua[data-kind="salary_promise"] .tile-face{border-color:#b36636;background:#f6d3ad}
.pua .tile-name{font-size:9px;line-height:1.05;text-align:center;white-space:normal}
.promise-line{height:13px;min-height:13px;line-height:13px;font-size:9px;color:#975827;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:1000px){.promise-line{height:17px;line-height:17px;font-size:11px}.pua .tile-name{font-size:13px}}
@media(max-height:700px) and (max-width:999px){.promise-line{height:10px;min-height:10px;line-height:10px;font-size:7.5px}.pua .tile-name{font-size:6px}}

.tile.permanent.clock-due .tile-face{background:#f2c9b5;border-color:#a94232;box-shadow:inset 0 0 0 2px #ffe4ce,0 0 0 2px #b7453544,2px 3px 0 #714735}.clock-due .fixture-label{background:#963e30;color:#fff1d8}
.tile.permanent.meeting-due .tile-face{background:#ead7c6;border-color:#9a493c;box-shadow:inset 0 0 0 2px #fae8d5,0 0 0 3px #ae4b3b42,0 3px 0 #6b4640}.meeting-due .fixture-label{background:#913f35;color:#fff2dd}.meeting-idle .tile-face{background:#b8c0c1}
.tile.permanent.pantry-ready .tile-face{background:#c5ddd4;border-color:#386959;box-shadow:inset 0 0 0 2px #e8f2e7,0 0 0 2px #4b806a38,0 3px 0 #36564d}.pantry-ready .fixture-label{background:#376656;color:#f3f1d9}.tile.permanent.pantry-cooling .tile-face{background:#abb6b6;border-color:#4f6266;filter:saturate(.55)}

@media(max-height:700px) and (max-width:999px){.pua .clock{font-size:8px;min-width:12px;line-height:12px;padding:1px 2px;top:-3px;right:-2px}.pua .tile-icon{height:52%;width:54%}}.people-cards{grid-template-columns:1fr!important}
#player-card summary{height:108px!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:22px 24px 18px 24px;gap:1px 8px;padding:5px 8px;position:relative}
#player-card .person-top{grid-column:1/-1;grid-row:1;min-height:0}#player-card #career-state{grid-column:1;grid-row:2;font-size:17px;height:24px;min-height:0;line-height:24px}#player-salary{grid-column:2;grid-row:2;align-self:center;text-align:right;font-size:13px}
#active-promise{grid-column:1/-1;grid-row:4;align-self:end;height:14px;line-height:14px;font-size:10px}#player-card .person-bottom{grid-column:2;grid-row:3;min-height:0;font-size:10px;align-items:center;justify-content:flex-end}#card-player{height:22px;width:22px}
#player-card .discipline-badge,#player-card .pending-badge,#player-card .persona-tag{position:absolute;bottom:2px;right:7px;left:auto;max-width:47%;font-size:8px;line-height:11px;height:11px;min-height:0;margin:0}#player-card .pending-badge{bottom:14px}#player-card .persona-tag{display:none}#employer-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.coworker{pointer-events:auto}.tile[data-kind="headhunter"] .tile-face,.tile[data-kind="offer"] .tile-face{background:#f5deb0;border:2px solid #80663a;box-shadow:inset 0 0 0 2px #fff3d5,1px 2px 0 #796c48}.tile[data-kind="offer"] .tile-face{background:#e3eacb;border-color:#647348}
@media(min-width:1000px){.shell{max-width:1400px;width:min(1400px,100%)}.play-area{grid-template-columns:minmax(0,1fr) 280px;column-gap:20px}#player-card summary{height:120px!important;grid-template-rows:24px 28px 21px 26px}#player-card #career-state{font-size:17px}#player-salary{font-size:13px}.person-top{font-size:11px}}
@media(max-width:999px){.people-cards{margin-bottom:3px}.feedback{height:48px;min-height:48px;max-height:48px}}
@media(max-width:360px){#player-card summary{height:96px!important;grid-template-rows:19px 22px 17px 20px}#player-card #career-state{font-size:15px}#active-promise{font-size:9px}}

/* Reclaim the empty evaluation row; detailed company evaluation remains in the profile. */
#player-card summary{height:86px!important;grid-template-rows:19px 23px 17px 14px;padding:4px 8px;gap:1px 8px}#player-card #career-state{font-size:16px;line-height:23px;height:23px}
#player-card .person-bottom{grid-row:2}#player-card #player-salary{grid-column:1;grid-row:3;text-align:left;font-size:11px}#active-promise{grid-row:4;align-self:center}
@media(max-width:360px){#player-card summary{height:80px!important;grid-template-rows:18px 22px 15px 12px;padding:3px 7px}#player-card #career-state{font-size:14px}#player-card .person-bottom{font-size:9px}}
@media(min-width:1000px){#player-card summary{height:98px!important;grid-template-rows:22px 25px 19px 18px}#player-card #career-state{font-size:16px}}

/* 2.0 mobile desk: one compact player file beside one fixed notice slot. */
@media(max-width:799px){
 .game-layout{flex:0 0 auto;min-height:0}
 .play-area{position:relative;display:grid;grid-template-columns:minmax(0,56fr) minmax(0,44fr);grid-template-rows:28px 72px auto auto 14px;column-gap:5px;row-gap:4px;min-height:0;align-content:start}
 .game-toolbar{grid-column:1/-1;grid-row:1;height:28px;min-height:28px}
 .office-sidebar,.office-meta{display:contents}
 #player-card{grid-column:1;grid-row:2;display:block!important}
 .feedback{grid-column:2;grid-row:2;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:6px 7px;border-left-width:3px;overflow:hidden}
 .feedback-label{display:block;font-size:8px;line-height:12px;margin:0 0 3px;letter-spacing:1px}
 .feedback .status{font-size:10px;line-height:1.4;max-height:4.2em;overflow:hidden;font-weight:600}
 .board{grid-column:1/-1;grid-row:4;width:100%;max-width:100%;margin:0 auto;align-self:start}
 .board-footer{grid-column:1/-1;grid-row:5;height:14px;min-height:14px;margin:0;line-height:14px}
 .people-cards{margin:0!important;gap:0!important}
 #player-card summary{height:72px!important;min-height:72px;padding:4px 6px;gap:0;overflow:hidden;position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:18px 23px 17px}
 #player-card .person-top{grid-column:1/-1;grid-row:1;min-height:17px;height:17px;font-size:9px;gap:3px}
 #player-card .person-top>b{font-size:9px;max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #player-card .person-top small{display:none}
 #player-card .person-top .job-tag{padding:1px 4px}.person-top .job-tag b{font-size:10px}
 #player-card #career-state{grid-column:1;grid-row:2;height:22px;min-height:22px;line-height:22px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #player-card #player-salary{grid-column:1;grid-row:3;height:15px;min-height:15px;line-height:15px;font-size:9px;text-align:left}
 #player-card .person-bottom{grid-column:2;grid-row:2/4;align-self:center;min-height:0;height:34px;gap:3px;font-size:8px;justify-content:flex-end}
 #player-card .person-bottom strong{font-size:15px}#player-card #card-player{width:22px;height:24px}#player-card #active-promise{position:absolute;left:5px;right:48px;bottom:1px;height:11px;line-height:11px;font-size:7.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #player-card .discipline-badge,#player-card .pending-badge,#player-card .persona-tag{display:none!important}
 .event-toast{inset:0 auto auto 0!important;transform:none;width:100%;max-width:100%;height:auto;max-height:none;min-height:100%;padding:7px 8px;border-left-width:4px;border-radius:0;overflow:hidden;box-shadow:none}
 .event-toast .event-label{font-size:8px;letter-spacing:1px}.event-toast strong{font-size:15px;line-height:1.2;margin:2px 0}.event-toast p{font-size:9px;line-height:1.35}.event-toast .event-saying{font-size:8px;line-height:1.3;margin-top:2px}.event-toast small{position:absolute;right:5px;bottom:2px;font-size:7px}
 .event-toast[data-level="1"]{padding:6px 7px}.event-toast[data-level="1"] strong{font-size:12px}
}
@media(max-width:360px){
 .play-area{grid-template-columns:minmax(0,58fr) minmax(0,42fr);grid-template-rows:26px 64px auto auto 14px;column-gap:4px;row-gap:3px}
 #player-card summary{height:64px!important;min-height:64px;padding:3px 5px;grid-template-rows:16px 21px 15px}
 #player-card .person-top{height:16px;min-height:16px}
 #player-card #career-state{height:21px;min-height:21px;line-height:21px;font-size:12px}
 #player-card .person-bottom{height:31px}#player-card #card-player{width:20px;height:22px}
 .feedback{padding:4px 6px}.feedback .status{font-size:9px;line-height:1.35}.feedback-label{margin-bottom:1px}
 .event-toast strong{font-size:13px}.event-toast p{font-size:8px}
}
/* Tall iPhones use the lower safe area for the persistent action bar. */
@media(max-width:799px) and (min-height:850px){
 .secondary-controls{margin-top:auto;margin-bottom:0}
}

/* 2.0.5: one player card, recent consequential notices, quiet facilities. */
.feedback.showing-event>.status,.feedback.showing-event>.feedback-label{visibility:hidden}
.feedback .status{white-space:pre-line}
.report-core{grid-template-columns:repeat(auto-fit,minmax(85px,1fr))}
@media(max-width:799px){
 .play-area{grid-template-rows:28px 88px auto auto 24px}
 #player-card summary{height:88px!important;min-height:88px;grid-template-rows:19px 26px 19px;padding:5px 7px}
 #player-card .person-top,#player-card .person-top>b{font-size:11px}
 #player-card #player-salary{font-size:11px;height:18px;line-height:18px}
 #player-card #active-promise{left:7px;right:7px;bottom:2px;font-size:10px;line-height:14px;height:14px}
 .feedback .status{font-size:11px;line-height:1.5;max-height:4.5em}
 .feedback-label{font-size:10px}
 .board-footer{height:24px;min-height:24px;line-height:12px;font-size:10px}
 .feedback:has(~.board) .event-toast p{font-size:11px}
 .event-toast .event-saying{display:none}
}
@media(max-width:360px){
 .play-area{grid-template-rows:26px 80px auto auto 24px}
 #player-card summary{height:80px!important;min-height:80px;padding:3px 5px;grid-template-rows:18px 23px 18px}
 .feedback .status{font-size:10px}
}

/* KPI uses the existing two-line footer; showing it never moves the board. */
.board-footer.has-kpi #npc-brief{white-space:pre-line;line-height:12px;font-size:11px;max-width:100%;overflow:hidden}
.board-footer.has-kpi #save-status{display:none}
@media(min-width:800px){.board-footer{min-height:26px;height:26px}}

/* Inventory and destinations share the trophy; all hints derive from live stock. */
#player-card #player-salary{grid-column:1/-1;display:flex;align-items:center;gap:5px;white-space:nowrap}
#player-card .person-bottom{grid-row:2;height:23px}
#report-stock{display:inline-flex;align-items:center;gap:2px;font-weight:700}
#report-stock .ink-icon{width:11px;height:12px;flex-shrink:0}
.report-ready-badge{position:absolute;z-index:5;left:1px;top:1px;display:flex;align-items:center;gap:1px;padding:1px 2px;border:1px solid currentColor;border-radius:3px;background:#fff9e9;color:#343c34;font-size:8px;line-height:10px;pointer-events:none}
.report-ready-badge .ink-icon{width:10px;height:10px}
@media(min-width:800px){.report-ready-badge{font-size:10px;line-height:12px}.report-ready-badge .ink-icon{width:12px;height:12px}}

.report-ready-badge{white-space:nowrap;flex-wrap:nowrap}
@media(max-width:360px){.report-ready-badge{font-size:7px;padding:0 1px;line-height:9px}.report-ready-badge .ink-icon{width:8px;height:9px}}

/* Music shares the existing toolbar; it does not add height above the board. */
.toolbar-actions{display:flex;align-items:center;gap:6px;flex:none}
.music-toggle{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:90px;white-space:nowrap}
.music-toggle svg{width:16px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.music-toggle[aria-pressed="true"]{background:#dde4d1;border-color:#75896a;color:#40523c}
#career-time{min-width:0}
@media(max-width:360px){.toolbar-actions{gap:4px}.music-toggle{width:83px}}

.sfx-toggle{width:68px;white-space:nowrap;padding-inline:4px}
.sfx-toggle[aria-pressed="true"]{background:#dde4d1;border-color:#75896a;color:#40523c}
@media(max-width:360px){.sfx-toggle{width:62px}.toolbar-actions .music-toggle{width:77px}}

/* Teaching is a deliberate pause, separate from transient company notices. */
#tutorial-dialog{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 32px);height:fit-content;inset:0;margin:auto;padding:20px;border:1px solid #958366;border-top:5px solid #d8794e;background:#faf2e2;color:#393b31;overflow-y:auto;touch-action:pan-y}
#tutorial-dialog::backdrop{background:#23292155}
.tutorial-heading{display:flex;gap:12px;align-items:center;margin-bottom:15px}.tutorial-heading h2{font-size:23px;line-height:1.3;margin:4px 0 0}.tutorial-heading .eyebrow{font-size:10px;letter-spacing:1px;margin:0}
#tutorial-art{flex:none;width:52px;height:54px;background:#e7ead8;border:1px solid #a7b096;border-radius:5px;padding:4px}#tutorial-art .ink-icon{width:100%;height:100%}
#tutorial-effect,#tutorial-tip{font-size:14px;line-height:1.65;margin:0}.tutorial-advice{background:#ecead6;padding:10px 12px;margin:14px 0}.tutorial-advice>b{font-size:10px;color:#69725c;display:block;margin-bottom:4px}.tutorial-paused{font-size:10px;line-height:1.5;color:#85745c;margin:12px 0!important}#tutorial-continue{min-height:44px;font-size:14px}
.tile.tutorial-focus .tile-face{outline:3px solid #dc7849;outline-offset:2px}
@media(max-height:650px){#tutorial-dialog{padding:14px}.tutorial-heading{margin-bottom:10px}.tutorial-heading h2{font-size:20px}#tutorial-effect,#tutorial-tip{font-size:13px}.tutorial-advice{margin:10px 0}}

/* Exit reports borrow the hierarchy of a personnel notice, not a score dashboard. */
#result-dialog.personnel-letter{background:#f7f1e5;border:1px solid #a88c77;border-top:5px solid #874538}
.personnel-letter .dialog-header{border-bottom:2px solid #984d3b;padding-bottom:10px}.personnel-letter .dialog-header h2{font-family:"Songti SC",SimSun,serif;font-size:26px;letter-spacing:4px;color:#733d31}
.letter-letterhead{display:flex;justify-content:space-between;gap:10px;padding:9px 0;font-size:10px;color:#7f6f5b}.letter-letterhead b{color:#4e4438}.letter-addressee{font-size:12px;font-weight:700;padding:7px 0}.letter-opening{font-size:12px;line-height:1.7}
.letter-person{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-block:1px solid #d3c5af;padding:9px 0;margin:10px 0}.letter-person span{font-size:9px;color:#80725d}.letter-person b{display:block;color:#473c30;font-size:13px;padding-top:3px}
.letter-decision{background:#e9dece;padding:10px 12px;border-left:4px solid #98533f}.letter-decision small{font-size:9px;color:#85715b}.personnel-letter .letter-decision h3{font-size:31px;color:#7f3c30;line-height:1.3;padding:3px 0}.letter-decision p{font-size:11px;color:#77634f}
.letter-section{padding-top:11px}.single-report .letter-section h4{font-size:11px;font-weight:700;color:#524638;margin-bottom:4px}.letter-reason{font-size:13px}.letter-section p{font-size:12px;line-height:1.65;margin-top:3px}.letter-section.good-performance p{color:#853f32;font-weight:700}.letter-company p{color:#7d6a55}
.single-report .letter-afterword{font-family:"Songti SC",SimSun,serif;font-size:15px;font-weight:700;line-height:1.6;border-top:1px dashed #b4a184;padding-top:9px;margin-top:11px}.letter-signature{display:flex;flex-direction:column;align-items:flex-end;gap:3px;font-size:10px;line-height:1.5;padding-top:10px;color:#7b6955}.letter-signature small{font-size:8px;color:#9a8873}
@media(max-height:700px){.personnel-letter .dialog-header h2{font-size:22px}.letter-section{padding-top:5px}.letter-opening,.letter-section p{font-size:11px}.letter-person{padding:6px 0;margin:7px 0}.letter-decision{padding:7px 10px}.personnel-letter .letter-decision h3{font-size:27px}.letter-signature{padding-top:7px}.single-report .letter-afterword{font-size:13px}}

.report-qr{display:flex;align-items:center;gap:7px;width:max-content;max-width:100%;text-decoration:none;color:#726451;font-size:10px}.report-qr svg{width:72px;height:72px;flex:none}.report-qr small{display:block;font-size:9px;margin-top:3px}.letter-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}.letter-bottom .letter-signature{padding-top:0}.single-report:not(.personnel-letter) .report-qr{margin:10px 0 0 auto}
@media(max-height:700px){.report-qr svg{width:66px;height:66px}.letter-bottom{gap:5px;margin-top:6px}.report-qr{gap:3px}.report-qr small{font-size:8px}}
@media(max-height:700px){.letter-addressee{padding:3px 0}.letter-person{padding:4px 0}.single-report .letter-afterword{margin-top:7px;padding-top:6px}}
