/* =============================================================
   SolidifyGames — Main Site Stylesheet
   Built on the design system tokens in /design-system/.
   All colors/spacing/typography reference CSS variables — never
   change values here without checking the token files.
   ============================================================= */

/* ---- Base reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { text-decoration: none; }

/* ---- Layout primitives ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.site-header__logo {
  height: 64px;
  width: auto;
  cursor: pointer;
}
.site-header__nav {
  display: flex;
  gap: var(--space-6);
}
.site-header__nav a {
  color: var(--text-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  transition: color var(--duration-fast) var(--ease-out);
}
.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] {
  color: var(--text-heading);
}
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-header__mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--text-body);
}
@media (max-width: 900px) {
  .site-header__inner { height: 72px; }
  .site-header__logo { height: 48px; }
  .site-header__nav { display: none; }
  .site-header__actions { display: none; }
  .site-header__mobile-toggle { display: block; }
  .site-header--open .site-header__nav,
  .site-header--open .site-header__actions {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface-card);
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-3);
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 44px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn--sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn--lg { height: 52px; padding: 0 var(--space-6); font-size: var(--text-md); }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--gradient-brand);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--gradient-brand-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--secondary {
  background: var(--surface-card);
  color: var(--text-heading);
  border: 1px solid var(--border-default);
}
.btn--secondary:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--text-body);
}
.btn--ghost:hover { background: var(--gray-100); color: var(--text-heading); }

.btn--danger {
  background: var(--status-danger-solid);
  color: var(--text-on-primary);
}
.btn--danger:hover {
  background: var(--red-700);
  transform: translateY(-1px);
}

/* ---- Cards ---- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.card--hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card--large { padding: var(--space-8); }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
}
.badge--info    { background: var(--status-info-bg);    color: var(--status-info-fg); }
.badge--success { background: var(--status-success-bg); color: var(--status-success-fg); }
.badge--warning { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.badge--danger  { background: var(--status-danger-bg);  color: var(--status-danger-fg); }

/* ---- Typography helpers ---- */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary);
}
.eyebrow--muted { color: var(--text-muted); }
.h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-heading);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-5);
}
.h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-heading);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}
.h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin: 0;
}
.lede {
  font-size: var(--text-lg);
  color: var(--text-body);
  line-height: var(--leading-relaxed);
  margin: 0;
}
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---- Sections ---- */
.section        { padding: var(--space-20) 0; }
.section--sm    { padding: var(--space-16) 0; }
.section--dark  { background: var(--surface-inverse); color: var(--gray-300); }
.section--dark .h2 { color: var(--text-on-primary); }
.section--card  { background: var(--surface-card); }
.section-heading {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-heading .eyebrow { margin-bottom: var(--space-2); }

/* ---- Hero ---- */
.hero {
  background: var(--surface-card);
  padding: var(--space-24) 0 var(--space-20);
}
.hero__inner {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}
.hero__copy { flex: 1; max-width: 560px; }
.hero__eyebrow {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  display: block;
}
.hero__title { font-size: var(--text-5xl); }
.hero__cta { display: flex; gap: var(--space-3); margin-top: var(--space-8); }
.hero__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: var(--space-4) 0 0;
}
.hero__media {
  flex: 1;
  max-width: 560px;
  background: var(--gradient-brand-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
}
.hero__media-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #000;
}
.hero__media-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 900px) {
  .hero { padding: var(--space-12) 0; }
  .hero__inner { flex-direction: column; gap: var(--space-8); }
  .hero__title { font-size: var(--text-4xl); }
  .hero__eyebrow { font-size: var(--text-md); }
}

/* ---- Game cards (marketing) ---- */
.game-tile {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
}
.game-tile__cover {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: white;
}
.game-tile--crystal .game-tile__cover {
  background: linear-gradient(135deg, #1a0533 0%, #2d1b69 50%, #e91e8c 100%);
}
.game-tile--neon .game-tile__cover {
  background: linear-gradient(135deg, #0a1628 0%, #0d2b3e 50%, #00e676 100%);
}
.game-tile--placeholder {
  border-style: dashed;
  background: var(--surface-card-alt);
}
.game-tile--placeholder .game-tile__cover {
  background: var(--gray-100);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}
.game-tile__body { padding: var(--space-6); }
.game-tile__heading {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* ---- Pricing table ---- */
.pricing-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.pricing-card--featured {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}
.pricing-card__ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}
.pricing-card__tier {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}
.pricing-card--featured .pricing-card__tier { color: var(--color-primary); }
.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
}
.pricing-card__price .amount {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-heading);
}
.pricing-card__price .period { font-size: var(--text-sm); color: var(--text-muted); }
.pricing-card__annual {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.pricing-card__features {
  display: flex; flex-direction: column; gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-8);
}
.pricing-card__feature {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-body);
}
.pricing-card__feature::before {
  content: "✓";
  color: var(--status-success-solid);
  font-weight: bold;
}

/* ---- Dashboard ---- */
.stat-card {
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.stat-card__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.stat-card__value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-top: 4px;
}
.stat-card__value .sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
}
.pack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  gap: var(--space-4);
}
.pack-row__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex; gap: var(--space-4);
}
.pack-row__actions { display: flex; gap: var(--space-2); }
.pack-row__title {
  font-weight: var(--weight-semibold);
  color: var(--text-heading);
  margin-bottom: 4px;
}
.upgrade-banner {
  background: var(--gradient-brand-soft);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}

/* ---- Info callout (used for pack-reuse nudge, teacher-sharing nudge) ---- */
.callout {
  background: var(--status-info-bg);
  border-left: 4px solid var(--status-info-solid);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  color: var(--status-info-fg);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.callout--success {
  background: var(--status-success-bg);
  border-left-color: var(--status-success-solid);
  color: var(--status-success-fg);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--surface-inverse);
  padding: var(--space-16) 0 var(--space-8);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
.site-footer__blurb {
  font-size: var(--text-sm);
  color: var(--gray-400);
  line-height: var(--leading-relaxed);
  max-width: 240px;
  margin: var(--space-4) 0 0;
}
.site-footer__logo {
  height: 84px;
  width: auto;
  filter: brightness(0) invert(1);
}
.site-footer__col-head {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}
.site-footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer__links a {
  font-size: var(--text-sm);
  color: var(--gray-300);
  transition: color var(--duration-fast) var(--ease-out);
}
.site-footer__links a:hover { color: white; }
.site-footer__bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer__bottom span,
.site-footer__bottom a {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* ---- Legal sidebar layout ---- */
.legal-layout {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-8) 0 var(--space-20);
  min-height: calc(100vh - 88px);
}
.legal-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 108px;
  align-self: flex-start;
}
.legal-sidebar__head {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.legal-sidebar a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-body);
  margin-bottom: 2px;
}
.legal-sidebar a:hover,
.legal-sidebar a[aria-current="page"] {
  background: var(--gray-100);
  color: var(--text-heading);
}
.legal-content { flex: 1; min-width: 0; }
.legal-content h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--text-heading);
  margin: 0 0 var(--space-2);
}
.legal-content h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin: var(--space-8) 0 var(--space-3);
}
.legal-content p,
.legal-content ul {
  font-size: var(--text-base);
  color: var(--text-body);
  line-height: var(--leading-relaxed);
}
.legal-content ul { padding-left: var(--space-6); }
.legal-content .last-updated {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 0 var(--space-8);
}
@media (max-width: 900px) {
  .legal-layout { flex-direction: column; }
  .legal-sidebar { position: static; width: 100%; }
}

/* ---- Login split ---- */
.login-split {
  display: flex;
  min-height: calc(100vh - 88px);
}
.login-split__brand {
  flex: 1;
  background: var(--surface-inverse);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-10);
  text-align: center;
}
.login-split__brand img {
  height: 120px;
  filter: brightness(0) invert(1);
}
.login-split__brand p {
  color: var(--gray-400);
  font-size: var(--text-lg);
  max-width: 320px;
  line-height: var(--leading-relaxed);
  margin: 0;
}
.login-split__form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--surface-page);
}
.login-split__form-inner {
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 52px;
  padding: 0 var(--space-6);
  background: var(--surface-card);
  color: var(--text-heading);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.google-btn:hover { background: var(--gray-50); transform: translateY(-1px); }
.google-btn__icon { width: 20px; height: 20px; }
@media (max-width: 900px) {
  .login-split { flex-direction: column; }
  .login-split__brand { padding: var(--space-8); }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ---- Danger zone (settings) ---- */
.danger-zone {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
}
.danger-zone__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--status-danger-fg);
  margin-bottom: var(--space-3);
}

/* ---- inline pack rename --------------------------------------------------
   Sized to match .pack-row__title so the row doesn't jump when it swaps in. */
.pack-row__rename {
  width: 100%; max-width: 26rem; box-sizing: border-box;
  padding: 4px 8px; margin: -4px 0;
  font: inherit; font-size: var(--text-base, 1rem); font-weight: 600;
  color: var(--ink, #1F2937); background: #fff;
  border: 1px solid var(--brand, #22B8A6); border-radius: 6px;
}
.pack-row__rename:focus { outline: 2px solid var(--brand, #22B8A6); outline-offset: 1px; }
.pack-row__rename:disabled { opacity: .6; }

/* ---- per-pack game picker ------------------------------------------------ */
.pack-row__game { display: inline-flex; align-items: center; }
.pack-row__game select {
  font: inherit; font-size: var(--text-sm, .875rem);
  padding: 6px 10px; border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-default, #D1D5DB);
  background: #fff; color: var(--text-body, #374151); cursor: pointer;
}
.pack-row__game select:focus-visible {
  outline: 2px solid var(--brand, #22B8A6); outline-offset: 1px;
}
/* A locked game stays listed so the upgrade is discoverable. */
.pack-row__game option:disabled { color: #9CA3AF; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- pack list pagination ------------------------------------------------ */
.pack-pager {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-4, 16px); margin-top: var(--space-5, 20px);
}
.pack-pager[hidden] { display: none; }
.pack-pager .muted { font-size: var(--text-sm, .875rem); min-width: 9rem; text-align: center; }
.pack-pager button[disabled] { opacity: .45; cursor: default; }

/* ---- pack editor ---------------------------------------------------------- */
.pe-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(15, 23, 42, .5);
}
.pe-panel {
  width: min(720px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-page, #F4F6F9); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
}
.pe-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: #fff;
  border-bottom: 1px solid var(--border-subtle, #E5E7EB); flex: 0 0 auto;
}
.pe-close {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: #6B7280; font-size: 22px; line-height: 1;
}
.pe-close:hover { background: #F3F4F6; color: #111827; }
/* The body scrolls; the footer is a sibling so Save is always reachable. */
.pe-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.pe-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; background: var(--bg-page, #F4F6F9);
  border-top: 1px solid var(--border-subtle, #E5E7EB); flex: 0 0 auto;
}
.pe-err { flex: 1; color: #DC2626; font-size: var(--text-sm, .875rem); }

.pe-levelname {
  margin: 4px 0 10px; font-size: var(--text-xs, .75rem); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #6B7280;
}
.pe-q {
  background: #fff; border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.pe-qhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pe-num {
  min-width: 24px; height: 24px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; border-radius: 50%;
  background: linear-gradient(95deg, #3E7BFA, #22B8A6);
}
.pe-remove { background: none; border: 0; color: #DC2626; font-size: 12.5px; cursor: pointer; padding: 2px; }
.pe-remove:hover { text-decoration: underline; }
.pe-qtext, .pe-atext {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px;
  padding: 8px 10px; border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: 8px; background: #F9FAFB; color: #1F2937;
}
.pe-qtext:focus, .pe-atext:focus { background: #fff; border-color: #22B8A6; outline: none; }
.pe-choices { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pe-choice { display: flex; align-items: center; gap: 8px; }
.pe-choice input[type=radio] { accent-color: #22B8A6; width: 16px; height: 16px; flex: 0 0 auto; }
.pe-letter { font-size: 12px; font-weight: 700; color: #6B7280; width: 1em; flex: 0 0 auto; }
.pe-x {
  flex: 0 0 auto; width: 26px; height: 26px; cursor: pointer; line-height: 1;
  background: #F3F4F6; color: #6B7280; border: 1px solid #E5E7EB; border-radius: 6px;
}
.pe-x:hover { background: #FEE2E2; color: #DC2626; border-color: #FCA5A5; }
.pe-add { margin-top: 8px; background: none; border: 0; color: #2B7FE0; font-size: 12.5px; cursor: pointer; padding: 2px; }
.pe-add:hover { text-decoration: underline; }

/* ---- share dialog --------------------------------------------------------- */
.ps-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(15, 23, 42, .5);
}
.ps-panel {
  width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--bg-page, #F4F6F9); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .35);
}
.ps-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: #fff;
  border-bottom: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: 16px 16px 0 0;
}
.ps-close {
  width: 32px; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: #6B7280; font-size: 22px; line-height: 1;
}
.ps-close:hover { background: #F3F4F6; color: #111827; }
.ps-body { padding: 16px 20px 20px; }
.ps-label {
  margin: 14px 0 6px; font-size: var(--text-xs, .75rem); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #374151;
}
.ps-label:first-child { margin-top: 0; }
.ps-row { display: flex; gap: 8px; align-items: stretch; }
.ps-box {
  flex: 1; min-width: 0; background: #fff; color: #374151;
  border: 1px solid var(--border-subtle, #E5E7EB); border-radius: 9px;
  padding: 9px 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px;
}
.ps-box:focus { border-color: #22B8A6; outline: none; }
.ps-embed { resize: vertical; line-height: 1.45; }
.ps-row .btn { flex: 0 0 auto; align-self: flex-start; }
.ps-hint { font-size: 12.5px; color: #6B7280; margin: 8px 0 0; line-height: 1.5; }

/* The row now carries seven controls; let them wrap rather than overflow on
   narrower screens. */
.pack-row__actions { flex-wrap: wrap; justify-content: flex-end; }
