:root {
  --bg: #f6f3ea;
  --paper: #fffaf0;
  --ink: #2f2a22;
  --muted: #6a6154;
  --line: #d9cfbf;
  --accent: #5d83d6;
  --accent-2: #84c380;
  --warn: #df8a3f;
  --danger: #d65d6d;
  --shadow: 0 8px 0 rgba(80, 68, 50, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  background: linear-gradient(180deg, #f7f2e4 0%, #eee6d8 100%);
  color: var(--ink);
}
button {
  border: 2px solid #b99f74;
  background: #f7d98f;
  color: #4d3f25;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(100, 79, 36, .18);
}
button.secondary { background: #eef2fb; }
button.danger { background: #f7c3cb; }
button.small { padding: 6px 8px; font-size: 12px; }
button:active { transform: translateY(1px); }

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}
.topbar h1 {
  margin: 0 0 4px 0;
  font-size: 28px;
}
.subtitle { margin: 0; color: var(--muted); }
.topbar-actions { display: flex; gap: 10px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.summary-card, .panel, .turn-box, .ticker, .tab, .room-tile, .staff-card, .metric-card, .card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.summary-card {
  padding: 10px 12px;
}
.summary-label {
  color: var(--muted);
  font-size: 12px;
}
.summary-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 2px;
}
.summary-sub {
  font-size: 12px;
  color: var(--muted);
}

.controls-panel {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.turn-box, .ticker { padding: 12px 14px; }
.turn-main { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
#dateLabel { font-size: 20px; }
#phaseLabel {
  background: #e8f3ff;
  color: #3b5c94;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c9dafc;
  font-size: 13px;
  font-weight: 700;
}
.turn-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ticker {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #5b4a31;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tab {
  padding: 10px 14px;
  min-width: 110px;
}
.tab.active {
  background: #dce8ff;
  border-color: #afc7f6;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.grid.two-col { grid-template-columns: 1fr 1fr; }
.panel {
  padding: 14px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}
.panel-header h2 {
  margin: 0;
  font-size: 20px;
}
.muted { color: var(--muted); font-size: 13px; }
.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.metric-card {
  padding: 12px;
}
.metric-title { font-size: 12px; color: var(--muted); }
.metric-value { font-size: 22px; font-weight: 800; margin: 4px 0; }
.metric-bar {
  height: 10px;
  background: #ebe2d5;
  border-radius: 999px;
  overflow: hidden;
}
.metric-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.event-feed, .log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}
.log-item {
  background: #fff;
  border: 1px solid #e1d6c7;
  border-radius: 10px;
  padding: 10px;
}
.log-item small { color: var(--muted); display: block; margin-bottom: 4px; }
.log-item.good { border-left: 6px solid var(--accent-2); }
.log-item.warn { border-left: 6px solid var(--warn); }
.log-item.bad { border-left: 6px solid var(--danger); }
.log-item.info { border-left: 6px solid var(--accent); }
.log-list.compact .log-item { padding: 8px; }

.office-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.room-tile {
  padding: 10px;
  min-height: 150px;
  background: linear-gradient(180deg, #fffdf8, #f8f0e2);
}
.room-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}
.room-name { font-weight: 800; }
.room-bonus {
  font-size: 12px;
  color: #355b97;
  background: #e9f2ff;
  border: 1px solid #c8d8fa;
  border-radius: 999px;
  padding: 4px 8px;
}
.room-occupants { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pill {
  background: #f2ead7;
  border: 1px solid #d7c9ab;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
}
.room-actions select, .staff-actions select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccb99a;
  background: #fff;
  padding: 8px;
}

.staff-list, .room-list, .cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.staff-card, .card {
  padding: 12px;
}
.staff-name {
  font-size: 18px;
  font-weight: 800;
}
.staff-meta, .subline {
  color: var(--muted);
  font-size: 13px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.stat-bubble {
  background: #fff;
  border: 1px solid #e4d8c5;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}
.progress {
  background: #ece1d3;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f3c969, #d78b3c);
}
.tag {
  display: inline-block;
  background: #edf5e7;
  border: 1px solid #cfe0c5;
  border-radius: 999px;
  padding: 4px 8px;
  margin: 4px 6px 0 0;
  font-size: 12px;
}
.tag.alt { background: #eef3ff; border-color: #cfdbf6; }
.tag.bad { background: #fff0f2; border-color: #f0c5cb; }

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border-bottom: 1px solid #e6dac6;
  padding: 9px;
  text-align: left;
  font-size: 14px;
}
.table th { color: var(--muted); font-weight: 700; }
.positive { color: #367c3c; font-weight: 700; }
.negative { color: #b04858; font-weight: 700; }

@media (max-width: 1100px) {
  .summary-strip, .office-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two-col, .controls-panel, .staff-list, .room-list, .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .summary-strip, .office-map, .kpis { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

.office-tab-grid { align-items: start; }
.office-scene {
  --px: 6px;
  position: relative;
  width: 100%;
  border: 4px solid #4b3720;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 10%),
    repeating-linear-gradient(0deg, #ceb689 0 calc(var(--px) * 2), #d8c394 calc(var(--px) * 2) calc(var(--px) * 4)),
    repeating-linear-gradient(90deg, #ceb689 0 calc(var(--px) * 2), #d8c394 calc(var(--px) * 2) calc(var(--px) * 4));
  overflow: hidden;
  box-shadow: 0 0 0 4px #f4ead1 inset, 0 0 0 8px #8b6a43 inset, 10px 10px 0 rgba(75,55,32,.18);
  image-rendering: pixelated;
}
.office-scene::before,
.office-scene::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #4b3720;
  z-index: 8;
}
.office-scene::before { left: 0; top: 0; box-shadow: calc(100% - 16px) 0 0 #4b3720, 0 calc(100% - 16px) 0 #4b3720, calc(100% - 16px) calc(100% - 16px) 0 #4b3720; opacity: .18; }
.office-scene::after { display:none; }
.office-scene--large { min-height: 520px; }
.office-scene--mini { min-height: 300px; }
.office-floor-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(94,71,39,.14) 2px, transparent 2px),
    linear-gradient(90deg, rgba(94,71,39,.14) 2px, transparent 2px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: .9;
}
.office-room {
  position: absolute;
  border: 4px solid #6a4d2b;
  border-radius: 0;
  background:
    linear-gradient(180deg, #fdf4df 0 12px, #b98a4c 12px 18px, #f7ead0 18px 100%),
    repeating-linear-gradient(90deg, rgba(126,87,39,.06) 0 8px, rgba(0,0,0,0) 8px 16px);
  box-shadow: 0 0 0 3px #fef8eb inset, 0 0 0 6px rgba(106,77,43,.24) inset;
}
.office-room::before {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 18px;
  height: 10px;
  background: #8c673c;
  box-shadow: 0 -2px 0 #4b3720 inset;
  opacity: .75;
}
.office-room::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 24px;
  width: 26px;
  height: 16px;
  background:
    linear-gradient(90deg, #8dc6ea 0 48%, #d8f1ff 48% 52%, #8dc6ea 52% 100%);
  border: 3px solid #6a4d2b;
  box-shadow: 0 0 0 3px #e9d8bc;
}
.office-room.locked {
  filter: grayscale(.4) brightness(.9);
  opacity: .55;
}
.office-room__label {
  position: absolute;
  left: 8px; top: 6px;
  display: inline-flex; gap: 6px; align-items: center;
  background: #4b3720;
  color: #fff7dc;
  padding: 4px 8px;
  border-radius: 0;
  border: 3px solid #edd39d;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  font-family: "MS Gothic", "Osaka-Mono", monospace;
  letter-spacing: .06em;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.office-room__icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  background: #f0b85f;
  color: #4b3720;
  border: 2px solid #fff7dc;
}
.office-room__meter {
  position: absolute;
  right: 8px; top: 8px;
  background: #203d64;
  color: #dff1ff;
  border: 3px solid #92b9e8;
  padding: 3px 7px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  font-family: "MS Gothic", monospace;
}

.room-rank {
  display:inline-grid;
  place-items:center;
  min-width:22px;
  height:22px;
  padding:0 4px;
  margin-left:8px;
  border:3px solid #4d3922;
  font-size:10px;
  font-weight:800;
  line-height:1;
  font-family:"MS Gothic", monospace;
  color:#fff8df;
  background:#7d8c9c;
}
.room-rank--S { background:#d98080; color:#fffaf0; }
.room-rank--A { background:#5c89d7; color:#f6fbff; }
.room-rank--B { background:#6eb27b; color:#fbfff8; }
.room-rank--C { background:#d3a95d; color:#fffdf5; }
.room-rank--D { background:#8d8d8d; color:#fff; }
.room-effect-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.room-effect-box {
  border:3px solid #6a4d2b;
  background:#fff4dd;
  padding:8px;
  box-shadow:2px 2px 0 rgba(75,55,32,.12);
}
.room-effect-box--main { background:#f4f9ff; border-color:#49668f; }
.room-effect-box--next { background:#f3fff0; border-color:#5f8c55; }
.room-effect-box--locked { background:#f4efe6; border-color:#8d7d69; }
.room-effect-box__label {
  font-size:10px;
  color:#6a6154;
  font-family:"MS Gothic", monospace;
  margin-bottom:4px;
}
.room-effect-box__value {
  font-size:20px;
  font-weight:800;
  color:#2f2a22;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
}
.room-effect-box__value small {
  font-size:11px;
  color:#41723d;
  margin-left:4px;
}
.room-effect-progress { height:12px; background:#e5d8c8; }
.room-effect-progress > span { background: linear-gradient(90deg, #7dc58b, #5d83d6); }
.office-room__occupancy {
  position: absolute;
  left: 8px; bottom: 6px;
  font-size: 10px;
  color: #fff4d5;
  background: #6a4d2b;
  border: 2px solid #d4b17a;
  padding: 2px 6px;
  border-radius: 0;
  font-family: "MS Gothic", monospace;
}
.desk, .plant, .shelf, .sofa, .monitor, .table-round {
  position: absolute;
  border: 3px solid #5a4328;
  border-radius: 0;
  image-rendering: pixelated;
  box-shadow: 2px 2px 0 rgba(75,55,32,.18);
}
.desk {
  width: 42px; height: 26px;
  background:
    linear-gradient(180deg, #e6b46b 0 8px, #ca9452 8px 18px, #a87239 18px 100%);
}
.desk::before {
  content:"";
  position:absolute;
  left: 4px; right: 4px; top: 3px;
  height: 4px;
  background: rgba(255,255,255,.28);
}
.monitor {
  width: 18px; height: 12px;
  background: linear-gradient(180deg, #bfe9ff 0 4px, #5da7e3 4px 100%);
}
.monitor::after {
  content:"";
  position:absolute;
  left:5px; right:5px; bottom:-6px;
  height: 6px;
  background:#5a4328;
}
.plant {
  width: 18px; height: 18px;
  background: linear-gradient(180deg, #8de26d 0 6px, #4da85d 6px 100%);
}
.plant::after {
  content:"";
  position:absolute;
  left: 4px; right: 4px; bottom:-8px;
  height: 8px;
  background:#976b39;
  border: 3px solid #5a4328;
  border-top: 0;
}
.shelf {
  width: 18px; height: 42px;
  background: repeating-linear-gradient(180deg, #d4a363 0 8px, #a87539 8px 16px);
}
.sofa {
  width: 46px; height: 22px;
  background: linear-gradient(180deg, #cddfff 0 8px, #8ab6ef 8px 100%);
}
.table-round {
  width: 38px; height: 38px;
  background: repeating-linear-gradient(90deg, #e6be84 0 6px, #cc9553 6px 12px);
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}
.office-hallway {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 48px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.12) 0 12px, rgba(255,255,255,0) 12px 24px),
    repeating-linear-gradient(90deg, #c8b084 0 6px, #d5c097 6px 12px);
  opacity: .95;
  border-left: 4px solid rgba(88,65,37,.22);
  border-right: 4px solid rgba(88,65,37,.22);
}
.office-hallway::before,
.office-hallway::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 8px; height: 100%;
  background: repeating-linear-gradient(180deg, rgba(150,122,79,.18) 0 16px, transparent 16px 28px);
}
.office-actor {
  position: absolute;
  width: 22px; height: 30px;
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
}
.office-actor__shadow {
  position: absolute;
  left: 50%; bottom: 0;
  width: 16px; height: 4px;
  transform: translateX(-50%);
  background: rgba(80, 65, 45, .18);
  border-radius: 0;
}
.office-actor__body {
  position: absolute;
  left: 50%; top: 10px;
  width: 12px; height: 12px;
  transform: translateX(-50%);
  border-radius: 0;
  border: 3px solid #4d3922;
  box-shadow: -8px 2px 0 -5px currentColor, 8px 2px 0 -5px currentColor;
}
.office-actor__body::before {
  content:"";
  position:absolute;
  left: 2px; right: 2px; top: 2px;
  height: 2px;
  background: rgba(255,255,255,.35);
}
.office-actor__head {
  position: absolute;
  left: 50%; top: 0;
  width: 10px; height: 10px;
  transform: translateX(-50%);
  border-radius: 0;
  background: #f6d7b8;
  border: 3px solid #4d3922;
}
.office-actor__eye {
  position:absolute;
  top:3px;
  width: 2px; height: 2px;
  background:#4d3922;
}
.office-actor__eye.eye-l { left:1px; }
.office-actor__eye.eye-r { right:1px; }
.office-actor__legs {
  position: absolute;
  left: 50%; top: 22px;
  width: 12px; height: 8px;
  transform: translateX(-50%);
}
.office-actor__legs::before,
.office-actor__legs::after {
  content: "";
  position: absolute;
  width: 4px; height: 8px;
  background: #4d3922;
  border-radius: 0;
  animation: legSwing .35s infinite steps(2, end);
  transform-origin: top center;
}
.office-actor__legs::before { left: 1px; }
.office-actor__legs::after { right: 1px; animation-delay: .18s; }
.office-actor[data-moving="0"] .office-actor__legs::before,
.office-actor[data-moving="0"] .office-actor__legs::after { animation-play-state: paused; }
.office-actor__name {
  position: absolute;
  left: 50%; top: -18px;
  transform: translateX(-50%);
  background: #fff6df;
  color: #4b3720;
  border: 2px solid #6a4d2b;
  box-shadow: 2px 2px 0 rgba(75,55,32,.15);
  border-radius: 0;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  font-family: "MS Gothic", monospace;
}
.office-bubble {
  position: absolute;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #6a4d22;
  background: #fff4d8;
  border: 3px solid #6a4d2b;
  border-radius: 0;
  box-shadow: 3px 3px 0 rgba(100,79,36,.14);
  z-index: 6;
  font-family: "MS Gothic", monospace;
}
.office-bubble::after {
  content: "";
  position: absolute;
  left: 10px; bottom: -8px;
  width: 8px; height: 8px;
  background: #fff4d8;
  border-left: 3px solid #6a4d2b;
  border-bottom: 3px solid #6a4d2b;
}
.office-statusbar {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  display: flex; gap: 8px; flex-wrap: wrap;
  z-index: 2;
}
.office-statuschip {
  background: #fff4db;
  border: 3px solid #6a4d2b;
  border-radius: 0;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  color: #5b4a31;
  font-family: "MS Gothic", monospace;
  box-shadow: 2px 2px 0 rgba(75,55,32,.1);
}
@keyframes legSwing {
  from { transform: translateY(0); }
  to { transform: translateY(2px); }
}
@media (max-width: 1024px) {
  .grid.two-col, .office-tab-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls-panel { grid-template-columns: 1fr; }
  .office-scene--large { min-height: 460px; }
  .office-scene--mini { min-height: 260px; }
}

.room-detail-card { min-height: 196px; }
.room-upgrade-row {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-top:10px;
}

.office-entrance {
  position:absolute;
  left:46%; bottom:0;
  width:8%; height:24px;
  background: repeating-linear-gradient(90deg, #6c4d2c 0 10px, #8a6438 10px 20px);
  border-top: 4px solid #3f2b16;
  box-shadow: 0 -4px 0 #ddc091 inset;
  z-index:1;
}
.office-reception-counter {
  position:absolute;
  left:60%; top:26%;
  width:18%; height:16px;
  background: linear-gradient(180deg, #e4bc7a 0 6px, #bf8a4c 6px 100%);
  border: 4px solid #5c4327;
  box-shadow: 0 0 0 3px #f4e4c4 inset;
  z-index:3;
}
.office-reception-counter::before {
  content:'';
  position:absolute;
  left:8px; top:-14px;
  width:52px; height:12px;
  background:#325a8f;
  border: 3px solid #d8eaff;
}
.office-reception-counter::after {
  content:'受付';
  position:absolute;
  left:18px; top:-13px;
  color:#f1f7ff;
  font-size:10px;
  font-family:'MS Gothic', monospace;
  font-weight:700;
}
.office-room--lvl-2 { box-shadow: 0 0 0 3px #fef8eb inset, 0 0 0 6px rgba(106,77,43,.24) inset, 0 0 0 10px rgba(141,198,234,.18) inset; }
.office-room--lvl-3 { box-shadow: 0 0 0 3px #fff7ee inset, 0 0 0 6px rgba(106,77,43,.28) inset, 0 0 0 10px rgba(124,197,139,.18) inset; }
.office-room--lvl-4 { box-shadow: 0 0 0 3px #fff9f1 inset, 0 0 0 6px rgba(106,77,43,.32) inset, 0 0 0 10px rgba(240,159,97,.18) inset; }
.office-room--lvl-5 { box-shadow: 0 0 0 3px #fff9f3 inset, 0 0 0 6px rgba(106,77,43,.36) inset, 0 0 0 10px rgba(111,141,227,.2) inset, 0 0 0 14px rgba(255,255,255,.18) inset; }
.office-room--lvl-4 .office-room__label,
.office-room--lvl-5 .office-room__label { background:#2f4d77; }
.office-room--lvl-5 .office-room__icon { background:#ffd577; }
.trophy, .poster, .carpet, .lamp, .coffee {
  position:absolute;
  border:3px solid #5a4328;
  border-radius:0;
  image-rendering:pixelated;
  box-shadow:2px 2px 0 rgba(75,55,32,.16);
}
.trophy {
  width:18px; height:22px;
  background: linear-gradient(180deg, #ffe08a 0 8px, #e6b449 8px 14px, #a77531 14px 100%);
}
.trophy::before { content:''; position:absolute; left:2px; right:2px; top:2px; height:3px; background:rgba(255,255,255,.32); }
.poster {
  width:28px; height:20px;
  background: linear-gradient(180deg, #dff1ff 0 33%, #ffc77a 33% 66%, #ff9da0 66% 100%);
}
.carpet {
  width:52px; height:18px;
  background: repeating-linear-gradient(90deg, #d46b6b 0 6px, #f2d28a 6px 12px);
}
.lamp {
  width:14px; height:24px;
  background: linear-gradient(180deg, #fff4bc 0 8px, #ebcf67 8px 12px, #7a5a31 12px 100%);
}
.coffee {
  width:16px; height:14px;
  background: linear-gradient(180deg, #fff9ed 0 6px, #cc9960 6px 100%);
}
.office-visitor {
  position:absolute;
  width:18px; height:28px;
  transform:translate(-50%, -50%);
  z-index:4;
  image-rendering:pixelated;
}
.office-visitor__shadow { position:absolute; left:50%; bottom:0; width:14px; height:4px; transform:translateX(-50%); background:rgba(80,65,45,.16); }
.office-visitor__head { position:absolute; left:50%; top:0; width:9px; height:9px; transform:translateX(-50%); background:#f2d3b4; border:3px solid #4d3922; }
.office-visitor__body { position:absolute; left:50%; top:9px; width:11px; height:11px; transform:translateX(-50%); border:3px solid #4d3922; }
.office-visitor__legs { position:absolute; left:50%; top:20px; width:10px; height:8px; transform:translateX(-50%); }
.office-visitor__legs::before, .office-visitor__legs::after { content:''; position:absolute; width:4px; height:8px; background:#4d3922; animation: legSwing .42s infinite steps(2, end); }
.office-visitor__legs::before { left:0; }
.office-visitor__legs::after { right:0; animation-delay:.18s; }
.office-visitor__name {
  position:absolute; left:50%; top:-16px; transform:translateX(-50%);
  background:#fff4db; border:2px solid #6a4d2b; padding:1px 4px; font-size:9px; white-space:nowrap;
  font-family:'MS Gothic', monospace; font-weight:700;
}

.office-visitor__tag {
  position:absolute;
  left:50%; top:-29px;
  transform:translateX(-50%);
  min-width:22px;
  text-align:center;
  background:#394d69;
  color:#fff7dc;
  border:2px solid #cfe0ff;
  padding:0 4px;
  font-size:8px;
  line-height:12px;
  font-family:'MS Gothic', monospace;
  font-weight:700;
}
.office-visitor--steady .office-visitor__tag { background:#8e6a2d; border-color:#f3df9f; }
.office-visitor--blood .office-visitor__tag { background:#7c4a8d; border-color:#e4c8ef; }
.office-visitor--local .office-visitor__tag { background:#4d7f49; border-color:#cde7c9; }
.office-visitor--banei .office-visitor__tag { background:#406194; border-color:#cfe0ff; }
.office-visitor--fan .office-visitor__tag { background:#9d4d68; border-color:#ffd4e2; }
.office-visitor--strict .office-visitor__tag { background:#666; border-color:#dfdfdf; }
.office-visitor--mini .office-visitor__name { display:none; }
.office-queue-bubble {
  position:absolute; left:61%; top:17%;
  max-width:220px;
  padding:4px 8px; background:#fff4d8; border:3px solid #6a4d2b; font-size:10px; font-family:'MS Gothic', monospace; font-weight:700; z-index:6;
  line-height:1.4;
}
.office-queue-bubble::after { content:''; position:absolute; left:10px; bottom:-8px; width:8px; height:8px; background:#fff4d8; border-left:3px solid #6a4d2b; border-bottom:3px solid #6a4d2b; }
.office-queue-bubble--mini { font-size:9px; left:56%; top:15%; max-width:160px; }


.offer-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.offer-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.offer-card {
  position: relative;
  overflow: hidden;
}

.offer-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.65;
}

.offer-rival {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.offer-rival__dot {
  width: 10px;
  height: 10px;
  border: 2px solid #20263a;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}

.offer-appeal {
  min-height: 44px;
  margin: 8px 0 10px;
  color: var(--text);
}

.offer-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.offer-foot .tag {
  margin: 0;
}
