/* Mobile game skin. Interaction references: 21st Origin UI rounded buttons, selection cards,
   shadcn Drawer. Theme and scene composition are specific to this game. */
body.accounts:not(.room2){--ui-ink:#34463c;--ui-muted:#6e766b;--ui-green:#49795d;--ui-green-2:#396349;--ui-cream:#fff8ec;--ui-border:#dfd8c6;--ui-shadow:0 3px 0 #daceb83b;--paper:#fffaf0;--ink:#34463c;--green:#49795d;background:#e9eddc;color:var(--ui-ink)}
body.accounts .sh{max-width:500px;background:#fff8ec;min-height:100dvh;box-shadow:0 0 70px #40544215}
body.accounts .sh-top{min-height:60px;padding:8px 18px;background:#fff8ec;border:0;gap:10px}
body.accounts .sh-main{padding:10px 20px 26px;gap:14px}
body.accounts .sh-title{font-size:19px}
body.accounts .sh-h1{font-size:25px}
body.accounts .sh-btn{min-height:50px;border-radius:18px;border:1.5px solid #3f6b52;box-shadow:0 3px 0 #31563f;color:#fffdf6;background:#598568;font-weight:600;font-size:16px}
body.accounts .sh-btn.sec{background:#fffdf5;border:1.5px solid #d9cdb8;color:#52654e;box-shadow:0 3px 0 #e8ddc9}
body.accounts .sh-btn.ghost{background:transparent;border:0;box-shadow:none;color:#52654e}
body.accounts .sh-btn.danger{background:#aa5047;border-color:#9b433b;box-shadow:0 3px 0 #82392f}
body.accounts .sh-btn:disabled{box-shadow:none;opacity:.55}
body.accounts .sh-btn:not(:disabled):active{transform:translateY(2px);box-shadow:none}
body.accounts .play-button{background:var(--c-action,#f2c567);border-color:var(--c-action,#d9ad54);box-shadow:0 4px 0 var(--c-action-shadow,#c89c48);color:var(--c-on-action,#4b3b22);font-size:18px;min-height:54px}
body.accounts .play-button:not(:disabled):hover{background:var(--c-action-hover,#f5ce7c)}
body.accounts .play-button.sec{font-size:15px;min-height:44px;background:var(--c-raised,#fffaf0);box-shadow:inset 0 0 0 1px var(--c-edge,transparent);border:0;color:var(--c-text,#53654c)}
body.accounts .sh-card{border-radius:22px;background:#fffdf6;border-color:#e4dccc;box-shadow:none}
body.accounts .sh-rm{border:1.5px solid #e1d8c6;box-shadow:0 3px 0 #e7ddc44d;border-radius:20px;background:#fffdf7}
body.accounts .sh-fld input,body.accounts .sh-fld select,body.accounts .sh-fld textarea{border-radius:16px;border-color:#d5d4bf;background:#fffdf8;min-height:50px;box-shadow:inset 0 2px 0 #dbd0b92e;font-size:16px}
body.accounts .sh-fld input:focus,body.accounts .sh-fld select:focus,body.accounts .sh-fld textarea:focus{border-color:#82a88b;box-shadow:0 0 0 3px #cce0c8;padding:10px 13px}
body.accounts .sh-tabs{border:0;background:#eeeede;border-radius:17px;padding:4px}
body.accounts .sh-tabs button{border-radius:13px}
body.accounts .sh-tabs button[aria-selected=true]{background:#fffdf4;border-color:#dedcc9;box-shadow:0 2px 0 #cecbb654}
body.accounts .sh-nav{background:#fff8ecf5;border-top:1px solid #e8dfcb;box-shadow:none;padding:5px 12px max(6px,env(safe-area-inset-bottom))}
body.accounts .sh-nav .in{max-width:400px;gap:6px}
body.accounts .sh-nav a{min-height:49px;font-size:12px;gap:1px;border-radius:17px}
body.accounts .sh-nav a[aria-current=page]{background:#e5eddc}
body.accounts .sh-nav a svg{width:22px;height:22px}
body.accounts .sh-sheet-wrap{background:#263c3275;backdrop-filter:blur(3px)}
body.accounts .sh-sheet{border-radius:28px 28px 0 0;background:#fff9ed;border:2px solid #e8deca;border-bottom:0;padding:12px 22px max(24px,env(safe-area-inset-bottom));max-width:500px;gap:14px;position:relative}
body.accounts .sh-sheet .x{background:#e9eddd;color:#506648;border-radius:50%;right:10px;top:10px;width:44px;height:44px}
body.accounts .sh-sheet .sh-h1{font-size:22px;padding-inline:20px}
body.accounts .sh-sheet .grab{background:#d3d4be}
.cozy-brand{font:600 17px var(--head);color:#465e43;text-decoration:none;display:flex;align-items:center;gap:8px;min-height:44px}
.cozy-login{font-size:13px;color:#56664e;text-decoration:none;min-height:44px;display:flex;align-items:center;padding:0 5px}
.cozy-help{display:grid;place-items:center;width:44px;height:44px;background:#efefdf;border:1px solid #dedcc8;border-radius:50%;color:#5d7057;text-decoration:none;font:600 19px var(--head)}
.cozy-person{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
.welcome-title{text-align:center;position:relative;z-index:1}
.welcome-title p{font-size:12px;color:#837554;margin:0 0 3px;letter-spacing:.03em}
.welcome-title h1{font:600 clamp(24px,6.7vw,30px)/1.25 var(--head);color:#425b40;margin:0 0 4px}
.welcome-title>span{font-size:13px;color:#7a806a}
.welcome-scene{position:relative;border-radius:28px;overflow:hidden;background:#e6edd6;border:2px solid #e1dbc3;box-shadow:0 5px 0 #d9d5b94d;height:clamp(190px,31dvh,285px);flex:none}
.welcome-scene>img{width:100%;height:100%;display:block;object-fit:cover;object-position:50% 65%}
.welcome-scene.small{height:155px;border-radius:24px}
.welcome-actions{display:flex;flex-direction:column;gap:10px}
.welcome-actions #resume:empty{display:none}
.welcome-actions #resume .sh-btn{width:100%}
.welcome-actions:has(>#resume:only-child:empty){display:none}
.welcome-identity{font-size:12px;text-align:center;color:#75765f;margin:0}
.welcome-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:12px}
body.accounts .welcome-shortcuts .sh-btn{font-size:14px;min-height:46px}
.cozy-section-heading{display:flex;gap:8px;align-items:center;justify-content:space-between}
.cozy-section-heading h2{font:500 14px var(--head);margin:0;color:#56634b}
.cozy-section-heading a{display:flex;align-items:center;min-height:44px;color:#738057;font-size:12px;text-decoration:none}
.home-villages{margin-top:0}
#home-villages{display:flex;flex-direction:column;gap:10px}
.cozy-empty{padding:10px 4px;text-align:center;font-size:14px;color:#647355;margin:0}
.cozy-empty span{display:block;color:#7b7c6b;font-size:12px;margin-top:4px;line-height:1.7}
.cozy-empty img{object-fit:contain}
.cozy-notice{margin:0;background:#f6e8c6;border-radius:14px;padding:10px;font-size:13px}
body.accounts .village-choice{padding:8px 10px;gap:9px;min-height:76px}
.village-choice>img{width:56px;height:56px;object-fit:contain;flex:none}
body.accounts .village-choice .grow b{font-size:15px;white-space:normal}
body.accounts .village-choice .sh-chip{font-size:10px;padding:4px 6px}
body.accounts .village-choice .room-status-chips{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
body.accounts .village-choice .grow small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.choice-arrow{color:#77855a;font-size:24px}
.rooms-greeting{margin:0;font-size:13px;text-align:center;color:#6b775e}
.room-code-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.room-code-form .sh-btn{padding-inline:14px}
.cozy-room-list{display:flex;flex-direction:column;gap:12px}
.story-ribbon{height:92px;overflow:hidden;border-radius:23px;flex:none;position:relative;background:#e5edd8}
.story-ribbon img{width:100%;height:100%;object-fit:cover;object-position:50% 40%;display:block}
.story-ribbon::after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#fff9ed50,transparent)}
.invite-scene{border-radius:28px;overflow:hidden;background:#e4e9d7}
.invite-scene img{width:100%;height:235px;object-fit:cover;display:block}
.invite-intro{text-align:center;padding:8px 0}
.profile-scene{display:flex;justify-content:center;align-items:flex-end;min-height:160px;background:linear-gradient(0deg,#e5edd9e8,#ffffff00),url('/assets/village/welcome-v2.webp') center 50%/cover;border-radius:26px;padding:25px 10px 14px;position:relative}
.profile-scene .sh-av{box-shadow:0 4px 0 #b4bd9866;border:5px solid #fff9e9}
.profile-scene>img{object-fit:contain}
body.accounts #guest-preview{padding:12px 0;background:radial-gradient(ellipse at 50% 65%,#e0eacb,transparent 65%);border-radius:24px}
body.accounts #guest-preview .sh-av{box-shadow:0 6px 0 #d3d9bd;border:5px solid #fffdf0}
body.accounts #guest-preview .sh-guest{display:none}
.guest-characters summary{font-size:14px;min-height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--c-text,#536f4e);border:1px solid var(--c-line,#dce1ca);border-radius:15px;background:var(--c-raised,#eef0df)}
.guest-characters[open] summary{margin-bottom:12px}
body.accounts .sh-avs{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:5px}
body.accounts .sh-avs button{min-height:44px;min-width:44px;aspect-ratio:1}
body.accounts .sh-avs button .sh-av{border-color:#d9d6bd}
body.accounts .sh-avs button[aria-pressed=true] .sh-av{outline:3px solid #719660;outline-offset:2px;border-color:#fff9e6}
body.accounts .sh[data-page="/me"] .sh-center .sh-h1{margin:0}
body.accounts .sh[data-page="/me"] .sh-center p{margin:3px 0}
body.accounts .sh-li{min-height:56px;border-color:#e5dece}
body.accounts .sh-ranking-podium .sh-podium-member:first-child{background:#fff0ca}
body.accounts .sh-rank-self{bottom:calc(67px + env(safe-area-inset-bottom))}
body.accounts .sh[data-page="/ranking"] .sh-main{padding-bottom:105px}
/* Preserve the approved mobile-room-full-flow village, paintings, chat and sheets.
   Only fix contrast, pacing access and space on short phone screens. */
body.accounts.room2 .phase-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;padding:8px 10px}
body.accounts.room2 .phase-bar strong,body.accounts.room2 .phase-bar small,body.accounts.room2 .clock{color:#fffdf6}
body.accounts.room2 .phase-bar small{opacity:.9}
body.accounts.room2 .phase-host-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:6px}
body.accounts.room2 .phase-host-actions .phase-action{min-width:0;width:100%;padding:0 5px;font-size:12px;min-height:44px}
body.accounts.room2 .village-panel{border:2px solid #779f79;border-radius:16px;overflow:hidden}
body.accounts.room2 .play-layout{gap:8px}
body.accounts.room2 .chat-panel{border-radius:16px;min-height:0}
body.accounts.room2 .map.circle{background-size:230px}
body.accounts.room2 .map.circle.night{background-color:#40543d;background-blend-mode:multiply}
body.accounts.room2 .map.circle.night .ring-road,body.accounts.room2 .map.circle.night .tree{filter:brightness(.65) saturate(.65)}
body.accounts.room2 .map.circle.night .well{filter:brightness(.8) drop-shadow(0 0 12px #ffe8a14d)}
body.accounts.room2 .map.circle .house{min-width:44px;min-height:44px}
body.accounts.room2 #naming:not(:empty),body.accounts.room2 #verdict-bar:not([hidden]){padding:6px 8px}
body.accounts.room2 #verdict-bar{gap:4px 8px}
body.accounts.room2 #verdict-bar strong{font-size:13px;line-height:1.4}
body.accounts.room2 #verdict-bar small{font-size:11px;line-height:1.4}
body.accounts.room2 #verdict-bar .verdict-buttons{gap:6px}
body.accounts.room2 #verdict-bar button{min-height:44px;font-size:13px;padding:6px}
body.accounts.room2 .chat-title{display:flex}
body.accounts.room2 .chat-form input{font-size:16px}
body.accounts.room2 dialog .close{width:44px;min-height:44px}
body.accounts.room2 .announce-close{width:44px;height:44px}
body.accounts.room2 .announce{top:118px}
body.accounts.room2 .guide-all{display:grid;gap:10px;margin-top:12px}
body.accounts.room2 .role-tabs button{font-size:13px;min-height:48px}
body.accounts.room2 .role-tabs button[aria-selected=true]{background:#315c48;color:#fff;border-color:#315c48}
body.accounts.room2 .guide-all .role-card{min-height:94px}
body.accounts.room2 .guide-all .role-card small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.accounts.room2 .guide-availability{font-style:normal;font-size:11px;background:#edf1e8;color:#315840;border-radius:5px;padding:2px 6px;display:inline-block;margin-top:4px}
body.accounts.room2 .guide-availability.unavailable{background:#f1ebe1;color:#776a55}
@media(max-width:700px) and (max-height:720px){body.accounts.room2 .play-layout{grid-template-rows:minmax(0,1fr) 135px}body.accounts.room2 .chat-title{min-height:28px;padding:4px 10px}body.accounts.room2 .room-top{min-height:52px;padding:5px 12px}body.accounts.room2 .phase-bar{margin:4px 10px 6px}body.accounts.room2 .chat-form{padding:6px}}
@media(max-width:700px) and (max-height:640px){body.accounts.room2.in-room:not(.keyboard-open)[data-game-phase="confirm"] .play-layout{grid-template-rows:minmax(0,1fr) 120px}}
@media(prefers-reduced-motion:reduce){body.accounts *,body.accounts *::before,body.accounts *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Approved illustrated room: square village, conversation bubbles and quiet menu rows.
   Short viewports scroll the room instead of squeezing houses and conversation. */
body.accounts.room2{--green:#315c48;--ink:#263e31;--paper:#fffdf7;--muted:#6b796d;--head:'Noto Sans Thai',Tahoma,sans-serif;background:#faf8ee}
body.accounts.room2.in-room #app{overflow-y:auto;overflow-x:hidden;display:flex;max-width:480px;padding:0 0 max(8px,env(safe-area-inset-bottom));scrollbar-gutter:auto;scrollbar-width:none}
body.accounts.room2.in-room #app::-webkit-scrollbar{display:none}
body.accounts.room2 .room-top{position:sticky;top:0;z-index:12;padding:9px 11px;min-height:60px;background:#fffcf3;border:0}
body.accounts.room2 .room-top h1{font-size:18px;line-height:1.35;font-weight:700}
body.accounts.room2 .room-top small{font-size:12px;margin-top:2px}
body.accounts.room2 .room-actions button{font-size:14px;padding:0 10px;height:44px;background:#edf1e8;border-color:#d7e0d2;box-shadow:none}
body.accounts.room2 .phase-bar{position:sticky;top:60px;z-index:12;background:#315c48;margin:0 10px 8px;padding:7px 10px 7px 12px;border-radius:13px;gap:6px 8px;box-shadow:none;min-height:52px}
body.accounts.room2 .phase-bar strong{font-size:15px;font-weight:700;line-height:1.4}
body.accounts.room2 .phase-bar small{font-size:12px;line-height:1.4;margin-top:2px}
body.accounts.room2:not([data-game-phase="lobby"]) .phase-bar small{display:none}
body.accounts.room2 .clock{font-size:24px}
body.accounts.room2 .phase-action{font-size:14px;font-weight:700;background:#f5f8ef;border:1px solid #b7d0be;box-shadow:none;min-height:44px}
body.accounts.room2 .phase-action.start{background:#f1c775;border-color:#f1c775}
body.accounts.room2 .lobby-ready{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
body.accounts.room2 .lobby-ready.hidden{display:none}
body.accounts.room2 .lobby-ready button{min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid #b7d0be;background:#f5f8ef;color:#315c48;font-size:14px;font-weight:700;box-shadow:none}
body.accounts.room2 .lobby-ready button.is-ready{background:#d9ead9}
body.accounts.room2 .lobby-ready #ready-toggle{grid-column:span 3}
body.accounts.room2 .lobby-ready :is(#lobby-roles,#lobby-bots){grid-column:span 2;font-size:12px;padding:7px 8px}
body.accounts.room2 .lobby-ready #lobby-roles:has(+.hidden){grid-column:1/-1}
body.accounts.room2 .ready-roster{display:grid;gap:0}
body.accounts.room2 .ready-roster>div{display:flex;align-items:center;gap:10px;min-height:56px;border-bottom:1px solid #e5e8dc}
body.accounts.room2 .ready-roster img{width:34px;height:34px;border-radius:50%;object-fit:cover}
body.accounts.room2 .ready-roster b{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
body.accounts.room2 .ready-roster span{font-size:12px;white-space:nowrap;color:#315c48}
body.accounts.room2 .ready-roster>div.waiting span{font-weight:700}
/* the first-time tip: floats over the room without moving anything, dark like the toast so it reads in the day and the night */
.tip-card{position:fixed;left:50%;transform:translateX(-50%);bottom:86px;width:min(92vw,440px);z-index:25;display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:16px;background:#273e32;color:#fff;box-shadow:0 6px 20px #0004;border:1px solid #ffffff2e}
.tip-card[hidden]{display:none}
.tip-card .tip-icon{font-size:22px;line-height:1.2}
.tip-card b{display:block;font-size:14px}
.tip-card p{margin:3px 0 8px;font-size:13px;line-height:1.5}
.tip-actions{display:flex;flex-wrap:wrap;gap:8px}
.tip-card button{min-height:36px;padding:6px 12px;border-radius:10px;font-size:13px;background:#ffffff1f;color:#fff}
.tip-card button.tip-ok{background:#f1c66b;color:#182235}
body.accounts.room2 .phase-host-actions{gap:6px}
body.accounts.room2 .phase-host-actions .phase-action{font-size:13px}
body.accounts.room2.in-room .play-layout,
body.accounts.room2.in-room:not(.keyboard-open)[data-game-phase="confirm"] .play-layout{flex:none;display:flex;flex-direction:column;gap:8px;min-height:0;grid-template-rows:none;margin:0 10px}
body.accounts.room2.in-room .village-stack{flex:none;display:block}
body.accounts.room2.in-room .village-panel{flex:none;border:2px solid #719271;border-radius:16px;box-shadow:0 4px 10px #26472c1e}
body.accounts.room2.in-room .map.circle{flex:none;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:1!important;margin:0;--n:clamp(11px,calc(var(--s,360px)*.036),15px)}
body.accounts.room2.in-room .map.circle .house .resident,
body.accounts.room2.in-room .map.circle.painted .house .resident{top:32%;right:0;left:auto;width:32%;border-width:2px}
body.accounts.room2.in-room .map.circle .house .house-name,
body.accounts.room2.in-room .map.circle.painted .house .house-name{font-size:var(--n);bottom:-2%;padding:2px 6px;max-width:138%;min-height:22px;line-height:1.4;background:#fff9ebf7;border-color:#dfc596;border-radius:6px;font-weight:700;box-shadow:0 1px 3px #1f392521}
body.accounts.room2.in-room .map.circle.dense .house .house-name{font-size:max(11px,calc(var(--n)*.92));padding:2px 4px;bottom:-2%}
body.accounts.room2.in-room .map.circle.tight .house .house-name{font-size:max(10px,calc(var(--n)*.82));padding:1px 3px}
body.accounts.room2.in-room .map.circle .house.me .house-name{background:#315c48;color:#fff;border-color:#315c48}
body.accounts.room2.in-room .map.circle .house.me .gt{color:#e5eadd}
body.accounts.room2 .map-tag{top:7px;left:8px;padding:4px 7px;font-size:12px;font-weight:700;background:#fffaf0ed;color:#315c48;box-shadow:0 1px 3px #1c3d272e}
body.accounts.room2 button.map-tag.role-tag{font-size:12px;padding:4px 7px}
body.accounts.room2 button.map-tag.role-tag{--tone:#2f6b4a;--glow:#2f6b4a66;display:flex;align-items:center;gap:6px;min-height:44px;max-width:min(144px,calc(100% - 16px));padding:4px 8px 4px 4px;border-radius:12px;border:2px solid var(--tone);background:#fffaf0;color:#23342b;box-shadow:0 3px 12px #0005;text-align:left;font-weight:400;line-height:1.2}
body.accounts.room2 button.map-tag.role-tag.tone-wolf{--tone:#b3261e;--glow:#b3261e66}
body.accounts.room2 button.map-tag.role-tag.tone-other{--tone:#9a6a12;--glow:#9a6a1266}
body.accounts.room2 .role-tag .role-thumb{width:32px;height:32px;border-radius:8px;object-fit:cover;object-position:50% 20%;flex:none;border:1px solid var(--tone);background:#2b2b2b}
body.accounts.room2 .role-tag .role-words{display:flex;flex-direction:column;min-width:0}
body.accounts.room2 .role-tag small,body.accounts.room2 .role-tag em{display:block;font-style:normal;font-size:10.5px;font-weight:400;color:#5d655b}
body.accounts.room2 .role-tag b{display:block;font-size:13px;font-weight:700;line-height:1.15;color:var(--tone);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.accounts.room2 .role-tag.long b{font-size:12px;line-height:1.2;white-space:normal}
body.accounts.room2 .role-tag.fresh{animation:role-pulse 2.2s ease-in-out infinite}
@keyframes role-pulse{0%,100%{box-shadow:0 3px 12px #0005,0 0 0 0 var(--glow)}50%{box-shadow:0 3px 12px #0005,0 0 0 8px #0000}}
@media (prefers-reduced-motion:reduce){body.accounts.room2 .role-tag.fresh{animation:none}}
@media (max-height:720px){body.accounts.room2 button.map-tag.role-tag{min-height:44px;gap:6px;padding:4px 8px 4px 4px}body.accounts.room2 .role-tag .role-thumb{width:32px;height:32px}body.accounts.room2 .role-tag b{font-size:13px}body.accounts.room2 .role-tag.long b{font-size:12px}body.accounts.room2 .role-tag em{display:none}}
body.accounts.room2.in-room .chat-panel{position:static;flex:none;min-height:0;height:var(--chat-h,320px);border:1px solid #dddfd4;border-radius:15px;background:#fffdf8;box-shadow:none;overflow:visible}
body.accounts.room2.in-room .chat-title{min-height:0;padding:3px 9px;background:#fffdf8;border-color:#ebe8df;border-radius:15px 15px 0 0}
body.accounts.room2 .chat-title h2{font-size:13px;font-weight:700}
body.accounts.room2 .chat-title small{font-size:10px;color:#768276;white-space:nowrap}
body.accounts.room2 .chat-title .chat-tabs{flex:1 1 auto;min-width:0;padding:0;gap:5px}
/* the two chat tabs are small chips: every pixel the chat does not use is one more line to read and a box to type in */
body.accounts.room2 .chat-title .chat-tab{min-height:24px;padding:1px 9px;font-size:11.5px;line-height:1.3}
body.accounts.room2 .chat-title .chat-tab.active[data-chat-tab="wolf"]{background:#7a2c35;border-color:#7a2c35}
body.accounts.room2 .chat-title .tab-dot{top:-2px;right:-2px;width:9px;height:9px}
body.accounts.room2 .chat-title.has-tabs h2{display:none}
@media(max-width:700px) and (max-height:720px){body.accounts.room2 .chat-title.has-tabs h2{display:block}}
/* the pack's chat: the bubbles are dark with light words (they used to be light bubbles with light words) */
body.accounts.room2 .chat-panel.wolf-chat .message-body{background:#4a3a40}
body.accounts.room2 .chat-panel.wolf-chat .message.me .message-body{background:#6a3f48}
body.accounts.room2 .chat-panel.wolf-chat .system-message{background:#3d3036;color:#e7d3cd}
body.accounts.room2 .chat-panel.wolf-chat .message time{color:#cdb8b2}
body.accounts.room2 .chat-messages{padding:10px;scrollbar-gutter:auto}
body.accounts.room2 .message{gap:7px;margin-bottom:9px}
body.accounts.room2 .message>img{width:28px;height:28px;flex:none}
body.accounts.room2 .message-body{flex:0 1 auto;max-width:calc(100% - 35px);padding:7px 9px;background:#f3f1e9;border-radius:4px 10px 10px 10px}
body.accounts.room2 .message strong{font-size:12px}
body.accounts.room2 .message p{font-size:14px;line-height:1.5;margin-top:3px}
body.accounts.room2 .message.me{justify-content:flex-end}
body.accounts.room2 .message.me>img{order:2}
body.accounts.room2 .message.me .message-body{background:#dcebdd;border-radius:10px 4px 10px 10px}
body.accounts.room2.chat-cut .chat-form{position:static}
body.accounts.room2 .chat-form{position:sticky;bottom:0;z-index:10;padding:5px;gap:7px;background:#fffcf3;border:0;border-radius:0 0 15px 15px}
body.accounts.room2 .chat-form input{min-height:44px;border:1px solid #ccd5ca;border-radius:11px;background:#fff}
body.accounts.room2 .chat-form button{min-height:44px;min-width:58px;font-size:14px;background:#315c48}
body.accounts.room2 .chat-form button.chat-mic{flex:none;width:46px;min-width:46px;height:46px;min-height:46px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:#eef2ea;color:#315c48;border:1px solid #ccd5ca;opacity:.65}
body.accounts.room2 .chat-form button.chat-mic[hidden]{display:none}
body.accounts.room2 .chat-form button.chat-switch{flex:none;width:46px;min-width:46px;padding:0} /* the wolves' button: the same width as the microphone, so the typing box keeps its room */
.chat-mic svg{width:22px;height:22px}
body.accounts.room2 .chat-form button.chat-mic[aria-busy=true]{position:relative}
body.accounts.room2 .chat-form button.chat-mic[aria-busy=true]::after{content:'';position:absolute;inset:4px;border:2px solid currentColor;border-right-color:transparent;border-bottom-color:transparent;border-radius:50%;animation:voice-wait .8s linear infinite;pointer-events:none}
@keyframes voice-wait{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){body.accounts.room2 .chat-form button.chat-mic[aria-busy=true]::after{animation:none}}
body.accounts.room2 .chat-form button.chat-mic[aria-disabled=false]{opacity:1}
body.accounts.room2 dialog{font-family:var(--head);background:#fffdf7;color:#273e31}
body.accounts.room2 dialog::backdrop{background:#19372b7c;backdrop-filter:none}
body.accounts.room2 dialog.room-sheet{width:min(calc(100% - 20px),460px);inset:auto 0 8px;border-radius:22px 22px 17px 17px;padding:0 18px 20px;max-height:calc(100dvh - 70px);border:0;box-shadow:0 -8px 35px #122a2452}
body.accounts.room2 dialog.room-sheet::before{display:none}
body.accounts.room2 dialog.room-sheet #dialog-content>h2:first-child{position:sticky;top:0;z-index:2;margin:0 -18px 14px;padding:15px 54px 14px 18px;background:#fffdf7;border-bottom:1px solid #e6e6d9;font-size:20px;line-height:1.4;font-weight:700}
body.accounts.room2 dialog .close{position:sticky;float:right;top:7px;z-index:4;margin:7px -10px -51px 0;background:transparent;border-radius:0;color:#67776c;font-size:28px;box-shadow:none}
body.accounts.room2 dialog.room-sheet .menu-list{display:grid;gap:0}
body.accounts.room2 dialog.room-sheet .menu-list button,
body.accounts.room2 dialog.room-sheet .host-menu button{display:flex;width:100%;align-items:center;gap:12px;min-height:70px;padding:10px 3px;border:0;border-bottom:1px solid #ecebdf;border-radius:0;background:transparent;text-align:left;color:#2b4335;box-shadow:none}
body.accounts.room2 dialog.room-sheet .menu-list button:hover,
body.accounts.room2 dialog.room-sheet .host-menu button:hover{background:#f4f6ee}
#dialog.no-dismiss .close{display:none}
.invite-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--c-line,#e3e1d3)}.invite-row img{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}.invite-row span{flex:1;min-width:0}.invite-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.invite-row small{display:block;font-size:12px;color:var(--c-muted,#6b6f66)}.invite-row button{min-height:44px;min-width:72px;flex:none}
.invite-link{width:100%;margin-top:12px;min-height:48px}
.room-actions .room-bell{position:relative;width:44px;min-width:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}.room-bell svg{width:22px;height:22px}.room-dot{position:absolute;top:8px;right:8px;width:10px;height:10px;border-radius:50%;background:#b3261e;border:2px solid var(--c-panel,#edf1e8);display:block}.room-dot[hidden]{display:none}
.note-row{flex-wrap:wrap}.note-row.unread{background:var(--c-soft,#f1f7ee)}.note-line{display:block;font-size:14px;line-height:1.5;white-space:normal}.note-row .note-actions{display:flex;flex:1 0 100%;gap:8px;padding-left:52px}.note-row .note-actions button{flex:1;min-height:44px;padding:0 12px;font-size:14px}
.hidden-note{margin:6px 0;text-align:center;font-size:12px;color:var(--c-muted,#6b6f66)}
.typing-note{margin:6px 8px;font-size:13px;color:var(--c-muted,#6b6f66);animation:typing-pulse 1.4s ease-in-out infinite}
@keyframes typing-pulse{50%{opacity:.45}}
@media (prefers-reduced-motion:reduce){.typing-note{animation:none}}
.social-note{display:flex;align-items:center;justify-content:center;min-height:44px;font-size:13px;color:var(--c-muted,#6b6f66)}
.entry-choice h2{margin:0 0 6px}
.entry-options{display:grid;gap:10px;margin-top:12px}
.entry-options button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:72px;padding:12px 16px;border-radius:16px;text-align:left}
.entry-options button strong{font-size:18px}
.entry-options button span{font-size:13px;font-weight:400;line-height:1.5;opacity:.92}
body.accounts.room2 .menu-symbol{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:10px;background:#edf2e9;font-size:21px;color:#315c48}
body.accounts.room2 .room-menu-row b{display:block;font-size:15px;font-weight:700}
body.accounts.room2 .room-menu-row small{display:block;font-size:12px;color:#778276;font-weight:400;line-height:1.5;margin-top:2px}
body.accounts.room2 dialog.room-sheet .menu-list button.danger,
body.accounts.room2 dialog.room-sheet .host-menu button.danger{color:#9a3e31;background:transparent}
body.accounts.room2 .room-menu-row.danger .menu-symbol{background:#f9ece8;color:#9a3e31}
body.accounts.room2 dialog.room-sheet .room-menu-row.danger small{color:#778276}
body.accounts.room2 .room-menu-extra{margin-top:10px;border:0}
body.accounts.room2 .room-menu-extra summary{font-size:12px;color:#6b796d;min-height:44px}
body.accounts.room2 .profile-top{padding-bottom:14px;border-bottom:1px solid #ecebdf}
body.accounts.room2 .profile-top .card-portrait{width:72px;height:72px;border-radius:17px}
body.accounts.room2 .profile-name{font-size:18px;font-weight:700}
body.accounts.room2 .profile-top p{font-size:12px;margin:3px 0}
body.accounts.room2 .profile-panel label{font-size:14px;font-weight:700}
body.accounts.room2 .profile-panel textarea{font-size:16px;font-weight:400}
body.accounts.room2 .profile-panel label>small{font-size:12px;font-weight:400;color:#6b796d}
body.accounts.room2 .profile-panel>.primary{min-height:48px}
body.accounts.room2 .role-card{min-height:84px;padding:6px;border-radius:10px;gap:8px}
body.accounts.room2 .role-card img{width:44px;height:66px;object-fit:contain}
body.accounts.room2 .role-card b{font-size:13px;font-weight:700}
body.accounts.room2 .role-card small{font-size:11px;line-height:1.5}
body.accounts.room2 .role-card.mine{border:3px solid #c9483e;box-shadow:0 0 0 2px #ffddd4}
body.accounts.room2 .role-head{margin:22px 0;gap:14px}
body.accounts.room2 .role-card-img{width:106px;height:159px}
.named-role-art{display:block;position:relative;flex:none;width:52px;height:78px;aspect-ratio:2/3;container-type:inline-size;overflow:hidden;border-radius:6px}
.named-role-art.role-card-img{width:112px;height:168px}
.named-role-art.pdf-card{width:min(100%,180px);height:auto;aspect-ratio:2/3;margin:0 auto 16px}
.named-role-art.role-portrait{width:140px;height:210px;margin:0 auto 20px}
.named-role-art>img{display:block;width:100%!important;height:100%!important;aspect-ratio:2/3!important;object-fit:contain!important;margin:0!important;border-radius:inherit}
.named-role-art>.role-art-name{position:absolute;left:5%;right:5%;bottom:1.5%;height:15%;display:flex;align-items:center;justify-content:center;padding:0;margin:0;font-family:var(--head, Tahoma, sans-serif);font-size:9cqw;font-weight:600;line-height:1.3;text-align:center;color:#293c32;background:none;white-space:normal;overflow-wrap:anywhere;pointer-events:none;text-shadow:none}
.named-role-art.long-name>.role-art-name{font-size:6.7cqw}
/* older phones (iOS 15, WebViews before 2022) do not know cqw: a fixed size on the big cards, no name on the small ones (the list has the name beside them) */
@supports not (font-size:1cqw){.named-role-art>.role-art-name{font-size:10px}.named-role-art.long-name>.role-art-name{font-size:8px}.deck-card .named-role-art>.role-art-name,.role-card .named-role-art>.role-art-name,.sh-role-thumb>.role-art-name{display:none}}
.deck-card .named-role-art{width:62px;height:93px;margin:0 auto 7px}
body.accounts.room2 .role-card .named-role-art{width:44px;height:66px}
body.accounts.room2 .role-sec{padding:14px;border-radius:11px;background:#f2f4eb;margin-bottom:12px}
body.accounts.room2 .role-sec p{font-size:14px;line-height:1.65}
body.accounts.room2 .dialog-actions{display:flex;gap:8px}
body.accounts.room2 .dialog-actions button{flex:1;min-height:44px}
body.accounts.room2 .dialog-actions button.primary.danger{order:2}
body.accounts.room2 .mood-more{border:0;padding:0;font-weight:400}
body.accounts.room2 .mood-more summary{min-height:36px;font-size:12px;color:#6b796d}
body.accounts.room2 .mood-chips{gap:6px}
body.accounts.room2 .mood-chip span{padding:0 8px;font-size:12px}
body.accounts.room2.in-room.keyboard-open .map.circle{aspect-ratio:auto!important;height:72px;min-height:72px}
body.accounts.room2.in-room.keyboard-open .chat-panel{height:max(200px,calc(var(--app-height,100dvh) - 96px))}
body.accounts.room2.keyboard-open .phase-bar{top:0}

/* A cottage is one button: roof, portrait and name share the same touch area. */
body.accounts.room2:not(.keyboard-open) .map.circle .house{pointer-events:auto;touch-action:manipulation;cursor:pointer}
body.accounts.room2:not(.keyboard-open) .map.circle .house::before{content:"";position:absolute;inset:-3px -3px -8px;pointer-events:auto;background:transparent}
/* Names can extend past the button box. Hit their actual painted bounds, then
   let the map's delegated click find the containing house. */
body.accounts.room2:not(.keyboard-open) .map.circle .house :is(.roof,.resident,.house-name){pointer-events:auto;cursor:pointer;touch-action:manipulation}
.volume-control{padding:14px;border:1px solid var(--ui-border);border-radius:14px;background:#fffdf8}
.volume-control output{float:right;color:var(--ui-muted)}
body.accounts input[type=range]{min-height:44px;padding:0;accent-color:#315d49;width:100%}
#edit-preview{cursor:pointer;border-radius:16px;min-height:84px}
body.accounts #photo-preview{cursor:pointer}

body.accounts [hidden]{display:none!important}
/* readiness: only a green check on the photo (nothing at all when not ready) */
.map.circle .house .ready-check{position:absolute;z-index:6;right:-9%;top:36%;width:clamp(18px,23%,22px);aspect-ratio:1;pointer-events:none;filter:drop-shadow(0 1px 2px #0007)}
.map.circle .house .ready-check svg{display:block;width:100%;height:100%}

/* the shared profile panel (public/profile-editor.js): the same markup and look in the room's dialog and in the shell's sheet */
#dialog.pe-active>.close{display:none}
.pe{position:relative;display:flex;flex-direction:column;gap:12px;color:var(--ink,#293c32);text-align:left}
.pe-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pe-head h2{margin:0;font-family:var(--head,'Kanit',sans-serif);font-size:20px;line-height:1.3}
.pe-x{background:transparent;color:inherit;min-width:44px;min-height:44px;padding:0;font-size:28px;line-height:1;border-radius:12px}
.pe-form{display:flex;flex-direction:column;gap:12px}
.pe-top{display:flex;gap:14px;align-items:center}
.pe-photo{padding:0;min-height:0;background:none;border-radius:20px;flex:none}
.pe-img{display:block;width:88px;height:88px;border-radius:20px;border:3px solid var(--ring-n,#8a9a8f);object-fit:cover;background:#e8dfc4}
.pe-who{min-width:0;flex:1}
.pe-rename{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #dfd8c6;border-radius:14px;background:#faf7ec}
.pe-rename input{min-height:48px;padding:10px 12px;border:1px solid #cfcdbd;border-radius:12px;background:#fff;color:var(--ink,#293c32);font-size:16px;font-weight:400}
.pe-rn-actions{display:flex;gap:8px}
.pe-rn-actions button{flex:1;min-height:44px;border-radius:12px;font-size:15px;font-weight:600}
.pe-rn-save{background:#315c48;color:#fff}
.pe-rn-error{margin:0;color:#b3261e;font-size:13px;min-height:0}
.pe-rn-error:empty{display:none}
.pe-name{display:block;font-family:var(--head,'Kanit',sans-serif);font-size:18px;overflow-wrap:anywhere}
.pe-kind{margin:2px 0 8px;font-size:13px;color:var(--muted,#677268)}
.pe-pick,.pe-upload{background:#edf1e8;color:#2b5a43;border:1px solid #d7e0d2;border-radius:12px;padding:10px 12px;font-size:14px;font-weight:600;min-height:44px}
.pe-photos{display:flex;flex-direction:column;gap:8px;background:#f4f1e4;border-radius:14px;padding:10px}
.pe-photos[hidden],.pe-leave[hidden]{display:none}
.pe-avs{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.pe-avs button{padding:0;min-height:44px;aspect-ratio:1;border-radius:50%;border:3px solid transparent;background:none}
.pe-avs button[aria-pressed=true]{border-color:var(--green,#315c48)}
.pe-avs img{display:block;width:100%;height:100%;border-radius:50%}
.pe-fld{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
.pe-fld textarea{min-height:84px;padding:10px 12px;border:1px solid #cfcdbd;border-radius:12px;background:#fff;color:var(--ink,#293c32);font-weight:400;resize:vertical}
.pe-hint{font-size:12px;font-weight:400;color:var(--muted,#677268)}
.pe-set{border:0;padding:0;margin:0;min-width:0}
.pe-set legend{padding:0;margin-bottom:6px;font-size:14px;font-weight:600}
.pe-chips{display:flex;flex-wrap:wrap;gap:6px}
.pe-chip{position:relative;margin:0}
.pe-chip input{position:absolute;opacity:0;width:1px;height:1px}
.pe-chip span{display:inline-block;min-height:44px;line-height:42px;padding:0 12px;border:1px solid #d7e0d2;border-radius:12px;background:#f3f6ef;font-size:13px;font-weight:500}
.pe-chip input:checked+span{border:2px solid var(--green,#315c48);background:#e4efe3;line-height:40px}
.pe-chip input:focus-visible+span{outline:3px solid #b87831;outline-offset:2px}
.pe-more summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-size:13px;color:var(--muted,#677268)}
.pe-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.pe-stats>div{padding:10px 4px;border-radius:12px;background:#f1f3ea}
.pe-stats b{display:block;font-family:var(--head,'Kanit',sans-serif);font-size:22px}
.pe-stats small{font-size:11px}
.pe-link{background:transparent;color:#2b5a43;min-height:44px;padding:0 4px;font-size:14px;font-weight:600;text-align:left}
.pe-note{margin:0;padding:10px 12px;border-radius:12px;background:#f4f1e4;font-size:13px;line-height:1.7}
.pe-error{margin:0;font-size:13px;color:var(--bad,#b3261e)}
.pe-error:empty{display:none}
.pe-save{min-height:52px;border-radius:14px;background:var(--green,#315c48);color:#fff;font-family:var(--head,'Kanit',sans-serif);font-size:16px}
.pe-save:disabled{opacity:.7}
.pe-leave{position:sticky;bottom:0;padding:12px;border-radius:14px;background:#fff7e6;border:1px solid #e8c88a;box-shadow:0 -6px 18px #0002;color:#4a3410}
.pe-leave p{margin:0 0 10px;font-size:14px;line-height:1.6}
.pe-leave-actions{display:flex;gap:8px}
.pe-leave-actions button{flex:1;min-height:44px;border-radius:12px;font-weight:600}
.pe-keep{background:var(--green,#315c48);color:#fff}
.pe-drop{background:#fbeceb;color:#8a1c14}
.pe-open{display:inline-flex;align-items:center;justify-content:center;padding:0;min-height:44px;min-width:44px;background:transparent;border:0;border-radius:50%}

/* ranking: finding yourself (a red frame and the word "คุณ"; the button scrolls to the row) */
.rank-find{width:100%}
.rank-bar{padding:12px 14px;border-radius:14px;background:#f4f1e4;font-size:14px;line-height:1.7}
.rank-live{margin:0;font-size:13px;color:var(--muted,#677268)}
.rank-live:empty{display:none}
.rank-no{display:inline-block;width:26px;font-family:var(--head,'Kanit',sans-serif)}
.rank-you{display:inline-block;margin-left:6px;padding:0 8px;border-radius:8px;background:#c62f2a;color:#fff;font-size:12px;font-weight:700;line-height:1.7;vertical-align:middle}
.rank-mine{border:3px solid #d0312d;border-radius:16px;background:#fff6f4;overflow:hidden;scroll-margin:90px 0}
body.accounts .rank-mine .sh-rm,.rank-mine .sh-rm{border:0;border-radius:0;background:transparent}
.rank-mine:focus-visible{outline:3px solid #8a1c14;outline-offset:2px}
.rank-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0 10px 10px;text-align:center}
.rank-strip>div{padding:6px 2px;border-radius:10px;background:#fff}
.rank-strip b{display:block;font-family:var(--head,'Kanit',sans-serif);font-size:18px}
.rank-strip small{font-size:11px;color:var(--muted,#677268)}
.rank-mine.pulse{animation:rank-pulse 1.6s ease}
@keyframes rank-pulse{0%,100%{box-shadow:0 0 0 0 #d0312d00}30%{box-shadow:0 0 0 8px #d0312d55}}
@media (prefers-reduced-motion:reduce){.rank-mine.pulse{animation:none;box-shadow:0 0 0 4px #d0312d55}}
body.accounts .sh-podium-member.me{border:3px solid #d0312d;background:#fff6f4}
/* A shared room directory is visible on home, with filters kept while it refreshes. */
#room-directory{display:flex;flex-direction:column;gap:10px;scroll-margin-top:80px}
#room-directory .cozy-section-heading{margin:0}
#room-directory .sh-small{margin:0}
#room-directory .room-search-status:empty{display:none}
.room-discovery-actions{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.room-discovery-actions .sh-fld{min-width:0}
.room-search-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.accounts .room-discovery-actions .sh-btn{padding-inline:12px;font-size:14px;white-space:nowrap;min-height:50px}
body.accounts .room-discovery-actions input{min-width:0;width:100%;font-size:15px}
@media(max-width:380px){body.accounts .room-discovery-actions .sh-btn{padding-inline:9px;font-size:13px}.room-discovery-actions{gap:6px}}
.rank-heading .sh-h1{margin-bottom:4px}
.rank-heading p{margin:0}
.rank-personal{border:1px solid var(--ui-border);border-radius:20px;padding:16px;background:#edf2e8}
.rank-personal-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.rank-personal-head .grow{min-width:0;flex:1}
.rank-personal h2{font:600 17px var(--head);margin:0}
.rank-personal p{font-size:12px;color:var(--ui-muted);margin:2px 0 0;overflow-wrap:anywhere}
.rank-position{text-align:right;flex:none}
.rank-position b{display:block;font:600 30px var(--head);line-height:1.2}
.rank-position small{display:block;font-size:11px;color:var(--ui-muted)}
.rank-personal .rank-strip{padding:0;gap:8px}
.rank-personal .rank-strip>div{padding:10px 2px}
.rank-personal .rank-strip b{font-size:22px}
.rank-personal .rank-find{width:100%;margin-top:12px;min-height:44px}
.rank-personal .rank-unplaced{margin-top:12px;text-align:center}
.rank-list-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.rank-list-heading h2{margin:0}
.rank-player-list{gap:8px}
.rank-player-list .grow{min-width:0}
.rank-player-list .grow>b{display:block;overflow-wrap:anywhere}
.rank-player-list .sh-rm>.sh-small{text-align:right;max-width:96px;flex:none}
.rank-player-list .rank-no{min-width:22px}
.rank-method{font-size:13px;color:var(--ui-muted)}
.rank-method summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.rank-live:empty{display:none}

/* Intentional bots and room creation. */
#bot-add-form{display:flex;gap:12px;align-items:end;margin:16px 0}#bot-add-form label{flex:1;min-width:0}#bot-add-form select,#practice-role-form select{display:block;width:100%;min-height:44px;margin:8px 0}
.bot-roster>div{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.bot-roster img{border-radius:50%;flex-shrink:0}.bot-roster strong{flex:1;min-width:0}.bot-roster small{font-weight:400}.bot-roster button{font-size:13px;flex-shrink:0}

.create-modes{display:grid;gap:12px}.create-modes .sh-btn{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;padding:16px}.create-modes .sh-small{margin:0;font-weight:400;line-height:1.6}
.login-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.login-links .sh-btn{margin:0;padding-inline:8px;min-height:44px}
.login-actions{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:10px}.login-actions .sh-btn{min-width:0;min-height:50px;font-size:14px;padding:10px 8px;margin:0;line-height:1.5}.login-actions .sh-btn:only-child{grid-column:1/-1}
body.accounts.room2 #chat-mic.voice-on{background:var(--green);color:var(--paper);box-shadow:inset 0 0 0 2px var(--c-ok,var(--green))}body.accounts.room2 #chat-mic.voice-listening{box-shadow:inset 0 0 0 2px var(--c-info,var(--green))}.house.voice-speaking .resident{outline:3px solid var(--c-ok,var(--green));outline-offset:3px;filter:drop-shadow(0 0 5px var(--c-ok,var(--green)))}

/* The room's sound sheet (room-sound.js): a row for each kind of sound, with a switch, and below it a volume. */
.rs-list{display:grid}
.rs-row{display:grid;gap:2px;padding:14px 0;border-bottom:1px solid #e6e6d9}
.rs-row:first-child{padding-top:4px}
.rs-head{display:flex;align-items:center;gap:12px}
.rs-icon{display:inline-flex;flex:none;width:30px;height:30px;color:#315d49}
.rs-icon svg,.rs-end svg{width:100%;height:100%}
.rs-title{flex:1;min-width:0}
.rs-title b,.rs-title small{display:block}
.rs-title b{font-size:17px;line-height:1.35;color:#2b4335}
.rs-title small{margin-top:2px;font-size:12.5px;line-height:1.45;color:#6b796d}
.rs-volume{display:grid;grid-template-columns:22px minmax(0,1fr) 22px 3.4em;align-items:center;gap:10px}
.rs-end{display:inline-flex;width:22px;height:22px;color:#6b796d}
.rs-volume output{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:#2b4335}
.rs-volume input[type=range]{margin:0;min-width:0}
.rs-row.is-soon .rs-icon,.rs-row.is-soon .rs-volume{opacity:.45}
.rs-note{margin:12px 0 4px;text-align:center}
.rs-done{width:100%;margin-top:10px}

/* ---- The chat that fills the screen (button in the chat title; app.js setChatExpanded) ----
   The small chat keeps its layout to the pixel: the button floats over the right end of the title row (it takes no room there, so the title, the messages and the box keep
   their sizes; the little hint text moves left to make way), and every rule that changes the chat's size needs body.chat-full. */
.chat-title{position:relative}
.chat-title small{padding-right:30px}
.chat-expand{position:absolute;right:7px;top:50%;margin-top:-12px;display:inline-flex;align-items:center;justify-content:center;gap:5px;width:24px;height:24px;min-width:0;min-height:0;padding:0;border:1.5px solid #2c352f;border-radius:8px;background:transparent;color:#2c352f;font-size:12px;line-height:1}
.chat-expand:active{background:#2c352f;color:#fff} /* pressed: the dark version of the same button */
.chat-expand::after{content:"";position:absolute;inset:-6px} /* a wider tap area than the drawing */
.chat-expand svg{width:14px;height:14px;display:block;flex:none}
.chat-expand-label{display:none}
.chat-panel.wolf-chat .chat-expand{border-color:#f2dcd6;color:#f2dcd6}
.chat-panel.wolf-chat .chat-expand:active{background:#f2dcd6;color:#2a2226}
body.chat-full{overflow:hidden}
body.chat-full #chat-panel.chat-expanded{position:fixed;top:var(--app-top,0px);left:0;right:0;bottom:auto;z-index:40;width:min(100%,760px);height:var(--app-height,100dvh);min-height:0;margin:0 auto;display:flex;flex-direction:column;border-radius:0;box-shadow:0 0 0 100vmax rgba(25,55,43,.5)}
body.chat-full #chat-panel.chat-expanded .chat-title{flex:none;min-height:46px;padding:7px 12px;border-radius:0}
body.chat-full #chat-panel.chat-expanded .chat-title small{display:none}
body.chat-full #chat-panel.chat-expanded .chat-title .chat-tabs{padding-right:80px}
body.chat-full #chat-panel.chat-expanded .chat-expand{right:10px;margin-top:-17px;width:auto;min-width:64px;height:34px;padding:0 11px;font-size:13px;font-weight:700}
body.chat-full #chat-panel.chat-expanded .chat-expand::after{inset:-6px}
body.chat-full #chat-panel.chat-expanded .chat-expand-label{display:inline}
body.chat-full #chat-panel.chat-expanded .chat-messages{flex:1 1 auto;min-height:0;height:auto;overflow-y:auto;overscroll-behavior:contain;padding:12px}
body.chat-full #chat-panel.chat-expanded .message p{font-size:15px}
body.chat-full #chat-panel.chat-expanded .message>img{width:32px;height:32px}
body.chat-full #chat-panel.chat-expanded .chat-form{flex:none;position:static;padding:8px 8px max(8px,env(safe-area-inset-bottom));border-radius:0}
