/* Base resets, typography, shared chrome (btn/glass/field) */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100dvh;
  background: radial-gradient(ellipse at 20% 10%, rgba(80, 200, 180, 0.35), transparent 42%),
  radial-gradient(ellipse at 85% 80%, rgba(20, 60, 70, 0.55), transparent 50%),
  linear-gradient(165deg, #1a8f84 0%, #0f5a54 45%, #083834 100%);
  color: var(--text);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem !important;
  width: 100% !important;
}

.field.compact {
  margin-top: 0.15rem;
}

.field span {
  font-size: 0.75rem !important;
  opacity: 0.8;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input {
  padding: 0.75rem 0.85rem;
  min-height: var(--touch);
  border: 1px solid var(--stroke) !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: var(--text) !important;
  font-size: 16px;
  box-shadow: var(--shadow-down);
  width: 100%;
}

.btn {
  border: 2px solid #b7d4ce;
  border-radius: 14px;
  padding: 0.75rem 1.2rem;
  min-height: var(--touch);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: var(--neo-face);
  color: var(--ink);
  box-shadow: 4px 4px 10px var(--neo-dark),
  -3px -3px 8px var(--neo-light);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
  box-shadow: inset 3px 3px 8px var(--neo-dark),
  inset -2px -2px 6px var(--neo-light);
}

.btn-locked, .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.btn-primary {
  background: #f0d78c;
}

.btn-accent {
  background: #e07a4a;
  color: #1a120c;
}

.btn-small, .btn-touch {
  width: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 10px;
  min-height: var(--touch);
}

.error {
  color: #ffd0d0;
  background: rgba(120, 20, 20, 0.45);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  width: 100% !important;
  border: 1px solid rgba(255, 120, 120, 0.35);
}

.xp-bar {
  height: 10px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-radius: 999px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3ecf9a, #f0d78c) !important;
  transition: width 0.25s ease;
  border-radius: 999px;
}

.btn-icon {
  min-width: 42px !important;
  padding: 0 !important;
  width: 42px !important;
  display: grid !important;
  place-items: center;
}

.chip {
  border: 1px solid var(--stroke) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 999px !important;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-dim) !important;
  font-family: var(--font-ui);
  font-weight: 700;
}

.chip.active {
  background: var(--teal) !important;
  color: #fff !important;
  border-color: #0f7a6a !important;
}

.ico {
  display: inline-flex;
  vertical-align: -0.15em;
}

.ico svg {
  width: 1em;
  height: 1em;
  display: block;
}

.ico.ico-art {
  width: 1em;
  height: 1em;
}

.ico.ico-art img {
  width: 1em;
  height: 1em;
  object-fit: contain;
  display: block;
}

.panel-inset {
  background: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.65rem;
  color: var(--text);
}

.btn-ghost {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: var(--text-dim) !important;
  box-shadow: none !important;
  width: auto !important;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--stroke) !important;
}

.muted {
  opacity: 1 !important;
  font-size: 0.75rem;
  color: var(--text-dim) !important;
}

.glass-card, .modal-card.glass-card {
  background: linear-gradient(165deg, rgba(28, 55, 50, 0.95), rgba(10, 22, 20, 0.98)) !important;
  color: var(--text) !important;
  border: 1px solid var(--stroke) !important;
  border-radius: calc(var(--radius) + 4px) !important;
  box-shadow: var(--shadow-up), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.glass-bar {
  background: var(--glass) !important;
  border: 1px solid var(--stroke) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.neo-btn.btn, .btn.neo-btn {
  border: 1px solid var(--stroke-strong) !important;
  border-radius: var(--radius-sm) !important;
  background: linear-gradient(180deg, #2a6f66, #1a4f4a) !important;
  color: var(--foam) !important;
  box-shadow: var(--shadow-up) !important;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.neo-btn.btn:active, .btn.neo-btn:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-down) !important;
}

.btn-primary.neo-btn, .neo-btn.btn-primary, .btn.btn-primary.neo-btn {
  background: linear-gradient(180deg, #f5dfa0 0%, #e6c35c 45%, #c9a227 100%) !important;
  color: #1a1608 !important;
  border-color: rgba(255, 230, 160, 0.65) !important;
  box-shadow: var(--shadow-up), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.btn-accent.neo-btn, .neo-btn.btn-accent, .btn.btn-accent.neo-btn {
  background: linear-gradient(180deg, #ee9a62 0%, #d07a45 50%, #b55a28 100%) !important;
  color: #1a1008 !important;
  border-color: rgba(255, 180, 120, 0.5) !important;
}

.btn-hero {
  min-height: 52px !important;
  font-size: 1.15rem !important;
  animation: cardIn 0.55s ease-out 0.05s both;
}

.pill-soft {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.85rem;
}

.currency-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.cur-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--stroke);
  min-width: 0;
}

.cur-chip .cur-ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.cur-chip .cur-ico .ico svg {
  width: 1.15em;
  height: 1.15em;
}

.cur-chip [data-i18n] {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
}

.cur-chip strong {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cur-chip.gold strong {
  color: var(--gold);
}

.cur-chip.dia strong {
  color: #7ed7ff;
}

.ico.gear-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ico.gear-stack > svg:first-child {
  width: 1em;
  height: 1em;
}

.ico.gear-stack .branch-mark {
  position: absolute;
  right: -0.12em;
  bottom: -0.08em;
  width: 0.48em;
  height: 0.48em;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.75));
}

.btn-hero, .btn-mode {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  text-align: left;
  padding: 0.85rem 1.1rem !important;
}

.btn-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.btn-label {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.btn-mode .btn-label {
  font-size: 1.05rem;
}

.btn-tile {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 64px !important;
  padding: 0.55rem 0.4rem !important;
  font-size: 0.82rem !important;
  position: relative;
}

.glass-card {
  animation: cardIn 0.5s ease-out both;
}

.btn-tile.has-mail {
  border-color: rgba(220, 120, 80, 0.55) !important;
}

.btn-locked.btn-tile {
  opacity: 0.55;
}
