:root {
  --bg: #120d18;
  --panel: #fff7ed;
  --ink: #16121c;
  --muted: #746979;
  --line: rgba(22, 18, 28, .18);
  --accent: #e65335;
  --accent-dark: #9d271c;
  --signal: #f4b942;
  --card: #fffdf9;
  --shadow: 0 26px 80px rgba(0,0,0,.34);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: radial-gradient(circle at 15% 12%, #3c1f35, transparent 34%), radial-gradient(circle at 82% 20%, #5b271d, transparent 30%), var(--bg); color: var(--ink); }
.app-shell {
  height: 100dvh;
  min-height: 420px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vh, 18px);
  padding: clamp(12px, 2.2vw, 28px);
}
.app-header, .app-footer {
  background: rgba(255, 247, 237, .96);
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: 0 12px 42px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
}
.app-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 24px;
  padding: 14px clamp(16px, 3vw, 30px);
}
.eyebrow, .kicker { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; color: var(--accent-dark); font-weight: 900; }
h1 { margin: 0; font-size: clamp(1.05rem, 2.65vw, 1.85rem); line-height: 1.05; letter-spacing: -.03em; }
.version { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; font-weight: 900; color: var(--accent-dark); background: #fff; }
.content-window { min-height: 0; overflow: hidden; display: grid; }
.card {
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  border-radius: clamp(22px, 4vw, 34px);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.1fr);
  overflow: hidden;
}
.image-panel { min-height: 0; display: grid; place-items: center; padding: clamp(16px, 4vw, 44px); background: linear-gradient(160deg, #fff7ed, #f2ded0); border-right: 1px solid var(--line); }
.image-panel img { display: block; max-width: 100%; max-height: 100%; width: min(100%, 520px); height: auto; object-fit: contain; }
.text-panel { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: clamp(18px, 4vw, 48px); }
h2 { margin: 0; font-size: clamp(1.55rem, 4.7vw, 3.8rem); line-height: .98; letter-spacing: -.055em; color: var(--ink); }
.copy-scroll { min-height: 0; overflow: auto; margin-top: clamp(12px, 3vh, 24px); padding-right: 10px; }
.copy-scroll p { margin: 0; font-size: clamp(1rem, 1.45vw, 1.25rem); line-height: 1.55; color: #302636; }
.stance { margin: 18px 0 0; border-left: 5px solid var(--accent); padding: 10px 12px; background: #fff4e8; border-radius: 12px; color: #5b332d; font-weight: 800; font-size: .9rem; }
.app-footer {
  min-height: 72px;
  border-radius: 22px;
  padding: 12px clamp(12px, 2vw, 22px);
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 14px;
}
button { appearance: none; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 900; color: #fff; background: var(--ink); cursor: pointer; }
button:disabled { opacity: .42; cursor: not-allowed; }
.progress-wrap { min-width: 0; display: grid; gap: 6px; }
.progress-text { text-align: center; font-weight: 900; color: var(--muted); font-size: .86rem; }
.progress-track { height: 8px; border-radius: 999px; background: rgba(22,18,28,.14); overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--signal)); border-radius: inherit; transition: width .25s ease; }
@media (max-width: 760px) {
  .app-shell { min-height: 520px; gap: 10px; padding: 10px; }
  .app-header { min-height: 70px; border-radius: 18px; }
  .version { padding: 7px 10px; }
  .card { grid-template-columns: 1fr; grid-template-rows: minmax(140px, 36%) minmax(0, 1fr); border-radius: 20px; }
  .image-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .image-panel img { max-height: 100%; width: auto; }
  .text-panel { padding: 18px; }
  h2 { font-size: clamp(1.55rem, 9.2vw, 2.55rem); }
  .copy-scroll p { font-size: .98rem; line-height: 1.45; }
  .stance { font-size: .82rem; margin-top: 12px; padding: 8px 10px; }
  .app-footer { min-height: 68px; grid-template-columns: auto 1fr auto; gap: 8px; border-radius: 18px; }
  button { padding: 10px 12px; font-size: .85rem; }
}
@media (max-width: 420px) {
  .app-header { align-items: flex-start; }
  .eyebrow { font-size: .62rem; }
  h1 { font-size: 1rem; }
  .progress-text { display: none; }
}
