/* Design A: shared website contract. Layout, data colours and gameplay controls stay page-owned. */
:root {
  --fth-bg: #111;
  --fth-panel: #191919;
  --fth-inset: #141414;
  --fth-raised: #202020;
  --fth-text: #eee;
  --fth-muted: #b8b8b8;
  --fth-gold: #ffd100;
  --fth-brand-gold: #ebc67d;
  --fth-primary: #e2bd68;
  --fth-primary-hover: #ebca83;
  --fth-primary-text: #171510;
  --fth-border: #414141;
  --fth-panel-border: #71633e;
  --fth-control-border: #b59d37;
  --fth-input-border: #81713b;
  --fth-control: #29271c;
  --fth-selected: #2c291b;
  --fth-radius: 3px;
  --fth-touch: 44px;
  --fth-font: Verdana, Tahoma, sans-serif;
  --fth-space-xs: 8px;
  --fth-space-sm: 12px;
  --fth-space-md: 16px;
  --fth-space-lg: 24px;
  --fth-space-xl: 32px;
}
body.fth-design, body.admin-access {
  --bg: var(--fth-bg);
  --panel: var(--fth-panel);
  --text: var(--fth-text);
  --muted: var(--fth-muted);
  --gold: var(--fth-gold);
  --body: var(--fth-font);
  background-color: var(--fth-bg);
  color: var(--fth-text);
  font-family: var(--fth-font);
}
/* Standard action buttons only. Talent nodes, role/class choices, sync and navigation retain their own geometry. */
:is(.fth-design, .admin-access) .button {
  min-height: var(--fth-touch);
  max-width: 100%;
  border-radius: var(--fth-radius);
  border: 1px solid var(--fth-control-border);
  background: var(--fth-control);
  color: var(--fth-gold);
  font-family: var(--fth-font);
  font-size: 15px;
  white-space: normal;
  box-shadow: none;
  text-shadow: none;
}
:is(.fth-design, .admin-access) .button.primary {
  background: var(--fth-primary);
  color: var(--fth-primary-text);
  border-color: var(--fth-primary);
  font-weight: 700;
}
:is(.fth-design, .admin-access) .button:hover:not(:disabled) {
  background: #353021;
  border-color: var(--fth-gold);
  filter: none;
  text-decoration: none;
}
:is(.fth-design, .admin-access) .button.primary:hover:not(:disabled) { background: var(--fth-primary-hover); }
:is(.fth-design, .admin-access) .button:disabled {
  cursor: not-allowed;
  background: var(--fth-raised);
  color: var(--fth-muted);
  border-color: var(--fth-border);
  box-shadow: none;
}
:is(.fth-design, .admin-access) :focus-visible { outline: 2px solid var(--fth-gold); outline-offset: 4px; }
/* Administration uses existing native action buttons, not the website .button class. */
.admin-access button { min-height: var(--fth-touch); font-size: 15px; border-radius: var(--fth-radius); }
.admin-access button.primary { background: var(--fth-primary); color: var(--fth-primary-text); border-color: var(--fth-primary); font-weight: 700; }
.admin-access button.primary:hover:not(:disabled) { background: var(--fth-primary-hover); }
/* Do not style checkboxes, hidden file pickers or the talent level spinner with text-field geometry. */
:is(.fth-design, .admin-access) :is(form, .news-controls, .prof-filters, .character-recipe-filters, .invite-output) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  min-height: var(--fth-touch);
  min-width: 0;
  max-width: 100%;
  background: var(--fth-inset);
  color: var(--fth-text);
  border-color: var(--fth-input-border);
  border-radius: var(--fth-radius);
  font-family: var(--fth-font);
}
:is(.fth-design, .admin-access) input::placeholder,
:is(.fth-design, .admin-access) textarea::placeholder { color: var(--fth-muted); }
:is(.fth-design, .admin-access) input[aria-invalid=true],
:is(.fth-design, .admin-access) textarea[aria-invalid=true] { border-color: #e79478; }
/* Major content surfaces only. Item rarity, class roles, member ranks and semantic status surfaces remain untouched. */
.fth-design :is(.panel, .addon-panel, .news-card, .de-panel, .supply-box) {
  background: var(--fth-panel);
  border-color: var(--fth-panel-border);
  border-radius: var(--fth-radius);
  box-shadow: none;
}
.fth-design :is(.field-note, .coverage-note, .character-help, .character-empty, .prof-source, .prof-evidence, .news-note, .news-card time, .news-card small, .de-help, .de-party-slot small) {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fth-muted);
}
.fth-design :is(.character-item-copy small, .character-profession small, .character-recipe small, .team-buff small, .team-buff > span, .player-card small, .player-controls label, .placeholder-copy small, .placeholder-copy p, .supply-item small, .supply-item > span, .supply-box > small, .supply-tip) {
  font-size: 13px;
  line-height: 1.5;
}
.fth-design .addon-gallery-choices button { font-size: 13px; }
.fth-design .addon-gallery-preview span { font-size: 13px; }
/* Decorative brand/hero lettering is intentionally excluded from the interface heading contract. */
.fth-design :is(.characters-heading h1, .world-heading h1, .news-heading h1, .tf-heading h1) {
  font-family: var(--fth-font);
  font-weight: 400;
  color: var(--fth-gold);
  text-shadow: none;
}
.fth-design :is(.tf-kicker, .tf-beta, .tf-budget > span, .tf-budget small, .tf-notice, .tf-actions button, .tf-classes button, .tf-interaction-hint) { font-size: 13px; }
.fth-design :is(.tf-actions button, .tf-classes button) { min-height: var(--fth-touch); }
/* Shared frame for the three related planning tools; their working areas stay page-owned. */
body.fth-planner-page .fth-planner-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 56px;
}
.fth-planner-page .fth-planner-heading {
  display: block;
  margin: 0 0 24px;
  padding: 0;
  min-width: 0;
}
.fth-planner-page .fth-planner-heading .fth-planner-kicker {
  margin: 0 0 12px;
  color: var(--fth-primary);
  font: 700 13px/1.5 var(--fth-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fth-planner-page .fth-planner-heading h1 {
  margin: 0 0 16px;
  color: var(--fth-gold);
  font: 400 clamp(32px, 3.4vw, 48px)/1.15 var(--fth-font);
  letter-spacing: normal;
  text-shadow: none;
  overflow-wrap: anywhere;
}
.fth-planner-page .fth-planner-heading .fth-planner-intro {
  max-width: 760px;
  margin: 0;
  color: var(--fth-muted);
  font: 400 16px/1.6 var(--fth-font);
}
.fth-planner-page .fth-planner-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  font: 400 14px/1.5 var(--fth-font);
}
.fth-planner-page .fth-planner-nav a {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: var(--fth-touch);
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--fth-border);
  border-radius: var(--fth-radius);
  background: var(--fth-panel);
  color: var(--fth-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.fth-planner-page .fth-planner-nav a:hover,
.fth-planner-page .fth-planner-nav a[aria-current=page] {
  border-color: var(--fth-control-border);
  background: var(--fth-selected);
  color: var(--fth-gold);
}
.fth-planner-page .fth-planner-nav .site-feature-new { margin-left: 0; }
.fth-planner-page .site-feature-new[hidden] { display: none; }
@media(max-width:700px) {
  body.fth-planner-page .fth-planner-main { padding: 24px 16px 40px; }
  .fth-planner-page .fth-planner-nav a { padding: 10px 12px; }
}
@media(prefers-reduced-motion:reduce) {
  .fth-design { scroll-behavior: auto; }
  .fth-design .button { transition: none; }
}
