:root {
  --tf-bg: #17120d;
  --tf-panel: rgba(24, 17, 10, 0.58);
  --tf-panel-strong: rgba(24, 17, 10, 0.78);
  --tf-border: rgba(219, 169, 79, 0.38);
  --tf-border-strong: rgba(234, 190, 102, 0.68);
  --tf-gold: #d6a84f;
  --tf-gold-2: #e5bd70;
  --tf-text: #f7d58b;
  --tf-cream: #efe3cf;
  --tf-muted: #c9b27e;
  --tf-danger: #ff9d73;
  --tf-ok: #9fe0a3;
  --tf-shadow: rgba(0, 0, 0, 0.48);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tartarian-service-menu,
.tartarian-frontdoor-menu {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 99999;
  font-family: Cinzel, Georgia, 'Times New Roman', serif;
}

.tartarian-service-menu__toggle,
.tartarian-frontdoor-button {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(229, 189, 112, 0.56);
  border-radius: 18px;
  color: rgba(255, 232, 174, 0.96);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 232, 174, 0.24), transparent 35%),
    linear-gradient(135deg, rgba(84, 54, 24, 0.82), rgba(20, 14, 9, 0.78));
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.44),
    inset 0 0 0 1px rgba(255, 232, 174, 0.08);
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.tartarian-service-menu__toggle:hover,
.tartarian-service-menu__toggle:focus-visible,
.tartarian-service-menu.is-open .tartarian-service-menu__toggle,
.tartarian-frontdoor-button:hover,
.tartarian-frontdoor-button:focus-visible,
.tartarian-frontdoor-menu[data-open="true"] .tartarian-frontdoor-button {
  border-color: rgba(255, 219, 130, 0.86);
  transform: translateY(-1px);
  outline: none;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 232, 174, 0.34), transparent 38%),
    linear-gradient(135deg, rgba(96, 62, 27, 0.92), rgba(22, 15, 9, 0.9));
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.54),
    0 0 26px rgba(214, 168, 79, 0.18),
    inset 0 0 0 1px rgba(255, 232, 174, 0.12);
}

.tartarian-service-menu__sigil {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tartarian-service-menu__drawer,
.tartarian-frontdoor-dropdown {
  position: absolute;
  top: 62px;
  left: 0;
  width: min(260px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid rgba(229, 189, 112, 0.36);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 224, 170, 0.08), transparent 36%),
    rgba(14, 10, 7, 0.72);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 236, 204, 0.08);
  backdrop-filter: blur(18px) saturate(126%);
  -webkit-backdrop-filter: blur(18px) saturate(126%);
  display: grid;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.tartarian-service-menu.is-open .tartarian-service-menu__drawer,
.tartarian-service-menu[data-open="true"] .tartarian-service-menu__drawer,
.tartarian-frontdoor-menu[data-open="true"] .tartarian-frontdoor-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tartarian-service-menu__title {
  color: rgba(229, 189, 112, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 4px 6px;
}

.tartarian-service-menu__item,
.tartarian-frontdoor-dropdown a {
  display: block;
  border: 1px solid rgba(229, 189, 112, 0.22);
  border-radius: 14px;
  color: rgba(246, 227, 190, 0.94);
  background: rgba(20, 14, 9, 0.48);
  padding: 10px 12px;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.tartarian-service-menu__item:hover,
.tartarian-service-menu__item:focus-visible,
.tartarian-frontdoor-dropdown a:hover,
.tartarian-frontdoor-dropdown a:focus-visible {
  border-color: rgba(255, 219, 130, 0.62);
  background: rgba(84, 54, 24, 0.58);
  outline: none;
  transform: translateX(2px);
}

.tartarian-service-menu__item.is-current,
.tartarian-frontdoor-dropdown a[data-active="true"] {
  border-color: rgba(229, 189, 112, 0.56);
  color: rgba(255, 236, 194, 0.98);
  background: rgba(84, 54, 24, 0.36);
}

.tf-shell {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(108,76,31,0.35), transparent 46%),
    linear-gradient(180deg, #24190d 0%, #110d09 100%);
  color: var(--tf-text);
  font-family: Georgia, 'Times New Roman', serif;
}

.tf-card {
  max-width: 720px;
  margin: 8vh auto;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 224, 170, 0.06), transparent 35%),
    rgba(24, 17, 10, 0.62);
  border: 1px solid var(--tf-border);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,236,204,0.08);
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tf-card:hover,
.tf-card:focus-within {
  background:
    linear-gradient(180deg, rgba(255, 224, 170, 0.08), transparent 35%),
    rgba(24, 17, 10, 0.78);
  border-color: var(--tf-border-strong);
  box-shadow: 0 28px 96px rgba(0,0,0,0.44), 0 0 28px rgba(214,168,79,0.08), inset 0 1px 0 rgba(255,236,204,0.12);
}

.tf-login { max-width: 520px; }
.tf-card h1 { margin-top: 0; font-size: 32px; }
.tf-card p { color: var(--tf-muted); line-height: 1.55; }
.tf-ok { color: var(--tf-ok) !important; }
.tf-error { color: var(--tf-danger) !important; }
.tf-debug { word-break: break-all; font-size: 13px; }
.tf-small { font-size: 13px; }
.tf-small a, .tf-card a { color: var(--tf-text); }
.tf-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--tf-border);
  margin-right: 10px;
  background: rgba(214,168,79,0.12);
}
.tf-form { display: grid; gap: 10px; margin-top: 18px; }
.tf-form label { color: var(--tf-text); font-weight: 700; }
.tf-form label span { color: var(--tf-muted); font-weight: 400; }
.tf-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.tf-form input {
  background: rgba(0,0,0,0.32);
  color: var(--tf-text);
  border: 1px solid rgba(214,168,79,0.36);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
.tf-form input:focus-visible {
  outline: none;
  border-color: rgba(255,219,130,0.78);
  box-shadow: 0 0 0 3px rgba(214,168,79,0.12);
}
.tf-form button, .tf-button, .tf-secondary {
  display: inline-block;
  border: 1px solid rgba(214,168,79,0.6);
  background: #d6a84f;
  color: #160f08 !important;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-family: Georgia, 'Times New Roman', serif;
}
.tf-secondary {
  background: transparent;
  color: var(--tf-text) !important;
}
.tf-dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid rgba(214,168,79,0.18);
  border-radius: 12px;
}
.tf-dl dt { color: var(--tf-muted); }
.tf-dl dd { margin: 0; }

.glass-panel,
.lore-block,
.card,
.order-card,
.living-card,
.vessel-card,
.order-expand-panel,
.hero-card,
.forum-board,
.forum-sidebar,
.forum-hero,
.board-toolbar,
.forum-dialog,
.post-card,
.comment-card,
.hero-callout,
.policy-line,
.status-line,
.category-button {
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.lore-block,
.card,
.order-card,
.living-card,
.vessel-card,
.order-expand-panel {
  background-color: rgba(24, 17, 10, 0.54) !important;
  border-color: rgba(219, 169, 79, 0.24) !important;
}

.lore-block:hover,
.lore-block:focus-within,
.card:hover,
.card:focus-within,
.order-card:hover,
.order-card:focus-within,
.living-card:hover,
.living-card:focus-within,
.vessel-card:hover,
.vessel-card:focus-within,
.order-expand-panel:hover,
.order-expand-panel:focus-within,
.hero-card:hover,
.hero-card:focus-within,
.forum-board:hover,
.forum-board:focus-within,
.forum-sidebar:hover,
.forum-sidebar:focus-within,
.forum-hero:hover,
.forum-hero:focus-within,
.board-toolbar:hover,
.board-toolbar:focus-within {
  border-color: rgba(234, 190, 102, 0.58) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 204, 0.12),
    0 24px 72px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(229, 189, 112, 0.08) !important;
  filter: saturate(1.08) brightness(1.04);
}

@media (max-width: 780px) {
  .tartarian-service-menu,
  .tartarian-frontdoor-menu {
    top: 10px;
    left: 10px;
  }

  .tartarian-service-menu__toggle,
  .tartarian-frontdoor-button {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }
}
