:root {
  color-scheme: dark;

  /* Minimalist Slate-Gray & Warm Champagne Gold System */
  --bg-canvas: #111316;
  --bg-surface: #171A1F;
  --bg-surface-elevated: #1D2128;
  --bg-input: #13161B;
  --bg-claimed: #14161A;

  --border-subtle: #262B34;
  --border-strong: #333A46;
  --border-gold: rgba(229, 193, 88, 0.44);
  --border-gold-strong: #E5C158;

  --gold-primary: #E5C158;
  --gold-bright: #F3DFA2;
  --gold-deep: #C7A13A;
  --gold-tint: rgba(229, 193, 88, 0.11);
  --gold-tint-strong: rgba(229, 193, 88, 0.19);

  --text-primary: #F2F4F7;
  --text-secondary: #9CA4B2;
  --text-muted: #848D9E;
  --text-claimed: #6C7483;
  --text-on-gold: #121417;

  --danger-muted: #D47672;
  --danger-tint: rgba(212, 118, 114, 0.11);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --transition-fast: 160ms cubic-bezier(0.2, 0, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  background-image: radial-gradient(ellipse 80% 340px at 50% 0%, rgba(229, 193, 88, 0.055), transparent 72%);
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.icon-xs {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon-sm {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.gold-icon {
  color: var(--gold-primary);
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button,
select,
summary {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
  transition: width var(--transition-fast);
}

.app-shell.is-compact {
  width: min(500px, calc(100% - 20px));
  padding-top: 16px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.creator-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.social-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.social-pill:hover {
  background: var(--gold-tint);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.page-title {
  margin: 0;
  font-size: clamp(1.28rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-primary);
}

.profile-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 38px;
  padding-left: 10px;
  transition: border-color var(--transition-fast);
}

.profile-wrap:hover {
  border-color: var(--border-strong);
}

.profile-icon {
  color: var(--gold-primary);
  pointer-events: none;
}

.profile-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  height: 100%;
  line-height: 36px;
  padding: 0 28px 0 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-select::-ms-expand {
  display: none;
}

.profile-select::picker-icon {
  display: none;
}

.profile-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.profile-select option {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.icon-btn[aria-pressed="true"] {
  background: var(--gold-tint);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.icon-btn.icon-only {
  width: 38px;
  padding: 0;
}

/* Dropdown Menu */
.menu-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 230px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.52);
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.86rem;
  text-align: left;
  transition: background var(--transition-fast);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-item.menu-danger {
  color: var(--danger-muted);
}

.menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--border-subtle);
}

/* Control Strip: Progress & Queue Mode */
.control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.progress-block {
  flex: 1 1 280px;
  min-width: 220px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 0.84rem;
}

.progress-claimed {
  font-weight: 600;
  color: var(--gold-bright);
}

.progress-remaining {
  color: var(--text-secondary);
}

.progress-track {
  height: 7px;
  width: 100%;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-primary));
  transition: width 220ms ease;
}

.queue-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.seg-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.is-active {
  background: var(--gold-tint-strong);
  color: var(--gold-bright);
  font-weight: 600;
}

.micro-toggles {
  display: inline-flex;
  gap: 6px;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.chip-toggle.is-active {
  background: var(--gold-tint);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

/* Hero Rapid-Copy Gold Vault Deck */
.hero-deck {
  padding: 18px 20px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #191D24 0%, #15181E 100%);
  border: 1px solid var(--border-gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.deck-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-tier {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-tint);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.deck-tier.is-event {
  background: rgba(156, 164, 178, 0.1);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.deck-pos {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.badge-new {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-primary);
  color: var(--text-on-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pace-status {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pace-status.is-cooling {
  color: var(--gold-primary);
}

.pace-status.is-ready {
  color: var(--gold-bright);
}

.hero-copy-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 132px;
  padding: 22px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 120ms ease;
}

.hero-copy-btn:hover:not(:disabled) {
  background: #171B22;
  border-color: var(--border-gold-strong);
}

.hero-copy-btn:active:not(:disabled) {
  transform: scale(0.995);
}

.hero-copy-btn:disabled {
  cursor: default;
  opacity: 0.75;
}

.hero-code-text {
  font-family: var(--font-mono);
  font-size: clamp(1.65rem, 4.3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  word-break: break-all;
}

.hero-copy-btn:hover:not(:disabled) .hero-code-text {
  color: var(--gold-bright);
}

.hero-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--gold-bright);
}

.pace-track {
  height: 4px;
  width: 100%;
  margin: 12px 0 12px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}

.pace-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left center;
}

.deck-nav {
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nav-btn:hover:not(:disabled) {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.undo-btn:not(:disabled) {
  border-color: var(--border-gold);
  color: var(--gold-bright);
  background: var(--gold-tint);
}

/* Filter & Search Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  flex: 1 1 250px;
  max-width: 340px;
}

.app-shell.is-compact .search-box {
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus,
.search-input:focus-visible {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(229, 193, 88, 0.24);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.tab-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.tab-pill.is-active {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: var(--text-on-gold);
  font-weight: 600;
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  opacity: 0.85;
}

/* Active & Expired Grids */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.section-hint {
  font-size: 0.8rem;
  color: var(--gold-primary);
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-shell.is-compact .codes-grid {
  grid-template-columns: 1fr;
}

.code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.code-card:hover {
  border-color: var(--border-strong);
}

.code-card.is-current {
  border-color: var(--gold-primary);
  background: #1A1E25;
  box-shadow: inset 0 0 0 1px rgba(229, 193, 88, 0.2);
}

.code-card.is-claimed {
  background: var(--bg-claimed);
  border-color: #1E222A;
}

.code-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.code-star {
  color: var(--gold-primary);
  font-size: 0.82rem;
  line-height: 1;
  flex-shrink: 0;
}

.code-string {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 4px 0;
  text-align: left;
}

.code-string:hover {
  color: var(--gold-bright);
}

.code-card.is-claimed .code-string {
  color: var(--text-claimed);
  text-decoration: line-through;
}

.card-new-dot {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--gold-tint-strong);
  color: var(--gold-bright);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.code-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.meta-chip.is-official {
  border-color: rgba(229, 193, 88, 0.3);
  color: var(--gold-primary);
}

.meta-chip.is-expired {
  border-color: rgba(212, 118, 114, 0.28);
  background: var(--danger-tint);
  color: var(--danger-muted);
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.card-btn.copy-btn:hover {
  background: var(--gold-tint);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.card-btn.claim-btn[aria-pressed="true"] {
  background: var(--gold-tint-strong);
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.card-btn.claim-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Collapsible Panels */
.collapsible-panel {
  margin-top: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  list-style: none;
  user-select: none;
}

.panel-summary::-webkit-details-marker {
  display: none;
}

.summary-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.summary-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.summary-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.expired-grid {
  padding: 0 14px 14px;
}

.expired-empty {
  margin: 0 14px 14px;
}

.code-card.is-archived {
  min-height: 46px;
  background: #14171C;
  border-color: #20252E;
}

.code-card.is-archived .code-string {
  color: var(--text-muted);
  cursor: default;
}

.guide-body {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.guide-steps {
  margin: 14px 0 10px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.guide-steps strong {
  color: var(--text-primary);
}

.guide-tip {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border-left: 3px solid var(--gold-primary);
  font-size: 0.83rem;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-brand:hover {
  color: var(--gold-bright);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--gold-bright);
}

.footer-sep {
  color: var(--border-strong);
}

/* Profile Manager List */
.profile-list {
  display: grid;
  gap: 8px;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.profile-item.is-active {
  border-color: var(--border-gold);
}

.profile-item-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.profile-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-item-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-item-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.mini-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
}

.mini-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.mini-btn.is-danger:hover:not(:disabled) {
  border-color: rgba(212, 118, 114, 0.45);
  color: var(--danger-muted);
}

.mini-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Modals */
.modal {
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-primary);
  max-width: 480px;
  width: calc(100% - 28px);
}

.modal::backdrop {
  background: rgba(8, 10, 13, 0.76);
}

.modal-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
}

.modal-desc {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.token-row {
  display: flex;
  gap: 8px;
}

.token-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.gold-btn,
.slate-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.gold-btn {
  background: var(--gold-primary);
  color: var(--text-on-gold);
}

.gold-btn:hover {
  background: var(--gold-bright);
}

.slate-btn {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.modal-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--border-subtle);
}

.modal-feedback {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--gold-bright);
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 760px), (pointer: coarse) {
  .icon-btn,
  .profile-wrap,
  .chip-toggle,
  .tab-pill,
  .nav-btn,
  .seg-btn,
  .mini-btn {
    min-height: 44px;
    height: auto;
  }

  .social-pill {
    min-height: 36px;
    padding: 0 11px;
  }

  .profile-select {
    min-height: 42px;
    line-height: 42px;
  }

  .icon-btn.icon-only,
  .modal-close,
  .card-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .code-string {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 760px) {
  .codes-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    max-width: 100%;
  }

  .deck-nav {
    grid-template-columns: 92px 1fr 92px;
  }

  .btn-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
