:root {
  color-scheme: light;
  --jungle: #092f23;
  --leaf: #0f6f4f;
  --mint: #d9f6df;
  --lime: #b6e47c;
  --gold: #f2c14e;
  --coral: #f07c5a;
  --ink: #10231d;
  --paper: #fbfff7;
  --shadow: 0 24px 70px rgba(5, 35, 25, 0.34);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 12%, rgba(242, 193, 78, 0.18), transparent 34%),
    radial-gradient(circle at 12% 18%, rgba(182, 228, 124, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(9, 47, 35, 0.98), rgba(15, 111, 79, 0.82)),
    #0b3a2a;
  color: var(--paper);
  font-family: var(--font-body);
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
}

.hero {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 100svh;
  overflow: clip;
  position: relative;
}

.hero-content {
  grid-area: 1 / 1;
}

.hero-content {
  align-content: center;
  display: grid;
  justify-items: center;
  max-width: 1440px;
  padding: clamp(28px, 6vw, 82px);
  position: relative;
  text-align: center;
  width: 100%;
  z-index: 1;
}

.kicker {
  color: var(--lime);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
}

.memory-switch {
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: none;
  width: min(1320px, 100%);
}

.hero-title {
  color: #ffffff;
  display: grid;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.8vw, 5.6rem);
  font-weight: 850;
  gap: 8px;
  letter-spacing: 0;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}

.hero-title span {
  display: block;
  transition:
    opacity 240ms ease,
    transform 280ms ease;
}

.title-main {
  opacity: 1;
  transform: translateY(0);
}

.title-extra {
  color: var(--gold);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-family: var(--font-display);
  font-weight: 750;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 240ms ease,
    transform 280ms ease;
}

.memory-switch.is-memory-hovered .title-extra {
  opacity: 1;
  transform: translateY(0);
}

.hero-media {
  aspect-ratio: 16 / 9;
  background: rgba(7, 40, 30, 0.72);
  border: 1px solid rgba(217, 246, 223, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: none;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.hero-media:focus-visible {
  outline: 3px solid rgba(242, 193, 78, 0.68);
  outline-offset: 4px;
}

.memory-image {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  transition:
    opacity 360ms ease,
    transform 680ms ease,
    filter 360ms ease;
  width: 100%;
}

.memory-image-default {
  filter: saturate(0.96) contrast(1.02) brightness(0.9);
  opacity: 1;
}

.memory-image-thailand {
  filter: saturate(1.05) contrast(1.02) brightness(0.98);
  opacity: 0;
  transform: scale(1.03);
}

.hero-media:hover .memory-image-default,
.hero-media:focus-within .memory-image-default {
  opacity: 0;
  transform: scale(1.02);
}

.hero-media:hover .memory-image-thailand,
.hero-media:focus-within .memory-image-thailand {
  opacity: 1;
  transform: scale(1);
}

.intro {
  background: rgba(7, 40, 30, 0.18);
  border: 1px solid rgba(217, 246, 223, 0.16);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: grid;
  font-size: clamp(1.16rem, 1.55vw, 1.45rem);
  gap: 18px;
  line-height: 1.55;
  margin-top: clamp(28px, 4vw, 44px);
  max-width: 980px;
  padding: clamp(22px, 2.5vw, 34px);
  text-align: left;
}

.intro p {
  margin: 0;
}

.how-to {
  background: rgba(217, 246, 223, 0.1);
  border: 1px solid rgba(217, 246, 223, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(5, 35, 25, 0.18);
  margin-top: 24px;
  max-width: 980px;
  padding: 0;
  text-align: left;
  overflow: hidden;
}

.how-to h2 {
  background: rgba(7, 40, 30, 0.24);
  border-bottom: 1px solid rgba(217, 246, 223, 0.18);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.22rem, 1.45vw, 1.45rem);
  margin: 0;
  padding: 18px clamp(22px, 2.5vw, 30px);
}

.how-to ul {
  display: grid;
  margin: 0;
  padding: 0;
}

.how-to li {
  border-top: 1px solid rgba(217, 246, 223, 0.14);
  font-size: clamp(1.08rem, 1.25vw, 1.25rem);
  line-height: 1.45;
  list-style: none;
  padding: 16px clamp(22px, 2.5vw, 30px) 16px clamp(48px, 4vw, 60px);
  position: relative;
}

.how-to li:first-child {
  border-top: 0;
}

.how-to li::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 9px;
  left: clamp(24px, 2.6vw, 32px);
  position: absolute;
  top: 1.35em;
  width: 9px;
}

.quest-shell {
  background: var(--paper);
  color: var(--ink);
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: clamp(32px, 6vw, 82px) clamp(18px, 4vw, 42px);
}

.progress-status,
.day-card {
  max-width: 1040px;
  width: 100%;
}

.progress-text {
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1vw, 1.1rem);
  font-weight: 850;
  white-space: nowrap;
}

.progress-status {
  display: grid;
  gap: 4px;
  justify-items: end;
  margin-bottom: -8px;
}

.mistake-count {
  color: rgba(16, 35, 29, 0.62);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  font-weight: 760;
  white-space: nowrap;
}

.day-card {
  background: #ffffff;
  border: 1px solid rgba(15, 111, 79, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(5, 35, 25, 0.08);
  display: grid;
  gap: clamp(22px, 2.4vw, 34px);
  padding: clamp(28px, 4vw, 48px);
}

.day-card.completed {
  background: #fbfff7;
}

.final-card {
  background: #fff9e8;
  border-color: rgba(221, 179, 82, 0.45);
}

.day-heading {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.day-date {
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.2vw, 3.45rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

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

.day-section h4 {
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 1.25vw, 1.28rem);
  font-weight: 800;
  margin: 0;
}

.day-section ul {
  margin: 0;
  padding-left: 20px;
}

.day-section li,
.day-section p {
  color: rgba(16, 35, 29, 0.78);
  font-size: clamp(1.18rem, 1.35vw, 1.38rem);
  line-height: 1.55;
}

.self-check {
  background: #f7fbf2;
  border: 1px solid rgba(15, 111, 79, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 28px);
}

.self-check h4 {
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 1.25vw, 1.28rem);
  font-weight: 800;
  margin: 0;
}

.self-check ul {
  margin: 0;
  padding-left: 20px;
}

.photo-box {
  background: #ffffff;
  border: 1px dashed rgba(15, 111, 79, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: clamp(20px, 2.2vw, 28px);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.photo-box.is-dragging {
  background: #eff8e8;
  border-color: var(--leaf);
}

.photo-box:focus-visible {
  outline: 3px solid rgba(15, 111, 79, 0.22);
  outline-offset: 4px;
}

.photo-copy {
  display: grid;
  gap: 6px;
}

.photo-copy h4 {
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 1.25vw, 1.28rem);
  font-weight: 800;
  margin: 0;
}

.photo-copy p,
.photo-empty {
  color: rgba(16, 35, 29, 0.68);
  font-size: clamp(1.04rem, 1.15vw, 1.16rem);
  line-height: 1.45;
  margin: 0;
}

.photo-upload {
  align-items: center;
  background: #eff8e8;
  border: 1px solid rgba(15, 111, 79, 0.18);
  border-radius: 6px;
  color: var(--leaf);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 850;
  justify-content: center;
  justify-self: start;
  min-height: 52px;
  padding: 12px 18px;
}

.photo-upload input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.photo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.photo-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.photo-preview-button {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  height: 100%;
  padding: 0;
  width: 100%;
}

.photo-preview-button img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.photo-preview-button:hover img,
.photo-preview-button:focus-visible img {
  transform: scale(1.03);
}

.photo-thumb > button:not(.photo-preview-button) {
  background: rgba(16, 35, 29, 0.82);
  border: 0;
  border-radius: 999px;
  bottom: 8px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  left: 8px;
  min-height: 30px;
  padding: 4px 10px;
  position: absolute;
}

.task-box {
  background: #eff8e8;
  border-left: 6px solid var(--gold);
  border-radius: 6px;
  display: grid;
  gap: 18px;
  padding: clamp(22px, 2.4vw, 32px);
}

.task-box h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.25vw, 1.3rem);
  font-weight: 850;
  margin: 0;
}

.task-box p {
  color: rgba(16, 35, 29, 0.9);
  font-size: clamp(1.18rem, 1.35vw, 1.38rem);
  line-height: 1.45;
  margin: 0;
}

.task-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-links a {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(15, 111, 79, 0.22);
  border-radius: 6px;
  color: var(--leaf);
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 850;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none;
}

.task-links a:hover,
.task-links a:focus-visible {
  border-color: rgba(15, 111, 79, 0.44);
  box-shadow: 0 10px 22px rgba(15, 111, 79, 0.12);
  outline: 3px solid rgba(15, 111, 79, 0.16);
  outline-offset: 2px;
}

.answer-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.answer-form label {
  flex: 1 0 100%;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
}

.answer-form input {
  border: 1px solid rgba(15, 111, 79, 0.28);
  border-radius: 6px;
  flex: 1 1 260px;
  font: inherit;
  min-height: 52px;
  padding: 12px 14px;
}

.answer-form button,
.self-check-button,
.reset-button,
.album-button {
  background: var(--leaf);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 850;
  min-height: 52px;
  padding: 12px 18px;
}

.album-button {
  justify-self: start;
}

.self-check-button:disabled,
.album-button:disabled {
  background: rgba(16, 35, 29, 0.26);
  box-shadow: none;
  cursor: not-allowed;
}

.self-check-hint {
  color: rgba(16, 35, 29, 0.62);
  font-size: clamp(1.02rem, 1.12vw, 1.12rem);
  margin: 0;
}

.quick-answer-button {
  align-self: start;
  background: transparent;
  border: 1px solid rgba(15, 111, 79, 0.26);
  border-radius: 6px;
  color: var(--leaf);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 32px;
  padding: 5px 10px;
}

.quick-answer-button:hover,
.quick-answer-button:focus-visible {
  background: rgba(15, 111, 79, 0.08);
  outline: 3px solid rgba(15, 111, 79, 0.14);
  outline-offset: 2px;
}

.answer-form button:hover,
.answer-form button:focus-visible,
.self-check-button:hover,
.self-check-button:focus-visible,
.reset-button:hover,
.reset-button:focus-visible,
.album-button:hover,
.album-button:focus-visible {
  background: #0b5e43;
  outline: 3px solid rgba(15, 111, 79, 0.2);
  outline-offset: 2px;
}

.self-check-button:disabled:hover,
.self-check-button:disabled:focus-visible,
.album-button:disabled:hover,
.album-button:disabled:focus-visible {
  background: rgba(16, 35, 29, 0.26);
  outline: 0;
}

.photo-lightbox {
  align-items: center;
  background: rgba(5, 35, 25, 0.92);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 28px;
  position: fixed;
  z-index: 20;
}

.photo-lightbox img {
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  max-height: min(86vh, 980px);
  max-width: min(94vw, 1400px);
  object-fit: contain;
}

.photo-lightbox-close {
  background: #ffffff;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 850;
  padding: 10px 14px;
  position: fixed;
  right: 24px;
  top: 24px;
}

.answer-message {
  color: #a33b19;
  font-size: 1.08rem;
  font-weight: 760;
  min-height: 1.4em;
}

.success-message {
  align-items: center;
  background: #e8f5df;
  border: 1px solid rgba(15, 111, 79, 0.18);
  border-radius: 6px;
  color: #215339;
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(1.08rem, 1.2vw, 1.22rem);
  gap: 12px 18px;
  font-weight: 760;
  justify-content: space-between;
  padding: 14px 16px;
}

.accepted-answer {
  min-width: min(100%, 320px);
}

.certificate-link {
  align-items: center;
  background: var(--leaf);
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(15, 111, 79, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  text-decoration: none;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  white-space: nowrap;
}

.certificate-link:hover,
.certificate-link:focus-visible {
  background: #0b5e43;
  box-shadow: 0 14px 28px rgba(15, 111, 79, 0.28);
  outline: 3px solid rgba(15, 111, 79, 0.18);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.certificate-note {
  color: rgba(16, 35, 29, 0.62);
}

.reset-button {
  background: transparent;
  border: 1px solid rgba(15, 111, 79, 0.26);
  color: var(--leaf);
}

@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    align-content: center;
    max-width: none;
    padding: 26px 20px 34px;
  }

  .hero-title {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }

  .intro {
    font-size: 1.08rem;
  }

  .how-to li {
    font-size: 1rem;
    padding-left: 44px;
    padding-right: 18px;
  }

  .how-to li::before {
    left: 22px;
  }

}
