/* ONE CATALOG 0.5 — Soft Ivory / Midnight • tangible, usable responsive UI */
:root {
  --font: "Nunito Sans", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --ease-soft: cubic-bezier(.22,1,.36,1);
  --accent-main:#cba16f;--accent-deep:#a47b4d;
  --page:#fffdfa;--panel:#fffefd;--heading:#48444b;--body:#69636c;
  --border-soft:#efe9e3;--pale:#fcf5ec;
  --card-shadow:0 10px 32px rgba(89,68,48,.045);
  font-optical-sizing:auto;
}
html{scroll-behavior:smooth;scroll-padding-top:88px}body{font-family:var(--font);font-size:14px;font-weight:400;letter-spacing:0;line-height:1.65;background:var(--page);color:var(--heading);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-synthesis:none}
button,input,select,textarea,summary{font:inherit;letter-spacing:0}button,.btn,.lang-btn{font-weight:550}
button,a,.btn,select,summary,.theme-opt,.feature-card,.template-preview{transition:color .33s var(--ease-soft), background-color .4s var(--ease-soft),border-color .38s var(--ease-soft), box-shadow .47s var(--ease-soft),transform .45s var(--ease-soft)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #d4ad7b;outline-offset:3px}
.brand,.brand b{font-weight:700;letter-spacing:-.032em}.brand{font-size:23px}.navlinks{font-size:13px;font-weight:500}.topbar{position:relative;background:rgba(255,254,252,.92);border-bottom:1px solid rgba(202,180,153,.17);box-shadow:0 4px 32px rgba(94,69,46,.025)}
.btn,.lang-btn,.header-action{border-radius:999px;box-shadow:0 4px 11px rgba(97,70,40,.035);letter-spacing:0}.btn{font-size:13px;line-height:1.4;font-weight:600}.btn-gold{background:linear-gradient(115deg,#edd4b2,#dcb789 50%,#cba06c);border:1px solid rgba(154,106,57,.12);box-shadow:0 8px 19px rgba(159,114,67,.105),inset 0 1px 0 rgba(255,255,255,.66);color:#3d3025!important}.btn-gold:hover:not(:disabled){background:linear-gradient(115deg,#f3ddc0,#e6c49a 52%,#d1ac7d);transform:translateY(-2px);box-shadow:0 13px 25px rgba(155,110,59,.14),inset 0 1px 0 rgba(255,255,255,.75)}.btn-outline,.btn-ghost{background:rgba(255,255,255,.73);color:#625b60;border-color:#eae2dc}.btn-outline:hover:not(:disabled),.btn-ghost:hover:not(:disabled){background:#fffaf5;border-color:#dcc5ab;box-shadow:0 12px 24px rgba(89,70,50,.055)}
.header-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:41px;padding:8px 14px;border:1px solid #eee4d9;background:#fffefa;color:#655b5d;font-size:12px;white-space:nowrap;cursor:pointer}.header-action svg{width:16px;height:16px}.header-action:hover{background:#fff7ed;border-color:#dfc7a7;transform:translateY(-1px)}.account-switch{background:rgba(249,243,234,.9);color:#8f6b45}.nav-end{gap:8px}
.hero h1{font-weight:520;letter-spacing:-.045em;line-height:1.26}.hero h1 em{font-weight:570;letter-spacing:-.045em}.hero-copy>p{font-size:15px;font-weight:400;line-height:1.85}.eyebrow{letter-spacing:.11em;font-weight:620}.hero-benefits,.flow-step p,.feature-card p,.pricing-card p{font-weight:400}.quick-flow h2,.section-heading h2,.pricing-card h2{font-weight:610;letter-spacing:-.028em}.flow-step strong,.feature-card h3{font-weight:630}.flow-icon,.drop-icon,.feature-glyph{box-shadow:0 7px 18px rgba(118,83,43,.055);border-color:#f1e7db}
.theme-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.theme-opt{min-width:0;font-weight:550;font-size:10.5px;border-color:#eee7e0;line-height:1.3}.theme-opt .theme-swatch{border-radius:13px}.theme-opt:hover{box-shadow:0 10px 22px rgba(97,72,50,.07);transform:translateY(-2px)}
.template-filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding:3px 0 12px;margin-top:13px}.filter-chip{flex:none;cursor:pointer;border:1px solid #ebdfd1;border-radius:999px;background:#fffdfa;color:#756761;padding:7px 11px;font-size:10.5px;font-weight:590;white-space:nowrap}.filter-chip:hover,.filter-chip.active{background:#f8eee2;color:#866441;border-color:#d9b78f}.filter-chip:focus-visible{outline:2px solid #b98d55}
.layout-picker{border-bottom:1px solid #efe6dd;padding:8px 0 19px;margin-top:17px}.layout-picker .field-label{display:block;margin:0 0 7px}
.control-panel,.studio-output{border-radius:27px;border:1px solid var(--border-soft);box-shadow:var(--card-shadow)}.field{border-radius:16px;border-color:#ece3dd;font-size:12.5px;font-weight:400}.field:focus{border-color:#d1b28d;box-shadow:0 0 0 4px rgba(206,168,117,.13)}.tool-group>summary{font-size:12.7px;font-weight:610}.tool-inner{font-size:12.2px}.preview-stage{border-radius:20px;background-color:#fbf8f4;background-image:radial-gradient(#eadfd4 .8px,transparent .8px);box-shadow:inset 0 1px 7px rgba(77,59,39,.025)}.preview-stage canvas{image-rendering:auto;border-radius:12px}.studio-heading h2{font-weight:600}.status{font-weight:450}.feature-card,.pricing-card{background:rgba(255,254,251,.83);box-shadow:var(--card-shadow)}
/* Mobile actions, detached from the page-content scroll */
.mobile-menu-btn,.mobile-menu,.mobile-quicknav{display:none}
.mobile-menu[hidden]{display:none!important}
/* Account dialog is an authentic client for Cloudflare D1 API; no fake login. */
.account-dialog{width:min(450px,calc(100vw - 32px));max-height:min(90vh,850px);border:1px solid #e8d8c6;border-radius:29px;background:#fffdfa;padding:0;color:#453f44;box-shadow:0 26px 85px rgba(43,35,26,.21);overflow:auto}.account-dialog::backdrop{background:rgba(22,21,25,.48);backdrop-filter:blur(5px)}.auth-shell{padding:30px}.auth-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.auth-top h2{font-size:25px;letter-spacing:-.035em;font-weight:650;margin:4px 0 4px}.auth-top p{font-size:12.5px;color:#897b75;margin:0 0 14px}.auth-kicker{color:#b78e61;letter-spacing:.16em;font-size:9px;font-weight:700}.auth-close{border:1px solid #eaded2;border-radius:50%;font-size:25px;color:#8c7e75;background:#fff;height:35px;width:35px;flex:none;line-height:30px}.auth-tabs{background:#f9f4ef;border-radius:999px;padding:4px;display:flex;gap:4px;margin:10px 0 19px}.auth-tabs button{flex:1;border:0;background:transparent;color:#8b7b70;padding:10px 8px;border-radius:999px;font-size:12px}.auth-tabs button.active{background:#fff;box-shadow:0 3px 12px #755c4420;color:#755c49}.auth-shell form{display:flex;flex-direction:column;gap:7px}.auth-shell form label{font-size:12px;font-weight:620}.auth-shell form .field{width:100%;margin-bottom:9px}.auth-tip{font-size:11px;color:#927f78;margin:0 0 11px;line-height:1.6}.auth-guest{border:0;background:transparent;padding:10px;color:#9c7a53;display:block;margin:9px auto 0;font-size:12px}.auth-guest:hover{text-decoration:underline}.auth-notice{font-size:12px;color:#a26748;min-height:18px;text-align:center;margin:10px 0 0;white-space:pre-wrap}.auth-actions{display:flex;flex-direction:column;gap:9px;margin-top:19px}.signed-email{background:#f8f3ed;padding:12px;border-radius:13px;font-weight:650}.auth-shell [hidden]{display:none!important}
/* A dark palette designed separately, not a photographic color inversion. */
html[data-theme="midnight"]{color-scheme:dark;--ink:#ede8e4;--muted:#b1abae;--surface:#24242a;--line:#414049;--gold:#dfbc8d;--gold-dark:#f0d1a8;--page:#191b22;--panel:#24252c;--heading:#efebec;--body:#bcb5bb;--border-soft:#3c3c44;--card-shadow:0 15px 40px rgba(0,0,0,.16)}
html[data-theme="midnight"] body{background:var(--page);color:var(--heading)}
html[data-theme="midnight"] .topbar{background:rgba(26,27,34,.94);border-color:#363540;box-shadow:0 4px 34px rgba(0,0,0,.10)}
html[data-theme="midnight"] .brand,html[data-theme="midnight"] .navlinks,html[data-theme="midnight"] .navlinks a,html[data-theme="midnight"] .quick-flow h2,html[data-theme="midnight"] .section-heading h2,html[data-theme="midnight"] .feature-card h3,html[data-theme="midnight"] .flow-step strong,html[data-theme="midnight"] .studio-heading h2,html[data-theme="midnight"] .canvas-head strong,html[data-theme="midnight"] .pricing-card h2{color:#ece6e6}
html[data-theme="midnight"] .brand b{color:#e5b983}
html[data-theme="midnight"] .hero{background:radial-gradient(ellipse at 87% 9%,rgba(96,82,74,.26),transparent 50%),linear-gradient(120deg,#202129,#1c2028 57%,#252731)}
html[data-theme="midnight"] .hero:before{opacity:.13}
html[data-theme="midnight"] .hero h1{color:#f1edef}html[data-theme="midnight"] .hero h1 em{color:#deb88a}
html[data-theme="midnight"] .hero-copy>p,html[data-theme="midnight"] .flow-step p,html[data-theme="midnight"] .feature-card p,html[data-theme="midnight"] .pricing-card p{color:#b7afb6}
html[data-theme="midnight"] .hero-benefits,html[data-theme="midnight"] .hero-benefits i,html[data-theme="midnight"] .section-kicker,html[data-theme="midnight"] .eyebrow{color:#d9bd9c}
html[data-theme="midnight"] .eyebrow{background:#332e31;border-color:#51463e}
html[data-theme="midnight"] .content-band,html[data-theme="midnight"] .templates-band,html[data-theme="midnight"] .studio-section,html[data-theme="midnight"] .pricing-section,html[data-theme="midnight"] .quick-flow,html[data-theme="midnight"] .footer{background:#1b1d24;color:#eee8e9}
html[data-theme="midnight"] .quick-flow{background:transparent}
html[data-theme="midnight"] .feature-card,html[data-theme="midnight"] .pricing-card,html[data-theme="midnight"] .control-panel,html[data-theme="midnight"] .studio-output,html[data-theme="midnight"] .tool-group,html[data-theme="midnight"] .showcase-surface{background:#282932;border-color:#3d3b45;color:#eee6e6;box-shadow:0 12px 36px rgba(0,0,0,.10)}
html[data-theme="midnight"] .flow-step-button:hover{background:#2c2a31;border-color:#514438}html[data-theme="midnight"] .flow-icon,html[data-theme="midnight"] .feature-glyph,html[data-theme="midnight"] .drop-icon{background:linear-gradient(140deg,#35313a,#2c2b35);border-color:#51463c;color:#ebc293}
html[data-theme="midnight"] .header-action,html[data-theme="midnight"] .lang-btn,html[data-theme="midnight"] .btn-outline,html[data-theme="midnight"] .btn-ghost,html[data-theme="midnight"] .filter-chip,html[data-theme="midnight"] .field{background:#292a32;color:#e4dbd7;border-color:#45424b}
html[data-theme="midnight"] .account-switch{color:#e4c09a}
html[data-theme="midnight"] .btn-outline:hover,html[data-theme="midnight"] .btn-ghost:hover,html[data-theme="midnight"] .header-action:hover,html[data-theme="midnight"] .lang-btn:hover{background:#3b3539;border-color:#78614b}
html[data-theme="midnight"] .filter-chip.active,html[data-theme="midnight"] .filter-chip:hover{background:#45382e;color:#f1d3ac;border-color:#796147}
html[data-theme="midnight"] .theme-opt{background:#2e2e38;border-color:#41404a;color:#ddd5d8}html[data-theme="midnight"] .theme-opt.selected{background:#423c38;border-color:#b79773}
html[data-theme="midnight"] .dropzone{background:linear-gradient(125deg,#2f2d33,#333038);border-color:#84715a;color:#eee6df}html[data-theme="midnight"] .dropzone:hover{background:#393237}
html[data-theme="midnight"] .preview-stage{background-color:#22232a;background-image:radial-gradient(#44414b .8px,transparent .8px)}html[data-theme="midnight"] .canvas-head,html[data-theme="midnight"] .export-area,html[data-theme="midnight"] .tool-group{border-color:#403c46}
html[data-theme="midnight"] .layout-picker{border-color:#403c46}html[data-theme="midnight"] .field-label,html[data-theme="midnight"] .control-head h3,html[data-theme="midnight"] .micro-note,html[data-theme="midnight"] .help-inline,html[data-theme="midnight"] .status{color:#c5bac0}
html[data-theme="midnight"] .footer{border-top:1px solid #34313b}html[data-theme="midnight"] .art-card{border-color:#d2ccc5}
html[data-theme="midnight"] .account-dialog{background:#272830;color:#f4eeee;border-color:#514a49}html[data-theme="midnight"] .auth-top p,html[data-theme="midnight"] .auth-shell label{color:#d3c5c5}html[data-theme="midnight"] .auth-tabs{background:#34323a}html[data-theme="midnight"] .auth-tabs button.active,html[data-theme="midnight"] .auth-close{background:#48404a;color:#f4e2d1;border-color:#59515a}html[data-theme="midnight"] .signed-email{background:#38353b}
html[data-theme="midnight"] .mobile-menu,html[data-theme="midnight"] .mobile-quicknav{background:#282831;border-color:#414047}
@media(max-width:1080px){.navlinks{gap:18px}.header-action{padding:7px 10px}.theme-switch span{display:none}.nav-end{gap:6px}}
@media(max-width:810px){.navlinks{display:none}.mobile-menu-btn{display:flex;flex-direction:column;gap:4px;min-width:41px}.mobile-menu-btn span{width:17px;height:1.4px;background:currentColor;border-radius:3px}.mobile-menu:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 16px 18px;border-top:1px solid #eee7df;background:#fffcf8;box-shadow:0 16px 25px rgba(62,42,30,.055)}.mobile-menu a{display:flex;min-height:38px;align-items:center;padding:8px 13px;border:1px solid #eee7df;border-radius:13px;font-size:12px}.mobile-menu a:hover{background:#f8eee3}.account-switch{min-width:62px}}
@media(max-width:660px){html{scroll-padding-top:85px}body{padding-bottom:68px}.shell{padding-inline:17px}.topbar-inner{min-height:65px;gap:8px}.brand{font-size:17px;gap:5px}.brand-icon{width:31px;height:31px}.nav-end{gap:5px}.nav-end .btn-small{display:none}.nav-end .lang-btn{min-height:36px;font-size:11px;padding:7px 9px}.header-action{min-height:36px;padding:7px 9px;font-size:11px}.hero-grid{padding-top:27px}.hero h1{font-size:clamp(32px,8.4vw,43px);letter-spacing:-.04em;line-height:1.24}.hero-copy>p{font-size:13px;line-height:1.78}.hero-benefits{gap:12px;flex-wrap:wrap}.hero-art{height:310px;max-width:440px;width:100%;margin:0 auto}.flow-cards{flex-direction:column}.flow-step-button{min-height:72px}.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.theme-opt{font-size:10px;padding:8px 3px}.template-filters{margin-top:9px}.studio-layout{display:block}.control-panel{margin-bottom:18px;max-height:none;overflow:visible}.studio-output{margin:0}.preview-stage{min-height:280px;padding:13px}.mobile-quicknav{position:fixed;bottom:0;left:0;right:0;z-index:90;display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:rgba(255,252,248,.97);border-top:1px solid #e9dfd4;box-shadow:0 -7px 28px rgba(60,45,29,.065);padding:6px 7px max(8px,env(safe-area-inset-bottom));backdrop-filter:blur(13px)}.mobile-quicknav button{border:0;background:transparent;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;padding:5px 0;color:#655e60;font-size:10px;font-weight:600}.mobile-quicknav button span{font-size:19px;color:#b78e60;font-weight:400}.mobile-quicknav button:active{background:#f7eadc;border-radius:13px}.account-dialog{border-radius:23px}.auth-shell{padding:23px}.footer{padding-bottom:12px}}
@media(max-width:375px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero h1{font-size:31px}.brand{font-size:15px}.lang-btn{display:none!important}.account-switch{min-width:58px}}
@media(prefers-reduced-motion:reduce){*,*::after,*::before{transition-duration:.01ms!important;scroll-behavior:auto!important}}

.theme-opt[hidden]{display:none!important}
/* Keep language control compact and legible on narrow mobile screens. */
.nav-end .lang-btn{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;min-width:46px}
@media(max-width:660px){.nav-end .lang-btn{min-width:41px;padding-inline:7px}}

.footer-legal{display:flex;gap:16px;flex-wrap:wrap;font-size:11px}.footer-legal a:hover{color:var(--gold-dark)}.auth-actions>.auth-guest{font-size:11px;color:#ae8176}
