:root {
  --bg: #e9e4dc;
  --surface: #fbf7ef;
  --surface-quiet: #ded8cd;
  --ink: #233f3b;
  --muted: #756f64;
  --line: #233f3b;
  --accent: #244f4a;
  --accent-dark: #1b3b37;
  --yellow: #f6b92a;
  --olive: #97a73a;
  --clay: #b98b48;
  --brown: #7e493c;
  --sage: #8d9384;
  --green: #c6d09d;
  --pink: #e8c4b1;
  --orange: #d69a45;
  --cyan: #aebbb1;
  --violet: #b9ad9d;
  --locked: #a79e92;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 12%, rgba(246, 185, 42, 0.22), transparent 22%),
    radial-gradient(circle at 85% 8%, rgba(36, 79, 74, 0.08), transparent 24%),
    linear-gradient(rgba(35, 63, 59, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 63, 59, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 620px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 12px;
  align-items: center;
  padding: 8px 0 18px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 6.4vw, 30px);
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow:empty {
  display: none;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.icon-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.screen {
  animation: rise 180ms ease-out;
}

.hidden {
  display: none !important;
}

.intro {
  position: relative;
  overflow: hidden;
  margin: 10px 0 28px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 24px 20px 22px;
  background: linear-gradient(160deg, #fbf7ef 0%, #f4ead4 100%);
  box-shadow: 0 14px 30px rgba(35, 63, 59, 0.12);
}

.intro::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 54px;
  height: 12px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 18px 18px 0 var(--olive);
  transform: rotate(-7deg);
}

.language-screen {
  min-height: calc(100svh - 120px);
  display: grid;
  align-content: center;
  gap: 22px;
  padding-top: 34px;
}

.language-hero {
  position: relative;
  overflow: hidden;
  min-height: 286px;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 34px 24px 28px;
  background:
    linear-gradient(170deg, rgba(246, 185, 42, 0.92) 0 48%, rgba(151, 167, 58, 0.55) 48% 63%, rgba(251, 247, 239, 0.95) 63% 100%);
  color: var(--ink);
  box-shadow: 0 18px 36px rgba(35, 63, 59, 0.16);
}

.language-hero::before,
.language-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.language-hero::before {
  right: -36px;
  top: 42px;
  width: 142px;
  height: 142px;
  border: 0;
  border-radius: 42px;
  background: rgba(36, 79, 74, 0.95);
  transform: rotate(8deg);
}

.language-hero::after {
  left: -42px;
  bottom: -34px;
  width: 220px;
  height: 116px;
  border: 0;
  border-radius: 999px 999px 0 0;
  background: rgba(126, 73, 60, 0.78);
  transform: rotate(-6deg);
}

.language-hero h2 {
  position: relative;
  z-index: 2;
  max-width: 12ch;
  margin: 0 0 18px;
  font-size: clamp(42px, 11vw, 60px);
  line-height: 0.98;
  letter-spacing: 0;
}

.language-hero p:last-child {
  position: relative;
  z-index: 2;
  max-width: 38ch;
  margin: 0;
  color: color-mix(in srgb, var(--ink) 84%, white);
  font-size: 18px;
  line-height: 1.5;
}

.corner-pal {
  display: none;
}

.pal-hair,
.pal-arm,
.pal-leg {
  position: absolute;
  pointer-events: none;
}

.pal-hair {
  left: 42%;
  top: -18px;
  width: 34px;
  height: 30px;
  border-left: 3px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 50% 0 0 0;
  transform: rotate(22deg);
}

.pal-hair::before,
.pal-hair::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 22px;
  height: 28px;
  border-left: 3px solid var(--line);
  border-radius: 50%;
}

.pal-hair::before {
  left: -15px;
  transform: rotate(-28deg);
}

.pal-hair::after {
  left: 12px;
  transform: rotate(25deg);
}

.pal-arm {
  top: 54%;
  width: 44px;
  height: 28px;
  border-top: 4px solid var(--line);
}

.pal-arm-left {
  left: -28px;
  border-radius: 999px 0 0 0;
  transform: rotate(-24deg);
}

.pal-arm-right {
  right: -24px;
  border-radius: 0 999px 0 0;
  transform: rotate(32deg);
}

.pal-leg {
  bottom: -25px;
  width: 4px;
  height: 28px;
  background: var(--line);
}

.pal-leg::after {
  content: "";
  position: absolute;
  left: -7px;
  bottom: -6px;
  width: 20px;
  height: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--orange);
}

.pal-leg-left {
  left: 38%;
  transform: rotate(5deg);
}

.pal-leg-right {
  left: 60%;
  transform: rotate(-6deg);
}

.hero-pal {
  z-index: 1;
  right: -58px;
  bottom: 24px;
  width: 148px;
  height: 118px;
  border-radius: 48% 18% 32% 54%;
  background: var(--yellow);
  transform: rotate(-10deg);
}

.hero-pal::before {
  background: var(--line);
  box-shadow: 38px 3px 0 var(--line);
}

.hero-pal .pal-arm-left {
  left: -18px;
  top: 46%;
  transform: rotate(-56deg);
}

.hero-pal .pal-arm-right {
  right: -12px;
  top: 44%;
  transform: rotate(58deg);
}

.hero-pal .pal-leg {
  display: none;
}

.day-pal {
  z-index: 0;
  right: -64px;
  top: 42px;
  width: 118px;
  height: 108px;
  border-radius: 46% 16% 20% 52%;
  background: var(--yellow);
  transform: rotate(9deg);
  opacity: 0.78;
}

.day-pal::before {
  top: 30%;
  background: var(--line);
  box-shadow: 38px 0 0 var(--line);
}

.day-pal::after {
  top: 54%;
}

.day-variant-1 .day-pal {
  background: var(--yellow);
  border-radius: 48% 18% 16% 48%;
}

.day-variant-1 .day-pal .pal-hair {
  top: -14px;
  transform: rotate(15deg);
}

.day-variant-2 .day-pal {
  top: 46px;
  background: var(--surface-quiet);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.day-variant-2 .day-pal::after {
  width: 24px;
  border-bottom: 0;
  border-top: 4px solid var(--line);
  border-radius: 999px 999px 0 0;
}

.day-variant-2 .day-pal .pal-arm-left {
  left: -38px;
  top: 38%;
  width: 58px;
  transform: rotate(-70deg);
}

.day-variant-2 .day-pal .pal-arm-right {
  right: -34px;
  top: 35%;
  width: 58px;
  transform: rotate(72deg);
}

.day-variant-3 .day-pal {
  top: 42px;
  height: 150px;
  background: var(--accent);
  border-radius: 999px 999px 16px 16px;
  transform: rotate(3deg);
}

.day-variant-3 .day-pal::before {
  top: 26%;
  left: 24%;
  width: 12px;
  height: 18px;
  border-radius: 999px;
  box-shadow: 42px -2px 0 var(--line);
}

.day-variant-3 .day-pal .pal-hair {
  left: 20%;
  top: 3px;
  width: 70px;
  height: 52px;
  border: 0;
  background:
    radial-gradient(circle at 8px 16px, var(--line) 0 2px, transparent 3px),
    radial-gradient(circle at 20px 8px, var(--line) 0 2px, transparent 3px),
    radial-gradient(circle at 34px 15px, var(--line) 0 2px, transparent 3px),
    radial-gradient(circle at 46px 7px, var(--line) 0 2px, transparent 3px),
    radial-gradient(circle at 58px 18px, var(--line) 0 2px, transparent 3px);
  transform: rotate(-12deg);
}

.day-variant-3 .day-pal .pal-hair::before,
.day-variant-3 .day-pal .pal-hair::after {
  display: none;
}

.day-variant-3 .day-pal .pal-leg {
  height: 44px;
}

.day-variant-4 .day-pal {
  background: var(--yellow);
  border-radius: 58% 42% 34% 66%;
  transform: rotate(13deg);
}

.day-variant-4 .day-pal::after {
  left: 35%;
  width: 18px;
  height: 22px;
  border: 3px solid var(--line);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.day-variant-4 .day-pal .pal-hair {
  top: -8px;
  width: 54px;
}

.day-variant-5 .day-pal {
  top: 44px;
  width: 134px;
  height: 104px;
  background: var(--surface-quiet);
  border-radius: 18px 48% 18px 48%;
  transform: rotate(-13deg);
}

.day-variant-5 .day-pal::before {
  top: 36%;
  left: 24%;
  width: 10px;
  height: 14px;
  border-radius: 999px 999px 0 0;
  box-shadow: 44px -3px 0 var(--line);
}

.day-variant-5 .day-pal::after {
  left: 34%;
  top: 61%;
  width: 34px;
  border-bottom-width: 4px;
}

.day-variant-6 .day-pal {
  top: 42px;
  height: 138px;
  background: var(--orange);
  border-radius: 42% 42% 18px 18px;
  transform: rotate(6deg);
}

.day-variant-6 .day-pal::after {
  left: 36%;
  top: 48%;
  width: 24px;
  height: 30px;
  border: 4px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.day-variant-6 .day-pal .pal-arm {
  top: 36%;
  height: 58px;
}

.language-actions {
  display: grid;
  gap: 12px;
}

.language-button {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.language-button:nth-child(1) {
  background: var(--pink);
}

.start-button {
  justify-items: center;
  min-height: 64px;
  background: var(--accent) !important;
  color: white;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(35, 63, 59, 0.16);
}

.language-button:nth-child(2) {
  background: var(--green);
  color: white;
}

.language-button:nth-child(2) small {
  color: rgba(255, 255, 255, 0.78);
}

.language-button span {
  font-size: 24px;
  font-weight: 820;
}

.language-button small {
  color: var(--muted);
  font-size: 14px;
}

.intro h2 {
  max-width: 12ch;
  margin: 0 0 14px;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p {
  max-width: 34ch;
  margin: 0;
  color: #3f3424;
  font-size: 16px;
  line-height: 1.55;
}

.text-button {
  margin-top: 16px;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
}

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

.day-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px;
  background: rgba(251, 247, 239, 0.92);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 0 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.day-row.is-active {
  background: #f8e0a7;
  box-shadow: 0 12px 26px rgba(35, 63, 59, 0.13);
}

.day-row.is-completed {
  background: #eef0de;
}

.day-row:not(:disabled):active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--line);
}

.diary-button {
  width: 100%;
  min-height: 58px;
  margin: 22px 0 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 17px;
  font-weight: 820;
  box-shadow: 0 12px 22px rgba(35, 63, 59, 0.16);
}

.diary-button:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--line);
}

.day-row:disabled {
  color: var(--locked);
  background: #ede6dc;
  box-shadow: none;
}

.day-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 820;
  font-size: 19px;
}

.day-row.is-active .day-number {
  background: var(--accent);
  color: white;
}

.day-row.is-completed .day-number {
  background: var(--ink);
  color: white;
}

.day-row:disabled .day-number {
  background: #ddd3c8;
  color: var(--locked);
}

.day-name {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 740;
  line-height: 1.2;
}

.day-hint {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.day-row:disabled .day-hint {
  color: var(--locked);
}

.chevron {
  font-size: 30px;
  color: var(--ink);
}

.day-card {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(251, 247, 239, 0.96), rgba(244, 238, 227, 0.96));
  padding: 20px;
  box-shadow: 0 16px 32px rgba(35, 63, 59, 0.14);
}

.day-card > :not(.corner-pal) {
  position: relative;
  z-index: 1;
}

.day-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  width: fit-content;
  max-width: calc(100% - 72px);
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.day-card h2 {
  width: auto;
  max-width: calc(100% - 80px);
  margin: 0 0 20px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
  box-shadow: none;
}

.content {
  display: grid;
  gap: 18px;
}

.page-section {
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface);
}

.page-progress {
  height: 6px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface-quiet);
}

.page-progress span {
  display: block;
  height: 100%;
  background: var(--yellow);
}

.section-label {
  margin: 0 0 18px;
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.content p {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.62;
  white-space: pre-line;
}

.lead-copy {
  margin: 4px 0 18px !important;
  font-size: 23px !important;
  line-height: 1.22 !important;
  font-weight: 820;
}

.pretty-separator {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 22px 0;
  opacity: 0.78;
}

.pretty-separator::before,
.pretty-separator::after {
  content: "";
  height: 2px;
  flex: 1;
  background: var(--line);
}

.pretty-separator span {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--brown);
}

.pretty-separator span:nth-child(2) {
  background: var(--yellow);
}

.pretty-separator span:nth-child(3) {
  background: var(--olive);
}

.note-callout,
.practice-callout,
.numbered-callout,
.alert-copy {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
  padding: 15px;
}

.note-callout {
  background: #f5efe4;
  box-shadow: 3px 3px 0 var(--surface-quiet);
}

.practice-callout {
  background: #eef0de;
  box-shadow: 3px 3px 0 var(--olive);
}

.callout-title {
  width: fit-content;
  margin-bottom: 12px !important;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--yellow);
  font-size: 13px !important;
  font-weight: 820;
  line-height: 1.2 !important;
  text-transform: uppercase;
}

.alert-copy {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #f7ddb9;
  font-weight: 820;
  text-transform: uppercase;
}

.alert-copy span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--line);
}

.numbered-callout {
  display: grid;
  gap: 10px;
  background: #f5efe4;
}

.numbered-callout p {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
}

.numbered-callout span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.content p:last-child {
  margin-bottom: 0;
}

.content a {
  color: var(--accent);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.small-copy {
  color: var(--muted);
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.quote {
  padding: 14px;
  border-left: 4px solid var(--rose);
  background: #fff3ed;
}

.page-pager {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 12px;
  align-items: center;
  margin: 26px auto 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  text-align: center;
}

.pager-button,
.pager-spacer {
  width: 52px;
  height: 52px;
}

.pager-button {
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.primary-pager {
  border: 1.5px solid var(--line);
  background: var(--accent);
  color: white;
  box-shadow: 3px 3px 0 var(--line);
}

.answer-field {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.answer-field span {
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.35;
}

.answer-field textarea {
  min-height: 150px;
}

.save-entry-button {
  justify-self: start;
  min-height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  box-shadow: 0 8px 16px rgba(35, 63, 59, 0.12);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.save-entry-button:active {
  transform: scale(0.97);
}

.save-entry-button.is-saved {
  animation: savePulse 520ms ease-out;
  background: var(--accent);
  color: white;
}

.finish-day-button {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 17px;
  font-weight: 860;
  box-shadow: 0 14px 26px rgba(35, 63, 59, 0.16);
}

.practice-page-button {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 17px;
  font-weight: 860;
  box-shadow: 0 14px 26px rgba(35, 63, 59, 0.16);
}

.access-gate {
  display: grid;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(244, 187, 54, 0.26), rgba(255, 253, 250, 0.92)),
    var(--surface);
  box-shadow: 0 14px 26px rgba(35, 63, 59, 0.12);
}

.access-gate p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.access-gate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.access-gate input {
  min-width: 0;
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 16px;
}

.access-gate button {
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 860;
  box-shadow: 3px 3px 0 var(--line);
}

.access-gate button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.access-gate-status {
  color: var(--accent-dark) !important;
  font-weight: 760;
}

@media (max-width: 430px) {
  .access-gate-row {
    grid-template-columns: 1fr;
  }
}

.video-practice {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(244, 187, 54, 0.22), rgba(255, 253, 250, 0.78) 48%),
    var(--surface);
  box-shadow: 0 16px 32px rgba(35, 63, 59, 0.12);
}

.video-practice-head {
  display: grid;
  gap: 8px;
}

.video-practice-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 7vw, 30px);
  line-height: 1.08;
  letter-spacing: 0;
}

.video-shell,
.video-placeholder {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--ink);
}

.video-practice.is-portrait .video-shell,
.video-practice.is-portrait .video-placeholder {
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(37, 85, 75, 0.96), rgba(136, 145, 103, 0.88)),
    var(--ink);
  color: #fffdfa;
  text-align: center;
}

.video-placeholder span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 253, 250, 0.32);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: videoSpin 900ms linear infinite;
}

.video-placeholder p,
.video-practice.is-error > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.video-load-button {
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 16px;
  font-weight: 860;
  box-shadow: 3px 3px 0 var(--line);
}

.video-load-button:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 var(--line);
}

@keyframes videoSpin {
  to {
    transform: rotate(360deg);
  }
}

.accept-wrap {
  margin: 22px 0 8px;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 820;
  font-size: 17px;
  box-shadow: 3px 3px 0 var(--line);
}

.notes {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f5efe4;
}

.page-notes {
  margin-top: 18px;
}

.notes span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.notes-hint {
  color: var(--muted);
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.diary-card {
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(35, 63, 59, 0.14);
}

.diary-head {
  margin-bottom: 18px;
}

.diary-head h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 9vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

.diary-content {
  display: grid;
  gap: 14px;
}

.diary-entry {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: var(--surface);
}

.diary-kicker {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px !important;
  font-weight: 900;
  line-height: 1.35 !important;
  text-transform: uppercase;
}

.diary-entry h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 780;
}

.diary-answer,
.empty-diary {
  margin: 0;
  white-space: pre-wrap;
}

.empty-diary {
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fffdfa;
  color: var(--muted);
  text-align: center;
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #8c8378;
}

.answer-field-compact textarea {
  min-height: 120px;
}

textarea:focus,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

.save-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 4;
  width: min(420px, calc(100% - 32px));
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #26231f;
  color: white;
  text-align: center;
  box-shadow: 0 12px 30px rgba(35, 30, 24, 0.18);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes savePulse {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width: 560px) {
  .day-card {
    padding: 24px;
  }
}
