/* ポケット社員｜お部屋の見た目（木・クリーム・若草色）と、LINEに寄せたトーク画面。
   外部のフォント・画像は使わない（システムフォントと自作SVGだけ）。文字は11px以上。 */
:root {
  --wall: #F8E9C8; --cream: #FFF6DF; --paper: #FFFBEF; --ink: #4A3626; --muted: #8A6A48; --line: #E3CDA3;
  --wood: #D9A769; --wood-d: #B07C45; --wood-dd: #8A5A2B;
  --leaf: #4E9B4C; --leaf-d: #3A7A3A; --leaf-soft: #DDEFC9; --coral: #E8663C; --warn: #8A5C00; --warn-soft: #FFF0C9;
  --chat-bg: #9DB4D3; --chat-ink: #2B3A52; --mine: #86DE75; --badge: #35B558;
  --round: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Arial Rounded MT Bold", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font: "Hiragino Sans", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--wall); color: var(--ink); font-family: var(--round); font-size: 16px; line-height: 1.5; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

#app { max-width: 560px; margin: 0 auto; height: var(--app-h, 100dvh); display: flex; flex-direction: column; background: var(--wall); position: relative; overflow: hidden; }
@media (min-width: 600px) { #app { border-left: 3px solid var(--wood); border-right: 3px solid var(--wood); } }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ico svg { display: block; }

/* ───────── ① オフィス（上から見たお部屋） ───────── */
.roomtop {
  position: relative; padding: calc(env(safe-area-inset-top) + 10px) 10px 0;
  background: var(--wall) repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px);
}
.signrow { display: flex; justify-content: center; }
.roomsign {
  position: relative; margin: 8px 0 0; padding: 4px 20px 5px; font-size: 19px; font-weight: 800; letter-spacing: .04em;
  color: #5A3A1E; background: var(--wood); border: 3px solid var(--wood-d); border-radius: 14px; box-shadow: 0 3px 0 var(--wood-dd);
}
.roomsign::before, .roomsign::after { content: ""; position: absolute; top: -9px; width: 3px; height: 9px; background: var(--wood-dd); }
.roomsign::before { left: 22px; } .roomsign::after { right: 22px; }
.roomsign h1 { margin: 0; font: inherit; display: inline-block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.penbtn { margin-left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--wood-d); background: var(--paper); color: var(--wood-dd); font-size: 14px; line-height: 20px; padding: 0; vertical-align: 2px; }
.macsign {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 800; color: #fff; padding: 3px 10px 4px 22px; border-radius: 999px; border: 2px solid var(--wood-dd);
  background: #4B5A7A; box-shadow: 0 2px 0 rgba(90, 58, 30, .5);
}
.macsign::before { content: ""; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #9AA6BE; }
.macsign.on { background: var(--leaf-d); }
.macsign.on::before { background: #B8F29B; box-shadow: 0 0 6px #B8F29B; }
.cork { background: #D6AA70; border: 3px solid #A87440; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 2px 0 rgba(90, 58, 30, .35); }
.cork .it { display: flex; align-items: center; gap: 5px; background: var(--paper); border-radius: 6px; padding: 2px 5px 2px 3px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.cork .sym { width: 20px; height: 20px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.cork .sym.ex { color: var(--coral); border-color: #F5B7A2; }
.cork .sym.dot { color: var(--leaf); border-color: #A9D49A; letter-spacing: -1px; }

.seat { position: relative; display: flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 0; min-width: 0; text-align: center; font-family: var(--round); }
.sprite { position: relative; width: 100%; }
.spr { display: block; width: 100%; height: auto; overflow: visible; }
.seat:active .sprite { transform: scale(.97); }
.av.photo { display: none; position: absolute; left: 20%; top: 13.6%; width: 60%; height: auto; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; border: 3px solid #fff; background: #fff; box-shadow: 0 1px 3px rgba(80, 50, 20, .35); }
.av.photo.has-photo { display: block; }
.sprite:has(.av.photo.has-photo) .head { display: none; }
.av.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.working .hands { animation: type .5s ease-in-out infinite alternate; }
@keyframes type { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }

.bub {
  position: absolute; top: 0; right: 6%; z-index: 2; min-width: 36px; height: 28px; padding: 0 9px; border-radius: 15px;
  background: #fff; border: 2px solid var(--line); box-shadow: 0 2px 0 rgba(120, 80, 30, .18);
  display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 800;
}
.bub::after { content: ""; position: absolute; left: 7px; bottom: -7px; width: 10px; height: 10px; background: #fff; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: skewX(24deg) rotate(35deg); }
.bub i { width: 5px; height: 5px; border-radius: 50%; background: var(--leaf); animation: dots 1.1s ease-in-out infinite; }
.bub i:nth-child(2) { animation-delay: .18s; } .bub i:nth-child(3) { animation-delay: .36s; }
@keyframes dots { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-4px); opacity: 1; } }
.bub.idle { min-width: 28px; height: 24px; padding: 0 6px; font-size: 14px; color: var(--muted); border-color: #EAD9B5; opacity: .92; }
.bub.ex { color: var(--coral); font-size: 18px; line-height: 1; min-width: 32px; border-color: #F5B7A2; animation: hop 1.4s ease-in-out infinite; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }

.plate {
  position: relative; z-index: 1; margin-top: -8px; width: calc(100% - 6px); padding: 3px 4px 4px; text-align: center;
  background: var(--paper); border: 2px solid #D9B07A; border-radius: 10px; box-shadow: 0 2px 0 rgba(120, 80, 30, .2);
}
.plate b { display: block; font-size: 13px; font-weight: 800; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate small { display: block; font-size: 11px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat.working .plate { border-color: #7FBF6E; }
.seat.done .plate { border-color: #F2A68A; }
.seat.add .plate { border-style: dashed; border-color: var(--leaf); }
.seat.add .plate b { color: var(--leaf-d); }

.wallart { display: block; width: 100%; height: auto; }
.decor { display: block; width: 64%; height: auto; margin: 0 auto; }
.note { font-size: 13px; color: var(--muted); margin: 14px 12px 0; text-align: center; }
/* 下のタブ */
.tabbar { display: flex; background: var(--cream); border-top: 3px solid var(--wood); padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; border: 0; background: none; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-size: 12px; font-weight: 800; position: relative; font-family: var(--round); }
.tab .ico { width: 44px; height: 28px; border-radius: 14px; display: grid; place-items: center; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--leaf-d); }
.tab.on .ico { background: var(--leaf-soft); }
.tab .badge { position: absolute; top: 3px; left: calc(50% + 8px); }
.badge { min-width: 20px; height: 20px; border-radius: 10px; background: var(--badge); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; font-family: var(--font); }

/* 顔の丸いアイコン */
.av { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; flex: none; overflow: hidden; position: relative; display: block; }
.av img, .av .facesvg { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ───────── ② トーク一覧（LINEに寄せる） ───────── */
.lhead { display: flex; align-items: center; padding: calc(env(safe-area-inset-top) + 10px) 16px 8px; background: #fff; font-family: var(--font); }
.lhead h1 { margin: 0; font-size: 22px; font-weight: 800; flex: 1; color: #1f1f1f; }
.tl { background: #fff; font-family: var(--font); }
.trow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid #F0F0F0; background: #fff; text-align: left; }
.trow:active { background: #F5F5F5; }
.trow .av { --s: 52px; }
.trow .mid { flex: 1; min-width: 0; }
.trow .nm { font-size: 16px; font-weight: 700; color: #1f1f1f; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.trow .nm span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .pv { font-size: 14px; color: #8A8A8A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .pv.empty { color: #B5B5B5; }
.trow .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; align-self: stretch; justify-content: space-between; padding: 2px 0; min-width: 44px; }
.trow .tm { font-size: 12px; color: #A0A0A0; }
.trow .stx { font-size: 12px; font-weight: 700; flex: none; }
.trow .stx.working { color: #2F8E46; }
.trow .stx.done { color: var(--coral); }
.trow .side .badge { align-self: flex-end; }

/* ───────── ③ トーク ───────── */
.thead { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px 6px; background: #fff; border-bottom: 1px solid #E6E6E6; font-family: var(--font); }
.thead .ttl { flex: 1; min-width: 0; }
.thead .ttl b { display: block; font-size: 17px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1f1f1f; }
.thead .sub { font-size: 12px; color: #7A7A7A; line-height: 1.3; }
.thead .av { --s: 36px; }
.iconbtn { border: 0; background: none; padding: 6px; color: #2F8E46; display: grid; place-items: center; border-radius: 8px; }
.iconbtn svg { width: 26px; height: 26px; }
.textbtn { border: 0; background: none; color: #2F8E46; font-size: 15px; font-weight: 700; padding: 8px 6px; font-family: var(--font); }

.chat { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 10px 8px; display: flex; flex-direction: column; gap: 3px; background: var(--chat-bg); font-family: var(--font); }
.day { align-self: center; font-size: 12px; color: #fff; background: rgba(58, 75, 102, .45); border-radius: 999px; padding: 2px 14px; margin: 8px 0 6px; }
.msg { display: flex; align-items: flex-end; gap: 6px; margin-top: 4px; }
.msg.me { justify-content: flex-end; }
.msg.cont { margin-top: 0; }
.msg .av { --s: 36px; align-self: flex-start; }
.msg .spacer { width: 36px; flex: none; }
.msg .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.msg .who { font-size: 12px; color: var(--chat-ink); padding-left: 2px; }
.msg .line { display: flex; align-items: flex-end; gap: 5px; min-width: 0; }
.meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; line-height: 1.3; color: #3A4B66; flex: none; max-width: 96px; text-align: right; }
.msg.ai .meta { align-items: flex-start; text-align: left; }
.meta .read:empty { display: none; }
.b { position: relative; max-width: min(76vw, 300px); padding: 8px 12px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: #1b1b1b; }
.msg.me .b { background: var(--mine); border-bottom-right-radius: 6px; }
.msg.ai .b { background: #fff; border-bottom-left-radius: 6px; }
.msg.me:not(.cont) .b::after { content: ""; position: absolute; right: -6px; bottom: 6px; border: 7px solid transparent; border-left-color: var(--mine); border-right: 0; }
.msg.ai:not(.cont) .b::after { content: ""; position: absolute; left: -6px; top: 10px; border: 7px solid transparent; border-right-color: #fff; border-left: 0; }
.b.err { background: #FFE7E3; }
.meta .retry { border: 0; background: none; color: #B3261E; font-size: 11px; font-weight: 700; padding: 0; text-decoration: underline; }
.hint { align-self: center; font-size: 12px; color: #3A4B66; text-align: center; padding: 3px 12px; margin-top: 6px; background: rgba(255, 255, 255, .6); border-radius: 999px; }
.hint.warn { color: #7A4B00; background: rgba(255, 240, 201, .9); }
.hint:empty { display: none; }
.empty-talk { margin: auto; text-align: center; color: #3A4B66; font-size: 14px; padding: 12px 18px; background: rgba(255, 255, 255, .6); border-radius: 16px; }
.compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); background: #F4F6F9; border-top: 1px solid #DDE2EA; font-family: var(--font); }
.compose textarea { flex: 1; resize: none; border: 1px solid #D5DAE2; background: #fff; border-radius: 20px; padding: 9px 14px; line-height: 1.45; max-height: 128px; min-height: 40px; font-size: 16px; outline: none; }
.compose textarea:focus { border-color: var(--badge); }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--badge); color: #fff; display: grid; place-items: center; flex: none; }
.send svg { width: 22px; height: 22px; }
.send:disabled { background: #C9CFD8; }

/* ───────── ④ 社員の設定・鍵・通知（お部屋の世界観） ───────── */
.sethead { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 6px; background: var(--wall) repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); border-bottom: 3px solid var(--wood); }
.sethead .iconbtn { color: var(--leaf-d); }
.sethead h1 { margin: 0; font-size: 19px; font-weight: 800; flex: 1; }
.setbg { background: var(--wall) repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); padding: 16px 12px 24px; }
.paper { background: var(--paper); border: 3px solid #E3CDA3; border-radius: 20px; padding: 16px; box-shadow: 0 3px 0 rgba(120, 80, 30, .18); }
.form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.field .hintx { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field textarea, .field select { width: 100%; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 16px; outline: none; font-family: var(--font); }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--leaf); }
.two { display: flex; gap: 10px; }
.two > * { flex: 1; min-width: 0; }
.avedit { display: flex; align-items: center; gap: 14px; }
.avedit .av { --s: 84px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.avedit .col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.btn { border: 0; border-radius: 14px; background: var(--leaf); color: #fff; font-weight: 800; padding: 12px 18px; font-size: 15px; box-shadow: 0 3px 0 var(--leaf-d); font-family: var(--round); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--leaf-d); }
.btn.block { width: 100%; }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 12px; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line); }
.btn.danger { background: #fff; color: #B3261E; border: 2px solid #F0C9C2; box-shadow: 0 2px 0 #F0C9C2; }
.btn:disabled { opacity: .5; }
.link { border: 0; background: none; color: var(--leaf-d); font-size: 13px; padding: 4px 0; text-decoration: underline; font-family: var(--round); }
.err-text { color: #B3261E; font-size: 13px; }
.ok-line { font-size: 14px; color: var(--leaf-d); font-weight: 800; }

.card { background: var(--paper); border: 3px solid #E3CDA3; border-radius: 16px; padding: 12px 14px; margin: 16px 6px 0; box-shadow: 0 2px 0 rgba(120, 80, 30, .18); position: relative; }
.card::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--coral); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.card h2 { font-size: 15px; margin: 4px 0 4px; }
.card p { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.card.warn { background: var(--warn-soft); border-color: #EBCB7A; }
.card.warn p { color: var(--warn); }

.toast { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 86px); background: var(--wood-dd); color: #fff; padding: 10px 14px; border-radius: 14px; font-size: 14px; text-align: center; z-index: 40; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.offline { background: var(--warn-soft); color: var(--warn); font-size: 12px; text-align: center; padding: 4px 8px; font-family: var(--font); }

.center { margin: auto; padding: 22px; width: 100%; max-width: 380px; }
.center .paper { text-align: center; }
.center h1 { font-size: 20px; margin: 4px 0 8px; }
.center p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.center textarea { width: 100%; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; min-height: 72px; font-size: 14px; margin-bottom: 10px; font-family: var(--font); }
.center .btn { margin-top: 4px; }
.center .deco { --s: 84px; margin: 0 auto 6px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }

/* アイコンを選ぶ（下から出るシート） */
.avpick { position: relative; border: 0; background: none; padding: 0; flex: none; border-radius: 50%; }
.avpick .pen { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--leaf); color: #fff; font-size: 14px; line-height: 26px; text-align: center; border: 2px solid var(--paper); }
.sheet-back { position: absolute; inset: 0; z-index: 20; background: rgba(60, 40, 20, .45); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 88%; overflow-y: auto; background: var(--paper); border-radius: 22px 22px 0 0; border-top: 3px solid var(--wood); padding: 6px 16px calc(env(safe-area-inset-bottom) + 16px); animation: sheetup .24s ease-out; box-shadow: 0 -6px 18px rgba(60, 40, 10, .25); }
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 10px; }
.sheet h2 { font-size: 18px; margin: 0 0 2px; }
.sheet h3 { font-size: 13px; font-weight: 800; color: var(--muted); margin: 16px 0 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 10px 10px; }
.pkw { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; }
.pkw.sp { width: 50px; }
.pick { width: 58px; height: 58px; border-radius: 50%; padding: 0; border: 0; background: #fff; overflow: hidden; box-shadow: 0 0 0 2px var(--line); }
.pkw.sp .pick { width: 50px; height: 50px; }
.pick img, .pick .facesvg { width: 100%; height: 100%; display: block; object-fit: cover; }
.pick.on { box-shadow: 0 0 0 3px var(--leaf); }
.pkl { font-size: 11px; line-height: 1.2; color: var(--muted); text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picks.sprow { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; gap: 10px 8px; }
.picks.sprow .pkw.sp { width: 60px; }
.picks.sprow .pkw.sp .pick { width: 56px; height: 56px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); justify-items: center; gap: 12px 8px; margin-top: 14px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); padding: 0; }
.sw.on { box-shadow: 0 0 0 3px var(--leaf); }
.sheet .closer { margin-top: 18px; }

/* ───────── オフィスのアレンジ：ポイント・ショップ・模様替え ───────── */
.roombar { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px 0; }
.chip { border: 2px solid var(--wood-d); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 14px 5px; font-weight: 800; font-size: 15px; box-shadow: 0 2px 0 var(--wood-dd); font-family: var(--round); }
.chip .star, .pbal .star { color: #E5A82B; margin-right: 4px; }
.chip.remodel { background: var(--leaf); color: #fff; border-color: var(--leaf-d); box-shadow: 0 2px 0 var(--leaf-d); }
.chip:active { transform: translateY(1px); }

/* 壁紙と床（部屋にも、ショップ・棚の見本にも同じ見た目を使う） */
[data-wall="cream"]  { background: var(--wall) repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); }
[data-wall="mint"]   { background: #D9EEDF repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); }
[data-wall="sky"]    { background: #D3E8F6 repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); }
[data-wall="rose"]   { background: #F9DCE3 repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 12px, rgba(255, 255, 255, 0) 12px 24px); }
[data-wall="stripe"] { background: repeating-linear-gradient(90deg, #C4DAF1 0 16px, #EDF4FC 16px 32px); }
[data-floor="wood"]   { background: #E5BF86 url(floor.svg); background-size: 192px 112px; }
[data-floor="light"]  { background: linear-gradient(rgba(255, 249, 232, .58), rgba(255, 249, 232, .58)), #E5BF86 url(floor.svg); background-size: auto, 192px 112px; }
[data-floor="dark"]   { background: linear-gradient(rgba(70, 35, 10, .45), rgba(70, 35, 10, .45)), #E5BF86 url(floor.svg); background-size: auto, 192px 112px; }
[data-floor="tile"]   { background: repeating-conic-gradient(#F6EBD2 0 25%, #E2D0A6 0 50%) 0 0 / 60px 60px; }
[data-floor="carpet"] { background: #A8D39A repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 6px, rgba(255, 255, 255, 0) 6px 12px); }
.swatch { display: inline-block; width: 56px; height: 44px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.swatch.big { width: 100px; height: 62px; }

/* 模様替えの棚 */
.screen.remodel .shelf { flex: none; background: var(--cream); border-top: 3px solid var(--wood); padding: 8px 10px calc(env(safe-area-inset-bottom) + 10px); max-height: 44%; overflow-y: auto; box-shadow: 0 -4px 10px rgba(80, 50, 20, .15); }
.shelf-top { display: flex; align-items: center; gap: 8px; }
.shelf-tabs { display: flex; gap: 6px; flex: 1; }
.stab { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 14px; color: var(--muted); font-family: var(--round); }
.stab.on { background: var(--leaf-soft); border-color: var(--leaf); color: var(--leaf-d); }
.shelf .stab { padding: 5px 12px; font-size: 13px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 2px; -webkit-overflow-scrolling: touch; }
.chips:has(.chipgroup) { flex-direction: column; overflow: visible; gap: 10px; }
.chipgroup { display: flex; gap: 8px; align-items: center; overflow-x: auto; }
.chipgroup::before { content: attr(data-label); flex: none; width: 36px; font-size: 12px; font-weight: 800; color: var(--muted); }
.chipitem { flex: none; width: 88px; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--round); }
.chipitem.on { border-color: var(--leaf); background: var(--leaf-soft); }
.chipitem.store { border-style: dashed; color: var(--coral); }
.cthumb { display: block; width: 64px; height: 48px; text-align: center; }
.cthumb .decor { width: 100%; height: 100%; }
.cthumb.big { font-size: 32px; line-height: 48px; font-weight: 800; }
.cname { font-size: 12px; font-weight: 700; line-height: 1.25; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwho { font-size: 11px; color: var(--muted); }
.shelf-empty { font-size: 13px; color: var(--muted); padding: 8px 4px; }
.remodel-hint { margin: 10px 4px 0; padding: 6px 10px; text-align: center; font-size: 13px; background: rgba(255, 251, 239, .92); border: 2px solid #E3CDA3; border-radius: 12px; }

/* ショップ */
.sethead.shophead { padding-left: 16px; }
.shoptabs { display: flex; gap: 6px; padding: 8px 12px; background: var(--cream); border-bottom: 2px solid var(--line); }
.shoptabs .stab { flex: 1; padding: 6px 2px; text-align: center; font-size: 13px; }
.shopgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shopcard { background: var(--paper); border: 3px solid #E3CDA3; border-radius: 16px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; box-shadow: 0 2px 0 rgba(120, 80, 30, .15); }
.prev { display: block; width: 100%; height: 76px; }
.prev .decor { width: 100px; height: 76px; margin: 0 auto; display: block; }
.prev.seatprev svg { width: 70px; height: 76px; display: block; margin: 0 auto; }
.sname { font-size: 14px; }
.sown { font-size: 12px; color: var(--leaf-d); font-weight: 700; min-height: 18px; }
.sbtns { display: flex; gap: 6px; width: 100%; }
.buy { flex: 1; border: 0; border-radius: 12px; padding: 8px 2px; font-weight: 800; font-size: 14px; color: #fff; font-family: var(--round); }
.buy.pts { background: var(--leaf); box-shadow: 0 3px 0 var(--leaf-d); }
.buy.yen { background: #B8651A; box-shadow: 0 3px 0 #8A4A10; }
.buy:disabled { opacity: .45; box-shadow: none; }
.buy:active:not(:disabled) { transform: translateY(2px); }
.slack { font-size: 11px; color: #B3261E; line-height: 1.3; }
.shopnote { font-size: 12px; color: var(--muted); margin: 14px 4px 0; text-align: center; }
.confirm { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0 12px; }
.confirm .prev { width: 120px; }
.cprice { font-weight: 800; font-size: 16px; margin: 0; }
.demo { font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 2px 12px; border-radius: 999px; margin: 0; }
.sheet .btn.block + .btn.block { margin-top: 8px; }
.wearlist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 52vh; overflow-y: auto; }
.wearrow { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: left; font-family: var(--round); }
.wearrow.on { border-color: var(--leaf); }
.wn { font-weight: 800; flex: 1; }
.wsub { font-size: 12px; color: var(--leaf-d); }

/* ポイントの履歴 */
.pcard { text-align: center; }
.psub { font-size: 13px; color: var(--muted); }
.pbal { font-size: 36px; font-weight: 800; line-height: 1.2; }
.prule { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.plist { margin-top: 14px; background: var(--paper); border: 3px solid #E3CDA3; border-radius: 16px; overflow: hidden; }
.plist .note { margin: 14px; }
.pday { font-size: 12px; font-weight: 800; color: var(--muted); background: #F6E8C6; padding: 4px 14px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #F0E2C0; }
.pico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.plus .pico { background: var(--leaf-soft); color: var(--leaf-d); }
.minus .pico { background: #FDE3DA; color: var(--coral); }
.pmid { flex: 1; min-width: 0; }
.ptitle { font-weight: 800; font-size: 14px; }
.psub2 { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pside { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: var(--muted); }
.pside b { font-size: 15px; color: var(--ink); }
.plus .pside b { color: var(--leaf-d); }
.minus .pside b { color: var(--coral); }

/* 服：写真アイコンの社員は、描いた頭の代わりに写真の下に服の帯・頭の上に帽子を出す */
.spr .onphoto { display: none; }
.sprite:has(.av.photo.has-photo) .onphoto { display: block; }
.sprite:has(.av.photo.has-photo) .outfit-drawn, .sprite:has(.av.photo.has-photo) .hat.drawn { display: none; }

/* ───────── 広いフロア（画面より大きい1枚のフロアを上から見て、ドラッグで見回す） ───────── */
.roomtop.compact { padding-bottom: 8px; }
.roomtop.compact .roomsign { margin-top: 4px; }
.roombar .chip { font-size: 14px; padding: 4px 11px 5px; }
.chip.elev { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 3px 5px; font-size: 13px; color: var(--leaf-d); }
.roombar .chip.elev { padding: 2px 10px 3px 5px; font-size: 13px; }
.elevico { display: block; line-height: 0; }
.elevico svg { width: 22px; height: 22px; display: block; }
.vp { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; background: #3B2A1C; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.vp:active { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.world > * { position: absolute; }
.wwall { z-index: 0; }
.wwall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--wood-d); border-top: 3px solid #D4A06A; }
.wshelf svg, .wwin svg { width: 100%; height: auto; display: block; }
.wwin .macsign { bottom: 6px; z-index: 2; }
.wgarland { z-index: 1; height: 44px; pointer-events: none; }
.wgarland svg { width: 100%; height: 100%; display: block; }
.zone { z-index: 0; box-shadow: inset 0 3px 0 rgba(90, 58, 30, .28); }
.zlabel { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 800; color: var(--muted); background: rgba(255, 251, 239, .85); border-radius: 8px; padding: 0 8px 1px; }
.islrug { z-index: 0; border-radius: 26px; opacity: .85; }
.islrug.r0 { background: #CFE6B8; } .islrug.r1 { background: #F8D6BA; } .islrug.r2 { background: #CBE0F0; } .islrug.r3 { background: #EBD3E6; }
.tsign { z-index: 1; display: grid; place-items: center; pointer-events: none; }
.tsign b { max-width: 90%; font-size: 14px; font-weight: 800; color: #5A3A1E; background: var(--wood); border: 2px solid var(--wood-d); border-radius: 10px; padding: 0 12px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 0 var(--wood-dd); }
.wseat { z-index: auto; }
.wseat .seat { width: 100%; }
.wseat .plate { width: calc(100% - 2px); min-width: 0; max-width: none; }
.bi { z-index: 1; }
.bi svg.bart, .bi .eventart, .bi .lobbyart { width: 100%; height: 100%; display: block; }
.bi-lobby .lobbyart { height: auto; }
.bi .sofapair { display: flex; align-items: flex-end; height: 100%; }
.bi .sofapair .decor { width: 50%; height: auto; }
.bi .decor { width: 100%; height: auto; }
.bi.elevator { background: none; border: 0; padding: 0; }
.bi.elevator:active { filter: brightness(.95); }
.board-wrap { padding: 6px; }
.board { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: #E8C98E; border: 5px solid #A87440; border-radius: 14px; overflow: hidden; box-shadow: 0 3px 0 rgba(90, 58, 30, .35); }
.board .btitle { text-align: center; font-weight: 800; font-size: 16px; color: #5A3A1E; }
.bnews { display: flex; flex-direction: column; gap: 3px; }
.bn { font-size: 13px; font-weight: 800; line-height: 1.3; padding: 2px 10px 3px; border-radius: 8px; background: var(--paper); border: 2px solid #D9B07A; }
.bn.ev { color: #fff; background: var(--coral); border-color: #F5B7A2; }
.bn.bd { color: #B03A5C; background: #FFF1F5; border-color: #F4B8C8; }
.bpoint { background: var(--paper); border: 2px solid #D9B07A; border-radius: 10px; padding: 4px 8px; font-weight: 800; font-size: 15px; }
.bpoint .star { color: #E5A82B; margin-right: 4px; }
.bpoint small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.3; }
.board .card { margin: 4px 0 0; padding: 8px 10px; }
.board .card::before { top: -8px; }
.board .card h2 { font-size: 13px; margin: 2px 0; }
.board .card p { font-size: 11px; margin: 2px 0 6px; line-height: 1.35; }
.board .card .btn { padding: 5px 12px; font-size: 13px; }
.wfurn { z-index: 1; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.wfurn .decor { width: 92%; height: auto; margin: 0; }
.wcell { z-index: 2; background: rgba(255, 255, 255, .28); border: 2px dashed rgba(138, 90, 43, .55); border-radius: 12px; padding: 0; }
.wcell.sel { border: 2px solid var(--leaf); background: rgba(221, 239, 201, .75); }
.wcell.has { background: rgba(255, 255, 255, .12); }
.wnight { left: 0; top: 0; right: 0; bottom: 0; z-index: 3; background: #8E9ACB; mix-blend-mode: multiply; opacity: calc(var(--night, 0) * .72); pointer-events: none; }
.wlampglow { left: -22px; top: 22px; width: 130px; height: 100px; z-index: 4; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 120, .8), rgba(255, 214, 120, 0)); }
.vctl { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; flex-direction: column; gap: 8px; }
.vctl button { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--wood-d); background: var(--paper); color: var(--ink); font-size: 22px; font-weight: 800; line-height: 1; padding: 0 0 2px; box-shadow: 0 2px 0 var(--wood-dd), 0 4px 10px rgba(60, 40, 10, .25); font-family: var(--font); }
.vctl button.wide { font-size: 12px; padding: 0; }
.vp.hctl .vctl { flex-direction: row; top: 6px; right: 6px; gap: 6px; }
.vp.hctl .vctl button { width: 36px; height: 36px; font-size: 19px; }
.vp.hctl .vctl button.wide { font-size: 11px; }
.vctl button:active { transform: translateY(1px); }
.vadd { position: absolute; right: 12px; bottom: 14px; z-index: 6; width: 48px; height: 48px; display: grid; place-items: center; background: var(--leaf); color: #fff; font-weight: 800; font-size: 30px; line-height: 1; border: 0; border-radius: 50%; padding: 0 0 3px; box-shadow: 0 3px 0 var(--leaf-d), 0 6px 14px rgba(60, 40, 10, .3); font-family: var(--font); }

/* 床の素材（区画ごとに違う） */
[data-floor="checker"] { background: repeating-conic-gradient(#FBF3E3 0 25%, #EBB8B0 0 50%) 0 0 / 44px 44px; }
[data-floor="carpet2"] { background: #B7C9E8 repeating-linear-gradient(135deg, rgba(255, 255, 255, .26) 0 6px, rgba(255, 255, 255, 0) 6px 12px); }
[data-floor="stone"]   { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 2px, rgba(0, 0, 0, 0) 2px 88px), repeating-linear-gradient(0deg, rgba(0, 0, 0, .09) 0 2px, rgba(0, 0, 0, 0) 2px 88px), #CFCABF; }

/* 席の状態：帰宅・出社の一言・残業・誕生日 */
.bub.away { min-width: 38px; height: 24px; padding: 0 8px; font-size: 12px; color: #fff; background: #8E9BAA; border-color: #6C7684; }
.bub.away::after { background: #8E9BAA; border-color: #6C7684; }
.bub.greet { min-width: 0; height: 24px; padding: 0 8px; font-size: 12px; white-space: nowrap; color: var(--leaf-d); border-color: #A9D49A; right: 0; }
.seat.away .sprite { opacity: .8; }
.seat.away .av.photo, .seat.away .sprite .onphoto { display: none !important; }
.seat.away .plate { opacity: .88; }
.seat .cake { position: absolute; left: 36%; bottom: 25%; width: 30%; z-index: 2; pointer-events: none; }
.seat .cake svg { width: 100%; height: auto; display: block; }
.seat.bday .plate { border-color: #F29AB0; background: #FFF1F5; }
.seat.bday .sprite::before { content: ""; position: absolute; left: 50%; top: 2%; z-index: 2; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 24px solid #F28B6B; transform: translateX(-50%) rotate(-8deg); pointer-events: none; }
.seat.bday .sprite::after { content: ""; position: absolute; left: calc(50% + 2px); top: 0; z-index: 3; width: 7px; height: 7px; border-radius: 50%; background: #FFD66B; pointer-events: none; }
.seat.late .sprite { filter: none; }

/* 誕生日のカード（トークの上） */
.bdcard { align-self: stretch; display: flex; align-items: center; gap: 10px; background: #FFF1F5; border: 2px solid #F4B8C8; border-radius: 16px; padding: 8px 12px; margin: 0 2px 8px; font-family: var(--font); }
.bdcake { flex: none; width: 46px; }
.bdcake svg { width: 100%; height: auto; display: block; }
.bdtxt b { display: block; font-size: 14px; color: #B03A5C; }
.bdtxt p { margin: 2px 0 0; font-size: 13px; color: #5A3A1E; line-height: 1.45; }

/* ───────── ビル（最初の画面）：空・夜景・天気・外観 ───────── */
.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stage > .scroll { flex: 1; }
.skybg { background: #BFE3F5; }
.skywrap { position: relative; min-height: 100%; display: flex; flex-direction: column; background: linear-gradient(var(--sky-top, #BFE3F5) 0, var(--sky-mid, #DDEFF8) 44%, var(--sky-bot, #F8E9C8) 100%); }
.skywrap > * { flex: none; }
.skylayer { position: absolute; left: 0; right: 0; top: 0; height: 300px; overflow: hidden; pointer-events: none; z-index: 0; }
.sk { position: absolute; left: 0; right: 0; top: 0; }
.sk svg { width: 100%; height: 230px; display: block; }
.sk.nimbus { top: 104px; left: auto; right: -30px; width: 230px; }
.sk.nimbus svg { width: 100%; height: auto; }
.celes { position: absolute; width: 80px; height: 80px; }
.celes svg { width: 100%; height: 100%; display: block; }
.celes.moon .big { transform: scale(1.35); }
.bldbar { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 12px) 14px 6px; }
.bldbar2 { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px; }
.chip.build { background: var(--leaf); color: #fff; border-color: var(--leaf-d); box-shadow: 0 2px 0 var(--leaf-d); }
.chip.wthr { display: inline-flex; align-items: center; gap: 5px; padding: 2px 12px 3px 6px; font-size: 13px; min-width: 0; max-width: 52%; }
.wico { display: block; line-height: 0; flex: none; }
.wico svg { width: 22px; height: 22px; display: block; }
.wtxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evtag { font-size: 12px; font-weight: 800; color: #fff; background: var(--coral); border: 2px solid #fff; border-radius: 999px; padding: 1px 10px 2px; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); white-space: nowrap; }
.scene { position: relative; }
.bldwrap { position: relative; z-index: 1; padding: 46px 14px 0; }
.bldg { max-width: 292px; margin: 0 auto; position: relative; }
.roofwrap { position: relative; margin: 0 -3px -3px; }
.roofart { display: block; width: 100%; height: auto; }
.bsign { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); background: var(--wood); border: 3px solid var(--wood-d); border-radius: 10px; padding: 0 16px 1px; font-weight: 800; font-size: 15px; color: #5A3A1E; box-shadow: 0 2px 0 var(--wood-dd); white-space: nowrap; }
.roofwrap.court .bsign { bottom: -4px; z-index: 2; }
.neonspot { position: absolute; left: 50%; top: -32px; width: 212px; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.neonart { width: 100%; height: auto; display: block; overflow: visible; }
.bfloor { display: block; position: relative; width: 100%; padding: 30px 8px 18px; border: 0; border-left: 12px solid #CFA46E; border-right: 12px solid #CFA46E; border-top: 7px solid #A87440; min-height: 98px; text-align: left; font-family: var(--round); cursor: pointer; overflow: hidden; }
.bfloor:active { filter: brightness(.96); }
.bfloor.lobby { padding: 28px 0 0; min-height: 0; overflow: visible; }
.bfloor::before { content: ""; position: absolute; inset: 0; background: #0E1838; opacity: 0; pointer-events: none; z-index: 0; }
.bfloor[data-lit="off"]::before { opacity: calc(var(--night, 0) * .6); }
.bfloor[data-lit="on"]::before { opacity: calc(var(--night, 0) * .06); }
.bfloor[data-lit="busy"]::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 30px 8px #FFCE6B; opacity: calc(.28 + var(--night, 0) * .6); pointer-events: none; z-index: 0; }
.bplate { position: absolute; top: 6px; left: 8px; z-index: 2; background: var(--paper); border: 2px solid #D9B07A; border-radius: 8px; padding: 0 8px 1px; font-size: 12px; font-weight: 800; color: var(--ink); box-shadow: 0 1px 0 rgba(120, 80, 30, .2); max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bppl { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px 7px; align-items: flex-end; padding-bottom: 4px; }
.bempty { font-size: 12px; color: var(--muted); padding: 14px 2px 6px; }
.nite .bfloor[data-lit="off"] .bempty { color: #D9DEEE; }
.bfl { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; border-top: 3px solid rgba(120, 70, 30, .35); }
.blobby { display: block; position: relative; z-index: 1; }
.blobby .lobbyart { display: block; width: 100%; height: auto; }
.opensign { position: absolute; left: 56%; top: 38%; z-index: 2; font-size: 12px; font-weight: 800; line-height: 1.3; padding: 0 8px 1px; border-radius: 6px; border: 2px solid #7A5A3A; color: #B8A99A; background: #6A5A4A; }
.opensign.on { color: #C0392B; background: #FFF3C2; border-color: #E0A02A; box-shadow: 0 0 10px 2px rgba(255, 214, 102, .85); }
.bbase { height: 16px; background: #8A5A2B; margin: 0 -3px; border-radius: 0 0 5px 5px; }
.mini { position: relative; display: block; width: 34px; height: 34px; }
.mini .av { border: 2px solid #fff; box-shadow: 0 1px 3px rgba(80, 50, 20, .35); }
.mini .mb { position: absolute; top: -9px; right: -9px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; z-index: 2; }
.mini .mb.dots { color: var(--leaf-d); border-color: #A9D49A; letter-spacing: -1px; }
.mini .mb.ex { color: var(--coral); border-color: #F5B7A2; }
.mini .mcake { position: absolute; right: -8px; bottom: -6px; width: 20px; z-index: 2; }
.mini .mcake svg { width: 100%; height: auto; display: block; }
.mini.home { opacity: .85; }
.mini.home .av { filter: grayscale(.7); }
.ground { position: relative; z-index: 3; height: 112px; background: var(--grass, #9BCB86); border-top: 8px solid var(--grass-d, #7FB46A); margin-top: -2px; }
.ground::after { content: ""; position: absolute; left: 50%; top: 0; width: 70px; height: 100%; margin-left: -35px; background: #E8DCC4; opacity: .9; }
.horizon { position: absolute; left: 0; right: 0; bottom: 104px; height: 96px; z-index: 0; pointer-events: none; }
.horizon .cityart { width: 100%; height: 100%; display: block; }
.ground > span { position: absolute; z-index: 1; display: block; line-height: 0; filter: brightness(calc(1 - var(--night, 0) * .5)); }
.ground > span.glamp, .ground > span.gevent { filter: none; }
.ground svg { display: block; width: 100%; height: auto; }
.gtree { width: 54px; bottom: 56px; z-index: 2 !important; }
.gtree.l { left: 1%; } .gtree.r { right: 1%; }
.gsakura { width: 66px; bottom: 54px; left: 16%; z-index: 2 !important; }
.glamp { width: 26px; bottom: 40px; z-index: 2 !important; }
.glamp.l { left: 34%; } .glamp.r { right: 34%; }
.gbench { width: 58px; bottom: 8px; right: 30%; }
.gbed { width: 62px; bottom: 6px; right: 12%; }
.gevent { width: 62px; bottom: 6px; left: 20%; }
.gsusuki { width: 40px; bottom: 6px; }
.gsusuki.a { left: 6%; } .gsusuki.b { right: 3%; bottom: 50px; width: 34px; }
.bnote { flex: 1 0 auto !important; margin: 0; padding: 8px 12px 14px; background: var(--grass, #9BCB86); color: #2F5F2E; font-weight: 700; z-index: 3; position: relative; }
.nite .bnote { color: #CFE3C0; }
.bnote small { display: block; font-size: 11px; font-weight: 400; margin-top: 2px; opacity: .85; }
.kickers { position: absolute; inset: 0; pointer-events: none; }
.kicker { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; pointer-events: auto; z-index: 2; animation: kick 2.4s ease-in-out infinite alternate; }
.kicker.k1 { animation-duration: 2.9s; animation-delay: -1s; } .kicker.k2 { animation-duration: 2.6s; animation-delay: -.5s; }
.kicker .av { --s: 24px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
@keyframes kick { from { transform: translate(-50%, -50%); } to { transform: translate(calc(-50% + 16px), calc(-50% - 4px)); } }
.kball { position: absolute; left: 36%; top: 58%; width: 13px; z-index: 3; line-height: 0; animation: ball 3.2s linear infinite alternate; pointer-events: none; }
.kball svg { width: 100%; height: auto; display: block; }
@keyframes ball { 0% { left: 28%; top: 62%; } 25% { left: 40%; top: 52%; } 50% { left: 52%; top: 62%; } 75% { left: 62%; top: 52%; } 100% { left: 72%; top: 62%; } }

/* 天気の効果：画面全体に重ねる */
.fx { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.fx.rain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='140'%3E%3Cg stroke='%23EAF4FC' stroke-width='1.4' stroke-linecap='round' opacity='.75'%3E%3Cpath d='M10 8l-4 16M44 62l-4 16M80 22l-4 16M104 92l-4 16M26 102l-4 16M64 118l-4 16'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='210'%3E%3Cg stroke='%23D6E6F4' stroke-width='1.1' stroke-linecap='round' opacity='.6'%3E%3Cpath d='M20 12l-3 12M90 40l-3 12M140 90l-3 12M50 120l-3 12M120 160l-3 12M10 180l-3 12'/%3E%3C/g%3E%3C/svg%3E"); background-size: 120px 140px, 170px 210px; animation: rainfall .6s linear infinite; }
@keyframes rainfall { from { background-position: 0 0, 40px 0; } to { background-position: 0 140px, 40px 210px; } }
.fx.snow { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='160'%3E%3Cg fill='%23fff' opacity='.9'%3E%3Ccircle cx='14' cy='18' r='2.4'/%3E%3Ccircle cx='70' cy='40' r='1.8'/%3E%3Ccircle cx='118' cy='24' r='2.6'/%3E%3Ccircle cx='38' cy='84' r='2'/%3E%3Ccircle cx='96' cy='96' r='2.8'/%3E%3Ccircle cx='128' cy='140' r='1.8'/%3E%3Ccircle cx='60' cy='140' r='2.4'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='240'%3E%3Cg fill='%23fff' opacity='.7'%3E%3Ccircle cx='30' cy='30' r='1.4'/%3E%3Ccircle cx='110' cy='70' r='1.6'/%3E%3Ccircle cx='170' cy='130' r='1.4'/%3E%3Ccircle cx='70' cy='170' r='1.6'/%3E%3Ccircle cx='150' cy='210' r='1.4'/%3E%3C/g%3E%3C/svg%3E"); background-size: 140px 160px, 200px 240px; animation: snowfall 7s linear infinite; }
@keyframes snowfall { from { background-position: 0 0, 30px 0; } to { background-position: 0 160px, 30px 240px; } }
.petals svg { width: 100%; height: 100%; display: block; }
.petals { position: absolute; inset: 0; }

/* 天気の場所を選ぶ */
.placenote, .placesrc { font-size: 12px; color: var(--muted); margin: 6px 0; line-height: 1.45; }
.placelist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.placerow { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 15px; font-weight: 700; font-family: var(--round); text-align: left; }
.placerow.on { border-color: var(--leaf); background: var(--leaf-soft); }
.pr-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.placerow.on .pr-dot { background: var(--leaf); border-color: var(--leaf-d); }

/* ───────── 肩書き・ワンタップ仕事メニュー・ミッション・朝礼（v11） ───────── */
.rankpill { display: inline-block; font-size: 11px; font-weight: 800; line-height: 1.35; border-radius: 999px; padding: 0 8px 1px; background: #E6DCC6; color: #6B5A3C; white-space: nowrap; }
.rankpill.r1 { background: #D7EBFA; color: #2F6FA3; }
.rankpill.r2 { background: #E4E8EE; color: #4A5565; box-shadow: inset 0 0 0 1px #B0B7C3; }
.rankpill.r3 { background: #FBE6A8; color: #7A5600; box-shadow: inset 0 0 0 1px #E2B94A; }
.rankpill.r4 { background: linear-gradient(#F8DE86, #E5B13F); color: #5A3A00; box-shadow: inset 0 0 0 1px #C98F10; }
.seat .rankpill { margin-top: 3px; }
.seat.rk1 .plate { border-color: #7FB7E6; }
.seat.rk2 .plate { border-color: #B0B7C3; box-shadow: 0 2px 0 #8E96A3; }
.seat.rk3 .plate { border-color: #D9A53A; background: #FFF8E1; box-shadow: 0 2px 0 #B8902A; }
.seat.rk4 .plate { border-color: #C98F10; background: linear-gradient(#FFF6D8, #FBE29A); box-shadow: 0 2px 0 #A8780C; }
.seat.bday .plate { border-color: #F29AB0; background: #FFF1F5; }
.trow .nm .rankpill { flex: none; }

/* 社員を押した時のメニュー（シート） */
.seathead { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.seathead b { font-size: 18px; margin-right: 8px; }
.seathead small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.menuopts { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.menuopt { text-align: left; border: 2px solid #CFE3C6; background: #fff; color: #2F6B34; border-radius: 14px; padding: 10px 14px; font-size: 15px; font-weight: 700; font-family: var(--round); line-height: 1.35; }
.menuopt:active { background: var(--leaf-soft); }
.sheetrow { display: flex; gap: 8px; }
.sheetrow .btn { flex: 1; }
.link.center { display: block; margin: 10px auto 0; }
.sheet .note { margin: 8px 0; text-align: left; }

/* トークの入力欄の上：ワンタップ仕事メニュー */
.wmenu { display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px 0; background: #F4F6F9; border-top: 1px solid #DDE2EA; -webkit-overflow-scrolling: touch; font-family: var(--font); }
.wchip { flex: none; max-width: 76%; border: 1.5px solid #BFDDB4; background: #fff; color: #2F6B34; border-radius: 17px; padding: 6px 13px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
.wchip:active { background: var(--leaf-soft); }
.wmenu + .compose { border-top: 0; }

/* 設定：仕事メニューの編集 */
.menued { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: flex; gap: 8px; align-items: center; }
.mrow input { flex: 1; min-width: 0; }
.mdel { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #F0C9C2; background: #fff; color: #B3261E; font-size: 20px; line-height: 1; padding: 0 0 2px; }

/* ビルの上のボタン */
.chip.mis { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 3px 8px; background: #FFF4DC; border-color: #E0A042; box-shadow: 0 2px 0 #B97F28; }
.mflame svg { width: 18px; height: 22px; display: block; }
.mtxt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; }
.mtxt b { font-size: 12px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.mtxt small { font-size: 11px; font-weight: 700; color: var(--coral); white-space: nowrap; }
.mgo { font-size: 20px; font-weight: 800; line-height: 1; color: #B97F28; margin: -2px -1px 0 0; }
.bldbar3 { position: relative; z-index: 3; display: flex; justify-content: center; padding: 8px 14px 0; }
.choreiflag { position: absolute; right: 6px; top: -8px; z-index: 3; font-size: 12px; font-weight: 800; line-height: 1.4; color: #fff; background: #8A7FD0; border: 2px solid #fff; border-radius: 999px; padding: 0 9px 1px; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); white-space: nowrap; }
.choreiflag.new { background: var(--coral); animation: hop 1.4s ease-in-out infinite; }

/* 朝礼の会議（1階） */
.chorei { position: relative; }
.chead { position: absolute; left: 18px; top: 4px; z-index: 2; display: flex; flex-direction: column; gap: 0; }
.chead b { font-size: 16px; line-height: 1.3; color: #5A3A1E; }
.chead span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.cfull { position: absolute; z-index: 3; border: 2px solid var(--wood-d); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 0 12px 1px; font-weight: 800; font-size: 12px; box-shadow: 0 2px 0 var(--wood-dd); font-family: var(--round); }
.cfull:disabled { opacity: .5; }
.ctable { position: absolute; height: 560px; pointer-events: none; }
.ctable svg { width: 100%; height: 100%; display: block; }
.cseat { position: absolute; display: flex; align-items: center; gap: 8px; }
.cseat .av { --s: 54px; border: 3px solid #fff; box-shadow: 0 2px 4px rgba(80, 50, 20, .3); }
.av.ghost { display: grid; place-items: center; background: #EDE3CF; border: 2px dashed #B7A27A; color: #8A6A48; font-weight: 800; font-size: 24px; box-shadow: none; }
.cplate { background: var(--paper); border: 2px solid #D9B07A; border-radius: 10px; padding: 3px 9px 4px; box-shadow: 0 2px 0 rgba(120, 80, 30, .2); min-width: 0; }
.cplate b { display: block; font-size: 14px; line-height: 1.3; white-space: nowrap; max-width: 106px; overflow: hidden; text-overflow: ellipsis; }
.cplate small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; white-space: nowrap; max-width: 106px; overflow: hidden; text-overflow: ellipsis; }
.cbub { position: absolute; z-index: 2; height: 124px; text-align: left; background: #fff; border: 3px solid var(--co, #8A6A48); border-radius: 18px; padding: 8px 12px 10px; box-shadow: 0 3px 0 rgba(90, 58, 30, .25); font-family: var(--font); display: flex; flex-direction: column; gap: 4px; }
.cbub::after { content: ""; position: absolute; left: 28px; width: 18px; height: 18px; margin-left: -9px; background: #fff; border: solid var(--co, #8A6A48); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.cbub.up::after { bottom: -11px; }
.cbub.down::after { top: -11px; transform: rotate(225deg); }
.cbub.chosen { background: #F1FAEA; }
.cbub.chosen::after { background: #F1FAEA; }
.cbub.none { opacity: .72; border-style: dashed; }
.cbub:active { transform: translateY(1px); }
.cb-co { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--co, #8A6A48); }
.cb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--co, #8A6A48); flex: none; }
.cb-name { min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-co em { margin-left: auto; flex: none; font-style: normal; font-size: 12px; color: #fff; background: var(--leaf); border-radius: 999px; padding: 0 9px 1px; white-space: nowrap; }
.cb-want { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; color: #3A2A18; }
.csec { margin: 10px 0 0; }
.csec h3 { margin: 0 0 4px; }
.csec p { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.cfrom { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.cnolead { margin: 14px 0 6px; padding: 10px 12px; background: var(--warn-soft); border-radius: 14px; }
.cnolead p { margin: 0 0 6px; font-size: 14px; color: var(--warn); font-weight: 700; }
.cnolead .cnote { font-weight: 400; font-size: 13px; }
.cconf { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.cfull-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--font); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0 0; max-height: 46vh; overflow-y: auto; }
.sheet .btn.block + .btn.block { margin-top: 8px; }
.sheet > .csec + .btn, .sheet > .err-text + .btn { margin-top: 12px; }

/* 今日のミッション */
.streakcard { display: flex; align-items: center; gap: 14px; }
.sflame svg { width: 44px; height: 54px; display: block; }
.sbig { font-size: 15px; color: var(--muted); }
.sbig b { font-size: 34px; color: var(--coral); margin-right: 4px; }
.ssub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.mhead { margin: 16px 4px 8px; font-weight: 800; font-size: 14px; color: var(--muted); }
.mcard { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 3px solid #E3CDA3; border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 2px 0 rgba(120, 80, 30, .15); }
.mcard.done { background: var(--leaf-soft); border-color: #A9D49A; }
.mck { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); background: #fff; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 17px; }
.mcard.done .mck { background: var(--leaf); border-color: var(--leaf-d); }
.mmid { flex: 1; min-width: 0; }
.mmid b { display: block; font-size: 15px; }
.mmid small { font-size: 12px; color: var(--muted); }
.mbar { height: 8px; border-radius: 4px; background: #EBDDBC; margin: 5px 0 3px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--leaf); border-radius: 4px; }
.mpts { flex: none; font-weight: 800; font-size: 16px; color: var(--leaf-d); }
.bonuscard { margin-top: 14px; }
.bonuscard small { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.brow { display: flex; gap: 10px; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.brow .bk { color: var(--leaf-d); font-weight: 800; min-width: 5em; text-align: right; }
.brow.got { color: var(--leaf-d); }
.milestone { text-align: center; padding: 8px 0 4px; }
.ms-flame svg { width: 64px; height: 78px; margin: 0 auto; display: block; }
.ms-big { font-size: 20px; font-weight: 800; margin: 6px 0; }
.ms-furn .decor { width: 110px; margin: 4px auto; }

/* 肩書きが上がったお祝い */
.cele-back { position: absolute; inset: 0; z-index: 30; background: rgba(60, 40, 20, .55); display: grid; place-items: center; padding: 20px; }
.cele { position: relative; width: 100%; max-width: 340px; background: var(--paper); border: 4px solid #F2C14E; border-radius: 24px; padding: 22px 18px 18px; text-align: center; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti svg { width: 100%; height: 100%; display: block; }
.cele > *:not(.confetti) { position: relative; }
.cele-av { position: relative; width: 100px; margin: 0 auto; }
.cele-av .av { --s: 88px; margin: 0 auto; border: 4px solid #F2C14E; box-shadow: 0 0 0 3px #fff; }
.cele-rank { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); background: linear-gradient(#F8DE86, #E5B13F); color: #5A3A00; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 0 12px 1px; border: 2px solid #fff; white-space: nowrap; }
.cele-title { font-size: 19px; font-weight: 800; margin: 18px 0 4px; color: #5A3A1E; }
.cele p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.cele-pts { display: inline-block; font-size: 24px; font-weight: 800; color: var(--leaf-d); background: var(--leaf-soft); border-radius: 999px; padding: 0 18px 2px; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
  .eye, .working .hands, .bub i, .bub.ex, .kicker, .kball, .fx.rain, .fx.snow, .choreiflag.new { animation: none; }
  .bub i { opacity: 1; }
  .kball { left: 48%; top: 60%; }
  .seat:active .sprite, .btn:active { transform: none; }
  .sheet { animation: none; }
}

/* ───────── 画面の読みやすさと操作案内（表示のみ） ───────── */
:root {
  --muted: #70583F;
  --leaf: #387D43; --leaf-d: #285F33; --leaf-soft: #E2EFCF;
  --badge: #287D43; --coral: #B94C2D;
  --chat-bg: #D5E2E7; --chat-ink: #334B57; --mine: #D8EDC7;
}
html { -webkit-text-size-adjust: 100%; }
#app, .screen, .scroll { min-width: 0; }
.scroll { overflow-x: hidden; }
button { touch-action: manipulation; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #245E47; outline-offset: 3px;
}
button:disabled { cursor: default; }
.iconbtn, .textbtn, .penbtn, .chip, .btn, .stab, .buy, .link, .mdel, .sw { min-height: 44px; }
.iconbtn, .textbtn, .penbtn, .mdel, .sw { min-width: 44px; }
.btn, .chip, .buy, .stab, .menuopt, .wchip { transition: background-color .16s ease, box-shadow .16s ease; }
.btn { box-shadow: 0 2px 0 var(--leaf-d); }
.btn.ghost, .paper, .shopcard, .mcard, .plist { border-width: 2px; }
.paper, .shopcard, .mcard { box-shadow: 0 3px 0 rgba(120, 80, 30, .1); }
.setbg { padding: 16px 14px 24px; }
.sethead { gap: 6px; border-bottom-width: 2px; }
.sethead h1 { font-size: 18px; line-height: 1.4; min-width: 0; }
.sethead .chip { flex: none; font-size: 14px; padding-inline: 10px; }
.tabbar { flex: none; border-top-width: 2px; }
.tab { min-height: 64px; padding: 7px 0; gap: 2px; font-size: 12px; }
.tab .ico { width: 48px; height: 30px; }
.tab.on .ico { box-shadow: inset 0 0 0 1px #C3DAAE; }
.tab .badge { border: 2px solid var(--cream); min-width: 22px; height: 22px; }

/* ビル：入口を示し、仕事への案内を空の上に置く。 */
.bldbar { padding: calc(env(safe-area-inset-top) + 8px) 14px 6px; }
.bldbar .chip.build { background: var(--paper); color: var(--leaf-d); border-color: #91AE72; box-shadow: 0 2px 0 #91AE72; font-size: 14px; }
.bldbar2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px; }
.chip.wthr { max-width: none; padding: 6px 8px; font-size: 12px; gap: 4px; }
.wtxt { white-space: normal; text-align: left; line-height: 1.4; overflow-wrap: anywhere; }
.chip.mis { padding: 6px 8px; min-width: 0; justify-content: space-between; }
.mtxt b { white-space: normal; font-size: 12px; }
.mtxt small { font-size: 11px; color: #974B20; margin-top: 2px; }
.mflame { flex: none; }
.building-guide { position: relative; z-index: 3; width: max-content; max-width: calc(100% - 28px); margin: 6px auto 0; padding: 2px 14px 3px; border-radius: 999px; background: #FFFBEFE6; color: var(--leaf-d); font-size: 13px; font-weight: 700; line-height: 1.5; box-shadow: 0 2px 6px #263B3518; }
.bldwrap { padding-top: 12px; }
.bldwrap:has(.neonspot) { padding-top: 40px; }
.bldg { max-width: 316px; }
.bfloor { padding: 34px 10px 14px; min-height: 86px; }
.bfloor.lobby { padding-top: 34px; }
.bplate { font-size: 13px; top: 7px; max-width: calc(100% - 66px); border-radius: 9px; padding: 0 7px 1px; }
.floor-enter { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 0 6px 1px; border-radius: 7px; background: var(--leaf-d); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; }
.bppl { gap: 8px 9px; }
.bempty { padding: 4px 0; font-size: 13px; line-height: 1.6; }
.opensign { color: #FFF5DF; }
.choreiflag { top: -5px; font-size: 12px; }
.kicker { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.kicker .av { --s: 28px !important; }
.bnote { background: var(--paper); margin: 0; padding: 4px 16px 8px; color: var(--muted); }
/* 3階建てなら、屋上から地面まで最初の1画面（375×812）に収まる。画面が低い時は地面を少し低くする */
.ground { height: clamp(84px, calc(100dvh - 708px), 112px); }
/* 夜は帯をやめて、芝生がそのまま続く（文字だけ・うすい影） */
.nite .bnote { background: var(--grass, #3F6A45); color: #E6ECF8; text-shadow: 0 1px 2px rgba(10, 20, 30, .6); }
.nite .bnote small { opacity: .92; }

/* フロア：見出しが長くても改名ボタンと重ならない。 */
.roomsign { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 8px 4px 14px; border-width: 2px; }
.roomsign h1 { flex: 1; min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; }
.penbtn { flex: none; width: 44px; height: 44px; margin-left: 0; font-size: 19px; }
.roombar { gap: 6px; padding-top: 10px; }
.roombar .chip { font-size: 13px; padding: 6px 8px; white-space: nowrap; }
.roombar .chip.elev { font-size: 13px; padding: 6px 8px; }
.elevico svg { width: 18px; height: 18px; }
.floor-guide { flex: none; padding: 8px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.floor-guide b { display: block; font-size: 14px; color: var(--leaf-d); }
.floor-guide span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.vctl, .vp.hctl .vctl { top: auto; bottom: 14px; left: 12px; right: auto; flex-direction: row; gap: 6px; }
.vctl button, .vp.hctl .vctl button { width: 44px; height: 44px; font-size: 23px; }
.vctl button.wide, .vp.hctl .vctl button.wide { font-size: 12px; }
.vadd { width: auto; min-width: 116px; height: 44px; border-radius: 22px; padding: 0 12px; display: flex; gap: 5px; font-size: 13px; }
.vadd > span { font-size: 24px; line-height: 1; }
/* 標準倍率0.85でも13pxの補助文字は11px以上になる。全体表示は見取り図。 */
.world .plate b { font-size: 16px; line-height: 1.35; }
.world .plate small { font-size: 13px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.world .rankpill, .world .zlabel, .world .bpoint small, .world .board .card p,
.world .cork .it, .world .cork .sym, .world .cplate small { font-size: 13px; }
.world .plate { padding: 4px 3px; }
.seat.add .plate b { font-size: 14px; white-space: normal; }
.seat .rankpill { padding: 2px 8px; }
.world .wnight { opacity: calc(var(--night, 0) * .32); }

/* 社員のメニュー、共通シート。 */
.sheet { padding: 8px 16px calc(env(safe-area-inset-bottom) + 18px); border-top-width: 2px; overscroll-behavior-y: contain; }
.sheet h2 { font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.sheet h3 { font-size: 13px; }
.seathead > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.seathead small { font-size: 13px; line-height: 1.5; }
.menuopt { min-height: 48px; padding: 12px 14px; line-height: 1.6; overflow-wrap: anywhere; }
.sheetrow .btn { padding-inline: 10px; }
.link.center { padding: 10px; }
.field label, .field .hintx { font-size: 13px; }
.field .hintx { line-height: 1.6; }
.mdel { width: 44px; height: 44px; }
.sw { width: 44px; height: 44px; }
.err-text { overflow-wrap: anywhere; }

/* トーク：本文に十分な幅を渡し、仕事メニューは省略しない。 */
.lhead { background: var(--paper); padding: calc(env(safe-area-inset-top) + 14px) 16px 8px; }
.lhead h1 { color: var(--ink); font-size: 22px; }
.list-guide { margin: 0; padding: 0 16px 12px; background: var(--paper); font-size: 13px; color: var(--muted); }
.trow { padding: 14px; gap: 10px; min-height: 86px; }
.trow .nm { flex-wrap: wrap; gap: 3px 6px; }
.trow .nm span:first-child { max-width: 100%; }
.trow .stx { width: 100%; font-size: 12px; }
.trow .pv, .trow .pv.empty, .trow .tm { color: #626866; }
.trow .pv { margin-top: 3px; }
.thead { background: var(--paper); padding-right: 12px; }
.thead .ttl b { color: var(--ink); }
.thead .sub { color: #5B635D; line-height: 1.5; }
.iconbtn, .textbtn { color: var(--leaf-d); }
.chat { gap: 5px; padding: 12px; }
.empty-talk { max-width: 310px; white-space: pre-line; font-size: 15px; line-height: 1.9; padding: 20px 18px; background: #FFFCF4; border: 1px solid #FFFFFF; box-shadow: 0 4px 16px #334B5710; }
.msg .col { max-width: calc(100% - 42px); }
.msg.me .col { max-width: 100%; }
.msg .line { max-width: 100%; }
.b { min-width: 0; max-width: min(76vw, 300px); font-size: 16px; line-height: 1.65; }
.meta { max-width: 72px; }
/* 仕事メニュー：ふだんは入力欄の上に1行（横に流せる）。「メニュー ▲」で縦の一覧。 */
.wmenu { display: flex; align-items: center; gap: 8px; flex: none; overflow: visible; padding: 6px 10px; background: var(--paper); border-top: 1px solid var(--line); }
.wm-head { flex: none; display: flex; align-items: center; }
.wm-toggle { display: grid; justify-items: center; align-content: center; min-width: 78px; min-height: 44px; padding: 2px 10px; border: 1.5px solid #BFDDB4; border-radius: 12px; background: var(--leaf-soft); color: var(--leaf-d); font-family: var(--font); line-height: 1.25; }
.wm-toggle b { font-size: 14px; }
.wm-toggle small { font-size: 11px; font-weight: 700; color: var(--muted); }
.workmenu-label { display: none; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.wm-chips { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wm-chips::-webkit-scrollbar { display: none; }
.wchip { flex: none; width: auto; max-width: 15em; min-height: 44px; border-radius: 22px; padding: 0 14px; text-align: center; font-size: 14px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.wmenu.open { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 12px 10px; }
.wmenu.open .wm-head { justify-content: space-between; gap: 10px; }
.wmenu.open .workmenu-label { display: block; }
.wmenu.open .wm-chips { flex: none; flex-direction: column; overflow-x: hidden; overflow-y: auto; max-height: min(28dvh, 220px); }
.wmenu.open .wchip { width: 100%; max-width: none; border-radius: 12px; padding: 10px 12px; text-align: left; line-height: 1.5; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.compose { background: var(--paper); gap: 8px; }
.compose textarea { min-width: 0; min-height: 44px; }
.send { width: 44px; height: 44px; }
.hint { border-radius: 12px; line-height: 1.6; }
.meta .retry { min-height: 44px; padding: 5px; }

/* ショップ：分類と価格を読みやすく、デモの説明を先に置く。 */
.shoptabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 14px; }
.shoptabs .stab { min-height: 44px; border-radius: 12px; padding: 8px 4px; font-size: 14px; }
.stab.on { color: var(--leaf-d); background: var(--leaf-soft); }
.shop-intro { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.shop-demo { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #DDC99F; background: var(--paper); border-radius: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.shopgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shopcard { min-width: 0; padding: 12px 10px; gap: 6px; }
.sname { font-size: 14px; overflow-wrap: anywhere; }
.sbtns { flex-direction: column; margin-top: auto; gap: 8px; }
.buy { flex: auto; padding: 10px 4px; font-size: 14px; }
.buy:disabled { background: #E8E4D7; color: #756B5B; opacity: 1; box-shadow: none; }
.slack { font-size: 12px; color: #8E4D2E; }
.shopnote { text-align: left; line-height: 1.8; font-size: 13px; }
.building-card { grid-column: 1 / -1; padding: 18px; }
.building-card .sbtns { flex-direction: row; max-width: 280px; }
.building-card .buy { flex: 1; }
.building-card .sname { font-size: 17px; }
.shelf-top { flex-wrap: wrap; }
.shelf-tabs { min-width: 0; gap: 5px; }
.shelf .stab { padding: 6px 10px; }
.shelf-top > .btn { margin-left: auto; }
.remodel-hint { font-size: 13px; line-height: 1.6; margin-bottom: 6px; }

/* 朝礼：色は識別用の枠に残し、会社名は濃い文字で。 */
.chead { right: 144px; }
.chead b { font-size: 17px; }
.chead span { font-size: 13px; }
.cfull { min-height: 52px; min-width: 124px; font-size: 15px; padding: 6px 12px; }
.cplate b { font-size: 16px; }
.cbub { padding: 9px 10px; gap: 4px; }
.cb-co { color: var(--ink); font-size: 15px; }
.cb-want { font-size: 14px; line-height: 1.45; -webkit-line-clamp: 2; }
.cb-more { margin-top: auto; color: var(--leaf-d); font-size: 13px; font-weight: 700; }
.cbub.none { opacity: 1; background: #F8F4EA; }
.cb-co em { font-size: 13px; padding-inline: 5px; }

/* ミッション：達成数・進み具合・ごほうびを同じカード内で読み取れる。 */
.streakcard { padding: 16px; gap: 12px; }
.mcard { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px; }
.mck { width: 28px; height: 28px; border-width: 2px; }
.mmid b { font-size: 15px; line-height: 1.5; }
.mmid small { font-size: 12px; }
.mpts { font-size: 15px; }
.mbar { margin-top: 8px; }
.bonuscard { padding: 14px; }
.brow { flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; }
.brow > span:nth-child(2) { margin-left: auto; text-align: right; }
.brow .bk { min-width: 0; width: 100%; }
.brow .bk:empty { display: none; }
.toast { background: #335F3D; border: 1px solid #FFFFFF80; line-height: 1.6; box-shadow: 0 4px 16px #263B3530; }
@keyframes gentle-arrival { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.toast, .cele { animation: gentle-arrival .22s ease-out both; }
.bub.ex, .choreiflag.new { animation-iteration-count: 2; }
@media (max-height: 550px) {
  .wmenu.open .wm-chips { max-height: 100px; }
  .floor-guide { padding-block: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:active, .seat:active .sprite { transform: none !important; }
  .kicker:active { transform: translate(-50%, -50%) !important; }
}

/* 手直し：名札の高さをそろえ、朝礼の会議は1画面に収める（拡大・縮小のボタンは朝礼の画面では隠す） */
/* 名札の役割は2行まで出す（高さは2行ぶんそろえる）。トーク画面の上にも、名前の下に役割を常に出す */
.world .plate small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow: hidden; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; min-height: 2.5em; }
.thead .ttl .role { font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--leaf-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat.add .plate b { white-space: nowrap; line-height: 1.35; }
.vp.hctl .vctl { display: none; }
.cb-co { font-size: 14px; }

/* 階の多いビル（5階分以上）：各階を小さくそろえて、屋上から1階までが一度に見える。押すとその階に入る。
   一時停止中の事業の階（paused）は、昼でも明かりを落として「お休み中」の札（社員はいて、頼めば動く） */
.bldwrap:has(.bldg.tall) { padding-top: 6px; }
.bldg.tall .bfloor { padding: 28px 10px 6px; min-height: 0; border-top-width: 4px; }
.bldg.tall .bfloor.lobby { padding-top: 28px; }
.bldg.tall .bplate { top: 4px; font-size: 12px; padding: 0 7px 1px; }
.bldg.tall .floor-enter { top: 5px; }
.bldg.tall .bppl { gap: 4px; padding-bottom: 0; }
.bldg.tall .mini { width: 26px; height: 26px; }
.bldg.tall .mini .av { --s: 26px !important; border-width: 1.5px; }
.bldg.tall .mini .mb { top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 2px; border-width: 1.5px; font-size: 11px; }
.bldg.tall .mini .mcake { width: 15px; right: -5px; bottom: -4px; }
.bldg.tall .bempty { padding: 0; font-size: 12px; line-height: 1.4; }
.bldg.tall .blobby .lobbyart { width: 66%; margin: 0 auto; }
.bmore { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: #fff; border: 2px solid var(--line); font-size: 12px; font-weight: 800; color: var(--leaf-d); }
.bfloor.paused[data-lit="off"]::before { opacity: .5; }
.pausedsign { position: absolute; top: 5px; right: 64px; z-index: 2; padding: 0 9px 1px; border: 2px solid #8C93AD; border-radius: 8px; background: #3A3F55; color: #FFE9A8; font-size: 12px; font-weight: 800; line-height: 1.5; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.trow .rolel { margin-top: 1px; font-size: 12px; font-weight: 700; color: var(--leaf-d); }
.skywrap:has(.bldg.tall) .ground { height: 52px; }
.skywrap:has(.bldg.tall) .bnote { padding: 3px 12px 5px; font-size: 12px; line-height: 1.4; }
.skywrap:has(.bldg.tall) .bnote small { margin-top: 0; }
.bldg.tall .blobby .lobbyart { width: 60%; }
.skywrap:has(.bldg.tall) .bnote { padding: 2px 12px 4px; font-size: 0; line-height: 0; }      /* 「階を押すと…」は、「入る ›」で分かるので出さない。出典だけ残す */
.skywrap:has(.bldg.tall) .bnote small { display: block; font-size: 11px; line-height: 1.4; }
.skywrap:has(.bldg.tall) .glamp { bottom: 6px; }
.skywrap:has(.bldg.tall) .gtree { bottom: 14px; width: 46px; }
/* 名前が長い社員（役割の名前：アカウント担当など）は、名札の字を少し小さくして、切れないようにする */
.world .plate b.n5 { font-size: 13px; }
.world .plate b.n7 { font-size: 11px; }
.world.paused .wnight { opacity: .4; }      /* 一時停止中の事業の階は、お部屋の明かりも落とす */
