/* account.html page styles (extracted from the inline <style> block). */
/* Auth gate — opaque overlay shown until onAuthStateChanged resolves, so the
   dashboard never flashes for logged-out visitors (who get redirected away).
   Loaded render-blocking in <head> so it paints before the page body. */
#auth-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: #f6f5f2;
}
html.auth-ready #auth-loader { display: none; }
#auth-loader .al-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(0,0,0,0.12); border-top-color: rgba(0,0,0,0.55);
  animation: al-spin 0.7s linear infinite;
}
@keyframes al-spin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) { #auth-loader { background: #121212; } }

/* ============================================================
   ACCOUNT PAGE — logged-in dashboard
   Editorial light, reuses tokens from site.css / wm-tokens.css
   ============================================================ */
.acct-main { padding: 56px 0 120px; }
.acct-shell { max-width: 760px; margin: 0 auto; }

/* page header */
.acct-head { margin-bottom: 44px; }
.acct-eyebrow {
  font: 500 11px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sl-mute-2);
  margin-bottom: 16px;
}
.acct-title {
  font-family: var(--sl-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -1.8px;
  color: var(--sl-ink);
  margin: 0;
  text-wrap: balance;
}
.acct-title em { font-style: normal; color: var(--wm-primary); }

/* section scaffold */
.acct-section { margin-top: 40px; }
.acct-section-label {
  font: 500 11px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sl-mute-2);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* generic card */
.acct-card {
  background: var(--sl-panel);
  border: 0.5px solid var(--sl-hair);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10,14,28,0.04), 0 16px 40px -20px rgba(10,14,28,0.12);
  padding: 28px;
}

/* ---- profile ---- */
.acct-profile { display: flex; align-items: center; gap: 20px; }
.acct-avatar {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--wm-primary), #3b8bff);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sl-serif); font-weight: 400; font-size: 26px;
  letter-spacing: -0.5px;
  box-shadow: 0 6px 18px -6px rgba(0,123,255,0.45);
}
.acct-profile-info { flex: 1; min-width: 0; }
.acct-profile-name {
  font-family: var(--sl-serif); font-weight: 400; font-size: 24px;
  letter-spacing: -0.6px; color: var(--sl-ink); margin-bottom: 4px;
}
.acct-profile-email {
  font: 400 14px/1.4 var(--sl-sans); color: var(--sl-mute);
  margin-bottom: 10px; word-break: break-all;
}
.acct-method {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 11px/1 var(--sl-sans); letter-spacing: 0.3px;
  color: var(--sl-ink-2);
  background: var(--sl-bg-2);
  border: 0.5px solid var(--sl-hair);
  padding: 6px 11px; border-radius: 9999px;
}
.acct-method svg { width: 13px; height: 13px; }
.acct-method .gmark { width: 13px; height: 13px; }

/* buttons */
.acct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 18px;
  border-radius: 8px; cursor: pointer;
  font: 600 13px/1 var(--sl-sans); letter-spacing: 0.2px;
  border: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
  white-space: nowrap;
}
.acct-btn:active { transform: scale(0.98); }
.acct-btn svg { width: 15px; height: 15px; stroke-width: 2; }
.acct-btn-primary { background: var(--wm-primary); color: #fff; }
.acct-btn-primary:hover { background: #0066d6; }
.acct-btn-dark { background: var(--sl-ink); color: #fff; }
.acct-btn-dark:hover { background: #000; }
.acct-btn-outline {
  background: transparent; color: var(--sl-ink-2);
  box-shadow: inset 0 0 0 1px var(--sl-hair);
}
.acct-btn-outline:hover { box-shadow: inset 0 0 0 1px var(--sl-ink-2); }
.acct-btn-danger {
  background: transparent; color: var(--wm-destructive);
  box-shadow: inset 0 0 0 1px rgba(239,68,68,0.3);
}
.acct-btn-danger:hover { background: rgba(239,68,68,0.06); box-shadow: inset 0 0 0 1px rgba(239,68,68,0.5); }
.acct-btn-ghost { background: transparent; color: var(--sl-mute); padding: 11px 8px; }
.acct-btn-ghost:hover { color: var(--sl-ink); }

/* ---- plan card ---- */
.acct-plan { position: relative; overflow: hidden; }
.acct-plan-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
/* Text column: let it shrink (min-width:0) so a long meta wraps inside itself
   and the price stays pinned top-right, instead of the price dropping to a new
   line. Needed for longer locales (e.g. PL) where the meta fills the row. */
.acct-plan-top > div:first-child { flex: 1 1 240px; min-width: 0; }
.acct-plan-tier {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}
.acct-plan-name {
  font-family: var(--sl-serif); font-weight: 400; font-size: 30px;
  letter-spacing: -1px; color: var(--sl-ink);
}
.acct-plan-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 10px/1 var(--sl-sans); letter-spacing: 0.8px; text-transform: uppercase;
  padding: 5px 9px; border-radius: 9999px;
}
.acct-plan-tag .pip { width: 6px; height: 6px; border-radius: 50%; }
.acct-plan-tag.status-active   { background: rgba(101,196,102,0.12); color: var(--wm-green-2); }
.acct-plan-tag.status-active .pip { background: var(--wm-green-2); }
.acct-plan-tag.status-past_due { background: rgba(251,191,36,0.16); color: #b07d00; }
.acct-plan-tag.status-past_due .pip { background: var(--wm-amber); }
.acct-plan-tag.status-canceled { background: rgba(100,116,139,0.14); color: var(--sl-mute); }
.acct-plan-tag.status-canceled .pip { background: var(--sl-mute-2); }
.acct-plan-tag.status-canceling { background: rgba(251,191,36,0.16); color: #b07d00; }
.acct-plan-tag.status-canceling .pip { background: var(--wm-amber); }
.acct-plan-tag.tier-free { background: var(--sl-bg-2); color: var(--sl-mute); border: 0.5px solid var(--sl-hair); }

.acct-plan-meta {
  font: 400 14px/1.55 var(--sl-sans); color: var(--sl-mute);
  margin-top: 4px; text-wrap: pretty;
}
.acct-plan-meta b { color: var(--sl-ink-2); font-weight: 600; }
.acct-plan-price {
  text-align: right; flex-shrink: 0;
}
.acct-plan-price .amt {
  font-family: var(--sl-serif); font-weight: 400; font-size: 30px;
  letter-spacing: -1px; color: var(--sl-ink);
}
/* Currency symbol: plain prefix, same serif/size/ink as the number (matches the
   design's literal "$10"). The .cur span only exists so non-USD currencies can
   still be forced in front of the number; it gets no distinct styling. */
.acct-plan-price .per {
  font: 400 12px/1 var(--sl-sans); color: var(--sl-mute-2); margin-top: 4px;
}
.acct-plan-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 24px; padding-top: 22px;
  border-top: 0.5px solid var(--sl-hair);
}
.acct-plan-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 18px;
  background: rgba(251,191,36,0.08);
  border: 0.5px solid rgba(251,191,36,0.25);
  border-radius: 8px; padding: 12px 14px;
  font: 400 13px/1.5 var(--sl-sans); color: #8a6500;
  text-wrap: pretty;
}
.acct-plan-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; stroke-width: 2; }

/* ---- upgrade / choose-plan ---- */
.acct-upgrade-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 18px; flex-wrap: wrap;
}
.acct-upgrade-head .lead {
  font-family: var(--sl-serif); font-weight: 400; font-size: 22px;
  letter-spacing: -0.5px; color: var(--sl-ink); margin: 4px 0 0;
}
/* billing cycle toggle */
.acct-cycle {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair);
  border-radius: 9999px;
}
.acct-cycle button {
  border: none; background: transparent; cursor: pointer;
  font: 600 12px/1 var(--sl-sans); color: var(--sl-mute);
  padding: 9px 16px; border-radius: 9999px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 180ms ease, color 180ms ease;
}
.acct-cycle button.active { background: var(--sl-panel); color: var(--sl-ink); box-shadow: 0 1px 2px rgba(10,14,28,0.08); }
.acct-cycle .save {
  font: 600 9px/1 var(--sl-sans); letter-spacing: 0.4px;
  color: var(--wm-green-2); background: rgba(101,196,102,0.14);
  padding: 3px 6px; border-radius: 9999px;
}

.acct-plan-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.acct-plan-grid.single { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
@media (max-width: 640px) { .acct-plan-grid { grid-template-columns: 1fr; } }

.acct-offer {
  background: var(--sl-panel);
  border: 0.5px solid var(--sl-hair);
  border-radius: 12px;
  padding: 24px 22px 22px;
  display: flex; flex-direction: column;
  position: relative;
}
.acct-offer.featured {
  border-color: rgba(0,123,255,0.35);
  box-shadow: 0 0 0 1px rgba(0,123,255,0.2), 0 18px 44px -22px rgba(0,123,255,0.4);
}
.acct-offer-flag {
  position: absolute; top: -10px; right: 18px;
  font: 600 9px/1 var(--sl-sans); letter-spacing: 0.8px; text-transform: uppercase;
  background: var(--wm-primary); color: #fff;
  padding: 5px 9px; border-radius: 9999px;
}
.acct-offer-name {
  font-family: var(--sl-serif); font-weight: 400; font-size: 22px;
  letter-spacing: -0.5px; color: var(--sl-ink); margin-bottom: 10px;
}
.acct-offer-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.acct-offer-price .amt {
  font-family: var(--sl-serif); font-weight: 400; font-size: 34px;
  letter-spacing: -1.2px; color: var(--sl-ink);
}
.acct-offer-price .per { font: 400 13px/1 var(--sl-sans); color: var(--sl-mute-2); }
.acct-offer-billed { font: 400 12px/1.4 var(--sl-sans); color: var(--sl-mute-2); margin-bottom: 18px; min-height: 17px; }

.acct-offer-feats { list-style: none; margin: 0 0 22px; padding: 16px 0 0; border-top: 0.5px solid var(--sl-hair); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.acct-offer-feats li {
  display: flex; align-items: flex-start; gap: 9px;
  font: 400 13px/1.45 var(--sl-sans); color: var(--sl-ink-2); text-wrap: pretty;
}
.acct-offer-feats li svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: var(--wm-green-2); stroke-width: 2.4; }
.acct-offer-feats li.hero { color: var(--sl-ink); font-weight: 600; }
.acct-offer-feats li.hero svg { color: var(--wm-primary); }
.acct-offer .acct-btn { width: 100%; }

/* pro differentiator strip */
.acct-pro-diff {
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--wm-primary-08);
  border: 0.5px solid rgba(0,123,255,0.16);
  border-radius: 10px; padding: 14px 16px;
}
.acct-pro-diff .ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--wm-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.acct-pro-diff .ico svg { width: 17px; height: 17px; stroke-width: 2; }
.acct-pro-diff .txt { font: 400 13px/1.5 var(--sl-sans); color: var(--sl-ink-2); text-wrap: pretty; }
.acct-pro-diff .txt b { color: var(--sl-ink); font-weight: 600; }

/* ---- downloads ---- */
.acct-dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .acct-dl-grid { grid-template-columns: 1fr; } }
.acct-dl {
  border: 0.5px solid var(--sl-hair); border-radius: 12px;
  background: var(--sl-panel); padding: 22px;
  display: flex; flex-direction: column;
}
.acct-dl-ico {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 16px;
  background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sl-ink);
}
.acct-dl-ico svg { width: 19px; height: 19px; }
.acct-dl-title { font: 600 15px/1.3 var(--sl-sans); color: var(--sl-ink); margin-bottom: 6px; }
.acct-dl-sub { font: 400 13px/1.5 var(--sl-sans); color: var(--sl-mute); margin-bottom: 18px; flex: 1; text-wrap: pretty; }
.acct-dl .acct-btn { width: 100%; }
.acct-dl-meta { font: 400 11px/1.4 var(--sl-sans); color: var(--sl-mute-2); margin-top: 10px; text-align: center; }
.acct-dl-pro-flag {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font: 600 9px/1 var(--sl-sans); letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--wm-primary); background: var(--wm-primary-08);
  border: 0.5px solid rgba(0,123,255,0.16);
  padding: 5px 9px; border-radius: 9999px; margin-bottom: 14px;
}

/* ---- security rows ---- */
.acct-rows { display: flex; flex-direction: column; }
.acct-row {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--sl-hair);
}
.acct-row:first-child { padding-top: 4px; }
.acct-row:last-child { border-bottom: none; padding-bottom: 4px; }
.acct-row-info { flex: 1; min-width: 0; }
.acct-row-title {
  font: 600 14px/1.35 var(--sl-sans); color: var(--sl-ink); margin-bottom: 3px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.acct-row-sub { font: 400 13px/1.45 var(--sl-sans); color: var(--sl-mute); text-wrap: pretty; }
.acct-pill {
  font: 600 9px/1 var(--sl-sans); letter-spacing: 0.5px; text-transform: uppercase;
  padding: 4px 7px; border-radius: 9999px;
}
.acct-pill.ok { background: rgba(101,196,102,0.14); color: var(--wm-green-2); }
.acct-pill.warn { background: rgba(251,191,36,0.16); color: #b07d00; }
.acct-row-action { flex-shrink: 0; }

/* linked methods mini */
.acct-linked { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.acct-linked-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair);
}
.acct-linked-item .li-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--sl-panel); border: 0.5px solid var(--sl-hair); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acct-linked-item .li-ico svg { width: 15px; height: 15px; }
.acct-linked-item .li-name { font: 600 13px/1.3 var(--sl-sans); color: var(--sl-ink); }
.acct-linked-item .li-sub { font: 400 12px/1.3 var(--sl-sans); color: var(--sl-mute-2); }
.acct-linked-item .li-right { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Let the text column shrink so a long email truncates instead of pushing the
   Connected/Disconnect controls off the right edge on narrow screens. */
.acct-linked-item > div { min-width: 0; }
.acct-linked-item .li-name,
.acct-linked-item .li-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-linked-item .li-connected { font: 600 11px/1 var(--sl-sans); color: var(--wm-green-2); display: inline-flex; align-items: center; gap: 5px; }
.acct-linked-item .li-connected svg { width: 13px; height: 13px; stroke-width: 2.5; }
.acct-linked-item.is-off { opacity: 0.92; }
.li-btn {
  font: 600 12px/1 var(--sl-sans); color: var(--sl-ink); cursor: pointer;
  padding: 7px 12px; border-radius: 8px;
  background: var(--sl-panel); border: 0.5px solid var(--sl-hair);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.li-btn:hover { background: var(--sl-bg-2); }
.li-btn[disabled] { opacity: 0.55; pointer-events: none; }
.li-btn.li-btn-primary { color: #fff; background: var(--sl-ink); border-color: var(--sl-ink); }
.li-btn.li-btn-primary:hover { opacity: 0.9; background: var(--sl-ink); }
.li-btn.li-btn-danger { color: var(--wm-destructive); }
/* inline spinner for buttons that fire a Cloud Function (resend / reset / change) */
.acct-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 7px;
  animation: acct-spin 0.6s linear infinite;
}
@keyframes acct-spin { to { transform: rotate(360deg); } }
.acct-btn.is-loading, .li-btn.is-loading { opacity: 0.8; cursor: default; }

/* price skeleton — shown until getPrices() resolves */
.px-skel {
  display: inline-block;
  width: 46px;
  height: 0.85em;
  border-radius: 6px;
  background: linear-gradient(90deg, #e6eaf1 25%, #eff2f7 37%, #e6eaf1 63%);
  background-size: 400% 100%;
  animation: px-shimmer 1.25s ease-in-out infinite;
  vertical-align: middle;
}
.px-skel-amt { width: 70px; height: 0.66em; border-radius: 9px; }
@keyframes px-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } }

/* inline "set a password" form, revealed under the methods list */
.li-pwform { display: none; gap: 8px; margin-top: 2px; align-items: center; flex-wrap: wrap; }
.li-pwform.show { display: flex; }
.li-pw-input {
  flex: 1 1 200px; min-width: 0;
  font: 400 13px/1.3 var(--sl-sans); color: var(--sl-ink);
  padding: 10px 12px; border-radius: 9px;
  background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair);
}
.li-pw-input:focus { outline: none; border-color: var(--sl-ink); }
.li-hint { font: 400 11px/1.4 var(--sl-sans); color: var(--sl-mute-2); margin-top: 4px; }

/* ---- danger ---- */
.acct-danger {
  border-color: rgba(239,68,68,0.22);
}
.acct-danger-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.acct-danger-info { flex: 1; min-width: 220px; }
.acct-danger-title { font: 600 15px/1.35 var(--sl-sans); color: var(--sl-ink); margin-bottom: 6px; }
.acct-danger-sub { font: 400 13px/1.55 var(--sl-sans); color: var(--sl-mute); max-width: 52ch; text-wrap: pretty; }

/* logged-in nav avatar */
.nav-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--wm-primary), #3b8bff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sl-serif); font-size: 15px; letter-spacing: -0.3px;
  cursor: default;
}

/* ---- modal ---- */
.acct-modal-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,14,28,0.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.acct-modal-scrim.show { display: flex; }
.acct-modal {
  background: var(--sl-panel); border: 0.5px solid var(--sl-hair);
  border-radius: 14px; padding: 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px -14px rgba(10,14,28,0.3);
}
.acct-modal-ico {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  background: rgba(239,68,68,0.1); color: var(--wm-destructive);
  display: inline-flex; align-items: center; justify-content: center;
}
.acct-modal-ico svg { width: 22px; height: 22px; stroke-width: 2; }
.acct-modal h3 { font-family: var(--sl-serif); font-weight: 400; font-size: 24px; letter-spacing: -0.6px; color: var(--sl-ink); margin: 0 0 10px; }
.acct-modal p { font: 400 14px/1.55 var(--sl-sans); color: var(--sl-mute); margin: 0 0 16px; text-wrap: pretty; }
.acct-modal .confirm-field { margin-bottom: 20px; }
.acct-modal .confirm-field label { font: 500 11px/1 var(--sl-sans); text-transform: uppercase; letter-spacing: 1.4px; color: var(--sl-mute); display: block; margin-bottom: 8px; }
.acct-modal .confirm-field input {
  width: 100%; min-height: 44px; padding: 12px 14px; border-radius: 8px;
  border: 0.5px solid var(--sl-hair); background: var(--sl-bg-2);
  font: 400 14px/1.3 var(--sl-sans); color: var(--sl-ink); outline: none;
}
.acct-modal .confirm-field input:focus { border-color: var(--wm-destructive); background: #fff; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
#pw-scrim .confirm-field input:focus { border-color: var(--wm-primary); box-shadow: 0 0 0 3px var(--wm-primary-08); }
.acct-modal-actions { display: flex; gap: 10px; }
.acct-modal-actions .acct-btn { flex: 1; }

/* toast */
.acct-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 120;
  background: var(--sl-ink); color: #fff;
  font: 500 13px/1.4 var(--sl-sans);
  padding: 13px 20px; border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(10,14,28,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 90vw;
}
.acct-toast svg { width: 15px; height: 15px; stroke-width: 2.4; color: var(--wm-green); }
.acct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ---- tweaks panel (vanilla) ---- */
.tw-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 264px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 0.5px solid var(--sl-hair);
  border-radius: 14px;
  box-shadow: 0 16px 50px -16px rgba(10,14,28,0.3);
  padding: 16px 16px 14px;
  display: none;
}
.tw-panel.show { display: block; }
.tw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tw-head .t { font: 600 11px/1 var(--sl-sans); text-transform: uppercase; letter-spacing: 1.4px; color: var(--sl-ink); }
.tw-head .x { background: transparent; border: none; cursor: pointer; color: var(--sl-mute-2); width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.tw-head .x:hover { color: var(--sl-ink); background: var(--sl-bg-2); }
.tw-head .x svg { width: 15px; height: 15px; }
.tw-group { margin-bottom: 13px; }
.tw-group:last-child { margin-bottom: 0; }
.tw-label { font: 500 10px/1 var(--sl-sans); text-transform: uppercase; letter-spacing: 1px; color: var(--sl-mute-2); margin-bottom: 7px; }
.tw-seg { display: flex; gap: 3px; padding: 3px; background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair); border-radius: 9px; }
.tw-seg button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  font: 600 11px/1 var(--sl-sans); color: var(--sl-mute);
  padding: 7px 4px; border-radius: 7px; transition: background 160ms, color 160ms;
}
.tw-seg button.active { background: var(--sl-panel); color: var(--sl-ink); box-shadow: 0 1px 2px rgba(10,14,28,0.1); }
.tw-seg button:disabled { opacity: 0.35; cursor: not-allowed; }
