/* =====================================================
   PINGTAP — design system + all page styles
   ===================================================== */

:root {
  --bg: #FAF7F2;
  --bg-alt: #F2EDE3;
  --ink: #0E0E0C;
  --ink-soft: #46443F;
  --muted: #8A8780;
  --line: #E5DFD3;
  --white: #FFFFFF;
  --accent: #FF4F1A;
  --accent-soft: #FFE8DF;
  --green: #2D8B5C;
  --red: #C8350D;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --max: 1180px;
  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; color: var(--accent); }
code { font-family: var(--font-mono); font-size: 0.92em; }

.eyebrow {
  display: inline-block; font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.eyebrow--light { color: rgba(255,255,255,0.6); }

/* ==================== NAV ==================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(250, 247, 242, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.is-scrolled { border-color: var(--line); }
.nav__logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.nav__wave { display: inline-block; font-size: 20px; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out infinite; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 10%{transform:rotate(14deg)} 20%{transform:rotate(-8deg)} 30%{transform:rotate(14deg)} 40%{transform:rotate(-4deg)} 50%{transform:rotate(10deg)} }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__links a, .nav__login { color: var(--ink-soft); transition: color 0.2s var(--ease); }
.nav__links a:hover, .nav__login:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink); color: var(--bg) !important; padding: 10px 18px;
  border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__cta:hover { background: var(--accent); transform: translateY(-1px); }
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta):not(.nav__login) { display: none; }
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--bg); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px -10px rgba(14,14,12,0.4); }
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 12px 28px -10px rgba(255,79,26,0.5); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ==================== HERO ==================== */
.hero { padding: clamp(60px, 9vw, 120px) var(--pad) clamp(80px, 10vw, 140px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(14,14,12,0.04) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
.hero__grid {
  position: relative; z-index: 1; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
}
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; gap: 70px; } }
.hero__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(58px, 9vw, 124px); line-height: 0.96; letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 30; margin-bottom: 28px;
}
.hero__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; }
.hero__sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 520px; margin-bottom: 36px; line-height: 1.5; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }

.hero__visual { position: relative; height: clamp(380px, 42vw, 480px); display: flex; align-items: center; justify-content: center; }
.phone {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-65%, -50%) rotate(-6deg);
  width: 220px; height: 440px; background: var(--ink);
  border-radius: 38px; padding: 8px;
  box-shadow: 0 30px 60px -20px rgba(14,14,12,0.35), 0 0 0 1px rgba(255,255,255,0.05) inset;
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat { 0%,100%{transform:translate(-65%,-50%) rotate(-6deg)} 50%{transform:translate(-65%,-53%) rotate(-6deg)} }
.phone__screen { width: 100%; height: 100%; background: var(--bg); border-radius: 32px; position: relative; overflow: hidden; }
.phone__notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 70px; height: 18px; background: var(--ink); border-radius: 999px; }
.phone__content { padding: 60px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone__avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #FF8B5C); margin-bottom: 8px; }
.phone__line { height: 9px; background: var(--line); border-radius: 6px; }
.phone__line--lg { width: 70%; } .phone__line--md { width: 50%; }
.phone__chip { margin-top: 16px; padding: 8px 14px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; }

.card {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-15%, -30%) rotate(8deg);
  width: 280px; height: 175px;
  background: linear-gradient(135deg, #1a1a18 0%, #0E0E0C 100%); color: var(--bg);
  border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 30px 50px -18px rgba(14,14,12,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: cardFloat 6s ease-in-out infinite; animation-delay: -3s;
}
@keyframes cardFloat { 0%,100%{transform:translate(-15%,-30%) rotate(8deg)} 50%{transform:translate(-15%,-33%) rotate(8deg)} }
.card__chip { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); position: relative; }
.card__chip::after { content:""; position: absolute; inset: 6px; border: 2px solid var(--bg); border-radius: 50%; border-right-color: transparent; border-bottom-color: transparent; }
.card__name { font-family: var(--font-serif); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.card__brand { font-size: 11px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; align-self: flex-end; margin-top: -28px; }

.ripple { position: absolute; top: 50%; left: 60%; width: 60px; height: 60px; border: 2px solid var(--accent); border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; animation: ripple 2.4s ease-out infinite; pointer-events: none; }
.ripple--2 { animation-delay: 0.8s; } .ripple--3 { animation-delay: 1.6s; }
@keyframes ripple { 0%{width:40px;height:40px;opacity:0.7} 100%{width:280px;height:280px;opacity:0} }

/* ==================== SECTIONS ==================== */
.section { padding: clamp(80px, 10vw, 140px) var(--pad); max-width: var(--max); margin: 0 auto; }
.section--alt { background: var(--bg-alt); max-width: 100%; }
.section--alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: 60px; max-width: 720px; }
.section__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(40px, 5.5vw, 68px); line-height: 1.02; letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.section__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; }

/* ==================== STEPS ==================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }
.step {
  padding: 36px 30px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.step:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 20px 40px -20px rgba(14,14,12,0.18); }
.step__num { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: 56px; color: var(--accent); line-height: 1; display: block; margin-bottom: 24px; }
.step h3 { font-family: var(--font-serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 16px; }

/* ==================== PRODUCTS ==================== */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 880px) { .products { grid-template-columns: 1fr; } }
.product { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; position: relative; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.product:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -25px rgba(14,14,12,0.25); }
.product--featured { border: 1px solid var(--ink); }
.product__badge { position: absolute; top: 18px; right: 18px; background: var(--accent); color: var(--white); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; z-index: 2; }
.product__visual { height: 220px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); position: relative; overflow: hidden; }
.sticker-mock { width: 110px; height: 110px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); position: relative; box-shadow: 0 12px 24px -12px rgba(14,14,12,0.2); }
.sticker-mock::before, .sticker-mock::after { content:""; position: absolute; border-radius: 50%; border: 2px solid var(--accent); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.sticker-mock::before { width: 32px; height: 32px; }
.sticker-mock::after  { width: 60px; height: 60px; opacity: 0.4; }
.card-mock { width: 240px; height: 150px; background: linear-gradient(135deg, #1a1a18 0%, #0E0E0C 100%); color: var(--bg); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 20px 40px -18px rgba(14,14,12,0.5); transform: rotate(-3deg); transition: transform 0.5s var(--ease); }
.product:hover .card-mock { transform: rotate(0); }
.card-mock__chip { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); }
.card-mock__name { font-family: var(--font-serif); font-size: 18px; }
.card-mock__brand { font-size: 9px; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; align-self: flex-end; margin-top: -22px; }
.custom-mock { width: 110px; height: 110px; border-radius: 16px; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 24px -12px rgba(255,79,26,0.5); transform: rotate(-4deg); transition: transform 0.5s var(--ease); }
.product:hover .custom-mock { transform: rotate(4deg); }
.custom-mock__logo { font-family: var(--font-serif); font-style: italic; font-size: 56px; color: var(--white); font-weight: 400; }
.product__body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.product__body h3 { font-family: var(--font-serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; margin-bottom: 8px; }
.product__body p { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; flex: 1; }
.product__price { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.product__price span { font-family: var(--font-serif); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.product__price small { font-size: 13px; color: var(--muted); }
.product__btn { align-self: flex-start; }

/* ==================== WHY ==================== */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 60px; }
@media (max-width: 720px) { .why { grid-template-columns: 1fr; gap: 30px; } }
.why__icon { font-family: var(--font-serif); font-size: 36px; color: var(--accent); line-height: 1; margin-bottom: 16px; display: inline-block; }
.why__item h3 { font-family: var(--font-serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; margin-bottom: 10px; }
.why__item p { color: var(--ink-soft); font-size: 16px; max-width: 460px; }

/* ==================== PRICING ==================== */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 34px; position: relative; }
.plan--featured { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan__badge { position: absolute; top: -12px; left: 34px; background: var(--accent); color: var(--white); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan h3 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; margin-bottom: 14px; }
.plan__price { font-family: var(--font-serif); font-size: 56px; font-weight: 400; line-height: 1; letter-spacing: -0.025em; margin-bottom: 28px; }
.plan__price small { font-family: var(--font-sans); font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.plan--featured .plan__price small { color: rgba(250,247,242,0.55); }
.plan__features { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.plan__features li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-soft); }
.plan--featured .plan__features li { color: rgba(250,247,242,0.85); }
.plan__features li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--font-serif); }
.pricing__note { margin-top: 28px; font-size: 14px; color: var(--muted); text-align: center; }

/* ==================== CTA ==================== */
.cta { background: var(--ink); color: var(--bg); padding: clamp(80px, 10vw, 140px) var(--pad); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,79,26,0.18) 0%, transparent 60%); pointer-events: none; }
.cta__inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; }
.cta__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(44px, 6vw, 80px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 20px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.cta__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--accent); }
.cta__sub { font-size: 17px; color: rgba(250,247,242,0.7); max-width: 520px; margin: 0 auto 40px; }

/* ==================== FORM (waitlist) ==================== */
.form { max-width: 520px; margin: 0 auto; }
.form__row { display: flex; gap: 8px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 6px; transition: border-color 0.3s var(--ease); }
.form__row:focus-within { border-color: var(--accent); }
.form__input { flex: 1; background: transparent; border: none; color: var(--bg); padding: 12px 20px; font-family: var(--font-sans); font-size: 16px; outline: none; }
.form__input::placeholder { color: rgba(250,247,242,0.4); }
@media (max-width: 540px) { .form__row { flex-direction: column; border-radius: var(--radius); padding: 8px; } .form__row .btn { width: 100%; } }

/* ==================== FOOTER ==================== */
.footer { padding: 50px var(--pad) 60px; background: var(--bg); border-top: 1px solid var(--line); }
.footer__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer__brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.footer__tag { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: 18px; color: var(--ink-soft); }
.footer__copy { font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }

/* ==================== REVEAL ==================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =====================================================
   AUTH (login / signup)
   ===================================================== */
.auth-body { background: var(--bg); }
.auth { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 60px var(--pad); }
.auth__panel { max-width: 460px; width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px 44px; box-shadow: 0 30px 60px -30px rgba(14,14,12,0.15); }
.auth__title { font-family: var(--font-serif); font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -0.025em; margin-bottom: 14px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.auth__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--accent); }
.auth__sub { color: var(--ink-soft); margin-bottom: 28px; font-size: 15px; }
.auth__form { display: flex; flex-direction: column; gap: 12px; }
.auth__input { font-family: var(--font-sans); font-size: 16px; padding: 14px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); outline: none; transition: border-color 0.2s var(--ease); }
.auth__input:focus { border-color: var(--ink); }
.auth__btn { padding: 14px; font-size: 15px; }
.auth__btn:disabled { opacity: 0.6; cursor: wait; }
.auth__message { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; line-height: 1.4; }
.auth__message--success { background: #E8F5EE; color: var(--green); border: 1px solid #B7DCC4; }
.auth__message--error { background: #FCEAE3; color: var(--red); border: 1px solid #F1B9A4; }
.auth__hint { margin-top: 24px; font-size: 13px; color: var(--muted); text-align: center; }

/* =====================================================
   DASHBOARD
   ===================================================== */
.dash-body { background: var(--bg-alt); }
.dash { max-width: var(--max); margin: 0 auto; padding: 60px var(--pad) 100px; }
.dash__head { margin-bottom: 40px; }
.dash__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(42px, 5vw, 64px); line-height: 1; letter-spacing: -0.025em; margin-bottom: 10px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.dash__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--accent); }
.dash__sub { color: var(--ink-soft); }

.dash__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
@media (max-width: 720px) { .dash__stats { grid-template-columns: 1fr; } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 28px; }
.stat__value { font-family: var(--font-serif); font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; margin-bottom: 6px; }
.stat__label { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }

.dash__panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 30px; margin-bottom: 24px; }
.dash__panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash__panel-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; }

.tags-list { display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-soft); }
.empty h3 { font-family: var(--font-serif); font-size: 24px; margin-bottom: 8px; }
.empty p { margin-bottom: 20px; }

.tag { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; position: relative; transition: border-color 0.2s var(--ease); }
.tag:hover { border-color: var(--ink-soft); }
.tag__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tag__name { font-family: var(--font-serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; outline: none; padding: 2px 4px; margin: -2px -4px 4px; border-radius: 6px; transition: background 0.2s var(--ease); }
.tag__name[contenteditable="true"]:focus, .tag__name[contenteditable="true"]:hover { background: var(--accent-soft); }
.tag__slug { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.tag__actions { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 18px; color: var(--ink-soft); transition: all 0.2s var(--ease); display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn--danger:hover { background: var(--red); border-color: var(--red); }
.tag__field { margin-bottom: 18px; }
.tag__field label { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.tag__edit { display: flex; gap: 8px; }
.tag__edit input { flex: 1; font-family: var(--font-mono); font-size: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); outline: none; transition: border-color 0.2s var(--ease); }
.tag__edit input:focus { border-color: var(--ink); }
.tag__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 18px; border-top: 1px dashed var(--line); }
@media (max-width: 540px) { .tag__stats { grid-template-columns: repeat(2, 1fr); } }
.tag__stats > div { display: flex; flex-direction: column; gap: 2px; }
.tag__stat-num { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.tag__stats span:not(.tag__stat-num) { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.tag__qr { padding-top: 20px; margin-top: 18px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 20px; }
.tag__qr img { width: 120px; height: 120px; border: 1px solid var(--line); border-radius: var(--radius); }
.tag__qr p { font-size: 13px; color: var(--muted); max-width: 260px; }

.flash { position: absolute; top: 14px; right: 14px; background: var(--green); color: var(--white); font-size: 11px; padding: 4px 10px; border-radius: 999px; animation: flash 1.4s ease forwards; }
@keyframes flash { 0%{opacity:0; transform:translateY(-6px)} 15%{opacity:1; transform:none} 80%{opacity:1} 100%{opacity:0} }

.orders-list { display: flex; flex-direction: column; gap: 8px; }
.order { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.order > div { display: flex; align-items: center; gap: 12px; }
.order small { color: var(--muted); }
.badge { font-size: 11px; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.badge--green { background: #E8F5EE; color: var(--green); }
.badge--gray { background: var(--line); color: var(--ink-soft); }

/* ==================== MODAL ==================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal__overlay { position: absolute; inset: 0; background: rgba(14,14,12,0.45); backdrop-filter: blur(4px); cursor: pointer; }
.modal__panel { position: relative; background: var(--white); border-radius: var(--radius-lg); padding: 36px 36px 30px; max-width: 480px; width: 100%; box-shadow: 0 30px 80px -20px rgba(14,14,12,0.4); animation: modalIn 0.3s var(--ease); }
@keyframes modalIn { from{opacity:0; transform:translateY(12px) scale(0.98)} to{opacity:1; transform:none} }
.modal__close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: none; background: transparent; font-size: 28px; cursor: pointer; color: var(--muted); border-radius: 8px; transition: all 0.2s var(--ease); }
.modal__close:hover { background: var(--bg); color: var(--ink); }
.modal__title { font-family: var(--font-serif); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: -0.02em; margin-bottom: 8px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.modal__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--accent); }
.modal__sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.modal__form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.field input { font-family: var(--font-sans); font-size: 15px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); outline: none; transition: border-color 0.2s var(--ease); }
.field input:focus { border-color: var(--ink); }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ==================== ORDER PAGE ==================== */
.order { max-width: 920px; margin: 0 auto; padding: 60px var(--pad) 100px; }
.order__head { text-align: center; max-width: 600px; margin: 0 auto 50px; }
.order__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(48px, 6vw, 72px); line-height: 1; letter-spacing: -0.025em; margin-bottom: 16px; font-variation-settings: "opsz" 144, "SOFT" 40; }
.order__title em { font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100; color: var(--accent); }
.order__sub { color: var(--ink-soft); }
.order__canceled { background: var(--accent-soft); color: var(--red); padding: 14px 18px; border-radius: var(--radius); margin-bottom: 30px; text-align: center; font-size: 14px; }
.order__products { display: flex; flex-direction: column; gap: 24px; }
.order-product { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px 36px; }
.order-product h2 { font-family: var(--font-serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; margin-bottom: 8px; }
.order-product p { color: var(--ink-soft); margin-bottom: 22px; }
.order-product__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.order-option { background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; cursor: pointer; text-align: left; font-family: var(--font-sans); transition: all 0.25s var(--ease); display: flex; flex-direction: column; gap: 4px; }
.order-option strong { display: block; font-size: 15px; color: var(--ink); }
.order-option span { font-family: var(--font-serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.order-option small { font-size: 12px; color: var(--muted); }
.order-option:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(14,14,12,0.2); }
.order-option--featured { border-color: var(--accent); background: var(--accent-soft); }
.order-option--featured strong { color: var(--accent); }
.order-option:disabled { cursor: wait; opacity: 0.7; }
.order__hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; max-width: 540px; margin-left: auto; margin-right: auto; }

/* =====================================================
   v2 — REDESIGNED ORDER PAGE
   ===================================================== */
.order__alert {
  background: var(--accent-soft);
  color: var(--red);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  text-align: center;
  font-size: 14px;
  border: 1px solid #F1B9A4;
}

.prods { display: flex; flex-direction: column; gap: 24px; }

.prod {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.prod:hover { transform: translateY(-2px); box-shadow: 0 24px 40px -24px rgba(14,14,12,0.18); }
.prod--featured { border-color: var(--ink); }
.prod__badge {
  position: absolute; top: 18px; right: 18px;
  background: var(--accent); color: var(--white);
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 6px 12px;
  border-radius: 999px; z-index: 2;
}

.prod__visual {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  min-height: 240px;
  padding: 30px;
}

.prod__body {
  padding: 32px 36px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.prod__head h2 {
  font-family: var(--font-serif);
  font-weight: 500; font-size: 26px;
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.prod__head p { color: var(--ink-soft); font-size: 15px; }

.prod__variants { display: flex; flex-direction: column; gap: 8px; }

.variant {
  display: block;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
}
.variant:hover { border-color: var(--ink-soft); }
.variant input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.variant:has(input:checked) {
  border-color: var(--ink);
  background: var(--accent-soft);
}
.variant__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.variant__label {
  font-weight: 500; font-size: 15px;
  display: flex; flex-direction: column; gap: 2px;
}
.variant__sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.variant__tag {
  display: inline-block;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px;
  margin-left: 8px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.variant__price {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.01em;
}

.prod__btn { align-self: flex-start; margin-top: 4px; }
.prod__btn:disabled { opacity: 0.7; cursor: wait; }

@media (max-width: 720px) {
  .prod { grid-template-columns: 1fr; }
  .prod__visual { min-height: 180px; }
  .prod__body { padding: 24px 24px 28px; }
}

/* =====================================================
   v2 — WELCOME / ONBOARDING BANNER
   ===================================================== */
.welcome {
  background: linear-gradient(135deg, var(--ink) 0%, #1a1a18 100%);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; gap: 24px; align-items: center;
  position: relative; overflow: hidden;
}
.welcome::after {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,79,26,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.welcome__icon { font-size: 40px; flex-shrink: 0; }
.welcome__title {
  font-family: var(--font-serif);
  font-weight: 500; font-size: 28px;
  letter-spacing: -0.01em; margin-bottom: 6px;
}
.welcome__title em {
  font-style: italic; font-weight: 300;
  color: var(--accent);
}
.welcome__sub {
  font-size: 14px; color: rgba(250,247,242,0.75);
  max-width: 600px; line-height: 1.5;
}
@media (max-width: 540px) {
  .welcome { flex-direction: column; align-items: flex-start; padding: 22px 24px; }
  .welcome__icon { font-size: 32px; }
}

/* =====================================================
   v2 — REDESIGNED TAG CARDS WITH QR
   ===================================================== */
.tags-grid { display: flex; flex-direction: column; gap: 16px; }

.tag-card {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tag-card:hover {
  border-color: var(--ink-soft);
  box-shadow: 0 8px 24px -16px rgba(14,14,12,0.15);
}
.tag-card--unset {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tag-card__main { display: flex; flex-direction: column; gap: 14px; }

.tag-card__head { display: flex; align-items: center; gap: 12px; }
.tag-card__name {
  font-family: var(--font-serif);
  font-weight: 500; font-size: 22px;
  letter-spacing: -0.01em;
}
.tag-card__badge {
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.tag-card__url, .tag-card__slug {
  display: flex; flex-direction: column; gap: 4px;
}
.tag-card__url-label, .tag-card__slug-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tag-card__url-value {
  font-size: 15px; font-weight: 500; color: var(--ink);
  word-break: break-all;
}
.tag-card__url-value--placeholder {
  color: var(--accent); font-style: italic;
}
.tag-card__slug {
  position: relative;
}
.tag-card__slug code {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--ink-soft);
  word-break: break-all;
  padding-right: 40px;
}

.tag-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 4px;
}

.tag-card__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.tag-card__stats > div {
  display: flex; flex-direction: column; gap: 2px;
}
.tag-card__stats strong {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500;
}
.tag-card__stats span {
  font-size: 11px; color: var(--muted);
}

.tag-card__qr {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tag-card__qr img {
  width: 160px; height: 160px;
  border-radius: 8px;
}
.tag-card__qr small {
  font-size: 11px; color: var(--muted);
  text-align: center; line-height: 1.4;
}

.icon-btn--inline {
  position: absolute; top: 14px; right: 0;
  width: 28px; height: 28px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .tag-card { grid-template-columns: 1fr; gap: 20px; }
  .tag-card__qr { max-width: 220px; align-self: flex-start; }
  .tag-card__stats { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   v2 — TEMPLATES GRID (in edit modal)
   ===================================================== */
.modal__panel--wide { max-width: 560px; }

.templates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}
@media (max-width: 540px) {
  .templates { grid-template-columns: repeat(3, 1fr); }
}

.template {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
}
.template:hover { border-color: var(--ink-soft); transform: translateY(-2px); }
.template.is-active {
  border-color: var(--ink);
  background: var(--accent-soft);
}
.template__icon { font-size: 20px; }
.template__label { font-size: 12px; font-weight: 500; }

.hint {
  font-size: 12px; color: var(--muted);
  margin-top: -6px;
  font-style: italic;
}

/* Renamed for clarity vs landing .order */
.order-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.order-row > div { display: flex; align-items: center; gap: 12px; }
.order-row small { color: var(--muted); }

.dash__panel-actions { display: flex; gap: 8px; }

/* =====================================================
   v3 — TAG CARDS without QR (overrides v2)
   ===================================================== */
.tag-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  /* override v2 grid */
  grid-template-columns: none !important;
}
.tag-card:hover {
  border-color: var(--ink-soft);
  box-shadow: 0 8px 24px -16px rgba(14,14,12,0.15);
}
.tag-card--unset {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tag-card__head { display: flex; align-items: center; gap: 12px; }
.tag-card__name {
  font-family: var(--font-serif);
  font-weight: 500; font-size: 22px;
  letter-spacing: -0.01em;
}
.tag-card__badge {
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.tag-card__field { display: flex; flex-direction: column; gap: 6px; }
.tag-card__field-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tag-card__field-label em {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
.tag-card__field-value {
  font-size: 15px; color: var(--ink);
  word-break: break-all;
}
.tag-card__field-value--placeholder {
  color: var(--accent); font-style: italic;
}

.tag-card__url-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.tag-card__url-row code {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--ink-soft);
  flex: 1;
  word-break: break-all;
}
.tag-card__url-row .icon-btn {
  flex-shrink: 0;
  position: relative;
}

.tag-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.tag-card__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.tag-card__stats > div {
  display: flex; flex-direction: column; gap: 2px;
}
.tag-card__stats strong {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 500;
}
.tag-card__stats span {
  font-size: 11px; color: var(--muted);
}
@media (max-width: 540px) {
  .tag-card__stats { grid-template-columns: repeat(2, 1fr); }
}

/* Hide v2 QR styles if any markup leaks through */
.tag-card__qr { display: none; }
