/* ============================================================================
   SG Kids Learn — shared design system
   Two skins share these tokens: the kid "front stage" (playful, big targets)
   and the parent "back office" (dense, calm).
   ========================================================================== */

:root {
  --ink: #12213a;
  --ink-soft: #4a5b76;
  --ink-faint: #8797ae;
  --line: #e3e9f2;
  --bg: #f5f7fb;
  --card: #ffffff;

  --brand: #4f46e5;
  --brand-soft: #eef0ff;
  --sky: #38bdf8;
  --mint: #10b981;
  --sun: #f59e0b;
  --coral: #f43f5e;
  --grape: #a855f7;

  --star: #fbbf24;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(18, 33, 58, 0.06), 0 1px 3px rgba(18, 33, 58, 0.04);
  --shadow: 0 4px 16px rgba(18, 33, 58, 0.08);
  --shadow-lg: 0 18px 48px rgba(18, 33, 58, 0.18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-fun: "Baloo 2", "Comic Sans MS", "PingFang SC", var(--font);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; }
a { color: var(--brand); }

.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #fafbff; }
.btn.subtle { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.plain { background: transparent; color: var(--ink-soft); box-shadow: none; }
.btn.plain:hover { background: rgba(18, 33, 58, 0.05); }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn.danger { background: var(--danger); }
.btn.big { padding: 14px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon { padding: 8px; width: 36px; height: 36px; border-radius: 50%; }

/* -------------------------------------------------------------------- inputs */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* --------------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}
.pill.grey { background: #eef1f6; color: var(--ink-soft); }
.pill.ok { background: #e6f7ec; color: #14803c; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.danger { background: #fee2e2; color: #b91c1c; }
.pill.star { background: #fff7e0; color: #a16207; }

.bar { height: 8px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.4s ease; }

/* --------------------------------------------------------------------- toast */

#toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #12213a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.22s ease;
  max-width: min(90vw, 460px);
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* --------------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 36, 0.55);
  backdrop-filter: blur(3px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff;
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: pop 0.22s cubic-bezier(0.2, 1.1, 0.4, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.modal-head {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  z-index: 1;
}
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.x-btn {
  border: none;
  background: #f1f4f9;
  color: var(--ink-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  flex: none;
}
.x-btn:hover { background: #e6eaf2; color: var(--ink); }

/* ------------------------------------------------------------ lang + landing */

.lang-toggle { display: inline-flex; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-toggle button.on { background: var(--ink); color: #fff; }

.landing {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px 60px;
  background:
    radial-gradient(1100px 520px at 15% -10%, #cfe8ff 0%, transparent 60%),
    radial-gradient(900px 480px at 88% 8%, #ffe4c7 0%, transparent 55%),
    linear-gradient(180deg, #f7fbff 0%, #f2f6fd 100%);
}
.landing-inner { width: 100%; max-width: 860px; text-align: center; }
.landing h1 { font-family: var(--font-fun); font-size: clamp(30px, 5vw, 46px); }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 30px; }
.door {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-xl);
  padding: 26px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.door .emoji { font-size: 46px; line-height: 1; }
.door h2 { margin: 12px 0 6px; font-size: 21px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 36px; text-align: left; }
.feature { background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.feature .emoji { font-size: 22px; }
.feature h4 { font-size: 14px; margin: 6px 0 3px; }

/* ===================================================== KID — front stage ==== */

body.kid {
  background:
    radial-gradient(1200px 600px at 10% -12%, #bfe6ff 0%, transparent 62%),
    radial-gradient(900px 520px at 92% 0%, #ffe0b8 0%, transparent 55%),
    linear-gradient(180deg, #f4fbff 0%, #eef4ff 60%, #f7f4ff 100%);
  background-attachment: fixed;
  padding-bottom: 96px;
}
body.kid h1, body.kid h2, body.kid h3 { font-family: var(--font-fun); }

.kid-wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }

.kid-top {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--r-xl);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 10px;
  z-index: 20;
}
.kid-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(140deg, #fff2c9, #ffd6e7);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  flex: none;
}
.kid-hello { font-size: 12px; color: var(--ink-soft); }
.kid-name { font-size: 19px; font-weight: 800; font-family: var(--font-fun); }
.metric {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 750;
  font-size: 14px;
  white-space: nowrap;
}
.metric.stars { background: #fff8e5; border-color: #fde68a; color: #92400e; }
.metric.streak { background: #ffefe8; border-color: #fecaca; color: #b3411f; }

.hero {
  margin-top: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 40%, #7c3aed 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
}
.hero-grid { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero h2 { font-size: 24px; }
.hero p { opacity: 0.92; font-size: 14px; }

.ring { --p: 0; width: 108px; height: 108px; flex: none; position: relative; }
.ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#fde68a calc(var(--p) * 1%), rgba(255, 255, 255, 0.25) 0);
  mask: radial-gradient(farthest-side, transparent 61%, #000 63%);
  -webkit-mask: radial-gradient(farthest-side, transparent 61%, #000 63%);
}
.ring > div { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring b { font-size: 26px; font-family: var(--font-fun); display: block; line-height: 1; }
.ring span { font-size: 11px; opacity: 0.9; }

.section-title { display: flex; align-items: center; gap: 8px; margin: 24px 4px 10px; font-size: 17px; }
.section-title .count { font-size: 12px; font-weight: 700; color: var(--ink-faint); }

/* Mood check-in */
.moods { display: flex; gap: 10px; flex-wrap: wrap; }
.mood {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: var(--r);
  padding: 10px 14px;
  cursor: pointer;
  text-align: center;
  min-width: 78px;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
.mood:hover { transform: translateY(-2px); }
.mood.on { border-color: var(--brand); background: var(--brand-soft); }
.mood .emoji { font-size: 28px; display: block; line-height: 1.1; }
.mood .label { font-size: 12px; font-weight: 650; color: var(--ink-soft); }

/* Task cards */
.task {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.task:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.task + .task { margin-top: 10px; }
.task.done { opacity: 0.72; background: #fbfdfb; }
.task.done .task-title { text-decoration: line-through; text-decoration-color: var(--ink-faint); }
.task-emoji { font-size: 30px; flex: none; width: 42px; text-align: center; }
.task-title { font-weight: 750; font-size: 16px; }
.task-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.task-cta { flex: none; }

.tickbox {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: transparent;
  cursor: pointer;
  flex: none;
}
.tickbox.on { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Reward + badge grids */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.shop-item .emoji { font-size: 36px; }
.shop-item h4 { font-size: 14px; margin: 8px 0 6px; }
.badge-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 10px; text-align: center; }
.badge-item .emoji { font-size: 34px; filter: grayscale(1) opacity(0.32); }
.badge-item.earned { background: linear-gradient(160deg, #fffdf3, #fff6dd); border-color: #fde68a; }
.badge-item.earned .emoji { filter: none; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.badge-item h4 { font-size: 13px; margin: 6px 0 2px; }

/* Week strip */
.week-strip { display: flex; gap: 6px; }
.week-day { flex: 1; text-align: center; }
.week-day .dot {
  position: relative;
  height: 40px;
  border-radius: 12px;
  background: #eef1f6;
  display: grid;
  place-items: center;
  font-size: 15px;
  border: 1px solid var(--line);
}
.week-day .dot.full { background: #dcfce7; border-color: #86efac; }
.week-day .dot.part { background: #fef3c7; border-color: #fcd34d; }
.week-day .dot.today { box-shadow: 0 0 0 2px var(--brand); }
.week-day .lbl { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
/* Small corner tick = the child checked in that day, independent of task count. */
.week-day .tick { position: absolute; top: -5px; right: -4px; font-size: 11px; line-height: 1; }

/* Bottom nav */
.tabbar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}
.tabbar button {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 66px;
}
.tabbar button .emoji { font-size: 19px; }
.tabbar button.on { background: var(--ink); color: #fff; }

/* Profile picker */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.picker button {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: var(--r-xl);
  padding: 22px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s, border-color 0.16s;
}
.picker button:hover { transform: translateY(-4px) scale(1.02); border-color: var(--brand); }
.picker .emoji { font-size: 46px; }
.picker .nm { font-weight: 800; font-size: 17px; margin-top: 8px; font-family: var(--font-fun); }

.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 260px; margin: 0 auto; }
.pinpad button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r);
  padding: 16px 0;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
}
.pinpad button:hover { background: #f6f8fd; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 14px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: #dde3ec; }
.pin-dots i.on { background: var(--brand); }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* The kid page has a floating tab bar, so toasts sit above it. */
body.kid #toasts { bottom: 96px; }

/* ==================================================== PARENT — back office == */

body.parent { background: var(--bg); }

.p-shell { display: flex; min-height: 100vh; }
.p-side {
  width: 232px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.p-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.p-brand .emoji { font-size: 24px; }
.p-brand b { font-size: 15px; }
.p-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  width: 100%;
}
.p-nav:hover { background: #f5f7fb; color: var(--ink); }
.p-nav.on { background: var(--brand-soft); color: var(--brand); }
.p-nav .emoji { font-size: 17px; }
.p-nav .badge-n {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
}

.p-main { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1240px; }
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.p-head h1 { font-size: 23px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi .n { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .k { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.child-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.child-card .av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 25px; background: #f2f5fb; flex: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 11px 10px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fbfcfe; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.qrow { display: flex; gap: 10px; align-items: flex-start; background: #fafbfe; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row input[type="radio"] { accent-color: var(--ok); width: 16px; height: 16px; flex: none; }

/* Simple bar chart used in the parent report */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.chart .col { flex: 1; height: 100%; }
/* Each column is a full-height track (grey = tasks were scheduled) with the
   completed share filled in, so a quiet day still shows it had work waiting. */
.chart .slot {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #eef1f6;
  border-radius: 4px;
  overflow: hidden;
}
.chart .slot.none { background: transparent; box-shadow: inset 0 -1px 0 var(--line); }
.chart .fill { width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; transition: height 0.4s ease; }
.chart .col .cap { font-size: 9.5px; color: var(--ink-faint); writing-mode: vertical-rl; }

.subject-row { display: flex; align-items: center; gap: 10px; }
.subject-row .nm { width: 132px; flex: none; font-size: 13px; font-weight: 600; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(900px 460px at 50% -10%, #dbe7ff 0%, transparent 60%), var(--bg);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-lg); }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty .emoji { font-size: 40px; display: block; margin-bottom: 10px; }

@media (max-width: 820px) {
  .p-shell { flex-direction: column; }
  .p-side {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
    align-items: center;
  }
  .p-brand { padding: 0 10px 0 4px; }
  .p-brand span.t { display: none; }
  .p-nav { width: auto; white-space: nowrap; }
  .p-main { padding: 18px 16px 50px; }
  .subject-row .nm { width: 100px; }
}
