:root {
  color-scheme: light;
  --blue-950: #102b52;
  --blue-900: #163a78;
  --blue-800: #204f9b;
  --blue-700: #2b62b7;
  --blue-100: #eaf2fd;
  --blue-50: #f4f8fe;
  --ink: #17253c;
  --muted: #5f6e84;
  --line: #dbe4f0;
  --surface: #fff;
  --canvas: #f3f7fc;
  --yellow: #f4ce4e;
  --green: #25834f;
  --red: #ad372e;
  --shadow: 0 16px 44px rgba(19, 52, 99, .08);
  font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { position: relative; isolation: isolate; min-width: 0; margin: 0; background: var(--canvas); font-size: 15px; line-height: 1.55; }
body::before { position: fixed; z-index: -1; inset: 86px 0 0; background: radial-gradient(circle at 88% 14%, rgba(244,206,78,.18), transparent 25%), radial-gradient(circle at 10% 88%, rgba(197,35,51,.1), transparent 30%), linear-gradient(112deg, rgba(243,247,252,.78), rgba(243,247,252,.68)), url("assets/room-youth-infographic.webp") 24% center / cover no-repeat; content: ""; pointer-events: none; }
button, input, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #e1a80b; outline-offset: 3px; }
.skip-link { position: absolute; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; color: #fff; background: var(--blue-950); border-radius: 8px; }
.skip-link:focus { transform: none; }
.demo-ribbon { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 33px; padding: 5px 16px; color: #fff; background: var(--blue-950); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.demo-dot, .live-dot, .status-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #48aa6d; }
.demo-dot { background: var(--yellow); }
.site-header { position: relative; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; width: min(1440px, calc(100% - 64px)); min-height: 86px; margin: 0 auto; }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; width: 52px; height: 52px; object-fit: contain; }
.brand span { display: grid; line-height: 1.25; }
.brand strong { color: #172743; font-size: 18px; font-weight: 800; white-space: nowrap; }
.brand small { margin-top: 3px; color: var(--blue-700); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.main-nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: clamp(12px, 1.25vw, 21px); min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; white-space: nowrap; }
.main-nav a { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 44px; color: #34425a; font-size: 11px; font-weight: 750; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue-900); }
.main-nav a[aria-current="page"]::after { position: absolute; right: 0; bottom: 3px; left: 0; height: 3px; border-radius: 3px; background: var(--blue-700); content: ""; }

.page-shell { position: relative; z-index: 0; width: min(1392px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0 52px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 9px; color: var(--blue-800); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.eyebrow-line { width: 22px; height: 2px; background: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin: 0; color: #15233b; font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.12; }
.page-lead { max-width: 710px; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.room-status-chip { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; margin-bottom: 5px; padding: 9px 14px; border: 1px solid #cce4d4; border-radius: 999px; color: #22613d; background: #f4fbf6; font-size: 12px; font-weight: 750; }
.demo-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px 15px; border: 1px solid #e8dcaa; border-radius: 11px; color: #594715; background: #fff9e5; }
.demo-notice svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.demo-notice p { margin: 0; font-size: 12px; line-height: 1.5; }
.room-layout { display: grid; grid-template-columns: minmax(255px, .72fr) minmax(0, 1.65fr); align-items: stretch; gap: 20px; }
.room-guidance, .chat-card, .moderation-panel { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.room-guidance { display: flex; flex-direction: column; padding: 22px; }
.guidance-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; }
.guidance-icon, .room-mark { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--blue-900); background: var(--blue-100); }
.guidance-icon svg, .room-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.guidance-heading .eyebrow { margin-bottom: 4px; font-size: 8px; }
.guidance-heading h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.25; }
.guidelines { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.guidelines li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.guidelines li>span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--blue-800); background: #f0f5fd; font-size: 10px; font-weight: 850; }
.guidelines p { margin: 2px 0 0; color: #45556e; font-size: 12px; line-height: 1.6; }
.guidelines strong { color: #243854; }
.capacity-note { margin: 20px 0 0; padding: 13px 14px; border-left: 3px solid var(--yellow); color: #52647a; background: #f7f9fc; font-size: 11px; line-height: 1.55; }
.guide-actions { margin-top: auto; padding-top: 20px; }
.text-button, .quiet-button { min-height: 42px; padding: 8px 11px; border: 1px solid #cfdced; border-radius: 9px; color: var(--blue-800); background: #fff; font-size: 11px; font-weight: 750; }
.text-button:hover, .quiet-button:hover { border-color: #8aa9d4; background: var(--blue-50); }
.demo-only-note { margin: 8px 0 0; color: #758197; font-size: 10px; line-height: 1.5; }

.chat-card { display: flex; flex-direction: column; overflow: hidden; min-height: 570px; }
.chat-card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 21px; border-bottom: 1px solid var(--line); }
.room-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-mark { width: 40px; height: 40px; }
.room-overline { margin: 0 0 1px; color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.room-heading h2 { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.3; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: #5f6e84; font-size: 10px; }
.status-dot { width: 7px; height: 7px; background: #d2a325; }
.connection-status[data-state="online"] .status-dot { background: #31834e; }
.connection-status[data-state="offline"] .status-dot { background: #c63a35; }
.connection-status[data-state="auth-required"] .status-dot,
.connection-status[data-state="forbidden"] .status-dot,
.connection-status[data-state="warning"] .status-dot { background: #c18a12; }
.connection-status[data-state="server-error"] .status-dot { background: #c63a35; }
.join-panel { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; flex: 1; gap: 28px; padding: 34px; }
.join-copy .eyebrow { margin-bottom: 8px; font-size: 9px; }
.join-copy h3 { margin: 0 0 9px; color: var(--blue-950); font-size: 24px; letter-spacing: -.025em; }
.join-copy>p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.join-form label { display: block; margin-bottom: 7px; color: #263954; font-size: 12px; font-weight: 750; }
.join-form label span { color: var(--red); }
.join-input-row { display: flex; gap: 8px; }
.join-input-row input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 13px; border: 1px solid #cbd7e6; border-radius: 10px; color: var(--ink); background: #fff; font-size: 14px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 15px; border: 0; border-radius: 10px; color: #fff; background: var(--blue-900); font-size: 12px; font-weight: 800; white-space: nowrap; transition: background .18s ease, box-shadow .18s ease; }
.primary-button:hover { background: #0e2e66; box-shadow: 0 7px 16px rgba(22,58,120,.18); }
.primary-button:disabled, .send-button:disabled { cursor: wait; opacity: .62; }
.primary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field-hint, .field-error, .field-success { margin: 6px 0 0; font-size: 10px; line-height: 1.45; }
.field-hint { color: #738096; }
.field-error { color: #a22c28; font-weight: 650; }
.field-success { color: #21633b; font-weight: 700; }
.chat-room { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.joined-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.joined-bar p { margin: 0; color: #56657b; font-size: 11px; }
.joined-bar strong { color: var(--blue-900); }
.quiet-button { min-height: 38px; padding: 7px 10px; font-size: 10px; }
.history-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 4px 18px; }
.history-tools>span { color: #7b879a; font-size: 9px; text-align: right; }
.message-list { position: relative; flex: 1; min-height: 270px; max-height: 370px; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 20px; background: linear-gradient(180deg, #f8fafe 0, #fff 28%); scroll-behavior: auto; }
.message-list:focus-visible { outline-offset: -3px; }
.empty-chat { max-width: 350px; margin: 50px auto; color: #718096; font-size: 12px; text-align: center; }
.message-item { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; max-width: min(88%, 720px); margin: 0 0 13px; }
.message-item.mine { grid-template-columns: minmax(0,1fr) 32px; margin-left: auto; }
.message-avatar { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; color: var(--blue-900); background: #e7eef9; font-size: 11px; font-weight: 800; }
.message-item.mine .message-avatar { grid-column: 2; color: #704f00; background: #fff2c8; }
.message-bubble { min-width: 0; padding: 10px 12px; border: 1px solid #e1e8f1; border-radius: 4px 14px 14px 14px; background: #fff; box-shadow: 0 2px 8px rgba(18,43,82,.035); }
.message-item.mine .message-bubble { grid-row: 1; grid-column: 1; border-color: #dce7f7; border-radius: 14px 4px 14px 14px; background: #f0f5fd; }
.message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin: 0 0 4px; }
.message-meta strong { color: #233c61; font-size: 10px; font-weight: 800; }
.message-item.mine .message-meta { justify-content: flex-end; }
.message-meta time { color: #7e8ba0; font-size: 9px; }
.message-body { margin: 0; color: #2d3c52; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-actions { display: flex; justify-content: flex-end; margin-top: 3px; }
.message-actions button { min-width: 40px; min-height: 36px; padding: 4px 7px; border: 0; border-radius: 7px; color: #78869a; background: transparent; font-size: 9px; }
.message-actions button:hover { color: var(--red); background: #fff3f1; }
.new-messages { position: sticky; z-index: 1; bottom: 10px; align-self: center; min-height: 40px; margin: -49px 0 9px; padding: 8px 14px; border: 1px solid #c7d7ed; border-radius: 999px; color: var(--blue-900); background: #fff; box-shadow: 0 5px 17px rgba(16,43,82,.14); font-size: 10px; font-weight: 800; }
.message-form { padding: 13px 18px 16px; border-top: 1px solid var(--line); background: #fff; }
.message-form textarea { display: block; width: 100%; min-height: 64px; max-height: 130px; resize: vertical; padding: 12px 13px; border: 1px solid #d5deeb; border-radius: 11px; color: var(--ink); background: #fff; font-size: 14px; line-height: 1.5; }
.message-form textarea::placeholder { color: #8995a8; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.composer-bottom .field-hint, .composer-bottom .field-error, .composer-bottom .field-success { margin: 0; }
.send-actions { display: inline-flex; align-items: center; gap: 11px; }
#character-count { color: #758298; font-size: 9px; font-variant-numeric: tabular-nums; }
.send-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 82px; min-height: 42px; padding: 7px 12px; border: 0; border-radius: 9px; color: #fff; background: var(--blue-900); font-size: 11px; font-weight: 800; }
.send-button:hover { background: #0e2e66; }
.send-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moderation-panel { margin-top: 20px; padding: 22px; }
.moderation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.moderation-head h2 { margin: 0 0 5px; color: var(--blue-950); font-size: 22px; }
.moderation-head>div>p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.moderation-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 17px; }
.moderation-columns h3 { margin-bottom: 9px; color: #2c405d; font-size: 13px; }
.moderation-list { display: grid; gap: 9px; }
.moderation-item { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.moderation-item p { margin: 5px 0; color: #40516b; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.moderation-item small { color: #7a879a; font-size: 9px; }
.moderation-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.moderation-actions button { min-height: 36px; padding: 6px 9px; border: 1px solid #cfdced; border-radius: 8px; color: #365578; background: #fff; font-size: 9px; font-weight: 750; }
.moderation-actions .danger { border-color: #edd0cb; color: #992b25; }
.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.account-button { min-height: 38px; padding: 7px 11px; border: 1px solid #cad7e8; border-radius: 9px; color: #264677; background: #fff; font-size: 10px; font-weight: 750; white-space: nowrap; }
.account-button:hover, .quiet-button:hover { border-color: #7f9bc2; background: #f6f9fd; }
.account-primary { border-color: var(--blue-900); color: white; background: var(--blue-900); }
.account-primary:hover { color: white; background: #0d2c61; }
.account-badge { max-width: 200px; overflow: hidden; color: #28436d; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.events-panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.member-inline-events { margin: 0; padding: 17px 20px 20px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: #fbfcfe; }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-heading-row h2, .login-gate h2 { margin: 0 0 6px; color: var(--blue-950); font-size: 21px; }
.section-heading-row p:last-child, .login-gate p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.member-only-badge, .event-status { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; color: #234879; background: #eaf1fb; font-size: 9px; font-weight: 800; white-space: nowrap; }
.login-gate { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-gate .primary-button { flex: 0 0 auto; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.event-card { min-width: 0; padding: 15px; border: 1px solid #e0e7f0; border-radius: 12px; background: #fff; }
.event-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 9px; width: 100%; min-width: 0; }
.event-card h3 { min-width: 0; max-width: 100%; margin: 0; color: var(--blue-950); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; word-break: normal; }
.event-card-head .event-status { justify-self: start; max-width: 100%; }
.event-status.status-closed { color: #6b5361; background: #f2edf0; }
.event-status.status-cancelled { color: #8a2927; background: #fff0ed; }
.event-card-details { display: grid; gap: 7px; margin: 13px 0; }
.event-card-details>div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 8px; font-size: 10px; line-height: 1.45; }
.event-card-details dt { color: #718096; }
.event-card-details dd { margin: 0; color: #2e3c52; font-weight: 700; overflow-wrap: anywhere; }
.event-card-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.event-card-actions button { min-height: 38px; }
.admin-local-banner { margin: 14px 0; padding: 10px 12px; border-left: 3px solid #d4a500; border-radius: 4px; color: #624c09; background: #fff9dd; font-size: 10px; line-height: 1.5; }
.admin-login-gate { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; padding: 15px; border: 1px solid #e2e8f1; border-radius: 10px; background: #f8fafd; }
.admin-login-gate p { margin: 0; color: #4b5b72; font-size: 11px; line-height: 1.5; }
.admin-tabs { display: flex; gap: 7px; margin: 18px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.admin-tabs button { min-height: 40px; flex: 0 0 auto; padding: 7px 13px; border: 1px solid #d8e1ed; border-radius: 9px; color: #49617e; background: #fff; font-size: 10px; font-weight: 750; }
.admin-tabs button[aria-selected="true"] { border-color: var(--blue-900); color: white; background: var(--blue-900); }
.admin-subheading { display: flex; justify-content: space-between; gap: 16px; margin: 14px 0 10px; }
.admin-subheading>.primary-button { min-height: 40px; font-size: 10px; }
.admin-subheading h3, .moderation-columns h3 { margin: 0 0 4px; color: #263d61; font-size: 15px; }
.admin-subheading p { margin: 0; color: #718096; font-size: 10px; line-height: 1.5; }
.list-subheading { margin-top: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { color: #374963; font-size: 10px; font-weight: 750; }
.form-field input, .form-field select { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #d4deeb; border-radius: 8px; color: #26374f; background: white; font: inherit; font-size: 12px; }
.form-field input:focus, .form-field select:focus, .message-form textarea:focus { border-color: #527bb7; outline: 3px solid rgba(66,115,180,.16); }
.form-feedback { min-height: 18px; margin: 4px 0; color: #a22c28; font-size: 10px; line-height: 1.45; }
.form-feedback.field-success { color: #21633b; }
.form-feedback.field-hint { color: #738096; }
.event-create-form { padding: 15px; border: 1px solid #e3e9f1; border-radius: 12px; background: #f9fbfe; }
.admin-event-list, .admin-member-list { display: grid; gap: 10px; margin-top: 10px; }
.admin-member-list .member-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: white; }
.member-card strong { color: var(--blue-950); font-size: 12px; }
.member-card p { margin: 4px 0 0; color: #6c7b91; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.member-filters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; align-items: end; padding: 13px; border-radius: 10px; background: #f6f8fb; }
.member-filters>button { min-height: 42px; }
.admin-add-member { margin: 13px 0; padding: 11px 13px; border: 1px solid #e2e8f0; border-radius: 9px; color: #2c4262; background: white; }
.admin-add-member summary { min-height: 26px; cursor: pointer; font-size: 11px; font-weight: 800; }
.compact-member-form { padding-top: 12px; }
.account-dialog { width: min(740px, calc(100% - 24px)); max-height: min(90dvh, 900px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 24px 80px rgba(9,27,55,.28); }
.account-dialog::backdrop { background: rgba(13,32,59,.52); }
.dialog-content, .dialog-form { display: grid; gap: 13px; padding: 22px; }
.account-tabs { display: flex; gap: 7px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.account-tabs button { min-height: 40px; padding: 7px 12px; border: 1px solid #d8e1ed; border-radius: 8px; color: #48617e; background: white; font-size: 10px; font-weight: 750; }
.account-tabs button[aria-selected="true"] { border-color: var(--blue-900); color: white; background: var(--blue-900); }
.account-form { display: grid; gap: 12px; }
.account-explainer, .privacy-note { margin: 0; color: #66758c; font-size: 10px; line-height: 1.6; }
.privacy-note { padding: 10px; border-left: 3px solid #d5aa19; background: #fff9e7; }
.label-note { color: #7b879a; font-weight: 500; }
.event-dialog { width: min(520px, calc(100% - 24px)); }
#account-dialog { overflow: hidden; }
#account-dialog .dialog-content { max-height: min(90dvh, 900px); overflow-y: auto; overscroll-behavior: contain; gap: 17px; padding: clamp(20px, 3vw, 30px); }
#account-dialog .dialog-heading h2 { margin: 0; font-size: clamp(26px, 3vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
#account-dialog .account-tabs { gap: 10px; padding-bottom: 12px; }
#account-dialog .account-tabs button { min-height: 48px; padding: 9px 16px; font-size: 17px; }
#account-dialog .account-form { gap: 16px; }
#account-dialog .account-explainer, #account-dialog .privacy-note { font-size: 16px; line-height: 1.6; }
#account-dialog .form-field { gap: 7px; }
#account-dialog .form-field label { font-size: 18px; line-height: 1.35; }
#account-dialog .label-note { font-size: 16px; }
#account-dialog .form-field input, #account-dialog .form-field select { min-height: 50px; padding: 11px 13px; font-size: 16px; }
#account-dialog .field-error, #account-dialog .form-feedback { min-height: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
#account-dialog .primary-button { min-height: 50px; padding: 11px 16px; font-size: 18px; white-space: normal; }
#account-dialog .account-switch { min-height: 48px; font-size: 16px; line-height: 1.4; white-space: normal; }
.owner-admin-provision { margin-bottom: 22px; padding: 16px; border: 1px solid #dbe4f0; border-radius: 12px; background: #f7faff; }
.owner-admin-provision .admin-subheading { margin-bottom: 12px; }
.owner-admin-provision .admin-subheading h3 { font-size: 17px; }
.owner-admin-provision .admin-subheading p { max-width: 760px; font-size: 13px; }
.owner-admin-form { padding: 13px; border: 1px solid #e1e8f2; border-radius: 10px; background: #fff; }
.event-detail-list { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.event-detail-list>div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.event-detail-list dt { color: #758198; }
.event-detail-list dd { margin: 0; color: #273c5e; font-weight: 750; overflow-wrap: anywhere; }
.roster-dialog { width: min(1100px, calc(100% - 20px)); }
.table-scroll { max-width: 100%; overflow: auto; border: 1px solid #e2e8f0; border-radius: 9px; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 10px; white-space: nowrap; }
.roster-table th, .roster-table td { padding: 9px 10px; border-bottom: 1px solid #e7ebf2; text-align: left; }
.roster-table th { color: #28436b; background: #f3f6fa; }
.roster-table td { color: #394b65; }
.roster-table tr:last-child td { border-bottom: 0; }
.capacity-footnote { margin: 17px 2px 0; color: #78869a; font-size: 10px; line-height: 1.5; }
.site-footer { color: rgba(255,255,255,.78); background: #0d2341; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1392px, calc(100% - 64px)); min-height: 58px; margin: 0 auto; font-size: 10px; }
.footer-inner a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.report-dialog { width: min(440px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 24px 80px rgba(9,27,55,.28); }
.report-dialog::backdrop { background: rgba(13,32,59,.48); }
.report-dialog form { padding: 21px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0 0 16px; color: var(--blue-950); font-size: 19px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; color: #495971; background: #fff; font-size: 21px; }
.report-dialog fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.report-dialog legend { margin-bottom: 7px; color: #40516b; font-size: 11px; font-weight: 750; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid #e2e8f1; border-radius: 9px; color: #384a64; font-size: 11px; cursor: pointer; }
.radio-row input { accent-color: var(--blue-800); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.dialog-actions .primary-button { min-height: 40px; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
[hidden] { display: none !important; }

/* Account and event-location additions */
.account-switch { justify-self: start; min-height: 42px; padding: 7px 2px; border: 0; color: var(--blue-800); background: transparent; font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.account-switch:hover { color: var(--blue-950); }
.account-back { text-decoration: none; }
.form-field textarea { width: 100%; min-height: 86px; padding: 10px; resize: vertical; border: 1px solid #d4deeb; border-radius: 8px; color: #26374f; background: #fff; font: inherit; font-size: 12px; line-height: 1.5; }
.form-field textarea:focus { border-color: #527bb7; outline: 3px solid rgba(66,115,180,.16); }
.event-map { width: 100%; height: 300px; overflow: hidden; border: 1px solid #ccd7e7; border-radius: 10px; background: #eaf1f8; isolation: isolate; }
.event-map .leaflet-control-attribution { font-size: 9px; }
.map-confirm-row { display: flex; align-items: flex-start; gap: 9px; min-height: 42px; padding: 10px 11px; border: 1px solid #e1e7f0; border-radius: 9px; background: #fff; cursor: pointer; }
.map-confirm-row input { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--blue-900); }
.map-coordinates { margin: 2px 0 0; color: #284879; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; }
.event-code { display: block; grid-column: 1 / -1; align-self: start; justify-self: start; min-width: 0; max-width: 100%; color: #728096; font-size: 9px; font-weight: 700; line-height: 1.55; text-align: left; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.event-card-content, .event-detail-content { margin: 0 0 10px; color: #4c5e77; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-map-link, .map-open-link { display: inline-flex; width: fit-content; align-items: center; margin: 0 0 10px; color: var(--blue-800); font-size: 10px; font-weight: 750; text-decoration: none; }
.location-consent-note { margin: 4px 0; padding: 10px; border-left: 3px solid #e0b834; color: #52647a; background: #fff9e8; font-size: 10px; line-height: 1.55; }
.location-consent-dialog { width: min(520px, calc(100% - 24px)); }
.location-consent-dialog p { margin: 0; color: #506078; font-size: 12px; line-height: 1.65; }
.location-consent-dialog .dialog-actions { flex-wrap: wrap; }
.attendance-history-list { display: grid; gap: 9px; }
.attendance-history-item { display: grid; justify-items: start; gap: 4px; min-width: 0; padding: 13px; border: 1px solid #C7EBD8; border-radius: 12px; background: rgba(255,255,255,.92); }
.attendance-history-item strong { color: #22513B; font-size: 15px; overflow-wrap: anywhere; }
.attendance-history-item p { margin: 0; color: #527263; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.attendance-history-status { display: inline-flex; align-items: center; min-height: 28px; margin-top: 4px; padding: 3px 10px; border-radius: 999px; color: #14573D; background: #DDF6E8; font-size: 12px; font-weight: 800; }
.history-dialog-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-dialog-tools span { min-width: 0; color: #527263; font-size: 13px; line-height: 1.45; }
.history-dialog-tools .quiet-button { min-height: 44px; }
.permission-card, .permission-audit-item { padding: 13px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fff; }
.permission-scope + .permission-scope { margin-top: 12px; padding-top: 11px; border-top: 1px solid #e7ebf2; }
.permission-scope-title { margin: 0 0 8px; color: #536781; font-size: 10px; font-weight: 800; }
.permission-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; margin-bottom: 11px; }
.permission-card-head strong { color: var(--blue-950); font-size: 12px; }
.permission-card-head span { color: #738096; font-size: 10px; }
.permission-checkboxes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; margin-bottom: 10px; }
.permission-option { display: flex; align-items: flex-start; gap: 7px; color: #40516b; font-size: 10px; line-height: 1.4; }
.permission-option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--blue-900); }
.permission-audit-list { display: grid; gap: 8px; margin-top: 10px; }
.permission-audit-item strong { color: #2d4262; font-size: 10px; }
.permission-audit-item p { margin: 4px 0 0; color: #6a7890; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.roster-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.roster-summary span { padding: 6px 9px; border-radius: 999px; color: #214578; background: #edf3fc; font-size: 10px; font-weight: 750; }
.map-confirm-row input:focus-visible, .permission-option input:focus-visible { outline: 3px solid #e1a80b; outline-offset: 2px; }
.chat-permission-notice { margin: 14px 20px; padding: 13px 14px; border-left: 3px solid #d3a421; border-radius: 7px; color: #465a77; background: #fff9e7; font-size: 11px; line-height: 1.6; }

@media (max-width: 1120px) {
  .header-row { width: min(100% - 40px, 1440px); gap: 18px; }
  .main-nav { justify-content: flex-start; gap: 14px; }
  .main-nav a { font-size: 10px; }
  .room-layout { grid-template-columns: minmax(230px, .75fr) minmax(0, 1.55fr); gap: 14px; }
  .room-guidance { padding: 18px; }
  .account-actions { gap: 5px; }
  .account-button { font-size: 9px; padding-inline: 8px; }
}
@media (min-width: 1121px) and (max-width: 1380px) {
  .header-row { gap: 12px; }
  .brand { gap: 8px; }
  .brand img { width: 46px; height: 46px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 8px; }
  .main-nav { gap: 9px; }
  .main-nav a { font-size: 9px; }
  .account-actions { flex-wrap: nowrap; gap: 4px; }
  .account-button { padding-inline: 7px; font-size: 9px; }
}
@media (max-width: 800px) {
  .header-row { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 12px 0 0; }
  .brand img { width: 44px; height: 44px; }
  .brand strong { font-size: 16px; }
  .main-nav { justify-content: flex-start; width: 100%; padding: 2px 0 7px; }
  .main-nav a { font-size: 10px; }
  .page-shell { width: min(100% - 36px, 700px); padding-top: 28px; }
  .room-layout { grid-template-columns: 1fr; }
  .room-guidance { order: 2; }
  .chat-card { order: 1; min-height: 570px; }
  .account-actions { justify-content: flex-start; padding: 3px 0 8px; }
  .event-grid { grid-template-columns: 1fr; }
  .member-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .events-panel { padding: 17px; }
  .member-inline-events { padding: 15px; }
  .moderation-panel { overflow-wrap: anywhere; }
  .guidelines { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
  .guidelines li { display: block; }
  .guidelines li>span { margin-bottom: 7px; }
  .capacity-note { margin-top: 14px; }
  .guide-actions { padding-top: 14px; }
  .footer-inner { width: min(100% - 36px, 700px); }
}
@media (max-width: 560px) {
  body::before { inset: 80px 0 0; background-position: 30% center; }
  body { font-size: 14px; }
  .demo-ribbon { min-height: 38px; font-size: 8px; letter-spacing: .055em; }
  .header-row { width: calc(100% - 28px); }
  .brand { gap: 9px; }
  .brand img { width: 40px; height: 40px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 8px; }
  .main-nav { gap: 14px; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { min-height: 42px; font-size: 10px; }
  .page-shell { width: calc(100% - 28px); padding: 23px 0 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 16px; }
  .page-heading h1 { font-size: 32px; }
  .page-lead { margin-top: 8px; font-size: 13px; }
  .room-status-chip { margin: 0; }
  .demo-notice { align-items: flex-start; margin-bottom: 13px; padding: 11px; }
  .demo-notice p { font-size: 11px; }
  .room-layout { gap: 13px; }
  .chat-card { min-height: min(660px, 74dvh); border-radius: 14px; }
  .chat-card-head { align-items: flex-start; padding: 13px; }
  .room-mark { width: 36px; height: 36px; }
  .room-heading { gap: 9px; }
  .room-heading h2 { font-size: 15px; }
  .connection-status { padding-top: 5px; font-size: 9px; }
  .join-panel { grid-template-columns: 1fr; align-content: center; gap: 22px; padding: 23px 17px; }
  .join-copy h3 { font-size: 22px; }
  .join-copy>p:last-child { font-size: 12px; }
  .join-input-row { flex-direction: column; }
  .join-input-row .primary-button { width: 100%; }
  .chat-card { min-height: 620px; }
  .joined-bar { padding: 8px 12px; }
  .joined-bar p { font-size: 10px; }
  .history-tools { align-items: flex-start; min-height: 48px; padding: 5px 12px; }
  .history-tools>span { max-width: 180px; padding-top: 7px; font-size: 8px; }
  .message-list { min-height: 250px; max-height: 42dvh; padding: 12px 12px 18px; }
  .message-item { max-width: 94%; grid-template-columns: 27px minmax(0,1fr); gap: 7px; }
  .message-item.mine { grid-template-columns: minmax(0,1fr) 27px; }
  .message-avatar { width: 26px; height: 26px; font-size: 10px; }
  .message-bubble { padding: 9px 10px; }
  .message-body { font-size: 12px; }
  .message-form { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .message-form textarea { min-height: 59px; font-size: 16px; }
  .send-button { min-width: 76px; }
  .guidelines { grid-template-columns: 1fr; gap: 11px; }
  .guidelines li { display: grid; grid-template-columns: 28px 1fr; }
  .guidelines li>span { margin-bottom: 0; }
  .room-guidance { padding: 17px; }
  .moderation-panel { padding: 16px; }
  .moderation-columns { grid-template-columns: 1fr; gap: 16px; }
  .account-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .account-button { width: 100%; min-height: 42px; font-size: 10px; }
  .account-badge { grid-column: 1 / -1; max-width: 100%; }
  .events-panel { padding: 14px; }
  .member-inline-events { padding: 13px; }
  .section-heading-row, .login-gate, .admin-login-gate { align-items: stretch; flex-direction: column; }
  .section-heading-row h2, .login-gate h2 { font-size: 18px; }
  .member-filters, .form-grid { grid-template-columns: 1fr; }
  .member-filters>button, .form-field-wide { grid-column: 1; }
  .admin-subheading { align-items: flex-start; flex-direction: column; }
  .event-card-head { grid-template-columns: minmax(0, 1fr); }
  .event-card-details>div { grid-template-columns: 72px minmax(0,1fr); }
  .admin-member-list .member-card { align-items: flex-start; flex-direction: column; }
  .dialog-content, .dialog-form { padding: 16px; }
  .account-dialog { max-height: calc(100dvh - 16px); }
  #account-dialog .dialog-content { max-height: calc(100dvh - 16px); padding: 20px 18px; }
  #account-dialog .dialog-heading h2 { font-size: 27px; }
  #account-dialog .account-tabs button { flex: 1 1 0; padding-right: 8px; padding-left: 8px; }
  .owner-admin-provision { padding: 13px; }
  .owner-admin-form { grid-template-columns: 1fr; padding: 11px; }
  .event-detail-list>div { grid-template-columns: 92px 1fr; }
  .event-card-actions button { min-height: 42px; }
  .event-map { height: 250px; }
  .permission-checkboxes { grid-template-columns: 1fr; }
  .moderation-head h2 { font-size: 20px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; width: calc(100% - 28px); min-height: 66px; gap: 5px; }
  .report-dialog form { padding: 17px; }
}
@media (max-width: 380px) {
  .page-heading h1 { font-size: 29px; }
  .chat-card-head { gap: 8px; }
  .connection-status { max-width: 96px; }
  .connection-status span:last-child { max-width: 74px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Focused full-viewport workspace: the conversation owns the main pane; navigation and tools live in a compact side rail. */
html, body { width: 100%; height: 100%; overflow: hidden; }
body::before { inset: 0; }
.site-footer { display: none; }
.page-shell { width: 100%; height: 100dvh; max-width: none; margin: 0; padding: 12px; overflow: hidden; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 25vw); align-items: stretch; gap: 12px; width: 100%; height: 100%; min-height: 0; }
.room-guidance { grid-column: 2; grid-row: 1; min-height: 0; max-height: 100%; overflow: auto; overscroll-behavior: contain; padding: 14px; border-radius: 16px; }
.chat-card { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-height: 0; border-radius: 16px; }
.chat-room { min-height: 0; }
.message-list { max-height: none; min-height: 0; }
.member-inline-events { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.member-inline-events>.section-heading-row { display: none; }
.member-inline-events .event-grid { grid-template-columns: 1fr; }
.room-guidance .site-header { position: static; z-index: auto; margin: -14px -14px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.room-guidance .header-row { display: flex; flex-direction: column; align-items: stretch; gap: 11px; width: 100%; min-height: 0; margin: 0; padding: 15px; }
.room-guidance .brand { gap: 9px; white-space: normal; }
.room-guidance .brand img { width: 44px; height: 44px; }
.room-guidance .brand strong { font-size: 15px; white-space: normal; }
.room-guidance .brand small { font-size: 8px; }
.room-guidance .main-nav { display: grid; grid-template-columns: 1fr; justify-content: stretch; gap: 1px; width: 100%; max-height: 28dvh; overflow: auto; white-space: normal; scrollbar-width: thin; }
.room-guidance .main-nav a { min-height: 35px; padding: 6px 8px; border-radius: 7px; font-size: 11px; white-space: normal; }
.room-guidance .main-nav a[aria-current="page"] { background: var(--blue-50); }
.room-guidance .main-nav a[aria-current="page"]::after { right: auto; bottom: 7px; left: 0; width: 3px; height: calc(100% - 14px); }
.room-guidance .account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.room-guidance .account-button { min-height: 37px; padding: 7px 9px; font-size: 10px; }
.room-guidance .account-badge { max-width: 100%; }
.room-guidance .page-heading { display: block; margin: 0 0 12px; padding: 0 2px; }
.room-guidance .page-heading .eyebrow { margin-bottom: 5px; font-size: 8px; }
.room-guidance .page-heading h1 { font-size: clamp(21px, 2vw, 27px); line-height: 1.15; }
.room-guidance .page-lead { margin-top: 6px; font-size: 11px; line-height: 1.45; }
.room-guidance .room-status-chip { margin-top: 8px; padding: 5px 9px; font-size: 9px; }
.guidance-heading { margin-bottom: 10px; }
.guidance-heading h2 { font-size: 16px; }
.guidelines { gap: 8px; }
.guidelines li { grid-template-columns: 24px 1fr; gap: 7px; }
.guidelines li>span { width: 23px; height: 23px; font-size: 8px; }
.guidelines p { font-size: 10px; line-height: 1.45; }
.capacity-note { margin-top: 10px; padding: 8px 10px; font-size: 9px; }
.side-events-wrap { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.side-section-heading { margin-bottom: 8px; }
.side-section-heading .eyebrow { margin-bottom: 2px; font-size: 8px; }
.side-section-heading h2 { margin: 0; color: var(--blue-950); font-size: 14px; }
.side-admin-shortcuts { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.admin-shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.admin-shortcut-grid button { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 61px; padding: 6px 4px; border: 1px solid #dbe4f0; border-radius: 10px; color: var(--blue-900); background: #fff; }
.admin-shortcut-grid button:hover { border-color: #9fb7d8; background: var(--blue-50); }
.admin-shortcut-grid button>span { font-size: 21px; line-height: 1; }
.admin-shortcut-grid small { font-size: 8px; font-weight: 750; line-height: 1.25; text-align: center; }
.chat-head-actions { display: flex; align-items: center; gap: 10px; }
.side-panel-toggle { display: none; min-height: 38px; padding: 7px 10px; border: 1px solid #cfdbeb; border-radius: 9px; color: var(--blue-900); background: white; font-size: 10px; font-weight: 750; }
.moderation-dialog, .event-create-dialog, .event-roster-dialog, .roster-dialog { width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 28px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(9,27,55,.28); }
.moderation-dialog::backdrop, .event-create-dialog::backdrop { background: rgba(13,32,59,.58); }
.moderation-panel { min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.moderation-head { position: sticky; z-index: 2; top: 0; padding: 18px 22px 12px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.moderation-panel> :not(.moderation-head) { margin-right: 22px; margin-left: 22px; }
.moderation-head h2 { margin-bottom: 4px; }
.moderation-head p:last-child { margin: 0; }
.admin-tabs { position: sticky; z-index: 1; top: 102px; background: #fff; }
.dialog-content, .dialog-form { min-width: 0; }
.event-create-form { grid-template-columns: repeat(2, minmax(0,1fr)); margin: 15px 0 22px; }
.event-create-form[hidden] { display: none !important; }
.event-create-dialog .dialog-form { padding: 19px; }
.form-config-fields { display: grid; gap: 10px; }
.form-config-row { display: grid; gap: 9px; padding: 12px; border: 1px solid #dde5ef; border-radius: 11px; background: #f9fbfd; }
.form-config-row>label, .form-config-settings>label { display: grid; gap: 5px; color: #40516b; font-size: 11px; font-weight: 750; }
.form-config-row input:not([type="checkbox"]), .form-config-row select, .form-config-row textarea { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #d3deeb; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-size: 12px; }
.form-config-row textarea { resize: vertical; }
.form-config-row-head, .form-config-row-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.form-config-row-head strong { color: var(--blue-950); font-size: 12px; }
.form-config-row-actions .quiet-button { min-height: 32px; padding: 4px 8px; }
.form-config-settings { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.form-config-required { display: inline-flex !important; align-items: center; min-height: 39px; }
.form-config-required input { width: 17px; height: 17px; accent-color: var(--blue-900); }
.form-config-actions { display: flex; justify-content: flex-start; }
.dynamic-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.dynamic-choice-option { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border: 1px solid #dce4ee; border-radius: 8px; background: white; }
.dynamic-choice-option input { width: 17px; height: 17px; min-height: 17px; accent-color: var(--blue-900); }
.historic-answer-list { display: grid; grid-template-columns: minmax(120px,.5fr) 1fr; gap: 5px 12px; margin: 8px 0 0; }
.historic-answer-list dt { color: #607089; font-size: 10px; }
.historic-answer-list dd { margin: 0; color: #344560; font-size: 10px; overflow-wrap: anywhere; }
.side-panel-toggle:focus-visible, .admin-shortcut-grid button:focus-visible { outline: 3px solid #e1a80b; outline-offset: 2px; }

@media (max-width: 800px) {
  html, body { overflow: hidden; }
  .page-shell { width: 100%; height: 100dvh; padding: 7px; }
  .room-layout { display: block; position: relative; height: 100%; }
  .chat-card { width: 100%; height: 100%; min-height: 0; }
  .chat-head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .side-panel-toggle { display: inline-flex; align-items: center; }
  .room-guidance { position: fixed; z-index: 15; top: 7px; right: 7px; bottom: 7px; width: min(380px, calc(100vw - 14px)); max-height: none; border-radius: 16px; box-shadow: 0 20px 70px rgba(12,31,58,.3); transition: transform .22s ease, visibility .22s ease; }
  .room-layout:not([data-side-open="true"]) .room-guidance { visibility: hidden; transform: translateX(calc(100% + 16px)); }
  .room-layout[data-side-open="true"] .room-guidance { visibility: visible; transform: translateX(0); }
  .room-guidance .site-header { margin: -14px -14px 12px; }
  .room-guidance .header-row { width: 100%; padding: 13px; }
  .room-guidance .main-nav { max-height: 27dvh; }
  .chat-card { border-radius: 13px; }
  .chat-card-head { align-items: center; }
  .connection-status { max-width: none; }
  .message-list { min-height: 0; max-height: none; }
  .member-inline-events .event-grid { grid-template-columns: 1fr; }
  .event-create-form { grid-template-columns: 1fr; }
  .moderation-dialog, .event-create-dialog, .event-roster-dialog, .roster-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); border-radius: 13px; }
  .moderation-head { top: 0; padding: 13px; }
  .admin-tabs { top: 93px; overflow-x: auto; }
  .moderation-panel> :not(.moderation-head) { margin-right: 13px; margin-left: 13px; }
  .dynamic-choice-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page-shell { padding: 5px; }
  .room-guidance { top: 5px; right: 5px; bottom: 5px; width: calc(100vw - 10px); }
  .chat-card-head { padding: 10px; }
  .room-heading h2 { font-size: 14px; }
  .connection-status { font-size: 9px; }
  .side-panel-toggle { min-height: 34px; padding: 6px 8px; font-size: 9px; }
  .message-list { padding: 10px; }
  .message-form { padding: 9px; padding-bottom: calc(9px + env(safe-area-inset-bottom)); }
  .admin-tabs { top: 89px; }
  .moderation-head { gap: 8px; }
  .moderation-head h2 { font-size: 18px; }
  .form-config-row { padding: 9px; }
}

/* Room refresh: keep the shared portal frame compact and give the conversation priority. */
.room-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); }
.room-guidance { gap: 0; }
.room-guidance .site-header { margin-bottom: 10px; }
.room-guidance .header-row { gap: 8px; padding: 12px; }
.room-guidance .main-nav { display: none !important; }
.room-guidance .brand img { width: 40px; height: 40px; }
.room-guidance .brand strong { font-size: 14px; }
.room-guidance .brand small { font-size: 8px; }
.room-guidance .account-actions { align-items: center; }
.room-guidance .account-badge { flex: 1 1 100%; max-width: none; }
.room-guidance .page-heading { margin-bottom: 9px; }
.room-guidance .page-heading .eyebrow { display: none; }
.room-guidance .page-heading h1 { font-size: 22px; }
.room-guidance .page-lead { display: none; }
.room-guidance .room-status-chip { display: inline-flex; margin: 0 0 6px 2px; }
.side-events-wrap { margin-top: 4px; }
.admin-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chat-card-head { min-height: 64px; }
.message-list { padding: 14px 18px; }
.message-item,
.message-item.mine { display: flex; align-items: flex-start; gap: 7px; width: fit-content; max-width: min(80%, 760px); margin: 0 0 9px; }
.message-item.mine { flex-direction: row-reverse; margin-left: auto; }
.message-avatar { flex: 0 0 26px; width: 26px; height: 26px; margin-top: 2px; font-size: 10px; }
.message-bubble { flex: 0 1 auto; width: fit-content; max-width: calc(100% - 33px); padding: 7px 10px; }
.message-meta { gap: 6px; margin-bottom: 3px; }
.message-meta strong { font-size: 10px; }
.message-meta time { font-size: 9px; }
.message-body { font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.message-item.mine .message-bubble { border-color: #c6daf2; background: #eaf3ff; }
.message-actions { margin-top: 1px; }
.message-actions button { min-height: 30px; }
#message-error { min-height: 18px; }
.dialog-back-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 42px; padding: 8px 12px; border: 1px solid #cbd9eb; border-radius: 9px; color: var(--blue-900); background: #fff; font-size: 13px; font-weight: 750; line-height: 1.2; text-decoration: none; cursor: pointer; }
.dialog-back-button:hover { border-color: #87a4ce; background: #f5f8fd; }
.dialog-back-button:focus-visible { outline: 3px solid #e1a80b; outline-offset: 2px; }
.panel-back-button { display: none; }
.dialog-heading .dialog-back-button { margin-left: auto; }
.moderation-head .dialog-back-button { min-width: 118px; }
.site-header .header-row { min-width: 0; }

@media (max-width: 800px) {
  .room-layout { grid-template-columns: 1fr; }
  .room-guidance .main-nav { display: none !important; }
  .room-guidance .header-row { gap: 7px; padding: 10px; }
  .room-guidance .brand strong { font-size: 13px; }
  .room-guidance .account-actions { justify-content: flex-start; padding: 0; }
  .room-guidance .account-button { min-height: 38px; font-size: 12px; }
  .room-guidance .account-badge { font-size: 12px; }
  .room-guidance .page-heading h1 { font-size: 21px; }
  .message-item, .message-item.mine { max-width: min(82%, 680px); }
  .panel-back-button { display: inline-flex; min-height: 42px; margin: 8px 0; font-size: 14px; }
  .moderation-head { align-items: center; }
  .moderation-head .dialog-back-button { min-height: 44px; }
  .account-dialog, .report-dialog, .moderation-dialog, .event-create-dialog, .event-roster-dialog { max-height: calc(100dvh - 12px); overscroll-behavior: contain; }
  .dialog-content, .dialog-form { max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
  .moderation-dialog .moderation-panel { max-height: calc(100dvh - 12px); overflow: auto; overscroll-behavior: contain; }
}
@media (max-width: 560px) {
  .room-layout { height: 100%; }
  .room-guidance .brand img { width: 38px; height: 38px; }
  .room-guidance .brand strong { font-size: 12px; }
  .room-guidance .account-button { min-height: 42px; padding: 8px 10px; font-size: 12px; }
  .message-item, .message-item.mine { max-width: 84%; gap: 6px; }
  .message-avatar { flex-basis: 24px; width: 24px; height: 24px; }
  .message-bubble { max-width: calc(100% - 30px); padding: 7px 9px; }
  .message-body { font-size: 13px; }
  .dialog-back-button { min-height: 44px; padding: 8px 11px; font-size: 13px; }
  .dialog-heading { align-items: center; gap: 10px; }
  .dialog-heading h2 { overflow-wrap: anywhere; }
}

/* The side rail stays narrow even on a wide desktop viewport. Give its event
   headings one full-width row each instead of relying on a mobile breakpoint. */
.room-guidance,
.side-events-wrap,
#side-events,
.member-inline-events,
.event-grid { min-width: 0; max-width: 100%; }
#side-events .event-grid { grid-template-columns: minmax(0, 1fr); }
#side-events .event-card { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
#side-events .event-card-head { grid-template-columns: minmax(0, 1fr); }
#side-events .event-card-head h3 { width: 100%; }
#side-events .event-card-head .event-status { width: fit-content; }

@media (max-width: 560px) {
  .event-grid,
  .member-inline-events .event-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .event-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Accessible message context actions replace the permanently visible report button. */
.message-item:focus-visible { outline: 3px solid rgba(51,92,163,.42); outline-offset: 3px; border-radius: 14px; }
.message-context-menu { position: fixed; z-index: 4000; display: grid; gap: 3px; width: min(280px, calc(100vw - 16px)); max-height: min(72dvh, 440px); overflow: auto; padding: 7px; border: 1px solid #d7e1ee; border-radius: 12px; background: #fff; box-shadow: 0 16px 44px rgba(12,34,67,.2); overscroll-behavior: contain; }
.message-menu-item { min-height: 44px; padding: 9px 12px; border: 0; border-radius: 8px; color: #263d61; background: #fff; font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.message-menu-item:hover, .message-menu-item:focus-visible { outline: none; color: var(--blue-950); background: #edf3fc; }
.message-menu-item[data-message-action="delete"] { color: #982f2a; }
.message-menu-item[data-message-action="delete"]:hover, .message-menu-item[data-message-action="delete"]:focus-visible { background: #fff0ed; }
.message-menu-note { padding: 7px 10px 2px; color: #748197; font-size: 12px; line-height: 1.45; }
.form-config-signup { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid #dce5f1; border-radius: 10px; color: #30445f; background: #f7faff; cursor: pointer; }
.form-config-signup input { width: 20px; height: 20px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--blue-900); }
.form-config-signup span { display: grid; gap: 4px; }
.form-config-signup strong { font-size: 14px; }
.form-config-signup small { color: #6e7c91; font-size: 12px; line-height: 1.45; }
.role-group-list { display: grid; gap: 12px; }
.role-group-card { display: grid; gap: 12px; padding: 14px; border: 1px solid #dfe7f1; border-radius: 12px; background: #fff; }
.role-group-heading h4 { margin: 0 0 4px; color: var(--blue-950); font-size: 16px; }
.role-group-heading p { margin: 0; color: #6d7a90; font-size: 12px; line-height: 1.5; }
.role-group-card .permission-checkboxes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.account-role-control { display: flex; align-items: center; gap: 10px; color: #52627a; font-size: 12px; font-weight: 700; }
.account-role-control select { min-width: 150px; min-height: 40px; padding: 7px 10px; border: 1px solid #d4deeb; border-radius: 8px; color: #26374f; background: #fff; font: inherit; }
@media (max-width: 560px) {
  .message-context-menu { font-size: 16px; }
  .message-menu-item { min-height: 48px; font-size: 16px; }
  .role-group-card .permission-checkboxes { grid-template-columns: minmax(0,1fr); }
  .account-role-control { align-items: stretch; flex-direction: column; }
  .account-role-control select { width: 100%; }
}

/* Approved room theme: preserve the existing layout and interaction model. */
:root {
  --blue-950: #0F2747;
  --blue-900: #1E40AF;
  --blue-800: #2563EB;
  --blue-700: #2563EB;
  --blue-100: #EEF2FF;
  --blue-50: #F3F8FF;
  --ink: #0F2747;
  --muted: #475569;
  --line: #CFE0F5;
  --surface: #FFFFFF;
  --canvas: #EAF4FF;
  --yellow: #F4CE4E;
  --green: #047857;
  --shadow: 0 16px 44px rgba(23, 65, 120, .10);
  font-family: "Be Vietnam Pro", "Noto Sans", "Segoe UI", Arial, sans-serif;
}
body { color: var(--ink); background: var(--canvas); font-family: "Be Vietnam Pro", "Noto Sans", "Segoe UI", Arial, sans-serif; }
body::before {
  background:
    radial-gradient(circle at 86% 10%, rgba(255,255,255,.66), transparent 28%),
    linear-gradient(112deg, rgba(234,244,255,.88), rgba(232,246,236,.90)),
    url("assets/room-youth-infographic.webp") 24% center / cover no-repeat;
}
.site-header { background: #F4F9FF; border-color: var(--line); }
.chat-card-head { color: #fff; border-color: #104BA8; background: #155AC4; }
.room-mark { width: 48px; height: 48px; padding: 0; overflow: visible; border-radius: 0; background: transparent; }
.room-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.room-overline { color: #E7F0FF; }
.room-heading h2 { color: #fff; }
.chat-head-actions, .connection-status { color: #F8FBFF; }
.status-dot { border: 1px solid rgba(255,255,255,.72); }
.side-panel-toggle { color: #fff; border-color: #89B5F3; background: #124DA9; }
.room-guidance { border-color: #CDE3D4; background: rgba(240,250,242,.96); }
.room-guidance .site-header { background: transparent; border-color: #CDE3D4; }
.room-guidance .brand strong { color: #173761; }
.room-guidance .brand small { color: #2563EB; }
.room-guidance .account-actions { padding: 10px; border: 1px solid #D8DEFF; border-radius: 14px; background: #EEF2FF; }
.room-guidance .account-badge { color: #302E71; }
.room-guidance .account-button { min-height: 42px; color: #3730A3; border-color: #C8CEF3; background: #fff; }
.room-guidance .account-primary { color: #fff; border-color: #4338CA; background: #4338CA; }
.room-guidance .page-heading h1 { color: #0F2747; }
.room-guidance .page-lead { color: #475569; }
.room-guidance .room-status-chip { color: #17623D; border-color: #B7E6CD; background: #F3FFF7; }
.side-events-wrap { padding: 12px; border: 1px solid #EBD9A7; border-radius: 16px; background: #FFF8E1; }
.side-events-wrap .side-section-heading h2 { color: #62490D; }
.side-events-wrap .side-section-heading .eyebrow { color: #8C5B08; }
#side-events .member-inline-events { background: transparent; }
#side-events .event-card { border-color: #EBD9A7; background: rgba(255,255,255,.96); box-shadow: 0 5px 14px rgba(137,99,19,.06); }
#side-events .event-card h3 { color: #283C59; font-family: "Be Vietnam Pro", "Noto Sans", sans-serif; }
#side-events .event-status { color: #7C4B00; background: #FFF0C2; }
#side-events .event-status.status-closed { color: #6B5361; background: #F2EDF0; }
#side-events .event-status.status-cancelled { color: #8A2927; background: #FFF0ED; }
#side-events .event-code { color: #64758A; }
#side-events .event-card-details { border-color: #F0E6C9; }
#side-events .event-card-details dt { color: #806B3C; }
#side-events .event-card-details dd { color: #3C4554; }
#side-events .event-card-content { color: #59697E; }
#side-events .event-map-link { color: #345FA2; }
#side-events .event-card-actions { border-color: #F0E6C9; }
#side-admin-shortcuts { border-color: #DDD6FE; border-radius: 15px; background: #F3F0FF; }
#side-admin-shortcuts .side-section-heading h2 { color: #4338CA; }
#side-admin-shortcuts .admin-shortcut-grid button { color: #4338CA; border-color: #D8D1FF; background: #fff; }
.chat-card { border-color: #CFE0F5; background: #fff; }
.joined-bar { color: #485C78; border-color: #DCE9F8; background: #EEF5FF; }
.history-tools { color: #61738D; }
.message-list { background: #F0FAF2; }
.message-item:not(.mine) .message-bubble { border-color: #D5E5D9; background: #fff; }
.message-item.mine .message-bubble { border-color: #BFD6FA; background: #DBEAFE; }
.message-body { color: #0F2747; font-family: "Noto Sans", "Be Vietnam Pro", sans-serif; font-size: 14px; line-height: 1.55; }
.message-meta strong { color: #203B65; }
.message-form { border-color: #CFE0F5; background: #fff; }
.message-form textarea { color: #0F2747; border-color: #CFE0F5; background: #F8FBFF; font-family: "Noto Sans", "Be Vietnam Pro", sans-serif; }
.primary-button, .send-button { color: #fff; border-color: #2563EB; background: #2563EB; }
.primary-button:hover, .send-button:hover { background: #1E40AF; }
.quiet-button, .dialog-back-button { color: #1E40AF; border-color: #CFE0F5; background: #F7FAFF; }
.event-status.status-open { color: #7C4B00; background: #FFF0C2; }
.event-dialog, .event-create-dialog, .event-roster-dialog, .roster-dialog { border-color: #CFE0F5; }
.event-dialog { background: #F0FAF2; }
.event-dialog-head { border-bottom: 1px solid #104BA8; background: #155AC4; }
.event-dialog .event-card { border-color: #EBD9A7; background: #FFF8E1; }
.event-dialog .event-card-details { border-color: #EBD9A7; }
.mobile-event-summary { display: none; }
.mobile-event-summary-list { display: grid; min-width: 0; }
.mobile-event-summary-card { display: grid; justify-items: start; gap: 5px; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #EBD9A7; border-radius: 12px; color: var(--ink); background: #FFF8E1; text-align: left; }
.mobile-event-summary-card:hover { border-color: #D8B85F; background: #FFF3CD; }
.mobile-event-summary-status { max-width: 100%; padding: 3px 8px; border-radius: 999px; color: #7C4B00; background: #FFF0C2; font-size: 10px; font-weight: 800; line-height: 1.4; }
.mobile-event-summary-status.status-closed { color: #6B5361; background: #F2EDF0; }
.mobile-event-summary-status.status-cancelled { color: #8A2927; background: #FFF0ED; }
.mobile-event-summary-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #283C59; font-size: 14px; font-weight: 800; line-height: 1.38; overflow-wrap: anywhere; }
.mobile-event-summary-meta { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; color: #64758A; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.mobile-event-summary-more { color: #1E40AF; font-size: 11px; font-weight: 800; }
.mobile-event-summary-empty { flex: 0 0 min(88%, 380px); margin: 0; padding: 9px 12px; border: 1px dashed #D8B85F; border-radius: 11px; color: #70571A; background: #FFF8E1; font-size: 12px; }
.mobile-event-summary-card:focus-visible { outline: 3px solid #D79B06; outline-offset: 2px; }
button:disabled { cursor: not-allowed; }

@media (max-width: 800px) {
  .mobile-event-summary:not([hidden]) { display: block; flex: 0 0 auto; padding: 8px 10px; border-bottom: 1px solid #DCE9F8; background: #F3F8FF; }
  .mobile-event-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #7C4B00; font-size: 9px; font-weight: 850; letter-spacing: .09em; }
  .mobile-event-summary-heading span:last-child { color: #64758A; font-size: 9px; font-weight: 600; letter-spacing: 0; text-align: right; }
  .mobile-event-summary-list { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 1px 1px 5px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .mobile-event-summary-card, .mobile-event-summary-empty { flex: 0 0 min(88%, 380px); scroll-snap-align: start; }
  .joined-bar { display: none; }
  .history-tools { min-height: 36px; padding: 2px 10px; }
  .history-tools>span { display: none; }
  .load-older { min-height: 38px; font-size: 11px; }
  .side-events-wrap>.side-section-heading { display: none; }
  #side-events .member-inline-events>.section-heading-row,
  #side-events .member-inline-events>.event-grid { display: none !important; }
}
@media (max-width: 560px) {
  .room-mark { width: 39px; height: 39px; padding: 0; border-radius: 0; background: transparent; }
  .chat-card-head { min-height: 66px; padding: 9px 10px; }
  .room-heading { gap: 8px; }
  .room-overline { color: #E7F0FF; }
  .room-heading h2 { color: #fff; }
  .mobile-event-summary:not([hidden]) { padding: 7px 8px; }
  .mobile-event-summary-heading { margin-bottom: 5px; font-size: 8px; }
  .mobile-event-summary-card, .mobile-event-summary-empty { flex-basis: min(90%, 340px); padding: 8px 10px; }
  .mobile-event-summary-title { font-size: 13px; }
  .message-list { background: #F0FAF2; }
  .message-body { font-size: 15px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-event-summary-list { scroll-behavior: auto; }
}

/* Account and member management: compact rows with the secondary actions in a dialog. */
.admin-member-list .member-list-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 11px 12px;
  border-color: #d8e3f0;
  background: #fff;
}
.member-list-copy { min-width: 0; flex: 1 1 auto; }
.member-list-copy strong { display: block; color: #183254; overflow-wrap: anywhere; }
.member-list-copy p { margin: 3px 0 6px; color: #61738b; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.account-state-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border-radius: 999px; color: #76531c; background: #fff3d5; font-size: 11px; font-weight: 800; }
.account-state-chip::before { content: "•"; margin-right: 5px; }
.account-state-chip.is-active { color: #17623d; background: #e6f8ed; }
.member-settings-button {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cbd9ea;
  border-radius: 12px;
  color: #234b87;
  background: #f4f8ff;
  font-size: 20px;
  cursor: pointer;
}
.member-settings-button:hover { border-color: #8fb0df; background: #eaf2ff; }
.member-settings-button:focus-visible { outline: 3px solid #f4ca4e; outline-offset: 2px; }
.danger-button { min-height: 44px; padding: 9px 12px; border: 1px solid #efc0c2; border-radius: 10px; color: #9f1d24; background: #fff2f2; font: inherit; font-weight: 800; cursor: pointer; }
.danger-button:hover { border-color: #db9197; background: #ffe6e7; }
.danger-button:focus-visible { outline: 3px solid #f4ca4e; outline-offset: 2px; }
.member-load-more { width: 100%; min-height: 44px; margin-top: 10px; }
.password-input-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.password-input-row input { flex: 1 1 auto; min-width: 0; }
.password-visibility-toggle { flex: 0 0 auto; min-width: 64px; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd8e8; border-radius: 10px; color: #284d88; background: #f5f9ff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.password-visibility-toggle:focus-visible { outline: 3px solid #ffd633; outline-offset: 2px; }
.member-event-history { display: grid; gap: 8px; min-width: 0; margin-top: 16px; padding-top: 14px; border-top: 1px solid #dbe5f1; }
.member-event-history .admin-subheading { margin: 0; }
.member-event-history-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; overscroll-behavior: contain; }
.member-history-row { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid #d6e4f4; border-radius: 12px; background: #f7faff; }
.member-history-row strong { color: #17365f; overflow-wrap: anywhere; }
.member-history-row p { margin: 0; color: #62748b; font-size: 12px; line-height: 1.45; }
.admin-account-row { border-color: #ded7fa !important; background: #fcfbff !important; }
.admin-account-section { min-width: 0; margin-top: 18px; }
.member-promotion-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.member-promotion-row label { color: #344761; font-weight: 750; }
.member-promotion-row select { min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd8e8; border-radius: 10px; background: #fff; font: inherit; }
.admin-account-edit-dialog .dialog-content { max-height: min(88dvh, 760px); overflow: auto; }
.change-password-dialog .dialog-content { max-width: 560px; }
.member-utility-actions { display: contents; }
.member-profile-dialog, .member-history-dialog { width: min(700px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
.member-profile-dialog .dialog-content, .member-history-dialog .dialog-content, .change-password-dialog .dialog-content { max-height: min(88dvh, 760px); overflow-y: auto; overscroll-behavior: contain; }
.member-profile-dialog .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.member-profile-dialog .dialog-heading h2, .member-history-dialog .dialog-heading h2, .change-password-dialog .dialog-heading h2 { margin-bottom: 0; font-size: 24px; line-height: 1.25; }
.member-profile-dialog .account-explainer, .member-history-dialog .account-explainer { font-size: 14px; line-height: 1.55; }
.member-profile-dialog .form-field label, .change-password-dialog .form-field label { font-size: 14px; line-height: 1.4; }
.member-profile-dialog .form-field input, .member-profile-dialog .form-field select, .change-password-dialog .form-field input { min-height: 46px; font-size: 16px; }
.member-profile-dialog .field-error, .member-profile-dialog .form-feedback, .change-password-dialog .field-error, .change-password-dialog .form-feedback { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.member-profile-dialog .dialog-actions .primary-button, .change-password-dialog .dialog-actions .primary-button { min-height: 48px; font-size: 15px; }
.member-history-dialog .attendance-history-list { padding: 1px 3px 1px 1px; }
.member-history-dialog .attendance-history-list .empty-chat { margin: 28px auto; font-size: 14px; }
.member-history-dialog .event-map-link { font-size: 13px; }
@media (max-width: 560px) {
  .admin-member-list .member-list-row { align-items: center; flex-direction: row; }
  .member-promotion-row { grid-template-columns: minmax(0, 1fr); }
  .member-promotion-row > * { width: 100%; box-sizing: border-box; }
  .member-profile-dialog .form-grid { grid-template-columns: minmax(0, 1fr); }
  .member-profile-dialog, .member-history-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 14px); }
  .member-profile-dialog .dialog-content, .member-history-dialog .dialog-content, .change-password-dialog .dialog-content { max-height: calc(100dvh - 14px); padding: 16px; }
  .member-profile-dialog .dialog-heading h2, .member-history-dialog .dialog-heading h2, .change-password-dialog .dialog-heading h2 { font-size: 21px; }
  .history-dialog-tools { align-items: flex-start; }
}
