:root {
  --page-bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7f4e9;
  --ink: #223342;
  --muted: #586c7b;
  --navy: #223c55;
  --olive: #6d7b42;
  --olive-deep: #4f6233;
  --lavender: #c1b6ca;
  --lavender-soft: #f1edf3;
  --silver: #c8d2d6;
  --silver-soft: #edf2f3;
  --line: #d2dfe4;
  --coral: #e98170;
  --sun: #f2c45c;
  --mint: #dcefe7;
  --sky: #dcecf5;
  --shadow: 0 18px 42px rgba(34, 60, 85, .12);
  --radius: 24px;
}
body { background: radial-gradient(ellipse at 10% 15%, rgba(242,196,92,.12), transparent 32%), var(--page-bg); }
.topbar { background: rgba(246, 249, 248, .96); border-bottom-color: rgba(200,210,214,.8); }
.icon-button, .button { border-radius: 15px; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, background .22s ease, border-color .22s ease; }
.icon-button:hover, .button:hover { transform: translateY(-3px); box-shadow: 0 11px 22px rgba(34,60,85,.14); }
.icon-button:active, .button:active { transform: translateY(0) scale(.98); }
.button-primary { background: var(--navy); box-shadow: 0 9px 20px rgba(34,60,85,.19); }
.button-primary:hover { background: #1b3146; }
.button-quiet:hover { border-color: var(--sun); background: #fff9e9; }
.home-screen { background: radial-gradient(ellipse at 16% 23%, rgba(220,239,231,.92), transparent 33%), radial-gradient(ellipse at 86% 73%, rgba(248,220,208,.76), transparent 29%), var(--page-bg); }
.home-screen::before { border-color: rgba(109,123,66,.18); box-shadow: 46px 54px 0 -45px rgba(233,129,112,.55), -68px 62px 0 -67px rgba(242,196,92,.85); }
.home-screen::after { border-color: rgba(233,129,112,.2); }
.home-kicker, .screen-kicker { border-color: rgba(242,196,92,.78); background: #fffaf0; box-shadow: 0 4px 11px rgba(34,60,85,.04); }
.home-brand-name { color: var(--olive-deep); text-shadow: 0 4px 0 rgba(242,196,92,.12); }
.logo-stage::before { border-color: rgba(109,123,66,.42); border-width: 2px; }
.logo-stage::after { border-color: rgba(233,129,112,.34); }
.logo-glow { background: radial-gradient(circle, rgba(255,255,255,.96), rgba(242,196,92,.18) 44%, rgba(220,239,231,.2) 71%, transparent 74%); }
.home-stage h1 { color: var(--navy); }
.home-lead { color: #526879; }
.department-actions { gap: 17px; }
.department-button { min-height: 108px; border-color: rgba(210,223,228,.9); border-radius: 22px; box-shadow: 0 12px 26px rgba(34,60,85,.08); }
.department-button.social { border-inline-start-color: var(--olive); background: linear-gradient(115deg, #fff 10%, var(--mint) 100%); }
.department-button.psych { border-inline-start-color: var(--navy); background: linear-gradient(115deg, #fff 8%, var(--sky) 69%, #fbf0d1 100%); }
.department-button:hover { transform: translateY(-5px) rotate(-.25deg); box-shadow: var(--shadow); }
.department-button .button-arrow { background: var(--sun); color: var(--navy); }
.department-button.psych .button-arrow { background: var(--coral); color: #fff; }
.shortcut { border-color: transparent; transition: .2s ease; }
.shortcut:hover { border-color: rgba(233,129,112,.32); background: #fff6f1; color: var(--navy); }
.social-theme .screen-kicker { border-color: rgba(109,123,66,.32); background: #e7f1e7; color: var(--olive-deep); }
.psych-theme .screen-kicker { border-color: rgba(80,130,155,.25); background: #e5f1f6; color: var(--navy); }
.social-theme .page-title { color: var(--olive-deep); }
.psych-theme .page-title { color: var(--navy); }
.start-panel { grid-template-columns: minmax(0,1fr) minmax(145px,190px) auto; gap: 22px; border-color: rgba(210,223,228,.9); border-inline-start-color: var(--sun); background: linear-gradient(115deg, #fff 45%, #fff8e5); }
.social-theme .start-panel { border-inline-start-color: var(--olive); background: linear-gradient(115deg, #fff 42%, #e8f3eb); }
.psych-theme .start-panel { border-inline-start-color: var(--coral); background: linear-gradient(115deg, #fff 44%, #e7f1f7); }
.section-topic-visual { width: 100%; margin: 0; align-self: center; }
.section-topic-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 4px solid rgba(255,255,255,.96); border-radius: 20px; box-shadow: 0 9px 20px rgba(34,60,85,.13); }
.section-topic-count { border-color: rgba(242,196,92,.65); background: #fffaf0; }
.social-theme .section-start-button { border-color: var(--olive-deep); background: var(--olive-deep); }
.problem-top { grid-template-columns: minmax(0,1fr) 178px 122px; gap: 19px; align-items: center; border-color: rgba(210,223,228,.95); background: linear-gradient(120deg, #fff 40%, #fff8e7 100%); box-shadow: 0 13px 30px rgba(34,60,85,.09); }
.social-theme .problem-top { background: linear-gradient(120deg, #fff 38%, #eaf4ec 100%); }
.psych-theme .problem-top { background: linear-gradient(120deg, #fff 38%, #e8f1f7 100%); }
.problem-copy { min-width: 0; }
.problem-top h1 { color: var(--navy); }
.topic-illustration { width: 100%; margin: 0; padding: 6px; border: 1px solid rgba(255,255,255,.92); border-radius: 23px; background: rgba(255,255,255,.72); box-shadow: 0 9px 22px rgba(34,60,85,.12); }
.topic-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 17px; animation: topic-float 5.5s ease-in-out infinite alternate; }
@keyframes topic-float { from { transform: translateY(0) rotate(-.5deg); } to { transform: translateY(-4px) rotate(.5deg); } }
.problem-index { width: 116px; border: 2px solid rgba(242,196,92,.72); background: #fff7dc; color: var(--navy); }
.social-theme .problem-index { border-color: rgba(109,123,66,.42); background: #e1efe4; color: var(--olive-deep); }
.psych-theme .problem-index { border-color: rgba(110,157,178,.44); background: #e2f0f5; }
.info-card { border-color: rgba(210,223,228,.88); border-radius: 20px; box-shadow: 0 6px 15px rgba(34,60,85,.045); }
.problem-description-card { border-inline-start-color: var(--coral); background: linear-gradient(110deg, #fff, #fff5f0); }
.social-theme .problem-description-card { border-inline-start-color: var(--olive); }
.psych-theme .problem-description-card { border-inline-start-color: var(--navy); }
.signs-card { border-top-color: var(--mint); background: #f2f8f4; }
.social-theme .signs-card { border-top-color: var(--olive); }
.psych-theme .signs-card { border-top-color: var(--sky); background: #f2f7fa; }
.factors-card { border-top-color: var(--sun); background: #fffaf0; }
.solution-card { border-top-color: var(--olive); background: linear-gradient(130deg, #fff, #f0f7f0); }
.solution-card h2::before { color: var(--olive-deep); }
.psych-theme .solution-card { border-top-color: var(--navy); background: linear-gradient(130deg, #fff, #f1f7fa); }
.avoid-card { border-inline-start-color: var(--coral); background: #fff4f0; }
.specialist-card { border-color: rgba(137,174,190,.38); background: #eaf3f6; }
.safeguarding-note { border-top-color: rgba(137,174,190,.5); }
.page-nav .breadcrumb { line-height: 1.6; }
.contact-card { border-radius: 20px; box-shadow: 0 8px 20px rgba(34,60,85,.06); }
.contact-card:nth-child(1) { border-top: 4px solid var(--olive); background: linear-gradient(180deg, #f4faf5, #fff 62%); }
.contact-card:nth-child(2) { border-top: 4px solid var(--coral); background: linear-gradient(180deg, #fff5f1, #fff 62%); }
.contact-card:nth-child(3) { border-top: 4px solid var(--sun); background: linear-gradient(180deg, #fffaf0, #fff 62%); }
.site-footer { background: rgba(248,250,249,.88); }
.footer-credit { color: var(--navy); font-weight: 800; }
.toast { border-color: rgba(242,196,92,.7); box-shadow: 0 12px 30px rgba(34,60,85,.2); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline-color: var(--coral); }
@media (max-width: 900px) {
  .problem-top { grid-template-columns: minmax(0,1fr) 152px 102px; gap: 14px; }
  .problem-index { width: 96px; }
  .start-panel { grid-template-columns: minmax(0,1fr) 150px; }
  .start-panel-action { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .start-panel { grid-template-columns: minmax(0,1fr) 125px; gap: 15px; }
  .start-panel-action { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .home-screen { background: radial-gradient(ellipse at 4% 9%, rgba(220,239,231,.86), transparent 36%), radial-gradient(ellipse at 95% 83%, rgba(248,220,208,.68), transparent 35%), var(--page-bg); }
  .home-screen::before { width: 64vw; height: 64vw; }
  .home-screen::after { width: 56vw; height: 56vw; }
  .department-button { min-height: 81px; border-radius: 18px; }
  .start-panel { grid-template-columns: 1fr; }
  .section-topic-visual { width: min(100%, 300px); }
  .start-panel-action { grid-column: auto; }
  .problem-top { grid-template-columns: 1fr; gap: 12px; }
  .problem-copy { grid-row: 1; }
  .topic-illustration { grid-row: 2; width: min(100%, 360px); justify-self: center; }
  .problem-index { grid-row: 3; width: 86px; justify-self: start; }
  .problem-index strong { font-size: 25px; }
  .problem-index span { font-size: 10px; }
  .info-card { border-radius: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .topic-image { animation: none !important; }
}

/* Independent, calm animated introduction: no rotating orbit motif. */
.intro-screen { width: min(1120px, 94%); display: grid; place-items: center; min-height: calc(100svh - 134px); padding-block: clamp(24px,5vh,56px); background: radial-gradient(ellipse at 50% 18%, rgba(220,239,231,.72), transparent 34%), radial-gradient(ellipse at 82% 78%, rgba(242,196,92,.17), transparent 30%); }
.intro-stage { width: min(820px,100%); display: flex; flex-direction: column; align-items: center; text-align: center; animation: intro-stage-in .75s ease both; }
.intro-kicker { padding: 6px 15px; border: 1px solid rgba(109,123,66,.28); border-radius: 999px; background: rgba(255,255,255,.82); color: var(--olive-deep); font-weight: 800; }
.intro-emblem { position: relative; width: clamp(150px,24vw,220px); aspect-ratio: 1; display: grid; place-items: center; margin-top: 12px; }
.intro-emblem-glow { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(242,196,92,.28), rgba(220,239,231,.44) 55%, transparent 75%); animation: intro-glow 3.6s ease-in-out infinite; }
.intro-emblem-ring { position: absolute; inset: 6%; border: 1px solid rgba(109,123,66,.25); border-radius: 50%; animation: intro-ring-in .9s ease both; }
.intro-logo { position: relative; width: 78%; height: 82%; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 12px 14px rgba(34,60,85,.17)); animation: intro-logo-spin-in 1.5s cubic-bezier(.18,.72,.2,1) .1s both; }
.intro-wordmark { margin: 0; color: var(--olive-deep); font-size: clamp(44px,8vw,64px); line-height: 1.15; animation: intro-text-in .7s .18s ease both; }
.intro-lead { margin: 8px 0 15px; color: var(--navy); font-size: clamp(17px,3vw,23px); font-weight: 800; }
.intro-tone-button { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 1px solid rgba(242,196,92,.8); border-radius: 999px; background: #fffaf0; color: var(--navy); font-weight: 900; box-shadow: 0 6px 18px rgba(34,60,85,.08); }
.intro-tone-button span { color: #a66e1c; font-size: 23px; }
.intro-tone-button.is-playing { animation: intro-tone-pulse .75s ease; }
.intro-tone-hint { margin: 4px 0 18px; color: var(--muted); font-size: 12px; }
.intro-choose { margin: 0 0 10px; color: var(--navy); font-size: 17px; }
.intro-departments { width: min(740px,100%); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.intro-department { min-height: 96px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--navy); text-align: start; box-shadow: 0 9px 22px rgba(34,60,85,.08); transition: transform .2s ease, box-shadow .2s ease; }
.intro-department:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.intro-department > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.intro-department strong { font-size: 19px; }
.intro-department small { color: var(--muted); }
.intro-department-icon { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.72); font-size: 23px; }
.intro-social { background: linear-gradient(110deg,#fff 25%,#e5f1e7); border-inline-start: 5px solid var(--olive); }
.intro-psych { background: linear-gradient(110deg,#fff 25%,#e7f1f7); border-inline-start: 5px solid var(--navy); }
.intro-return { margin-top: 8px; }
@keyframes intro-stage-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-logo-spin-in { 0% { opacity: 0; transform: rotate(-80deg) scale(.76); } 78% { opacity: 1; transform: rotate(375deg) scale(1.035); } 100% { opacity: 1; transform: rotate(360deg) scale(1); } }
@keyframes intro-ring-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-text-in { from { opacity: 0; letter-spacing: .12em; } to { opacity: 1; letter-spacing: normal; } }
@keyframes intro-glow { 50% { opacity: .56; transform: scale(1.045); } }
@keyframes intro-tone-pulse { 35% { transform: scale(1.04); box-shadow: 0 0 0 9px rgba(242,196,92,.18); } }
.problem-screen { --topic-color: hsl(var(--topic-hue, 150) 54% 41%); }
.problem-screen .problem-top { border-inline-start: 6px solid var(--topic-color); }
.problem-screen .screen-kicker { border-color: color-mix(in srgb,var(--topic-color) 32%,white); background: color-mix(in srgb,var(--topic-color) 12%,white); color: var(--topic-color); }
.problem-screen .problem-index { border-color: color-mix(in srgb,var(--topic-color) 46%,white); background: color-mix(in srgb,var(--topic-color) 14%,white); color: var(--topic-color); }
.topic-ready-tag { display: inline-block; margin: 7px 0 2px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb,var(--topic-color) 12%,white); color: var(--topic-color); font-size: 11px; font-weight: 900; }
.problem-screen .signs-card,.problem-screen .factors-card { border-top-color: var(--topic-color); }
.problem-screen .solution-card { border-top-color: var(--topic-color); }
@media (max-width: 640px) { .intro-departments { grid-template-columns: 1fr; } .intro-department { min-height: 86px; } }
@media (prefers-reduced-motion: reduce) { .intro-stage,.intro-logo,.intro-emblem-ring,.intro-emblem-glow,.intro-wordmark,.intro-tone-button.is-playing { animation: none !important; } }

.intro-stage [hidden] { display: none !important; }
.intro-enter-button { cursor: pointer; min-height: 58px; padding-inline: clamp(24px,5vw,50px); font-size: clamp(18px,3.2vw,24px); transition: transform .2s ease, box-shadow .2s ease; }
.intro-enter-button:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(34,60,85,.14); }
.intro-enter-button:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }

.topic-index-heading { margin: 22px 0 12px; color: var(--navy); }
.topic-index-heading h2 { margin: 0; font-size: clamp(20px,3vw,26px); }
.topic-index-heading p { max-width: 760px; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.topic-index-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.topic-index-card { min-width: 0; display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 8px 12px; padding: 14px; border: 1px solid color-mix(in srgb,var(--topic-color) 25%,white); border-inline-start: 5px solid var(--topic-color); border-radius: 18px; background: linear-gradient(120deg,#fff,color-mix(in srgb,var(--topic-color) 8%,white)); box-shadow: 0 7px 19px rgba(34,60,85,.06); }
.topic-index-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb,var(--topic-color) 14%,white); color: var(--topic-color); font-weight: 900; }
.topic-index-copy { min-width: 0; }
.topic-index-position { color: var(--topic-color); font-size: 11px; font-weight: 800; }
.topic-index-copy h2 { margin: 1px 0 2px; color: var(--navy); font-size: 17px; line-height: 1.4; }
.topic-index-copy p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.topic-index-open { grid-column: 2; justify-self: start; min-height: 37px; padding: 6px 12px; font-size: 12px; }
@media (max-width:760px) { .topic-index-grid { grid-template-columns: 1fr; } }
@media (max-width:640px) { .topic-index-card { padding: 12px; } .topic-index-copy h2 { font-size: 16px; } }
