:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #17212d; background: #f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
.app-header { min-height: 72px; padding: calc(12px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e5e8ed; background: #fff; }
.brand { display: flex; align-items: baseline; gap: 12px; }
h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.5px; }
.version { color: #6b7280; font-size: 13px; }
button { font: inherit; cursor: pointer; min-height: 44px; min-width: 44px; color: inherit; }
button:focus-visible { outline: 3px solid #537bd3; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }
.icon-button { width: 48px; height: 48px; border: 0; border-radius: 12px; background: transparent; display: grid; place-items: center; font-size: 30px; }
button:hover { background-color: #edf0f6; }
button:active { background-color: #dce3ef; }
.burger, .burger::before, .burger::after { width: 22px; height: 2px; background: currentColor; border-radius: 2px; display: block; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
#game-field { min-height: calc(100svh - 96px); }
dialog { width: min(360px, calc(100vw - 32px)); padding: 20px; border: 1px solid #e5e8ed; border-radius: 20px; box-shadow: 0 16px 60px #17212d24; }
dialog::backdrop { background: #17212d45; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
h2 { font-size: 20px; margin: 0; }
.menu-action { display: block; width: 100%; padding: 14px 12px; text-align: left; border: 0; border-radius: 10px; background: #f5f6f9; margin: 8px 0; }
.access-readonly #menu-toggle { display: none; }
.protected-user #logout { display: none; }
.hint { font-size: 14px; line-height: 1.5; color: #566274; }
.gate { max-width: 460px; margin: 14svh auto 0; padding: 24px; }
.gate p { line-height: 1.6; }
.primary { border: 0; border-radius: 12px; background: #244f98; color: #fff; padding: 12px 20px; }
.primary:hover { background: #173e80; }
.error { color: #a02929; }
[hidden] { display: none !important; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.wide { grid-column: 1 / span 12; }
textarea, input { font: inherit; width: 100%; min-height: 44px; border: 1px solid #a6afbd; border-radius: 8px; padding: 10px; }
select { font: inherit; width: 100%; min-height: 44px; border: 1px solid #a6afbd; border-radius: 8px; padding: 10px; background: #fff; }
textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; }
.dialog-actions button, .version-actions button { border: 1px solid #cbd1da; border-radius: 8px; padding: 10px 14px; }
#make-dialog, #versions-dialog { width: min(620px, calc(100vw - 32px)); max-height: 85svh; }
.development-status { position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); left: 16px; right: 16px; margin: 0 auto; max-width: 620px; background: #fff; border: 1px solid #cbd1da; border-radius: 12px; padding: 12px 16px; box-shadow: 0 3px 16px #17212d18; z-index: 2; }
#versions-list { padding-left: 24px; }
.wide-dialog { width: min(620px, calc(100vw - 32px)); max-height: 85svh; }
.recipient-field { grid-column: 1 / span 6; }
.name-field { grid-column: 1 / span 6; }
.access-field { grid-column: 7 / span 4; }
.recipient-field label, .name-field label, .access-field label { display: block; margin-bottom: 6px; }
.user-list { padding-left: 0; list-style: none; }
.user-button { width: 100%; border: 1px solid #e5e8ed; border-radius: 10px; background: #fff; padding: 12px; margin: 8px 0; text-align: left; }
.user-button strong, .user-button span { display: block; }
.user-button span { color: #566274; font-size: 13px; margin-top: 4px; }
.danger { border: 1px solid #a02929; border-radius: 12px; background: #fff; color: #a02929; padding: 12px 20px; }
.invite-qr { width: min(320px, 100%); margin: 16px auto; }
.invite-qr svg { display: block; width: 100%; height: auto; }
@media (max-width: 620px) { .recipient-field, .name-field, .access-field { grid-column: 1 / span 12; } }
.version-item { padding: 12px 0; border-bottom: 1px solid #e5e8ed; }
.version-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.version-meta { font-size: 13px; color: #566274; margin: 8px 0; }
