:root {
  color-scheme: light;
  --bg: #f3efe6;
  --surface: #fffdf8;
  --surface-strong: #f7f1e7;
  --ink: #1d1a16;
  --muted: #665d52;
  --line: #d7cebf;
  --brand: #0d7a5f;
  --brand-strong: #095844;
  --accent: #e29d38;
  --danger: #8b2d2d;
  --shadow: 0 18px 40px rgba(37, 28, 16, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(226, 157, 56, 0.24), transparent 24rem),
    radial-gradient(circle at top right, rgba(13, 122, 95, 0.16), transparent 20rem),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.topbar,
.panel,
.preview,
.result-box,
.list-item,
.status-pill,
.toast {
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px 24px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(215, 206, 191, 0.8);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
p,
pre {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

h2 {
  font-size: 1.1rem;
}

.topbar-actions,
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill.signed-in {
  color: var(--brand-strong);
  border-color: rgba(13, 122, 95, 0.28);
  background: rgba(13, 122, 95, 0.08);
}

.grid {
  display: grid;
  gap: 20px;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.primary-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  margin-bottom: 20px;
}

.compact {
  gap: 14px;
}

.panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(215, 206, 191, 0.9);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-large {
  min-height: 100%;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
button {
  min-height: 46px;
  border-radius: var(--radius);
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button {
  border: 0;
  padding: 0 16px;
  background: var(--brand);
  color: white;
  cursor: pointer;
}

button:hover {
  background: var(--brand-strong);
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: var(--surface-strong);
}

.preview {
  min-height: 220px;
  margin-top: 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: rgba(247, 241, 231, 0.62);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.preview.empty {
  color: var(--muted);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-shell {
  margin-top: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #120f0c;
  aspect-ratio: 16 / 9;
}

.camera-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.result-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #171411;
  color: #f8f1e6;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.45;
  min-height: 170px;
}

.compact-box {
  min-height: 120px;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.list-shell {
  display: grid;
  gap: 12px;
}

.empty-list {
  color: var(--muted);
  min-height: 96px;
  place-content: center;
}

.list-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.list-item strong {
  font-size: 1rem;
}

.list-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.claim-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #1d1a16;
  color: #fffdf8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast.error {
  background: var(--danger);
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .two-up,
  .primary-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
