/* AI COMPANY game screen — where the windows are and a plain look until art/hud.css (Astra) gives them theirs
   (plans/game-ui-design.md §1 layout, §4 classes). Reads the tokens of game-tokens.css only. */
html[data-aic-surface="game"], html[data-aic-surface="game"] body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #1a1d2b; }
html[data-aic-surface="game"] #aic-root { height: 100%; }

.g-root { position: fixed; inset: 0; overflow: hidden; color: var(--g-text); background: var(--g-world-bg);
  font-family: var(--g-font-body); font-size: var(--g-fs-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.g-root *, .g-root *::before, .g-root *::after { box-sizing: border-box; }
.g-root :focus-visible { outline: 2px solid var(--g-focus); outline-offset: 2px; }
.g-root [hidden] { display: none !important; }
.g-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the world: the whole screen, under everything */
.g-world-host, .g-world { position: absolute; inset: 0; z-index: var(--g-z-world); }
.g-world__canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none;
  background: radial-gradient(ellipse at 50% 45%, #262a3d 0%, var(--g-world-bg) 70%); }
.g-world.is-dragging .g-world__canvas { cursor: grabbing; }
.g-world__canvas:focus-visible { outline: 3px solid var(--g-focus); outline-offset: -3px; }
.g-world__overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-actor { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
/* what is over a head and the name under the feet: each piece placed by the retired 2D world (game-world.js placeOverlays, removed 10/17) (--px/--py from the
   person's feet) — one line right over the head "(ring) ! name … Zzz", the words above it, a short line back to the head
   when it had to make way (QA 5차 1); pieces slide to a new place */
.g-actor > * { position: absolute; left: 0; top: 0; white-space: nowrap; }
.g-actor > :is(.g-nameplate, .g-bubble, .g-thinking, .g-alert, .g-zzz, .g-ringtip) { transform: translate(var(--px, 0px), var(--py, -9999px)); transition: transform 0.2s ease-out; }
.g-actor .g-nameplate { pointer-events: auto; cursor: pointer; }
.g-root .g-actor.is-plate-above .g-nameplate { min-block-size: 18px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.g-root .g-actor .g-nameplate.is-compact { min-block-size: 16px; padding: 0 5px; font-size: 10px; line-height: 16px; }
/* far out and crowded: the "…" a little smaller, still a pill (QA 6차 2: it was hidden) */
.g-root .g-actor.is-slim .g-thinking { gap: 3px; padding: 3px 5px; }
.g-root .g-actor.is-slim .g-thinking > span { inline-size: 4px; block-size: 4px; }
.g-actor > .g-leader { height: 3px; margin-top: -1px; border-radius: 2px; transform-origin: 0 50%; background: #f3dca0; box-shadow: 0 0 0 1px rgba(20, 22, 36, 0.85); pointer-events: none; }
/* the "!" over a person bobs with `translate` (the art's bounce animates `transform`, which took the "!" off its place for its
   first seconds) */
.g-root .g-actor .g-alert { animation-name: g-bob; pointer-events: auto; }
.g-root .g-actor .g-alert, .g-root .g-actor.is-plate-above > .g-alert { inline-size: 24px; block-size: 24px; width: 24px; height: 24px; font-size: 15px; }
.g-root .g-actor .g-thinking { gap: 4px; padding: 4px 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.g-root .g-actor .g-thinking > span { inline-size: 5px; block-size: 5px; animation-iteration-count: infinite; }
.g-actor .g-nameplate.is-covered, .g-actor > .is-covered { visibility: hidden; }
/* the work ring's title (the ring itself is on the canvas) */
.g-actor .g-ringtip { border-radius: 50%; pointer-events: auto; cursor: help; }

/* ---- windows (fallback look; art/hud.css decides the final one) */
.g-window { position: absolute; z-index: var(--g-z-hud); display: flex; flex-direction: column; min-height: 0;
  background: var(--g-win-bg); border: 2px solid var(--g-win-edge); border-radius: var(--g-radius-win);
  box-shadow: inset 0 0 0 1px var(--g-win-trim), inset 1px 1px 0 2px rgba(243, 220, 160, 0.25), var(--g-shadow); }
.g-window__title { display: flex; align-items: center; gap: var(--g-space-2); min-height: var(--g-title-h); padding: 0 var(--g-space-3);
  background: var(--g-title-bg); border-bottom: 1px solid var(--g-win-trim); border-radius: var(--g-radius-win) var(--g-radius-win) 0 0; }
.g-window__heading { margin: 0; font-family: var(--g-font-title); font-size: var(--g-fs-title); font-weight: 800; color: var(--g-text-gold); letter-spacing: 0.02em; }
.g-window__body { display: flex; flex-direction: column; gap: var(--g-space-2); min-height: 0; flex: 1; padding: var(--g-space-3); }

/* the windows are opaque: the office does not show through them (QA 2차 10) */
.g-root .g-window:not(.g-dialog) { background: var(--g-win-bg-solid); }
/* ---- placement (1920 · 1440 · 1280 through the tokens' media steps) */
.g-topbar { top: var(--g-gap); left: var(--g-gap); right: var(--g-gap); height: var(--g-topbar-h); flex-direction: row; align-items: center;
  gap: var(--g-space-4); padding: 0 var(--g-space-4); }
.g-party { top: calc(var(--g-topbar-h) + var(--g-gap) * 2); left: var(--g-gap); width: var(--g-left-w);
  bottom: calc(var(--g-chat-small-h, 176px) + var(--g-gap) * 2); }
.g-quests { top: calc(var(--g-topbar-h) + var(--g-gap) * 2); right: var(--g-gap); width: var(--g-right-w);
  bottom: calc(var(--g-menu-h) + var(--g-gap) * 2); }
.g-menu { right: var(--g-gap); bottom: var(--g-gap); width: var(--g-right-w); height: var(--g-menu-h); }

/* ---- top bar */
.g-topbar__company { font-family: var(--g-font-title); font-size: calc(var(--g-fs-title) + 4px); font-weight: 800; color: var(--g-text-gold); white-space: nowrap; }
.g-topbar__clock { color: var(--g-text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-topbar__spacer { flex: 1; }
.g-topbar__link { font-size: var(--g-fs-small); color: var(--g-text-dim); white-space: nowrap; }
.g-topbar__link[data-state="connected"]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--g-good); }
.g-topbar__link[data-state="core-down"] { color: var(--g-bad); }
.g-stat { display: inline-flex; align-items: baseline; gap: var(--g-space-2); padding: 4px var(--g-space-3); border-radius: var(--g-radius-btn);
  background: var(--g-win-bg-2); border: 1px solid rgba(201, 164, 92, 0.45); white-space: nowrap; }
.g-stat__label { font-size: var(--g-fs-small); color: var(--g-text-dim); }
/* the bar's pieces keep their size — a number never lies over its words (QA 800×600: "오늘 끝낸 업0", "퀘스트" under its badge) */
.g-topbar > :not(.g-topbar__spacer):not(.g-topbar__company) { flex: none; }
.g-topbar__company { min-width: 0; overflow: hidden; }
.g-words--short { display: none; }
@media (max-width: 1100px) {
  .g-topbar { gap: var(--g-space-2); padding: 0 var(--g-space-3); }
  .g-words--long { display: none; }
  .g-words--short { display: inline; }
  .g-stat { padding: 4px var(--g-space-2); gap: 6px; }
}
@media (max-width: 900px) {
  .g-topbar__clock { display: none; }
  .g-topbar__link { font-size: 0; } /* the dot alone says it */
  .g-topbar__link::before { margin-right: 0 !important; }
}
.g-stat__value { font-family: var(--g-font-title); font-size: var(--g-fs-stat); font-weight: 800; font-variant-numeric: tabular-nums; }
.g-stat--good .g-stat__value { color: var(--g-good); }
.g-stat--info .g-stat__value { color: var(--g-info); }
.g-stat--warn .g-stat__value { color: var(--g-warn); }
.g-stat--button { font: inherit; color: inherit; cursor: pointer; align-items: center; }
.g-stat--button:hover { background: var(--g-win-bg-hover); }
.g-stat--button.has-items { border-color: var(--g-warn); box-shadow: 0 0 0 1px rgba(255, 181, 71, 0.35); }

/* ---- party (employees) */
.g-party__list, .g-quests__list { list-style: none; margin: 0; padding: var(--g-space-2); display: flex; flex-direction: column; gap: var(--g-space-2); overflow-y: auto; min-height: 0; flex: 1; }
.g-party__row { display: flex; align-items: center; gap: var(--g-space-3); width: 100%; min-height: 56px; padding: var(--g-space-2);
  font: inherit; color: inherit; text-align: start; cursor: pointer; background: var(--g-win-bg-2); border: 1px solid transparent; border-radius: var(--g-radius-btn); }
.g-party__row:hover { background: var(--g-win-bg-hover); }
.g-party__row[aria-pressed="true"] { border-color: var(--g-accent); box-shadow: inset 0 0 0 1px rgba(242, 181, 68, 0.4); }
.g-party__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.g-party__name { display: flex; align-items: center; gap: 6px; font-family: var(--g-font-title); font-size: var(--g-fs-name); font-weight: 800; color: var(--g-text-gold); }
.g-party__doing { font-size: var(--g-fs-small); color: var(--g-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-portrait { flex: none; width: var(--g-portrait); height: var(--g-portrait); border-radius: 50%; overflow: hidden; border: 2px solid var(--g-win-trim);
  background: radial-gradient(circle at 50% 35%, #3a4166, #20243a); }
.g-portrait__art { width: 44px; height: 44px; display: block; }

/* ---- bars, badges, alerts, bubbles, plates */
.g-bar { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--g-bar-track); overflow: hidden; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5); }
.g-bar__fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--value, 0) * 100%); background: var(--g-info); border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: width 300ms ease-out; }
.g-bar--good .g-bar__fill { background: var(--g-good); }
.g-bar--warn .g-bar__fill { background: var(--g-warn); }
.g-bar--bad .g-bar__fill { background: var(--g-bad); }
.g-bar--idle .g-bar__fill, .g-bar--dim .g-bar__fill { background: #5b5f7a; }
.g-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  font-size: var(--g-fs-small); font-weight: 700; color: var(--g-accent-ink); background: var(--g-text-dim); }
.g-tab[aria-selected="true"] .g-badge { background: var(--g-accent); }
.g-alert { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border-radius: 50%;
  font: 900 14px/1 var(--g-font-title); color: var(--g-alert-ink); background: var(--g-alert); border: 2px solid var(--g-alert-ink);
  cursor: pointer; animation: g-bob 1.2s ease-in-out infinite; }
.g-alert--small, .g-alert--inline { width: 18px; height: 18px; font-size: 12px; animation: none; cursor: inherit; }
.g-actor .g-alert { width: 28px; height: 28px; font-size: 17px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
@keyframes g-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.g-bubble { max-width: 220px; padding: 5px 10px; border-radius: 10px; font-size: var(--g-fs-small); line-height: 1.35; color: var(--g-bubble-ink);
  background: var(--g-bubble-bg); border: 2px solid var(--g-bubble-edge); overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.g-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; margin-left: -5px; background: var(--g-bubble-bg);
  border-right: 2px solid var(--g-bubble-edge); border-bottom: 2px solid var(--g-bubble-edge); transform: rotate(45deg); }
.g-bubble--ambient { border-style: dashed; }
.g-bubble--status { background: #eef4ff; }
.g-nameplate { padding: 2px 8px; border-radius: 999px; font-family: var(--g-font-title); font-size: var(--g-fs-small); font-weight: 700; color: #fff; background: var(--g-plate-bg); }
.g-actor.is-selected .g-nameplate { box-shadow: 0 0 0 2px var(--g-accent); }

/* ---- tabs and buttons */
.g-tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(201, 164, 92, 0.5); overflow-x: auto; scrollbar-width: none; flex: none; }
.g-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--g-space-3); font: inherit; font-family: var(--g-font-title); font-weight: 700;
  color: var(--g-text-dim); background: transparent; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; cursor: pointer; white-space: nowrap; }
.g-tab:hover { color: var(--g-text); background: var(--g-win-bg-2); }
.g-tab[aria-selected="true"] { color: var(--g-text-gold); background: var(--g-win-bg-2); border-color: rgba(201, 164, 92, 0.5); box-shadow: inset 0 -2px 0 var(--g-accent); }
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 var(--g-space-3);
  font: inherit; font-family: var(--g-font-title); font-weight: 700; color: var(--g-text); background: var(--g-win-bg-2);
  border: 1px solid var(--g-win-trim); border-radius: var(--g-radius-btn); cursor: pointer; white-space: nowrap; }
.g-btn:hover { background: var(--g-win-bg-hover); }
.g-btn:active { transform: translateY(1px); }
.g-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.g-btn--primary { color: var(--g-accent-ink); background: var(--g-accent); border-color: #ffd98a; }
.g-btn--primary:hover { background: #ffc65c; }
.g-btn--small { min-height: 26px; padding: 0 var(--g-space-2); font-size: var(--g-fs-small); }

/* ---- quests */
.g-quests__body { padding: 0 var(--g-space-2) var(--g-space-2); gap: 0; }
.g-quests__list { padding: var(--g-space-2) 0; }
.g-quest { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--g-space-2); width: 100%; padding: var(--g-space-2) var(--g-space-3); font: inherit; color: inherit;
  text-align: start; cursor: pointer; background: var(--g-win-bg-2); border: 1px solid transparent; border-left: 3px solid var(--g-info); border-radius: var(--g-radius-btn); }
.g-quest:hover { background: var(--g-win-bg-hover); border-color: rgba(201, 164, 92, 0.4); }
.g-quest > :not(.g-alert) { grid-column: 1 / -1; }
.g-quest--review { border-left-color: var(--g-warn); grid-template-columns: auto 1fr; }
.g-quest--review .g-quest__title { grid-column: 2; }
.g-quest--good { border-left-color: var(--g-good); }
.g-quest--bad { border-left-color: var(--g-bad); }
.g-quest--warn { border-left-color: var(--g-warn); }
.g-quest--dim { border-left-color: #5b5f7a; }
/* the stopped ones (cancelled, skipped) under 완료, apart and dimmed (QA 2차 9 · 3차 7) */
.g-quest.is-stopped { opacity: 0.6; }
.g-quests__part { margin: var(--g-space-2) 0 0; padding: 0 2px; font-size: var(--g-fs-small); font-weight: 700; color: var(--g-text-dim); list-style: none; }
/* the chosen tab: gold (QA 3차 8: the chosen one looked dimmer than the others) */
.g-root .g-tab[aria-selected="true"] { background: var(--g-accent); color: var(--g-accent-ink); border-color: var(--g-accent); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.g-root .g-tab[aria-selected="true"] .g-badge { background: var(--g-accent-ink); color: var(--g-accent); }
.g-root .g-tab[aria-selected="true"] .g-tab__dots { color: var(--g-accent-ink); }
/* cards in the game: the game's gold buttons; the 원고 card's plain words and its folder button; a decided card's line */
.g-dialog .aic-request-card button.aic-primary { background: var(--g-accent); color: var(--g-accent-ink); border: 1px solid var(--g-win-trim-hi, #f3dca0);
  border-radius: var(--g-radius-btn); font-family: var(--g-font-title); font-weight: 800; padding: 6px 16px; }
.g-dialog .aic-request-card button.aic-primary:hover:not(:disabled) { filter: brightness(1.08); }
.g-card-guide { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 6px; padding: 10px 12px; border-radius: var(--g-radius-btn);
  background: rgba(242, 181, 68, 0.1); border: 1px solid rgba(242, 181, 68, 0.45); color: var(--g-text); font-size: var(--g-fs-small); line-height: 1.55; }
.g-card-guide p { margin: 0; }
.g-card-done { margin: 0; padding: 10px 12px; border-radius: var(--g-radius-btn); background: rgba(95, 211, 141, 0.12); border: 1px solid rgba(95, 211, 141, 0.45); color: var(--g-text); }
.g-quest__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g-quest__who { font-size: var(--g-fs-small); color: var(--g-text-dim); }
.g-empty { margin: var(--g-space-2) 0; color: var(--g-text-dim); font-size: var(--g-fs-small); }

/* ---- chat (사장님 10/10: long answers must be readable) — small: a strip at the bottom left; large: a tall window on the right */
.g-chat { left: var(--g-gap); bottom: var(--g-gap); width: var(--g-chat-w); }
.g-chat[data-mode="small"] { height: auto; max-height: var(--g-chat-small-h, 176px); }
.g-chat[data-mode="large"] { left: auto; right: var(--g-gap); top: calc(var(--g-topbar-h) + var(--g-gap) * 2); bottom: var(--g-gap);
  width: var(--g-chat-large-w, clamp(520px, 33vw, 640px)); max-width: calc(100% - var(--g-gap) * 2 - 96px); height: auto; z-index: calc(var(--g-z-hud) + 1); }
.g-root .g-chat[data-mode="large"][style*="--g-chat-large-h"] { top: auto; height: min(var(--g-chat-large-h), calc(100% - var(--g-topbar-h) - var(--g-gap) * 3)); }
.g-root .g-chat__head { gap: var(--g-space-2); }
.g-chat__who { font-size: var(--g-fs-small); color: var(--g-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-chat__spacer { flex: 1; }
.g-chat__body { padding: var(--g-space-2) var(--g-space-3) var(--g-space-2); gap: var(--g-space-2); }
.g-chat[data-mode="small"] .g-chat__tabs, .g-chat[data-mode="small"] .g-chat__meeting, .g-chat[data-mode="small"] .g-chat__grip,
.g-chat[data-mode="small"] .g-chat__hint, .g-chat[data-mode="small"] .g-chat__jump, .g-chat[data-mode="small"] .g-chat__editor { display: none; }
.g-chat__logwrap { position: relative; flex: 1; min-height: 0; display: flex; }
.g-chat__log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--g-space-2) var(--g-space-3);
  background: rgba(10, 12, 24, 0.55); border-radius: var(--g-radius-btn); border: 1px solid rgba(201, 164, 92, 0.25);
  display: flex; flex-direction: column; gap: var(--g-space-3); font-family: var(--g-font-body); font-size: 15px; line-height: 1.6;
  overflow-anchor: none; /* the end is kept by game-chat.js (stuck): the browser's own anchoring would move it on a resize (QA 3차 4) */ }
/* small: two rows of exactly one line each — nothing above shows half (10/10 QA) */
.g-root .g-chat[data-mode="small"] .g-chat__body { padding: 6px var(--g-space-3) 8px; gap: 4px; }
.g-chat[data-mode="small"] .g-chat__log { max-height: none; overflow: hidden; gap: 0; padding: 2px var(--g-space-2); font-size: var(--g-fs-small); line-height: 22px; }
/* …and those two rows always (QA 2차 8·3차 3): the log never gives up its height; "답을 쓰는 중" and the line under the box sit
   on the "받는 사람" line (game-chat.js placeLines) */
.g-chat[data-mode="small"] .g-chat__logwrap { flex: none; min-width: 0; max-width: 100%; overflow: hidden; }
/* (the log's own flex is its width — the wrap is a row: it takes the wrap's width, never its one-line content's, 456630fb) */
.g-chat[data-mode="small"] .g-chat__log { flex: 1 1 0; min-width: 0; max-width: 100%; box-sizing: border-box; height: 50px; }
.g-chat[data-mode="small"] { overflow: hidden; }
.g-chat[data-mode="small"] .g-chat__formhead { justify-content: flex-start; min-width: 0; overflow: hidden; white-space: nowrap; }
.g-chat[data-mode="small"] .g-chat__to { flex: 0 1 auto; min-width: 0; }
.g-chat[data-mode="small"] .g-chat__formhead .g-chat__typing, .g-chat[data-mode="small"] .g-chat__formhead .g-chat__note {
  flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-chat[data-mode="small"] .g-chat__formhead .g-chat__note:not(:empty)::before { content: "· "; }
.g-chat__jump { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); box-shadow: var(--g-shadow); }
.g-chat__empty { margin: auto 0; color: var(--g-text-dim); text-align: center; }
.g-chat__empty .g-btn { margin-top: var(--g-space-2); }
/* one message: portrait, a head line (name · AI · time), the whole text — the owner's on the right in gold */
.g-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px var(--g-space-2); align-items: start; }
.g-msg__face .g-portrait { width: 40px; height: 40px; }
.g-msg__face .g-portrait__art { width: 36px; height: 36px; }
.g-msg__bubble { min-width: 0; padding: 8px 12px 10px; border-radius: 10px; background: rgba(38, 43, 68, 0.92); border: 1px solid rgba(201, 164, 92, 0.22);
  border-left: 3px solid var(--g-band, rgba(108, 196, 255, 0.7)); }
.g-msg__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 2px; }
.g-msg__name { font-family: var(--g-font-title); font-size: 14px; color: var(--g-text-gold); }
.g-msg__ai { font-size: 11px; color: var(--g-text-dim); padding: 0 6px; border: 1px solid rgba(185, 179, 201, 0.4); border-radius: 999px; }
.g-msg__time { margin-left: auto; flex: none; white-space: nowrap; font-size: 11px; color: var(--g-text-dim); font-variant-numeric: tabular-nums; }
.g-msg__text { color: var(--g-text); overflow-wrap: anywhere; white-space: normal; }
.g-msg__note { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--g-text-dim); opacity: 0.85; }
.g-msg--owner { grid-template-columns: minmax(0, 1fr) 40px; }
.g-msg--owner .g-msg__face { grid-column: 2; grid-row: 1; }
.g-msg--owner .g-msg__bubble { grid-column: 1; grid-row: 1; justify-self: end; max-width: 88%; background: rgba(242, 181, 68, 0.16);
  border-color: rgba(242, 181, 68, 0.45); border-left-width: 1px; border-right: 3px solid var(--g-accent); }
.g-msg--owner .g-msg__text { white-space: pre-wrap; }
.g-msg--card .g-msg__bubble { background: rgba(255, 181, 71, 0.12); border-left-color: var(--g-warn); }
.g-msg--card .g-msg__text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.g-msg--system { display: flex; justify-content: flex-start; align-items: baseline; gap: 8px; color: var(--g-text-dim); font-size: var(--g-fs-small); }
/* a long notice too: on the left like the others, its time kept on the right (보조 8 cb736680: a long one went centred, no time) */
.g-msg__system { margin: 0; min-width: 0; flex: 0 1 auto; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
/* a notice repeated on one day, folded: "개발팀 1호 출근 6번 · 펼치기" */
.g-msg__dot { flex: none; }
.g-root .g-msg__fold { flex: none; min-height: 22px; padding: 0 8px; font-size: 11px; }
.g-msg--run .g-msg__system, .g-msg--group .g-msg__system { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a program's message in an employee's name (10/17): their bubble, a quiet "자동 알림" mark, [업무 보기] under the words */
.g-msg__auto { opacity: 0.8; }
.g-msg--report .g-msg__text p { white-space: pre-line; } /* the program's line breaks are meant: what happened · what to do · the address */
.g-root .g-msg__open { margin-top: 6px; }
.g-chat[data-mode="small"] .g-msg__open { display: none; }
/* the day between lines (10/10 QA: times of different days looked mixed) */
.g-chat__day { flex: none; display: flex; align-items: center; gap: var(--g-space-2); margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--g-text-gold); }
.g-chat__day::before, .g-chat__day::after { content: ""; flex: 1; border-top: 1px solid rgba(201, 164, 92, 0.32); }
.g-root .g-portrait--owner { inline-size: 40px; block-size: 40px; width: 40px; height: 40px; padding: 0; border: 2px solid var(--g-win-trim); border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font: 800 12px/1 var(--g-font-title); color: var(--g-accent-ink); }
.g-portrait--owner { display: inline-grid; place-items: center; font: 800 12px/1 var(--g-font-title); color: var(--g-accent-ink);
  background: radial-gradient(circle at 50% 35%, #ffd98a, #e09a2c) !important; }
.g-chat[data-mode="small"] .g-msg { display: flex; align-items: center; gap: 6px; flex: none; height: 22px; overflow: hidden; }
.g-chat[data-mode="small"] .g-msg__face, .g-chat[data-mode="small"] .g-msg__time, .g-chat[data-mode="small"] .g-msg__note,
.g-chat[data-mode="small"] .g-msg__fold, .g-chat[data-mode="small"] .g-msg__dot { display: none; }
.g-chat[data-mode="small"] .g-msg__bubble { display: flex; align-items: center; flex: 1; min-width: 0; height: 22px; padding: 0; margin: 0;
  background: none; border: 0; max-width: none; overflow: hidden; white-space: nowrap; }
.g-chat[data-mode="small"] .g-msg__head { display: inline-flex; flex: none; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0 6px 0 0; white-space: nowrap; }
.g-chat[data-mode="small"] .g-msg__ai { line-height: 16px; }
.g-chat[data-mode="small"] .g-msg__text { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-chat[data-mode="small"] .g-msg__text > * { display: inline; margin: 0; }
.g-chat[data-mode="small"] .g-msg--card .g-btn { min-height: 0; line-height: 18px; padding: 0 6px; }
.g-chat[data-mode="small"] .g-msg--system { justify-content: flex-start; }
.g-chat[data-mode="small"] .g-msg__system { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
/* the long answers: Markdown as written */
.g-msg__text > :first-child { margin-top: 0; }
.g-msg__text > :last-child { margin-bottom: 0; }
.g-msg__text p { margin: 0 0 0.6em; }
.g-msg__text h1, .g-msg__text h2, .g-msg__text h3, .g-msg__text h4 { margin: 0.8em 0 0.35em; font-family: var(--g-font-title); color: var(--g-text-gold); line-height: 1.35; }
.g-msg__text .h { margin: 0.8em 0 0.35em; font-family: var(--g-font-title); font-weight: 800; font-size: 16px; color: var(--g-text-gold); line-height: 1.35; }
.g-msg__text h1 { font-size: 19px; } .g-msg__text h2 { font-size: 17px; } .g-msg__text h3, .g-msg__text h4 { font-size: 15.5px; }
.g-msg__text ul, .g-msg__text ol { margin: 0.2em 0 0.6em; padding-left: 1.4em; }
.g-msg__text li + li { margin-top: 0.15em; }
.g-msg__text code { font-family: Consolas, "D2Coding", monospace; font-size: 0.92em; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); }
.g-msg__text pre { margin: 0.4em 0 0.7em; padding: 10px 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); overflow-x: auto; white-space: pre; }
.g-msg__text pre code { padding: 0; background: none; }
.g-msg__text blockquote { margin: 0.4em 0; padding: 4px 12px; border-left: 3px solid rgba(201, 164, 92, 0.6); color: var(--g-text-dim); }
.g-msg__text hr { border: 0; border-top: 1px solid rgba(201, 164, 92, 0.35); margin: 0.8em 0; }
.g-msg__text a[role="link"] { color: var(--g-info); text-decoration: underline; cursor: pointer; }
.g-md-table { overflow-x: auto; margin: 0.4em 0 0.7em; }
.g-md-table table { border-collapse: collapse; font-size: 14px; min-width: 60%; }
.g-md-table th, .g-md-table td { padding: 4px 10px; border: 1px solid rgba(201, 164, 92, 0.3); text-align: left; vertical-align: top; }
.g-md-table th { background: rgba(19, 22, 42, 0.8); color: var(--g-text-gold); font-family: var(--g-font-title); }
.g-line__tag { font-size: var(--g-fs-small); font-weight: 700; color: var(--g-accent-ink); background: var(--g-warn); padding: 0 6px; border-radius: 3px; }
/* [회의 열기]: who comes and the topic (10/10 QA) */
.g-meeting-form { display: flex; flex-direction: column; gap: var(--g-space-2); margin: 0; padding: var(--g-space-2); font-size: var(--g-fs-small); }
/* the meetings that ended (QA 3차 10): read again, talk and summary */
.g-meeting-past { display: flex; flex-direction: column; gap: 6px; margin-top: var(--g-space-2); padding: 0 var(--g-space-2) var(--g-space-2); }
.g-meeting-past__title { margin: 0; font: 800 14px/1.4 var(--g-font-title); color: var(--g-text-gold); }
.g-meeting-past__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 6px 10px; text-align: left; font: inherit;
  color: var(--g-text); background: rgba(38, 43, 68, 0.9); border: 1px solid rgba(201, 164, 92, 0.3); border-radius: var(--g-radius-btn); cursor: pointer; }
.g-meeting-past__item:hover, .g-meeting-past__item:focus-visible { border-color: var(--g-accent); outline: none; }
.g-meeting-past__item strong { font-family: var(--g-font-title); color: var(--g-text-gold); }
.g-meeting-past__item span { font-size: var(--g-fs-small); color: var(--g-text-dim); }
.g-chat__meeting.is-past { background: rgba(185, 179, 201, 0.1); border-color: rgba(185, 179, 201, 0.35); }
.g-meeting-form__lead { margin: 0; color: var(--g-text); font-size: 14px; }
.g-meeting-form__people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 6px 8px 8px; border: 1px solid rgba(201, 164, 92, 0.3); border-radius: var(--g-radius-btn); }
.g-meeting-form__people legend { padding: 0 4px; color: var(--g-text-gold); font-weight: 700; }
.g-meeting-form__person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; background: rgba(38, 43, 68, 0.9); cursor: pointer; }
.g-meeting-form__person:has(input:checked) { background: rgba(242, 181, 68, 0.18); box-shadow: inset 0 0 0 1px rgba(242, 181, 68, 0.55); }
.g-meeting-form__person input { margin: 0; accent-color: var(--g-accent); }
.g-root .g-meeting-form__person .g-portrait { inline-size: 24px; block-size: 24px; width: 24px; height: 24px; min-width: 24px; aspect-ratio: 1; border-width: 1px; padding: 0; }
.g-root .g-meeting-form__person .g-portrait__art { width: 22px; height: 22px; }
.g-meeting-form__topicrow { display: flex; align-items: center; gap: var(--g-space-2); }
.g-meeting-form__label { flex: none; color: var(--g-text-gold); font-weight: 700; }
.g-meeting-form__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--g-space-2); }
.g-meeting-form__status { flex: 1; margin: 0; min-width: 0; color: var(--g-text-dim); }
.g-meeting-form__status.is-busy { color: var(--g-info); font-weight: 700; }
.g-meeting-form__status:empty { visibility: hidden; }
/* the meeting's head: topic, people, [회의 끝] */
.g-chat__meeting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--g-space-2); padding: 6px var(--g-space-2);
  border-radius: var(--g-radius-btn); background: rgba(180, 140, 255, 0.12); border: 1px solid rgba(180, 140, 255, 0.4); }
.g-chat__meeting[hidden] { display: none; }
.g-chat__topic { font-family: var(--g-font-title); color: var(--g-text-gold); margin-right: auto; }
.g-chat__people { display: flex; flex-wrap: wrap; gap: 4px; }
.g-chat__person { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 1px; border-radius: 999px; background: rgba(38, 43, 68, 0.9); font-size: var(--g-fs-small); }
.g-root .g-chat__person .g-portrait { inline-size: 24px; block-size: 24px; width: 24px; height: 24px; min-width: 24px; aspect-ratio: 1; border-width: 1px; padding: 0; }
.g-root .g-chat__person .g-portrait__art { width: 22px; height: 22px; }
.g-root .g-msg__face .g-portrait { inline-size: 40px; block-size: 40px; aspect-ratio: 1; padding: 0; }
.g-chat__tabs .g-tab__dots { margin-left: 4px; color: var(--g-info); font-weight: 800; }
/* writing… */
.g-chat__typing { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--g-fs-small); color: var(--g-info); }
.g-chat__typing[hidden] { display: none; }
.g-chat__dots { display: inline-flex; gap: 3px; }
.g-chat__dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: g-dot 1.2s ease-in-out infinite; }
.g-chat__dots i:nth-child(2) { animation-delay: 0.2s; } .g-chat__dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes g-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
/* the line to type in */
.g-chat__form { display: flex; flex-direction: column; gap: 4px; flex: none; }
.g-chat__formhead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--g-space-2); }
.g-chat__to { font-size: var(--g-fs-small); font-weight: 700; color: var(--g-text-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-chat__hint { font-size: 11px; color: var(--g-text-dim); white-space: nowrap; }
.g-chat__row { display: flex; align-items: flex-end; gap: var(--g-space-2); }
.g-chat__input, .g-form__input { flex: 1; min-width: 0; min-height: 36px; padding: 7px 10px; font: inherit; font-family: var(--g-font-body); font-size: 15px; line-height: 1.5;
  color: var(--g-text); background: #12152a; border: 1px solid rgba(201, 164, 92, 0.6); border-radius: var(--g-radius-btn); resize: none; overflow-y: auto; }
.g-chat[data-mode="small"] .g-chat__input { font-size: var(--g-fs-body); }
.g-chat__input::placeholder { color: #8d88a3; }
.g-chat__input:disabled { opacity: 0.6; }
.g-chat__send { min-height: 36px; }
/* the chat's files (10/11): [📎 파일] beside the line, the files waiting to go as chips over it, a card per file in a message */
.g-chat__attach { min-height: 36px; flex: none; white-space: nowrap; }
.g-chat__attach[hidden], .g-chat__files[hidden] { display: none; }
.g-chat__files { display: flex; flex-wrap: wrap; gap: 6px; max-height: 64px; overflow-y: auto; }
.g-chat[data-mode="small"] .g-chat__files { max-height: 30px; flex-wrap: nowrap; overflow: hidden; }
.g-chat .aic-file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 4px 2px 8px; border-radius: 999px;
  font-size: var(--g-fs-small); color: var(--g-text); background: rgba(242, 181, 68, 0.14); border: 1px solid rgba(242, 181, 68, 0.5); }
.g-chat .aic-file-chip.is-up { opacity: 0.75; }
.g-chat .aic-file-chip.is-failed { background: rgba(255, 111, 97, 0.14); border-color: rgba(255, 111, 97, 0.6); }
.g-chat .aic-file-chip__name { min-width: 0; max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.g-chat .aic-file-chip__size { color: var(--g-text-dim); white-space: nowrap; }
.g-chat .aic-file-chip__remove { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; font: inherit; line-height: 20px; cursor: pointer;
  color: var(--g-text); background: rgba(0, 0, 0, 0.3); }
.g-chat .aic-file-chip__remove:hover { background: rgba(0, 0, 0, 0.5); }
.g-chat.is-dropping { outline: 3px dashed var(--g-accent); outline-offset: -6px; }
.g-msg .aic-files { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.g-msg__text[hidden] + .aic-files { margin-top: 0; }
.g-msg .aic-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: var(--g-radius-btn);
  background: rgba(10, 12, 24, 0.55); border: 1px solid rgba(201, 164, 92, 0.35); }
.g-msg .aic-file__icon { grid-row: 1 / span 2; font-size: 24px; line-height: 1; }
.g-msg .aic-file__info { display: flex; flex-direction: column; min-width: 0; }
.g-msg .aic-file__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--g-text-gold); }
.g-msg .aic-file__meta { font-size: 12px; color: var(--g-text-dim); }
.g-msg .aic-file__actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.g-msg .aic-file__btn { min-height: 26px; padding: 0 10px; font: inherit; font-size: var(--g-fs-small); cursor: pointer; color: var(--g-text);
  background: var(--g-win-bg-2); border: 1px solid rgba(201, 164, 92, 0.5); border-radius: var(--g-radius-btn); }
.g-msg .aic-file__btn:hover:not(:disabled) { background: var(--g-win-bg-hover); }
.g-msg .aic-file__btn:disabled { opacity: 0.5; cursor: wait; }
.g-chat__note, .g-form__note { margin: 0; min-height: 0; font-size: var(--g-fs-small); color: var(--g-text-dim); }
.g-chat__note:empty { display: none; }
/* edges to drag (large): width on the left edge, height on the top edge */
.g-chat__grip { position: absolute; z-index: 2; touch-action: none; }
.g-chat__grip--w { left: -5px; top: 12px; bottom: 12px; width: 10px; cursor: ew-resize; }
.g-chat__grip--h { top: -5px; left: 12px; right: 12px; height: 10px; cursor: ns-resize; }
.g-chat__grip:hover, .g-chat.is-resizing .g-chat__grip { background: rgba(242, 181, 68, 0.25); border-radius: 4px; }
/* while the chat is large: the quest window and the employee menu fold away (the top bar's [퀘스트] brings them back),
   the employee list runs to the bottom */
.g-topbar__quests { min-height: 30px; }
.g-topbar__quests[hidden] { display: none; }
.g-root[data-chat="large"] .g-quests, .g-root[data-chat="large"] .g-menu { display: none; }
.g-root[data-chat="large"] .g-party { bottom: var(--g-gap); }
.g-root[data-chat="small"] .g-party { bottom: calc(var(--g-chat-small-h, 176px) + var(--g-gap) * 2); }
@media (max-width: 1600px) {
  .g-root[data-chat="large"] .g-party { width: 72px; }
  .g-root[data-chat="large"] .g-party__text { display: none; }
  .g-root[data-chat="large"] .g-party__row { justify-content: center; padding: 6px; }
  .g-root[data-chat="large"] .g-party .g-window__heading { font-size: var(--g-fs-small); }
}
@media (prefers-reduced-motion: reduce) { .g-chat__dots i { animation: none; opacity: 1; } }

/* ---- employee menu */
.g-menu__head { display: flex; align-items: center; gap: var(--g-space-3); }
.g-menu__head .g-portrait { width: 52px; height: 52px; }
.g-menu__head .g-portrait__art { width: 48px; height: 48px; }
.g-menu__who { display: flex; flex-direction: column; min-width: 0; }
.g-menu__name { font-family: var(--g-font-title); font-size: var(--g-fs-name); color: var(--g-text-gold); }
.g-menu__title, .g-menu__doing { font-size: var(--g-fs-small); color: var(--g-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-menu__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g-space-2); margin-top: auto; }

/* ---- dialog (cards, tasks, giving work, results, status) */
.g-dialog { position: fixed; z-index: var(--g-z-dialog); inset: 0; margin: auto; width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 760px);
  padding: 0; color: var(--g-text); }
.g-dialog::backdrop { background: rgba(5, 6, 14, 0.6); }
.g-dialog:not([open]) { display: none; }
.g-dialog__body { overflow-y: auto; }
.g-dialog__close { margin-left: auto; }
.g-fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.g-fields dt { color: var(--g-text-dim); }
.g-fields dd { margin: 0; overflow-wrap: anywhere; }
.g-subhead { margin: var(--g-space-3) 0 var(--g-space-1); font-family: var(--g-font-title); font-size: var(--g-fs-name); color: var(--g-text-gold); }
.g-checklist { margin: 0; padding-left: 4px; list-style: none; }
.g-checklist .is-done { color: var(--g-good); }
.g-form { display: flex; flex-direction: column; gap: var(--g-space-2); }
.g-form__label { font-family: var(--g-font-title); font-weight: 700; }
.g-form__hint { margin: 0; font-size: var(--g-fs-small); color: var(--g-text-dim); }
.g-form .g-btn--primary { align-self: flex-end; }
.g-cards { display: flex; flex-direction: column; gap: var(--g-space-3); }
/* the shared request card keeps its own look, on a light sheet so its colours read as they were made */
.g-cards > [data-request-id] { border-radius: var(--g-radius-btn); }
/* toasts stack (newest last) instead of replacing each other; an error stays until its [닫기] (10/17 review C3) */
.g-toasts { position: absolute; z-index: var(--g-z-toast); left: 50%; top: calc(var(--g-topbar-h) + var(--g-gap) * 3); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: min(560px, calc(100% - 32px)); pointer-events: none; }
.g-toasts:empty { display: none; }
.g-toast { position: static; margin: 0; display: flex; align-items: center; gap: 12px; max-width: 100%; pointer-events: auto; overflow-wrap: anywhere;
  padding: 8px 16px; border-radius: var(--g-radius-btn); color: var(--g-accent-ink); background: var(--g-accent); font-weight: 700; box-shadow: var(--g-shadow); }
.g-toast--error { color: #7a1d16; background: #fff4f2; border: 1px solid #e3a59b; }
.g-toast__close { flex: none; }
.g-btn--danger { color: #fff; background: #a02c24; border-color: #a02c24; }

/* ---- the company's face: the wordmark in the top bar; the splash over everything until the company answers */
.g-topbar__company { display: inline-flex; align-items: center; gap: 10px; min-height: 28px; }
.g-topbar__name { font-family: var(--g-font-title); font-size: calc(var(--g-fs-title) + 4px); font-weight: 800; color: var(--g-text-gold); white-space: nowrap; }
/* the owner's logo, as given, on a white disc with a 1px gold rim */
.g-emblem { display: inline-grid; place-items: center; flex: none; inline-size: var(--g-emblem, 32px); block-size: var(--g-emblem, 32px); border-radius: 50%;
  background: #fff; border: 1px solid var(--g-win-trim); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); overflow: hidden; }
.g-emblem__img { inline-size: 84%; block-size: 84%; object-fit: contain; display: block; }
.g-wordmark { display: block; block-size: 18px; inline-size: auto; }
.g-splash { position: absolute; inset: 0; z-index: calc(var(--g-z-toast) + 10); display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 38%, #2a3150 0%, #191d31 55%, #12152a 100%); opacity: 1; transition: opacity 600ms ease-out; }
.g-splash.is-gone { opacity: 0; pointer-events: none; }
.g-splash__card { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.g-splash__namebox .g-wordmark { block-size: 40px; }
.g-splash__name { font: 800 30px var(--g-font-title); color: var(--g-text-gold); }
.g-splash__text { margin: 6px 0 0; padding: 8px 18px; border-radius: 999px; font: 700 var(--g-fs-name) var(--g-font-title); color: var(--g-text);
  background: rgba(19, 22, 42, 0.72); border: 1px solid rgba(201, 164, 92, 0.5); }
.g-splash[data-mode="failed"] .g-splash__text { color: #ffd2c4; border-color: rgba(255, 107, 107, 0.6); }
.g-splash__dots { display: inline-flex; gap: 8px; }
.g-splash__dots i { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--g-accent); animation: g-dot 1.2s ease-in-out infinite; }
.g-splash__dots i:nth-child(2) { animation-delay: 0.2s; } .g-splash__dots i:nth-child(3) { animation-delay: 0.4s; }
.g-splash[data-mode="failed"] .g-splash__dots i { animation: none; opacity: 0.4; }
/* ---- narrow: the employee list shows portraits only */
@media (max-width: 1180px) {
  .g-party__text { display: none; }
  .g-party__row { justify-content: center; padding: 6px; }
  .g-party .g-window__heading { font-size: var(--g-fs-small); }
}
@media (prefers-reduced-motion: reduce) {
  .g-root *, .g-root *::before, .g-root *::after { animation: none !important; transition: none !important; }
}

/* ---- over the art's look (art/hud.css comes after this file): places and sizes the game owns */
.g-root .g-topbar { padding: 0 var(--g-space-4) 0 calc(var(--g-space-4) + 4px); gap: var(--g-space-3); }
.g-root .g-topbar__link { padding-right: 4px; }
.g-root .g-window__title { display: flex; align-items: center; gap: var(--g-space-2); }
/* a bubble or a plate sits in a zero-width anchor over the feet: its width is its text's, not the anchor's */
.g-root .g-actor .g-bubble { inline-size: max-content; max-inline-size: 240px; white-space: normal; text-align: center; padding: 5px 10px; font-size: var(--g-fs-small); line-height: 1.35; }
.g-root .g-actor .g-nameplate { inline-size: max-content; max-inline-size: 180px; white-space: nowrap; min-block-size: 22px; padding: 1px 8px; }
/* resting: Zzz floats up over the head */
.g-zzz { display: inline-flex; align-items: flex-end; gap: 1px;
  font: 800 16px/1 var(--g-font-title); color: #cfe3ff; text-shadow: 0 1px 0 #1b2a4a, 0 0 6px rgba(120, 170, 255, 0.6); pointer-events: none; }
.g-zzz > span { display: inline-block; animation: g-zzz 2.4s ease-in-out infinite; }
.g-zzz > span:nth-child(2) { font-size: 13px; animation-delay: 0.4s; }
.g-zzz > span:nth-child(3) { font-size: 10px; animation-delay: 0.8s; }
@keyframes g-zzz { 0% { opacity: 0; translate: 0 4px; } 30% { opacity: 1; } 100% { opacity: 0; translate: 6px -14px; } }
.g-actor.is-resting .g-nameplate { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) { .g-zzz > span { animation: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .g-actor > * { transition: none; } }
