[hidden] {
  display: none !important;
}

:root {
  --brand: #5EFF0D;
  --brand-hover: #0050FF;
  --brand-ink: #0A141E;
  --brand-bg: rgb(94 255 13 / 0.12);
  --brand-border: rgb(94 255 13 / 0.35);
  --radius-panel: 0;
  --radius-md: 0;
  --radius-sm: 0;
  --radius-xs: 0;
  --notch: none;
  --red: #FF3838;
  --red-hover: #E62E2E;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-bar {
  width: 100%;
  max-width: calc(760px + var(--host-rail-w, 0px));
  margin: 0 auto;
  padding-inline: var(--page-padding);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 24px;
  background: linear-gradient(to bottom, rgb(10 20 30 / 0.9), transparent);
}

.topbar-brand {
  display: flex;
  align-items: flex-end;
  text-decoration: none;
}

.topbar-brand img {
  height: 48px;
  width: auto;
  display: block;
  transition: transform 0.3s, filter 0.3s;
}

.topbar-brand:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08));
}

.topbar-title {
  padding-left: 4px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 20px;
  color: var(--text);
  transition: color 0.3s;
}

.topbar-brand:hover .topbar-title {
  color: var(--brand);
}

.topbar-links,
.topbar-actions {
  display: none;
}

.topbar-links {
  flex: 1;
  justify-content: center;
  gap: 40px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
}

.topbar-links a,
.mobile-menu-links a {
  color: var(--text);
  text-decoration: none;
}

.topbar-links a:hover,
.mobile-menu-links a:hover {
  color: var(--secondary);
}

.topbar-actions {
  gap: 16px;
}

.topbar-button {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--brand);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.topbar-button:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}

.topbar-button-primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.topbar-button-primary:hover {
  background: var(--secondary);
  color: var(--brand-ink);
}

.topbar-menu-button,
.mobile-menu-close {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.topbar-menu-button svg,
.mobile-menu-close svg {
  width: 32px;
  height: 32px;
  display: block;
}

@media (min-width: 1360px) {
  .topbar-links,
  .topbar-actions {
    display: flex;
  }

  .topbar-menu-button {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.75;
}

.mobile-menu-panel {
  position: relative;
  width: 80%;
  height: 100%;
  padding: 24px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: 24px;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
}

.site-header {
  height: auto;
  min-height: var(--header-h);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.page-title-link {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.page-tagline {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
}

.button-primary,
.button-primary-outline,
.small-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 2px solid var(--brand);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out);
}

.button-primary,
.small-button-primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.small-button-primary {
  padding: 6px 16px;
  border-width: 1px;
}

.button-primary:hover:not(:disabled),
.small-button-primary:hover:not(:disabled) {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--brand-ink);
}

.button-primary-outline {
  background: transparent;
  color: var(--brand);
}

.button-primary-outline:hover:not(:disabled) {
  border-color: var(--secondary);
  color: var(--secondary);
}

.button-primary:disabled,
.button-primary-outline:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 16px;
  }

  .site-header-inner {
    padding-block: 12px;
    flex-wrap: wrap;
  }

  .page-title-link {
    flex-wrap: wrap;
    row-gap: 4px;
  }
}

main.app {
  max-width: calc(760px + var(--host-rail-w, 0px));
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-8) var(--page-padding) clamp(40px, 6vw, 64px);
  flex: 1;
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 var(--sp-6);
}

.panel {
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 var(--sp-3);
}

.panel p {
  color: var(--text-muted);
  margin: 0 0 var(--sp-4);
}

code {
  background: var(--bg-inset);
  border-radius: var(--radius-xs);
  padding: 0.1rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text);
}

.dropzone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}

.dropzone.is-over {
  border-color: var(--info);
  background: var(--info-bg);
}

.dropzone-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.dropzone .hint {
  margin: 0 auto;
  max-width: 34rem;
}

.dropzone-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.status-error {
  color: var(--danger);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

button.char-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

button.char-card:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}

button.char-card.selected {
  border-color: var(--info);
  background: var(--info-bg);
  color: var(--text);
}

.char-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--info);
}

.char-lv {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 0.4rem;
}

.char-guid {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

.char-guid b {
  font-weight: 600;
  color: var(--text);
}

.char-grid.danger .char-card.selected {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.confirm-panel {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
}

.confirm-panel p {
  margin: 0;
  color: var(--warning);
}

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.steam-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
}

.steam-ok {
  color: var(--success);
}

.steam-profile-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  border-radius: var(--radius-md);
}

.steam-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.steam-profile-text {
  min-width: 0;
}

.steam-profile-name {
  margin: 0;
  font-weight: 600;
}

.steam-profile-text .hint {
  margin-top: 0.15rem;
}

.save-help {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
}

.save-help h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 var(--sp-3);
}

.save-help p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 var(--sp-3);
}

.save-help ol {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 var(--sp-4);
  padding-left: 1.25rem;
}

.save-help li {
  margin-bottom: 0.4rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field-group {
  margin-bottom: var(--sp-5);
}

.save-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.wizard-step {
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-6);
  position: relative;
}

.wizard-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-4) - 1px);
  top: calc(2 * var(--sp-4));
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.wizard-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(2 * var(--sp-4));
  height: calc(2 * var(--sp-4));
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wizard-step-content {
  flex: 1;
  min-width: 0;
}

.wizard-step-content > label {
  padding-top: 0.4rem;
}

.wizard-step-body {
  margin-top: var(--sp-3);
}

.tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: -1px;
}

.tab-btn:hover {
  background: transparent;
  color: var(--text);
}

.tab-btn.active {
  color: var(--success);
  border-bottom-color: var(--success);
}

.hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.link-secondary { color: var(--secondary); text-decoration: none; }
.link-secondary:hover { text-decoration: underline; }
.hint-indent { margin-left: 1.5rem; }
.hint-spaced { margin-top: 1rem; }
.js-hide { display: none; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.checkbox-row input {
  margin-top: 0.3rem;
}

.checkbox-row label {
  font-weight: 400;
  margin-bottom: 0.15rem;
}

.warning {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  color: var(--text);
  border-radius: var(--radius-panel);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
}

.warning strong {
  color: var(--warning);
}

.error {
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  border-radius: var(--radius-panel);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
  color: var(--text);
}

.success {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  border-radius: var(--radius-panel);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-6);
}

.modal {
  border: 1px solid var(--danger-border);
  background: var(--bg-surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-deep);
  padding: var(--sp-6);
  max-width: 30rem;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(10, 20, 30, 0.7);
}

.modal h2 {
  font-family: var(--font-display);
  margin: 0 0 var(--sp-3);
  font-size: 1.1rem;
  color: var(--danger);
}

.modal p {
  margin: 0 0 var(--sp-5);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.table {
  margin: var(--sp-4) 0;
}

.table td {
  vertical-align: top;
}

.credit-note {
  line-height: 1.6;
  margin-top: var(--sp-6);
}

.credit-note a {
  color: var(--info);
}

.row-override {
  margin-top: 0.3rem;
}

.row-override input {
  width: 100%;
}

.field,
.badge,
.table,
.footer-links,
.host-card-title,
.guide-list-title,
.guide-list a,
.mono-label {
  font-family: var(--font-display);
}

.footer-links {
  margin-bottom: var(--footer-pad-y);
}

.ribbon {
  background: var(--secondary);
}

.bottom-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 32px 16px;
}

.ribbon h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  color: var(--text);
}

.ribbon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button-secondary,
.button-secondary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease-out;
}

.button-secondary {
  background: var(--text);
  color: var(--secondary);
}

.button-secondary-outline {
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.button-secondary-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

.org-footer {
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
}

.org-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 32px;
}

.org-footer-grid .topbar-brand {
  grid-column: 1 / -1;
  justify-self: start;
}

.org-footer h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--text);
}

.org-footer ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.org-footer li a {
  color: var(--text-muted);
  text-decoration: none;
}

.org-footer li a:hover,
.org-footer-discord:hover {
  color: var(--secondary);
}

.org-footer-more summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}

.org-footer-more summary::-webkit-details-marker {
  display: none;
}

.org-footer-more summary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.org-footer-more[open] summary svg {
  transform: rotate(180deg);
}

.org-footer-more-open,
.org-footer-more[open] .org-footer-more-closed {
  display: none;
}

.org-footer-more[open] .org-footer-more-open {
  display: inline;
}

.org-footer-discord {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand);
}

.org-footer-discord svg {
  display: block;
  width: 40px;
  height: 40px;
}

.org-footer-copy {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--text-muted);
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .bottom-inner {
    padding-inline: 24px;
  }
}

@media (min-width: 768px) {
  .org-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bottom-inner {
    padding: 48px 32px;
  }

  .ribbon .bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 56px;
  }

  .ribbon-actions {
    flex-shrink: 0;
    margin-top: 0;
  }
}

@media (min-width: 1280px) {
  .org-footer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .org-footer-grid .topbar-brand {
    grid-column: auto;
    align-self: start;
  }

  .org-footer-copy {
    text-align: center;
  }
}
