@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/inter-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/poppins-latin-800-normal.woff2") format("woff2");
}

:root {
  --navy: #102a43;
  --dark: #0b1f35;
  --teal: #087f8c;
  --mint: #13b8ad;
  --bg: #f5f8fa;
  --surface: #ffffff;
  --stroke: #e2eaf0;
  --ink: #172b4d;
  --muted: #64748b;
  --purple: #8855e8;
  --gold: #f4b942;
  --lav: #f3eeff;
  --softmint: #e8faf5;
  --shadow: 0 7px 28px rgba(16, 42, 67, 0.055);
  --radius: 20px;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  font: 14px/1.5 Inter, system-ui, sans-serif;
  color: var(--ink);
  overflow-x: clip;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #50cbd2;
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Poppins, Inter, sans-serif; line-height: 1.22; }
h1 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.045em; overflow-wrap: break-word; }
h2 { font-size: 18px; letter-spacing: -0.025em; overflow-wrap: break-word; }
h3 { font-size: 15px; overflow-wrap: break-word; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--teal);
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-width: 0;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--stroke);
  padding: 27px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  height: 100vh;
  top: 0;
  min-width: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: var(--dark);
  font: 700 21px Poppins, Inter, sans-serif;
  letter-spacing: -0.045em;
  min-width: 0;
}
.logo span { min-width: 0; }
.mark {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  flex: none;
}
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  color: #53667a;
  text-align: left;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  width: 100%;
}
.nav button span:first-child { font-size: 19px; width: 23px; text-align: center; flex: none; }
.nav button.active { background: #e7f5f6; color: #086a76; }
.nav button:hover:not(.active) { background: #f3f7f9; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--stroke); padding: 20px 10px 0; }
.profile { display: flex; gap: 10px; align-items: center; min-width: 0; }
.profile div { min-width: 0; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: #e5eefb;
  color: #244a80;
  flex: none;
}
.avatar.rose { background: #fff0ef; color: #b3485b; }
.avatar.lime { background: #edf7da; color: #607d19; }
.avatar.purple { background: #efe7ff; color: #6e42be; }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 28px; }
.avatar.xl { width: 70px; height: 70px; border-radius: 22px; font-size: 29px; }
.avatar.profile { width: 89px; height: 89px; border-radius: 28px; font-size: 39px; }
.main {
  max-width: 1420px;
  width: 100%;
  padding: 34px clamp(20px, 3.6vw, 52px) 100px;
  margin: 0;
  min-width: 0;
  align-self: start;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 12px;
  min-width: 0;
}
.crumb {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-logo { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef3f7;
  color: #496072;
  max-width: 100%;
}
.pill.green { background: #e7f8ed; color: #17864d; }
.pill.amber { background: #fff5e2; color: #a86b0a; }
.pill.blue { background: #e7f4fb; color: #17658e; }
.pill.purple { background: #f1eaff; color: #6b4bb6; }
.pill.gray { background: #f1f4f6; color: #6b7583; }
.pill.red { background: #fdecec; color: var(--danger); }
.page { display: none; }
.page.active { display: block; }
.pagehead {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  min-width: 0;
}
.pagehead p { color: var(--muted); margin-top: 7px; max-width: 62ch; }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.dark { background: var(--navy); color: #fff; }
.btn.outline { background: #fff; border: 1px solid var(--stroke); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.small { padding: 8px 12px; min-height: 34px; font-size: 12px; }
.btn.block { width: 100%; margin-top: 18px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.grid { display: grid; gap: 18px; min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow-wrap: break-word;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
  min-width: 0;
}
button.textlink, a.textlink {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  flex: none;
}
.summary {
  border: 1px solid #bfe4e5;
  background: #e7f6f6;
  padding: 24px 27px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  min-width: 0;
  flex-wrap: wrap;
}
.summary h2 { font-size: 21px; margin-top: 10px; }
.summary p { color: #496b75; max-width: 600px; margin-top: 7px; }
.summary-art {
  width: 72px;
  height: 72px;
  border-radius: 23px;
  background: #fff;
  object-fit: cover;
  flex: none;
}
.stat { display: flex; align-items: flex-start; gap: 14px; }
.stat-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 22px;
  background: #eff7fa;
  flex: none;
}
.stat strong { font-size: 27px; font-family: Poppins, Inter, sans-serif; line-height: 1.2; display: block; }
.stat p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.list { display: flex; flex-direction: column; }
.item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid #edf2f6;
  min-width: 0;
  flex-wrap: wrap;
}
.item:first-child { padding-top: 4px; }
.item:last-child { padding-bottom: 0; border: 0; }
.item .detail { flex: 1; min-width: 0; }
.item .detail p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.iconbox {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eaf7f6;
  font-size: 21px;
  flex: none;
}
.device-states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.state { border: 1px solid var(--stroke); border-radius: 13px; padding: 14px; min-width: 0; }
.state strong { display: block; margin-top: 8px; font-size: 13px; }
.state small { display: block; color: var(--muted); margin-top: 4px; }
.child-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.child-card .details { flex: 1 1 160px; min-width: 140px; }
.child-card .details p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.child-card .pill { margin-top: 8px; }
.heading-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.reward-art {
  height: 115px;
  border-radius: 16px;
  background: #e7f6f6;
  display: grid;
  place-items: center;
  font-size: 56px;
  margin-bottom: 16px;
}
.reward-art.cash { background: #e7f8ed; }
.reward-art.gold { background: #fff5df; }
.reward-art.short { height: 100px; margin-bottom: 12px; }
.reward-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  min-width: 0;
}
.gem { color: #6a47b9; font-weight: 800; }
.formline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inputwrap label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 6px; }
.inputwrap input, .inputwrap select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfdde5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.notices { border-radius: 14px; background: #f4f8fb; padding: 17px; color: #516879; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.profile-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-note { margin-top: 32px; text-align: center; color: #8c98a5; font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.demo-mark {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 8px;
}
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.home-bridge { color: var(--muted); margin: 16px 0 0; max-width: 68ch; }
.stat.words strong { font-size: 18px; line-height: 1.25; }
.stat .btn { margin-top: 10px; }
.capability-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dialog-actions { margin-top: 16px; }
.capability-list { display: grid; gap: 14px; }
.capability-list .state { background: #f8fbfd; }
.dialog[hidden] { display: none; }
.dialog:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #0b1f3566;
}
.dialog-card {
  width: min(520px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.glyph {
  width: 22px;
  height: 22px;
  display: block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.stat-icon, .iconbox, .questemoji, .reward-art { color: #087f8c; }
.glyph-gem { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 7-8 13L4 9z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 7-8 13L4 9z'/%3E%3C/svg%3E"); }
.glyph-inbox { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 13l3-7h12l3 7v6H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 13l3-7h12l3 7v6H3z'/%3E%3C/svg%3E"); }
.glyph-quest { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l3 3v15H6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l3 3v15H6z'/%3E%3C/svg%3E"); }
.glyph-check { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16l-4-4 1.5-1.5L9 13l8.5-8.5L19 6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16l-4-4 1.5-1.5L9 13l8.5-8.5L19 6z'/%3E%3C/svg%3E"); }
.glyph-device { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.glyph-cash { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 7h20v10H2zm8 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 7h20v10H2z'/%3E%3C/svg%3E"); }
.glyph-gift { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10h16v10H4zm0-4h16v4H4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10h16v10H4zM4 6h16v4H4z'/%3E%3C/svg%3E"); }
.glyph-eye { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zm10 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z'/%3E%3C/svg%3E"); }
.glyph-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14zm8.5 13.1l3 3-1.4 1.4-3-3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14zm8.5 13.1l3 3-1.4 1.4-3-3z'/%3E%3C/svg%3E"); }
.glyph-shield { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 4v7c0 5-3.4 7.6-8 9-4.6-1.4-8-4-8-9V6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l8 4v7c0 5-3.4 7.6-8 9-4.6-1.4-8-4-8-9V6z'/%3E%3C/svg%3E"); }
.glyph-people { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm8 1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM3 19c0-3 2.2-5 5-5s5 2 5 5H3zm10 0c0-2.2 1.2-4 3.2-4.7 2.2.3 3.8 2.2 3.8 4.7h-7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm8 1a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM3 19c0-3 2.2-5 5-5s5 2 5 5H3zm10 0c0-2.2 1.2-4 3.2-4.7 2.2.3 3.8 2.2 3.8 4.7h-7z'/%3E%3C/svg%3E"); }
.glyph-bell { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a5 5 0 0 1 5 5v3l2 3H5l2-3V8a5 5 0 0 1 5-5zm-2 14h4a2 2 0 0 1-4 0z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a5 5 0 0 1 5 5v3l2 3H5l2-3V8a5 5 0 0 1 5-5zm-2 14h4a2 2 0 0 1-4 0z'/%3E%3C/svg%3E"); }
.glyph-lock { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 10V8a4 4 0 0 1 8 0v2h1v10H7V10zm2 0h4V8a2 2 0 0 0-4 0z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 10V8a4 4 0 0 1 8 0v2h1v10H7V10z'/%3E%3C/svg%3E"); }
.glyph-card { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v12H3zm0 3h18V8H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v12H3z'/%3E%3C/svg%3E"); }
.glyph-moon { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3a8 8 0 1 0 7 12 7 7 0 0 1-7-12z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3a8 8 0 1 0 7 12 7 7 0 0 1-7-12z'/%3E%3C/svg%3E"); }
.glyph-calendar { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h2v2h8V3h2v2h2v16H4V5h2zm-2 6v10h16V9z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 7h16v14H4z'/%3E%3C/svg%3E"); }
.glyph-star { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.8 6.4L22 9.2l-5 4.6 1.4 6.8L12 17.8 5.6 20.6 7 13.8 2 9.2l7.2-.8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.8 6.4L22 9.2l-5 4.6 1.4 6.8L12 17.8 5.6 20.6 7 13.8 2 9.2l7.2-.8z'/%3E%3C/svg%3E"); }
.glyph-svg { width: 22px; height: 22px; display: block; }
.reward-art .glyph-svg { width: 48px; height: 48px; }
.questemoji .glyph-svg, .iconbox .glyph-svg, .stat-icon .glyph-svg { width: 22px; height: 22px; }
.hero-gem { width: 36px; height: 36px; color: #fff; }
.medal .glyph-svg { width: 28px; height: 28px; }
.level-num { position: relative; z-index: 1; margin-top: 8px; font: 800 13px Poppins, Inter, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #fff4d2; }
.level-display { font: 800 28px Poppins, Inter, sans-serif; letter-spacing: -0.04em; }
.gemline { display: inline-flex; align-items: center; gap: 6px; color: #6a47b9; font-weight: 800; }
.gemline .glyph-svg { width: 14px; height: 14px; }
.mobilebar { display: none; }
.w-0 { width: 0%; }
.w-10 { width: 10%; }
.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-100 { width: 100%; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.gate-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.gate-logo { width: min(100%, 280px); height: auto; display: block; margin-bottom: 22px; }
.gate-card h1 { font-size: 32px; }
.gate-card .lede { color: var(--muted); margin: 8px 0 22px; }
.chooser { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.chooser a { text-decoration: none; }

.child-theme {
  --bg: #f8f7ff;
  --stroke: #e9e6f1;
  --ink: #292743;
  --muted: #73708b;
  --teal: #7454d5;
  --shadow: 0 8px 24px rgba(90, 56, 136, 0.06);
}
.child-theme .sidebar { background: #fff; }
.child-theme .nav button.active { background: #f0eaff; color: #6946b7; }
.child-theme .btn.primary { background: #7652d9; }
.child-theme .eyebrow, .child-theme .textlink, .child-theme button.textlink { color: #7751d6; }
.child-hero {
  background: linear-gradient(115deg, #6954cf, #9374e9 72%, #ae8eeb);
  color: #fff;
  border-radius: 26px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 215px;
}
.child-hero:after {
  content: "✦";
  font-size: 205px;
  position: absolute;
  color: #ffffff18;
  right: 110px;
  top: -52px;
  pointer-events: none;
}
.child-hero h1 { font-size: clamp(27px, 3vw, 37px); position: relative; z-index: 1; }
.child-hero .hero-copy { color: #f3eaff; margin: 6px 0 18px; position: relative; z-index: 1; }
.child-hero .eyebrow { color: #e0d7ff; position: relative; z-index: 1; }
.xp-track {
  height: 11px;
  background: #ffffff4b;
  border-radius: 999px;
  max-width: 380px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.xp-fill { height: 100%; background: linear-gradient(90deg, #f4b942, #f9d36a); border-radius: 999px; }
.hero-xp { display: block; margin-top: 7px; color: #f1eaff; position: relative; z-index: 1; }
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: linear-gradient(160deg, #ffffff3d, #ffffff18);
  border: 1px solid #ffffff42;
  border-radius: 21px;
  padding: 18px 29px;
  min-width: 0;
}
.hero-stats .jewel { font-size: 50px; line-height: 1.1; }
.hero-stats strong { font: 800 31px Poppins, Inter, sans-serif; }
.hero-stats small { letter-spacing: 0.08em; }
.quest { display: flex; align-items: center; gap: 15px; min-width: 0; }
.questemoji {
  height: 59px;
  width: 59px;
  background: #f2edff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 31px;
  flex: none;
}
.questbody { flex: 1; min-width: 0; }
.questbody p { color: var(--muted); font-size: 12px; margin: 5px 0; }
.questbody .gem { display: block; font-size: 12px; }
.questbody .btn { display: flex; width: fit-content; }
.progress {
  width: 100%;
  height: 10px;
  border-radius: 99px;
  background: #efeafa;
  overflow: hidden;
  margin-top: 10px;
}
.progress > div { height: 100%; background: linear-gradient(90deg, #7b55da, #b492f5); border-radius: 99px; }
.badge-row { display: flex; gap: 13px; flex-wrap: wrap; }
.achievement { width: 94px; text-align: center; }
.medal { color: #b58112; }
.medal .glyph { width: 28px; height: 28px; }
.achievement .medal {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 23px;
  background: linear-gradient(160deg, #fff4d9, #ffe0a3);
  font-size: 35px;
  margin: 0 auto 7px;
}
.achievement b { font-size: 11px; }
.child-theme .reward-art { background: linear-gradient(135deg, #e8f8f6, #ceefec); color: #0d8f8a; }
.child-theme .reward-art.cash { background: linear-gradient(135deg, #e7f8ed, #d8f0e7); color: #17864d; }
.child-theme .reward-art.gold { background: linear-gradient(135deg, #fff5df, #ffe7ba); color: #b58112; }
.child-theme .questemoji, .child-theme .iconbox { color: #8855e8; }
.child-theme .hero-stats .glyph { color: #fff; }
.child-theme .gate { background: var(--bg); }

@media (max-width: 1100px) {
  .grid.four, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-states { grid-template-columns: 1fr; }
  .main { padding: 26px 24px 100px; }
}
@media (max-width: 740px) {
  .app { display: block; }
  .sidebar { display: none; }
  .main { padding: 17px 15px 96px; }
  .topbar { margin-bottom: 24px; }
  .crumb { display: none; }
  .mobile-logo { display: flex; padding: 0; font-size: 20px; }
  .mobile-logo .mark { height: 33px; width: 33px; }
  .pagehead p { font-size: 12px; }
  .pagehead .btn { font-size: 12px; }
  .page-actions { width: 100%; }
  .dialog-card { padding: 18px; }
  .summary { padding: 19px; }
  .summary-art { width: 50px; height: 50px; }
  .summary h2 { font-size: 17px; }
  .summary p { font-size: 12px; }
  .grid.three, .grid.two, .grid.four { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 18px; }
  .sectionhead { margin-top: 22px; }
  .stat strong { font-size: 24px; }
  .child-hero { padding: 22px; gap: 8px; min-height: 180px; }
  .child-hero .hero-stats { min-width: 0; padding: 13px; }
  .hero-stats .jewel { font-size: 35px; }
  .hero-stats strong { font-size: 24px; }
  .child-hero h1 { font-size: 25px; }
  .child-hero .hero-copy { font-size: 12px; }
  .child-hero .xp-track { max-width: 240px; }
  .formline { grid-template-columns: 1fr; }
  .mobilebar {
    position: fixed;
    display: flex;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-around;
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--stroke);
    box-shadow: 0 -5px 20px #14263a0b;
    z-index: 20;
    max-width: 100%;
  }
  .mobilebar button {
    border: 0;
    background: transparent;
    color: #78849a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: 10px;
    padding: 4px 2px;
    min-width: 0;
    flex: 1 1 0;
    border-radius: 8px;
    font-weight: 700;
  }
  .mobilebar button span:first-child { font-size: 20px; line-height: 1.2; }
  .mobilebar button span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobilebar button.active { color: var(--teal); background: #e7f5f6; }
  .child-theme .mobilebar button.active { color: #7652d9; background: #f0eaff; }
}
@media (max-width: 480px) {
  .child-hero { grid-template-columns: 1fr; }
  .child-hero .hero-stats { flex-direction: row; justify-content: flex-start; min-height: 0; }
  .child-hero .hero-stats .jewel { font-size: 27px; }
  .child-hero .hero-stats strong { font-size: 20px; }
  .child-hero .hero-copy { margin-bottom: 12px; }
  .gate-card { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
