/* Peeti: Webcore / early-2000s kids' portal look, matching the app. */
:root {
  --plum: #1a144d;
  --aqua: #33ccf2;
  --pink: #ff6bb3;
  --yellow: #ffe626;
  --lime: #66d933;
  --orange: #ff8c1a;
  --purple: #8040e6;
  --blue: #2659ff;
  --red: #f22633;
  --sky: #c7ebff;
  --lemon: #fffbbd;
  --mint: #ccffd1;
  --peach: #ffdbb3;
  --ice: #d6fafa;
  --font: "SF Pro Rounded", ui-rounded, "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  color: var(--plum);
  background: #03030a;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

a { color: #1a26e6; font-weight: 800; }
a:hover { color: var(--red); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 14px 14px 40px; display: grid; gap: 22px; }

/* The signature box: a flat color, a dark outline, a hard shadow and one big curved corner. */
.mod {
  background: #fff;
  border: 3px solid var(--plum);
  border-radius: 38px 16px 16px 16px;
  box-shadow: 5px 5px 0 var(--plum);
  padding: 20px 22px;
}
.mod.lemon { background: var(--lemon); }
.mod.mint { background: var(--mint); }
.mod.sky { background: var(--sky); }
.mod.peach { background: var(--peach); }
.mod.ice { background: var(--ice); }
.mod.pink { background: #ffd1e8; }
.mod.lilac { background: #e6d8ff; }
.mod.flat { border-radius: 16px; }

h1, h2, h3 { font-weight: 900; font-style: italic; margin: 0 0 .4em; line-height: 1.05; }
h1 { font-size: clamp(2.1rem, 6.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .8em; }
.lead { font-size: 1.15rem; font-weight: 700; }
.small { font-size: .85rem; opacity: .85; }

/* Little pill buttons. */
.pill {
  font: inherit;
  font-weight: 900;
  font-style: italic;
  color: var(--plum);
  background: var(--yellow);
  border: 3px solid var(--plum);
  border-radius: 999px;
  padding: .45em 1.05em;
  box-shadow: 3px 3px 0 var(--plum);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .08s, box-shadow .08s;
}
.pill:hover { filter: brightness(1.06); }
.pill:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--plum); }
.pill:focus-visible, input:focus-visible, .swatch:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.pill[aria-pressed="true"], .pill.on { background: var(--lime); }
.pill.pinkbtn { background: var(--pink); }
.pill.aquabtn { background: var(--aqua); }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .6; cursor: default; filter: none; transform: none; }

.rainbow-rule {
  height: 8px;
  border: 3px solid var(--plum);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--lime), var(--aqua), var(--blue), var(--purple));
}

/* Top bar. */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 18px; }
.logo {
  font-size: 2.6rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.02em;
  margin: 0;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--lime), var(--aqua), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--plum);
  paint-order: stroke fill;
  filter: drop-shadow(3px 3px 0 var(--plum));
}
.themes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.themes .label { font-weight: 900; font-style: italic; }
.themes .pill { font-size: .85rem; padding: .3em .8em; box-shadow: 2px 2px 0 var(--plum); }

.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--plum);
  color: var(--yellow);
  border: 3px solid var(--plum);
  border-radius: 999px;
  padding: 6px 0;
  font-weight: 900;
  box-shadow: 4px 4px 0 rgba(0,0,0,.35);
}
.ticker span { display: inline-block; padding-left: 100%; animation: tick 34s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker span { animation: none; padding-left: 14px; } }

/* Hero. */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: stretch; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.store { background: var(--plum); color: #fff; border-radius: 14px; padding: .55em 1.1em; }
.store small { display: block; font-size: .7rem; font-weight: 700; font-style: normal; opacity: .85; }
.store b { font-size: 1.1rem; }
.store:hover { color: var(--yellow); }

.stage {
  background:
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.8) 0 2px, transparent 3px) 0 0 / 34px 34px,
    linear-gradient(180deg, var(--sky), var(--ice));
  border: 3px solid var(--plum);
  border-radius: 16px;
  display: grid;
  place-items: center;
  padding: 6px;
}
.stage canvas { width: min(100%, 320px); aspect-ratio: 1; display: block; }
.status { text-align: center; font-weight: 900; font-style: italic; margin: 8px 0 10px; min-height: 1.4em; }
.controls { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > label { font-weight: 900; font-style: italic; }
input[type="text"] {
  font: inherit;
  font-weight: 800;
  color: var(--plum);
  background: #fff;
  border: 3px solid var(--plum);
  border-radius: 12px;
  padding: .35em .6em;
  width: 11em;
  max-width: 100%;
}
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--plum); cursor: pointer; padding: 0; box-shadow: 2px 2px 0 var(--plum); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--plum); outline-offset: 2px; }
input[type="range"] { accent-color: var(--purple); flex: 1; min-width: 120px; }

/* Focus timer. */
.timer { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; align-items: center; }
@media (max-width: 800px) { .timer { grid-template-columns: 1fr; } }
.timer .stage canvas { width: min(100%, 260px); }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.clock {
  background: var(--plum);
  color: var(--lime);
  border-radius: 18px;
  padding: .05em .35em;
  font-size: clamp(3.4rem, 13vw, 5.6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 0 14px rgba(102, 217, 51, .65);
  margin-bottom: 12px;
}
.clock.relax { color: var(--aqua); text-shadow: 0 0 14px rgba(51, 204, 242, .65); }
.bar { height: 18px; border: 3px solid var(--plum); border-radius: 99px; background: #fff; overflow: hidden; margin-bottom: 14px; }
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(135deg, var(--pink) 0 10px, #ff9ccb 10px 20px);
  transition: width .3s linear;
}
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stat { background: #fff; border: 3px solid var(--plum); border-radius: 14px; padding: 4px 12px; text-align: center; box-shadow: 2px 2px 0 var(--plum); }
.stat b { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.stat span { font-size: .75rem; font-weight: 800; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; }
.opts label { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* Cards. */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { border: 3px solid var(--plum); border-radius: 30px 14px 14px 14px; box-shadow: 4px 4px 0 var(--plum); padding: 16px 18px; }
.card .num {
  display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%;
  background: var(--plum); color: var(--yellow); font-weight: 900; margin-bottom: 8px;
}
.card p { margin: 0; }
.c1 { background: var(--lemon); } .c2 { background: var(--mint); } .c3 { background: var(--sky); }
.c4 { background: #ffd1e8; } .c5 { background: var(--peach); } .c6 { background: #e6d8ff; }

.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero > .mod:first-child { display: flex; flex-direction: column; justify-content: center; }
.skills span {
  border: 3px solid var(--plum); border-radius: 99px; padding: .15em .8em; font-weight: 900; font-style: italic; background: #fff;
  box-shadow: 2px 2px 0 var(--plum);
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  background: var(--plum); color: var(--yellow); border: 2px solid #fff; outline: 2px solid var(--plum);
  font-size: .72rem; font-weight: 900; padding: 4px 8px; width: 120px; height: 31px; line-height: 1.05;
  display: grid; place-items: center; text-align: center; text-decoration: none;
}
footer.mod { text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 8px 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Plain pages (support, privacy). */
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.doc h2 { font-size: 1.5rem; margin-top: 1.2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.doc details { background: var(--lemon); border: 3px solid var(--plum); border-radius: 14px; padding: 8px 14px; margin-bottom: 10px; box-shadow: 3px 3px 0 var(--plum); }
.doc summary { font-weight: 900; cursor: pointer; }

/* Plain pages: a static starry backdrop, no script needed. */
body.plain {
  background:
    radial-gradient(circle at 12% 18%, #fff 0 1px, transparent 2px) 0 0 / 160px 160px,
    radial-gradient(circle at 70% 62%, var(--aqua) 0 1px, transparent 2px) 0 0 / 220px 220px,
    radial-gradient(circle at 40% 85%, var(--yellow) 0 1px, transparent 2px) 0 0 / 260px 260px,
    #03030a;
}
