:root {
  color-scheme: dark;
  --ink: #f2ede4;
  --muted: #aaa2b0;
  --panel: #1c1922;
  --panel-2: #24202b;
  --line: #423a4a;
  --accent: #d79b5e;
  --accent-strong: #f2bd7d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 0; min-height: 100vh; margin: 0; background: radial-gradient(circle at 15% 0%, rgba(91,64,93,.26), transparent 34rem), #111016; color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.room-home { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 60px; }
.room-home-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid rgba(88,78,96,.58); }
.room-home-brand { display: flex; align-items: center; gap: 12px; }
.room-home-brand > span { color: var(--accent); font-size: 28px; text-shadow: 0 0 22px rgba(215,155,94,.48); }
.room-home-brand strong, .room-home-brand small { display: block; }
.room-home-brand strong { font-size: 18px; letter-spacing: .02em; }
.room-home-brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.primary-action, .room-entry-row button { border: 1px solid #9c6b3d; border-radius: 11px; background: linear-gradient(180deg, #bd7f45, #8d572e); padding: 11px 16px; color: white; font-weight: 750; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.primary-action:hover, .room-entry-row button:hover { filter: brightness(1.08); }
.room-intro { max-width: 720px; padding: 58px 0 32px; }
.eyebrow { margin: 0 0 9px; color: var(--accent-strong); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 62px); letter-spacing: -.04em; }
.room-intro > p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.room-section, .open-room { border: 1px solid rgba(84,75,92,.82); border-radius: 18px; background: rgba(28,25,34,.88); padding: 22px; box-shadow: 0 22px 54px rgba(0,0,0,.2); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h2, h3, p { margin-top: 0; }
.section-heading h2, .open-room h2 { margin-bottom: 4px; font-size: 17px; }
.section-heading p, .open-room > div p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.section-heading button { border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); padding: 7px 10px; color: #d4ccd8; }
.section-heading button:hover { border-color: rgba(215,155,94,.68); color: var(--accent-strong); }
.room-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.room-card { min-width: 0; border: 1px solid rgba(79,70,87,.94); border-radius: 14px; background: rgba(255,255,255,.025); padding: 16px; outline: 0; cursor: pointer; transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.room-card:hover, .room-card:focus-visible { transform: translateY(-2px); border-color: rgba(215,155,94,.72); background: rgba(215,155,94,.07); }
.room-card-locked { opacity: .62; }
.room-card-locked:hover, .room-card-locked:focus-visible { border-color: rgba(154,139,164,.75); background: rgba(255,255,255,.045); }
.room-card-heading { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.room-card-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(215,155,94,.14); color: var(--accent-strong); }
.room-card h3 { overflow: hidden; margin-bottom: 3px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.room-card code { color: #8f8795; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.room-card-arrow { color: var(--accent); font-size: 25px; font-weight: 300; }
.room-card-actions { display: flex; align-items: center; gap: 7px; }
.room-card-delete { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(193,92,92,.42); border-radius: 8px; background: rgba(151,49,49,.1); color: #d99191; font-size: 18px; line-height: 1; }
.room-card-delete:hover, .room-card-delete:focus-visible { border-color: #d96f6f; background: rgba(169,55,55,.2); color: #ffc0c0; outline: 0; }
.room-card-locked .room-card-arrow { font-size: 14px; }
.room-scenes { overflow: hidden; margin: 14px 0; color: #c3bac8; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.room-metadata { display: flex; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid rgba(79,70,87,.58); color: #817987; font-size: 9px; }
.room-empty { padding: 44px 18px; border: 1px dashed rgba(91,81,99,.9); border-radius: 13px; color: var(--muted); text-align: center; }
.room-empty[hidden] { display: none; }
.room-empty > span { display: block; margin-bottom: 10px; color: var(--accent); font-size: 30px; }
.room-empty h3 { margin-bottom: 7px; color: #ddd6e1; font-size: 15px; }
.room-empty p { margin-bottom: 0; font-size: 11px; }
.open-room { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(300px, 1fr); align-items: end; gap: 28px; margin-top: 16px; }
.open-room form { min-width: 0; }
.open-room label { display: block; margin-bottom: 6px; color: #bcb4c1; font-size: 10px; font-weight: 700; }
.room-entry-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.room-entry-row input { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #151219; padding: 11px 12px; color: var(--ink); outline: 0; }
.room-entry-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215,155,94,.12); }
.form-error { margin: 7px 2px 0; color: #e18a8a; font-size: 10px; line-height: 1.4; }
.form-error[hidden] { display: none; }
.privacy-note { margin: 18px 4px 0; color: #77707d; font-size: 10px; text-align: center; }
.room-delete-dialog { width: min(470px, calc(100vw - 28px)); border: 1px solid rgba(84,75,92,.95); border-radius: 16px; background: #1c1922; padding: 0; color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.62); }
.room-delete-dialog::backdrop { background: rgba(8,7,11,.7); backdrop-filter: blur(5px); }
.room-delete-dialog form { display: grid; gap: 15px; padding: 20px; }
.room-delete-dialog p { margin: 0; color: #c8c0cc; font-size: 12px; line-height: 1.55; }
.room-delete-dialog code { color: #9c929f; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading strong { font-size: 17px; }
.dialog-heading button, .dialog-actions button { border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); padding: 8px 11px; color: #d4ccd8; }
.dialog-heading button { border: 0; background: transparent; color: #9e95a4; font-size: 22px; }
.dialog-actions { justify-content: flex-end; }
.dialog-actions #confirm-room-delete { border-color: rgba(193,92,92,.72); background: #7d3131; color: white; }
.dialog-warning { color: #d99b9b !important; }

@media (max-width: 720px) {
  .room-home { width: min(100% - 24px, 1060px); padding-top: 16px; }
  .room-home-heading { align-items: flex-start; }
  .room-home-brand small { display: none; }
  .primary-action { padding: 9px 11px; font-size: 12px; }
  .room-intro { padding-top: 38px; }
  .room-list { grid-template-columns: 1fr; }
  .open-room { grid-template-columns: 1fr; gap: 18px; }
  .room-entry-row { grid-template-columns: 1fr; }
  .room-metadata { align-items: flex-start; flex-direction: column; gap: 4px; }
}
