: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); }
#meter-delta { font-size: 17px; color: #467453; opacity: 0; margin-left: 7px; }
#meter-delta.show { animation: gain 1s ease-out both; }
#meter-delta.negative, .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; }
.control-desk { display: flex; flex-direction: column; gap: 14px; padding: 17px 20px; background: #fff8e9; border: 1px solid #abae94; box-shadow: 3px 4px 0 #c8ccb5; position: relative; align-self: start; }
.control-desk::before { content: ''; position: absolute; right: 27px; top: -8px; width: 54px; height: 17px; background: #d1d6b9aa; transform: rotate(5deg); }
.sheet-no { color: #74795f; letter-spacing: 2px; font-size: 9px; }
.desk-heading h2 { font-size: 27px; line-height: 1.35; letter-spacing: -1px; margin-top: 8px; }
.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; }
#move-record ol { padding-left: 20px; line-height: 1.8; }
.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; }
  .control-desk { padding: 0; border: 0; box-shadow: none; background: none; gap: 8px; margin-top: 11px; }
  .control-desk::before,.desk-heading { display: none; }
  .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; }
.promotion-notice { position: absolute; top: 12px; left: 12px; right: 12px; padding: 14px; z-index: 6; pointer-events: none; background: #fff3ce; color: #354332; border: 2px solid #756840; border-radius: 5px; box-shadow: 3px 5px 0 #3f472d44; animation: appointment .4s ease-out; }
.promotion-notice[data-success="true"] { border-color: #4a6b41; background: #f4f5d7; }
.promotion-notice > span { display: block; font-size: 10px; letter-spacing: 1px; }
.promotion-notice > strong { display: block; font-size: clamp(24px, 6vw, 36px); margin: 8px 0; }
.promotion-notice p { font-size: 11px; line-height: 1.7; }
#promotion-notice-text { margin-top: 6px; }
#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-card { position: relative; margin-bottom: 8px; background: #e3eaf0; border-left: 3px solid #5f8098; color: #35495a; }
.coworker-card summary { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; min-height: 42px; list-style: none; }
.coworker-card summary::-webkit-details-marker { display: 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-brief { font-size: 9px; }
.coworker-expanded { position: absolute; top: 100%; left: -3px; right: 0; z-index: 9; padding: 12px; border: 1px solid #71899a; background: #f0f5f7; max-height: 300px; overflow-y: auto; font-size: 11px; line-height: 1.8; box-shadow: 2px 4px 0 #35495a44; }
.coworker-expanded ol { padding-left: 18px; margin: 6px 0; }
.coworker-card.deceased { background: #e1ddd5; color: #635e55; border-left-color: #777366; }
.coworker-result { padding: 12px; background: #e6edf0; border: 1px solid #8b9fac; }
.promotion-notice[data-success="death"] { background: #e9e5db; border-color: #645e54; color: #423f39; }
@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; }
#silent-work { font-size: 10px; color: #74654d; border: 1px dashed #a4967d; padding: 1px 5px; margin-left: auto; }
.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; }
#turn-events summary { min-height: 24px; padding: 3px 0 0; font-size: 10px; color: #6e715d; }
#company-brief { font-weight: 400; }
#turn-events-text { position: absolute; z-index: 10; left: -1px; right: -1px; top: 100%; padding: 12px; background: #fff9eb; border: 1px solid #aa9778; max-height: 180px; overflow: auto; font-size: 12px; line-height: 1.8; box-shadow: 2px 4px 0 #35495a33; }
.coworker-card summary { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 5px 8px; }
.coworker-card { margin-bottom: 6px; }
.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); }
 .coworker-brief { display: none; }
 .coworker-card[open] .coworker-brief { display: block; }
 .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; }
 .control-desk { grid-column: 2; grid-row: 3; }
}
/* Keep the detail toggle on the receipt header so a two-line hit stays compact. */
#turn-events summary { position: absolute; top: 3px; right: 9px; min-height: 28px; padding: 3px 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; }

/* Company notices remain above the playing surface. */
.company-state { padding:6px 10px; margin:0 0 6px; border-left:4px solid #ad6848; background:#e8c9b2; font-size:12px; font-weight:700; }
.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) { .company-state { grid-column:1; grid-row:2; } .company-state:not([hidden]) ~ .feedback { grid-row:3; }.company-state:not([hidden]) ~ .board { grid-row:4; }.company-state:not([hidden]) ~ .board-footer { grid-row:5; } }

/* 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;}.person-top #coworker-identity {font-weight:700;}
.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;}
.coworker-card {background:#e9edf0;border-color:#a3afb6;border-top-color:#59778c;color:#334754;}.coworker-card .company-evaluation {color:#687983;}
.coworker-fate {font-size:9px;color:#93563a;line-height:1.3;}.coworker-fate:empty {display:none;}
.persona-tag {font-size:9px;color:#975b40;}
.person-expanded {position:absolute;top:100%;left:-1px;right:-1px;z-index:12;padding:12px;background:#fff7e8;border:1px solid #a99b80;max-height:260px;overflow:auto;box-shadow:2px 4px 0 #453d3222;font-size:11px;line-height:1.7;}
.person-expanded p {margin:0 0 7px;}.coworker-card .person-expanded {background:#edf2f5;}
.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;}.feedback #turn-events summary {font-size:9px;}
.company-state {font-size:11px;line-height:18px;padding:3px 8px;margin-bottom:6px;}
.recent-section {margin-top:12px;min-width:0;}.recent-section h2 {font-size:12px;display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;}.recent-section h2 small {font-size:9px;font-weight:400;color:#8b7a68;}
.event-receipt {padding:7px 10px;margin-bottom:6px;border:1px solid #c8bca3;border-left:3px solid #a98865;background:#f8f0df;font-size:11px;line-height:1.5;}.event-receipt>b {font-size:11px;}.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;}.empty-events {font-size:10px;color:#8c8273;}
.event-receipt[data-scene="layoff"],.event-receipt[data-scene="death"] {border-left-color:#8d3e2e;background:#ecd7c8;}.event-receipt[data-scene="blame"] {border-left-color:#805a4b;}
.control-desk {margin-top:10px;}.desk-heading {display:none;}
.promotion-notice {padding:9px;top:8px;left:8px;right:8px;}.promotion-notice>strong {font-size:22px;margin:4px 0;}
#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;}.company-state {grid-column:1;grid-row:2;}.board {grid-column:1;grid-row:4;}.board-footer {grid-column:1;grid-row:5;}
 .company-state:not([hidden]) ~ .feedback {grid-row:3;}.company-state:not([hidden]) ~ .board {grid-row:4;}.company-state:not([hidden]) ~ .board-footer {grid-row:5;}
 .recent-section {grid-column:2;grid-row:3 / 5;margin:0;}.control-desk {grid-column:2;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;}.coworker-brief {display:block;}
 .recent-section {margin-top:10px;}.event-receipt {padding:6px 9px;}.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;} }
#meter-delta {position:absolute;left:20px;top:-16px;margin:0;font-size:13px;pointer-events:none;}
