/* ============================================================
   ゲーム型AIオフィス画面のスタイル
   テーマ: 白 × ピンク × ゴールド / 丸ゴシック / ふわっと浮かぶカード
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --ink: #4a3f43;
  --ink-soft: #8a7f84;
  --pink: #d97b98;
  --pink-mid: #e8a7bc;
  --pink-pale: #fdeef3;
  --pink-line: #f0cdd9;
  --gold: #c9a227;
  --gold-dark: #8a6a24;
  --gold-pale: #fbf1d3;
  --green: #6faf7c;
  --green-dark: #3d7a4d;
  --red: #d94f5c;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-shadow: 0 8px 24px rgba(217, 123, 152, 0.16), 0 2px 6px rgba(74, 63, 67, 0.06);
  --panel-w: 322px;

  /* ここから、theme.jsonからカスタマイズできる追加項目(標準値=ピンク×ゴールド) */
  --page-bg-1: #fff8fa;
  --page-bg-2: #fceef2;
  --page-bg-3: #fbeaee;
  --floor-bg: #ffffff;
  --floor-grid: rgba(201, 162, 39, 0.32);
  --floor-grad-a: #ffffff;
  --floor-grad-b: #fbf8f1;
  --floor-grad-c: #fffdf6;
  --floor-shadow: rgba(201, 162, 39, 0.16);
  --room-border: #b8860b;
  --room-tint-a: rgba(201, 162, 39, 0.22);
  --room-tint-b1: rgba(255, 245, 248, 0.7);
  --room-tint-b2: rgba(232, 167, 188, 0.28);
  --room-shadow: rgba(201, 130, 155, 0.18);
  --area-bg-a: rgba(240, 205, 217, 0.55);
  --area-bg-b: rgba(240, 205, 217, 0.25);
  --mtg-area-bg: #f3d3dc;
  --mtg-area-border: rgba(217, 123, 152, 0.4);
  --card-hover-shadow: rgba(217, 123, 152, 0.24);
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "HG Maru Gothic M-PRO",
    "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--page-bg-1) 0%, var(--page-bg-2) 60%, var(--page-bg-3) 100%);
  overflow: hidden;
}

[hidden] { display: none !important; }

/* ============ カードの登場アニメ(読込時にふわっと順番に) ============ */

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ オフィスステージ(全画面の背景+フロア) ============ */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.floor {
  position: absolute;
  top: 64px;
  left: calc(var(--panel-w) + 32px);
  right: 16px;
  bottom: 158px;
  min-height: 260px;
  border-radius: 24px;
  background-color: var(--floor-bg);
  background-image:
    repeating-linear-gradient(0deg, var(--floor-grid) 0 1.5px, transparent 1.5px 100px),
    repeating-linear-gradient(90deg, var(--floor-grid) 0 1.5px, transparent 1.5px 100px),
    linear-gradient(135deg, var(--floor-grad-a) 0%, var(--floor-grad-b) 55%, var(--floor-grad-c) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.05),
    0 14px 34px var(--floor-shadow);
  overflow: hidden;
  animation: cardIn 0.6s ease both;
}

/* ============ 浮いているヘッダー ============ */

.hud-header {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--pink-line);
  box-shadow: var(--card-shadow);
  animation: cardIn 0.5s ease both;
}

.hud-header h1 {
  font-size: 15px;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.updated-at {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  display: none; /* 時刻は正確性を担保しないため非表示(先生判断・2026-07-23) */
}

/* ============ 左のカード列 / 下のバー ============ */

.hud-panel {
  position: fixed;
  top: 64px;
  left: 16px;
  width: var(--panel-w);
  bottom: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.hud-footer {
  position: fixed;
  left: calc(var(--panel-w) + 32px);
  right: 16px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============ 共通のカード ============ */

.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--pink-line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--card-hover-shadow), 0 3px 8px rgba(74, 63, 67, 0.08);
}

/* 読込時に順番にふわっと登場 */
.hud-panel .card:nth-of-type(1) { animation: cardIn 0.5s ease 0.08s both; }
.hud-panel .card:nth-of-type(2) { animation: cardIn 0.5s ease 0.16s both; }
.hud-panel .card:nth-of-type(3) { animation: cardIn 0.5s ease 0.24s both; }
.hud-panel .card:nth-of-type(4) { animation: cardIn 0.5s ease 0.32s both; }
.hud-footer .card:nth-of-type(1) { animation: cardIn 0.5s ease 0.40s both; }
.hud-footer .card:nth-of-type(2) { animation: cardIn 0.5s ease 0.48s both; }

.card-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
}

.card-head-2row {
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title { flex: none; }

.chev {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  color: var(--pink);
  transition: transform 0.3s ease;
}

.card.open .chev { transform: rotate(180deg); }
.card.open .chev-up { transform: rotate(180deg); }

/* 開閉する詳細部分(グリッドの行の高さ 0fr→1fr でふわっと開く) */
.card-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.card-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px;
}

.card.open .card-body { grid-template-rows: 1fr; }

.card.open .card-inner {
  overflow-y: auto;
  max-height: 38vh;
  padding-bottom: 14px;
}

/* ============ タスクボード集計チップ ============ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.chip b { font-size: 11px; }

.chip-todo   { color: #6b6258; background: #f2ede3; }
.chip-doing  { color: #a85b12; background: #fbe4cc; }
.chip-review { color: var(--gold-dark); background: var(--gold-pale); }
.chip-done   { color: var(--green-dark); background: #ddf0e2; }

.task-group-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-group { border-top: 1px dashed var(--pink-line); padding-top: 8px; }
.task-group:first-child { border-top: none; padding-top: 2px; }

.task-group-review .task-group-head { color: var(--gold-dark); }
.task-group-hold .task-group-head { color: #786d80; }

.task-group-count {
  font-size: 10px;
  background: var(--pink-pale);
  color: var(--pink);
  border-radius: 999px;
  padding: 0 7px;
}

.task-card {
  background: #fff;
  border: 1px solid #f5e6ec;
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.task-id { font-size: 10px; color: #a49d8c; }
.task-title { font-size: 12px; margin: 3px 0 5px; line-height: 1.5; }
.task-owner { font-size: 10px; color: var(--ink-soft); }

.progress-bar {
  height: 4px;
  border-radius: 999px;
  background: #f2e8dc;
  margin-top: 7px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-mid), var(--gold));
  border-radius: 999px;
}

.task-hint {
  margin-top: 6px;
  font-size: 10px;
  color: #a85b12;
  background: #fbe4cc;
  padding: 4px 6px;
  border-radius: 6px;
}

/* ============ 教室目標カード ============ */

.goal-head-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #f2e8dc;
  overflow: hidden;
}

.goal-head-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink-mid), var(--gold));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.goal-head-num {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
}

.goal-row { display: flex; align-items: baseline; gap: 8px; }

.goal-tag {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #fff6df;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 999px;
  padding: 2px 10px;
  min-width: 58px;
  text-align: center;
}

.goal-text { font-size: 12px; line-height: 1.5; }

.goal-progress { margin-top: 2px; }

.goal-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.goal-progress-num { font-weight: 700; color: var(--gold-dark); }

.goal-bar { height: 8px; margin-top: 0; }

/* ============ 件数バッジ(決裁トレイ・成果物BOX) ============ */

.count-badge {
  flex: none;
  min-width: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}

.badge-gold { color: var(--gold-dark); background: var(--gold-pale); }
.badge-gold.attention {
  color: #fff6df;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.5);
}
.badge-pink { color: var(--pink); background: var(--pink-pale); }

.panel-empty {
  font-size: 12px;
  color: #a49d8c;
  padding: 4px 2px;
}

/* ============ 決裁トレイ ============ */

.approval-card {
  background: #fffaf2;
  border: 1px solid #ecd9a8;
  border-radius: 10px;
  padding: 10px 12px;
}

.approval-title { font-size: 12px; font-weight: 700; line-height: 1.5; }

.approval-meta { font-size: 10px; color: var(--ink-soft); margin-top: 3px; }

.approval-note {
  font-size: 11px;
  color: #6b6258;
  background: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  margin-top: 6px;
  line-height: 1.6;
}

.approval-actions { display: flex; gap: 6px; margin-top: 9px; }

.btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12); }
.btn:active { transform: translateY(0); }

.btn-approve {
  color: #fff;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-color: #b8860b;
}

.btn-fix { color: #8a4a5e; background: var(--pink-pale); border-color: var(--pink-line); }
.btn-hold { color: #6b6258; background: #f4f1ea; border-color: #ddd5c4; }

/* ============ 成果物BOX ============ */

.deliverable-card {
  font-family: inherit;
  text-align: left;
  background: #fdf7f9;
  border: 1px solid #f0d5db;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}

.deliverable-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 6px rgba(201, 162, 39, 0.2);
  transform: translateY(-1px);
}

.deliverable-name { font-size: 12px; font-weight: 700; color: var(--ink); }

.deliverable-path {
  font-size: 10px;
  color: #8a4a5e;
  margin-top: 3px;
  word-break: break-all;
}

.deliverable-meta { font-size: 10px; color: #a49d8c; margin-top: 3px; }

/* ============ ワンタップ指示 ============ */

.quick-card { padding: 10px 14px 12px; }

.quick-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-note {
  font-weight: 400;
  font-size: 10px;
  color: var(--ink-soft);
  margin-left: 6px;
}

.quick-buttons { display: flex; flex-wrap: wrap; gap: 7px; }

.quick-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #8a4a5e;
  background: linear-gradient(180deg, #fff 0%, var(--pink-pale) 100%);
  border: 1.5px solid var(--pink-line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}

.quick-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 6px rgba(201, 162, 39, 0.25);
  transform: translateY(-1px);
}

.quick-btn:active { transform: translateY(0); }

/* ============ 活動ログ(ティッカー+展開) ============ */

.ticker-card { position: relative; }

.ticker-card .card-head { gap: 10px; }

.ticker-label { flex: none; }

.ticker-text {
  flex: 1;
  min-width: 0;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes tickerIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ticker-text.ticker-in { animation: tickerIn 0.5s ease; }

/* 展開部分は上に向かってポップアップ */
.ticker-card .card-body {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--pink-line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ticker-card.open .card-body {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ticker-card .card-inner {
  overflow-y: auto;
  max-height: 42vh;
  padding: 14px;
}

.log-item { border-left: 3px solid var(--pink-line); padding: 2px 0 2px 10px; }

.log-head { display: flex; gap: 8px; align-items: baseline; }

.log-time { font-size: 10px; color: #a49d8c; display: none; } /* 時刻は正確性を担保しないため非表示(先生判断・2026-07-23) */

.log-who { font-size: 12px; font-weight: 700; color: #8a4a5e; }

.log-did { font-size: 12px; margin-top: 2px; line-height: 1.5; }

.log-next { font-size: 11px; color: var(--gold-dark); margin-top: 2px; }

/* ============ 読み込み失敗時の復旧案内(最前面) ============ */

.load-error {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 92vw);
  z-index: 60;
  padding: 14px 18px;
  background: #fdecee;
  border: 2px solid var(--red);
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: 0 10px 30px rgba(217, 79, 92, 0.25);
}

.load-error-title { font-weight: 700; color: #b23342; margin-bottom: 6px; }

.load-error-body ol { margin: 6px 0 0; padding-left: 20px; }

.load-error-body code {
  background: #fff;
  border: 1px solid #f0c4ca;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}

/* ============ オフィスの中身(壁・窓・家具) ============ */

.wall-band {
  position: absolute;
  top: 0;
  height: 78px;
  background: linear-gradient(180deg, var(--wall-band, #f6e3e8) 0%, var(--wall-band, #f6e3e8) 88%, transparent 100%);
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.35);
}

.window {
  position: absolute;
  width: 100px;
  height: 62px;
  border: 7px solid #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.15),
    inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.window.gold {
  border-color: var(--gold);
  box-shadow:
    0 3px 12px rgba(139, 101, 20, 0.25),
    inset 0 0 0 2px rgba(139, 101, 20, 0.2);
}

.window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.18) 22%,
    transparent 40%
  );
  pointer-events: none;
}

.window .window-sill {
  position: absolute;
  left: -7px;
  right: -7px;
  bottom: -9px;
  height: 9px;
  background: linear-gradient(180deg, #ffffff, #e7e0d2);
  border-radius: 0 0 4px 4px;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.window .sky { position: absolute; inset: 0; }

.window.day .sky { background: linear-gradient(to bottom, #8ec9ef, #dff1fa); }
.window.night .sky { background: linear-gradient(to bottom, #2b2a4a, #4a3f66); }

.window .sun {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffe38a;
  box-shadow: 0 0 10px 3px rgba(255, 227, 138, 0.6);
}

.window .moon {
  position: absolute;
  top: 8px;
  right: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f5f1e0;
  box-shadow: 0 0 8px 2px rgba(245, 241, 224, 0.4);
}

.window .cloud {
  position: absolute;
  width: 20px;
  height: 8px;
  background: #fff;
  border-radius: 6px;
  opacity: 0.85;
}

.window .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
}

.window .skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 2px;
}

.window .bld {
  flex: 1;
  background: #2c2a3a;
  border-radius: 1px 1px 0 0;
}

.window.night .bld {
  background: #241f33;
  box-shadow: 0 -4px 0 -3px rgba(255, 227, 138, 0.8);
}

.room {
  position: absolute;
  left: 0;
  top: 0;
  border-right: 8px solid var(--room-border);
  border-bottom: 8px solid var(--room-border);
  border-top-left-radius: 24px;
  background:
    radial-gradient(circle, var(--room-tint-a) 1px, transparent 1.6px) 0 0 / 16px 16px,
    linear-gradient(160deg, var(--room-tint-b1), var(--room-tint-b2));
  box-shadow: inset 0 0 34px var(--room-shadow);
}

.room-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff6df;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* 先生室の入口ドア(右の壁に付く木のドア。プレート+ノブ+マット付き) */
.door {
  position: absolute;
  width: 18px;
  height: 46px;
  background: linear-gradient(90deg, #dfc094, #c9a06a);
  border: 2px solid #8a6a3f;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.door::before {
  content: "";
  position: absolute;
  inset: 4px 3px;
  border: 1px solid rgba(122, 90, 48, 0.5);
  border-radius: 2px;
}

.door-knob {
  position: absolute;
  right: 2px;
  top: 20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 3px rgba(201, 162, 39, 0.9);
}

.door-plate {
  position: absolute;
  left: 50%;
  top: -17px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff6df;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.door-mat {
  position: absolute;
  width: 30px;
  height: 16px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--door-mat-a, #e8c7cf) 0 4px, var(--door-mat-b, #f3dbe1) 4px 8px);
  border: 1px solid var(--door-mat-border, #d9a8b5);
  opacity: 0.9;
}

.chandelier {
  position: absolute;
  top: 0;
  width: 30px;
  height: 30px;
  transform: translateX(-50%);
}

.chandelier .chain {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 12px;
  background: #b8860b;
  transform: translateX(-50%);
}

.chandelier .body {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 28px;
  height: 13px;
  background: radial-gradient(circle at 50% 0%, #ffe9a8, var(--gold) 75%);
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.chandelier .glow {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 130px;
  height: 90px;
  background: radial-gradient(ellipse at top, rgba(255, 231, 168, 0.4), transparent 72%);
  transform: translateX(-50%);
}

.desk {
  position: absolute;
  width: 46px;
  height: 28px;
  background: #b98a53;
  border-radius: 4px;
  transform: translate(-50%, -50%);
}

.desk::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 12px;
  background: #5c5647;
  border-radius: 2px;
}

.desk-big {
  width: 62px;
  height: 34px;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.desk-big::before { width: 26px; height: 15px; }

.rug {
  position: absolute;
  width: 130px;
  height: 72px;
  background: var(--pink-mid);
  border: 4px solid var(--gold);
  opacity: 0.92;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.center-rug {
  position: absolute;
  width: 280px;
  height: 110px;
  background: radial-gradient(ellipse at center, var(--area-bg-a), var(--area-bg-b) 70%, transparent 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ミーティングスペース:ラグ+木目テーブル+背もたれ付きの椅子4脚 */
.mtg-rug {
  position: absolute;
  width: 132px;
  height: 104px;
  background: var(--mtg-area-bg);
  border: 3px dashed var(--mtg-area-border);
  opacity: 0.75;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.mtg-table {
  position: absolute;
  width: 46px;
  height: 46px;
  background:
    repeating-linear-gradient(0deg, rgba(122, 86, 48, 0.16) 0 2px, transparent 2px 7px),
    radial-gradient(circle at 35% 30%, #dcaf78, #b98a53 72%);
  border: 3px solid #8a6a3f;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 6px 0 -3px rgba(122, 86, 48, 0.55),   /* 脚の落とす影 */
    0 9px 12px rgba(0, 0, 0, 0.18);
}

/* テーブルの上の小物(打ち合わせノートとマグカップ) */
.table-note {
  position: absolute;
  left: 7px;
  top: 14px;
  width: 13px;
  height: 10px;
  background: #fffdf4;
  border: 1px solid #d9d0bd;
  border-radius: 1px;
  transform: rotate(-8deg);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.12);
}

.table-note::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 1px;
  background: #c9bfa8;
  box-shadow: 0 3px 0 #c9bfa8;
}

.table-mug {
  position: absolute;
  right: 8px;
  top: 16px;
  width: 9px;
  height: 9px;
  background: #e88aa8;
  border: 1px solid #b25f7e;
  border-radius: 50%;
}

.table-mug::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #7a4a34;
  border-radius: 50%;
}

.table-mug::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 2px;
  width: 4px;
  height: 4px;
  border: 1.5px solid #b25f7e;
  border-left: none;
  border-radius: 0 4px 4px 0;
}

/* 椅子:座面(クッション付き)+背もたれ。向きはクラスで切り替え */
.mtg-chair {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.chair-seat {
  position: absolute;
  left: 2px;
  top: 5px;
  width: 14px;
  height: 11px;
  background: #c98a5f;
  border: 1.5px solid #8a5f3f;
  border-radius: 4px;
  box-shadow: 0 3px 0 -1px rgba(122, 86, 48, 0.5);
}

.chair-seat::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #f3d3dc;
  border-radius: 3px;
}

.chair-back {
  position: absolute;
  background: #a06f47;
  border: 1.5px solid #8a5f3f;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 背もたれは常にテーブルと反対側(=座るとテーブルを向く) */
.chair-top .chair-back { left: 2px; top: 0; width: 14px; height: 7px; }
.chair-top .chair-seat { top: 5px; }
.chair-bottom .chair-back { left: 2px; bottom: 0; width: 14px; height: 7px; }
.chair-bottom .chair-seat { top: 2px; }
.chair-left .chair-back { top: 2px; left: 0; width: 7px; height: 14px; }
.chair-left .chair-seat { left: 5px; top: 2px; width: 11px; height: 14px; }
.chair-right .chair-back { top: 2px; right: 0; width: 7px; height: 14px; }
.chair-right .chair-seat { left: 2px; top: 2px; width: 11px; height: 14px; }

.sofa {
  position: absolute;
  width: 66px;
  height: 30px;
  background: var(--sofa-main, #e8c7cf);
  border-radius: 10px;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 -8px 0 -2px rgba(0, 0, 0, 0.06);
}

.sofa::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: -6px;
  height: 12px;
  background: var(--sofa-light, #f0d5db);
  border-radius: 8px;
}

.coffee-table {
  position: absolute;
  width: 24px;
  height: 15px;
  background: #c9a876;
  border-radius: 3px;
  transform: translate(-50%, -50%);
}

.bookshelf {
  position: absolute;
  width: 18px;
  height: 32px;
  background: #6b5a45;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.bookshelf::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  bottom: 2px;
  background: repeating-linear-gradient(0deg, #d98aa0 0 6px, #f6c453 6px 12px, #8ac0a8 12px 18px, #d9a179 18px 24px);
}

.whiteboard {
  position: absolute;
  width: 64px;
  height: 40px;
  background: #fbfaf6;
  border: 3px solid #cfc9bd;
  border-radius: 3px;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sticky {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.sticky-a { left: 6px; top: 6px; background: #ffd8e6; transform: rotate(-4deg); }
.sticky-b { left: 24px; top: 9px; background: #fff2b8; transform: rotate(3deg); }
.sticky-c { left: 42px; top: 6px; background: #c8ecdc; transform: rotate(-2deg); }

/* ウォーターサーバー:白いスタンド+青い水入りボトル+コック+受け皿+紙コップ */
.cooler { position: absolute; width: 28px; height: 74px; }

.cooler-bottle {
  position: absolute;
  top: 0;
  left: 4px;
  width: 20px;
  height: 25px;
  background: rgba(196, 226, 245, 0.55);
  border: 1.5px solid #8fb8d9;
  border-radius: 8px 8px 3px 3px;
  overflow: hidden;
}

.cooler-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68%;
  background: linear-gradient(180deg, #9ed4f2, #7cbfe8);
}

.cooler-bubble {
  position: absolute;
  left: 5px;
  top: 12px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 7px 5px 0 -1px rgba(255, 255, 255, 0.7);
}

.cooler-body {
  position: absolute;
  top: 23px;
  left: 0;
  width: 28px;
  height: 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f2ede2 100%);
  border: 2px solid #d9d0bd;
  border-radius: 5px 5px 4px 4px;
  box-shadow: inset 0 -6px 0 rgba(217, 208, 189, 0.35);
}

/* 冷水(青)・温水(ピンク)のコック */
.cooler-tap {
  position: absolute;
  top: 9px;
  left: 4px;
  width: 6px;
  height: 5px;
  background: #5da3d9;
  border-radius: 2px 2px 3px 3px;
  box-shadow: 10px 0 0 #e08aa8;
}

.cooler-tray {
  position: absolute;
  top: 18px;
  left: 3px;
  width: 18px;
  height: 3px;
  background: #c9c0ad;
  border-radius: 2px;
}

.cooler-cup {
  position: absolute;
  right: -9px;
  bottom: 0;
  width: 8px;
  height: 10px;
  background: linear-gradient(180deg, #ffffff, #fdeef3);
  border: 1px solid #d9b8c2;
  border-radius: 1px 1px 3px 3px;
}

.desk-plant { position: absolute; width: 14px; height: 16px; }

.desk-plant::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 3px;
  width: 8px;
  height: 7px;
  background: #a56b45;
  border-radius: 1px 1px 4px 4px;
}

.desk-plant::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 14px;
  height: 12px;
  background: #6fa87a;
  border-radius: 50% 50% 50% 4px;
}

/* オフィスの看板猫(パステルのクリーム色。座って尻尾を巻いたポーズ) */
.cat-wrap {
  position: absolute;
  width: 0;
  height: 0;
  animation: cat-patrol 22s ease-in-out infinite;
}

@keyframes cat-patrol {
  0%   { transform: translate(0px, 0px) scaleX(1); }
  18%  { transform: translate(36px, 4px) scaleX(1); }
  32%  { transform: translate(48px, 16px) scaleX(1); }
  48%  { transform: translate(48px, 16px) scaleX(-1); }
  64%  { transform: translate(-8px, 20px) scaleX(-1); }
  80%  { transform: translate(-32px, 6px) scaleX(-1); }
  92%  { transform: translate(-32px, 6px) scaleX(1); }
  100% { transform: translate(0px, 0px) scaleX(1); }
}

.office-cat {
  position: absolute;
  width: 44px;
  height: 46px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.1));
  animation: cat-look 8s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes cat-look {
  0%, 78%, 100% { transform: translate(-50%, -100%) rotate(0deg); }
  85% { transform: translate(-50%, -100%) rotate(-4deg); }
  92% { transform: translate(-50%, -100%) rotate(3deg); }
}

.cat-tail {
  position: absolute;
  right: -6px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  border: 5px solid #f0e2c9;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-25deg);
  transform-origin: 70% 30%;
  animation: cat-tail-wag 2.4s ease-in-out infinite;
}

@keyframes cat-tail-wag {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(-42deg); }
}

.cat-body {
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 36px;
  height: 28px;
  background: #f5ead8;
  border-radius: 50% 50% 46% 46%;
  transform-origin: bottom center;
  animation: cat-breathe 3s ease-in-out infinite;
}

@keyframes cat-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.05); }
}

.cat-earL, .cat-earR {
  position: absolute;
  top: 2px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #f5ead8;
}
.cat-earL { left: 6px; transform: rotate(-14deg); }
.cat-earR { right: 6px; transform: rotate(14deg); }

.cat-earL-in, .cat-earR-in {
  position: absolute;
  top: 6px;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid #f7c4d4;
}
.cat-earL-in { left: 9px; transform: rotate(-14deg); }
.cat-earR-in { right: 9px; transform: rotate(14deg); }

.cat-face {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 28px;
  height: 22px;
  background: #f5ead8;
  border-radius: 50%;
}

.cat-eyeL, .cat-eyeR {
  position: absolute;
  top: 18px;
  width: 3px; height: 3px;
  background: #4a3f43;
  border-radius: 50%;
  transform-origin: center;
  animation: cat-blink 4.6s ease-in-out infinite;
}

@keyframes cat-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}
.cat-eyeL { left: 15px; }
.cat-eyeR { left: 26px; }

.cat-cheekL, .cat-cheekR {
  position: absolute;
  top: 22px;
  width: 5px; height: 4px;
  background: #f7b8cb;
  border-radius: 50%;
  opacity: 0.85;
}
.cat-cheekL { left: 10px; }
.cat-cheekR { left: 29px; }

.cat-nose {
  position: absolute;
  top: 21px;
  left: 20px;
  width: 3px; height: 2px;
  background: #e58aa4;
  border-radius: 50%;
}

.cat-whiskerL, .cat-whiskerR {
  position: absolute;
  top: 20px;
  width: 9px;
  height: 1px;
  background: #e6d3bf;
}
.cat-whiskerL { left: 2px; }
.cat-whiskerR { right: 2px; }

.plant { position: absolute; width: 34px; height: 56px; }

.plant .pot {
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 22px;
  height: 16px;
  background: #a56b45;
  border-radius: 2px 2px 6px 6px;
}

.plant .leaf { position: absolute; border-radius: 50% 50% 50% 4px; }

.plant .leaf-a {
  width: 22px; height: 26px;
  left: 2px; bottom: 12px;
  background: #6fa87a;
  transform: rotate(-18deg);
}

.plant .leaf-b {
  width: 20px; height: 24px;
  left: 12px; bottom: 14px;
  background: #86c08f;
  transform: rotate(20deg);
}

.plant .leaf-c {
  width: 16px; height: 20px;
  left: 8px; bottom: 22px;
  background: #4f8c5c;
  transform: rotate(-2deg);
}

/* ============ キャラクター ============ */

.char-wrapper {
  position: absolute;
  transition-property: left, top;
  transition-timing-function: ease-in-out;
  transition-duration: 1.1s;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  cursor: pointer;
}

.char-wrapper:hover .char-label,
.char-wrapper:focus-visible .char-label {
  color: var(--pink);
  box-shadow: 0 0 0 3px rgba(217, 123, 152, 0.2), 0 4px 10px rgba(217, 123, 152, 0.18);
}

.char-wrapper:focus-visible { outline: none; }

.char-body { line-height: 0; }

.char-canvas {
  width: 44px;
  height: 55px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  transition: filter 0.3s;
}

/* 作業中: デスクでたまに小さく揺れる */
@keyframes workSway {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.char-wrapper.status-working .char-body {
  animation: workSway 2.6s ease-in-out infinite;
}

.char-wrapper.working .char-canvas {
  filter: drop-shadow(0 0 6px rgba(232, 150, 79, 0.65));
}

.char-wrapper.facing-left .char-canvas { transform: scaleX(-1); }

/* 吹き出しを出しているキャラは手前に重ねる(他のキャラに隠れないように) */
.char-wrapper.guide-anchor { z-index: 4; }
.char-wrapper.speaking { z-index: 5; }

.char-label {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #4a463d;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.85);
  padding: 1px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.char-wrapper.working .char-label { color: #a85b12; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7b09d;
  display: inline-block;
  margin-right: 3px;
}

.char-wrapper.working .dot {
  background: #e8964f;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.char-badge {
  min-height: 14px;
  font-size: 12px;
  line-height: 14px;
  text-align: center;
}

.char-status {
  margin-top: 2px;
  font-size: 9px;
  color: #8a8375;
  background: rgba(255, 255, 255, 0.75);
  padding: 0 6px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 先生確認待ち(waiting): ✋を可愛く目立つバッジに(白丸+金縁+ピンクの波紋+💖) */
.char-wrapper.status-waiting .char-badge {
  width: 26px;
  height: 26px;
  min-height: 26px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 999px;
  position: relative;
  animation: bob 1.2s ease-in-out infinite, waiting-ring 1.6s ease-out infinite;
}
.char-wrapper.status-waiting .char-badge::after {
  content: "💖";
  position: absolute;
  top: -8px;
  right: -9px;
  font-size: 10px;
  animation: waiting-twinkle 1.6s ease-in-out infinite;
}
@keyframes waiting-ring {
  0%   { box-shadow: 0 0 0 0 rgba(214, 120, 160, 0.5); }
  100% { box-shadow: 0 0 0 10px rgba(214, 120, 160, 0); }
}
@keyframes waiting-twinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.7; }
}
.char-wrapper.status-waiting .dot { background: var(--gold); animation: pulse 1.4s infinite; }
.char-wrapper.status-waiting .char-status { color: var(--gold-dark); background: var(--gold-pale); }
.char-wrapper.status-waiting .char-label { color: var(--gold-dark); }
.char-wrapper.status-waiting .char-canvas { filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.7)); }

/* 完了(done): グリーンでにっこり */
.char-wrapper.status-done .dot { background: var(--green); }
.char-wrapper.status-done .char-status { color: var(--green-dark); background: #ddf0e2; }
.char-wrapper.status-done .char-badge { color: var(--green-dark); font-weight: 700; }

/* エラー(error): その場で小刻みに揺れて赤発光 */
@keyframes tinyShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1.5px); }
  75% { transform: translateX(1.5px); }
}

.char-wrapper.status-error .char-body { animation: tinyShake 0.9s ease-in-out infinite; }
.char-wrapper.status-error .dot { background: var(--red); animation: pulse 0.8s infinite; }
.char-wrapper.status-error .char-status { color: #fff; background: var(--red); font-weight: 700; }
.char-wrapper.status-error .char-label { color: #b23342; background: #fdecee; }
.char-wrapper.status-error .char-badge { color: var(--red); }
.char-wrapper.status-error .char-canvas { filter: drop-shadow(0 0 7px rgba(217, 79, 92, 0.85)); }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ============ 吹き出し ============ */

.bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 5px);
  opacity: 0;
  background: #fff;
  border: 1.5px solid var(--pink-line);
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 10px;
  line-height: 1.55;
  width: max-content;
  max-width: 150px;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(200, 120, 150, 0.2);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
  z-index: 6;
}

.bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
  border-bottom: none;
  filter: drop-shadow(0 1.5px 0 var(--pink-line));
}

.bubble.show { opacity: 1; transform: translate(-50%, 0); }

/* AI秘書の常設ガイド吹き出し(ゴールド系で区別) */
.bubble.bubble-guide {
  background: #fffdf4;
  border-color: #e7cf8f;
}

.bubble.bubble-guide::after { border-top-color: #fffdf4; }

/* ============ トースト ============ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: #4a3f43;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 70;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ 幻想×ゲーム型の中間オフィス v3 ============ */

body {
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 244, 195, 0.9), transparent 30%),
    radial-gradient(circle at 10% 86%, rgba(245, 171, 190, 0.38), transparent 34%),
    linear-gradient(145deg, var(--page-bg-1), var(--page-bg-2) 58%, var(--page-bg-3));
}

.stage::before {
  content: "";
  position: absolute;
  inset: -28px;
  background: url("assets/dream-office-bg-v4-tulip.png") center / cover no-repeat;
  filter: blur(20px) saturate(0.88);
  opacity: 0.17;
  transform: scale(1.05);
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.9) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 24%, rgba(255,226,145,.8) 0 1.5px, transparent 3px),
    radial-gradient(circle at 42% 82%, rgba(255,190,211,.72) 0 1px, transparent 2.5px);
  background-size: 92px 92px, 137px 137px, 111px 111px;
  opacity: 0.38;
  animation: dreamSparkles 9s ease-in-out infinite alternate;
}

@keyframes dreamSparkles {
  from { opacity: 0.24; transform: translateY(0); }
  to { opacity: 0.46; transform: translateY(-4px); }
}

.floor {
  border-radius: 30px;
  border: 1px solid rgba(255, 248, 232, 0.92);
  background-color: #f8e9df;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,242,234,0.12)),
    url("assets/dream-office-bg-v4-tulip.png");
  background-size: cover;
  background-position: center 46%;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.34),
    inset 0 -70px 90px rgba(121, 70, 49, .08),
    0 24px 60px var(--floor-shadow);
}

/* 背景画に家具が入っているため、旧CSS家具は重ねず社員だけを歩かせる */
.floor .wall-band,
.floor .window,
.floor .chandelier,
.floor .door,
.floor .door-mat,
.floor .desk,
.floor .rug,
.floor .center-rug,
.floor .mtg-rug,
.floor .mtg-table,
.floor .mtg-chair,
.floor .sofa,
.floor .coffee-table,
.floor .bookshelf,
.floor .whiteboard,
.floor .cooler,
.floor .desk-plant,
.floor .plant,
.floor .office-cat,
.floor .cat-wrap {
  opacity: 0;
  pointer-events: none;
}

.room {
  border: 1px dashed rgba(229, 185, 88, .42);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(245,183,201,.035));
  box-shadow: inset 0 0 38px rgba(255, 242, 214, .10);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.room-label,
.door-plate {
  color: #fffaf0;
  border: 1px solid rgba(255, 239, 191, .68);
  background: linear-gradient(135deg, rgba(139, 93, 38, .84), rgba(229, 185, 88, .9));
  box-shadow: 0 5px 16px rgba(105, 61, 29, .2), 0 0 14px rgba(255, 228, 142, .28);
}

.hud-header,
.card {
  background: linear-gradient(145deg, rgba(255, 253, 249, .9), rgba(255, 245, 242, .78));
  border-color: rgba(242, 194, 207, .88);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255,255,255,.9);
}

.hud-header {
  border-color: rgba(229, 185, 88, .56);
}

.hud-header::after {
  content: "✦";
  color: var(--gold);
  margin-left: 2px;
  font-size: 13px;
  text-shadow: 0 0 9px rgba(229, 185, 88, .7);
}

.card:hover {
  border-color: rgba(229, 185, 88, .72);
  box-shadow: 0 18px 44px var(--card-hover-shadow), 0 0 22px rgba(255, 222, 142, .2);
}

.task-card,
.approval-card,
.deliverable-card,
.log-item {
  background: rgba(255,255,255,.72);
  border-color: rgba(239, 196, 205, .64);
  box-shadow: 0 4px 14px rgba(122, 75, 62, .06);
}

.quick-btn {
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,235,240,.84));
  border-color: rgba(237,134,165,.38);
  box-shadow: 0 4px 14px rgba(126,77,67,.08);
}

.quick-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(229,185,88,.18);
}

.char-wrapper::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 31px;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,248,218,.62), rgba(255,216,200,.18) 48%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}

.char-canvas {
  width: 48px;
  height: 60px;
  filter: drop-shadow(0 3px 4px rgba(105, 62, 45, .24)) drop-shadow(0 0 7px rgba(255, 239, 184, .34));
}

.char-label,
.char-status {
  border: 1px solid rgba(229,185,88,.3);
  background: rgba(255, 253, 246, .88);
  box-shadow: 0 3px 10px rgba(107, 66, 53, .12);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.char-label {
  max-width: 156px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.bubble,
.bubble.bubble-guide {
  background: rgba(255, 253, 248, .94);
  border-color: rgba(229,185,88,.62);
  box-shadow: 0 10px 28px rgba(112,70,57,.18), 0 0 16px rgba(255,225,149,.22);
}

.bubble::after,
.bubble.bubble-guide::after { border-top-color: rgba(255, 253, 248, .96); }

/* ============ 小さい画面では縦並びに切り替え ============ */

@media (max-width: 960px) {
  body {
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .hud-header { position: static; order: 1; align-self: flex-start; }

  .stage { position: relative; order: 2; height: 520px; inset: auto; }

  .floor { inset: 0; }

  .char-canvas { width: 44px; height: 55px; }
  .char-label { font-size: 9px; padding-inline: 5px; }
  .char-status { font-size: 8px; }

  .hud-footer { position: static; order: 3; width: auto; }

  .hud-panel {
    position: static;
    order: 4;
    width: auto;
    overflow: visible;
  }

  .load-error { position: static; transform: none; width: auto; order: 0; }
}

/* ============ 「動きを減らす」設定の人にはアニメを控える ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
