:root {
  --bg: #fff7df;
  --card: #ffffff;
  --text: #202124;
  --muted: #6b7280;
  --line: #ece5d3;
  --brand: #ffb703;
  --brand-dark: #d97706;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --blue: #2563eb;
  --shadow: 0 18px 60px rgba(77, 47, 0, .14);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, #fff0aa 0, var(--bg) 42%, #fff 100%); color: var(--text); }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.app-shell { max-width: 1180px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 10; padding: 10px 0 14px; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-icon { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.brand strong { display: block; line-height: 1.05; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.topnav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.topnav a, .link-button { border: 1px solid var(--line); background: rgba(255,255,255,.78); border-radius: 999px; padding: 9px 12px; text-decoration: none; color: #3b3b3b; }
.link-button { cursor: pointer; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.content { padding: 12px 0 48px; }
.hero { text-align: center; padding: 44px 16px 30px; }
.hero-icon, .login-icon { width: 112px; height: 112px; border-radius: 28px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(34px, 7vw, 62px); margin: 18px 0 8px; letter-spacing: -0.05em; }
.hero p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 18px; }
.hero-actions { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.card { background: rgba(255,255,255,.92); border: 1px solid rgba(236,229,211,.95); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.card h2, .card h3, .section-head h1 { margin-top: 0; }
.muted { color: var(--muted); }
code { background: #f7f2e6; padding: 2px 6px; border-radius: 7px; }
.button { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 14px; padding: 11px 14px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; min-height: 42px; }
.button.primary { background: linear-gradient(135deg, #ffc83d, #ff9f1c); color: #3a2500; border-color: #ffb703; box-shadow: 0 8px 24px rgba(255,183,3,.28); }
.button.danger { background: #fff1f2; border-color: #fecdd3; color: #b91c1c; }
.button.tiny { min-height: 32px; padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.stack.compact { gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.form-grid h2, .full-span { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 650; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid #e5dec8; background: #fffdfa; color: var(--text); border-radius: 14px; padding: 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,183,3,.22); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
legend { font-weight: 800; padding: 0 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; grid-column: 1 / -1; }
.login-card { max-width: 460px; margin: 38px auto; text-align: center; }
.login-card form { text-align: left; }
.hint-box { margin-top: 16px; text-align: left; background: #fff8e1; border-radius: 16px; padding: 12px; border: 1px solid #fde68a; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 99; max-width: min(92vw, 620px); padding: 13px 16px; border-radius: 999px; box-shadow: 0 18px 48px rgba(0,0,0,.18); color: white; font-weight: 750; transition: opacity .25s, transform .25s; }
.toast.ok { background: var(--ok); }
.toast.error { background: var(--danger); }
.toast.warn { background: var(--warn); }
.toast.hide { opacity: 0; transform: translateX(-50%) translateY(18px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 18px; }
.section-head h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.04em; margin-bottom: 4px; }
.badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 6px 10px; background: #f3f4f6; color: #374151; font-size: 13px; font-weight: 800; white-space: nowrap; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.sev-light, .sev-light .badge { background: #dbeafe; color: #1d4ed8; }
.badge.sev-medium, .sev-medium .badge { background: #fef3c7; color: #92400e; }
.badge.sev-heavy, .sev-heavy .badge { background: #fee2e2; color: #991b1b; }
.grid { display: grid; gap: 16px; }
.cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: 1fr 1fr; align-items: start; }
.child-card { display: grid; gap: 12px; }
.child-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.child-head h2 { margin: 0; }
.points-circle { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; }
.points-circle.open { background: #fff1f2; color: #b91c1c; }
.points-circle.done { background: #d1fae5; color: #065f46; }
.small-link { color: var(--brand-dark); font-weight: 800; text-decoration: none; }
.request-list, .experience-grid { display: grid; gap: 12px; }
.request-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf7; }
.review-form { display: grid; gap: 10px; }
.child-welcome { align-items: stretch; }
.points-panel { min-width: 150px; border-radius: 22px; background: linear-gradient(135deg, #ffc83d, #ff9f1c); padding: 18px; color: #3a2500; text-align: center; box-shadow: 0 12px 32px rgba(255,183,3,.25); }
.points-panel strong { display: block; font-size: 42px; line-height: 1; }
.points-panel span { font-weight: 800; }
.info-card { border-color: #bfdbfe; background: #eff6ff; }
.success-card { border-color: #bbf7d0; background: #f0fdf4; }
.experience-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.experience-card { border: 1px solid var(--line); border-radius: 22px; padding: 16px; background: #fff; display: grid; gap: 10px; }
.experience-card.sev-light { border-color: #bfdbfe; background: #f8fbff; }
.experience-card.sev-medium { border-color: #fde68a; background: #fffdf2; }
.experience-card.sev-heavy { border-color: #fecdd3; background: #fff7f7; }
.experience-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.experience-top h3 { margin: 0; }
.result-hint { border-radius: 14px; padding: 10px; font-weight: 750; }
.result-hint.complete { background: #d1fae5; color: #065f46; }
.result-hint.partial { background: #fef3c7; color: #92400e; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.actions-cell { white-space: nowrap; }
.filter-form { min-width: 220px; }
.timeline { display: grid; gap: 12px; }
.timeline article { border-left: 4px solid var(--brand); background: #fffdf7; border-radius: 0 16px 16px 0; padding: 12px 14px; }
.timeline p { margin: 6px 0; }
.timeline small { color: var(--muted); }
.checkline { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.checkline input { width: auto; }
.error-box { border-color: #fecdd3; background: #fff1f2; }
@media (max-width: 980px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-grid, .two-col { grid-template-columns: 1fr; }
  .request-card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { padding: 10px; }
  .topbar { align-items: flex-start; gap: 10px; }
  .brand small { max-width: 160px; }
  .topnav { gap: 6px; font-size: 13px; }
  .topnav a, .link-button { padding: 7px 9px; }
  .hero { padding-top: 28px; }
  .card { padding: 16px; border-radius: 20px; }
  .form-grid, .split, .cards-grid { grid-template-columns: 1fr; }
  .section-head { display: grid; }
  .points-panel { width: 100%; }
  .experience-top { align-items: center; }
  .toast { bottom: 12px; border-radius: 18px; }
}
@media (display-mode: standalone) {
  .topbar { padding-top: 14px; }
}
