/* LC_MILESTONE9_5B_PLAYER_GAME_SHELL_CSS_START
   Milestone 9.5B player-facing shell polish.
   Presentation only: no gameplay authority, no hidden state, no admin surface.
   LC_MILESTONE9_5B_PLAYER_GAME_SHELL_CSS_END */

:root {
  --lc-shell-bg: #12100d;
  --lc-shell-panel: #1d1812;
  --lc-shell-panel-soft: #282116;
  --lc-shell-line: #6f5a36;
  --lc-shell-line-soft: rgba(218, 186, 121, 0.28);
  --lc-shell-text: #f4ead8;
  --lc-shell-muted: #c7b99c;
  --lc-shell-accent: #e2b35d;
  --lc-shell-accent-soft: rgba(226, 179, 93, 0.16);
  --lc-shell-danger: #ffb4a6;
  --lc-shell-focus: #ffe8a3;
  --lc-shell-radius: 18px;
  --lc-shell-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --lc-shell-reading-width: 76rem;
}

html {
  scroll-behavior: smooth;
}

body.surface-player {
  min-height: 100vh;
  margin: 0;
  color: var(--lc-shell-text);
  background:
    radial-gradient(circle at top left, rgba(226, 179, 93, 0.18), transparent 36rem),
    linear-gradient(180deg, #17120c 0%, var(--lc-shell-bg) 38%, #0f0d0a 100%);
}

body.surface-player a {
  color: var(--lc-shell-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

body.surface-player a:hover,
body.surface-player a:focus-visible {
  color: var(--lc-shell-focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  border: 2px solid var(--lc-shell-focus);
  border-radius: 999px;
  background: #080706;
  color: var(--lc-shell-focus);
  transition: top 120ms ease-out;
}

.skip-link:focus {
  top: 1rem;
}

.game-shell-header,
.game-shell-footer {
  width: min(100% - 2rem, var(--lc-shell-reading-width));
  margin-inline: auto;
}

.game-shell-header {
  padding: 1.2rem 0 0.8rem;
}

.game-shell-hero {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: var(--lc-shell-radius);
  background: linear-gradient(135deg, rgba(40, 33, 22, 0.92), rgba(29, 24, 18, 0.95));
  box-shadow: var(--lc-shell-shadow);
}

.game-shell-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.game-shell-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.game-shell-kicker {
  margin: 0;
  color: var(--lc-shell-muted);
  font-size: 0.98rem;
}

.game-shell-build {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: 999px;
  color: var(--lc-shell-muted);
  font-size: 0.85rem;
}

.campaign-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: 999px;
  background: var(--lc-shell-accent-soft);
  color: var(--lc-shell-text);
  font-size: 0.9rem;
}

.status-pill.status-muted {
  background: rgba(255, 255, 255, 0.045);
  color: var(--lc-shell-muted);
}

.campaign-primary-nav,
.campaign-operator-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.campaign-primary-nav a,
.campaign-primary-nav button,
.campaign-operator-nav a,
.campaign-operator-nav button {
  min-height: 2.35rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--lc-shell-text);
  font: inherit;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.campaign-primary-nav a:hover,
.campaign-primary-nav a:focus-visible,
.campaign-primary-nav button:hover,
.campaign-primary-nav button:focus-visible,
.campaign-operator-nav a:hover,
.campaign-operator-nav a:focus-visible,
.campaign-operator-nav button:hover,
.campaign-operator-nav button:focus-visible {
  border-color: var(--lc-shell-focus);
  background: rgba(226, 179, 93, 0.17);
  color: var(--lc-shell-focus);
  outline: 3px solid rgba(255, 232, 163, 0.22);
  outline-offset: 2px;
}

.campaign-operator-nav {
  padding-top: 0.65rem;
  border-top: 1px dashed var(--lc-shell-line-soft);
}

.campaign-operator-nav::before {
  content: "Tester and support tools";
  flex-basis: 100%;
  color: var(--lc-shell-muted);
  font-size: 0.86rem;
}

.campaign-main {
  width: min(100% - 2rem, var(--lc-shell-reading-width));
  margin: 1rem auto;
  padding: clamp(1rem, 3vw, 1.7rem);
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: var(--lc-shell-radius);
  background: rgba(29, 24, 18, 0.94);
  box-shadow: var(--lc-shell-shadow);
}

.campaign-main:focus {
  outline: 3px solid rgba(255, 232, 163, 0.28);
  outline-offset: 4px;
}

.campaign-main h1,
.campaign-main h2,
.campaign-main h3 {
  letter-spacing: 0.01em;
}

.campaign-main .muted,
.campaign-main small {
  color: var(--lc-shell-muted);
}

.campaign-main .panel,
.campaign-main .card,
.campaign-main section,
.campaign-main fieldset {
  border-color: var(--lc-shell-line-soft);
  border-radius: 14px;
}

.campaign-main input,
.campaign-main select,
.campaign-main textarea {
  max-width: 100%;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: 10px;
}

.campaign-main button,
.campaign-main input[type="submit"] {
  border-radius: 999px;
}

.game-shell-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--lc-shell-line-soft);
  border-radius: var(--lc-shell-radius);
  background: rgba(18, 16, 13, 0.78);
  color: var(--lc-shell-muted);
}

.game-shell-footer h2,
.game-shell-footer h3 {
  margin: 0 0 0.35rem;
  color: var(--lc-shell-text);
  font-size: 0.95rem;
}

.game-shell-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.theme-high-contrast,
body.theme-high-contrast.surface-player {
  --lc-shell-bg: #000;
  --lc-shell-panel: #000;
  --lc-shell-panel-soft: #111;
  --lc-shell-line: #fff;
  --lc-shell-line-soft: #fff;
  --lc-shell-text: #fff;
  --lc-shell-muted: #e8e8e8;
  --lc-shell-accent: #ffff66;
  --lc-shell-accent-soft: #222;
  --lc-shell-focus: #00ffff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 760px) {
  .game-shell-header,
  .game-shell-footer,
  .campaign-main {
    width: min(100% - 1rem, var(--lc-shell-reading-width));
  }

  .game-shell-title-row,
  .campaign-primary-nav,
  .campaign-operator-nav,
  .campaign-status-strip {
    align-items: stretch;
  }

  .campaign-primary-nav a,
  .campaign-primary-nav button,
  .campaign-operator-nav a,
  .campaign-operator-nav button,
  .status-pill {
    flex: 1 1 10rem;
    justify-content: center;
    text-align: center;
  }

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

/* LC_95B_LEGACY_STATIC_COMPAT_NAV_START */
.campaign-resource-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem auto 0;
  max-width: min(96vw, 72rem);
  padding: 0 1rem;
}

.campaign-resource-nav a {
  border: 1px solid rgba(198, 166, 100, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
}

.campaign-resource-nav a:focus,
.campaign-resource-nav a:hover {
  text-decoration: underline;
}
/* LC_95B_LEGACY_STATIC_COMPAT_NAV_END */

/* LC_PRE10A_PLAYER_IMMERSION_FOOTER_REPAIR_START */
body.surface-player .mode-boundary-strip,
body.surface-player .support-card,
body.surface-player .mechanics-resource-strip,
body.surface-player .campaign-footer-onboarding,
body.surface-player .world-surface-footer-links,
body.surface-player .play-loop-footer-links {
  width: min(100% - 2rem, var(--lc-shell-reading-width, 72rem));
  box-sizing: border-box;
  margin: 0.75rem auto;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.28);
}

body.surface-player .mechanics-resource-strip,
body.surface-player .world-surface-footer-links,
body.surface-player .play-loop-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

body.surface-player .world-surface-footer-links,
body.surface-player .play-loop-footer-links {
  justify-content: center;
}

body.surface-player .campaign-footer-onboarding {
  display: grid;
  gap: 0.75rem;
}

body.surface-player .campaign-footer-onboarding .onboarding-grid {
  width: 100%;
}

body.surface-player details summary {
  cursor: pointer;
}

@media (max-width: 760px) {
  body.surface-player .mode-boundary-strip,
  body.surface-player .support-card,
  body.surface-player .mechanics-resource-strip,
  body.surface-player .campaign-footer-onboarding,
  body.surface-player .world-surface-footer-links,
  body.surface-player .play-loop-footer-links {
    width: calc(100% - 1rem);
    padding: 0.65rem 0.75rem;
  }
}
/* LC_PRE10A_PLAYER_IMMERSION_FOOTER_REPAIR_END */

/* LC_PRE10A_PLAYER_PRESENTATION_BOUNDARY_ACTION_LAYOUT_START */
body.surface-player .action-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 0.8rem;
}

body.surface-player .action-copy {
  min-width: 0;
}

body.surface-player .action-form button[type="submit"] {
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 700px) {
  body.surface-player .action-form {
    grid-template-columns: 1fr;
  }

  body.surface-player .action-form button[type="submit"] {
    justify-self: stretch;
  }
}
/* LC_PRE10A_PLAYER_PRESENTATION_BOUNDARY_ACTION_LAYOUT_END */
/* LC_PRE10A_SLICE1_BROWSER_QA_REPAIR_START */
body.surface-player .actions-panel::before {
  content: none !important;
  display: none !important;
}
/* LC_PRE10A_SLICE1_BROWSER_QA_REPAIR_END */

/* LC_PRE10A_PLAYER_PRESENTATION_BOUNDARY_SLICE2_CARD_LAYOUT_START */
body.surface-player .mechanics-stat-grid,
body.surface-player .gear-slot-grid,
body.surface-player .spell-card-grid,
body.surface-player .inventory-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

body.surface-player .mechanics-stat-grid-small {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

body.surface-player .mechanics-stat,
body.surface-player .gear-slot-card,
body.surface-player .spell-card,
body.surface-player .item-card {
  min-width: 0;
}

body.surface-player .mechanics-stat {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.28);
  padding: 0.75rem;
}

body.surface-player .mechanics-stat span,
body.surface-player .mechanics-stat small {
  display: block;
  color: var(--muted);
}

body.surface-player .mechanics-stat strong {
  display: block;
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

body.surface-player .gear-equipped {
  font-weight: 700;
  overflow-wrap: anywhere;
}

body.surface-player .spell-card h3,
body.surface-player .item-card h3,
body.surface-player .gear-slot-card h3 {
  overflow-wrap: anywhere;
}

body.surface-player .ledger-list li {
  margin: 0.35rem 0;
}
/* LC_PRE10A_PLAYER_PRESENTATION_BOUNDARY_SLICE2_CARD_LAYOUT_END */
