:root {
  --green-950: #1f3124;
  --green-900: #263a2c;
  --green-800: #35513c;
  --green-700: #4f7557;
  --green-600: #648c6a;
  --green-400: #9ebaa0;
  --green-200: #dce8d8;
  --green-100: #edf3e9;
  --cream-100: #fbf8f1;
  --cream-200: #f5efe3;
  --cream-300: #e8dece;
  --white: #ffffff;
  --red: #9c4b4b;
  --red-dark: #7b3939;
  --text: #2a382d;
  --muted: #6d786f;
  --shadow: 0 18px 45px rgba(38, 58, 44, 0.1);
  --soft-shadow: 0 10px 28px rgba(38, 58, 44, 0.08);
  --radius-large: 32px;
  --radius-medium: 22px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream-100);
  color: var(--text);
  font-family: Inter, Avenir, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

code {
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.paper-card {
  border: 1px solid rgba(104, 126, 107, 0.16);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.97),
      rgba(251, 248, 241, 0.92)
    );
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-700);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Loading and setup */

.status-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.status-screen > p {
  color: var(--muted);
}

.status-card {
  width: min(100%, 560px);
  border-radius: var(--radius-large);
  padding: 42px;
}

.status-card h1 {
  margin: 0 0 16px;
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 10vw, 4.2rem);
  font-weight: 500;
}

.primary-link {
  display: inline-block;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--green-700);
  color: white;
  font-weight: 800;
  padding: 13px 20px;
  text-decoration: none;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--green-200);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

/* Password */

.password-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(188, 214, 182, 0.78),
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(231, 216, 187, 0.72),
      transparent 34%
    ),
    var(--cream-100);
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  border-radius: var(--radius-large);
  padding: 42px 34px;
  text-align: center;
}

.login-card h1 {
  margin: 0;
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 14vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.login-message {
  margin: 18px 0 26px;
  color: var(--muted);
}

.password-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.password-form label,
.game-toolbar label {
  color: var(--green-800);
  font-size: 0.86rem;
  font-weight: 800;
}

.password-form input,
.game-toolbar input {
  width: 100%;
  outline: none;
  border: 1px solid var(--green-200);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 14px 16px;
}

.password-form input:focus,
.game-toolbar input:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(100, 140, 106, 0.14);
}

.primary-button,
.secondary-button,
.danger-button,
.winner-button,
.score-button {
  border: 0;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  border-radius: 999px;
  background: var(--green-700);
  box-shadow: 0 10px 22px rgba(79, 117, 87, 0.24);
  color: var(--white);
  font-weight: 800;
  padding: 14px 20px;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--green-800);
}

.error-message {
  min-height: 24px;
  margin: 2px 0 0;
  color: var(--red);
  font-size: 0.9rem;
  text-align: center;
}

.floating-decoration {
  position: absolute;
  color: rgba(79, 117, 87, 0.28);
  font-family: Georgia, serif;
  pointer-events: none;
}

.decoration-one {
  top: 11%;
  left: 11%;
  font-size: 6rem;
  transform: rotate(-14deg);
}

.decoration-two {
  right: 9%;
  bottom: 10%;
  font-size: 8rem;
  transform: rotate(18deg);
}

.decoration-three {
  top: 16%;
  right: 17%;
  font-size: 4rem;
  transform: rotate(9deg);
}

/* Navigation */

.top-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(95, 120, 98, 0.11);
  background: rgba(251, 248, 241, 0.82);
  padding: 14px clamp(18px, 5vw, 70px);
  backdrop-filter: blur(14px);
}

.top-nav a {
  color: var(--green-900);
  text-decoration: none;
}

.brand {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
}

.nav-links a {
  color: var(--green-800);
  font-size: 0.88rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--green-600);
}



/* Secret Boyfriend Mode */

.boyfriend-mode-tab {
  position: fixed;
  z-index: 45;
  right: 20px;
  bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: var(--green-900);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 12px 17px;
  text-decoration: none;
  animation: secret-tab-in 260ms ease both;
}

.boyfriend-mode-tab:hover {
  background: var(--green-700);
  transform: translateY(-2px);
}

.secret-mode-toast {
  position: fixed;
  z-index: 46;
  right: 20px;
  bottom: 78px;
  border-radius: 14px;
  background: rgba(38, 58, 44, 0.94);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 12px 16px;
}

@keyframes secret-tab-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 110px 22px 70px;
  background:
    linear-gradient(
      rgba(251, 248, 241, 0.1),
      rgba(251, 248, 241, 0.94)
    ),
    radial-gradient(
      circle at 20% 22%,
      rgba(201, 223, 195, 0.9),
      transparent 30%
    ),
    radial-gradient(
      circle at 82% 38%,
      rgba(235, 222, 195, 0.88),
      transparent 27%
    ),
    var(--cream-100);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 820px);
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5rem, 17vw, 9.5rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.hero-subtitle {
  max-width: 620px;
  margin: 24px auto 34px;
  color: var(--green-800);
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
}

.relationship-counter {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-large);
  padding: 28px;
}

.counter-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.counter-unit {
  border-radius: 18px;
  background: var(--green-100);
  padding: 18px 10px;
}

.counter-unit span {
  display: block;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1;
}

.counter-unit small {
  display: block;
  margin-top: 7px;
  color: var(--green-700);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.counter-date {
  margin: 18px 0 0;
  color: var(--green-700);
  font-size: 0.85rem;
}

.scroll-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--green-800);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.hero-flower {
  position: absolute;
  color: rgba(79, 117, 87, 0.15);
  font-family: Georgia, serif;
  pointer-events: none;
}

.hero-flower-left {
  left: -35px;
  bottom: 8%;
  font-size: 13rem;
  transform: rotate(-18deg);
}

.hero-flower-right {
  top: 13%;
  right: -35px;
  font-size: 11rem;
  transform: rotate(20deg);
}

/* Shared sections */

.content-section {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 96px 24px;
}

.section-heading {
  max-width: 680px;
  margin: 0 auto 54px;
  text-align: center;
}

.section-heading h2,
.letter-card h2,
.memory-modal-heading h2 {
  margin: 0 0 14px;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  border: 2px dashed var(--green-200);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.48);
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

/* Timeline */

.timeline-section {
  width: 100%;
  max-width: none;
  background:
    linear-gradient(to bottom, var(--cream-100), var(--cream-200));
}

.timeline-section > * {
  width: min(100%, 1120px);
  margin-right: auto;
  margin-left: auto;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 34px;
}

.timeline-list.has-memories::before {
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background:
    linear-gradient(to bottom, var(--green-400), var(--green-200));
  content: "";
  transform: translateX(-50%);
}

.timeline-entry {
  position: relative;
  display: grid;
  width: 50%;
}

.timeline-entry-left {
  justify-self: start;
  padding-right: 48px;
}

.timeline-entry-right {
  justify-self: end;
  padding-left: 48px;
}

.timeline-node {
  position: absolute;
  z-index: 3;
  top: 46px;
  width: 20px;
  height: 20px;
  border: 5px solid var(--cream-200);
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 0 0 2px var(--green-400);
}

.timeline-entry-left .timeline-node {
  right: -10px;
}

.timeline-entry-right .timeline-node {
  left: -10px;
}

.timeline-memory-card {
  display: grid;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-medium);
  padding: 0;
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.timeline-memory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(38, 58, 44, 0.16);
}

.timeline-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--green-200), var(--cream-300));
}

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

.timeline-photo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--green-700);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.timeline-card-content {
  padding: 25px;
}

.timeline-date {
  margin: 0 0 7px;
  color: var(--green-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-card-content h3 {
  margin: 0 0 10px;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.2;
}

.timeline-card-content > p:not(.timeline-date) {
  margin: 0;
  color: var(--muted);
}

.open-memory-label {
  display: inline-block;
  margin-top: 18px;
  color: var(--green-700);
  font-size: 0.84rem;
  font-weight: 800;
}

/* Memory wall */

.memory-wall-section {
  max-width: 1240px;
}

.memory-wall-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  align-items: start;
  gap: 28px;
}

.memory-wall-card {
  overflow: hidden;
  border: 10px solid var(--white);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  padding: 0;
  transform: rotate(-0.7deg);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.memory-wall-card:nth-child(3n + 2) {
  transform: rotate(0.7deg);
}

.memory-wall-card:nth-child(3n) {
  transform: rotate(-0.25deg);
}

.memory-wall-card:hover,
.memory-wall-card:nth-child(3n + 2):hover,
.memory-wall-card:nth-child(3n):hover {
  z-index: 2;
  box-shadow: var(--shadow);
  transform: rotate(0deg) translateY(-5px);
}

.memory-wall-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--green-200), var(--cream-300));
}

.memory-wall-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wall-photo-placeholder {
  display: grid;
  height: 100%;
  place-content: center;
  color: var(--green-700);
  text-align: center;
}

.wall-photo-placeholder span {
  font-family: Georgia, serif;
  font-size: 3rem;
}

.wall-photo-placeholder p {
  margin: 0;
  font-family: Georgia, serif;
}

.memory-wall-caption {
  display: grid;
  gap: 4px;
  padding: 16px 12px 12px;
  color: var(--green-900);
  font-family: Georgia, serif;
  text-align: center;
}

.memory-wall-caption small {
  color: var(--green-600);
  font-family: Inter, Avenir, "Segoe UI", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Reasons */

.reason-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 20px;
}

.reason-card {
  border-radius: var(--radius-medium);
  padding: 28px 24px;
  text-align: center;
}

.reason-card span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-family: Georgia, serif;
}

.reason-card h3 {
  margin: 18px 0 8px;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: 1.55rem;
}

.reason-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Games */

.games-section {
  width: 100%;
  max-width: none;
  background:
    radial-gradient(
      circle at 10% 15%,
      rgba(205, 225, 199, 0.7),
      transparent 25%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(235, 220, 191, 0.7),
      transparent 27%
    ),
    var(--cream-200);
}

.games-section > * {
  width: min(100%, 980px);
  margin-right: auto;
  margin-left: auto;
}



.scoreboard-access-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--green-200);
  border-radius: var(--radius-medium);
  background: var(--green-100);
  margin-bottom: 24px;
  padding: 16px 18px;
}

.scoreboard-access-panel strong {
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.scoreboard-access-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.scoreboard-unlock-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scoreboard-unlock-controls input {
  width: min(210px, 42vw);
  outline: none;
  border: 1px solid var(--green-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  padding: 11px 15px;
}

.score-action:disabled,
.game-toolbar input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.game-board {
  border-radius: var(--radius-large);
  padding: clamp(22px, 5vw, 42px);
}

.game-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
}

.game-toolbar > div {
  display: grid;
  gap: 6px;
}

.secondary-button,
.danger-button,
.winner-button {
  border-radius: 999px;
  font-weight: 800;
  padding: 12px 18px;
}

.secondary-button {
  background: var(--green-100);
  color: var(--green-800);
}

.secondary-button:hover {
  transform: translateY(-2px);
  background: var(--green-200);
}

.danger-button {
  background: #f2dfdc;
  color: var(--red-dark);
}

.danger-button:hover {
  transform: translateY(-2px);
  background: #ebcfca;
}

.current-game-label {
  margin: 26px 0 18px;
  color: var(--green-700);
  font-family: Georgia, serif;
  font-size: 1.2rem;
  text-align: center;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.player-card {
  border: 1px solid var(--green-200);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.72);
  padding: 28px;
  text-align: center;
}

.player-label {
  margin: 0;
  color: var(--green-600);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-card h3 {
  margin: 6px 0;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: 2rem;
}

.score-number {
  margin: 18px 0;
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 11vw, 6rem);
  line-height: 1;
}

.score-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.score-button {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.8rem;
}

.minus-button {
  background: var(--green-400);
}

.plus-button {
  background: var(--green-700);
}

.score-button:hover {
  transform: translateY(-3px) scale(1.03);
}

.winner-button {
  width: 100%;
  margin-top: 20px;
  background: var(--green-800);
  color: var(--white);
}

.winner-button:hover {
  transform: translateY(-2px);
  background: var(--green-900);
}

.match-wins {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.versus {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-family: Georgia, serif;
  font-weight: 700;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.game-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--green-700);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

/* Letter */

.letter-card {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--radius-large);
  padding: clamp(30px, 7vw, 64px);
}

.letter-card::before {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(79, 117, 87, 0.15);
  content: "✿";
  font-family: Georgia, serif;
  font-size: 5rem;
  transform: rotate(17deg);
}

.letter-card p {
  position: relative;
  margin: 0 0 20px;
  color: #4f5b52;
  font-family: Georgia, serif;
  font-size: 1.06rem;
}

.letter-card .eyebrow {
  font-family: Inter, Avenir, "Segoe UI", Arial, sans-serif;
  font-size: 0.76rem;
}

.signature {
  margin-top: 34px !important;
  color: var(--green-800) !important;
  font-size: 1.3rem !important;
  font-style: italic;
}

/* Modals */

.memory-modal,
.image-viewer {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow-y: auto;
  background: rgba(24, 34, 27, 0.9);
  padding: 28px;
}

.memory-modal-card {
  width: min(100%, 1080px);
  margin: 40px auto;
  border-radius: var(--radius-large);
  background: var(--cream-100);
  padding: clamp(24px, 5vw, 52px);
}

.memory-modal-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.memory-modal-summary {
  margin: 0;
  color: var(--muted);
}

.modal-close {
  position: fixed;
  z-index: 70;
  top: 16px;
  right: 20px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.memory-modal-gallery {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.memory-modal-gallery.gallery-count-1 {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.memory-modal-gallery.gallery-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 8px solid var(--white);
  background: var(--green-100);
  box-shadow: var(--soft-shadow);
  padding: 0;
}

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

.memory-photo:hover img {
  transform: scale(1.035);
}

.gallery-empty {
  display: block;
}

.empty-gallery-message {
  border: 2px dashed var(--green-200);
  border-radius: var(--radius-medium);
  background: var(--green-100);
  padding: 38px 22px;
  color: var(--green-800);
  text-align: center;
}

.memory-letter {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-medium);
  padding: clamp(26px, 5vw, 46px);
}

.letter-label {
  margin: 0 0 18px !important;
  color: var(--green-700) !important;
  font-family: Inter, Avenir, "Segoe UI", Arial, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.memory-letter p {
  margin: 0 0 18px;
  color: #4f5b52;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.image-viewer {
  display: grid;
  place-items: center;
}

.image-viewer img {
  width: auto;
  max-width: min(100%, 1200px);
  max-height: 88vh;
  border: 10px solid var(--white);
  object-fit: contain;
  box-shadow: var(--shadow);
}

/* Footer */

footer {
  background: var(--green-950);
  color: rgba(255, 255, 255, 0.8);
  padding: 42px 24px;
  text-align: center;
}

footer p {
  margin: 4px 0;
  font-size: 0.84rem;
}

/* Responsive */

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .top-nav {
    justify-content: center;
  }

  .timeline-list.has-memories::before {
    left: 18px;
  }

  .timeline-entry {
    width: 100%;
    padding-right: 0;
    padding-left: 52px;
  }

  .timeline-entry-left,
  .timeline-entry-right {
    justify-self: stretch;
  }

  .timeline-entry-left .timeline-node,
  .timeline-entry-right .timeline-node {
    right: auto;
    left: 8px;
  }

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

  .versus {
    margin: -6px auto;
  }

  .scoreboard-access-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .scoreboard-unlock-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .scoreboard-unlock-controls input,
  .scoreboard-unlock-controls button,
  #lock-scoreboard-button {
    width: 100%;
  }

  .game-toolbar {
    grid-template-columns: 1fr;
  }

  .game-toolbar .secondary-button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .content-section {
    padding: 76px 18px;
  }

  .login-card {
    padding: 36px 22px;
  }

  .relationship-counter {
    padding: 20px 14px;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .counter-unit {
    padding: 15px 7px;
  }

  .timeline-card-content {
    padding: 20px;
  }

  

.scoreboard-access-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--green-200);
  border-radius: var(--radius-medium);
  background: var(--green-100);
  margin-bottom: 24px;
  padding: 16px 18px;
}

.scoreboard-access-panel strong {
  color: var(--green-900);
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.scoreboard-access-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.scoreboard-unlock-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scoreboard-unlock-controls input {
  width: min(210px, 42vw);
  outline: none;
  border: 1px solid var(--green-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  padding: 11px 15px;
}

.score-action:disabled,
.game-toolbar input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.game-board {
    padding: 22px 16px;
  }

  .player-card {
    padding: 24px 18px;
  }

  .game-actions {
    flex-direction: column;
  }

  .game-actions button {
    width: 100%;
  }

  .memory-modal {
    padding: 14px;
  }

  .memory-modal-card {
    margin: 48px auto 18px;
    padding: 24px 16px;
  }

  .memory-modal-gallery.gallery-count-2 {
    grid-template-columns: 1fr;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }
}
