/* ==========================================================================
   Sugrob — Document, Account (#4 Quick Control Matrix) & Paid Page Styles
   ========================================================================== */

main.wrap,
main.wrap-narrow,
main.acct-wrap {
  position: relative;
  z-index: 2;
  padding-top: clamp(28px, 4.5vw, 56px);
  padding-bottom: 48px;
}

.acct-wrap {
  width: min(1040px, 100% - 32px);
  margin: 0 auto;
}

.intro {
  max-width: 780px;
  padding-bottom: 28px;
}

.intro .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12px/1 var(--font-sans);
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro .tag a:hover {
  color: #fff;
}

.intro .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.intro h1 {
  margin: 16px 0 14px;
  font: 500 clamp(32px, 4.4vw, 56px)/1.05 var(--display);
  letter-spacing: -0.035em;
  color: #fff;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.58;
  max-width: 64ch;
}

.sheet {
  background: linear-gradient(180deg, rgba(23, 26, 35, 0.88), rgba(8, 8, 12, 0.94));
  border: 1px solid var(--line-2);
  border-radius: 28px;
  padding: clamp(26px, 3.6vw, 44px);
  box-shadow: var(--specular), var(--shadow-md);
}

.sheet section+section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.sheet h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font: 500 clamp(20px, 1.8vw, 26px)/1.2 var(--display);
  letter-spacing: -0.02em;
  color: #fff;
}

.sheet h2[data-n]::before {
  content: attr(data-n);
  flex-shrink: 0;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(205, 206, 237, 0.08);
  border: 1px solid rgba(238, 238, 255, 0.3);
  color: var(--accent-hi);
  display: grid;
  place-items: center;
  font: 500 12.5px/1 var(--font-sans);
}

.sheet p,
.sheet li {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.66;
}

.sheet p+p,
.sheet p+ul,
.sheet ul+p {
  margin-top: 12px;
}

.sheet ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.sheet a {
  color: var(--ice);
  text-decoration: none;
}

.sheet a:hover {
  text-decoration: underline;
}

.sheet b {
  color: var(--text);
  font-weight: 700;
}

.sheet dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 24px;
  margin: 10px 0 0;
}

.sheet dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.sheet dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  word-break: break-word;
}

:target {
  scroll-margin-top: 96px;
}

section:target h2 {
  color: var(--ice);
}

/* ==========================================================================
   Account Hero & Quick License Summary
   ========================================================================== */
.acct-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.acct-hero-copy {
  max-width: 620px;
}

.lead-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  max-width: 64ch;
  border-radius: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

.lead-note a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gift-pick {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
}

.gift-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.4;
}

.gift-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gift-toggle b {
  display: block;
  color: #fff;
  font-weight: 600;
}

.gift-toggle small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.gift-switch {
  flex-shrink: 0;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-strong);
  transition: background 0.18s ease;
}

.gift-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.gift-toggle input:checked + .gift-switch {
  background: var(--blue);
}

.gift-toggle input:checked + .gift-switch::after {
  transform: translateX(18px);
}

.gift-toggle input:focus-visible + .gift-switch {
  box-shadow: 0 0 0 4px var(--blue-ring);
}

.gift-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.gift-fields textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.gift-input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.gift-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-ring);
}

.key-extra {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.gift-ready {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 4px 0 18px;
  padding: 16px 18px 16px 16px;
  border-radius: 20px;
  background: radial-gradient(70% 120% at 0% 0%, rgba(126, 131, 169, 0.2), transparent 60%), linear-gradient(180deg, rgba(24, 26, 36, 0.8), rgba(10, 10, 15, 0.8));
  border: 1px solid rgba(238, 238, 255, 0.3);
  box-shadow: 0 0 0 6px rgba(205, 206, 237, 0.04), 0 0 0 7px rgba(205, 206, 237, 0.09), 0 0 60px -24px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -30px 40px -34px var(--glow);
}

.gift-ready.is-claimed {
  border-color: var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gift-ready-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gift-ready-art {
  flex-shrink: 0;
  width: 76px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(126, 131, 169, 0.45));
}

.gift-ready-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gift-ready-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.gift-ready-text b {
  font: 500 clamp(17px, 1.4vw, 20px)/1.25 var(--display, inherit);
  letter-spacing: -0.02em;
  color: #fff;
}

.gift-ready-text p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .gift-ready-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .gift-ready-art {
    width: 56px;
  }
}

.key-extra-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.key-extra p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.key-extra-link {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.key-extra-link code {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font: 500 13px/1.4 var(--font-mono);
  color: #fff;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .gift-fields {
    grid-template-columns: 1fr;
  }
}

.attach-sheet {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
}

.attach-form label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

.attach-form label .ui-ico {
  flex-shrink: 0;
  margin-top: 3px;
}

.attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attach-row .email-input-wrap {
  flex: 1 1 260px;
  min-width: 0;
}

.attach-row input {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.attach-msg {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}

.attach-msg.bad {
  color: var(--amber);
}

.acct-hero-copy h1 {
  margin: 14px 0 12px;
  font: 500 clamp(32px, 4.2vw, 52px)/1.05 var(--display);
  letter-spacing: -0.035em;
  color: #fff;
}

.acct-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acct-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.acct-pill .ui-ico {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Wait / Pending Payment Sheet (#wait)
   ========================================================================== */
.wait-sheet {
  margin-bottom: 22px;
  padding: 22px 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgba(255, 214, 10, 0.10), var(--surface-card));
  border: 1px solid rgba(255, 214, 10, 0.28);
  box-shadow: var(--specular), var(--shadow-sm);
  backdrop-filter: blur(20px);
}

.wait-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wait-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.wait-sheet p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

.wait-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ==========================================================================
   Keys Vault (#keys)
   ========================================================================== */
.keys-vault {
  margin-bottom: 26px;
}

.keys-list {
  display: grid;
  gap: 14px;
}

.key-card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(155deg, rgba(50, 215, 75, 0.08), var(--surface-card) 60%);
  border: 1px solid rgba(50, 215, 75, 0.28);
  box-shadow: var(--specular), var(--shadow-md);
  backdrop-filter: blur(20px);
}

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

.key-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  border: 1px solid rgba(50, 215, 75, 0.30);
  color: var(--ok);
  font-size: 12.5px;
  font-weight: 700;
}

.key-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.key-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.code-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(8, 10, 15, 0.56);
  border: 1px solid var(--line-strong);
  margin-bottom: 16px;
}

:root[data-theme="light"] .code-box {
  background: #f1f4fa;
}

.code {
  font: 700 clamp(13.5px, 3.6vw, 21px)/1.3 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: all;
}

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

.seat-pips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seat-pip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.seat-pip.is-used {
  background: var(--blue-soft);
  border-color: rgba(238, 238, 255, 0.34);
  color: var(--ice);
}

.seat-pip .ui-ico {
  width: 13px;
  height: 13px;
}

.meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.warn {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 14.5px;
  line-height: 1.55;
}

.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   #4 Quick Control Matrix Checkout Panel (#buy / #payboxes)
   ========================================================================== */
.matrix-panel {
  border-radius: 28px;
  padding: clamp(22px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(23, 26, 35, 0.92), rgba(8, 8, 12, 0.96));
  border: 1px solid rgba(238, 238, 255, 0.44);
  box-shadow: 0 0 0 7px rgba(205, 206, 237, 0.04), 0 0 0 8px rgba(205, 206, 237, 0.10), 0 0 80px -24px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -40px 60px -40px var(--glow);
}

.matrix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.matrix-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.matrix-title-group h2 {
  margin: 0;
  font: 500 clamp(24px, 2.8vw, 34px)/1.1 var(--display);
  letter-spacing: -0.03em;
  color: #fff;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: rgba(205, 206, 237, 0.08);
  border: 1px solid rgba(238, 238, 255, 0.26);
  color: var(--accent-hi);
  font: 500 13.5px/1 var(--font-sans);
}

.price-badge .price-old {
  color: var(--dim);
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-color: rgba(238, 238, 255, 0.55);
  text-decoration-thickness: 1.5px;
}

.price-badge .price-off {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  margin-right: -5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent-hi) -40%, var(--accent) 55%);
  color: var(--accent-ink);
  font: 600 11.5px/1 var(--font-sans);
}

.seg-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.seg-btn:hover {
  color: #fff;
}

.seg-btn.is-active,
.seg-btn[aria-pressed="true"] {
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-hi) -40%, var(--accent) 55%);
  border-color: rgba(238, 238, 255, 0.7);
  box-shadow: 0 0 20px -6px var(--glow);
}

.seg-btn.is-active .ui-ico,
.seg-btn[aria-pressed="true"] .ui-ico {
  filter: brightness(0) opacity(0.88);
}

.seg-btn .ui-ico {
  width: 15px;
  height: 15px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.matrix-tile {
  position: relative;
  text-align: left;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  min-height: 156px;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.16s var(--ease), box-shadow 0.22s var(--ease);
}

.matrix-tile:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.matrix-tile:active {
  transform: translateY(0);
}

.matrix-tile.is-selected {
  background: linear-gradient(160deg, rgba(205, 206, 237, 0.13), rgba(17, 18, 24, 0.94));
  border-color: rgba(238, 238, 255, 0.62);
  box-shadow: 0 0 0 1px rgba(238, 238, 255, 0.32), 0 16px 38px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20);
}

.brand-icon.is-round {
  border-radius: 50%;
}

.brand-icon.is-pad {
  padding: 5px;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-icon.is-pad img {
  object-fit: contain;
}

.brand-icon-sm {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.brand-icon-sm.is-round {
  border-radius: 50%;
}

.brand-icon-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.tile-radio .ui-ico {
  width: 13px;
  height: 13px;
  opacity: 0;
  filter: brightness(0) opacity(0.9);
}

.matrix-tile.is-selected .tile-radio {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
}

.matrix-tile.is-selected .tile-radio .ui-ico {
  opacity: 1;
}

.tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile-name {
  font: 600 15.5px/1.25 var(--display);
  color: #fff;
}

.tile-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.tile-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tile-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
}

.tile-tag.is-free {
  background: var(--ok-soft);
  border-color: rgba(50, 215, 75, 0.25);
  color: var(--ok);
}

.tile-tag.is-email {
  background: rgba(205, 206, 237, 0.08);
  border-color: rgba(238, 238, 255, 0.22);
  color: var(--accent-hi);
}

.action-dock {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(5, 5, 8, 0.68);
  border: 1px solid var(--line-2);
  box-shadow: var(--specular);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr);
  gap: 16px 20px;
  align-items: end;
}

.dock-field label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.dock-field label .ui-ico {
  width: 15px;
  height: 15px;
}

.email-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.email-input-wrap .ui-ico {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  opacity: 0.65;
  pointer-events: none;
}

.email-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.email-input-wrap input::placeholder {
  color: var(--dim);
}

.email-input-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-ring);
}

.email-input-wrap input.bad {
  border-color: var(--bad);
  box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.18);
}

.dock-no-email {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--ok-soft);
  border: 1px solid rgba(50, 215, 75, 0.25);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
}

.dock-no-email .ui-ico {
  width: 18px;
  height: 18px;
}

.dock-submit-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dock-pay-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
}

.dock-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.alert-pill {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--bad-soft);
  border: 1px solid rgba(255, 69, 58, 0.34);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.alert-pill .ui-ico {
  width: 18px;
  height: 18px;
}

.soon-pill {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}

.pay-legal-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
}

.pay-legal-note a {
  color: var(--ice);
}

.pay-legal-note a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Help Box (written by tools/seo-pages.js inside <!-- help:start -->)
   ========================================================================== */
.help {
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface), #050506);
  border: 1px solid var(--line-2);
  box-shadow: var(--specular);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.help h2 {
  margin: 0 0 4px;
  font: 500 20px/1.2 var(--display);
  letter-spacing: -0.02em;
  color: #fff;
}

.help p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
}

.help a {
  color: var(--ice);
}

.help .help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(205, 206, 237, 0.08);
  border: 1px solid rgba(238, 238, 255, 0.28);
  color: var(--accent-hi);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.help .help-btn:hover {
  background: linear-gradient(180deg, var(--accent-hi) -40%, var(--accent) 55%);
  border-color: rgba(238, 238, 255, 0.7);
  color: var(--accent-ink);
}

.help .help-btn:hover .ui-ico {
  filter: brightness(0) opacity(0.88);
}

/* ==========================================================================
   Responsive Matrix
   ========================================================================== */
@media (max-width: 900px) {
  .matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-dock {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .acct-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .seg-filter {
    width: 100%;
    border-radius: 16px;
    gap: 3px;
  }

  .seg-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 7px 8px;
    font-size: 12px;
    gap: 5px;
  }

  .matrix-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .matrix-tile {
    min-height: auto;
  }

  .sheet dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 0;
  }

  .sheet dt:not(:first-child) {
    margin-top: 10px;
  }
}

/* ==========================================================================
   3-Slot Profile Cards & Public Friend Invite Page (/account & /f/<ID>)
   ========================================================================== */
.slots-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.slots-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.slot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.slot-top {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.slot-card.is-bound {
  background: linear-gradient(155deg, rgba(205, 206, 237, 0.09), var(--glass-soft));
  border-color: rgba(238, 238, 255, 0.26);
}

.slot-stage {
  width: 76px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 25%, rgba(126, 131, 169, 0.24), rgba(8, 9, 14, 0.82));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.slot-canvas {
  width: 76px;
  height: 88px;
  display: block;
}

.slot-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.slot-num {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.slot-state {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
}

.slot-state.is-bound {
  background: var(--ok-soft);
  color: var(--ok);
}

.slot-name-input {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 16, 0.42);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

:root[data-theme="light"] .slot-name-input {
  background: rgba(255, 255, 255, 0.82);
}

.slot-name-input:focus {
  border-color: var(--blue);
}

.slot-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.slot-id-code {
  font: 700 11.5px/1 var(--font-mono);
  color: var(--ice);
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
  border: 1px solid rgba(238, 238, 255, 0.24);
  user-select: all;
}

.slot-mini-btn,
.slot-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--glass-soft);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.slot-mini-btn:hover,
.slot-mini-link:hover {
  background: var(--glass-soft-hover);
  border-color: var(--line-strong);
  color: var(--text);
}

.slot-mini-btn .ui-ico,
.slot-mini-link .ui-ico {
  width: 12px;
  height: 12px;
}

.slot-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .slot-foot {
  border-top-color: var(--line);
}

.slot-ws-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(238, 238, 255, 0.24);
  background: rgba(205, 206, 237, 0.08);
  color: var(--accent-hi);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.slot-ws-btn:hover {
  background: rgba(205, 206, 237, 0.16);
  border-color: rgba(238, 238, 255, 0.45);
  color: #ffffff;
}

.slot-ws-btn .ui-ico {
  width: 12px;
  height: 12px;
}

.slot-unbind-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 69, 58, 0.28);
  background: rgba(255, 69, 58, 0.08);
  color: var(--bad);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.slot-unbind-btn.is-armed {
  background: var(--bad-soft);
  border-color: var(--bad);
}

.slot-unbind-btn .ui-ico {
  width: 12px;
  height: 12px;
}

.friend-page-wrap {
  padding-top: 38px;
  padding-bottom: 64px;
}

.friend-invite-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(22px, 3.6vw, 34px);
  border-radius: 28px;
  background: var(--surface-card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--specular), var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
}

.friend-stage {
  position: relative;
  height: 270px;
  border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 12%, #23273d 0%, #090a10 100%);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.friend-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.friend-hearts span {
  position: absolute;
  font-size: 16px;
  color: #ff6aa8;
  opacity: 0.72;
  animation: friendFloat 3.4s ease-in-out infinite;
}

.friend-hearts span:nth-child(1) {
  top: 22px;
  left: 26px;
}

.friend-hearts span:nth-child(2) {
  top: 34px;
  right: 28px;
  color: #ffd60a;
  animation-delay: 0.9s;
}

.friend-hearts span:nth-child(3) {
  bottom: 48px;
  right: 24px;
  animation-delay: 1.7s;
}

@keyframes friendFloat {

  0%,
  100% {
    transform: translateY(0) scale(0.95);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-8px) scale(1.12);
    opacity: 0.95;
  }
}

.friend-info h1 {
  margin: 12px 0 12px;
  font: 500 clamp(26px, 3.5vw, 40px)/1.08 var(--display);
  letter-spacing: -0.03em;
  color: #fff;
}

.friend-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.friend-id-pill {
  font: 600 13px/1 var(--font-mono);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  border: 1px solid rgba(238, 238, 255, 0.28);
  color: var(--ice);
  user-select: all;
}

.friend-status-pill {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--glass-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.friend-status-pill.is-online {
  background: var(--ok-soft);
  border-color: rgba(50, 215, 75, 0.35);
  color: var(--ok);
}

.friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.friend-hint {
  margin: 12px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .slot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .friend-invite-card {
    grid-template-columns: minmax(0, 1fr);
  }
}