:root {
  --bg: #f6f2ea;
  --bg-soft: #fffaf3;
  --ink: #1f1a17;
  --muted: #6d645e;
  --accent: #da6b47;
  --accent-dark: #b85031;
  --panel: rgba(255, 250, 242, 0.84);
  --panel-strong: #fffdf9;
  --line: rgba(86, 70, 61, 0.12);
  --line-strong: rgba(86, 70, 61, 0.18);
  --shadow: 0 22px 60px rgba(42, 30, 21, 0.12);
  --shadow-strong: 0 26px 70px rgba(42, 30, 21, 0.16);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 226, 189, 0.9), transparent 34%),
    radial-gradient(circle at 85% 15%, rgba(241, 196, 168, 0.45), transparent 24%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  min-height: 100vh;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
  pointer-events: none;
  opacity: 0.42;
}

.app {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 72px;
  z-index: 1;
}

.glow {
  position: fixed;
  inset: auto auto -120px -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(218, 107, 71, 0.18), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.header,
.notes,
.card,
.video-wrap,
.still-wrap,
.result {
  backdrop-filter: blur(18px);
}

.header {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.88), rgba(255, 248, 239, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 800;
}

.header h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.96;
  font-weight: 800;
}

.header p {
  margin: 0;
  max-width: 38rem;
  font-size: 1.04rem;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid rgba(25, 24, 20, 0.12);
  width: fit-content;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}

.stage {
  margin-top: 28px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.95fr);
  align-items: stretch;
}

.video-wrap {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08)),
    linear-gradient(150deg, var(--panel), var(--panel-strong));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

video,
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 251, 245, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.badge {
  background: linear-gradient(135deg, #25201d, #443730);
  color: #fffdf9;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  padding: 22px 24px;
  border-radius: 24px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-align: center;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.confidence {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.btn {
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(184, 80, 49, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(184, 80, 49, 0.28);
}

.notes {
  margin-top: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 248, 241, 0.84));
  padding: 22px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.menu {
  margin-top: 28px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.menu:has(> :only-child) {
  max-width: 340px;
}

.card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0)),
    linear-gradient(150deg, var(--panel), #fffdf8);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.78);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(218, 107, 71, 0.26);
}

.card-title {
  font-size: 1.24rem;
  line-height: 1.15;
  font-weight: 800;
}

.card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card-cta {
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--accent-dark);
  font-weight: 800;
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 700;
}

.card-ghost {
  opacity: 0.72;
  cursor: default;
}

.card-ghost:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-secondary {
  background: linear-gradient(135deg, #2f2824, #4a3d35);
  box-shadow: 0 14px 26px rgba(31, 26, 23, 0.18);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn-outline:hover {
  transform: translateY(-2px);
}

.hidden-stream {
  opacity: 0;
}

.still-wrap {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.52);
  padding: 12px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.still-view {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #ddd5c9;
}

.still-caption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}

.notes h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
}

.notes ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.notes li + li {
  margin-top: 8px;
}

@media (max-width: 600px) {
  .app {
    padding: 20px 14px 40px;
  }

  .header,
  .result,
  .notes,
  .card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .badge {
    font-size: 1.6rem;
    letter-spacing: 0.12em;
  }
}

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

  .header {
    padding: 26px 22px;
  }

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