
body { margin: 0; font: 16px/1.4 system-ui, sans-serif; background: #f6f6f4; color: #1b1b1b; }
h1 { text-align: center; }
.choices { display: flex; justify-content: center; gap: 24px; margin-top: 15vh; }
.choice { width: 240px; height: 120px; font-size: 20px; border: 2px solid #333; border-radius: 12px; background: #fff; color: #1b1b1b; cursor: pointer; }
#room { position: fixed; inset: 0; overflow: hidden; background: #dfe7ee linear-gradient(160deg, #e8eef4 0%, #d9e3ea 55%, #cfd9df 100%); }
#room[hidden] { display: none; }
.room-top { position: absolute; top: 0; left: 0; right: 0; height: 48px; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #ffffffcc; border-bottom: 1px solid #0002; }
.room-site { font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
#room-name { flex: 1 1 auto; margin: 0; font-size: 18px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-top button { flex: 0 0 auto; }
.room-status { position: absolute; top: 48px; left: 0; right: 0; margin: 0; text-align: center; color: #a33; pointer-events: none; }
#desk { position: absolute; top: 48px; left: 0; right: 0; bottom: 40px; pointer-events: none; }
#dock { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; box-sizing: border-box; display: flex; gap: 8px; padding: 4px; overflow: hidden; }
@media (max-width: 600px) {
  .room-site { display: none; }
  .panel-bar { flex-wrap: wrap; }
  .panel-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.panel { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; background: #fff; border: 1px solid #555; border-radius: 8px; pointer-events: auto; overflow: hidden; }
.panel[hidden], #dock [hidden] { display: none; }
.panel.full { border-radius: 0; }
.panel-bar { display: flex; flex-wrap: wrap; flex: none; gap: 6px; align-items: center; padding: 4px 8px; background: #e4e4e0; cursor: move; user-select: none; touch-action: none; }
.panel-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.panel-edge { position: absolute; z-index: 2; touch-action: none; }
.panel-edge-n, .panel-edge-s { left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.panel-edge-e, .panel-edge-w { top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.panel-edge-n { top: 0; } .panel-edge-s { bottom: 0; } .panel-edge-e { right: 0; } .panel-edge-w { left: 0; }
.panel-edge-ne, .panel-edge-nw, .panel-edge-se, .panel-edge-sw { width: 12px; height: 12px; }
.panel-edge-nw { left: 0; top: 0; cursor: nwse-resize; } .panel-edge-se { right: 0; bottom: 0; cursor: nwse-resize; }
.panel-edge-ne { right: 0; top: 0; cursor: nesw-resize; } .panel-edge-sw { left: 0; bottom: 0; cursor: nesw-resize; }
.panel.full .panel-edge { display: none; }
.room { display: flex; flex-direction: column; flex: 1 0 auto; }
.room > * { flex: none; }
.room > .msgs { flex: 1 1 0; min-height: 8em; overflow-y: scroll; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #888 #e4e4e0; margin: 0; padding: 8px 12px; list-style: none; }
.msgs::-webkit-scrollbar { width: 12px; }
.msgs::-webkit-scrollbar-thumb { background: #888; border-radius: 6px; }
.msgs::-webkit-scrollbar-track { background: #e4e4e0; }
.msgs .who { font-weight: 600; margin-right: 6px; }
.msgs .at { color: #666; font-size: 12px; margin-right: 6px; }
.msgs .text { white-space: pre-wrap; }
.panel.shrunk .panel-body, .panel.shrunk .panel-edge { display: none; }
.msgs button.who { border: 0; background: none; color: inherit; font: inherit; font-weight: 600; padding: 0; cursor: pointer; }
#agree form, #gate form { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
#status { min-height: 1.4em; text-align: center; color: #a33; }
.keep-notice { margin: 0; padding: 4px 12px; font-size: 12px; color: #555; }
.post { display: flex; gap: 6px; padding: 6px; }
.post textarea { flex: 1; height: 48px; }
.post .post-ai { align-self: stretch; padding: 0 10px; border-color: #6a8; }
.post .post-ai[hidden], .post-ai-note[hidden] { display: none; }
.post-ai-note { margin: 0 6px 4px; font-size: 0.85em; }
.msgs .chat-ai { border-left: 3px solid #6a8; padding-left: 6px; }
.chat-ai-q { margin: 4px 0 0; font-style: italic; }
.chat-ai-a { margin: 0 0 6px; white-space: pre-wrap; }
@media (prefers-color-scheme: dark) {
  body { background: #161616; color: #eee; }
  .choice { background: #222; color: #eee; border-color: #aaa; }
  .panel { background: #1e1e1e; }
  .panel-bar { background: #2b2b2b; }
  #room { background: #1d2329 linear-gradient(160deg, #222a31 0%, #1b2026 60%, #15191d 100%); }
  .room-top { background: #161a1ecc; border-bottom-color: #fff2; }
  .room-site { color: #aaa; }
}
.ai { border-top: 1px solid #8884; padding: 6px; }
.ai[hidden] { display: none; }
.ai-title { font-size: 1em; margin: 0 0 4px; }
.ai-lines { list-style: none; margin: 0; padding: 0; max-height: 160px; overflow: auto; }
.ai-q { margin: 4px 0 0; font-style: italic; }
.ai-a { margin: 0 0 6px; padding-left: 8px; border-left: 3px solid #6a8; white-space: pre-wrap; }
.ai-ask { display: flex; gap: 6px; }
.ai-ask textarea { flex: 1; height: 40px; }
.post .mic, .post .mic-cancel { align-self: stretch; padding: 0 10px; }
.post .mic.on { background: #a33; color: #fff; border-color: #a33; }
.voice-line { margin: 0; padding: 0 12px 4px; font-size: 12px; color: #555; min-height: 1.2em; }
.voice-consent { margin: 0 6px 6px; padding: 8px; border: 1px solid #888; border-radius: 6px; font-size: 13px; }
.voice-consent button { margin-right: 8px; }
.voice-consent-text { margin: 0 0 6px; }
.msgs .wish { font-size: 0.8em; margin-left: 0.5em; }
#wish-confirm { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); max-width: 90vw; width: 28em; background: #fff; color: #111; border: 2px solid #333; padding: 1em; z-index: 1000; }
#wish-confirm[hidden] { display: none; }
#wish-line { white-space: pre-wrap; max-height: 10em; overflow: auto; }
.room-tools { display: flex; justify-content: flex-end; padding: 4px 6px 0; }
.mines { --cell: 30px; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.mines-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mines-flagmode.on { background: #1b4d8f; color: #fff; border-color: #1b4d8f; }
.mines-status { margin: 0; min-height: 2.8em; font-size: 14px; }
.mines-grid { display: grid; gap: 2px; overflow: auto; max-width: 100%; align-self: flex-start; touch-action: manipulation; }
.mines-grid .cell { width: var(--cell); height: var(--cell); padding: 0; font: 700 15px/1 system-ui, sans-serif; border: 1px solid #777;
  border-radius: 3px; background: #c9ccd2; color: #1b1b1b; cursor: pointer; user-select: none; }
.mines-grid .cell.open { background: #f4f4f2; border-color: #bbb; cursor: default; }
.mines-grid .cell.flag { color: #b00020; }
.mines-grid .cell.hit { background: #d33; color: #fff; }
.mines-grid .cell.mine, .mines-grid .cell.wrong { background: #eee; color: #1b1b1b; }
.mines-grid .cell:disabled { cursor: default; }
.mines-grid .n1 { color: #1a4fd0; } .mines-grid .n2 { color: #1d7a1d; } .mines-grid .n3 { color: #c0181a; } .mines-grid .n4 { color: #0d1f7a; }
.mines-grid .n5 { color: #7a1010; } .mines-grid .n6 { color: #0d7373; } .mines-grid .n7 { color: #1b1b1b; } .mines-grid .n8 { color: #555; }
@media (max-width: 500px) { .mines { --cell: 28px; } }
@media (prefers-color-scheme: dark) {
  .mines-grid .cell { background: #4a4d55; color: #eee; border-color: #888; }
  .mines-grid .cell.open { background: #262626; border-color: #444; }
  .mines-grid .cell.flag { color: #ff7a8a; }
  .mines-grid .cell.mine, .mines-grid .cell.wrong { background: #333; color: #eee; }
  .mines-grid .n1 { color: #8fb3ff; } .mines-grid .n2 { color: #7fd67f; } .mines-grid .n3 { color: #ff8a8a; } .mines-grid .n4 { color: #b5a8ff; }
  .mines-grid .n5 { color: #ffb37a; } .mines-grid .n6 { color: #6fe0e0; } .mines-grid .n7 { color: #eee; } .mines-grid .n8 { color: #bbb; }
}
@media (prefers-color-scheme: dark) {
  .keep-notice, .voice-line { color: #aaa; }
  .msgs .at { color: #aaa; }
  #status, .room-status { color: #ff8a8a; }
}
#room { --room-default: #dfe7ee; background-color: var(--room-color, var(--room-default));
        background-image: linear-gradient(160deg, #ffffff40 0%, #ffffff00 55%, #00000026 100%); }
#desk { bottom: 92px; z-index: 2; }
#dock { bottom: 52px; z-index: 3; }
.room-top { z-index: 4; }
.room-status { top: 52px; z-index: 5; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 2px 10px; border-radius: 10px; background: #fffffff0; }
.room-status:empty { padding: 0; background: none; }
.room-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; box-sizing: border-box; z-index: 4; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 6px 10px; background: #ffffffcc; border-top: 1px solid #0002; }
.room-bar button { min-width: 84px; height: 40px; font-size: 16px; border: 1px solid #555; border-radius: 8px; background: #fff; color: #1b1b1b; cursor: pointer; }
.room-deco { position: absolute; top: 48px; left: 0; right: 0; bottom: 52px; z-index: 1; pointer-events: none; overflow: hidden; }
.deco { position: absolute; display: block; pointer-events: none; }
.deco-window { top: 7%; right: 7%; width: 24vmin; height: 17vmin; border: 6px solid #ffffffa0; border-radius: 4px; box-sizing: border-box;
               background: linear-gradient(#ffffffa0, #ffffffa0) center / 4px 100% no-repeat, linear-gradient(#ffffffa0, #ffffffa0) center / 100% 4px no-repeat, linear-gradient(180deg, #ffffff55, #ffffff18); }
.deco-frame { top: 10%; left: 6%; width: 15vmin; height: 11vmin; border: 5px solid #00000030; border-radius: 3px; background: linear-gradient(135deg, #ffffff40, #00000012); }
.deco-lamp { top: -8%; left: 38%; width: 34vmin; height: 34vmin; border-radius: 50%; background: radial-gradient(circle, #ffffff66 0%, #ffffff00 70%); }
.deco-plant { bottom: 4%; right: 5%; width: 9vmin; height: 15vmin; border-radius: 50% 50% 12% 12%; background: linear-gradient(180deg, #2f7d4a99 0 62%, #00000040 62% 100%); }
.deco-floor { left: 0; right: 0; bottom: 0; height: 20%; background: linear-gradient(180deg, #00000000, #00000024); }
.msgs { flex: 1 1 auto; min-height: 0; overflow-y: scroll; overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #888 transparent; }
.msgs li { overflow-wrap: anywhere; }
.video-box, .games-box { flex: 1 0 auto; padding: 8px; }
.video-note, .games-note { margin: 0 0 8px; font-size: 13px; }
.video-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.video-slot { aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border-radius: 6px; background: #2a2f35; color: #fff; padding: 4px; min-width: 0; }
.video-who { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-off { font-size: 12px; color: #ddd; }
.games-title { margin: 0 0 6px; font-size: 1em; }
.games-mount { min-height: 120px; border: 1px dashed #8888; border-radius: 6px; }
.panel.shrunk .video-box, .panel.shrunk .games-box { display: none; }
.swatch { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: middle; border-radius: 3px; border: 1px solid #0006; background: #dfe7ee; }
.make-color input { vertical-align: middle; }
@media (prefers-color-scheme: dark) {
  #room { --room-default: #1d2329; }
  .room-bar { background: #161a1ecc; border-top-color: #fff2; }
  .room-bar button { background: #222; color: #eee; border-color: #aaa; }
  .room-status { background: #161a1ef0; }
  .room-status:empty { background: none; }
}
.room-bar-gap { width: 14px; flex: 0 0 auto; border-left: 1px solid #0003; height: 28px; }
.room-bar { gap: 8px; }
.room-bar button { min-width: 0; padding: 0 12px; }
.wishbox-box { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.wishbox-frame { flex: 1 1 auto; min-height: 0; width: 100%; border: 0; background: #fff; }
.wishbox-off { margin: 12px; }
.wishbox-plugin-slot:empty { display: none; }
.panel.shrunk .wishbox-box { display: none; }
.ms-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.ms-status { flex: 1 1 auto; font-weight: 600; min-width: 8em; }
.ms-grid { display: grid; gap: 2px; max-width: 360px; margin: 0 auto; user-select: none; }
.ms-cell { aspect-ratio: 1; min-width: 0; padding: 0; font: 700 15px/1 system-ui, sans-serif; border: 1px solid #666; border-radius: 3px; background: #b9c4ce; color: #1b1b1b; cursor: pointer; }
.ms-cell.open { background: #f4f4f2; border-color: #ccc; cursor: default; }
.ms-cell.flag { background: #ffd966; }
.ms-cell.mine { background: #e9a0a0; }
.ms-cell.boom { background: #d33; color: #fff; }
.ms-cell.n1 { color: #1f4fd1; } .ms-cell.n2 { color: #1d7a2e; } .ms-cell.n3 { color: #c22; } .ms-cell.n4 { color: #13306e; }
.ms-cell.n5 { color: #7a1a1a; } .ms-cell.n6 { color: #0d6b6b; } .ms-cell.n7 { color: #111; } .ms-cell.n8 { color: #555; }
.ms-help { font-size: 12px; margin: 6px 0 0; }
@media (prefers-color-scheme: dark) {
  .room-bar-gap { border-left-color: #fff4; }
  .ms-cell { background: #4b5560; color: #eee; border-color: #888; }
  .ms-cell.open { background: #2a2a2a; color: #eee; border-color: #444; }
  .ms-cell.n1 { color: #8fb0ff; } .ms-cell.n2 { color: #7fd48f; } .ms-cell.n3 { color: #ff8a8a; } .ms-cell.n4 { color: #b5c8ff; }
  .ms-cell.n5 { color: #ffb0b0; } .ms-cell.n6 { color: #7fe0e0; } .ms-cell.n7 { color: #eee; } .ms-cell.n8 { color: #bbb; }
  .ms-cell.flag { background: #8a6d00; color: #fff; }
}
@media (prefers-color-scheme: dark) {
  .room > .msgs { scrollbar-color: #999 #2b2b2b; }
  .msgs::-webkit-scrollbar-track { background: #2b2b2b; }
}
.perm-line { margin: 0; padding: 2px 12px 6px; font-size: 12px; font-weight: 600; color: #444; }
.perm-notice { margin: 0 6px 6px; padding: 8px 10px; border: 2px solid #a60; border-radius: 6px; background: #fff7e6; color: #222; }
.perm-notice[hidden] { display: none; }
.perm-notice .perm-text { margin: 0 0 8px; }
.perm-notice button { margin-right: 8px; }
.msgs .seq { color: #777; font-size: 11px; margin-right: 6px; }
.msgs .add-context { font-size: 0.8em; margin-left: 0.5em; }
@media (prefers-color-scheme: dark) { .perm-line { color: #ccc; } .perm-notice { background: #3a2a10; color: #eee; border-color: #c80; } .msgs .seq { color: #aaa; } }
.site-version { text-align: center; font-size: 13px; color: #555; margin: 24px 0 12px; }
.room-version { flex: 0 0 auto; margin-left: auto; font-size: 13px; color: #333; text-decoration: none; padding: 2px 8px; border: 1px solid #0003; border-radius: 10px; }
.versions-recent { max-width: 40em; margin: 32px auto 0; padding: 0 16px; font-size: 14px; }
.versions-recent h2 { font-size: 1em; margin: 0 0 6px; }
.versions-list, .versions-all { padding-left: 1.4em; }
.versions-list li { margin: 4px 0; }
.versions-page { max-width: 44em; margin: 0 auto; padding: 16px; line-height: 1.45; }
.versions-all h2 { font-size: 1.05em; margin: 18px 0 4px; }
.versions-build { font-size: 13px; color: #555; margin-top: 2px; }
.games-shared { margin: 0 0 8px; }
@media (prefers-color-scheme: dark) {
  .site-version, .versions-build { color: #aaa; }
  .room-version { color: #ddd; border-color: #fff4; }
  .site-version a, .versions-page a { color: #8fb3ff; }
}
a.choice { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }
.product-versions-page { max-width: 46em; margin: 0 auto; padding: 1em 16px; }
.product-versions-page .release-list, .product-versions-page .product-list { padding-left: 1.4em; }
.product-versions-page .release { margin: 0.6em 0; overflow-wrap: anywhere; }
.product-versions-page .release-version { font-weight: 600; }
.product-versions-page .release-newest .release-tag { font-weight: 600; }
.product-versions-page .release-notes { margin: 0.2em 0; }
.product-versions-page a { display: inline-block; min-height: 44px; line-height: 44px; }
.product-versions-page .versions-back, .product-versions-page .versions-front { margin-right: 1em; }
@media (prefers-color-scheme: dark) { .product-versions-page a { color: #8fb3ff; } }
.work-box { display: flex; flex-direction: column; gap: 8px; padding: 8px; box-sizing: border-box; max-width: 100%; overflow-x: hidden; }
.work-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.work-tab { padding: 4px 10px; border: 1px solid #555; border-radius: 6px; background: #fff; color: #1b1b1b; cursor: pointer; }
.work-tab.on { background: #1b1b1b; color: #fff; }
.work-note:empty { display: none; }
.work-list, .work-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.work-item, .work-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.work-open, .work-doc-open { text-align: left; flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.work-meta, .work-count { font-size: 13px; color: #555; }
.work-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.work-title { margin: 0; font-size: 16px; flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.work-doc-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; margin: 0; font: inherit; }
.work-tag { font-size: 0.95em; padding: 0 6px; margin: 0 2px; border: 1px solid #2a5bd7; border-radius: 10px; background: #eef3ff; color: #1b3f99; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.work-missing { font-weight: bold; }
@media (prefers-color-scheme: dark) {
  .work-tab { background: #222; color: #eee; border-color: #aaa; }
  .work-tab.on { background: #eee; color: #111; }
  .work-meta, .work-count { color: #bbb; }
  .work-tag { background: #1d2a4a; color: #cfe0ff; border-color: #8fb3ff; }
}
