/* Public site. Light mode is warm beige, not bright white; dark mode is warm charcoal. */

:root {
  --logo-ink: #2a241e;
  --logo-ink-2: #6b5f50;
  --logo-m: #2a241e;
  --logo-m-shadow: none;
  --bg: #f3ecdf;
  --surface: #fbf7ef;
  --surface-2: #ece3d3;
  --text: #2a241e;
  --text-2: #5c5348;
  --muted: #8b8174;
  --line: #e0d5c2;
  --line-strong: #cfc1aa;
  --accent: #c8532a;
  --accent-hover: #b04620;
  --accent-soft: #f6dccd;
  --ok: #2f7d4f;
  --error: #b8322a;
  --checker: #e8dfcf;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 8px 24px -12px rgb(60 40 20 / 18%);
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --logo-ink: #FFF8EC;
  --logo-ink-2: #C9B79A;
  --logo-m: #ffffff;
  --logo-m-shadow: 0 -2px 0 rgba(255,255,255,0.9), 0 3px 0 #E9E9EE;
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #242424;
  --text: #f1ebe2;
  --text-2: #c9bfb2;
  --muted: #8f8679;
  --line: #2e2a25;
  --line-strong: #3d3731;
  --accent: #E07A5F;
  --accent-hover: #E9947D;
  --accent-soft: #3a2519;
  --ok: #6fcf97;
  --error: #ff7b72;
  --checker: #24201c;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.site-top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--text-2); font-weight: 500; font-size: 15px; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.cart-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 650; cursor: pointer;
  background: var(--accent); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--error); }

label { font-size: 14px; font-weight: 600; color: var(--text-2); }
input[type=number], select {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
input[type=number] { width: 96px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- home ---------- */
.hero { padding: 72px 0 56px; display: grid; gap: 40px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.5vw, 60px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 18px; font-size: 18px; color: var(--text-2); max-width: 34rem; }
.hero .ctas { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

section.block { padding: 56px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 30px; font-weight: 750; }
section.block .sub { margin-top: 8px; color: var(--text-2); }
.steps { margin-top: 28px; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step .n { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 15px; }

.prices { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.prices table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prices th, .prices td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.prices tr:last-child td { border-bottom: 0; }
.prices th { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.prices td:first-child { font-weight: 700; }
.prices .note { padding: 14px 18px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

.uses { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; }

.soon { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; }
.soon h3 { font-size: 20px; }
.soon p { color: var(--text-2); margin-top: 4px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- create & cart ---------- */
.page { padding: 40px 0 72px; }
.page h1 { font-size: 34px; font-weight: 800; }
.page .sub { margin-top: 8px; color: var(--text-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

.drop {
  margin-top: 24px; display: grid; place-items: center; gap: 10px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: 18px; padding: 48px 20px; background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 18px; }
.drop span { color: var(--muted); font-size: 14px; }
.drop input { display: none; }
.tips { margin-top: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; }
.error-box { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); font-size: 14px; }

.cart { margin-top: 24px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.items { display: grid; gap: 12px; }
.item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: contain; padding: 6px; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 12px 12px; border: 1px solid var(--line); }
.item h3 { font-size: 16px; }
.item .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.qty { display: flex; align-items: center; gap: 8px; }
.add-more { display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 18px; color: var(--text-2); font-weight: 600; }
.add-more:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.summary { position: sticky; top: 84px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.radios { display: grid; gap: 8px; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--text); font-size: 14px; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { accent-color: var(--accent); margin-top: 3px; }
.radio small { display: block; color: var(--muted); font-weight: 400; }
.totals { display: grid; gap: 6px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--text-2); }
.totals .grand { color: var(--text); font-weight: 800; font-size: 19px; margin-top: 4px; }
.terms { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); font-weight: 400; }
.terms input { accent-color: var(--accent); margin-top: 3px; }
.warn { font-size: 13px; color: var(--accent); font-weight: 600; }

.empty { text-align: center; padding: 56px 20px; }
.empty p { color: var(--text-2); margin: 10px 0 22px; }

.thanks { text-align: center; padding: 80px 20px; }
.thanks .big { font-size: 56px; }
.thanks h1 { margin-top: 12px; }
.thanks p { color: var(--text-2); margin-top: 12px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
    .steps { grid-template-columns: 1fr; }
  .cart { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-nav a.hide-sm { display: none; }
  .item { grid-template-columns: 72px 1fr; }
  .thumb { width: 72px; height: 72px; }
  .item .qty { grid-column: 1 / -1; justify-content: space-between; }
  .prices th, .prices td { padding: 12px; }
}

/* ---------- marketplace ---------- */
input.text { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
input.text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=file] { font: inherit; font-size: 14px; color: var(--text-2); }
.market-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.grid { margin-top: 24px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card-design { display: grid; gap: 4px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
a.card-design:hover { transform: translateY(-2px); border-color: var(--line-strong); text-decoration: none; }
.card-design img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 10px; border-radius: 10px; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 14px 14px; margin-bottom: 6px; }
.card-design .t { font-weight: 650; }
.card-design .by { color: var(--muted); font-size: 13px; }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.product { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.product-art { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.product-art img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 16px 16px; padding: 16px; }
.buy { margin-top: 24px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.hint { margin-top: 12px; color: var(--muted); font-size: 14px; }
.price-list { margin-top: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.price-list div { display: flex; gap: 12px; }
.price-list strong { min-width: 32px; color: var(--text); }
.sell-hero { max-width: 760px; }
.ticks { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text-2); }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 10px; }
.notice { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.auth { margin-top: 28px; display: grid; gap: 20px; grid-template-columns: 1.2fr 1fr; align-items: start; }
.auth form, .upload { display: grid; gap: 14px; }
.auth h2, .dash h2 { font-size: 20px; }
.stats { margin-top: 24px; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { font-size: 24px; letter-spacing: -0.02em; }
.dash { margin-top: 20px; display: grid; gap: 20px; grid-template-columns: 1.4fr 1fr; align-items: start; }
.section-title { margin-top: 36px; font-size: 22px; }
.card-design.own .rename input { height: 34px; font-weight: 600; }
.state { font-size: 12px; font-weight: 700; justify-self: start; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.state.s-approved { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.state.s-pending { background: var(--accent-soft); color: var(--accent); }
.state.s-rejected { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.own-actions { display: flex; gap: 14px; align-items: center; font-size: 14px; margin-top: 4px; }
.own-actions form { margin: 0; }
@media (max-width: 860px) { .product, .auth, .dash { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- terms ---------- */
.legal { max-width: 720px; }
.legal h2 { font-size: 19px; margin-top: 28px; }
.legal p { margin-top: 8px; color: var(--text-2); }

/* ---------- logo ---------- */
.logo { gap: 11px; font-size: 22px; }
.moxi-mark { position: relative; display: block; flex: none; width: 44px; height: 44px; }
.moxi-mark-in { position: absolute; left: 0; top: 0; width: 240px; height: 240px; transform: scale(0.18334); transform-origin: 0 0; }
.moxi-m-white { position: relative; color: #ffffff; text-shadow: 0 -2px 0 rgba(255,255,255,0.9), 0 3px 0 #E9E9EE; }
.logo-w1 { font-weight: 700; letter-spacing: -0.5px; color: var(--logo-ink); }
.logo-w2 { font-weight: 400; letter-spacing: -0.5px; color: var(--logo-ink-2); margin-left: -5px; }
.moxi-echo { position: absolute; left: 0; top: 0; width: 240px; height: 232px; box-sizing: border-box; padding: 0 0 30px 30px; display: flex; align-items: center; justify-content: center; font-size: 168px; font-weight: 700; line-height: 1; }
.moxi-m { position: relative; color: var(--logo-m); text-shadow: var(--logo-m-shadow); }
.moxi-peel { position: relative; display: block; width: 240px; height: 240px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.moxi-svg { position: absolute; left: 0; top: 0; width: 240px; height: 240px; overflow: visible; }
.moxi-word { display: flex; align-items: baseline; gap: 12px; line-height: 1; letter-spacing: -1px; font-size: clamp(44px, 8vw, 72px); }
.moxi-w1 { font-weight: 700; color: var(--logo-ink); }
.moxi-w2 { font-weight: 400; color: var(--logo-ink-2); }

/* Loading screen: on the homepage for about a second, and elsewhere only when a page is slow to come. */
@keyframes moxiLoaderOut { to { opacity: 0; visibility: hidden; } }
.moxi-loader { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: var(--bg); pointer-events: none; opacity: 0; visibility: hidden; }
.moxi-loader.moxi-load-once { opacity: 1; visibility: visible; animation: moxiLoaderOut .25s ease 1s forwards; }
.moxi-loader.moxi-loading { animation: none; opacity: 1; visibility: visible; pointer-events: auto; }
.moxi-loader-in { position: relative; width: 240px; height: 232px; }
@media (prefers-reduced-motion: reduce) { .moxi-loader.moxi-load-once { animation-delay: .2s; } }

/* Hero: sample stickers in front, the nested m sticker behind them. */
.hero-art { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; justify-self: center; }
/* The animated sticker, stuck on at an angle at the top right of the hero, clear of the samples. */
.hero-nested { --s: .75; position: absolute; right: 0; top: 0; z-index: 1; width: calc(240px * var(--s)); height: calc(240px * var(--s)); }
.hero-nested .moxi-peel, .hero-nested .moxi-svg { width: 100%; height: 100%; }
/* The m under the sticker sits at the same size and angle as the sticker's drawing. */
.hero-nested .moxi-echo { --c: calc(120px * var(--s)); transform-origin: 0 0; transform: translate(var(--c), var(--c)) rotate(6deg) translate(calc(var(--c) * -1), calc(var(--c) * -1)) scale(var(--s)); }
.blob { position: absolute; display: grid; place-items: center; font-weight: 700; color: #fff; text-align: center; line-height: 1.1; box-shadow: var(--shadow); border: 6px solid #fff; pointer-events: none; }
:root[data-theme="dark"] .blob { border-color: #f4efe6; }
.blob.b1 { left: 0; top: 8%; width: 48%; height: 40%; border-radius: 42% 58% 55% 45%; background: #E07A5F; transform: rotate(-9deg); font-size: clamp(22px, 3.2vw, 36px); }
.blob.b2 { right: 4%; top: 52%; width: 38%; height: 38%; border-radius: 26px; background: #2A9D8F; transform: rotate(7deg); font-size: clamp(20px, 2.8vw, 30px); }
.blob.b3 { left: 10%; bottom: 3%; width: 36%; height: 33%; border-radius: 50%; background: #8E5572; transform: rotate(-4deg); font-size: clamp(20px, 2.8vw, 30px); }
@media (max-width: 560px) { .logo { font-size: 19px; gap: 8px; } .moxi-mark { width: 38px; height: 38px; } .moxi-mark-in { transform: scale(0.15834); } .hero-nested { --s: .55; } .hero-art { max-width: 320px; } .site-nav a { padding: 6px; font-size: 14px; } }
