:root {
  --purple: #6D40C4; --deep: #34317D; --darkest: #2A2764;
  --tint: #F3EEFD; --tint2: #EAE2FB; --line: #E4E3EC; --ink: #1D1B3A; --muted: #6B6880;
  --bg: #F6F6F9; --card: #fff; --gold: #FEBF2B; --ok: #1F8A4C; --bad: #C0392B;
  --radius: 16px; --shadow: 0 1px 2px rgba(20,18,50,.04), 0 6px 24px rgba(20,18,50,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Poppins, system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--purple); }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 58px; }
.top .logo img { height: 24px; width: auto; display: block; }
.top .crumb { color: var(--muted); font-size: 14px; border-left: 1px solid var(--line); padding-left: 12px; text-decoration: none; }
.top .crumb b { color: var(--ink); font-weight: 600; }
.top .sp { flex: 1; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 18px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--purple); color: var(--purple); }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.primary:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.evy { background: var(--tint); border-color: var(--tint2); color: var(--purple); }
.btn.evy:hover { background: var(--tint2); }

.hero { background: linear-gradient(135deg, var(--deep), var(--purple)); color: #fff; padding: 44px 0 40px; }
.kicker { margin: 0 0 6px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; color: var(--gold); }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); line-height: 1.15; font-weight: 800; }
.lede { margin: 0 0 22px; max-width: 680px; opacity: .92; }
.controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.niche { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; max-width: 420px; font-size: 13.5px; font-weight: 500; }
.niche em { font-style: normal; opacity: .75; font-weight: 400; }
.niche input { border: 0; border-radius: 12px; padding: 11px 14px; min-height: 44px; color: var(--ink); }

.spot { margin: 24px 0 0; }
.spot .card { border: 2px solid var(--gold); }
.spot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--purple); }
.chip.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.chip small { opacity: .6; margin-left: 4px; }

.bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.bar input { flex: 1; max-width: 420px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; min-height: 44px; }
.bar .muted { font-size: 14px; }

.catinfo { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.catinfo h2 { margin: 0 0 4px; font-size: 20px; }
.catinfo p { margin: 0 0 6px; }
.catinfo .row { margin-top: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card .tag { font-size: 12px; font-weight: 600; color: var(--purple); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.card .txt { font-size: 17px; font-weight: 500; white-space: pre-line; overflow-wrap: anywhere; }
.card .txt.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.card .orig { font-size: 13px; color: var(--muted); }
.card .note { font-size: 13.5px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.card .ans { background: var(--tint); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.card .ans b { color: var(--purple); }
.card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.card .ok { font-size: 12px; color: var(--ok); font-weight: 600; }

.stroop { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.rebus { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--bg); border-radius: 12px; padding: 18px; font-weight: 800; font-size: 26px; letter-spacing: .06em; min-height: 120px; }

.more { display: flex; justify-content: center; margin-top: 20px; }
.workshop { margin: 48px 0 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.workshop h2 { margin: 0 0 4px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.tab.on { background: var(--tint); border-color: var(--purple); color: var(--purple); }
.pane textarea, .pane input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; min-height: 44px; }
.pane p { margin: 0 0 10px; }
.out { margin: 12px 0; padding: 14px; background: var(--bg); border-radius: 12px; font-size: 17px; font-weight: 500; min-height: 52px; white-space: pre-wrap; overflow-wrap: anywhere; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.verdict { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.verdict.yes { background: #E7F6EC; color: var(--ok); }
.verdict.no { background: #FBEAEA; color: var(--bad); }
.verdict small { display: block; font-weight: 400; color: var(--ink); margin-top: 4px; }

.btn.ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn.img { border-color: var(--gold); }
.mono { font-family: "Space Mono", ui-monospace, Consolas, monospace; }

/* made-up words */
.dict .dw { font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.dict .dm { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.dict .dd { font-size: 16px; font-weight: 500; }
.dict .dx { font-style: italic; color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* workshop extras */
.workshop h3 { margin: 22px 0 4px; font-size: 17px; }
.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.pane input.one { width: 64px; text-align: center; text-transform: uppercase; font-weight: 700; }
.wsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 14px 0; }
.ws { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; position: relative; min-width: 0; }
.ws:has(input:checked) { border-color: var(--purple); background: var(--tint); }
.ws input { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--purple); }
.wsn { font-size: 12px; font-weight: 600; color: var(--purple); text-transform: uppercase; letter-spacing: .04em; padding-right: 26px; }
.wsn em { font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; }
.wsv { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.checks { margin: 12px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.checks li { padding: 8px 12px; border-radius: 10px; background: var(--bg); overflow-wrap: anywhere; }
.checks li.y { background: #E7F6EC; } .checks li.n { background: #FBEAEA; }
.checks li b { margin-right: 6px; } .checks li.y b { color: var(--ok); } .checks li.n b { color: var(--bad); }
.checks li small { color: var(--muted); margin-left: 6px; }
.checks.acro mark { background: var(--gold); border-radius: 4px; padding: 0 3px; font-weight: 800; }
.checks li.n mark { background: #F5B7B1; }
.abc { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.abc span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 700; font-size: 14px; }
.abc .has { background: #E7F6EC; color: var(--ok); } .abc .miss { background: #FBEAEA; color: var(--bad); outline: 2px solid var(--bad); }
#lpOut mark { background: #F5B7B1; border-radius: 3px; }
.bk { margin: 12px 0; padding: 14px; background: var(--bg); border-radius: 12px; line-height: 2.1; }
.bw { border: 0; background: #1D1B3A; color: #1D1B3A; border-radius: 4px; padding: 1px 4px; cursor: pointer; font-size: 16px; }
.bw:hover { color: #9a97b8; }
.bw.keep { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--gold); font-weight: 700; }
.kept { margin: 0 0 10px; }

/* design studio */
.studio { border: 0; border-radius: 20px; padding: 0; width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.35); color: var(--ink); }
.studio::backdrop { background: rgba(20,18,50,.55); }
.studio[open] { display: flex; flex-direction: column; }
.st-head, .st-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.st-foot { border-bottom: 0; border-top: 1px solid var(--line); justify-content: flex-end; }
.st-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; padding: 16px 18px; overflow: auto; }
.st-prev { position: sticky; top: 0; align-self: start; }
.st-prev canvas { width: 100%; height: auto; max-height: 64vh; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow); display: block; background: #eee; }
.tiny { font-size: 12.5px; margin: 8px 0 0; }
.st-ctl fieldset { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.st-ctl legend { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--purple); margin-bottom: 6px; padding: 0; }
.st-ctl label { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; font-weight: 500; }
.st-ctl label.chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.st-ctl input[type=text], .st-ctl textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14.5px; width: 100%; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 11px; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button.on { border-color: var(--purple); background: var(--tint); color: var(--purple); font-weight: 600; }
.sws { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; position: relative; padding: 0; }
.sw i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.sw.on { box-shadow: 0 0 0 3px var(--purple); }
.custom { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.custom label { font-size: 11.5px; align-items: center; text-align: center; }
.custom input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.st-photo { display: flex; align-items: center; gap: 12px; }
.st-photo .ph { width: 64px; height: 64px; border-radius: 50%; background: var(--tint) center/cover; display: grid; place-items: center; font-weight: 700; color: var(--purple); font-size: 20px; border: 3px solid var(--gold); flex: none; }
.st-photo > div { display: flex; gap: 6px; flex-wrap: wrap; }
.st-photo label.btn { flex-direction: row; cursor: pointer; }
@media (max-width: 760px) {
  .st-body { grid-template-columns: 1fr; }
  .st-prev { position: static; }
  .st-prev canvas { max-height: 46vh; }
  .custom { grid-template-columns: repeat(3, 1fr); }
}

/* favorites, carousel tray, daily */
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.heart { border: 0; background: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 6px; border-radius: 8px; }
.heart:hover { background: var(--tint); }
.heart.on { color: #E0245E; }
.btn.car.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.chip.fav { border-color: #F3B3C8; }
.chip.fav.on { background: #E0245E; border-color: #E0245E; }
.favbar { grid-column: 1 / -1; }
.daily { margin: 24px 0 0; background: linear-gradient(135deg, #FFF8E6, var(--tint)); border: 1px solid #F3E2B3; border-radius: calc(var(--radius) + 4px); padding: 14px; }
.daily-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 4px 10px; }
.daily-head b { font-size: 17px; }
.daily-head small { color: var(--muted); }
.daily .card { box-shadow: none; }
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); color: #fff; padding: 10px 0; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.tray .wrap { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tray small { opacity: .7; }
.tray .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
body:has(.tray:not([hidden])) .foot { padding-bottom: 90px; }
body:has(.tray:not([hidden])) .toast { bottom: 80px; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; }
.thumbs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.thumbs button small { font-weight: 400; font-size: 10.5px; color: var(--muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs button.on { border-color: var(--purple); background: var(--tint); color: var(--purple); }

.foot { padding: 24px 0 40px; color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 560px) {
  .two { grid-template-columns: 1fr; }
  .top .btn { display: none; }
  .grid { grid-template-columns: 1fr; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .chip { flex: none; }
  .controls .btn { flex: 1; }
}
