/* =====================================
   Global Game UI – Disable Text Caret
===================================== */

/* Core game UI shells */
.content-panel,
.sidebar,
.deer-page,
.inventory-page,
.market-page,
.preserve-page,
.explore-page {
  user-select: none;
  -webkit-user-select: none;
}

/* Re-enable selection for interactive controls */
input,
textarea,
select,
button {
  user-select: auto;
  -webkit-user-select: auto;
}
/* ==============================
   Reset & Base
============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: Georgia, serif;
    background: var(--paper-3);
    color: var(--ink-main);
}
/* =========================
   Light Mode Background Tile
========================= */
body:not(.theme-dark)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image: url("../images/background_tile.png");
  background-repeat: repeat;
  background-position: top left;
}



/* ==============================
   Page Shell
============================== */
.page-shell {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==============================
   Header: Logo + Nav
============================== */
.site-header {
    padding: 10;
    position: relative;
    z-index: 5;
}

.logo-nav-wrap {
    display: flex;
    align-items: flex-end;
    gap: 20px;

    padding-left: 0;
    margin-left: 0; /* FIX: remove the offset */

    position: relative;
    z-index: 20;
}
.site-logo {
    width: 600px;
    max-width: 100%;
    height: auto;
    margin-bottom: 0;
    display: block;
}

/* ==============================
   Top Navigation (Tokenized)
============================== */

.top-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0px;
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
}

/* Main tabs */
.top-nav .tab > a {
  display: block;
  padding: 10px 30px;

  background: var(--moss-deep);
  color: #ffffff;

  text-decoration: none;
  font-size: 14px;

  border-radius: 14px 14px 0 0;
  border: 2px solid var(--moss-deep);

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.top-nav .tab > a:hover {
  background: var(--moss);
  border-color: var(--moss);
}

/* ==============================
   Nav Dropdown – Cozy Card Style
============================== */

.top-nav li {
  position: relative;
  white-space: nowrap;
}

/* Dropdown panel */
.top-nav li > ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: -2px;

  min-width: 220px;              /* ⬅️ important: gives it presence */

  background: var(--paper-2);
  border: 1px solid var(--panel-border);
  border-top: none;

  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 8px 0;

  box-shadow:
    0 6px 14px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);

  z-index: 1000;
}

/* Show dropdown */
.top-nav li:hover > ul {
  display: block;
}
/* ==============================
   Dropdown Items – Cozy List
============================== */

.top-nav li > ul li {
  list-style: none;
}

/* Links */
.top-nav li > ul li a {
  display: block;

  padding: 10px 16px;        /* ⬅️ bigger hit area */
  font-size: 14px;           /* ⬅️ matches site body text */
  line-height: 1.4;

  color: var(--ink-main);
  text-align: left;          /* ⬅️ feels more natural */

  text-decoration: none;
  background: transparent;
}

/* Hover */
.top-nav li > ul li a:hover {
  background: var(--paper-3);
}

/* Soft separators */
.top-nav li > ul li:not(:last-child) {
  border-bottom: 1px solid var(--border-soft);
}


/* ==============================
   Main Frame
============================== */
.layout {

    display: flex;
    min-height: 620px;

    background: var(--paper-2);

    border: 1px solid var(--border-frame);

    border-radius: 0 0 8px 8px;

    position: relative;

    /* stronger layered elevation */
    box-shadow:
        0 26px 50px rgba(0,0,0,0.12),
        0 10px 18px rgba(0,0,0,0.08),
        0 2px 4px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.65);

    margin-bottom: 40px;
}
.top-nav a {
    position: relative;
    z-index: 2;
}

.top-nav a.active {
    z-index: 3;
}

/* remove bottom edge so it merges into the panel */
.top-nav a {
    border-bottom: none;
}
/* ==============================
   Sidebar Panel
============================== */
.sidebar {
    width: 260px;
    background: #e4e8d2;
    border-right: 2px solid #a2ad90;
    padding: 15px;
    padding-bottom: 60px; /* IMPORTANT: space for logout */
    position: relative;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: #b6c0a3;
    margin: 14px 0;
}

/* Game Time */
.game-time {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #b6c0a3;
}

/* Player Card */
.player-card {
    text-align: center;
    margin-bottom: 20px;
}

/* Avatar wrapper */
.sidebar .avatar {
    display: flex;               /* 🔑 centers the image */
    justify-content: center;
    align-items: center;

    background: transparent;     /* keep PNG transparency */
    padding: 0;
    margin-bottom: 10px;         /* optional spacing */
}

/* Avatar image */
.sidebar .avatar img {
    width: 150px;
    height: 150px;

    display: block;
    object-fit: contain;         /* no cropping */
    background: transparent;
}



.player-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.player-stats {
    list-style: none;
    font-size: 14px;
    text-align: left;
}

.player-stats li {
    margin-bottom: 6px;
}

.player-stats a {
    color: inherit;        /* same color as the stats text */
    text-decoration: none;
}

.player-stats a:hover {
    text-decoration: underline; /* optional */
}


/* Active Deer */
.active-deer {
    text-align: center;
    margin: 20px 0;
}

.active-deer h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.deer-silhouette {
    font-size: 40px;
    margin-bottom: 4px;
}

.deer-name {
    font-size: 13px;
}

/* Search */
.sidebar-search input {
    width: 100%;
    padding: 6px;
    margin-top: 10px;
}

/* Logout (pinned bottom) */
.sidebar-logout {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 13px;
}

.sidebar-logout a {
    color: #4f5a3f;
    text-decoration: none;
}

.sidebar-logout a:hover {
    text-decoration: underline;
}
.avatar img {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
}
/* ==================================================
   Cozy Sidebar Stack (GLOBAL)
================================================== */

.cozy-sidebar {
  background: #e4e8d2;
}

.cozy-card {
  background: rgba(255,255,255,0.45);
  border: 1px solid #b6c0a3;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

/* Sections */
.sidebar-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(182,192,163,0.5);
}

.section-title {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a705f;
  margin-bottom: 6px;
}

/* Stat rows */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 4px 0;
}

/* Energy pill */
.pill {
  background: #eef1e4;
  border: 1px solid #b8c9a9;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4f5a3f;
}

.hint {
  font-size: 12px;
  color: #6a705f;
  margin-bottom: 6px;
}

/* Action list */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  padding: 6px 0;
}

.nav-list a {
  text-decoration: none;
  font-size: 14px;
  color: #4f5a3f;
}

.nav-list a:hover {
  text-decoration: underline;
}

/* Active Deer */
.active-deer {
  text-align: center;
}

.deer-silhouette {
  font-size: 36px;
  margin: 4px 0;
}
/* ==================================================
   Sidebar Background – Subtle Fiber Texture
   (CSS-only, behind cards)
================================================== */

.sidebar {
  background:
    linear-gradient(#e4e8d2, #e4e8d2),
    repeating-radial-gradient(
      circle at 0 0,
      rgba(0, 0, 0, 0.035),
      rgba(0, 0, 0, 0.035) 1px,
      transparent 1px,
      transparent 3px
    );
}
.sidebar {
    width: 260px;
    background: #e4e8d2;
    border-right: 2px solid #a2ad90;
    padding: 15px;
    padding-bottom: 60px;
    position: relative;
}




/* ==============================
   Content Panel
============================== */
.content {
    flex: 1;
    background: #f2f4e6;
    display: flex;
    flex-direction: column;
}

.content-inner {
    padding: 30px;
    flex: 1;
}

.content h2 {
    margin-bottom: 10px;
}

.content p {
    line-height: 1.6;
    margin-bottom: 10px;
}
/* ==============================
   Page Headers – Soft Canon
   ============================== */

/* Primary page title (World, Games, Bazaar, etc.) */
.content h1 {
  font-size: 22px;
  font-weight: 600;
  color: #4f5a3f;
  margin-bottom: 6px;
}

/* Page subtitle / intro text */
.content > p.muted {
  font-size: 14px;
  color: #6a705f;
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 24px;
}
/* ==============================
   Page Headers – Soft Canon
   Matches World / Bazaar
============================== */

.content-inner h1 {
  font-size: 22px;
  font-weight: 600;
  color: #4f5a3f;
  margin-bottom: 6px;
}

.content-inner > p.muted {
  font-size: 14px;
  color: #6a705f;
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 24px;
}


/* ==============================
   Footer inside content panel
============================== */
.site-footer {
    text-align: center;
    font-size: 12px;
    padding: 18px 20px 22px;
    color: #333;
}

.footer-rule {
    height: 1px;
    background: #b6c0a3;
    width: 70%;
    margin: 0 auto 12px;
}

.site-footer a {
    color: #4f5a3f;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* =========================
   Mobile Cart — Desktop Guard (CANON)
   Ensures mobile cart never appears on desktop
========================= */

@media (min-width: 769px) {
  .mobile-cart-fab,
  .mobile-cart-sheet {
    display: none !important;
  }
}

/* Legacy sidebar cart (DEPRECATED — desktop only) */
/* ==================================================
   SIDEBAR CART (FINAL – OVERRIDES)
   Must be LAST in main.css
================================================== */
.sidebar .shop-cart {
  margin-top: 12px;
  font-size: 13px;
}

/* Title */
.sidebar .cart-title {
  font-size: 14px;
  text-align: center;
  margin-bottom: 8px;
  color: #4f5a3f;
}

/* Item list */
.sidebar .cart-items {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px;
  background: #f0efe9;
  border: 1px solid #d4d1c9;
  border-radius: 12px;
}

/* Empty state */
.sidebar .cart-empty {
  text-align: center;
  font-size: 12px;
  color: #6f756f;
  padding: 10px 0;
}

/* Cart rows – cleaner layout */
.sidebar .cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 6px 8px;
  margin-bottom: 6px;

  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;

  animation: cartItemPop 0.25s ease-out;
}

/* Remove last margin */
.sidebar .cart-item:last-child {
  margin-bottom: 0;
}

/* Item name + qty grouped */
.sidebar .cart-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #3e443e;
}

.sidebar .cart-item-qty {
  font-size: 11px;
  color: #6f756f;
  margin-left: 6px;
}

/* Remove */
.sidebar .cart-item-remove {
  align-self: center;
  font-size: 11px;
  color: #8a6a6a;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar .cart-item-remove:hover {
  text-decoration: underline;
  color: #7a3f3f;
}

/* Summary */
.sidebar .cart-summary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #b6c0a3;
  text-align: center;
}

.sidebar .cart-total {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #3e443e;
}

/* Checkout */
.sidebar .cart-checkout {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: none;
  background: #b0b6af;
  color: #ffffff;
  font-size: 13px;
  cursor: not-allowed;
}
/* ==================================================
   Sidebar Cart – Animation
================================================== */

/* Cart container reveal */
.sidebar .shop-cart {
  animation: cartFadeIn 0.35s ease-out both;
}

@keyframes cartFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ==================================================
   Sidebar Cart – Tone Adjustment (Final)
   ================================================== */

/* Overall cart container */
.sidebar .shop-cart {
  color: #3e443e;
}

/* Cart title */
.sidebar .cart-title {
  color: #4f5a3f;
}

/* Item list container – darker parchment */
.sidebar .cart-items {
  background: #e9e8df;              /* darker than inventory cards */
  border: 1px solid #c9c5ba;
}

/* Individual cart rows – softer contrast */
.sidebar .cart-item {
  background: rgba(255, 255, 255, 0.35); /* was too bright */
}

/* Item text */
.sidebar .cart-item-name {
  color: #3e443e;
}

.sidebar .cart-item-qty {
  color: #6a706a;
}

/* Remove link – quieter */
.sidebar .cart-item-remove {
  color: #8a6f6f;
}

.sidebar .cart-item-remove:hover {
  color: #7a3f3f;
}

/* Summary divider */
.sidebar .cart-summary {
  border-top: 1px solid #aeb8a1;
}

/* Total */
.sidebar .cart-total {
  color: #3e443e;
}

/* Checkout – muted, disabled look */
.sidebar .cart-checkout {
  background: #aeb4ab;   /* softer gray-green */
  color: #ffffff;
}
/* 🔧 FORCE checkout button to be clickable */
.shop-cart,
.shop-cart * {
    pointer-events: auto;
}

.checkout-button {
    position: relative;
    z-index: 5;
}
.cart-message {
    margin-top: 8px;
    font-size: 13px;
    color: #4f5a3f;
    min-height: 18px;
    padding-bottom: 20px;
     /* existing styles */
}
/* ===============================
   The Fawn Glade – Deer Creation
=============================== */

.fawn-form {
    margin-top: 28px;
    max-width: 520px;
}

.fawn-form .form-row {
    margin-bottom: 18px;
}

.fawn-form label {
    display: block;
    font-size: 14px;
    color: #4f5a3f;
    margin-bottom: 6px;
}

.fawn-form input[type="text"],
.fawn-form select {
    width: 100%;
    padding: 8px 10px;
    font-family: Georgia, serif;
    font-size: 15px;
    background: #f7f6ef;
    border: 1px solid #b8c1a3;
    border-radius: 6px;
    color: #2e2e2e;
}

.fawn-form input::placeholder {
    color: #8a9278;
}

.fawn-form input:focus,
.fawn-form select:focus {
    outline: none;
    border-color: #7e8a63;
    background: #fbfaf4;
}

/* Back link (Return to Herd) */
.back-link {
    margin-top: 38px; /* creates breathing room from the form */
    padding-top: 14px;
    border-top: 1px solid #c9d1b6; /* subtle separator */
}

.back-link a {
    font-size: 14px;
    color: #5f6b47;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
    color: #4f5a3f;
}
/* ===============================
   The Fawn Glade – Primary Action
=============================== */

.fawn-form .form-actions {
    margin-top: 34px;
}

/* Primary button – matches shop style */
.fawn-form .primary-button {
    display: inline-block;
    padding: 12px 22px;
    font-family: Georgia, serif;
    font-size: 15px;
    background: linear-gradient(
        to bottom,
        #7b8960,
        #5f6b47
    );
    color: #ffffff;
    border: 1px solid #4f5a3f;
    border-radius: 14px;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.25),
        0 2px 3px rgba(0,0,0,0.15);
}

.fawn-form .primary-button:hover {
    background: linear-gradient(
        to bottom,
        #86946a,
        #6a7750
    );
}

.fawn-form .primary-button:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.25);
}
/* ===============================
   The Fawn Glade – Cozy Card
=============================== */

.fawn-card {
    max-width: 560px;
    margin: 36px auto 0;
    padding: 28px 30px 24px;
    background: #f3f4e8;
    border: 1px solid #c9d1b6;
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.6),
        0 2px 6px rgba(0,0,0,0.08);
}

/* Form spacing */
.fawn-form {
    margin: 0;
}

.fawn-form .form-row {
    margin-bottom: 20px;
}

/* Center primary action */
.fawn-form .form-actions {
    margin-top: 30px;
}

/* Back link separation */
.fawn-card .back-link {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #c9d1b6;
    text-align: center;
}

.fawn-card .back-link a {
    font-size: 14px;
    color: #5f6b47;
    text-decoration: none;
}

.fawn-card .back-link a:hover {
    text-decoration: underline;
    color: #4f5a3f;
}
.flash-success {
    max-width: 700px;
    margin: 18px auto 26px;
    padding: 14px 18px;
    background: #e6f0df;
    border: 1px solid #b8c9a9;
    border-radius: 14px;
    color: #3e4f32;
    font-size: 15px;
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.6),
        0 2px 5px rgba(0,0,0,0.08);
}
/* ======================================
   Page Flash — Canon Success (Matches Preserve Alert)
====================================== */

.page-flash-success {
    margin: 14px 0 22px;
    padding: 14px 18px;

    background: #eef4e2; /* same as preserve-alert */
    border: 1px solid #bfcbb0;
    border-left: 6px solid #6f845a;

    border-radius: 8px;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    font-size: 14px;
    color: #24301f;

    animation: preserve-alert-fade 0.35s ease-out;
}

/* ===============================
   Sidebar – Player Display Name
=============================== */

.sidebar .player-name {
  font-size: 16px;
  font-weight: 600;
  color: #3f4a32;           /* same forest ink as headers */
  margin-bottom: 12px;
  text-align: center;
}

/* Optional: subtle hover if it’s a link */
.sidebar .player-name a {
  color: inherit;
  text-decoration: none;
}

.sidebar .player-name a:hover {
  text-decoration: underline;
}
/* ===============================
   Auth Pages (Login / Register)
=============================== */

.auth-page {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;

  background: #f7f6ef;
  border: 1px solid #c9d1b6;
  border-radius: 18px;
  padding: 32px 34px 36px;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 4px 10px rgba(0,0,0,0.08);
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  color: #3f4a32;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: #6a705f;
  margin-bottom: 24px;
}

.auth-error {
  background: #f2dede;
  border: 1px solid #e0b4b4;
  color: #8a3b3b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-row label {
  display: block;
  font-size: 13px;
  color: #4f5a3f;
  margin-bottom: 6px;
}

.auth-row input {
  width: 100%;
  padding: 8px 10px;
  font-family: Georgia, serif;
  font-size: 15px;

  background: #fbfaf4;
  border: 1px solid #b8c1a3;
  border-radius: 6px;
  color: #2e2e2e;
}

.auth-row input:focus {
  outline: none;
  border-color: #7e8a63;
  background: #ffffff;
}

.auth-button {
  margin-top: 6px;
  padding: 10px 18px;

  font-family: Georgia, serif;
  font-size: 15px;
  color: #ffffff;

  background: linear-gradient(
    to bottom,
    #7b8960,
    #5f6b47
  );
  border: 1px solid #4f5a3f;
  border-radius: 16px;

  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 2px 4px rgba(0,0,0,0.15);
}

.auth-button:hover {
  background: linear-gradient(
    to bottom,
    #86946a,
    #6a7750
  );
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
}

.auth-footer a {
  color: #5f6b47;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}
/* ===============================
   404 Page
=============================== */

.auth-404 {
  text-align: center;
}

.auth-404-code {
  font-size: 64px;
  font-weight: 600;
  color: #7e8a63;
  margin: 12px 0 6px;
  letter-spacing: 0.05em;
}

.auth-404-text {
  font-size: 14px;
  color: #6a705f;
  margin-bottom: 26px;
}

.auth-404-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

/* Secondary link (calmer than button) */
.auth-secondary {
  font-size: 13px;
  color: #5f6b47;
  text-decoration: none;
}

.auth-secondary:hover {
  text-decoration: underline;
}

/* ============================
   Nav Wrapper — Layout Safe
============================ */

.main-nav {
  display: contents; /* 🔑 preserves original layout */
}

/* ==========================================================
   Forest Fawns — Login Page Layout (Token Based)
   Uses Theme Tokens v1.1
   No hardcoded colors
========================================================== */

.login-layout {
  max-width: 1100px;
  margin: 32px auto 56px;
  padding: 0 28px;

  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: start;
}

/* =========================
   Left Column
========================= */

.login-intro {
  max-width: 700px;
}

.intro-title {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--ink-main);
  letter-spacing: 0.2px;
}

/* Text */
.intro-text p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-main);
  opacity: 0.9;
  margin-bottom: 14px;
}

.front-tagline {
  margin-top: 12px;
  font-style: italic;
  color: var(--ink-muted);
}

/* Divider */
.intro-divider {
  margin: 22px 0;
  border: none;
  border-top: 1px solid var(--border-soft);
}
.intro-text p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-main);
  margin-bottom: 12px;
}


/* Development Label */
.front-status {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--moss);
  font-weight: 600;
  margin-bottom: 6px;
}
.front-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-main);
  margin: 12px 0 8px;
}

/* =========================
   Right Column (Login)
========================= */

.login-auth {
  padding-top: 4px;
}

/* Headings */
.auth-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--ink-main);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* Online Count */
.login-auth .online-count {
  margin-top: 20px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--paper-3);
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

/* ============================
   Login Panel
============================ */

.login-auth {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 24px;
}

/* tighten internal spacing */
.auth-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-main);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* =========================
   Mobile
========================= */

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 0 20px;
  }
}

/* ===============================
   Online Players Page
=============================== */

.online-players-page {
  max-width: 560px;
}

/* Count line under header */
.online-count {
  font-size: 13px;
  color: #6a705f;
  margin-bottom: 18px;
}

/* Empty state */
.online-empty {
  padding: 18px 20px;
  background: #ecefe0;
  border: 1px solid #c9d1b6;
  border-radius: 14px;
  font-size: 14px;
  color: #5a5f5a;
}

/* Card container */
.online-list-card {
  background: #f3f4e8;
  border: 1px solid #c9d1b6;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 2px 6px rgba(0,0,0,0.06);
}

/* Table */
.online-players-table {
  width: 100%;
  border-collapse: collapse;
}

.online-players-table tr:not(:last-child) {
  border-bottom: 1px solid #d4dbc0;
}

.online-players-table td {
  padding: 10px 8px;
  font-size: 14px;
}

/* Player link */
.online-players-table a {
  color: #4f5a3f;
  text-decoration: none;
  font-weight: 600;
}

.online-players-table a:hover {
  text-decoration: underline;
}

/* ID styling */
.online-players-table .player-id {
  font-weight: normal;
  font-size: 12px;
  color: #6a705f;
  margin-left: 4px;
}
/* ===============================
   Online Players Page – Avatars & Preserve Name
=============================== */

.online-players-table td img.player-avatar {
    width: 75px;             /* size the avatar */
    height: 75px;            /* size the avatar */
    object-fit: cover;       /* keep the image's aspect ratio intact */
    margin-right: 10px;      /* space between avatar and name */
}

/* Preserve Name styling */
.online-players-table .preserve-name {
    font-size: 12px;
    color: #6a705f;
    margin-top: 4px;
}
.stat-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
}
/* =========================
   Attribute Name Colors
========================= */
:root {
  --attr-instinct: #6E8F6A;
  --attr-adaptability: #B38E3C;
  --attr-grace: #7FA9C4;
  --attr-resolve: #7A5A3A;
  --attr-affinity: #B07A8F;
}
.attr-instinct { color: var(--attr-instinct); }
.attr-adaptability { color: var(--attr-adaptability); }
.attr-grace { color: var(--attr-grace); }
.attr-resolve { color: var(--attr-resolve); }
.attr-affinity { color: var(--attr-affinity); }
/* ==================================================
   Sidebar Background – Subtle Fiber Texture (FINAL)
================================================== */

.sidebar {
  background:
    linear-gradient(#e4e8d2, #e4e8d2),
    repeating-radial-gradient(
      circle at 0 0,
      rgba(0, 0, 0, 0.06),
      rgba(0, 0, 0, 0.06) 1px,
      transparent 1px,
      transparent 4px
    ) !important;
}
/* =========================
   Sidebar Icon Alignment
========================= */

/* Shared icon sizing */
.sidebar .stat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 8px;
  display: inline-block;
}

/* Resource rows already work — ensure consistency */
.sidebar .stat-row > span:first-child {
  display: flex;
  align-items: center;
}

/* Actions list alignment */
.sidebar .nav-list li a,
.sidebar .nav-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Remove odd vertical drift */
.sidebar .nav-list li {
  padding: 4px 0;
}
/* =========================
   Sidebar Emoji Alignment Fix
========================= */

.sidebar .nav-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Force first element (emoji OR icon) into icon column */
.sidebar .nav-list li a::before {
  content: '';
}

/* Normalize emoji spacing */
.sidebar .nav-list li a {
  font-variant-emoji: text;
}

.sidebar .nav-list li a span,
.sidebar .nav-list li a img,
.sidebar .nav-list li a {
  line-height: 1.2;
}

/* THIS is the key part */
.sidebar .nav-list li a {
  position: relative;
  padding-left: 26px;
}

.sidebar .nav-list li a > img,
.sidebar .nav-list li a > span,
.sidebar .nav-list li a > :first-child {
  position: absolute;
  left: 0;
  width: 18px;
  text-align: center;
}
/* =========================
   Success Alert (Green)
========================= */
.alert-success {
    background: #eef6ec;          /* soft moss */
    border: 1px solid #b7d1b2;    /* muted green edge */
    color: #2f5a2f;               /* forest text */
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.alert-success strong {
    font-weight: 600;
}

.alert-success a {
    color: #2f5a2f;
    text-decoration: underline;
}

.alert-success a:hover {
    opacity: 0.85;
}
/* =========================
   Success Pill
========================= */
.alert-success .success-pill {
    display: inline-block;
    background: #cfe6c9;        /* soft moss pill */
    color: #2f5a2f;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

/* ======================================
   Preserve Alerts – High Visibility
====================================== */

.preserve-alert {
    margin: 10px 0 18px;
    padding: 14px 18px;
    background: #eef4e2; /* brighter than cards */
    border: 1px solid #bfcbb0;
    border-left: 6px solid #6f845a;
    border-radius: 8px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
}

/* optional subtle emphasis when page loads */
.preserve-alert {
    animation: preserve-alert-fade 0.35s ease-out;
}

@keyframes preserve-alert-fade {
    from {
        transform: translateY(-4px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

/* Clickable wrapper */
.preserve-alert-link {
    text-decoration: none;
    color: #24301f;
    display: block;
}

/* Headline */
.preserve-alert-link strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Body text */
.preserve-alert-body {
    font-size: 13px;
    color: #3f4d37;
    line-height: 1.4;
}

.preserve-record-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-subtitle {
    margin-bottom: 18px;
    color: #6b7763;
    font-size: 14px;
}

.record-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-entry {
    padding: 14px 16px;
    background: #f6f8f3;
    border: 1px solid #d6dfcd;
    border-radius: 6px;
}

.record-entry.is-viewed {
    opacity: 0.75;
}

.record-timestamp {
    font-size: 12px;
    color: #7b8574;
    margin-bottom: 6px;
}

.record-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.record-body {
    font-size: 14px;
    color: #3f4a39;
}

.record-pagination {
    margin-top: 20px;
    text-align: center;
}

.record-pagination a {
    margin: 0 4px;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 4px;
    color: #4f5a3f;
}

.record-pagination a.active {
    background: #cfd8c3;
    font-weight: bold;
}

.record-empty {
    padding: 20px;
    text-align: center;
    color: #6b7763;
}
.record-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.record-link:hover .record-title {
    text-decoration: underline;
}

.record-search {
    margin: 14px 0 18px;
}

.record-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 14px;
}
.record-entry.is-filtered-out {
    display: none;
}
.record-search input:focus {
    outline: none;
}

.record-search input:focus-visible {
    outline: 2px solid var(--moss-soft);
    outline-offset: 1px;
}
/* ==================================================
   Preserve Record — Search UI
================================================== */

.record-search {
    margin: 14px 0 18px;
}

.record-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Input */
.record-search-form input[type="search"] {
    flex: 1;
    min-width: 220px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: #fff;
}

/* Remove harsh browser focus */
.record-search-form input[type="search"]:focus {
    outline: none;
}

.record-search-form input[type="search"]:focus-visible {
    box-shadow: 0 0 0 2px rgba(90, 111, 72, 0.35);
}

/* Search button */
.record-search-submit {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid var(--moss);
    background: var(--moss);
    color: #fff;
    cursor: pointer;
}

.record-search-submit:hover {
    background: var(--moss-deep);
    border-color: var(--moss-deep);
}

/* Clear link */
.record-search-clear {
    font-size: 13px;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 6px 4px;
}

.record-search-clear:hover {
    text-decoration: underline;
}

/* Results count */
.record-results-count {
    margin: 8px 0 10px;
    font-size: 13px;
    color: var(--ink-muted);
}

/* ======================================
   Buddy Card (Active Exploring Deer)
   Canon Final Styling
====================================== */

.active-exploring-deer.cozy-card {
    padding: 12px;
    text-align: center;
}

/* Deer image */
.active-exploring-deer .exploring-deer-thumb img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
}

/* Name */
.active-exploring-deer .exploring-deer-name {
    font-size: 14px;
    font-weight: 600;
    color: #4f5a3f;
    margin-bottom: 2px;
}

.active-exploring-deer .exploring-deer-name a {
    color: inherit;
    text-decoration: none;
}

.active-exploring-deer .exploring-deer-name a:hover {
    text-decoration: underline;
}

/* Subline (region / state) */
.active-exploring-deer .exploring-deer-sub {
    font-size: 12px;
    color: #6a705f;
    line-height: 1.3;
    margin-bottom: 8px;
}

/* ======================================
   Buddy Actions (Buttons)
====================================== */

.active-exploring-deer .exploring-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

/* Primary */
.active-exploring-deer .exploring-actions .btn-primary {
    font-size: 12px;
    padding: 6px 10px;
}

/* Secondary (quiet exit) */
.active-exploring-deer .exploring-actions .btn-secondary,
.active-exploring-deer .exploring-actions .btn-quiet {
    font-size: 12px;
    padding: 5px 10px;
}
/* ======================================
   Buddy Panel Buttons (Canon)
====================================== */

.exploring-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

/* Reuse existing primary-button */
.exploring-actions .primary-button {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 12px;
}

/* New secondary button (quiet exit) */
/* Secondary (quiet exit) */
.secondary-button {
    appearance: none;
    -webkit-appearance: none;

    padding: 6px 10px;
    font-family: Georgia, serif;
    font-size: 12px;

    background: #e6eadc;
    border: 1px solid #b6c0a3;
    border-radius: 12px;

    color: #4f5a3f;
    cursor: pointer;
}

.secondary-button:hover {
    background: #dfe5cf;
}

.secondary-button:active {
    transform: translateY(1px);
}
/* ======================================
   Buddy Panel – Secondary Button (FORCED)
====================================== */

.active-exploring-deer .secondary-button {
    appearance: none;
    -webkit-appearance: none;

    padding: 6px 10px;
    font-family: Georgia, serif;
    font-size: 12px;

    background: #e6eadc;
    border: 1px solid #b6c0a3;
    border-radius: 12px;

    color: #4f5a3f;
    cursor: pointer;
}

.active-exploring-deer .secondary-button:hover {
    background: #dfe5cf;
}

.active-exploring-deer .secondary-button:active {
    transform: translateY(1px);
}
/* ======================================
   Primary Button — Canon (BUTTON ELEMENT)
====================================== */

button.primary-button {
    appearance: none;
    -webkit-appearance: none;

    display: inline-block;
    width: 100%;

    padding: 6px 10px;
    font-family: Georgia, serif;
    font-size: 12px;

    background: linear-gradient(
        to bottom,
        #7b8960,
        #5f6b47
    );
    color: #ffffff;

    border: 1px solid #4f5a3f;
    border-radius: 12px;

    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.25),
        0 2px 3px rgba(0,0,0,0.15);
}

button.primary-button:hover {
    background: linear-gradient(
        to bottom,
        #86946a,
        #6a7750
    );
}

button.primary-button:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.25);
}
/* ======================================
   Registration Page – Forest Fawns
   (Begin Your Journey)
====================================== */

.register-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* Header */
.register-page h1 {
    text-align: center;
    margin-bottom: 6px;
}

.register-page .page-subtitle {
    text-align: center;
    color: #6b6b6b;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.5;
}

/* Main form container */
.register-form {
    background: #f7f4ec; /* warm parchment */
    border: 1px solid #ddd7c9;
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Shared section cards */
.register-form .form-section {
    background: #faf8f2;
    border: 1px solid #e1ddd3;
    border-radius: 8px;
    padding: 20px 22px;
}

.register-form .form-section h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 18px;
}

.register-form .section-subtitle {
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 14px;
    line-height: 1.5;
}

/* Inputs */
.register-form label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
}

.register-form input,
.register-form select {
    margin-top: 4px;
    padding: 9px 11px;
    border-radius: 4px;
    border: 1px solid #cfc9bd;
    font-size: 15px;
    background: #ffffff;
}

.register-form input:focus,
.register-form select:focus {
    outline: none;
    border-color: #8aa37b;
}

/* =========================
   The Fawn Glade (highlight)
========================= */
.register-form .fawn-glade {
    background: #e9efe6;          /* muted moss */
    border-color: #b7c6b2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Primary action */
.register-form .primary-button {
    align-self: center;
    padding: 12px 36px;
    font-size: 16px;
    letter-spacing: 0.3px;
    border-radius: 22px;
    background: #6f8f6b;
    color: #fff;
    border: none;
    cursor: pointer;
}

.register-form .primary-button:hover {
    background: #5f7e5b;
}

/* Error display */
.form-error {
    background: #f3dddd;
    border: 1px solid #d6b5b5;
    color: #7a3f3f;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
}

/* Footer link */
.register-page .login-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}
/* Login link (secondary action) */
.register-page .login-link {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #6b6b6b;
}

.register-page .login-link a {
    color: #6f8f6b;
    text-decoration: none;
    font-weight: 500;
}

.register-page .login-link a:hover {
    text-decoration: underline;
}
/* ============================================================
   Forest Fawns — Button System (Canon v1)
   OPT-IN via .btn classes only
============================================================ */

/* Base button */
.btn {
    appearance: none;
    -webkit-appearance: none;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;

    padding: 8px 14px;
    border-radius: var(--r-sm);

   border: 1px solid var(--border-soft);
    background: var(--paper-1);
    color: var(--ink-main);

    cursor: pointer;
    white-space: nowrap;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.05s ease;
}

/* Hover */
.btn:hover {
    background: var(--paper-1);
    border-color: var(--border-strong);
}

/* Active */
.btn:active {
    transform: translateY(1px);
}

/* Disabled */
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   Variants
============================================================ */

.btn-primary {
    background: #6e8f6a;
    border-color: #5f7e5b;
    color: #ffffff;
}

.btn-primary:hover {
    background: #5f7e5b;
    border-color: #557252;
}

.btn-primary:disabled {
    background: #9bb39a;
    border-color: #8aa38a;
    color: #f4f6f1;
}

.btn-secondary {
    background: #e7efe6;
    border-color: #cfe0cf;
    color: #4f5a3f;
}

.btn-secondary:hover {
    background: #dfe9dd;
}

.btn-danger {
    background: #f3e2de;
    border-color: #d6b4ab;
    color: #7a3f35;
}

.btn-danger:hover {
    background: #ecd6d1;
}

/* ============================================================
   Sizes (optional)
============================================================ */

.btn-small {
    font-size: 13px;
    padding: 6px 10px;
}

.btn-large {
    font-size: 15px;
    padding: 10px 18px;
}
.sidebar-exploration-buddy {
    margin-top: 14px;
}

.exploration-buddy {
    font-size: 13px;
}

.buddy-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.buddy-status {
    opacity: 0.75;
    margin-bottom: 6px;
}

.buddy-actions {
    display: flex;
    gap: 6px;
}

.buddy-actions form {
    margin: 0;
}
/* =========================
   Exploration Buddy (Sidebar)
========================= */
.sidebar-exploration-buddy .exploration-buddy {
    text-align: center;
}

.sidebar-exploration-buddy .buddy-name {
    margin-bottom: 4px;
}

.sidebar-exploration-buddy .buddy-status {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 10px;
}

.sidebar-exploration-buddy .buddy-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}
/* =========================
   Exploration Buddy – Deer Link
========================= */
.sidebar-exploration-buddy .buddy-name a {
    color: #5b6f4a;              /* same moss tone as Preserve links */
    text-decoration: none;
    font-weight: 500;
}

.sidebar-exploration-buddy .buddy-name a:hover {
    text-decoration: underline;
}
/* =========================
   Filter
========================= */
.flash-error {
    background: #fbeaea;
    border: 1px solid #d9a3a3;
    color: #7a2e2e;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}
/* ==========================================================
   Global Link Style — Forest Fawns (CANON)
========================================================== */

a {
  color: #4f6b4a;            /* moss ink */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

/* Hover: underline appears softly */
a:hover {
  color: #3f5d3a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Visited should NOT turn purple */
a:visited {
  color: #4f6b4a;
}

/* Focus (keyboard accessibility) */
a:focus-visible {
  outline: 2px solid rgba(110, 143, 106, 0.4);
  outline-offset: 2px;
}

/* ==========================================================
   Context exceptions
========================================================== */

/* Buttons should not inherit link styling */
a.button {
  text-decoration: none !important;
  color: inherit;
}

/* Inbox rows / clickable cards */
.messages-link,
.forum-thread-link,
.forum-category-link {
  color: inherit;
  text-decoration: none;
}

/* Message body links (inside WYSIWYG) */
.message-body a,
.forum-post-body a {
  font-weight: 600;
}

/* Subtle links (Back, Cancel, meta links) */
a.subtle-link {
  font-size: 0.85rem;
  color: var(--berry);
}

a.subtle-link:hover {
  color: var(--berry-hover);
}
/* =========================
   Message rows with avatars
========================= */

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

/* Left / right alignment */
.message-row.mine {
  flex-direction: row-reverse;
}

/* Avatar */
.message-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #b8c1a2;
  background: #eef2df;
}

/* Bubble spacing */
.message-row.mine .message-bubble {
  text-align: right;
}

/* Prevent avatars from stretching layout */
.message-avatar {
  flex: 0 0 auto;
}
/* ==========================================================
   Base Panel (Canon v1)
   SAFE: only applies when .panel is explicitly used
========================================================== */

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
}
.contact-page {
  max-width: 720px;
  margin: 0 auto;
}

.contact-card {
  background: #f6f7eb;
  border: 1px solid #c9d1b6;
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 18px;
}

.contact-list {
  margin: 12px 0 8px 18px;
}

.contact-note {
  margin-top: 14px;
}
/* =========================
   Privacy Policy Page (FIXED)
========================= */

.privacy-page {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Single document container */
.privacy-page .policy-content {
  background: #f6f7eb;
  border: 1px solid #c9d1b6;
  border-radius: 14px;
  padding: 26px 30px;
}

/* Headings */
.privacy-page h1 {
  margin-bottom: 6px;
}

.privacy-page h3 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #3f4a33;
}

/* Text spacing */
.privacy-page p {
  margin-bottom: 12px;
}

.privacy-page ul {
  margin: 8px 0 14px 22px;
}

.privacy-page li {
  margin-bottom: 6px;
}

/* Muted meta text */
.privacy-page .muted {
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* Links */
.privacy-page a {
  color: #4f6b4a;
  text-decoration: underline;
}
/* =========================
   Policy Pages (Shared)
========================= */

.privacy-page,
.terms-page {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.65;
}

.policy-content {
  background: #f6f7eb;
  border: 1px solid #c9d1b6;
  border-radius: 14px;
  padding: 26px 30px;
}

/* Section headings */
.policy-content h3 {
  margin-top: 26px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: #3f4a33;
}

.policy-content p {
  margin-bottom: 12px;
}

.policy-content ul {
  margin: 8px 0 14px 22px;
}

.policy-content li {
  margin-bottom: 6px;
}

/* Rules highlight box */
.rules-highlight {
  background: #eef1dc;
  border: 1px solid #c9d1b6;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0 24px;
}

.rules-highlight h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #3f4a33;
}

.rules-highlight ul {
  margin: 0 0 0 18px;
}
/* =========================
   Credits Page
========================= */

.credits-page {
  max-width: 720px;
}

.credits-intro {
  margin-bottom: 18px;
}

.credits-card {
  background: var(--panel-bg, #f6f2ea);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 22px 24px;
}

.credits-section + .credits-section {
  margin-top: 18px;
}

.credits-card h3 {
  margin-bottom: 6px;
}

.credits-card a {
  text-decoration: none;
}

.credits-card a:hover {
  text-decoration: underline;
}

.credits-note {
  margin-top: 20px;
  font-size: 0.9em;
}
/* ==================================================
   Mobile Navigation — Base (Step 2)
   - Hidden by default
   - Desktop unchanged
================================================== */

/* Hide hamburger by default (desktop) */
.nav-burger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

/* Mobile nav hidden everywhere by default */
.mobile-nav {
  display: none;
}

/* =========================
   Mobile breakpoint
========================= */
@media (max-width: 900px) {

  /* Show hamburger on mobile */
  .nav-burger {
    display: block;
  }

  /* Hide desktop nav on mobile */
  .main-nav {
    display: none;
  }
}
@media (max-width: 900px) {

  /* Allow header items to align cleanly */
  .logo-nav-wrap {
    align-items: center;
    justify-content: space-between;
    padding-right: 16px;
  }

  /* Prevent logo from hogging the row */
  .site-logo {
    max-width: 75%;
    height: auto;
  }
}
@media (max-width: 900px) {

  /* Allow flex children to shrink */
  .logo-nav-wrap > * {
    min-width: 0;
  }

  /* Logo must be allowed to shrink */
  .site-logo {
    width: auto;
    max-width: calc(100% - 48px);
    flex-shrink: 1;
  }

  /* Burger gets guaranteed space */
  .nav-burger {
    flex: 0 0 40px;
    margin-left: 8px;
  }
}
/* =========================
   Hamburger Icon
========================= */

.nav-burger-lines {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-main);
  position: relative;
}

.nav-burger-lines::before,
.nav-burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--ink-main);
}

.nav-burger-lines::before {
  top: -7px;
}

.nav-burger-lines::after {
  top: 7px;
}
@media (max-width: 900px) {

  /* Neutralize display: contents on mobile */
  .main-nav {
    display: none !important;
  }

  /* Ensure burger always has a box */
  .nav-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 900px) {

  /* Kill contents behavior on mobile */
  .main-nav {
    display: none !important;
  }

  /* Also hide the actual nav element */
  .top-nav {
    display: none;
  }

  /* Show hamburger */
  .nav-burger {
    display: flex;
  }
}
@media (max-width: 900px) {
  .mobile-nav.is-open {
    display: block;
  }
}
/* =========================
   Mobile Nav – Panel Base
========================= */

@media (max-width: 900px) {
  .mobile-nav.is-open {
    display: block;
    background: var(--paper-1);
    border-bottom: 2px solid var(--border-frame);
    padding: 16px 20px;
  }
}
/* =========================
   Mobile Layout – Hide Sidebar
========================= */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .layout {
    flex-direction: column;
  }
}

/* ======================================
   Mobile Header – Hamburger Polish
====================================== */

@media (max-width: 900px) {

  /* Header row alignment */
  .logo-nav-wrap {
    align-items: center;
  }

  /* Hamburger button container */
  .nav-burger {
    width: 40px;
    height: 40px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border-soft);

    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.6),
      0 1px 3px rgba(0,0,0,0.08);
  }

  /* Subtle hover / tap feedback */
  .nav-burger:hover {
    background: rgba(255, 255, 255, 0.65);
  }

  /* Hamburger lines */
  .nav-burger-lines,
  .nav-burger-lines::before,
  .nav-burger-lines::after {
    width: 20px;
    height: 2px;
    background: var(--ink-main);
    border-radius: 2px;
  }

  .nav-burger-lines::before {
    top: -6px;
  }

  .nav-burger-lines::after {
    top: 6px;
  }
}
@media (max-width: 900px) {
  .nav-burger {
    margin-top: 2px;
  }
}
@media (max-width: 900px) {

  /* Make header a positioning context */
  .site-header {
    position: relative;
  }

  /* Position hamburger near content edge */
  .nav-burger {
    position: absolute;
    right: 16px;
    bottom: 14px;   /* 👈 key value */
    top: auto;
    margin: 0;
  }
}
/* ======================================================
   Mobile HUD — Site-wide (v1, TOP)
   Token-pure • Calm • Readable • Grounded
====================================================== */

.mobile-hud {
  display: none;
}

@media (max-width: 768px) {

  .mobile-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    height: 56px;
    padding: 10px 14px;

    /* Berry surface with depth */
    background:
      linear-gradient(
        to bottom,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.02)
      ),
      var(--bark);

    border-bottom: 1px solid var(--berry-soft-border);

    font-size: 13px;

    /* Paper ink on berry */
    color: var(--paper-1);

    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.25),
      0 3px 8px rgba(0,0,0,0.18);
  }

  /* =========================
     HUD Items
  ========================= */

  .hud-item {
    position: relative;
    padding: 0 10px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
  }

  /* Visible but soft dividers */
  .hud-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 22px;
    background: rgba(251,250,245,0.45); /* paper-1, translucent */
  }

  /* =========================
     Player Link (override green)
  ========================= */

  .hud-player {
  flex: 1 1 auto;
  min-width: 0;          /* REQUIRED for ellipsis to work in flex */
  max-width: 45%;        /* prevents name from stealing space */
  overflow: hidden;
}
.mobile-hud .hud-player-link {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-item {
  flex-shrink: 0;
}
@media (max-width: 390px) {
  .hud-player {
    max-width: 38%;
  }
}


  .mobile-hud .hud-player-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-weight: 600;
    text-decoration: none;

    /* FORCE paper ink, beat global link styles */
    color: var(--paper-1);
  }

  .mobile-hud .hud-player-link:hover,
  .mobile-hud .hud-player-link:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* =========================
     Layout Safety
  ========================= */

  body {
    padding-top: 64px;
  }
}
/* ======================================================
   Mobile Navigation — Readability & Hierarchy
====================================================== */

@media (max-width: 768px) {

  /* Nav container */
  .mobile-nav {
    padding: 12px 0;
  }

  .mobile-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* =========================
     Section groups
  ========================= */

  .mobile-nav-group {
    padding: 0 16px;
  }

  /* Section titles */
  .mobile-nav-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 6px;
  }

  /* =========================
     Links
  ========================= */

  .mobile-nav a {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink-main);
    text-decoration: none;
  }

  /* Soft separators between links */
  .mobile-nav-group a + a {
    border-top: 1px solid var(--border-soft);
  }

  /* Touch / hover affordance (very subtle) */
  .mobile-nav a:active,
  .mobile-nav a:hover {
    background: var(--paper-3);
    border-radius: var(--r-sm);
    padding-left: 6px;
    padding-right: 6px;
  }

  /* =========================
     Standalone links (Help)
  ========================= */

  .mobile-nav-link {
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-main);
    text-decoration: none;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:active {
    background: var(--paper-3);
    border-radius: var(--r-sm);
  }
}
/* ===============================
   Mobile Nav — Logout
=============================== */

.mobile-nav-logout {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
}

.mobile-nav-logout .logout-link {
  display: block;
  font-weight: 600;
  color: var(--ink-muted);
}

.mobile-nav-logout .logout-link:hover {
  color: var(--ink-main);
}
.footer-game-time {
  display: none;
  margin: 6px 0 10px;
  text-align: center;
}

@media (max-width: 760px) {
  .footer-game-time {
    display: block;
  }
}
/* ==================================================
   Cart Layer — Above Global Header (CANON FIX)
================================================== */

/* Desktop cart must beat nav dropdowns (z-index: 1000) */
.desktop-cart-panel {
  z-index: 1100 !important;
}

.desktop-cart-backdrop {
  z-index: 1090 !important;
}
.sidebar-logout {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.75;
}

.sidebar-logout a {
    text-decoration: none;
    color: var(--ink-muted);
}

.sidebar-logout a:hover {
    opacity: 1;
    text-decoration: underline;
}
.nav-logout {
  color: var(--ink-muted);
}

.nav-logout:hover {
  color: var(--ink-main);
}
/* ===============================
   Forest Fawns — Ad Placeholder (CSS-only)
   Purpose: simulate ad placement safely (no scripts)
================================ */

.ff-ad-slot {
  width: 100%;
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  background: var(--paper-2);
  padding: 10px;
  box-sizing: border-box;
}

.ff-ad-label {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ff-ad-box {
  border-radius: 10px;
  background: var(--paper-1);
  border: 1px solid var(--border-soft);
  padding: 12px;
}

.ff-ad-line {
  height: 10px;
  border-radius: 999px;
  background: var(--paper-3);
  border: 1px solid var(--border-soft);
  margin-top: 8px;
}

.ff-ad-line--title {
  height: 14px;
  margin-top: 0;
  width: 72%;
}

/* Suggested sizes (optional helpers) */
.ff-ad-slot--sidebar {
  max-width: 300px;   /* common sidebar unit */
}

.ff-ad-slot--footer {
  max-width: 728px;   /* common desktop footer unit */
  margin-left: auto;
  margin-right: auto;
}

/* Mobile-friendly footer sizing */
@media (max-width: 600px) {
  .ff-ad-slot--footer {
    max-width: 100%;
  }
}
/* =====================================
   Global Button System (Token-Based)
===================================== */

.button {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-soft);
    background: var(--paper-3);
    color: var(--ink-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

.button:hover {
    background: var(--paper-2);
}

/* Primary */
.button-primary {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.button-primary:hover {
    background: var(--btn-primary-hover);
}

/* Secondary (soft) */
.button-secondary {
    background: var(--berry-soft-bg);
    border: 1px solid var(--berry-soft-border);
    color: var(--ink-main);
}

.button-secondary:hover {
    background: var(--berry);
    color: #fff;
}
a.button {
    text-decoration: none;
}

a.button.button-primary {
    color: var(--btn-primary-text);
}
a.button.button-danger {
  background: var(--danger-bg);
  border-color: var(--danger-bg);
  color: #fff;
}

a.button.button-danger:hover,
a.button.button-danger:focus {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: #fff;
}
/* Remove stray blinking caret outside inputs */
body {
  caret-color: transparent;
}
input,
textarea {
  caret-color: auto;
}
/* ============================================================
   Game — High Scores Link Pill (Reusable)
============================================================ */

.game-leaderboard-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;

  background: var(--paper-3);
  border: 1px solid var(--border-soft);

  font-size: 13px;
  text-decoration: none;
  color: var(--ink-main);

  transition: all 0.15s ease;
}

.game-leaderboard-link:hover {
  background: var(--paper-2);
  border-color: var(--border-strong);
}
/* =========================================
  Back Link (World → Games, etc.)
========================================= */

.main-back-link {
  display: inline-block;
  margin-top: 22px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.1s ease;
}

.main-back-link:hover {
  color: var(--ink-main);
  transform: translateX(-2px);
}

/* ============================
   Personal Best Pill (Echo Style)
============================ */

.game-best {
   display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;

  background: var(--pill-games-bg);

  font-size: 13px;
  text-decoration: none;
  color: var(--ink-main);

  transition: all 0.15s ease;
}
