/* ==========================================================================
   Screen layouts — applies on top of themes.css
   ========================================================================== */

/* ---- Header / Nav ---- */
.yy-header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 48px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
}
.yy-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  display: flex; align-items: center; gap: 8px;
}
.yy-logo-mark {
  width: 32px; height: 32px;
  background: var(--accent); color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-family: var(--font-accent);
  font-size: 18px; font-weight: 600;
}
.yy-nav {
  display: flex; gap: 28px;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  flex: 1;
}
.yy-nav a {
  color: var(--fg);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms;
  cursor: pointer;
}
.yy-nav a.active,
.yy-nav a:hover { border-bottom-color: var(--accent); }

.yy-nav-culture {
  color: var(--accent-2) !important;
  font-family: var(--font-accent);
  font-weight: 600;
}

.yy-actions { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.yy-search {
  display: flex; align-items: center;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  gap: 8px;
  width: 240px;
  color: var(--fg-muted);
  font-size: 12px;
}
.yy-icon-btn {
  position: relative;
  padding: 8px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: var(--fg);
}
.yy-badge {
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* ---- Screen shell ---- */
.screen {
  position: absolute !important;
  inset: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  z-index: 1;
}
.screen-body {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* ---- Home hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 560px;
  gap: 0;
}
.hero-text {
  padding: 90px 80px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
.hero-tag {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 88px; line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  white-space: pre-line;
}
.hero-sub {
  color: var(--fg-muted);
  font-size: 16px;
  max-width: 440px;
  margin-bottom: 36px;
}
.hero-cta-row { display: flex; gap: 12px; }

.hero-visual {
  position: relative;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* ---- Category grid ---- */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
  padding: 32px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cat-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  font-size: 11px; font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  text-align: center;
}
.cat-dot {
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-accent);
  font-size: 20px; color: var(--accent);
  transition: transform 160ms;
}
.cat-item:hover .cat-dot { transform: translateY(-3px); }

/* ---- Product grid ---- */
.grid-section { padding: 40px 48px 60px; }
.grid-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
}
.grid-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: -0.02em;
}
.grid-sub { color: var(--fg-muted); font-size: 13px; margin-top: 6px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pcard {
  cursor: pointer;
  transition: transform 180ms ease;
}
.pcard:hover { transform: translateY(-4px); }
.pcard-info { padding: 14px 2px 0; }
.pcard-name {
  font-size: 13px; font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-price {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.pcard-was { color: var(--fg-subtle); text-decoration: line-through; font-size: 12px; font-weight: 400; }

/* ---- Footer ---- */
.yy-footer {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 60px 48px 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
.yy-footer h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px; opacity: 0.7; }
.yy-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; opacity: 0.9; }
.yy-footer .fbrand { font-family: var(--font-display); font-size: 32px; margin-bottom: 12px; }

/* ---- Filter sidebar + listing ---- */
.listing {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 100%;
}
.filters {
  padding: 32px 24px 32px 48px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.filter-group { margin-bottom: 28px; }
.filter-group h5 {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 12px; font-weight: 600;
}
.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--fg);
  cursor: pointer;
}
.filter-option .cb {
  width: 14px; height: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--bg-alt);
}
.filter-option .cb.on { background: var(--accent); border-color: var(--accent); }

.listing-main { padding: 24px 48px; }
.listing-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.listing-crumbs { font-size: 12px; color: var(--fg-muted); letter-spacing: 0.04em; }
.listing-title { font-family: var(--font-display); font-size: 34px; margin: 8px 0; letter-spacing: -0.02em; }
.listing-count { color: var(--fg-muted); font-size: 13px; }

/* ---- Product detail ---- */
.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: 32px 48px 60px;
}
.pdp-gallery {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
}
.pdp-thumbs { display: flex; flex-direction: column; gap: 12px; }
.pdp-thumb {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pdp-thumb.on { border-color: var(--accent); border-width: 2px; }
.pdp-main-img {
  aspect-ratio: 4/5;
  background: var(--surface);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pdp-info { padding-top: 8px; }
.pdp-crumb { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 14px; }
.pdp-name { font-family: var(--font-display); font-size: 42px; letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.05; }
.pdp-meta { display: flex; gap: 16px; font-size: 12px; color: var(--fg-muted); margin-bottom: 20px; }
.pdp-price { font-size: 28px; font-weight: 600; margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.pdp-price .was { font-size: 16px; color: var(--fg-subtle); text-decoration: line-through; margin-left: 10px; font-weight: 400; }
.pdp-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.pdp-section h4 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 12px; font-weight: 600; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.sizes { display: flex; gap: 8px; }
.size { padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; cursor: pointer; min-width: 52px; text-align: center; background: var(--bg-alt); }
.size.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.pdp-cta-row { display: flex; gap: 12px; margin-top: 24px; }
.pdp-cta-row .btn-primary { flex: 1; }
.pdp-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.65; }

/* ---- Cart / checkout ---- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 0;
  min-height: 100%;
}
.checkout-main { padding: 40px 64px; border-right: 1px solid var(--border); }
.checkout-side { padding: 40px 48px; background: var(--bg-alt); }

.steps { display: flex; gap: 0; margin-bottom: 36px; }
.step {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  color: var(--fg-muted);
}
.step.on { border-color: var(--accent); color: var(--fg); font-weight: 600; }
.step.done { border-color: var(--accent); color: var(--fg-muted); }
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
}
.step.on .step-num, .step.done .step-num { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.checkout-section h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 20px; letter-spacing: -0.01em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); font-weight: 600; }
.form-field input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: 14px;
}
.form-field input:focus { outline: none; border-color: var(--accent); }

.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.pay-method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-alt);
}
.pay-method.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pay-logo {
  width: 44px; height: 28px;
  background: var(--fg); color: var(--bg-alt);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.cart-items { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
.cart-item-img { aspect-ratio: 1; background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cart-item-name { font-size: 13px; font-weight: 500; margin-bottom: 2px; line-height: 1.3; }
.cart-item-meta { font-size: 11px; color: var(--fg-muted); }
.cart-item-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.summary-row.total { font-size: 20px; font-weight: 600; padding: 16px 0; border-top: 1px solid var(--border); margin-top: 10px; font-family: var(--font-display); }

/* ---- Culture channel ---- */
.culture-hero {
  position: relative;
  height: 420px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.culture-hero-inner {
  position: relative; z-index: 2;
  text-align: center;
  padding: 48px;
}
.culture-hero-title { font-family: var(--font-accent); font-size: 72px; letter-spacing: 0.04em; line-height: 1.05; margin-bottom: 28px; color: var(--accent); white-space: nowrap; }
.culture-hero-sub { font-size: 15px; color: var(--fg-muted); max-width: 520px; margin: 0 auto; font-family: var(--font-body); line-height: 1.6; }

.culture-mark {
  position: absolute;
  font-family: var(--font-accent);
  font-size: 320px;
  color: var(--accent-2);
  opacity: 0.08;
  line-height: 0.8;
  pointer-events: none;
}

.seal {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: var(--accent-2);
  color: #fafaf0;
  font-family: var(--font-accent);
  font-size: 22px;
  font-weight: 700;
  border-radius: 3px;
  transform: rotate(-3deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ---- Order confirmation ---- */
.confirm {
  padding: 60px 48px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  margin: 0 auto 28px;
  display: flex; align-items: center; justify-content: center;
}
.confirm h1 { font-family: var(--font-display); font-size: 52px; margin-bottom: 16px; letter-spacing: -0.02em; }
.confirm-sub { font-size: 15px; color: var(--fg-muted); margin-bottom: 40px; }
.confirm-card {
  text-align: left;
  padding: 28px 32px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.confirm-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.confirm-row:last-child { border: 0; }
.confirm-row .l { color: var(--fg-muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- Tweaks panel ---- */
.tweaks-panel {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 320px;
  background: #0d0d0d;
  color: #fff;
  border-radius: 14px;
  padding: 20px;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  font-family: -apple-system, sans-serif;
  font-size: 12px;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h3 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #888; margin-bottom: 12px; font-family: inherit; font-weight: 600; }
.tweak-group { margin-bottom: 18px; }
.tweak-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tweak-chip {
  padding: 6px 10px;
  border-radius: 99px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  font-size: 11px;
  cursor: pointer;
  color: #ccc;
  display: inline-flex; align-items: center; gap: 6px;
}
.tweak-chip.on { background: #fff; color: #000; border-color: #fff; }
.tweak-chip .sw { display: inline-flex; gap: 1px; width: 18px; height: 10px; border-radius: 2px; overflow: hidden; }
.tweak-chip .sw span { flex: 1; }

.tweaks-toggle {
  position: fixed; right: 20px; bottom: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #0d0d0d; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9998;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Cart popup */
.cart-toast {
  position: fixed;
  top: 80px; right: 24px;
  background: var(--fg);
  color: var(--bg-alt);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: all 280ms cubic-bezier(.2,.8,.2,1);
}
.cart-toast.show { opacity: 1; transform: translateX(0); }

/* Channel switcher pill on header */
.channel-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  cursor: pointer;
}
.channel-pill .flag {
  width: 16px; height: 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  font-family: var(--font-accent);
}

/* noir/minimal adjustments */
[data-theme="noir"] .pcard-info,
[data-theme="noir"] .yy-logo-mark { border-radius: 0; }
[data-theme="noir"] .hero-title { text-transform: uppercase; font-weight: 300; }

/* youth adjustments */
[data-theme="youth"] .hero-title { color: var(--fg); }
[data-theme="youth"] .pcard:hover { transform: translate(-3px, -3px); }

/* RTL tweaks */
[dir="rtl"] .yy-nav { flex-direction: row-reverse; }
[dir="rtl"] .hero { direction: rtl; }

/* =========================================================
   Header popover pickers (language / channel / theme / account)
   ========================================================= */
.yy-pop-wrap { position: relative; display: inline-flex; }

.yy-pop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--fg-muted);
  cursor: pointer;
  user-select: none;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.yy-pop-btn:hover, .yy-pop-btn.active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.yy-pop-btn .flag {
  width: 16px; height: 16px;
  background: var(--accent); color: var(--accent-fg);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  font-family: var(--font-accent);
}
.yy-pop-btn.active .flag { background: var(--accent-fg); color: var(--accent); }
.yy-pop-btn .lbl { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yy-pop-btn .caret { font-size: 9px; opacity: 0.7; }

.yy-pop-btn .swatch-dots {
  display: inline-flex; gap: 2px;
}
.yy-pop-btn .swatch-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.yy-pop {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 220px; max-width: 300px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  padding: 6px;
  z-index: 200;
  max-height: min(70vh, 480px);
  overflow: auto;
  animation: yypop-in 160ms cubic-bezier(.2,.8,.2,1);
}
@keyframes yypop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.yy-pop-row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px; row-gap: 1px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg);
}
.yy-pop-row:hover { background: var(--surface); }
.yy-pop-row.on   { background: var(--accent); color: var(--accent-fg); }
.yy-pop-row.on .sub { color: var(--accent-fg); opacity: 0.75; }

.yy-pop-row .flag {
  width: 22px; height: 22px;
  background: var(--accent); color: var(--accent-fg);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  font-family: var(--font-accent);
  grid-row: span 2;
}
.yy-pop-row.on .flag { background: var(--accent-fg); color: var(--accent); }

.yy-pop-row .swatch-dots {
  grid-row: span 2;
  display: inline-flex; gap: 3px;
}
.yy-pop-row .swatch-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

.yy-pop-row .lbl { font-weight: 500; }
.yy-pop-row .sub { font-size: 11px; color: var(--fg-muted); grid-column: 2; }

.yy-pop-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.yy-pop-head .big { font-size: 14px; font-weight: 600; color: var(--fg); }
.yy-pop-head .sub { font-size: 11px; color: var(--fg-muted); margin-top: 2px; }

.yy-icon-btn.logged-in { position: relative; }
.yy-dot-online {
  position: absolute; bottom: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 0 2px var(--bg);
}

/* =========================================================
   Auth modal
   ========================================================= */
.yy-auth-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: yyauth-bg 180ms ease;
}
@keyframes yyauth-bg { from { opacity: 0; } to { opacity: 1; } }

.yy-auth-modal {
  width: min(420px, 92vw);
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: yyauth-in 220ms cubic-bezier(.2,.8,.2,1);
}
@keyframes yyauth-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.yy-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.yy-auth-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.yy-auth-tab.on { color: var(--fg); border-bottom-color: var(--accent); }
.yy-auth-close {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none;
  font-size: 22px; line-height: 1;
  color: var(--fg-muted); cursor: pointer;
  padding: 4px 10px;
}

.yy-auth-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.yy-auth-body label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg-muted);
  margin-top: 10px;
}
.yy-auth-body label .opt { text-transform: none; font-weight: 400; opacity: 0.7; margin-left: 4px; }
.yy-auth-body input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  outline: none;
}
.yy-auth-body input:focus { border-color: var(--accent); }
.yy-auth-err {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  font-size: 13px;
}
.yy-auth-submit {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border: none; border-radius: 99px;
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.yy-auth-submit:disabled { opacity: 0.5; cursor: wait; }
.yy-auth-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--fg-muted);
}
.yy-auth-switch a { color: var(--accent); cursor: pointer; font-weight: 600; }
.yy-auth-switch a:hover { text-decoration: underline; }

/* ==========================================================================
   User Center — storefront account dashboard (UserCenterScreen)
   ========================================================================== */
.yy-uc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}
.yy-uc-header { margin-bottom: 24px; }
.yy-uc-hello {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.yy-uc-email { color: var(--fg-muted); margin-top: 6px; font-size: 13px; font-variant: tabular-nums; }

.yy-uc-grid {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 880px) {
  .yy-uc-wrap { padding: 24px 20px 56px; }
  .yy-uc-grid { grid-template-columns: 1fr; }
  .yy-uc-aside { position: static !important; }
}

.yy-uc-aside {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  position: sticky; top: 92px;
}
.yy-uc-tab {
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--fg);
  display: flex; align-items: center; gap: 10px;
  transition: background .15s, color .15s;
}
.yy-uc-tab:hover { background: var(--surface); }
.yy-uc-tab.on {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
}
.yy-uc-tab-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.yy-uc-signout {
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-muted);
}
.yy-uc-signout:hover { color: var(--fg); background: var(--surface); }

.yy-uc-main {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  min-height: 460px;
}
.yy-uc-section-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.yy-uc-subtitle {
  margin: 26px 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.yy-uc-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 20px;
}

/* ---- form controls ---- */
.yy-uc-form { display: grid; gap: 14px; max-width: 480px; }
.yy-uc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yy-uc-field { display: grid; gap: 6px; }
.yy-uc-label {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.yy-uc-input,
.yy-uc-select,
.yy-uc-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.yy-uc-input:focus,
.yy-uc-select:focus,
.yy-uc-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.yy-uc-input:disabled {
  background: var(--bg);
  color: var(--fg-muted);
  cursor: not-allowed;
}
.yy-uc-textarea { resize: vertical; min-height: 100px; }
.yy-uc-checkline {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg);
}

/* ---- buttons ---- */
.yy-uc-btn {
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity .15s, transform .1s;
}
.yy-uc-btn:hover:not(:disabled) { opacity: 0.9; }
.yy-uc-btn:active:not(:disabled) { transform: translateY(1px); }
.yy-uc-btn:disabled { opacity: 0.55; cursor: wait; }
.yy-uc-btn.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.yy-uc-btn.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); opacity: 1; }
.yy-uc-btn.danger {
  background: transparent;
  color: #c33;
  border-color: rgba(204,51,51,0.35);
}
.yy-uc-btn.danger:hover:not(:disabled) { border-color: #c33; background: rgba(204,51,51,0.05); opacity: 1; }
.yy-uc-btn.sm { padding: 6px 12px; font-size: 12px; }
.yy-uc-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- messages ---- */
.yy-uc-msg { font-size: 13px; padding: 10px 12px; border-radius: var(--radius); margin: 10px 0 0; }
.yy-uc-msg.ok  { background: rgba(34,160,90,0.08);  color: #2a7; border: 1px solid rgba(34,160,90,0.2); }
.yy-uc-msg.err { background: rgba(204,51,51,0.08); color: #c33; border: 1px solid rgba(204,51,51,0.2); }
.yy-uc-empty {
  padding: 56px 20px; text-align: center; color: var(--fg-muted);
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  font-size: 14px; line-height: 1.7;
}
.yy-uc-empty .ico { font-size: 40px; opacity: 0.55; margin-bottom: 8px; }

/* ---- overview stat cards ---- */
.yy-uc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .yy-uc-stats { grid-template-columns: 1fr; } }
.yy-uc-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  cursor: pointer;
  background: var(--surface);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.yy-uc-stat:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}
.yy-uc-stat .k {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.yy-uc-stat .v {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500; margin-top: 6px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.yy-uc-stat .h { color: var(--fg-muted); font-size: 12px; margin-top: 6px; }

/* ---- orders list ---- */
.yy-uc-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
}
.yy-uc-list-row {
  padding: 16px 20px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px; align-items: center;
  transition: background .15s;
}
.yy-uc-list-row + .yy-uc-list-row { border-top: 1px solid var(--border); }
.yy-uc-list-row:hover { background: var(--surface); }
.yy-uc-order-no { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--fg); }
.yy-uc-order-meta { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.yy-uc-chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-weight: 500;
}
.yy-uc-chip.paid      { background: rgba(34,160,90,0.1); color: #2a7; border-color: rgba(34,160,90,0.2); }
.yy-uc-chip.shipped   { background: rgba(63,131,248,0.1); color: #3f83f8; border-color: rgba(63,131,248,0.22); }
.yy-uc-chip.delivered { background: rgba(34,160,90,0.14); color: #228e52; border-color: rgba(34,160,90,0.3); }
.yy-uc-chip.cancelled { background: rgba(204,51,51,0.08); color: #c33; border-color: rgba(204,51,51,0.22); }
.yy-uc-money { font-weight: 600; font-variant-numeric: tabular-nums; }

.yy-uc-back {
  cursor: pointer; color: var(--accent); font-size: 13px;
  display: inline-flex; gap: 4px; align-items: center;
}
.yy-uc-back:hover { text-decoration: underline; }

.yy-uc-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 14px 0;
  background: var(--bg-alt);
}
.yy-uc-panel h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); }
.yy-uc-panel .body { font-size: 14px; line-height: 1.7; }

.yy-uc-order-items { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.yy-uc-order-item {
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 14px; padding: 14px 18px; align-items: center;
}
.yy-uc-order-item + .yy-uc-order-item { border-top: 1px solid var(--border); }
.yy-uc-order-item .thumb {
  width: 56px; height: 56px; border-radius: var(--radius);
  background-size: cover; background-position: center;
  background-color: var(--surface);
}
.yy-uc-totals {
  margin-top: 16px;
  margin-left: auto;
  max-width: 260px;
  font-size: 14px;
}
.yy-uc-totals .r { display: flex; justify-content: space-between; padding: 3px 0; }
.yy-uc-totals .sum {
  padding-top: 10px; margin-top: 6px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

/* ---- addresses ---- */
.yy-uc-addr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.yy-uc-addr-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  background: var(--bg-alt);
  transition: border-color .15s;
}
.yy-uc-addr-card.is-default {
  border-color: var(--accent);
  background: var(--surface);
}
.yy-uc-addr-card:hover { border-color: var(--accent); }
.yy-uc-addr-card .badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.yy-uc-addr-card .name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.yy-uc-addr-card .phone { font-size: 12px; color: var(--fg-muted); margin-bottom: 8px; font-variant: tabular-nums; }
.yy-uc-addr-card .addr { font-size: 13px; line-height: 1.6; color: var(--fg); }
.yy-uc-addr-actions { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- FAQ accordion ---- */
.yy-uc-faq { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-alt); }
.yy-uc-faq-item + .yy-uc-faq-item { border-top: 1px solid var(--border); }
.yy-uc-faq-q {
  padding: 16px 20px; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; font-weight: 500;
  font-size: 14px; user-select: none;
  transition: background .15s;
}
.yy-uc-faq-q:hover { background: var(--surface); }
.yy-uc-faq-q .chev { font-size: 18px; color: var(--fg-muted); font-weight: 300; }
.yy-uc-faq-a { padding: 0 20px 16px; font-size: 13px; line-height: 1.75; color: var(--fg-muted); }

/* ---- coming soon placeholder ---- */
.yy-uc-placeholder {
  margin: 12px 0; padding: 56px 24px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  color: var(--fg-muted);
}
.yy-uc-placeholder .ico { font-size: 42px; opacity: 0.5; }
.yy-uc-placeholder h3 { margin: 12px 0 8px; font-weight: 500; font-size: 17px; color: var(--fg); }
.yy-uc-placeholder p { margin: 0; font-size: 13px; line-height: 1.7; }

/* ---- email change modal ---- */
.yy-uc-step {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 0;
  font-size: 13px; color: var(--fg-muted);
}
.yy-uc-step .n {
  width: 22px; height: 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--fg-muted);
}
.yy-uc-step.active .n { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.yy-uc-step.done .n { background: rgba(34,160,90,0.15); color: #2a7; border-color: rgba(34,160,90,0.35); }
.yy-uc-step.active { color: var(--fg); }
.yy-uc-code-input {
  letter-spacing: 0.5em;
  font-family: var(--font-mono, monospace);
  font-size: 22px;
  text-align: center;
}

