:root {
  --bg: #F8F5ED; --ink: #242321; --muted: #68645E; --card: #FFFDF8; --line: #E4DFD4; --orange: #FF5A24;
  --floor: #EFE7D6; --tile: #E6DCC7; --room: #FBF8F1; --desk: #C9A27A; --desk-top: #DDBB93; --screen: #2F3A40;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1B1A19; --ink: #F3EFE7; --muted: #A9A398; --card: #262523; --line: #3A3835;
    --floor: #23211E; --tile: #2A2724; --room: #2B2926; --desk: #6E5640; --desk-top: #85694E; --screen: #10161A; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.top { max-width: 1120px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 4px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.brand span { font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.top nav a { text-decoration: none; font-weight: 600; color: var(--orange); }
.sub { max-width: 1120px; margin: 0 auto; padding: 0 16px 10px; color: var(--muted); font-size: 13.5px; }
#warn { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.warn { background: #FFF1D6; color: #6B4A00; border-radius: 12px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* 地板：木地板格子 */
.floor { max-width: 1120px; margin: 0 auto 40px; padding: 18px; border-radius: 24px;
  background: var(--floor) repeating-linear-gradient(90deg, transparent 0 118px, var(--tile) 118px 120px);
  display: grid; gap: 16px;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  grid-template-areas: "boss meet studio" "plan plan plan" "ops ops ops"; }
.room { background: var(--room); border: 2px solid var(--line); border-radius: 18px; padding: 12px 12px 14px; position: relative; min-width: 0; }
.room h2 { margin: 0 0 6px; font-size: 13px; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.room.boss { grid-area: boss; } .room.meet { grid-area: meet; } .room.studio { grid-area: studio; }
.room.plan { grid-area: plan; } .room.ops { grid-area: ops; }
.desks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* 工位 */
.seat { position: relative; border: 0; background: none; padding: 52px 4px 6px; cursor: pointer; text-align: center; font: inherit; color: inherit;
  border-radius: 14px; transition: background .2s; }
.seat:hover, .seat:focus-visible { background: #0000000A; outline: none; }
.seat:focus-visible { box-shadow: 0 0 0 3px #5AA9D6; }
.bubble { position: absolute; top: 0; left: 50%; transform: translateX(-50%); max-width: 96%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 10px; font-size: 12px; color: var(--ink); box-shadow: 0 4px 10px #0000000F; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: var(--card);
  border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.avatar { width: 76px; height: 86px; margin: 0 auto -16px; position: relative; z-index: 1; animation: bob 3.2s ease-in-out infinite; }
.seat:nth-child(2n) .avatar { animation-delay: -1.1s; } .seat:nth-child(3n) .avatar { animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .avatar { animation: none; } }
.desk { position: relative; z-index: 2; height: 40px; margin: 0 8px; background: var(--desk-top); border-radius: 8px 8px 4px 4px; box-shadow: 0 6px 0 var(--desk); }
.desk::before { content: ""; position: absolute; left: 8%; top: -18px; width: 30px; height: 22px;
  background: var(--screen); border-radius: 4px; border: 3px solid #555; }
.desk::after { content: ""; position: absolute; right: 18%; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); box-shadow: inset 0 -4px 0 #B07A4A; }
.tag { display: inline-block; margin-top: 14px; padding: 3px 10px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; }
.role { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 会议角：看板 */
.board { background: #FFFFFF; color: #242321; border: 6px solid #9A8F80; border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }
.board div { font-size: 13px; } .board b { font-size: 22px; display: block; line-height: 1.1; }
.board .o { color: var(--orange); }
.deco { display: flex; gap: 14px; align-items: flex-end; justify-content: center; margin-top: 12px; }
.plant { width: 26px; height: 44px; position: relative; }
.plant::before { content: ""; position: absolute; bottom: 0; left: 4px; width: 18px; height: 16px; background: #B8643C; border-radius: 3px 3px 6px 6px; }
.plant::after { content: ""; position: absolute; bottom: 14px; left: 0; width: 26px; height: 30px; background: #5E9B5E; border-radius: 50% 50% 40% 40%; }
.coffee { width: 30px; height: 40px; background: #3B3A38; border-radius: 6px; position: relative; }
.coffee::after { content: ""; position: absolute; left: 8px; bottom: 6px; width: 14px; height: 10px; background: #fff; border-radius: 0 0 4px 4px; }
.table { width: 120px; height: 34px; background: var(--desk-top); border-radius: 18px; box-shadow: 0 5px 0 var(--desk); }

/* 详情面板 */
.panel { position: fixed; inset: 0; z-index: 10; background: #0006; display: flex; justify-content: flex-end; }
.panel-card { width: min(420px, 100%); height: 100%; overflow-y: auto; background: var(--card); padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); position: relative; }
.close { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }
.p-head { display: flex; gap: 14px; align-items: center; }
.p-avatar { width: 84px; height: 94px; flex: none; }
.p-head h2 { margin: 0; font-size: 24px; } .p-role { margin: 2px 0 0; color: var(--muted); }
.panel h3 { font-size: 13px; color: var(--muted); margin: 18px 0 4px; letter-spacing: .04em; }
.panel p { margin: 0; }
.p-notes { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.p-notes li { background: var(--bg); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.p-files { padding-left: 0; list-style: none; margin: 0; font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
.p-files .no { color: var(--muted); }
.btn { display: block; text-align: center; text-decoration: none; margin-top: 22px; height: 48px; line-height: 48px; border-radius: 12px; background: var(--orange); color: #fff; font-weight: 700; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px !important; text-align: center; }

@media (max-width: 760px) {
  .floor { grid-template-columns: 1fr 1fr; grid-template-areas: "meet meet" "boss studio" "plan plan" "ops ops"; padding: 10px; gap: 10px; border-radius: 18px; }
  .desks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room.boss .desks, .room.studio .desks { grid-template-columns: 1fr; }
  .panel { align-items: flex-end; }
  .panel-card { height: auto; max-height: 88vh; border-radius: 22px 22px 0 0; }
  .bubble { font-size: 11px; padding: 3px 8px; }
}
