/* ==========================================================
   Virtual Micro Gardening
   Version 3
   ========================================================== */

:root {
  --sky-top: #74c7ff;
  --sky-mid: #cfefff;
  --sky-bottom: #edf9ff;

  --grass-dark: #5d9440;
  --grass: #72af50;
  --grass-light: #8dc76b;

  --cream: #f8f7ef;

  --primary: #69a74f;
  --primary-dark: #41712f;

  --card: rgba(255, 255, 255, 0.82);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

  --radius: 24px;
}

/* ========================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  /* Colour emoji fonts after the generic family, so text symbols like ✓ and
     arrows stay in the text font but emoji find a colour glyph when the
     device has one. js/emoji-fallback.js covers devices that don't. */
  font-family: Poppins, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  color: #325a33;
  overflow-x: hidden;
  background: #325a33;
}

/* ==========================================================
   SKY
   ========================================================== */

#sky {
  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100vh;

  z-index: 0;

  pointer-events: none;

  overflow: hidden;
}

/* ==========================================================
   CLOUDS
   ========================================================== */

#cloud-layer {
  position: absolute;

  inset: 0;

  overflow: hidden;

  pointer-events: none;
}

.cloud {
  position: absolute;

  width: 180px;

  height: 65px;

  background: white;

  border-radius: 100px;

  opacity: 0.92;

  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.08));
}

.cloud::before {
  content: "";

  position: absolute;

  width: 75px;

  height: 75px;

  left: 20px;

  top: -28px;

  border-radius: 50%;

  background: white;
}

.cloud::after {
  content: "";

  position: absolute;

  width: 90px;

  height: 90px;

  right: 18px;

  top: -42px;

  border-radius: 50%;

  background: white;
}

@keyframes cloudDrift {
  from {
    transform: translateX(-250px);
  }

  to {
    transform: translateX(calc(100vw + 250px));
  }
}

/* ==========================================================
   NAVIGATION
   ========================================================== */

/* Every page uses the same markup: .site-nav > a.logo + button.nav-toggle
   + .nav-links. Desktop shows the links in the pill; on narrow screens
   js/nav.js collapses them behind the Menu button as a vertical list. */
.site-nav {
  position: relative;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding: 10px 14px 10px 26px;
  border-radius: 60px;
  background: rgba(45, 87, 43, 0.72);
  backdrop-filter: blur(18px);
  z-index: 5;
  box-shadow: var(--shadow);
}

.logo {
  min-width: 0;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.logo:hover {
  color: #ffe783;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.nav-links > span,
.nav-links .admin-nav-form button {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: white;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.nav-links > span {
  color: rgba(255, 255, 255, 0.75);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links .admin-nav-form button:hover,
.nav-links .admin-nav-form button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #ffe783;
}

.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
}

.nav-links a.nav-cta {
  background: #ffe783;
  color: #2d572b;
  font-weight: 700;
}

.nav-links a.nav-cta:hover,
.nav-links a.nav-cta:focus-visible {
  background: #fff2b0;
  color: #2d572b;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

/* Three bars that turn into a cross while the menu is open. */
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.2s,
    background 0.2s;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-open .nav-toggle-icon {
  background: transparent;
}

.nav-open .nav-toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: nowrap;
    border-radius: 28px;
    padding: 8px 8px 8px 20px;
  }

  .js-nav.site-nav {
    flex-wrap: wrap;
  }

  .logo {
    flex: 1 1 0;
    font-size: clamp(0.9rem, 4vw, 1.15rem);
  }

  .js-nav .nav-toggle {
    display: inline-flex;
    flex: none;
  }

  /* Without JS the links stay visible as a wrapped row under the logo. */
  .site-nav:not(.js-nav) {
    flex-wrap: wrap;
  }

  .site-nav:not(.js-nav) .nav-links {
    width: 100%;
    justify-content: center;
  }

  .js-nav .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 4px 12px 8px 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .js-nav.nav-open .nav-links {
    display: flex;
  }

  .js-nav .nav-links a,
  .js-nav .nav-links > span,
  .js-nav .nav-links .admin-nav-form button {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
  }

  .js-nav .nav-links a.nav-cta {
    margin-top: 6px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  /* Icon-only button so the site name still fits beside it. */
  .nav-toggle {
    padding: 8px 13px;
  }

  .nav-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.nav-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff5a3c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.nav-alert-badge.pulsing {
  animation: navAlertPulse 1.4s ease-out infinite;
}

@keyframes navAlertPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 60, 0.65);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 90, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 60, 0);
  }
}

/* ==========================================================
   HERO
   ========================================================== */

header {
  position: relative;

  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  text-align: center;

  overflow: hidden;
}

.hero {
  max-width: 900px;

  padding: 130px 30px 100px;

  z-index: 5;
}

.timelapse-row {
  display: flex;

  gap: 16px;

  justify-content: center;

  align-items: stretch;

  margin-top: 20px;

  flex-wrap: wrap;
}

.timelapse-row video {
  width: 100%;

  max-width: 360px;

  flex: 1 1 320px;

  border-radius: 20px;

  display: block;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;

  font-size: 5rem;

  color: white;

  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);

  margin: 25px 0;
}

.hero p {
  font-size: 1.25rem;

  color: white;

  max-width: 700px;

  margin: auto;

  line-height: 1.8;
}

/* ==========================================================
   VIDEO
   ========================================================== */

.hero video {
  width: 100%;

  max-width: 520px;

  margin: 40px auto;

  display: block;

  border-radius: 24px;

  border: 10px solid rgba(255, 255, 255, 0.75);

  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   BUTTONS
   ========================================================== */

.btn {
  display: inline-block;

  margin: 10px;

  padding: 16px 34px;

  border-radius: 40px;

  background: var(--primary);

  color: white;

  text-decoration: none;

  font-weight: 600;

  transition: 0.35s;
}

.btn:hover {
  transform: translateY(-5px);

  background: #7cbc5a;
}

/* ==========================================================
   FLOWERS
   ========================================================== */

.flower {
  position: absolute;

  bottom: 0;

  font-size: 34px;

  transform-origin: bottom center;

  animation: sway 4s ease-in-out infinite alternate;
}

@keyframes sway {
  from {
    transform: rotate(-4deg);
  }

  to {
    transform: rotate(4deg);
  }
}

/* ==========================================================
   LEAVES
   ========================================================== */

.leaf {
  position: fixed;

  top: -60px;

  z-index: 250;

  pointer-events: none;

  animation-name: fall;

  animation-timing-function: linear;

  animation-iteration-count: infinite;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}

/* ==========================================================
   SECTIONS
   ========================================================== */

section {
  position: relative;

  padding: 90px 8%;

  background: var(--cream);
}

section h2 {
  font-family: "Cormorant Garamond", serif;

  font-size: 3rem;

  text-align: center;

  margin-bottom: 50px;
}

/* ==========================================================
   CARDS
   ========================================================== */

.cards {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

  gap: 30px;
}

.card {
  background: var(--card);

  backdrop-filter: blur(12px);

  border-radius: var(--radius);

  padding: 35px;

  text-align: center;

  box-shadow: var(--shadow);

  transition: 0.35s;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
}

.card h3 {
  margin: 18px 0;
}

/* ==========================================================
   WEBCAM
   ========================================================== */

.preview {
  max-width: 900px;

  margin: auto;

  background: white;

  border-radius: 28px;

  padding: 28px;

  text-align: center;

  overflow: hidden;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.preview img {
  display: block;

  width: 100%;
}

.preview-title {
  font-size: 1.25rem;

  font-weight: 700;

  color: #355f39;

  margin-bottom: 16px;
}

.preview-copy {
  max-width: 760px;

  margin: 20px auto 0;

  line-height: 1.75;

  color: #325a33;
}

.live-garden-media {
  position: relative;

  width: min(100%, 480px);

  aspect-ratio: 480 / 270;

  margin: 0 auto;

  border-radius: 20px;

  overflow: hidden;

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.live-garden-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.live-garden-timestamp {
  position: absolute;

  right: 12px;

  bottom: 12px;

  padding: 6px 10px;

  border-radius: 999px;

  background: rgba(0, 0, 0, 0.6);

  color: #fff;

  font-size: 0.85rem;

  line-height: 1.2;

  backdrop-filter: blur(4px);
}

.plot-spawn {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.plot-spawn-claim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0 rgba(255, 196, 0, 0.6);
  cursor: pointer;
  animation: plotSpawnPulse 1.4s ease-out infinite;
  transition: transform 0.15s ease;
}

.plot-spawn-claim:hover {
  transform: scale(1.08);
}

.plot-spawn-claim:disabled {
  opacity: 0.6;
  cursor: default;
  animation: none;
}

.plot-spawn-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.plot-spawn-timer {
  font-size: 0.7rem;
  font-weight: 700;
  color: #41712f;
}

@keyframes plotSpawnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 196, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 196, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 196, 0, 0);
  }
}

.plot-spawn-message {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* "Action in progress" overlay -- see js/modules/actionProgress.js and
   $action_overlays in app/conf.inc.php. Sits below .plot-spawn (which stays
   interactive/claimable) and above the webcam image itself. */
.action-progress {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.action-progress--pulse {
  inset: auto auto auto 12px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  animation: actionProgressPulse 2.2s ease-in-out infinite;
}

.action-progress--pulse.action-progress--ready {
  background: rgba(224, 247, 224, 0.95);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.65);
  animation: none;
}

@keyframes actionProgressPulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

.action-progress-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.action-progress-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #355f39;
  white-space: nowrap;
}

.action-progress-label--floating {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.action-progress--grid.action-progress--ready .action-progress-label--floating {
  background: rgba(65, 133, 56, 0.85);
}

.action-progress-pellet {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.action-progress-droplet {
  position: absolute;
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.action-progress-leaf {
  position: absolute;
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.action-progress-pluck-item {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.action-progress-scanner {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
}

.action-progress-basket {
  position: absolute;
  left: 8%;
  top: 88%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.action-progress-collect-item {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.webcam-panel {
  display: block;
}

.webcam-list {
  display: grid;

  gap: 28px;

  margin-top: 16px;
}

.webcam-row {
  display: grid;

  gap: 12px;

  justify-items: center;
}

.webcam-row-title {
  margin: 0;

  font-size: 1.05rem;

  color: #2c4f2f;
}

.preview-header {
  background: #355f39;

  color: white;

  padding: 15px;
}

/* ==========================================================
   FOOTER
   ========================================================== */

footer {
  background: #31573a;

  color: white;

  text-align: center;

  padding: 90px 30px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

/* ==========================================================
   APP AUTH / LANDING STYLES
   ========================================================== */

.page-shell {
  width: min(1120px, 94%);
  margin: 0 auto;
  padding: 40px 0 80px;
}

.hero-panel,
.auth-card,
.card {
  background: rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 40px;
  display: grid;
  gap: 16px;
}

.hero-panel h1,
.auth-card h1 {
  font-size: 2rem;
  margin: 0;
  color: #325a33;
}

.hero-panel p,
.auth-card p {
  line-height: 1.7;
  margin: 0;
  color: #325a33;
}

.pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(105, 167, 79, 0.18);
  color: #41712f;
  font-weight: 700;
  width: max-content;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn-primary {
  background: #69a74f;
  color: white;
  box-shadow: 0 10px 25px rgba(105, 167, 79, 0.25);
}

.btn-secondary {
  background: white;
  color: #41712f;
  border: 1px solid rgba(65, 113, 47, 0.16);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.auth-card {
  width: min(480px, 100%);
  padding: 32px;
  display: grid;
  gap: 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #41712f;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  border-radius: 14px;
  font-size: 1rem;
  background: white;
}

/* Plain <label>/<input>/<select> pairs dropped into a .card (plot create/
   rename, queue-action, etc.) with no form-specific class of their own --
   style them to match .auth-form input instead of falling back to bare
   browser UA styling. 1rem font-size also keeps iOS Safari from zooming
   the page in on focus, which happens below ~16px. .settings-select and
   checkboxes/hidden fields already have their own styling, so they're
   excluded here. */
.card label:not(.preference-card) {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #41712f;
}

.card input[type="text"],
.card input[type="email"],
.card input[type="password"],
.card input[type="number"],
.card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: #325a33;
}

.card select:not(.settings-select) {
  padding: 12px 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: #325a33;
}

.form-error {
  color: #b13b3b;
  font-size: 0.9rem;
  font-weight: 500;
}

.notice {
  background: rgba(105, 167, 79, 0.14);
  color: #41712f;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}

.notice-notice {
  background: rgba(105, 167, 79, 0.14);
  color: #41712f;
}

.notice-success {
  background: rgba(105, 167, 79, 0.14);
  color: #41712f;
}

.notice-warning {
  background: rgba(215, 95, 40, 0.1);
  color: #8d3f1e;
}

.notice-negative {
  background: rgba(177, 59, 59, 0.08);
  color: #b13b3b;
}

.action-celebration-trigger {
  width: 0;
  height: 0;
  overflow: hidden;
}

.fireworks-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.firework-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
  opacity: 0;
}

.action-progress-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(215, 95, 40, 0.42);
  background: linear-gradient(135deg, rgba(255, 239, 224, 0.95), rgba(255, 249, 236, 0.95));
  box-shadow: 0 10px 26px rgba(215, 95, 40, 0.18);
  display: grid;
  gap: 8px;
}

.action-progress-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8d3f1e;
}

.action-progress-pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #d75f28;
  box-shadow: 0 0 0 0 rgba(215, 95, 40, 0.55);
  animation: actionPulse 1.25s ease-out infinite;
}

.action-progress-banner-copy {
  margin: 0;
  color: #7b3a20;
  font-weight: 600;
}

.action-progress-banner-cta {
  display: flex;
  justify-content: flex-start;
}

@keyframes actionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(215, 95, 40, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(215, 95, 40, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(215, 95, 40, 0);
  }
}

.switch-copy {
  text-align: center;
  color: #41712f;
}

.switch-copy a {
  color: #41712f;
  font-weight: 700;
}

.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 24px;
}

.card {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.settings-card {
  gap: 18px;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.preference-card {
  position: relative;
  display: block;
  border: 1px solid rgba(65, 113, 47, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 235, 0.95));
  padding: 16px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.preference-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(105, 167, 79, 0.35);
}

.preference-toggle-input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #5a9a45;
  align-self: center;
}

.preference-content {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.preference-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(105, 167, 79, 0.16);
  font-size: 1.2rem;
}

.preference-copy {
  display: grid;
  gap: 4px;
}

.preference-copy strong {
  color: #325a33;
}

.preference-copy small {
  color: #5d7a53;
  line-height: 1.5;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(190, 70, 70, 0.12);
  color: #8d3535;
  min-width: 90px;
}

.preference-toggle-input:checked ~ .toggle-pill {
  background: rgba(105, 167, 79, 0.18);
  color: #41712f;
}

@media (max-width: 760px) {
  .preference-content {
    grid-template-columns: auto auto 1fr;
    align-items: start;
  }

  .toggle-pill {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

.settings-select-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(240, 248, 235, 0.8);
  border: 1px solid rgba(65, 113, 47, 0.14);
  flex-wrap: wrap;
}

.settings-select-card p {
  margin: 4px 0 0;
  color: #5d7a53;
}

.settings-empty-state {
  margin: 0;
  color: #5d7a53;
  font-style: italic;
}

.settings-select {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  background: white;
  color: #325a33;
  font-weight: 600;
}

.actions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 24px;
  align-items: start;
}

.actions-controls {
  display: grid;
  gap: 18px;
}

.action-group-stack {
  display: grid;
  gap: 14px;
}

.action-group-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  background: rgba(255, 255, 255, 0.76);
}

.action-group-progress {
  border-color: rgba(49, 92, 176, 0.28);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(247, 251, 255, 0.94));
}

.action-group-completed {
  border-color: rgba(65, 113, 47, 0.24);
  background: linear-gradient(135deg, rgba(240, 248, 235, 0.94), rgba(250, 255, 248, 0.94));
}

.action-group-caption {
  margin: 0;
  color: #4f6945;
  font-size: 0.92rem;
}

.action-form {
  display: grid;
  gap: 12px;
}

.action-form label {
  display: grid;
  gap: 6px;
  color: #41712f;
  font-weight: 600;
}

.action-form input,
.action-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  border-radius: 14px;
  font-size: 1rem;
  background: white;
}

.action-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.action-detail-empty {
  margin: 0;
  color: #5d7a53;
}

.action-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-detail-grid div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(65, 113, 47, 0.14);
}

.action-detail-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5d7a53;
  line-height: 1.2;
}

.action-detail-grid strong {
  display: block;
  margin-top: 1px;
  font-size: 0.98rem;
  line-height: 1.35;
  color: #2c4f2f;
  font-weight: 700;
  overflow-wrap: anywhere;
}

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

.action-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  background: rgba(255, 255, 255, 0.75);
}

.action-item-main {
  display: grid;
  gap: 4px;
}

.action-item-main strong {
  color: #2c4f2f;
}

.action-item-main small,
.action-item-side small {
  color: #5d7a53;
}

.action-item-note {
  margin: 2px 0 0;
  color: #325a33;
  font-size: 0.95rem;
}

.action-required-time {
  display: block;
  color: #5a4e24;
  font-weight: 600;
}

.action-item-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 6px;
}

.action-item-side small {
  width: 100%;
  text-align: right;
}

/* Structured right column for action items: status/result (top) and controls (bottom) */
.action-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.action-item-side-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-result {
  color: #5d7a53;
  font-size: 0.9rem;
}

.action-item-side-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-item-complete-form,
.action-item-cancel-form {
  margin: 0;
}

.action-item-cancel-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .action-item-side {
    align-items: stretch;
  }
  .action-item-side-top {
    justify-content: space-between;
  }
  .action-item-side-controls {
    justify-content: flex-end;
  }
}

.action-item-complete-form {
  width: 100%;
  margin: 2px 0 0;
  display: flex;
  justify-content: flex-end;
}

.action-item-complete-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.action-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.action-state-open {
  background: rgba(201, 145, 22, 0.14);
  color: #8b5f0e;
}

.action-state-progress {
  background: rgba(88, 140, 255, 0.16);
  color: #315cb0;
}

.action-state-completed {
  background: rgba(105, 167, 79, 0.18);
  color: #41712f;
}

.streaks-panel {
  margin-top: 1.2rem;
  display: grid;
  gap: 16px;
}

.streaks-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.streaks-header h3 {
  margin: 0;
}

.streaks-header p {
  margin: 0.35rem 0 0;
  color: #5d7a53;
}

.streaks-spark {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 214, 102, 0.24), rgba(105, 167, 79, 0.18));
  color: #6d4b00;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.streaks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.streak-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(65, 113, 47, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 250, 241, 0.9));
  box-shadow: 0 10px 22px rgba(49, 80, 38, 0.08);
}

.streak-card::after {
  content: "";
  position: absolute;
  inset: auto -10px -20px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.12;
  background: radial-gradient(circle, currentColor 0%, transparent 72%);
  pointer-events: none;
}

.streak-card-daily {
  color: #c66a00;
}
.streak-card-weekly {
  color: #41712f;
}
.streak-card-bonus {
  color: #7b5cff;
}

.streak-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.streak-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.streak-card strong {
  display: block;
  color: #2c4f2f;
  font-size: 1.02rem;
}

.streak-card small {
  color: #5d7a53;
}

.streak-count {
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 700;
  color: #2c4f2f;
}

.streak-count-trail {
  letter-spacing: 0.08em;
  font-size: 1.5rem;
}

.streak-card p {
  margin: 0;
  color: #325a33;
  line-height: 1.55;
}

.streak-meter {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(65, 113, 47, 0.12);
}

.streak-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd56b, #69a74f);
}

.energy-panel {
  position: relative;
  overflow: hidden;
  margin-top: 1.2rem;
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 248, 237, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 28px rgba(49, 80, 38, 0.11);
}

.energy-panel::before,
.energy-panel::after,
.energy-glow {
  content: "";
  position: absolute;
  pointer-events: none;
}

.energy-panel::before {
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(123, 255, 178, 0.4),
    rgba(255, 214, 102, 0.5),
    rgba(105, 167, 79, 0.35)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
}

.energy-panel::after {
  inset: auto -20% -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 102, 0.18) 0%, rgba(255, 214, 102, 0) 68%);
}

.energy-glow {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.5;
}

.energy-glow-left {
  top: -60px;
  left: -40px;
  background: radial-gradient(circle, rgba(123, 255, 178, 0.35) 0%, rgba(123, 255, 178, 0) 70%);
}

.energy-glow-right {
  right: -45px;
  top: 10px;
  background: radial-gradient(circle, rgba(255, 214, 102, 0.3) 0%, rgba(255, 214, 102, 0) 70%);
}

.energy-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.energy-panel-header h3 {
  margin: 0;
}

.energy-panel-header p {
  margin: 0.35rem 0 0;
  color: #5d7a53;
}

.energy-spark {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(111, 183, 78, 0.22), rgba(255, 214, 102, 0.34));
  color: #41712f;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 6px 16px rgba(65, 113, 47, 0.08);
  animation: energyPulse 2.4s ease-in-out infinite;
}

.energy-meter-wrap {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.energy-meter {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(65, 113, 47, 0.16), rgba(65, 113, 47, 0.1));
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08);
}

.energy-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7bffb2 0%, #69a74f 52%, #ffd56b 100%);
  box-shadow: 0 0 14px rgba(123, 255, 178, 0.45);
  position: relative;
  overflow: hidden;
  animation: energyShimmer 2s linear infinite;
}

.energy-meter span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: energySweep 1.8s linear infinite;
}

.energy-meter-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #325a33;
  align-items: baseline;
}

.energy-meter-meta strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.energy-meter-meta small {
  color: #5d7a53;
}

.energy-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.energy-detail-grid div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(65, 113, 47, 0.1);
}

.energy-detail-grid span {
  display: block;
  color: #5d7a53;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.energy-detail-grid strong {
  display: block;
  margin-top: 4px;
  color: #2c4f2f;
}

@keyframes energyPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.4),
      0 6px 16px rgba(65, 113, 47, 0.08);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.5),
      0 10px 20px rgba(65, 113, 47, 0.14);
  }
}

@keyframes energySweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes energyShimmer {
  0% {
    filter: saturate(1) brightness(1);
  }
  50% {
    filter: saturate(1.12) brightness(1.05);
  }
  100% {
    filter: saturate(1) brightness(1);
  }
}

/* Compact dashboard hero: replaces the old heading + paragraph +
   streak/rank/penalty/energy blocks with a single row of small pills. */
.hero-panel-compact {
  padding: 18px 24px;
  gap: 10px;
}

.dashboard-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(65, 113, 47, 0.12);
  color: #2c4f2f;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

a.status-pill-link {
  text-decoration: none;
  transition: transform 0.15s ease;
}

a.status-pill-link:hover {
  transform: translateY(-1px);
  color: #2c4f2f;
}

.status-pill-warning {
  background: rgba(215, 95, 40, 0.16);
  color: #7b3a20;
}

.alerts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
  align-items: start;
}

.alerts-summary-card {
  gap: 14px;
}

.alerts-summary-card p {
  margin: 0;
  color: #325a33;
  line-height: 1.6;
}

.alerts-empty {
  margin: 0;
  color: #5d7a53;
  font-style: italic;
}

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

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(65, 113, 47, 0.16);
  background: rgba(255, 255, 255, 0.75);
}

.alert-item-main {
  display: grid;
  gap: 8px;
}

.alert-item-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-item-heading small {
  color: #5d7a53;
}

.alert-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(105, 167, 79, 0.18);
  color: #41712f;
  font-size: 0.78rem;
  font-weight: 700;
}

.alert-message {
  margin: 0;
  color: #2c4f2f;
  line-height: 1.55;
}

.alert-dismiss-form {
  margin: 0;
}

.alert-dismiss-form .btn {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .hero-panel,
  .auth-card {
    padding: 24px;
  }

  .hero-panel-compact {
    padding: 14px 18px;
  }

  .actions-layout {
    grid-template-columns: 1fr;
  }

  .alerts-layout {
    grid-template-columns: 1fr;
  }

  .action-item {
    flex-direction: column;
  }

  .streaks-header {
    flex-direction: column;
  }

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

  .energy-panel-header,
  .energy-meter-meta {
    flex-direction: column;
  }

  .energy-detail-grid {
    grid-template-columns: 1fr;
  }

  .alert-item {
    flex-direction: column;
  }

  .action-item-side {
    justify-items: start;
  }
}

/* ==========================================================
   ADMIN AREA (hidden user admin, AdminController)
   ========================================================== */

.admin-page {
  display: grid;
  gap: 18px;
}

.admin-page .card {
  text-align: left;
  /* Grid items default to min-width: auto, so one long unbreakable string
     (a file path, an error message) would push text out past the card edge. */
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-page .card:hover {
  transform: none;
}

.admin-page .card-grid {
  margin-top: 0;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-nav-form {
  margin: 0;
}

.admin-nav-form button {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-stat {
  text-decoration: none;
  color: #325a33;
  gap: 4px;
}

.admin-stat strong {
  font-size: 1.8rem;
  line-height: 1.1;
}

.admin-stat.is-active {
  outline: 3px solid var(--primary);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.admin-toolbar label {
  flex: 1 1 200px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  color: #325a33;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(65, 113, 47, 0.12);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #41712f;
}

.admin-table a {
  color: #325a33;
}

.admin-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-badge--ok {
  background: rgba(105, 167, 79, 0.18);
  color: #41712f;
}

.admin-badge--warn {
  background: rgba(215, 95, 40, 0.14);
  color: #8d3f1e;
}

.admin-badge--bad {
  background: rgba(177, 59, 59, 0.14);
  color: #b13b3b;
}

.admin-badge--info {
  background: rgba(60, 120, 190, 0.14);
  color: #2a5a8f;
}

.admin-muted {
  color: #6b7a6b;
  font-size: 0.88rem;
}

.admin-btn-small {
  padding: 8px 14px;
  font-size: 0.88rem;
  min-height: 0;
}

.btn-danger {
  background: #b13b3b;
  color: white;
}

.admin-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-stack {
  gap: 16px;
}

.admin-stack > form + form {
  padding-top: 16px;
  border-top: 1px solid rgba(65, 113, 47, 0.12);
}

.admin-page .card label.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0 0 8px;
  color: #325a33;
}

.admin-facts dt {
  font-weight: 600;
}

.admin-facts dd {
  margin: 0;
  min-width: 0;
}

.admin-list {
  margin: 0;
  padding-left: 20px;
  color: #325a33;
}

.admin-back a {
  color: #41712f;
  font-weight: 700;
}

.admin-user-header p {
  word-break: break-all;
}

.admin-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.admin-step {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border-left: 4px solid rgba(65, 113, 47, 0.3);
  color: #325a33;
}

.admin-step--fail {
  border-left-color: #b13b3b;
}

.admin-step--warn {
  border-left-color: #d75f28;
}

.admin-step-detail {
  margin-top: 4px;
  word-break: break-word;
}

.admin-step-hint {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #6b4a1e;
}

.admin-transcript {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #1f2a1f;
  color: #d8ecd0;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.admin-heading {
  margin: 8px 0 0;
  color: #325a33;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-warnings {
  margin: 0;
  padding: 10px 12px 10px 28px;
  border-radius: 14px;
  background: rgba(215, 95, 40, 0.1);
  color: #8d3f1e;
  font-size: 0.9rem;
  display: grid;
  gap: 4px;
  word-break: break-word;
}

/* ==========================================================
   SITE FOOTER, AGE NOTICE, DIARY, CONTENT PAGES
   Shared by the app pages (HomeController::footerMarkup()) and the static
   landing pages (/how-to-play/, /schools/, /wildlife/, /faq/, /blog/).
   ========================================================== */

.site-footer {
  padding: 60px 24px;
}

/* Card grids on the static landing pages: keep each card's content at the
   top rather than stretched to the height of the tallest card in the row. */
.info-grid .card {
  align-content: start;
  text-align: left;
}

.info-grid .card:hover {
  transform: none;
}

.site-footer-tagline {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-bottom: 20px;
}

.site-footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.site-footer-links a:hover {
  color: #ffe783;
}

.site-footer-small {
  font-size: 0.9rem;
  opacity: 0.85;
}

.auth-form label.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-form .auth-checkbox input {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: #69a74f;
}

.age-notice {
  font-size: 0.9rem;
  line-height: 1.6;
}

.age-notice a,
.content-panel a {
  color: #41712f;
}

.diary-day {
  color: white;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin: 36px 0 14px;
}

.diary-list {
  display: grid;
  gap: 18px;
}

.diary-entry {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  text-align: left;
}

.diary-entry:hover {
  transform: none;
}

.diary-entry img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.diary-entry ul {
  list-style: none;
  display: grid;
  gap: 8px;
  line-height: 1.6;
}

.diary-time {
  font-weight: 700;
  margin-bottom: 8px;
}

.content-panel {
  margin-top: 24px;
  padding: 36px;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  line-height: 1.75;
}

.content-panel h2 {
  font-size: 1.5rem;
  margin: 28px 0 10px;
}

.content-panel h2:first-child {
  margin-top: 0;
}

.content-panel h3 {
  font-size: 1.15rem;
  margin: 20px 0 6px;
}

.content-panel p,
.content-panel ul,
.content-panel ol,
.content-panel table {
  margin-bottom: 14px;
}

.content-panel ul,
.content-panel ol {
  padding-left: 1.4em;
}

.content-panel table {
  width: 100%;
  border-collapse: collapse;
}

.content-panel th,
.content-panel td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(65, 113, 47, 0.16);
}

.content-panel .table-wrap {
  overflow-x: auto;
}

.content-panel details {
  border-bottom: 1px solid rgba(65, 113, 47, 0.16);
  padding: 12px 0;
}

.content-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.content-panel details p {
  margin: 10px 0 0;
}

.post-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.post-list .card {
  text-align: left;
}

.post-list .card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.post-list .card a {
  color: #325a33;
}

.post-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 700px) {
  .diary-entry {
    grid-template-columns: 1fr;
  }

  .content-panel {
    padding: 22px;
  }

  .hero-panel {
    padding: 24px;
  }
}

section .card a,
.preview-copy a,
section p a {
  color: #41712f;
}

.hero-panel p a {
  color: #41712f;
}

/* Twemoji images swapped in by js/emoji-fallback.js for emoji this device
   can't draw; sized to the surrounding text like the character would be. */
img.emoji-fallback {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin: 0 0.05em;
  vertical-align: -0.1em;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: none;
}

/* Dashboard "Tell a friend" card (Application::renderShareCard()). */
.share-card .btn[hidden] {
  display: none;
}

.share-card .share-link {
  padding: 10px 16px;
}

.share-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #41712f;
}
