:root {
    color-scheme: light;
    --paper: #f5f6f2;
    --card: #fff;
    --ink: #192724;
    --muted: #5d6b65;
    --edge: #dce2da;
    --dark: #172b25;
    --lime: #d5f99a;
    --green: #356244;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { background: none; border: 0; }
a { color: inherit; text-decoration: none; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #65a06d; outline-offset: 3px; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(34px, 3.4vw, 54px); line-height: 1.08; font-weight: 650; letter-spacing: -.055em; }
h2 { font-size: 21px; line-height: 1.25; font-weight: 650; letter-spacing: -.04em; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #15241f; color: #e6ede5; padding: 34px 16px 22px; }
.brand-link { align-self: flex-start; margin: 0 8px 51px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 650; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.brand-mark { width: 33px; height: 33px; display: inline-flex; justify-content: center; align-items: center; gap: 2px; border-radius: 10px; background: var(--lime); color: #1a3527; }
.brand-mark i { width: 3px; height: 12px; border-radius: 2px; background: currentColor; transform: skewY(-24deg); }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-mark i:nth-child(3) { height: 15px; }
.brand-mark i:nth-child(4) { height: 8px; }
.nav { display: grid; gap: 5px; }
.nav-link, .logout button { display: flex; align-items: center; gap: 13px; border-radius: 9px; color: #bcc9c0; font-weight: 530; padding: 12px 14px; line-height: 22px; }
.nav-link:hover, .logout button:hover { color: #fff; background: #223730; }
.nav-link.active { color: var(--lime); background: #2b4034; }
.logout { margin-top: auto; border-top: 1px solid #34453c; padding-top: 17px; }
.logout button { width: 100%; }
.workspace { min-width: 0; }
.topbar { min-height: 76px; padding: 12px clamp(22px, 3.6vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfcf9; border-bottom: 1px solid var(--edge); }
.event-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 620; min-width: 0; }
.event-switch:hover { color: var(--green); }
.switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-switch .icon { color: var(--muted); width: 14px; height: 14px; }
.event-bullet { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #609269; box-shadow: 0 0 0 4px #e5eedf; margin: 4px; }
.entry-links, .dialog-actions, .message-actions { display: flex; align-items: center; gap: 9px; }
.button { min-height: 42px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 610; line-height: 1.2; border: 1px solid transparent; border-radius: 9px; white-space: nowrap; }
.button .icon { width: 17px; height: 17px; }
.button.soft { background: white; border-color: #d8dfd6; }
.button.soft:hover { background: #f2f5ef; border-color: #bdccbc; }
.button.ink { background: #21372a; color: white; }
.button.ink:hover { background: #35543b; }
.button.lime { background: var(--lime); color: #213622; }
.button.lime:hover { background: #e1ffb4; }
.content { max-width: 1480px; margin: 0 auto; padding: clamp(30px,3.8vw,64px) clamp(22px,3.6vw,64px) 55px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.page-heading p, .login-form > p { color: var(--muted); margin-top: 11px; font-size: 15px; line-height: 1.55; }
.panel { background: var(--card); border: 1px solid var(--edge); border-radius: 17px; min-width: 0; }
.panel-heading { display: flex; align-items: center; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--edge); }
.count { display: inline-grid; place-items: center; min-width: 24px; border-radius: 7px; background: #edf1eb; color: #526452; padding: 3px 7px; font-size: 12px; font-weight: 650; }
.events-layout, .wall-layout, .settings-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(265px, .85fr); align-items: start; gap: clamp(15px,2vw,28px); }
.event-list { overflow: hidden; }
.event-list form + form { border-top: 1px solid var(--edge); }
.event-row { width: 100%; display: flex; align-items: center; gap: 15px; padding: 21px 23px; text-align: left; }
.event-row:hover { background: #f7faf4; }
.event-tile, .stat-icon, .mode-icon, .login-glyph, .empty-icon { display: inline-grid; place-items: center; flex: none; border-radius: 12px; width: 44px; height: 44px; background: #e3efd4; color: #36573d; }
.event-tile .icon { height: 23px; width: 23px; }
.tone-1 { background: #e0e9ed; color: #426276; }
.tone-2 { background: #f2e4d4; color: #80552c; }
.tone-3 { background: #eae4f2; color: #6c5286; }
.event-details { display: grid; gap: 5px; min-width: 0; }
.event-details strong { font-size: 16px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.meta, .hint { color: var(--muted); font-size: 13px; line-height: 1.55; }
.meta > span { padding: 0 3px; color: #a6afa7; }
.current { margin-left: auto; color: var(--green); border-radius: 20px; padding: 4px 8px; font-size: 11px; font-weight: 650; background: #e8f1e2; }
.row-arrow { margin-left: auto; display: flex; color: #4c6650; }
.current + .row-arrow { margin-left: 0; }
.create-card, .mode-card, .login-art { background: #20362b; color: #f6fbef; }
.create-card { overflow: hidden; border-radius: 17px; }
.create-cover { height: 126px; background: radial-gradient(ellipse at 65% 50%, #3b5c3c, #233f31 68%); }
.sculpture { width: 100%; height: 100%; display: block; }
.create-card form { padding: 23px 24px 25px; }
.create-card h2 { margin-bottom: 18px; }
.create-card label { color: #d7e3d5; }
.create-card input { background: #f9fcf6; color: var(--ink); border-color: transparent; }
.create-card .button { margin-top: 14px; width: 100%; }
.live-status { display: inline-flex; align-items: center; gap: 7px; color: #41624b; background: #e6efdf; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 650; }
.live-status i { background: #558052; height: 7px; width: 7px; border-radius: 50%; }
.live-status.offline { background: #f8e4db; color: #833e29; }
.live-status.offline i { background: #af4d33; }
.queue-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 17px; }
.queue-filter { position: relative; background: white; border: 1px solid var(--edge); border-radius: 15px; padding: 17px 20px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; text-align: left; }
.queue-filter[aria-pressed="true"] { background: #ebf4df; border-color: #a9c590; }
.queue-filter:hover { border-color: #90ab8a; }
.queue-filter strong { grid-row: 1; grid-column: 1; font-size: 36px; line-height: 1.12; font-weight: 620; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.queue-filter > span:last-child { font-size: 13px; font-weight: 600; color: #536257; }
.queue-filter .stat-icon { width: 33px; height: 33px; border-radius: 10px; grid-column: 2; grid-row: 1 / 3; background: #f0f3ee; }
.queue-filter[aria-pressed="true"] .stat-icon { background: #d8eac4; }
.messages-panel { overflow: hidden; }
#message-list { max-height: min(65vh, 720px); overflow-y: auto; }
.message-row { padding: 14px 21px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.message-row + .message-row { border-top: 1px solid #e8ece6; }
.message-text { overflow-wrap: anywhere; line-height: 1.45; }
.button.approve { color: #2e5736; background: #edf4e7; border-color: #cbdcc2; font-size: 13px; min-height: 36px; padding: 6px 10px; }
.button.approve:hover { background: #ddeed2; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #647168; border-radius: 9px; }
.icon-button:hover { background: #eef2eb; }
.remove:hover, .clear-image:hover { background: #f7e9e5; color: #a13d2f; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 0; color: #4e6254; font-weight: 600; font-size: 13px; }
.text-button:hover { color: #1b3a25; text-decoration: underline; }
.text-button .icon { width: 16px; height: 16px; }
.clear-wall { margin: 10px 3px 0; }
.empty-list { padding: 41px 16px 46px; text-align: center; display: grid; justify-items: center; }
.empty-icon { margin-bottom: 13px; background: #eef3e9; }
.empty-list p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 5px; }
.wall-tools, .settings-aside { display: grid; gap: 16px; min-width: 0; }
.mode-card, .prompt-card, .preview-card, .reset-card { padding: 23px; }
.mode-card { border-radius: 17px; background: radial-gradient(ellipse at 100% 0%,#3f5c3b,transparent 70%), #233c2f; }
.mode-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mode-icon { background: #3c5840; color: var(--lime); width: 36px; height: 36px; border-radius: 11px; }
.mode-card p { margin-top: 7px; font-size: 14px; line-height: 1.55; color: #d2dfcf; }
.switch { width: 47px; height: 28px; border: 1px solid #829783; border-radius: 999px; background: #4c6251; padding: 3px; }
.switch > span { display: block; border-radius: 50%; width: 20px; height: 20px; background: white; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--lime); border-color: var(--lime); }
.switch[aria-checked="true"] > span { transform: translateX(18px); background: #2e4935; }
.prompt-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 13px 0 17px; color: var(--muted); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 610; color: #35483c; }
input:not([type="checkbox"]):not([type="file"]):not([type="range"]):not([type="color"]), select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cdd6cc; border-radius: 9px; background-color: #fff; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #78837b; }
textarea { resize: vertical; line-height: 1.6; }
dialog { width: min(550px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); border: 1px solid var(--edge); border-radius: 18px; background: white; color: var(--ink); padding: 26px; box-shadow: 0 24px 90px #15241f35; }
dialog::backdrop { background: #15241f83; }
.dialog-top, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.close-button { font-size: 28px; }
.dialog-top + .hint { margin: 8px 0 18px; }
.dialog-actions { margin-top: 16px; }
.error { color: #963f2e; font-size: 14px; margin-top: 9px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 20px; max-width: calc(100vw - 44px); padding: 13px 18px; color: white; background: #244831; border-radius: 10px; box-shadow: 0 4px 20px #17251c24; }
.toast.is-error { background: #853d30; }
.settings-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #e7ebe3; border-radius: 11px; margin-bottom: 20px; }
.settings-tabs a { display: flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: 14px; font-weight: 600; border-radius: 8px; color: #56645b; }
.settings-tabs a[aria-current] { color: var(--ink); background: white; box-shadow: 0 1px 4px #1b2b1c12; }
.settings-card { padding: 23px; margin-bottom: 16px; }
.settings-card h2 { margin-bottom: 18px; }
.field + .field, .field + .fields-two, .fields-two + .fields-two, .image-field + .image-field, .image-field + .fields-two { margin-top: 14px; }
.fields-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.fields-two > .field { margin-top: 0; }
.settings-card .hint { margin-top: 8px; }
.advanced { margin: 12px 0 16px; }
.advanced summary { font-weight: 560; font-size: 13px; color: var(--green); }
.advanced[open] summary { margin-bottom: 12px; }
.advanced:last-child { margin-bottom: 0; }
.color-field { display: flex; align-items: center; gap: 10px; border: 1px solid #cdd6cc; border-radius: 9px; min-height: 43px; padding: 4px 10px; }
input[type="color"] { width: 35px; height: 30px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.color-field output { font-variant-numeric: tabular-nums; color: #45544a; font-size: 13px; }
input[type="range"] { accent-color: #477244; width: 100%; min-height: 36px; margin: 0; }
label output { float: right; font-variant-numeric: tabular-nums; color: var(--green); }
.image-upload { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.image-upload input { flex: 1; min-width: 0; font-size: 12px; }
input::file-selector-button { padding: 7px 9px; border-radius: 6px; border: 1px solid var(--edge); background: #f1f5ec; color: var(--ink); font: inherit; cursor: pointer; }
.thumbnail { width: 44px; height: 40px; display: grid; place-items: center; position: relative; background: #eff2ec; border-radius: 6px; overflow: hidden; color: #829381; }
.thumbnail img { position: absolute; width: 100%; height: 100%; object-fit: contain; background: #eff2ec; }
.save-bar { position: sticky; bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge); background: #fcfdf9f5; }
.settings-aside { position: sticky; top: 18px; }
.preview-stage { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16/9; background: #19251e; border-radius: 8px; margin: 16px 0 9px; }
.preview-stage.form { aspect-ratio: 768/900; max-height: 350px; }
.preview-stage iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; pointer-events: none; }
.reset-card h2 + p { margin: 9px 0; }
.banner { padding: 12px 15px; margin: 0 0 16px; border-radius: 9px; font-size: 14px; }
.banner.success { background: #e5f1d8; color: #38563a; }
.banner.error { background: #f8e7e1; }
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #eff2eb; }
.login-frame { max-width: 940px; width: 100%; min-height: 470px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; overflow: hidden; border: 1px solid #d8e0d4; box-shadow: 0 18px 70px #263b2010; background: white; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(ellipse at 68% 65%, #3d5c39 0%, #263e2e 48%, #1b3026 84%); }
.login-art .brand { position: relative; z-index: 1; margin: 32px; }
.login-art .sculpture { position: absolute; inset: 11% -4% 0; width: 108%; height: 89%; }
.login-form { align-self: center; padding: 42px clamp(28px,4vw,58px); }
.login-glyph { margin-bottom: 18px; background: #eff4e9; }
.login-form h1 { font-size: clamp(30px,3vw,43px); }
.login-form form { margin: 25px 0 0; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px !important; }
.password-wrap button { position: absolute; top: 3px; right: 3px; }
.login-submit { margin-top: 16px; width: 100%; justify-content: space-between; }
.login-form .login-remember { margin-top: 14px; font-size: 12px; }
@media (min-width: 1600px) { .shell { grid-template-columns: 245px minmax(0,1fr); } }
@media (max-width: 1100px) {
    .shell { grid-template-columns: 183px minmax(0,1fr); }
    .sidebar { padding-left: 10px; padding-right: 10px; }
    .brand { font-size: 20px; gap: 6px; }
    .events-layout, .wall-layout, .settings-layout { grid-template-columns: minmax(0,1.4fr) minmax(230px,.8fr); }
    .topbar, .content { padding-left: 23px; padding-right: 23px; }
    .panel-heading, .mode-card, .prompt-card, .preview-card, .reset-card, .settings-card { padding: 18px; }
    .queue-filter { padding: 14px; }
}
@media (max-width: 850px) {
    .shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; gap: 13px; padding: 10px 18px; }
    .brand-link { align-self: center; margin: 0 auto 0 0; }
    .nav { display: flex; }
    .nav-link, .logout button { padding: 9px 10px; gap: 6px; font-size: 13px; }
    .logout { margin: 0; padding: 0; border: 0; }
    .logout span { display: none; }
    .topbar { min-height: 62px; }
}
@media (max-width: 650px) {
    .sidebar { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px 15px 7px; }
    .brand-link { grid-row: 1; }
    .logout { justify-self: end; grid-column: 2; grid-row: 1; }
    .nav { grid-column: 1 / -1; gap: 4px; }
    .nav-link { flex: 1; justify-content: center; }
    .nav-link .icon { width: 16px; height: 16px; }
    .topbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 11px; padding: 12px 16px; }
    .entry-links { flex-wrap: wrap; }
    .entry-links .button { min-height: 36px; padding: 7px 11px; font-size: 13px; }
    .content { padding: 26px 15px 32px; }
    .page-heading { gap: 10px; margin-bottom: 20px; }
    .page-heading p { margin-top: 7px; font-size: 14px; }
    .events-layout, .wall-layout, .settings-layout { grid-template-columns: minmax(0,1fr); }
    .settings-aside { position: static; }
    .event-row, .message-row { padding: 13px; gap: 9px; }
    .event-tile { width: 35px; height: 37px; }
    .event-details .meta { font-size: 11px; }
    .queue-filter { padding: 13px 14px; }
    .message-actions { gap: 2px; }
    .message-row .button { min-height: 42px; }
    .message-row .icon-button { width: 40px; height: 42px; }
    .create-cover { height: 95px; }
    .login-body { padding: 15px; }
    .login-frame { max-width: 430px; display: block; min-height: auto; }
    .login-art { height: 142px; }
    .login-art .brand { margin: 20px; }
    .login-art .sculpture { width: 63%; height: 135%; inset: 0 0 auto auto; }
    .login-form { padding: 24px 24px 30px; }
    .login-glyph { display: none; }
}
@media (max-width: 370px) {
    .nav-link { font-size: 12px; padding: 8px 4px; }
    .dialog-actions, .message-row { flex-wrap: wrap; }
    .fields-two { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: 0s !important; } }
