:root {
  --ink: #102a2b;
  --muted: #667879;
  --paper: #f5f3ed;
  --surface: #fffdf8;
  --line: #d9dfda;
  --green: #0f6658;
  --green-deep: #0a4a41;
  --lime: #c8e168;
  --amber: #f2b64b;
  --red: #a7443d;
  --shadow: 0 24px 70px rgba(16, 42, 43, .13);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.2rem, 6vw, 5.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
p { line-height: 1.62; }
.lead { max-width: 700px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.lead.compact { font-size: 1rem; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 750; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(200,225,104,.8); outline-offset: 2px; }
.button.primary { color: white; background: var(--green); }
.button.primary:hover { background: var(--green-deep); }
.button.secondary { color: var(--green-deep); background: #e6eee8; border-color: #cad9d0; }
.button.ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.button.danger { color: #7d2d28; background: #f7e8e5; border-color: #e8c5c0; }
.button.small { min-height: 38px; padding: 0 14px; font-size: .86rem; }
.button.full { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

input, textarea, select { width: 100%; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; }
input, select { min-height: 46px; padding: 0 13px; }
textarea { padding: 13px 16px; resize: none; }
.form-error { min-height: 1.4em; margin: 8px 0 0; color: var(--red); font-weight: 650; }
.field-hint { min-height: 1.2em; margin: 8px 0 0; color: var(--muted); font-size: .84rem; }

.home-page { background: radial-gradient(circle at 80% 14%, rgba(200,225,104,.33), transparent 28%), linear-gradient(145deg, #f7f5ef 0%, #e8efea 100%); }
.home-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: linear-gradient(rgba(15,102,88,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(15,102,88,.07) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
.home-shell { position: relative; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: clamp(48px, 9vh, 110px) 0 54px; }
.hero-card { position: relative; overflow: hidden; padding: clamp(28px, 7vw, 76px); background: rgba(255,253,248,.88); border: 1px solid rgba(255,255,255,.9); border-radius: 32px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.hero-card::after { content: "PUBLIC"; position: absolute; right: -16px; bottom: -30px; color: rgba(15,102,88,.055); font-size: clamp(5rem, 17vw, 12rem); font-weight: 950; letter-spacing: -.08em; pointer-events: none; }
.brand-mark, .compact-brand { display: grid; place-items: center; color: white; background: var(--green); font-weight: 900; letter-spacing: -.08em; }
.brand-mark { width: 62px; height: 62px; margin-bottom: 38px; border-radius: 19px 7px 19px 7px; font-size: 1.4rem; box-shadow: 0 10px 28px rgba(15,102,88,.27); }
.brand-mark.dark { background: var(--ink); }
.compact-brand { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px 5px 13px 5px; text-decoration: none; }
.hero-card h1 { max-width: 900px; }
.room-builder { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; max-width: 810px; margin-top: 34px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 32px rgba(16,42,43,.08); }
.room-prefix { padding-left: 18px; color: var(--muted); font-weight: 700; }
.room-builder input { min-width: 0; padding: 0 6px; border: 0; border-radius: 0; font-weight: 800; }
.room-builder input:focus { outline: none; }
.hero-actions { margin-top: 14px; }
.terms-notice { max-width: 790px; margin: 18px auto 0; color: var(--muted); font-size: .78rem; }
.terms-notice summary { width: fit-content; margin: 0 auto; padding: 5px 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.terms-content { margin-top: 8px; padding: 14px 18px; background: rgba(255,253,248,.7); border: 1px solid rgba(102,120,121,.22); border-radius: 13px; }
.terms-content p { margin: 0 0 7px; }
.terms-content ul { margin: 0; padding-left: 20px; }
.terms-content li { margin: 5px 0; line-height: 1.45; }

.chat-page { overflow: hidden; background: #e8eeea; }
.chat-shell { display: grid; grid-template-rows: 70px minmax(0, 1fr); height: 100vh; height: 100dvh; min-height: 100vh; }
.chat-header { display: flex; align-items: center; gap: 18px; padding: 10px 22px; background: rgba(255,253,248,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.room-heading { min-width: 0; }
.room-heading .eyebrow { margin: 0; font-size: .62rem; }
.room-heading h1 { overflow: hidden; font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.alias-menu { position: relative; }
.alias-menu summary { list-style: none; }
.alias-menu summary::-webkit-details-marker { display: none; }
.alias-popover { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; width: min(320px, calc(100vw - 28px)); padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 45px rgba(16,42,43,.18); }
.alias-popover label { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 800; }
.alias-popover input { min-width: 0; min-height: 38px; }
.alias-popover .field-hint { margin-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.status-pill::before { content: ""; width: 8px; height: 8px; background: #9aa6a2; border-radius: 50%; }
.status-pill.online::before { background: #42a36e; box-shadow: 0 0 0 4px rgba(66,163,110,.13); }
.status-pill.offline::before { background: #ca6e5e; }
.inline-form { display: flex; gap: 7px; }
.chat-main { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-width: 0; overflow: hidden; background: var(--surface); }
.load-older { justify-self: center; margin: 12px 0 0; padding: 7px 14px; color: var(--green); background: transparent; border: 0; cursor: pointer; font-weight: 700; font-size: .82rem; }
.message-list { min-height: 0; margin: 0; padding: 20px clamp(18px, 4vw, 54px) 28px; overflow-y: auto; list-style: none; scroll-behavior: smooth; }
.message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; max-width: 860px; margin: 0 auto 18px; }
.message-avatar { display: grid; place-items: center; width: 40px; height: 40px; color: var(--green-deep); background: #dfece4; border-radius: 13px 5px 13px 5px; font-size: .78rem; font-weight: 900; text-transform: uppercase; }
.message-card { min-width: 0; padding: 13px 16px; background: #f0f1f6; border: 1px solid #d9dce8; border-radius: 5px 17px 17px 17px; }
.message.received .message-avatar { color: #3c4668; background: #e2e5f1; }
.message.owned { grid-template-columns: minmax(0, 1fr) 42px; }
.message.owned .message-avatar { grid-column: 2; grid-row: 1; color: #095044; background: #cae5d8; }
.message.owned .message-card { grid-column: 1; grid-row: 1; justify-self: end; width: min(100%, 720px); background: #dcefe6; border-color: #b7d8c8; border-radius: 17px 5px 17px 17px; }
.message.hidden .message-card { background: #f5f2ec; border-style: dashed; }
.message-meta { display: flex; align-items: baseline; gap: 9px; margin-bottom: 5px; }
.message-alias { font-size: .84rem; font-weight: 800; }
.message-time { color: var(--muted); font-size: .72rem; }
.message-text { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.48; }
.message.hidden .message-text { color: #7c817d; font-style: italic; }
.message-actions { display: flex; gap: 6px; margin-top: 8px; }
.message-action { padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: .73rem; font-weight: 700; }
.message-action:hover { color: var(--green); text-decoration: underline; }
.message-media { display: block; width: fit-content; max-width: min(520px, 100%); margin-top: 10px; overflow: hidden; background: #d6ddd8; border-radius: 12px; }
.message-media img { display: block; width: auto; max-width: 100%; max-height: 420px; object-fit: contain; }
.message-video { display: block; width: min(520px, 100%); max-height: 420px; margin-top: 10px; background: #111; border-radius: 12px; }
.attachment-card { display: flex; align-items: center; gap: 10px; max-width: 460px; margin-top: 10px; padding: 10px 12px; color: var(--ink); background: rgba(255,255,255,.72); border: 1px solid rgba(15,102,88,.2); border-radius: 11px; text-decoration: none; }
.attachment-card:hover { border-color: var(--green); }
.attachment-card.unavailable { color: var(--muted); background: #f1f1ed; border-style: dashed; }
.attachment-card.unavailable:hover { border-color: rgba(15,102,88,.2); }
.attachment-card.unavailable .attachment-icon { color: #6d7773; background: #dfe3df; }
.attachment-card > span:last-child { min-width: 0; }
.attachment-card strong, .attachment-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-card strong { font-size: .8rem; }
.attachment-card small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.attachment-icon { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; color: white; background: var(--green); border-radius: 9px; font-size: .66rem; font-weight: 900; }
.protected-attachment { max-width: 560px; margin-top: 10px; padding: 10px; background: rgba(255,255,255,.72); border: 1px solid rgba(15,102,88,.2); border-radius: 12px; }
.protected-attachment-summary { display: flex; align-items: center; gap: 10px; }
.protected-attachment-summary > span:nth-child(2) { min-width: 0; flex: 1; }
.protected-attachment-summary strong, .protected-attachment-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.protected-attachment-summary strong { font-size: .8rem; }
.protected-attachment-summary small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.protected-attachment-summary.expired > .attachment-card { width: 100%; max-width: none; margin: 0; border: 0; background: transparent; }
.protected-open { flex: 0 0 auto; }
.protected-attachment-viewer:empty { display: none; }
.protected-attachment-viewer .message-media, .protected-attachment-viewer .message-video, .protected-attachment-viewer .attachment-card { margin-top: 10px; }
.empty-state { place-self: center; align-self: center; padding: 30px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 1.2rem; }
.empty-state p { margin: 5px 0; }
.empty-symbol { display: grid; width: 58px; height: 58px; margin: 0 auto 14px; place-items: center; color: white; background: var(--green); border-radius: 20px 7px 20px 7px; font-size: 1.6rem; }
.composer { display: block; padding: 14px clamp(18px, 4vw, 54px); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); }
.composer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.composer textarea { max-height: 150px; background: #f7f8f4; }
.attachment-button { min-height: 48px; }
.attachment-selection { display: grid; gap: 8px; margin-bottom: 9px; padding: 10px 12px; background: #edf3ef; border: 1px solid #d5e1d9; border-radius: 10px; }
.attachment-selection[hidden] { display: none; }
.attachment-selection-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.attachment-selection span { min-width: 0; }
.attachment-selection strong, .attachment-selection small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-selection strong { font-size: .8rem; }
.attachment-selection small { color: var(--muted); font-size: .7rem; }
.attachment-policy { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr); gap: 8px; }
.attachment-policy label { display: grid; gap: 3px; color: var(--muted); font-size: .66rem; font-weight: 750; }
.attachment-policy [hidden] { display: none; }
.attachment-policy select, .attachment-policy input { min-height: 36px; padding: 0 10px; border-radius: 9px; font-size: .78rem; }
.attachment-policy-hint { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.send-button { align-self: end; min-height: 48px; }
.composer-status { min-height: 18px; margin: 0; padding: 0 clamp(18px, 4vw, 54px) 8px; color: var(--red); background: var(--surface); font-size: .8rem; }

.admin-login-page { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(200,225,104,.22), transparent 30%), var(--ink); }
.login-card { width: min(460px, 100%); padding: clamp(28px, 6vw, 48px); background: var(--surface); border-radius: 26px; box-shadow: 0 35px 90px rgba(0,0,0,.28); }
.login-card h1 { font-size: 2.4rem; }
.stack-form { display: grid; gap: 10px; margin-top: 28px; }
.stack-form label { margin-top: 6px; font-size: .85rem; font-weight: 750; }
.stack-form .button { margin-top: 12px; }

.admin-page { background: #eef1ed; }
.admin-topbar, .docs-topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px clamp(18px, 4vw, 52px); background: rgba(255,253,248,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-brand .eyebrow { margin: 0; font-size: .58rem; }
.admin-brand strong { display: block; }
.admin-nav { display: flex; gap: 9px; }
.admin-shell { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.stats-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.stat-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat-card span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.stat-card strong { display: block; margin-top: 10px; font-size: 2rem; }
.admin-section { margin-top: 28px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(16,42,43,.045); }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) 140px 150px auto; gap: 8px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .84rem; }
th { color: var(--muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
td code { font-size: .78rem; }
.cell-main { min-width: 220px; max-width: 560px; overflow-wrap: anywhere; white-space: pre-wrap; }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.badge.visible { color: #24633f; background: #dff0e5; }
.badge.hidden { color: #8b5620; background: #faecd6; }
.badge.open { color: #8b382f; background: #f8e1de; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 150px; }
.tiny-button { padding: 5px 8px; color: var(--green); background: #edf3ef; border: 1px solid #d5e1d9; border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 750; }
.tiny-button.danger { color: var(--red); background: #f9ebe9; border-color: #edcfca; }
.admin-attachments { display: grid; gap: 5px; margin-top: 9px; }
.admin-attachment { display: flex; gap: 6px; align-items: center; width: fit-content; max-width: 100%; font-size: .74rem; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; }
.pagination span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.selection-count { color: var(--muted); font-size: .8rem; font-weight: 750; }
.report-filter-bar { display: grid; grid-template-columns: 180px 170px auto; justify-content: start; gap: 8px; margin-bottom: 12px; }
.report-bulk-toolbar { display: grid; grid-template-columns: minmax(340px, auto) minmax(220px, 1fr) 150px auto; align-items: end; gap: 10px; margin-bottom: 16px; padding: 14px; background: #f1f5f1; border: 1px solid #d7e1d8; border-radius: 13px; }
.report-action-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 44px; }
.check-option { display: inline-flex; align-items: center; gap: 7px; color: #344a49; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.check-option input, .row-selector { flex: 0 0 auto; width: 16px; min-height: 16px; margin: 0; accent-color: var(--green); }
.hours-field { display: grid; gap: 4px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.hours-field input { min-height: 36px; }
.selection-cell { width: 34px; text-align: center; }
.report-table { min-width: 1020px; }
.report-table th:nth-child(2) { width: 18%; }
.report-table th:nth-child(3) { width: 38%; }
.report-reason { min-width: 190px; }
.report-message-copy { max-height: 8em; margin: 8px 0 0; overflow: auto; white-space: pre-wrap; }
.report-quick-actions { min-width: 220px; }
.message-state.hidden { color: #8b5620; font-weight: 750; }
.admin-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.data-list { display: grid; gap: 8px; }
.data-item { display: flex; justify-content: space-between; gap: 14px; padding: 12px; background: #f4f6f2; border-radius: 11px; }
.data-item strong { display: block; font-size: .86rem; }
.data-item p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.data-item-actions { display: flex; align-items: center; gap: 6px; }
.audit-list { display: grid; gap: 7px; }
.audit-item { display: grid; grid-template-columns: 170px 170px minmax(0,1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.audit-item time { color: var(--muted); }
.admin-status { position: fixed; right: 20px; bottom: 20px; min-height: 0; margin: 0; padding: 10px 14px; color: white; background: var(--ink); border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.admin-status.visible { opacity: 1; transform: none; }

.admin-room-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.admin-room-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-room-heading h1 { font-size: clamp(2rem, 4vw, 3.3rem); }
.admin-room-notice { margin: 0 0 18px; padding: 12px 14px; color: #374d49; background: #e6efe9; border: 1px solid #cfddd3; border-radius: 11px; font-size: .82rem; }
.admin-conversation { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.admin-conversation-message { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.admin-conversation-message.hidden { background: #fff6e7; border-color: #ead8b9; }
.admin-conversation-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--muted); font-size: .74rem; }
.admin-conversation-meta strong { color: var(--ink); font-size: .86rem; }
.admin-conversation-copy { margin: 8px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.5; }
.admin-conversation-attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; margin-top: 10px; }
.admin-conversation-attachment { display: grid; gap: 3px; padding: 10px 12px; color: var(--ink); background: #eef3ef; border: 1px solid #d5e1d9; border-radius: 10px; text-decoration: none; }
.admin-conversation-attachment strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-conversation-attachment small { color: var(--muted); font-size: .68rem; }
.admin-conversation-media { display: block; width: 100%; max-height: 430px; overflow: hidden; background: #18211f; border-radius: 11px; object-fit: contain; }
.admin-conversation-media img { display: block; width: 100%; max-height: 430px; object-fit: contain; }

.docs-page { background: #f1f2ed; }
.docs-topbar { justify-content: flex-start; }
.docs-topbar div { display: grid; }
.docs-topbar .eyebrow { margin: 0; font-size: .58rem; }
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 860px); justify-content: center; gap: 48px; width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 90px; }
.docs-nav { position: sticky; top: 100px; align-self: start; display: grid; gap: 4px; }
.docs-nav a { padding: 9px 12px; color: var(--muted); border-radius: 9px; font-size: .84rem; font-weight: 700; text-decoration: none; }
.docs-nav a:hover { color: var(--green); background: white; }
.docs-content { min-width: 0; }
.docs-content section { margin-bottom: 22px; padding: clamp(24px, 5vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 96px; }
.docs-content h1 { margin-bottom: 22px; font-size: clamp(2.2rem, 5vw, 4rem); }
.docs-content h2 { margin-bottom: 18px; }
.docs-content h3 { margin-top: 28px; font-size: 1.1rem; }
.docs-content p, .docs-content li { color: #485c5c; }
.docs-content li { margin-bottom: 8px; line-height: 1.5; }
.docs-content code { padding: .12em .35em; color: #174b45; background: #eaf0eb; border-radius: 5px; }
.docs-content pre { overflow-x: auto; padding: 18px; color: #e8f2ee; background: var(--ink); border-radius: 13px; line-height: 1.55; }
.docs-content pre code { padding: 0; color: inherit; background: transparent; }
.doc-callout { margin: 22px 0; padding: 16px 18px; color: #234d45; background: #e7f0e9; border-left: 4px solid var(--green); border-radius: 0 11px 11px 0; line-height: 1.55; }
.doc-callout.warning { color: #60491e; background: #fff3d8; border-color: var(--amber); }

@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid-two { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; overflow-x: auto; }
  .docs-nav a { flex: 0 0 auto; }
}

@media (max-width: 760px) {
  .room-builder { grid-template-columns: 1fr auto; border-radius: 18px; }
  .room-prefix { grid-column: 1 / -1; padding: 8px 10px 0; font-size: .78rem; }
  .room-builder input { padding-left: 10px; }
  .chat-page { overflow: hidden; }
  .chat-shell { grid-template-rows: auto minmax(0, 1fr); min-height: 100vh; }
  .chat-header { flex-wrap: wrap; padding: 10px 14px; }
  .header-actions { gap: 8px; }
  .status-pill { font-size: 0; }
  .status-pill::before { width: 10px; height: 10px; }
  .chat-main { grid-row: 2; min-height: 0; }
  .message-list { padding: 14px; }
  .composer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .composer-status { padding: 0 12px 6px; }
  .attachment-policy { grid-template-columns: 1fr; }
  .admin-topbar { align-items: flex-start; }
  .admin-nav { flex-direction: column; align-items: stretch; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .report-bulk-toolbar { grid-template-columns: 1fr 1fr; }
  .report-action-options { grid-column: 1 / -1; }
  .audit-item { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 520px) {
  .home-shell { width: min(100% - 20px, 1120px); padding-top: 18px; }
  .hero-card { padding: 26px 20px; border-radius: 24px; }
  .brand-mark { margin-bottom: 28px; }
  .room-builder { grid-template-columns: 1fr; }
  .room-prefix, .room-builder input, .room-builder .button { grid-column: 1; }
  .room-builder input { min-height: 42px; }
  .terms-notice { margin-top: 10px; }
  .header-actions .button { padding: 0 10px; }
  .message { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .message.owned { grid-template-columns: minmax(0, 1fr) 34px; }
  .message-avatar { width: 34px; height: 34px; }
  .composer-row { grid-template-columns: auto minmax(0, 1fr); }
  .composer-row .send-button { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { width: min(100% - 20px, 1500px); padding-top: 22px; }
  .admin-section { padding: 16px; }
  .filter-bar { grid-template-columns: 1fr; }
  .report-filter-bar, .report-bulk-toolbar { grid-template-columns: 1fr; }
  .report-action-options { grid-column: auto; align-items: flex-start; }
  .docs-layout { width: min(100% - 18px, 1240px); padding-top: 18px; }
  .docs-content section { padding: 22px 17px; }
  .admin-room-heading { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
