@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-500.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-600.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-800.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "FizjoRounded"; src: url("/assets/fonts/nunito-900.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --blue: #60a5fa;
  --blue-600: #2563eb;
  --purple: #a855f7;
  --purple-600: #7c3aed;
  --green: #22c55e;
  --orange: #fb923c;
  --yellow: #eab308;
  --red: #ef4444;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --page: #f0f9ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "FizjoRounded", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-weight: 500;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.kids-gradient { background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%); }
.app-header { position: sticky; top: 0; z-index: 50; color: #fff; box-shadow: 0 12px 28px rgba(37, 99, 235, .18); }
.app-header-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; line-height: 1.05; font-weight: 700; letter-spacing: 0; white-space: nowrap; flex: 0 0 auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 999px; background: #fff; color: var(--blue); display: grid; place-items: center; box-shadow: inset 0 2px 6px rgba(0,0,0,.08); }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav form { display: flex; margin: 0; flex: 0 0 auto; }
.nav a, .nav button { border: 0; cursor: pointer; padding: 9px 13px; border-radius: 999px; color: #fff; background: rgba(255,255,255,.14); display: inline-flex; gap: 7px; align-items: center; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.nav a.is-active, .nav button.is-active { background: #fff; color: var(--purple-600); }
.page { max-width: 940px; margin: 0 auto; padding: 34px 20px 78px; }
.grid-two { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 430px); gap: 34px; align-items: center; justify-content: center; min-height: calc(100vh - 190px); }
.card { background: var(--paper); border: 4px solid #eff6ff; border-radius: 32px; box-shadow: 0 18px 32px -16px rgba(15,23,42,.24), 0 8px 12px -10px rgba(15,23,42,.16); }
.card.pad { padding: 30px; }
.card h1, .card h2, .card h3 { margin-top: 0; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .label { color: #64748b; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #eef2f7; border-radius: 18px; padding: 14px 16px; background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; font-weight: 600;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,.14); }
.check-row { display: flex; align-items: center; gap: 10px; color: #334155; font-weight: 800; }
.check-row.full { grid-column: 1 / -1; }
.check-row input { width: 18px; height: 18px; accent-color: #2563eb; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { border: 2px solid #eef2f7; color: #94a3b8; background: #fff; border-radius: 18px; padding: 14px; font-weight: 700; cursor: pointer; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.radio-card input { display: none; }
.radio-card:has(input:checked) { border-color: #60a5fa; color: var(--blue-600); background: #eff6ff; box-shadow: 0 8px 16px rgba(37,99,235,.08); }
.radio-card.is-disabled { opacity: .5; cursor: not-allowed; }
.custom-box { grid-column: 1 / -1; background: #faf5ff; border: 2px solid #f3e8ff; border-radius: 26px; padding: 22px; }
.custom-toggle { width: 100%; justify-content: space-between; text-align: left; color: #7e22ce; background: transparent; border-color: transparent; padding: 0; }
.custom-toggle strong { background: #f3e8ff; border-radius: 999px; padding: 6px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.btn { border: 0; border-radius: 22px; padding: 14px 20px; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; justify-content: center; font-weight: 900; transition: transform .12s, opacity .12s; }
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #60a5fa, #c084fc); box-shadow: 0 14px 30px rgba(96,165,250,.25); }
.btn-blue { color: #fff; background: var(--blue-600); }
.btn-green { color: #fff; background: var(--green); }
.btn-danger { color: #fff; background: #ef4444; }
.btn-light { color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; }
.submit-wide { width: 100%; padding: 18px; font-size: 20px; border-radius: 30px; }
.auth-form-footer { display: flex; align-items: center; justify-content: center; margin-top: -2px; }
.auth-link { color: var(--blue-600); font-weight: 800; text-decoration: underline; text-decoration-color: #bfdbfe; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.auth-link:hover { color: var(--purple-600); text-decoration-color: #d8b4fe; }
.feature-panel { background: #2563eb; color: #fff; border-radius: 32px; padding: 30px; box-shadow: 0 18px 34px rgba(37,99,235,.24); position: relative; overflow: hidden; }
.feature-panel:after { content: ""; position: absolute; right: 18px; bottom: -28px; width: 120px; height: 120px; border: 12px solid rgba(255,255,255,.12); border-radius: 999px; }
.feature-panel p { color: rgba(255,255,255,.9); font-weight: 600; }
.plan-list { background: #fff; border: 2px solid #dbeafe; border-radius: 32px; padding: 30px; }
.plan-list h3 { color: var(--blue-600); text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.plan-list li { margin: 10px 0; color: #475569; font-weight: 700; }
.flash { padding: 14px 16px; border-radius: 20px; margin-bottom: 16px; font-weight: 800; }
.flash.error { background: #fef2f2; color: #dc2626; border: 2px solid #fee2e2; }
.flash.message { background: #ecfdf5; color: #047857; border: 2px solid #d1fae5; }
.status-wrap { display: grid; place-items: center; min-height: 520px; text-align: center; }
.status-panel { width: min(680px, 100%); margin: 0 auto; }
.generation-progress { margin: 28px auto 0; max-width: 540px; text-align: left; }
.generation-progress-top { display: flex; justify-content: space-between; gap: 14px; color: #2563eb; font-weight: 900; margin-bottom: 10px; }
.generation-progress-track { height: 15px; border-radius: 999px; overflow: hidden; background: #e0f2fe; border: 1px solid #bfdbfe; box-shadow: inset 0 1px 2px rgba(15,23,42,.08); }
.generation-progress-track > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(135deg, #60a5fa, #a855f7); transition: width .35s ease; }
.generation-progress-hint { margin: 12px 0 0; text-align: center; font-weight: 800; }
.spinner { width: 96px; height: 96px; border-radius: 999px; border: 10px solid #dbeafe; border-top-color: #60a5fa; animation: spin 1s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { position: sticky; top: 104px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; margin: 0 auto 18px; max-width: 900px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid #dbeafe; border-radius: 28px; box-shadow: 0 12px 24px rgba(15,23,42,.08); }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.package-card { background: #fff; border-radius: 48px; overflow: hidden; border: 2px solid #dbeafe; box-shadow: 0 18px 32px -16px rgba(15,23,42,.24); margin: 0 auto 30px; max-width: 900px; }
.package-head { padding: 28px 54px 28px 34px; color: #fff; display: flex; justify-content: space-between; gap: 24px; align-items: center; position: relative; }
.package-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .82; margin: 0 0 6px; font-weight: 700; }
.package-head h2 { font-size: 32px; margin: 0; font-weight: 700; }
.head-art { width: 66px; height: 66px; object-fit: contain; border-radius: 18px; border: 4px solid rgba(255,255,255,.3); background: rgba(255,255,255,.9); }
.card-product-logo { position: absolute; top: 12px; right: 14px; width: 58px; height: 24px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.94); border: 2px solid rgba(255,255,255,.34); padding: 4px 5px; }
.card-header-meta { max-width: 270px; font-weight: 900; line-height: 1.25; }
.card-header-meta span { display: inline-block; margin-top: 3px; font-size: 12px; line-height: 1.25; opacity: .9; }
.package-body { padding: 36px; }
.story-title { font-size: 34px; display: inline-block; border-bottom: 4px solid #fde68a; padding-bottom: 12px; font-style: italic; margin: 0 0 26px; }
.story-text { font-size: 18px; line-height: 1.85; color: #334155; white-space: pre-line; font-family: Georgia, "Times New Roman", serif; font-style: italic; text-align: justify; }
.story-float { width: 190px; height: 190px; object-fit: contain; float: right; margin: 0 0 18px 24px; border-radius: 30px; background: #fff; box-shadow: 0 14px 28px rgba(15,23,42,.14); transform: rotate(3deg); }
.story-footer { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-top: 34px; }
.stars { color: #facc15; display: flex; gap: 4px; }
.hero-quote { background: #fffbeb; border: 2px solid #fef3c7; border-radius: 24px; padding: 18px 22px; font-size: 18px; color: #92400e; font-weight: 700; font-style: italic; }
.exercise-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.exercise { border: 2px solid #f1f5f9; border-radius: 40px; padding: 26px; display: grid; grid-template-columns: 210px 1fr; gap: 26px; position: relative; background: #f8fafc; box-shadow: 0 8px 16px rgba(15,23,42,.04); }
.exercise-title-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 14px; display: inline-grid; place-items: center; color: #2563eb; background: #fff; box-shadow: 0 8px 18px rgba(15,23,42,.12); cursor: pointer; flex: 0 0 auto; }
.icon-button:hover { background: #eff6ff; }
.exercise img { width: 100%; height: 220px; object-fit: contain; border-radius: 28px; background: #fff; border: 1px solid #f1f5f9; }
.exercise h4 { margin: 0 0 8px; font-size: 25px; font-weight: 700; display: flex; align-items: flex-start; gap: 10px; line-height: 1.15; }
.exercise-number { width: 38px; height: 38px; min-width: 38px; border-radius: 999px; background: #2563eb; color: #fff; display: inline-grid; place-items: center; font-weight: 700; margin-right: 0; line-height: 1; }
.exercise-name { color: #60a5fa; text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 700; }
.exercise-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.exercise-meta span { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; border-radius: 14px; padding: 9px 13px; font-size: 13px; font-weight: 700; }
.exercise-instruction { background: #fff; border-left: 5px solid #60a5fa; border-radius: 20px; padding: 16px; line-height: 1.6; font-style: italic; }
.exercise-tip { background: #fff7ed; border-left: 5px solid #fdba74; border-radius: 20px; padding: 14px; color: #9a3412; font-size: 14px; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #f3e8ff; color: var(--purple-600); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tip { text-align: center; border: 2px solid #ffedd5; border-radius: 28px; padding: 22px; color: #475569; font-weight: 600; box-shadow: 0 6px 12px rgba(15,23,42,.04); }
.tip strong { width: 46px; height: 46px; border-radius: 999px; background: #ffedd5; color: #ea580c; display: inline-grid; place-items: center; margin-bottom: 12px; }
.planner-table { width: 100%; border-collapse: separate; border-spacing: 8px; }
.planner-table th { background: #faf5ff; color: #7e22ce; border-radius: 14px; padding: 12px; font-size: 13px; }
.planner-table td { border-radius: 18px; background: #fff; border: 2px solid #f1f5f9; padding: 10px; }
.planner-task { background: #f8fafc !important; min-width: 170px; }
.planner-check { width: 44px; height: 44px; margin: 0 auto; border: 4px solid #f1f5f9; border-radius: 16px; display: grid; place-items: center; color: #e5e7eb; }
.planner-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
.power-list, .therapist-rating { border-radius: 32px; padding: 22px; border: 2px solid; }
.power-list { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.therapist-rating { background: #ecfdf5; border-color: #bbf7d0; color: #047857; text-align: center; }
.rating-stars { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.rating-stars span { width: 42px; height: 42px; border: 4px solid #bbf7d0; border-radius: 16px; background: #fff; }
.stamp-box { border: 4px dashed #bbf7d0; border-radius: 32px; min-height: 110px; display: grid; place-items: center; color: #86efac; text-transform: uppercase; font-size: 10px; font-weight: 700; padding: 18px; }
.reward-box { text-align: center; border: 8px solid #fff; border-radius: 48px; padding: 36px; color: #fff; background: linear-gradient(135deg, #ef4444, #fb923c, #eab308); box-shadow: 0 22px 44px rgba(239,68,68,.22); position: relative; overflow: hidden; }
.reward-box:before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.22), transparent 32%); pointer-events: none; }
.reward-box > * { position: relative; z-index: 1; }
.reward-box h2 { text-transform: uppercase; font-size: 30px; }
.reward-box h1 { font-size: 44px; border-bottom: 4px dashed rgba(255,255,255,.55); display: inline-block; padding: 6px 22px; }
.reward-box img { max-width: 260px; width: 100%; object-fit: contain; border-radius: 36px; background: #fff; border: 8px solid #fff; box-shadow: 0 20px 36px rgba(15,23,42,.22); }
.sticker { text-align: center; border: 4px dashed #fde68a; border-radius: 42px; padding: 42px; position: relative; }
.sticker-label { position: absolute; top: -16px; left: 24px; border-radius: 999px; color: #fff; padding: 8px 16px; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.sticker img { max-width: 250px; width: 100%; object-fit: contain; border-radius: 999px; background: #fff; box-shadow: 0 20px 40px rgba(15,23,42,.18); border: 8px solid #fff; }
.coloring { text-align: center; border: 4px dashed #e2e8f0; border-radius: 42px; padding: 28px; margin-top: 34px; }
.coloring-frame { display: flex; justify-content: center; border: 2px solid #f1f5f9; border-radius: 36px; padding: 18px; background: #f8fafc; }
.coloring img { max-width: 420px; width: 100%; object-fit: contain; border-radius: 28px; background: #fff; filter: grayscale(1) contrast(1.25); }
.history-list { display: grid; gap: 18px; }
.archive-toolbar { align-items: center; }
.archive-count { margin: 4px 0 0; font-weight: 800; }
.archive-search { max-width: 900px; margin: 0 auto 18px; }
.archive-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: end; }
.archive-empty .btn { margin-top: 12px; }
.pagination { max-width: 900px; margin: 22px auto 0; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagination-info { padding: 0 8px; color: #64748b; font-weight: 900; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 920px; margin: 0 auto; }
.settings-lead { margin-top: -8px; margin-bottom: 22px; font-weight: 700; }
.logo-upload-row { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.logo-preview { width: 112px; height: 112px; border-radius: 26px; display: grid; place-items: center; background: #eff6ff; border: 2px solid #dbeafe; color: var(--blue-600); overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; }
.brand-download-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; border-color: #dbeafe; }
.brand-download-preview { min-height: 150px; border-radius: 26px; background: radial-gradient(circle at 50% 42%, #e0f2fe 0, #eff6ff 44%, #fff 100%); border: 2px solid #dbeafe; display: grid; place-items: center; padding: 18px; overflow: hidden; }
.brand-download-preview img { width: 100%; max-height: 170px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(15,23,42,.14)); }
.brand-download-content .settings-lead { margin-bottom: 18px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: #475569; font-weight: 800; }
.checkbox-line input { width: auto; }
.smtp-status { border-radius: 20px; padding: 14px 16px; margin-bottom: 20px; font-weight: 900; }
.smtp-status.is-ok { color: #047857; background: #ecfdf5; border: 2px solid #bbf7d0; }
.smtp-status.is-warn { color: #92400e; background: #fffbeb; border: 2px solid #fde68a; }
.settings-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.smtp-test-form { margin-top: 20px; padding-top: 20px; border-top: 2px solid #eff6ff; align-items: end; }
.help-hero { display: flex; align-items: center; gap: 22px; max-width: 1120px; margin: 0 auto 30px; }
.help-hero h1 { margin: 0 0 8px; font-size: 32px; }
.help-hero p { margin: 0; color: #64748b; font-weight: 700; }
.help-hero-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #7c3aed; background: #f3e8ff; flex: 0 0 auto; }
.help-section { max-width: 1120px; margin: 0 auto 32px; }
.help-section h2 { margin: 0 0 18px; font-size: 28px; }
.help-kicker { margin: 0 0 6px; color: #7c3aed; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.help-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.help-step { padding: 24px; border-width: 2px; min-height: 238px; display: flex; flex-direction: column; }
.help-step span { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563eb, #a855f7); font-weight: 900; box-shadow: 0 10px 22px rgba(124,58,237,.22); }
.help-step h3 { margin: 16px 0 8px; font-size: 19px; }
.help-step p { color: #475569; line-height: 1.55; font-weight: 700; }
.help-step small { display: inline-flex; width: fit-content; margin-top: auto; padding: 7px 10px; border-radius: 999px; color: #7c3aed; background: #f3e8ff; font-weight: 900; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.help-card { padding: 26px; border-width: 2px; min-height: 360px; }
.help-card-title { display: flex; gap: 14px; align-items: flex-start; }
.help-card-title > span { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; color: #2563eb; background: #eff6ff; flex: 0 0 auto; }
.help-card-title h2, .help-card-title h3 { margin: 0; line-height: 1.2; }
.help-card p, .help-card li { color: #475569; line-height: 1.65; font-weight: 700; }
.help-card ol { padding-left: 20px; margin: 14px 0 0; }
.help-field-list { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 8px 0 0; padding-left: 18px; }
.help-inline-icon { width: 24px; height: 24px; border-radius: 9px; display: inline-grid; place-items: center; color: #2563eb; background: #eff6ff; vertical-align: middle; }
.faq-list { padding: 0; overflow: hidden; border-width: 2px; }
.faq-list details { padding: 0 22px; border-bottom: 1px solid #e2e8f0; }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 900; display: flex; justify-content: space-between; gap: 18px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:after { content: ""; width: 11px; height: 11px; border-right: 2px solid #a855f7; border-bottom: 2px solid #a855f7; transform: rotate(45deg); margin-top: 2px; flex: 0 0 auto; transition: transform .15s; }
.faq-list details[open] summary:after { transform: rotate(225deg); margin-top: 8px; }
.faq-list p { margin: 0 0 20px; color: #475569; font-weight: 700; line-height: 1.65; }
.help-support { max-width: 1120px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; gap: 18px; align-items: center; border: 2px solid #f3e8ff; background: #faf5ff; }
.help-support p { margin: 6px 0 0; color: #64748b; font-weight: 700; }
.exercise-edit-modal { width: min(760px, calc(100vw - 28px)); border: 0; border-radius: 32px; padding: 0; box-shadow: 0 28px 70px rgba(15,23,42,.28); }
.exercise-edit-modal::backdrop { background: rgba(15,23,42,.48); backdrop-filter: blur(4px); }
.exercise-edit-modal form { padding: 28px; }
.modal-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 28px; }
.modal-head p { margin: 6px 0 0; color: #64748b; font-weight: 800; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.exercise-edit-modal textarea { min-height: 110px; resize: vertical; }
.history-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 24px; }
.muted { color: var(--muted); }
.admin-shell { width: min(1680px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
.admin-toolbar { max-width: none; align-items: center; }
.admin-toolbar .section-title { margin: 0 0 4px; }
.admin-toolbar p { margin: 0; font-weight: 800; }
.admin-status { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .48fr); grid-template-areas: "users users" "prompts config" "prompts packages" "usage usage"; gap: 22px; align-items: start; }
.admin-card { border-width: 2px; border-radius: 24px; overflow: hidden; }
.admin-card h2 { margin: 0; font-size: 24px; }
.admin-card h3 { margin: 24px 0 12px; font-size: 16px; }
.admin-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.admin-card-head p { margin: 5px 0 0; font-weight: 800; }
.admin-card-users { grid-area: users; }
.admin-card-packages { grid-area: packages; }
.admin-card-prompts { grid-area: prompts; }
.admin-card-config { grid-area: config; }
.admin-card-usage { grid-area: usage; }
.admin-table-wrap { width: 100%; overflow: auto; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; }
.admin-table-wrap.is-compact { max-height: 560px; }
.admin-table-wrap.is-log { max-height: 360px; margin-bottom: 18px; }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 680px; }
.admin-card-users .admin-table { min-width: 1040px; }
.admin-table th, .admin-table td { border-bottom: 1px solid #e2e8f0; padding: 11px 12px; text-align: left; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table th { position: sticky; top: 0; z-index: 1; color: #64748b; background: #f8fafc; text-transform: uppercase; font-size: 10px; letter-spacing: .06em; }
.admin-table td { color: #334155; font-weight: 700; }
.admin-email { min-width: 230px; max-width: 340px; overflow-wrap: anywhere; }
.admin-number { white-space: nowrap; font-weight: 900 !important; color: #0f172a !important; }
.role-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 92px; }
.limit-form { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 8px; align-items: center; min-width: 250px; }
.limit-form input { width: 100%; border: 2px solid #eef2f7; border-radius: 14px; padding: 10px 12px; font-weight: 700; }
.limit-form .btn { padding: 10px 12px; border-radius: 14px; }
.gos-access-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 190px; max-width: 340px; }
.admin-user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 190px; }
.admin-user-actions form { margin: 0; }
.admin-user-edit-btn { padding: 9px 12px; border-radius: 14px; font-size: 12px; }
.admin-user-modal { width: min(820px, calc(100vw - 28px)); }
.admin-user-modal form { padding: 28px; }
.admin-user-modal small { display: block; color: #64748b; font-size: 12px; font-weight: 800; line-height: 1.35; }
.admin-user-modal input[readonly], .admin-user-modal input:disabled { color: #64748b; background: #f8fafc; cursor: not-allowed; }
.admin-user-box { display: grid; gap: 12px; padding: 16px; border-radius: 20px; border: 1px solid #e2e8f0; background: #fbfdff; }
.admin-user-box .muted { margin: 0; font-size: 12px; font-weight: 800; line-height: 1.35; }
.mini-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; font-size: 11px; font-weight: 900; line-height: 1.1; }
.mini-badge.is-ok { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.mini-badge.is-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.mini-badge.is-muted { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.prompt-list { display: grid; gap: 16px; }
.prompt-form { padding: 16px; border: 1px solid #e2e8f0; border-radius: 18px; background: #fbfdff; }
.prompt-form textarea { min-height: 128px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.5; }
.prompt-form .btn { margin-top: 10px; padding: 10px 14px; border-radius: 14px; }
.admin-form { margin-bottom: 18px; align-items: end; }
.admin-form .btn { min-height: 48px; }
.asset-manager { width: min(1760px, calc(100vw - 48px)); }
.asset-character-lab { margin-bottom: 22px; border-color: #bbf7d0; }
.asset-character-form { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(260px, .9fr) minmax(280px, .55fr); gap: 16px; align-items: stretch; }
.asset-character-form small { display: block; margin-top: 7px; color: #64748b; font-weight: 800; line-height: 1.35; }
.asset-character-form textarea, .asset-character-form select[multiple] { min-height: 220px; }
.asset-character-side { display: grid; gap: 16px; align-content: end; }
.asset-character-side .asset-batch-submit { grid-column: auto; width: 100%; }
.asset-batch-hero { margin-bottom: 22px; border-color: #bfdbfe; }
.asset-batch-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.asset-batch-form small { display: block; margin-top: 6px; color: #64748b; font-weight: 800; line-height: 1.35; }
.asset-batch-submit { grid-column: 1 / -1; min-height: 56px; font-size: 16px; }
.asset-pose-form { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(240px, .7fr) minmax(320px, 1fr) minmax(260px, .55fr); gap: 16px; align-items: stretch; }
.asset-pose-form small { display: block; margin-top: 7px; color: #64748b; font-weight: 800; line-height: 1.35; }
.asset-pose-form textarea, .asset-pose-form select[multiple] { min-height: 220px; }
.asset-pose-picker select { min-height: 300px; }
.asset-pose-side { display: grid; gap: 16px; align-content: end; }
.asset-pose-side .asset-batch-submit { grid-column: auto; width: 100%; }
.asset-bridge-note { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-weight: 800; }
.asset-bridge-note code { color: #1d4ed8; }
.asset-reward-lab { margin-bottom: 22px; border-color: #bbf7d0; }
.asset-reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.asset-reward-card { display: grid; gap: 16px; min-width: 0; padding: 18px; border: 1px solid #dbeafe; border-radius: 20px; background: linear-gradient(180deg, #fff, #f8fbff); }
.asset-reward-card h3 { margin: 0 0 6px; color: #0f172a; font-size: 19px; line-height: 1.2; }
.asset-reward-card .muted { line-height: 1.45; }
.asset-reward-card small { display: block; margin-top: 7px; color: #64748b; font-size: 12px; font-weight: 800; line-height: 1.35; }
.asset-reward-row { display: grid; grid-template-columns: minmax(120px, .36fr) minmax(180px, 1fr); gap: 14px; align-items: end; }
.asset-reward-card .btn { min-height: 48px; width: 100%; }
.asset-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.asset-stat { background: #fff; border: 2px solid #dbeafe; border-radius: 22px; padding: 18px; box-shadow: 0 12px 22px rgba(15,23,42,.08); }
.asset-stat strong { display: block; font-size: 28px; color: #2563eb; line-height: 1; }
.asset-stat span { display: block; margin-top: 8px; color: #64748b; font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.asset-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .48fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.asset-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .42fr); gap: 22px; align-items: start; }
.asset-panel-wide { grid-column: span 1; }
.asset-form { margin-bottom: 18px; }
.asset-form select[multiple] { min-height: 160px; }
.asset-filter-form { display: grid; grid-template-columns: minmax(160px, 220px) minmax(220px, 300px) minmax(220px, 320px) auto; gap: 12px; align-items: end; margin: 14px 0 18px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 18px; background: #f8fafc; }
.asset-filter-form .btn { min-height: 46px; }
.asset-bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid #bfdbfe; border-radius: 20px; background: #eff6ff; }
.asset-bulk-copy { display: grid; gap: 4px; max-width: 720px; }
.asset-bulk-copy strong { color: #1e3a8a; font-size: 16px; }
.asset-bulk-copy span { color: #475569; font-size: 13px; font-weight: 800; line-height: 1.45; }
.asset-bulk-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.asset-bulk-action { display: inline-flex; align-items: center; gap: 8px; color: #1e3a8a; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.asset-bulk-action select { min-height: 40px; min-width: 150px; padding: 8px 32px 8px 12px; border: 1px solid #bfdbfe; border-radius: 14px; background: #fff; color: #0f172a; font-weight: 900; }
.asset-select-all { display: inline-flex; align-items: center; gap: 10px; color: #1e3a8a; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.asset-select-all input, .asset-select input { width: 20px; height: 20px; accent-color: #2563eb; cursor: pointer; }
.asset-selection-count { min-width: 112px; padding: 9px 12px; border-radius: 999px; background: #fff; color: #1e3a8a; font-size: 12px; font-weight: 900; text-align: center; border: 1px solid #dbeafe; }
.asset-bulk-bar .btn { min-height: 44px; padding-inline: 18px; }
.asset-bulk-bar .btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.asset-pagination { margin-top: 18px; }
[data-asset-qa-panel] { transition: opacity .16s ease, filter .16s ease; }
[data-asset-qa-panel].is-loading { opacity: .58; filter: saturate(.7); pointer-events: none; }
.asset-tile.is-processing { opacity: .58; pointer-events: none; }
.asset-tile.is-processing .asset-thumb { position: relative; }
.asset-tile.is-processing .asset-thumb::after {
  content: "";
  width: 34px;
  height: 34px;
  position: absolute;
  inset: 50% auto auto 50%;
  margin: -17px 0 0 -17px;
  border: 4px solid rgba(37,99,235,.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: asset-spin .75s linear infinite;
}
.asset-action-toast {
  position: fixed;
  z-index: 1200;
  right: 22px;
  bottom: 22px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 18px 44px rgba(15,23,42,.2);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
.asset-action-toast.is-visible { opacity: 1; transform: translateY(0); }
.asset-action-toast.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
@keyframes asset-spin { to { transform: rotate(360deg); } }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.asset-tile { border: 1px solid #e2e8f0; border-radius: 22px; overflow: hidden; background: #fbfdff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.asset-tile:has([data-asset-checkbox]:checked) { border-color: #2563eb; box-shadow: 0 18px 30px rgba(37,99,235,.16); transform: translateY(-1px); }
.asset-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.asset-select { display: inline-flex; align-items: center; gap: 9px; color: #334155; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.asset-thumb { height: 220px; display: grid; place-items: center; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.asset-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.asset-tile-body { padding: 16px; }
.asset-type-label { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.asset-tile-body h3 { margin: 10px 0 0; color: #0f172a; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.asset-condition { min-height: 42px; margin: 8px 0 0; color: #334155; font-size: 13px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.asset-movement { display: grid; gap: 4px; margin-top: 12px; padding: 12px; border-radius: 14px; background: #f0f9ff; border: 1px solid #bae6fd; }
.asset-movement strong { color: #0369a1; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.asset-movement span { color: #0f172a; font-size: 14px; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.asset-movement small { color: #475569; font-size: 12px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.asset-movement.is-missing { background: #fffbeb; border-color: #fde68a; }
.asset-movement.is-missing strong { color: #92400e; }
.asset-meta { display: grid; grid-template-columns: minmax(0, 1fr) 70px 64px; gap: 8px; margin: 14px 0 0; }
.asset-meta div { min-width: 0; padding: 9px 10px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.asset-meta dt { margin: 0 0 3px; color: #64748b; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.asset-meta dd { margin: 0; color: #0f172a; font-size: 12px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.asset-actions .btn { padding: 9px 11px; border-radius: 12px; font-size: 12px; }
.asset-actions form { margin: 0; }
.asset-advanced { margin-top: 22px; }
.asset-advanced summary { cursor: pointer; font-size: 18px; font-weight: 900; color: #1e293b; }
.welcome-modal { width: min(720px, calc(100vw - 28px)); border: 0; border-radius: 34px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(15,23,42,.28); }
.welcome-modal::backdrop { background: rgba(15,23,42,.42); backdrop-filter: blur(4px); }
.welcome-modal form { padding: 30px; }
.welcome-modal-head { display: grid; grid-template-columns: 62px 1fr; gap: 18px; align-items: start; }
.welcome-modal-head h2 { margin: 0 0 8px; font-size: 32px; }
.welcome-modal-head p:not(.help-kicker) { margin: 0; color: #475569; line-height: 1.55; font-weight: 800; }
.welcome-modal-icon { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #60a5fa, #a855f7); box-shadow: 0 14px 26px rgba(96,165,250,.22); }
.welcome-checklist { display: grid; gap: 12px; margin: 24px 0; }
.welcome-checklist article { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; padding: 16px; border: 2px solid #eff6ff; border-radius: 22px; background: #fbfdff; }
.welcome-checklist article > span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #2563eb; background: #eff6ff; }
.welcome-checklist strong { display: block; margin-bottom: 3px; color: #0f172a; font-size: 16px; font-weight: 900; }
.welcome-checklist p { margin: 0; color: #64748b; line-height: 1.45; font-weight: 750; }
.welcome-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.footer { padding: 28px; text-align: center; color: #94a3b8; border-top: 1px solid #e2e8f0; background: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 1180px) {
  .admin-layout { grid-template-columns: 1fr; grid-template-areas: "users" "packages" "config" "prompts" "usage"; }
  .asset-layout, .asset-dashboard-grid { grid-template-columns: 1fr; }
  .asset-reward-grid { grid-template-columns: 1fr; }
  .asset-batch-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-character-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-pose-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-table-wrap.is-compact, .admin-table-wrap.is-log { max-height: 420px; }
  .admin-card-users .admin-table { min-width: 980px; }
  .help-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .grid-two, .admin-grid, .exercise-grid, .tips, .planner-panels, .help-steps, .help-grid { grid-template-columns: 1fr; }
  .archive-search-form { grid-template-columns: 1fr; }
  .exercise { grid-template-columns: 1fr; }
  .exercise img { width: 100%; height: auto; aspect-ratio: 1; }
  .story-float { float: none; display: block; margin: 0 auto 24px; }
  .app-header-inner, .toolbar, .history-item { align-items: stretch; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .brand { font-size: 24px; }
  .page { padding-inline: 14px; }
  .admin-shell { width: 100%; margin-left: 0; transform: none; }
  .admin-status, .admin-card-head { justify-content: flex-start; }
  .asset-filter-form { grid-template-columns: 1fr; }
  .asset-bulk-bar { align-items: stretch; flex-direction: column; }
  .asset-bulk-controls { justify-content: flex-start; }
  .asset-bulk-action { width: 100%; justify-content: space-between; }
  .asset-bulk-action select { flex: 1; min-width: 0; }
  .asset-bulk-bar .btn { width: 100%; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-meta { grid-template-columns: 1fr 1fr; }
  .asset-meta div:first-child { grid-column: 1 / -1; }
  .admin-table { min-width: 760px; }
  .asset-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-batch-form { grid-template-columns: 1fr; }
  .asset-character-form { grid-template-columns: 1fr; }
  .asset-pose-form { grid-template-columns: 1fr; }
  .asset-reward-row { grid-template-columns: 1fr; }
  .asset-manager { width: 100%; }
  .admin-card-users .admin-table { min-width: 920px; }
  .limit-form { min-width: 220px; }
  .admin-card { border-radius: 22px; }
  .brand-download-card { grid-template-columns: 1fr; }
  .brand-download-preview { min-height: 190px; }
  .package-card { border-radius: 34px; }
  .package-body { padding: 24px; }
  .help-hero, .help-support { align-items: stretch; flex-direction: column; }
  .welcome-modal form { padding: 22px; }
  .welcome-modal-head, .welcome-checklist article { grid-template-columns: 1fr; }
  .welcome-actions .btn { width: 100%; }
}
@media print {
  .no-print, .app-header, .footer { display: none !important; }
  body { background: white; }
  .page { max-width: none; padding: 0; }
  .package-card { box-shadow: none; border-radius: 0; page-break-after: always; border: 2px solid #e2e8f0; }
  .package-card:last-child { page-break-after: auto; }
  .package-head, .kids-gradient, .reward-box { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
