@font-face { font-family: 'Sniglet'; src: url('/fonts/Sniglet-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sniglet'; src: url('/fonts/Sniglet-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

:root { --ink: #2E2A33; --muted: #6E6875; --bg: #FFFBF4; --card: #fff; --line: #EADFCF; --accent: #E8743B; --accent-d: #C95A24; --ok: #2F8A4F; --bad: #C03A2B; --radius: 16px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4, .logo { font-family: Sniglet, 'Trebuchet MS', sans-serif; font-weight: 800; line-height: 1.15; }
a { color: var(--accent-d); }
.small { font-size: 14px; } .muted { color: var(--muted); } .center { text-align: center; } .ok { color: var(--ok); } .bad { color: var(--bad); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.brand { text-decoration: none; color: var(--ink); font-size: 26px; }
.logo b { color: var(--accent); }
.top nav { display: flex; gap: 18px; align-items: center; }
.top nav a { text-decoration: none; color: var(--ink); font-size: 15px; }

.btn { display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px; background: var(--accent); color: #fff !important; font: 700 16px Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none; box-shadow: 0 2px 0 var(--accent-d); }
.btn:hover { background: var(--accent-d); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.big { padding: 15px 30px; font-size: 18px; }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn.ghost { background: #fff; color: var(--accent-d) !important; border: 2px solid var(--accent); box-shadow: none; }
.link { background: none; border: 0; color: var(--accent-d); text-decoration: underline; cursor: pointer; font: inherit; }

.hero { max-width: 1180px; margin: 10px auto 30px; padding: 20px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 0 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; margin: 0 0 12px; }
.lead.small { font-size: 16px; color: var(--muted); }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.08)); }

.editor { max-width: 1180px; margin: 0 auto 40px; padding: 20px; background: var(--card); border-radius: 24px; box-shadow: 0 6px 30px rgba(80, 50, 20, .08); scroll-margin-top: 10px; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.step { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: 700 15px Inter, sans-serif; color: var(--muted); cursor: pointer; }
.step.on { border-color: var(--accent); color: #fff; background: var(--accent); }
.cols { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.05fr); gap: 28px; align-items: start; }
.preview { position: sticky; top: 12px; }

.field { display: block; font-weight: 600; margin: 0 0 14px; }
.field input, .field select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px; font: 16px Inter, sans-serif; }
.field.inline { display: inline-block; margin-right: 14px; }
.field.inline input, .field.inline select { display: inline-block; width: auto; margin-left: 6px; }
.photo { background: #FFF4E6; border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.photo p { margin: 8px 0 0; }
.opt { margin: 0 0 14px; }
.opt h3 { font-size: 17px; margin: 0 0 8px; }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sub { margin-top: 8px; }
.sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px var(--accent); }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 600 14px Inter, sans-serif; cursor: pointer; color: var(--ink); }
.chip.on { border-color: var(--accent); background: #FFF1E8; color: var(--accent-d); }
.toggles { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; }
.toggles input { width: 18px; height: 18px; vertical-align: -3px; }

.avatar-preview { background: #FFF4E6; border-radius: 24px; padding: 18px; }
.avatar-preview .big { width: 72%; display: block; margin: 0 auto; }
.avatar-preview .mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.avatar-preview .mini svg { width: 100%; }
.avatar-preview .name { font: 800 22px Sniglet, sans-serif; margin: 8px 0 0; }
.page-preview svg { width: 100%; height: auto; display: block; margin: 0 auto 12px; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.12); background: #fff; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; font: 600 15px Inter, sans-serif; cursor: pointer; }
.tabs button.on { border-color: var(--accent); background: #FFF1E8; }
.style-toggle { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-weight: 600; }
.tasks { list-style: none; padding: 0; margin: 0 0 10px; counter-reset: t; }
.tasks li { display: grid; grid-template-columns: 22px 52px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #F3EADF; counter-increment: t; }
.tasks li::before { content: counter(t); font-weight: 700; color: var(--muted); text-align: right; }
.tasks svg { width: 52px; height: 52px; }
.tasks input { width: 100%; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; font: 15px Inter, sans-serif; }
.acts button { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.acts button:disabled { opacity: .3; }
.day h4 { margin: 14px 0 4px; }

dialog.picker { width: min(760px, 94vw); max-height: 86vh; border: 0; border-radius: 20px; padding: 18px; }
dialog.picker::backdrop { background: rgba(30, 20, 10, .45); }
.pick-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -18px; background: #fff; padding: 8px 0; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pick { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 6px; cursor: pointer; font: 600 13px Inter, sans-serif; }
.pick:hover { border-color: var(--accent); }
.pick svg { width: 100%; height: auto; }
.pick span { display: block; }

.buy { display: grid; gap: 10px; margin-bottom: 14px; }
.opt-buy { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.opt-buy.on { border-color: var(--accent); background: #FFF6EF; }
.opt-buy input { margin-top: 4px; width: 18px; height: 18px; }
.code { margin: 6px 0 14px; }
.code summary { cursor: pointer; font-weight: 600; }
.code .row { display: flex; gap: 8px; margin-top: 8px; }
.code input { flex: 1; padding: 10px; border: 2px solid var(--line); border-radius: 12px; font: 15px Inter, sans-serif; }
.consent { display: block; margin: 10px 0 14px; font-size: 14px; }
.consent input { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }

.info { max-width: 980px; margin: 0 auto 40px; padding: 0 20px; }
.info h2 { font-size: 30px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards3 > div { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 2px 10px rgba(80,50,20,.06); }
.ticks { padding-left: 20px; }
.ticks li { margin-bottom: 6px; }
.pro { background: #EEF4FB; border-radius: 24px; padding: 24px 28px; }
.pro-buy { background: #fff; border-radius: var(--radius); padding: 16px; }
.price { font-weight: 700; font-size: 18px; }
.faq details { background: #fff; border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.foot { text-align: center; padding: 30px 20px 50px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }

.page { max-width: 760px; margin: 0 auto 60px; padding: 0 20px; }
.page h1 { font-size: 34px; }
.done { max-width: 760px; margin: 0 auto 60px; padding: 20px; background: #fff; border-radius: 24px; text-align: center; }
.done img { width: 260px; max-width: 70%; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.done .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.codes-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.codes-table td, .codes-table th { border-bottom: 1px solid var(--line); padding: 6px; }

@media (max-width: 860px) {
  .hero, .cols { grid-template-columns: 1fr; }
  .preview { position: static; order: -1; }
  .cards3 { grid-template-columns: 1fr; }
  .top nav a:not(.btn) { display: none; }
  .avatar-preview .big { width: 55%; }
}

/* photo → avatar window */
dialog.photo-dlg { width: min(520px, 94vw); border: 0; outline: none; border-radius: 22px; padding: 22px; text-align: center; }
dialog.photo-dlg::backdrop { background: rgba(30, 20, 10, .5); }
.photo-dlg h3 { margin: 0 0 12px; font-size: 24px; }
.dlg-photo { position: relative; width: 180px; height: 180px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px #FFE3D1; }
.dlg-photo img { width: 100%; height: 100%; object-fit: cover; }
.dlg-photo .scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(to bottom, rgba(232,116,59,0), rgba(232,116,59,.45), rgba(232,116,59,0)); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
.bar { height: 10px; background: #F3EADF; border-radius: 99px; overflow: hidden; margin: 0 0 12px; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.dlg-steps { list-style: none; padding: 0; margin: 0 auto 10px; text-align: left; width: fit-content; }
.dlg-steps li { color: var(--muted); padding: 3px 0; display: block; }
.dlg-steps li.now { color: var(--ink); font-weight: 700; }
.dlg-steps li.past { color: var(--ok); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.dlg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.dlg-compare img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.dlg-compare svg { width: 100%; }
.dlg-table { margin: 0 auto 8px; text-align: left; border-collapse: collapse; }
.dlg-table td { padding: 5px 8px; }
.dlg-table td:first-child { font-weight: 700; }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dlg-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
dialog.photo-dlg { width: min(560px, 96vw); max-height: 94vh; }
.dlg-compare { max-width: 380px; margin: 0 auto 12px; }
.dlg-rows { text-align: left; display: grid; gap: 10px; }
.dlg-rows .swatches, .dlg-rows .chips { margin-top: 6px; }
.dlg-rows .sw { width: 32px; height: 32px; }
.dlg-rows .chip { padding: 5px 11px; font-size: 13px; }
.dlg-rows small .dot { width: 14px; height: 14px; vertical-align: -3px; }

/* landing pages */
.landing-hero { max-width: 1180px; margin: 10px auto 30px; padding: 20px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; align-items: center; }
.landing-hero h1 { font-size: clamp(30px, 4vw, 46px); margin: 6px 0 14px; }
.landing-hero figure { margin: 0; text-align: center; }
.landing-hero img { width: 100%; max-width: 440px; height: auto; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.14); background: #fff; }
.landing-hero figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.crumbs a { color: var(--muted); }
.landing h2 { margin-top: 30px; }
.seo-links { margin-bottom: 10px; line-height: 2; }
@media (max-width: 860px) { .landing-hero { grid-template-columns: 1fr; } }
