/* Shared room sheets: each selector is restricted to these three surfaces. */
.entry-sheet div, .entry-sheet span, .entry-sheet div, .room-rules-sheet div, .room-rules-sheet span, .room-rules-sheet div { box-sizing:border-box; }
.entry-backdrop { position:fixed; inset:0; z-index:900; background:var(--overlay-scrim); animation:room-sheet-scrim-in 160ms ease-out; }
form.entry-panel.entry-sheet { --entry-divider:rgba(177,191,198,.13); position:absolute; left:0; right:0; width:100%; max-width:600px; max-height:var(--entry-available-height); margin:0 auto; padding:0; border:0; border-radius:var(--sheet-radius) var(--sheet-radius) 0 0; background:var(--surface); overflow:hidden; box-sizing:border-box; box-shadow:0 -1px 0 rgba(177,191,198,.16); animation:room-sheet-in 180ms ease-out; }
/* Measure the native div before revealing and animating the sheet. */
form.entry-panel.entry-sheet.is-measuring { visibility:hidden; pointer-events:none; animation:none; }
/* Keep the flex layout on a div inside WeChat's native form wrapper. */
.entry-sheet-layout { display:flex; flex-direction:column; max-height:var(--entry-available-height); }
.is-create .entry-sheet-layout { height:var(--entry-available-height); }
.entry-sheet.has-measured-body .entry-sheet-layout { height:auto; }
.entry-sheet-top, .room-rules-sheet-top { display:flex; flex-direction:column; flex-shrink:0; }
.entry-sheet-handle { flex-shrink:0; width:36px; height:4px; border-radius:3px; background:#536570; margin:10px auto 5px; }
.entry-sheet-heading { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:12px; padding:8px 16px 15px 20px; }
.entry-sheet-title { display:flex; align-items:center; gap:10px; min-width:0; font-size:20px; font-weight:600; line-height:1.4; }
.room-sheet-symbol { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:34px; height:34px; border-radius:11px; background:#263e52; }
.room-sheet-symbol.is-gold { background:#3b372d; }.room-sheet-symbol img { width:20px; height:20px; }
.entry-sheet button.entry-sheet-close, .entry-sheet button.entry-sheet-close[disabled]:not([type]), button.room-rules-close { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; min-width:44px; min-height:44px; margin:0; padding:0; border:0; background:transparent; color:var(--muted); border-radius:12px; }
.room-sheet-close-icon { position:relative; width:21px; height:21px; }.room-sheet-close-icon::before, .room-sheet-close-icon::after { content:''; position:absolute; left:2px; top:10px; width:17px; height:1.7px; border-radius:1px; background:currentColor; transform:rotate(45deg); }.room-sheet-close-icon::after { transform:rotate(-45deg); }
.entry-sheet-scroll-region { min-height:0; flex:0 1 auto; overflow:hidden; }.is-create:not(.has-measured-body) .entry-sheet-scroll-region { flex:1 1 0; }
.entry-sheet-body { display:block; height:100%; overflow-y:auto; }.entry-sheet:not(.is-create):not(.has-measured-body) .entry-sheet-body { height:auto; max-height:calc(var(--entry-available-height) - 180px); }
.entry-sheet-fields { padding:0 20px 4px; }
.entry-sheet .label { display:block; margin:0 0 8px; color:var(--muted); font-size:12px; line-height:1.5; }
.entry-name-field { display:flex; align-items:center; gap:10px; min-height:52px; padding:8px 13px; border-radius:15px; background:var(--control-bg); }
.entry-name-field.is-focused { box-shadow:inset 0 0 0 1px var(--accent); }
.entry-avatar { width:30px; height:30px; flex-shrink:0; border-radius:50%; }.entry-avatar-fallback { display:flex; align-items:center; justify-content:center; background:var(--surface); }.entry-avatar-fallback img { width:20px; height:20px; }
.entry-sheet .input.entry-name-input { flex:1; min-width:0; width:100%; height:36px; min-height:36px; margin:0; padding:0; border:0; border-radius:0; background:transparent; font-size:16px; line-height:normal; }
.entry-sheet button.entry-name-edit, .entry-sheet button.entry-name-edit[disabled]:not([type]) { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; min-width:44px; height:44px; min-height:44px; margin:-4px -13px -4px 0; padding:0; border:0; border-radius:12px; background:transparent; }
.entry-name-pencil { width:16px; height:16px; flex-shrink:0; pointer-events:none; }
.entry-field-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:30px; margin:22px 0 10px; }
.entry-sheet .field-title { display:flex; align-items:center; gap:7px; min-width:0; margin:0; font-size:14px; font-weight:500; line-height:1.5; }.entry-sheet .field-title img { width:17px; height:17px; flex-shrink:0; }
.entry-current-count { flex-shrink:0; font-size:12px; color:var(--accent); }.entry-available-label { flex-shrink:0; font-size:12px; color:var(--muted); }
.entry-sheet .capacity-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0; }
.entry-sheet button.capacity-option, .entry-sheet button.capacity-option[disabled]:not([type]) { display:flex; align-items:center; justify-content:center; gap:4px; min-height:44px; min-width:0; margin:0; padding:6px 2px; border:0; border-radius:12px; background:var(--control-bg); color:var(--text); font-size:16px; font-weight:500; line-height:1.5; box-shadow:inset 0 0 0 1px transparent; transition:background 120ms ease,color 120ms ease,box-shadow 120ms ease; }
.entry-sheet button.capacity-option.active, .entry-sheet button.capacity-option.active[disabled]:not([type]) { color:var(--accent); background:#343831; box-shadow:inset 0 0 0 1px var(--accent); }
.entry-capacity-unit { margin-left:2px; font-size:12px; font-weight:400; }.entry-selection-check { flex-shrink:0; width:8px; height:4px; margin-top:-3px; border-left:1.7px solid currentColor; border-bottom:1.7px solid currentColor; transform:rotate(-45deg); }
.entry-sheet .board-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.entry-sheet button.board-option, .entry-sheet button.board-option[disabled]:not([type]) { position:relative; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:3px; min-width:0; min-height:70px; margin:0; padding:12px 23px 12px 12px; border:0; border-radius:14px; background:var(--control-bg); color:var(--text); text-align:left; box-shadow:inset 0 0 0 1px transparent; transition:background 120ms ease,box-shadow 120ms ease; }
.entry-sheet button.board-option.active, .entry-sheet button.board-option.active[disabled]:not([type]) { background:#2e3536; box-shadow:inset 0 0 0 1px rgba(229,198,139,.75); }.entry-sheet .board-option.active .entry-board-option-name { color:var(--accent); }
.entry-sheet .board-option .entry-selection-check { position:absolute; right:12px; top:19px; color:var(--accent); }
.entry-board-option-name { font-size:14px; font-weight:500; line-height:1.5; overflow-wrap:anywhere; }.entry-board-option-hint { color:var(--muted); font-size:12px; font-weight:400; line-height:1.5; overflow-wrap:anywhere; }
.entry-single-board { display:flex; align-items:center; gap:9px; min-height:56px; padding:12px; border-radius:14px; background:var(--control-bg); }.entry-single-board>.room-sheet-symbol { width:30px; height:32px; border-radius:10px; }.entry-single-board>div:last-child { min-width:0; }
.entry-role-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin:18px 0 2px; }.entry-board-title { min-width:0; font-size:14px; font-weight:500; line-height:1.5; overflow-wrap:anywhere; }
.entry-sheet button.entry-board-details, .entry-sheet button.entry-board-details[disabled]:not([type]) { display:flex; align-items:center; justify-content:center; flex-shrink:0; gap:4px; width:auto; min-width:44px; min-height:44px; margin:0; padding:0; border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:400; line-height:1.5; }.entry-board-details img { width:14px; height:14px; flex-shrink:0; }
.room-sheet-chevron { width:5px; height:5px; flex-shrink:0; margin:0 3px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:rotate(45deg); }
.entry-code-section .entry-field-heading { min-height:44px; margin:18px 0 6px; }
.entry-sheet button.entry-paste, .entry-sheet button.entry-paste[disabled]:not([type]) { display:flex; align-items:center; gap:5px; flex-shrink:0; width:auto; min-width:44px; min-height:44px; margin:0; padding:0; border:0; background:transparent; color:var(--accent); font-size:12px; font-weight:400; }.entry-paste img { width:16px; height:16px; }
.entry-code-field { position:relative; min-height:65px; padding:3px; border:0; border-radius:15px; background:var(--control-bg); }.entry-code-field.is-focused { box-shadow:inset 0 0 0 1px var(--accent); }
.entry-code-slots { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; pointer-events:none; }.entry-code-slot { position:relative; display:flex; align-items:center; justify-content:center; min-width:0; min-height:59px; font-size:25px; font-weight:500; font-variant-numeric:tabular-nums; }.entry-code-slot:not(:last-child)::after { content:''; position:absolute; right:-3px; top:18px; bottom:18px; width:1px; background:var(--entry-divider); }.entry-code-dash { width:9px; height:2px; border-radius:2px; background:#536570; }
.entry-code-caret { position:absolute; left:50%; top:50%; width:2px; height:1.1em; border-radius:1px; background:var(--accent); transform:translate(-50%,-50%); animation:entry-code-caret-blink 1s step-end infinite; pointer-events:none; }.entry-code-caret.is-complete { left:calc(50% + .45em); }
/* Keep the native input and its iOS caret outside the clipped sheet. The visible
   slots own the caret; the native input still owns keyboard, paste and form data. */
.entry-code-field .room-input { position:absolute; left:-1000px; top:0; width:1px; height:1px; margin:0; padding:0; border:0; background:transparent; color:transparent; opacity:0; font-size:1px; }
.entry-sheet .has-error { box-shadow:inset 0 0 0 1px var(--evil); }.entry-field-error, .entry-field-help { margin:9px 0 0; color:var(--muted); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }.entry-field-error { color:var(--evil); }
.entry-code-error { display:flex; align-items:flex-start; gap:9px; margin-top:10px; padding:11px 12px; border-radius:12px; background:rgba(242,182,174,.09); color:var(--evil); }
.entry-code-error-icon { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:17px; height:17px; margin-top:2px; border:1.5px solid currentColor; border-radius:50%; font-size:12px; font-weight:600; line-height:1; }
.entry-code-error-content { min-width:0; overflow-wrap:anywhere; }.entry-code-error-title { font-size:15px; font-weight:600; line-height:1.45; }.entry-code-error-detail { margin-top:4px; color:var(--text); font-size:14px; line-height:1.5; }
.entry-sheet-footer { flex-shrink:0; padding:16px 20px calc(12px + env(safe-area-inset-bottom)); background:var(--surface); }.entry-sheet:not(.is-create) .entry-sheet-footer { padding-top:22px; }.entry-sheet.has-keyboard .entry-sheet-footer { padding-bottom:12px; }.entry-sheet-footer .entry-field-error, .entry-sheet-footer .entry-field-help { margin:0 0 12px; }
.entry-sheet button.entry-submit, .entry-sheet button.entry-submit[disabled]:not([type]) { display:flex; align-items:center; justify-content:center; gap:12px; min-height:50px; margin:0; padding:12px; border:0; border-radius:14px; background:var(--accent); color:var(--bg); font-size:16px; font-weight:600; line-height:1.5; }.entry-submit>span { min-width:0; overflow-wrap:anywhere; }
.entry-option-pressed { opacity:.78; }
.room-role-groups { padding:0 13px; border-radius:18px; background:var(--control-bg); }.room-role-group { padding:14px 0; }.room-role-group+.room-role-group { border-top:1px solid rgba(177,191,198,.13); }.room-role-faction { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:14px; color:var(--muted); font-size:12px; line-height:1.5; }.room-role-faction>div { display:flex; align-items:center; gap:6px; }.room-role-faction>span { flex-shrink:0; color:var(--text); }
.room-role-dot { width:6px; height:6px; flex-shrink:0; border-radius:50%; background:var(--muted); }.room-role-dot.is-good { background:var(--good); }.room-role-dot.is-evil { background:var(--evil); }.room-role-dot.is-third { background:var(--third); }
.room-role-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 6px; }.room-role { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:4px; min-width:0; min-height:65px; text-align:center; }.room-role>img { width:38px; height:38px; flex-shrink:0; }.room-role-name { min-width:0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }.room-role-count { color:var(--muted); font-size:11px; margin-left:3px; white-space:nowrap; }.room-role-name>div { display:inline; }.room-role-name>div+div { display:block; }.room-role-text { font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.room-role-groups.is-compact .room-role-group { padding:11px 0; }.is-compact .room-role-faction { margin-bottom:7px; }.is-compact .room-role-grid { display:flex; flex-wrap:wrap; gap:8px 14px; }.is-compact .room-role { flex-direction:row; align-items:center; gap:4px; min-height:28px; text-align:left; }.is-compact .room-role>img { width:26px; height:28px; }
.dialog-backdrop.room-rules-backdrop { align-items:flex-end; padding:0; background:var(--overlay-scrim); }
.error-dialog.room-rules-sheet { display:flex; flex-direction:column; width:100%; max-width:600px; max-height:calc(100vh - 88px); margin:0 auto; padding:0; border:0; border-radius:var(--sheet-radius) var(--sheet-radius) 0 0; overflow:hidden; box-shadow:0 -1px 0 rgba(177,191,198,.16); animation:room-sheet-in 180ms ease-out; }
.error-dialog.room-rules-sheet.is-measuring { visibility:hidden; pointer-events:none; animation:none; }
.room-rules-body { display:block; flex:0 1 auto; min-height:0; height:calc(100vh - 272px); overflow-y:auto; }.room-rules-sheet-fields { padding:0 20px 4px; }.room-rules-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; color:var(--muted); font-size:13px; line-height:1.5; }.room-rules-summary>div { display:flex; align-items:center; gap:7px; min-width:0; }.room-rules-summary>div>span { min-width:0; overflow-wrap:anywhere; }.room-rules-summary img { width:16px; height:16px; flex-shrink:0; }.room-rules-capacity { flex-shrink:0; padding:3px 8px; border-radius:7px; background:rgba(177,191,198,.08); font-size:12px; }
.room-rules-options { display:flex; flex-direction:column; gap:9px; margin:16px 2px 0; padding-bottom:3px; color:var(--muted); font-size:12px; line-height:1.5; }.room-rules-option { display:flex; align-items:center; gap:6px; }.room-rules-option img { width:15px; height:15px; flex-shrink:0; }.room-rules-option>span:last-child { margin-left:auto; flex-shrink:0; }.room-rules-option.is-enabled>span:last-child { color:var(--good); }.room-rules-notice { font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.room-rules-sheet-footer { display:flex; flex-shrink:0; gap:10px; padding:16px 20px calc(12px + env(safe-area-inset-bottom)); background:var(--surface); }.room-rules-sheet-footer button { display:flex; align-items:center; justify-content:center; flex:1; gap:7px; min-width:0; min-height:50px; margin:0; padding:12px; border:0; border-radius:14px; font-size:14px; font-weight:500; line-height:1.5; }.room-rules-sheet-footer .secondary { background:#30424d; color:var(--text); }.room-rules-sheet-footer .primary { background:var(--accent); color:var(--bg); font-size:16px; font-weight:600; }.room-rules-sheet-footer img { width:17px; height:17px; flex-shrink:0; }
@keyframes room-sheet-in { from { opacity:.7; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes room-sheet-scrim-in { from { background:rgba(0,0,0,0); } to { background:rgba(0,0,0,.56); } }
@keyframes entry-code-caret-blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
@media(prefers-reduced-motion:reduce) { .entry-backdrop, form.entry-panel.entry-sheet, .error-dialog.room-rules-sheet, .home-lobby .room-refresh-icon.is-refreshing, .entry-code-caret { animation:none; }.entry-sheet .capacity-option, .entry-sheet .board-option, .home-lobby button.home-action { transition:none; } }
@media(max-width:350px) { .entry-sheet-heading { padding-left:16px; }.entry-sheet-fields, .room-rules-sheet-fields { padding-left:16px; padding-right:16px; }.entry-sheet-footer, .room-rules-sheet-footer { padding-left:16px; padding-right:16px; }.entry-sheet-title { font-size:19px; }.entry-sheet .capacity-grid { gap:6px; }.entry-sheet button.capacity-option { gap:3px; font-size:15px; }.entry-sheet button.board-option { padding:10px 22px 10px 10px; }.entry-board-option-name { font-size:13px; }.room-role-groups { padding-left:10px; padding-right:10px; }.is-compact .room-role-grid { gap:7px 11px; }.is-compact .room-role>img { width:24px; height:26px; }.room-role-grid { gap:12px 5px; }.room-role>img { width:34px; height:34px; } }
@media(orientation:landscape) and (max-height:500px) { .entry-sheet, .room-rules-sheet { --entry-available-height:calc(100vh - 20px); }form.entry-panel.entry-sheet { max-height:calc(100vh - var(--entry-keyboard-height) - 20px); }.entry-sheet-layout { max-height:calc(100vh - var(--entry-keyboard-height) - 20px); }.error-dialog.room-rules-sheet { max-height:calc(100vh - 20px); }.room-rules-body { height:calc(100vh - 160px); }.entry-sheet-handle { display:none; }.entry-sheet-heading { padding-top:3px; padding-bottom:6px; }.entry-sheet-footer, .entry-sheet.has-keyboard .entry-sheet-footer, .room-rules-sheet-footer { padding-top:8px; padding-bottom:12px; }.entry-sheet button.entry-submit, .room-rules-sheet-footer button { min-height:44px; } }
