:root {
  color-scheme: light;
  --bg: #f5efe4;
  --panel: rgba(255, 250, 242, 0.82);
  --panel-border: rgba(31, 22, 12, 0.08);
  --text: #20160c;
  --muted: #69553e;
  --accent: #bf5b2c;
  --accent-strong: #8d3715;
  --accent-soft: #f1d3bc;
  --ok: #245e4f;
  --shadow: 0 24px 80px rgba(58, 32, 10, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(232, 185, 112, 0.4), transparent 30%),
    linear-gradient(135deg, #f6f0e7 0%, #f1e5d2 45%, #ecd3c2 100%);
}

button,
input,
select {
  font: inherit;
}

.backdrop {
  position: fixed;
  inset: auto;
  z-index: 0;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}

.backdrop-a {
  top: 6rem;
  right: -3rem;
  width: 18rem;
  height: 18rem;
  background: rgba(197, 82, 27, 0.18);
}

.backdrop-b {
  bottom: 3rem;
  left: -5rem;
  width: 22rem;
  height: 22rem;
  background: rgba(36, 94, 79, 0.18);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--accent-strong);
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

h2 {
  font-size: 1.7rem;
}

.lead {
  max-width: 62ch;
  margin: 1rem 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.room-bar {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.settings-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.88rem 1rem;
  border: 1px solid rgba(32, 22, 12, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.toggle-field input {
  width: auto;
}

.field span,
dt {
  color: var(--muted);
  font-size: 0.85rem;
}

input {
  width: 100%;
  border: 1px solid rgba(32, 22, 12, 0.12);
  border-radius: 14px;
  padding: 0.88rem 1rem;
  background: rgba(255, 255, 255, 0.72);
}

select {
  width: 100%;
  border: 1px solid rgba(32, 22, 12, 0.12);
  border-radius: 14px;
  padding: 0.88rem 1rem;
  background: rgba(255, 255, 255, 0.72);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button.ghost {
  background: rgba(32, 22, 12, 0.08);
  color: var(--text);
}

.status-pill,
.badge {
  align-self: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.panel-head,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.actions {
  margin: 1rem 0;
  justify-content: flex-start;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(32, 22, 12, 0.95), rgba(70, 33, 18, 0.9));
  object-fit: cover;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 0;
}

.meta div {
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

dd {
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}

.log-panel {
  margin-top: 1rem;
}

pre {
  margin: 1rem 0 0;
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(28, 18, 10, 0.92);
  color: #f6f0e7;
  font-size: 0.86rem;
  line-height: 1.5;
}

@media (max-width: 840px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .room-bar,
  .panel-head,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .status-pill,
  .badge {
    align-self: flex-start;
  }

  .meta {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .settings-grid-compact {
    grid-template-columns: 1fr;
  }
}
