:root {
  color-scheme: light;
  --ink: #153d38;
  --muted: #637a76;
  --brand: #215f57;
  --brand-dark: #174b45;
  --mint: #dcefe8;
  --cream: #f7f3e9;
  --paper: #fffefa;
  --line: #d9e2df;
  --accent: #e9965d;
  --danger: #9f3c38;
  --shadow: 0 18px 60px rgba(29, 79, 71, .13);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif; line-height: 1.7; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.site-header { height: 72px; max-width: 1120px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .03em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 50% 50% 48% 52% / 45% 52% 48% 55%; }
.local-badge { font-size: 12px; color: var(--brand); background: var(--mint); padding: 6px 12px; border-radius: 99px; }
main { min-height: calc(100vh - 200px); }
.screen { max-width: 1020px; margin: 0 auto; padding: 72px 32px 96px; }
.hero { position: relative; min-height: 680px; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -110px; top: 25px; background: var(--mint); border-radius: 44% 56% 62% 38% / 45% 39% 61% 55%; z-index: -1; }
.eyebrow { margin: 0 0 12px; color: var(--brand); font-weight: 800; font-size: 13px; letter-spacing: .12em; }
h1 { max-width: 660px; margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(40px, 6vw, 68px); line-height: 1.25; letter-spacing: .02em; }
h1 em { color: var(--brand); font-style: normal; background: linear-gradient(transparent 72%, rgba(233,150,93,.34) 72%); }
.lead { max-width: 570px; margin: 28px 0 20px; color: #425d59; font-size: 17px; }
.trust-row { display: flex; gap: 16px; margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.trust-row span::before { content: "✓"; color: var(--brand); margin-right: 5px; font-weight: 800; }
.primary-button { border: 0; border-radius: 12px; padding: 15px 22px; color: white; background: var(--brand); font-weight: 800; box-shadow: 0 8px 20px rgba(33,95,87,.2); transition: transform .18s, background .18s; }
.primary-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary-button { margin-left: 10px; border: 1px solid var(--brand); border-radius: 12px; padding: 14px 20px; color: var(--brand); background: transparent; font-weight: 800; }
.secondary-button:disabled { opacity: .65; cursor: default; }
.microcopy { color: var(--muted); font-size: 12px; }
.hero-card { position: absolute; right: 18px; top: 170px; width: 340px; padding: 23px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); transform: rotate(2deg); }
.card-top { display: flex; gap: 6px; margin-bottom: 24px; }
.card-top span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mock-title { font-weight: 800; margin-bottom: 14px; }
.mock-item { display: flex; gap: 10px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mock-item i { width: 21px; height: 21px; display: grid; place-items: center; border: 2px solid #afc0bc; border-radius: 6px; font-style: normal; }
.mock-item.done { color: var(--muted); text-decoration: line-through; }
.mock-item.done i { background: var(--brand); border-color: var(--brand); color: white; }
.panel { max-width: 760px; margin-top: 42px; margin-bottom: 96px; padding: 42px; background: var(--paper); border: 1px solid rgba(33,95,87,.1); border-radius: 24px; box-shadow: var(--shadow); }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.progress-track { height: 6px; margin: 9px 0 38px; border-radius: 99px; background: var(--line); overflow: hidden; }
#progress-bar { height: 100%; width: 25%; background: var(--accent); border-radius: inherit; transition: width .25s; }
h2 { margin: 0 0 26px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(28px, 5vw, 40px); line-height: 1.4; }
.options { display: grid; gap: 12px; }
.course-grid { display: grid; gap: 14px; }
.course-card { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; text-align: left; transition: border .15s, transform .15s, background .15s; }
.course-card:hover { border-color: var(--brand); background: #f0f8f5; transform: translateY(-1px); }
.course-card strong, .course-card small { display: block; }
.course-card strong { font-size: 18px; }
.course-card small { margin-top: 2px; color: var(--muted); }
.course-card b { font-size: 22px; color: var(--brand); }
.course-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--brand); font-family: "Yu Mincho", serif; font-size: 20px; font-weight: 700; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; transition: border .15s, background .15s; }
.option:hover, .option.selected { border-color: var(--brand); background: #f0f8f5; }
.option-dot { width: 20px; height: 20px; border: 2px solid #a7b9b5; border-radius: 50%; flex: 0 0 auto; }
.option.selected .option-dot { border: 6px solid var(--brand); }
.form-actions, .result-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.text-button { border: 0; color: var(--muted); background: transparent; padding: 10px; }
.result { max-width: 860px; }
.result-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.score { min-width: 95px; padding: 12px; border-radius: 14px; background: var(--mint); text-align: center; }
.score strong { display: block; font-size: 28px; line-height: 1.2; }
.score span { font-size: 12px; color: var(--muted); }
.result-note { margin: -10px 0 28px; color: var(--muted); }
.share-sheet { margin: 22px 0 32px; padding: 20px; border: 1px dashed #9bb3ad; border-radius: 16px; background: #f6fbf9; }
.share-sheet h3 { margin: 3px 0 16px; }
.sheet-label { color: var(--brand); font-size: 12px; font-weight: 800; }
.share-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.share-fields label { font-size: 12px; color: var(--muted); font-weight: 700; }
.share-fields label.wide { grid-column: 1 / -1; }
.share-fields input { display: block; width: 100%; margin-top: 5px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; }
.question-bank { margin-top: 32px; padding: 22px; border-radius: 16px; background: var(--mint); }
.question-bank h3 { margin: 0 0 12px; }
.question-bank li { margin: 8px 0; }
.check-group { margin: 24px 0; }
.check-group h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 16px; }
.group-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--brand); font-size: 12px; }
.check-item { display: flex; gap: 13px; padding: 15px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-item input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); }
.check-item small { display: block; color: var(--muted); margin-top: 3px; }
.check-item:has(input:checked) { color: var(--muted); background: #f6f8f7; }
.check-item:has(input:checked) .item-title { text-decoration: line-through; }
.danger { color: var(--danger); }
.emergency-note { display: flex; gap: 15px; margin-top: 32px; padding: 17px; border-left: 4px solid var(--accent); background: #fff7f0; font-size: 13px; }
.emergency-note strong { white-space: nowrap; }
.premium-section { max-width: 1020px; margin: 24px auto 90px; padding: 46px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 42px; align-items: center; border-radius: 28px; color: #eaf4f1; background: var(--ink); }
.premium-section h2 { color: white; }
.premium-section .eyebrow { color: #a9d7cb; }
.premium-card { padding: 25px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.08); }
.premium-card strong { display: block; color: white; font-size: 36px; line-height: 1.2; }
.premium-card .price-label, .premium-card > span { color: #bfd6d1; font-size: 12px; }
.premium-card ul { padding-left: 20px; }
.premium-card .secondary-button { margin: 8px 0 0; color: white; border-color: #87bbb0; }
.footer-nav { display: flex; justify-content: center; gap: 20px; }
.footer-nav a, footer a { color: #dce8e5; }
.legal-page { max-width: 800px; margin: 30px auto 90px; padding: 52px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.legal-page h1 { font-size: clamp(34px, 6vw, 52px); }
.legal-page h2 { margin: 38px 0 10px; font-family: inherit; font-size: 20px; }
.legal-page a { color: var(--brand); }
.purchase-note { margin: 12px 0 0; color: #bfd6d1; font-size: 11px; line-height: 1.6; }
.purchase-note a { color: white; }
.restore-link { margin: 10px 0 0; font-size: 12px; }
.restore-link a { color: white; font-weight: 700; }
.restore-form { display: grid; gap: 12px; max-width: 520px; margin-top: 24px; }
.restore-form label { font-weight: 700; }
.restore-form input { width: 100%; box-sizing: border-box; border: 1px solid #c9d7d3; border-radius: 10px; padding: 13px; font: inherit; }
.commercial-list { margin: 30px 0; border-top: 1px solid var(--line); }
.commercial-list > div { padding: 17px 0; display: grid; grid-template-columns: 190px 1fr; gap: 22px; border-bottom: 1px solid var(--line); }
.commercial-list dt { color: var(--brand); font-weight: 800; }
.commercial-list dd { margin: 0; }
footer { padding: 36px 24px; background: var(--ink); color: #dce8e5; text-align: center; font-size: 12px; }
footer p { max-width: 740px; margin: 8px auto; }
.premium-app-body { min-width: 320px; background: #eef3f1; }
.premium-header { min-height: 68px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.premium-header-actions { display: flex; align-items: center; gap: 8px; }
.preview-badge { margin-right: 6px; padding: 5px 10px; color: var(--brand); background: var(--mint); border-radius: 99px; font-size: 11px; font-weight: 800; }
.header-button, .small-button, .icon-button { border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: white; font-weight: 800; }
.header-button { padding: 8px 12px; font-size: 12px; }
.premium-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.people-sidebar { padding: 24px 16px; background: var(--ink); color: white; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 18px; font-weight: 800; }
.sidebar-heading button { width: 32px; height: 32px; border: 1px solid #51736e; border-radius: 9px; color: white; background: transparent; font-size: 19px; }
.people-list { display: grid; gap: 7px; }
.person-tab { width: 100%; padding: 11px; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; border: 0; border-radius: 11px; color: #dce8e5; background: transparent; text-align: left; }
.person-tab:hover, .person-tab.active { color: var(--ink); background: var(--mint); }
.person-tab > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-weight: 800; }
.person-tab strong, .person-tab small { display: block; }
.person-tab small { opacity: .72; font-size: 10px; }
.no-people, .storage-note { color: #a9bcb8; font-size: 11px; }
.storage-note { margin: 24px 6px; }
.care-workspace { min-width: 0; padding: 42px clamp(20px, 4vw, 62px) 72px; }
.workspace-empty { max-width: 500px; margin: 15vh auto; text-align: center; }
.workspace-empty h1, .workspace-top h1 { font-size: clamp(28px, 4vw, 46px); }
.workspace-empty p { color: var(--muted); }
.empty-symbol { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 22px; color: var(--brand); background: var(--mint); font-size: 34px; }
.workspace-top { margin-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.workspace-top .eyebrow, .section-title .eyebrow { margin-bottom: 3px; }
.updated-label { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.workspace-actions { display: flex; gap: 8px; }
.workspace-actions .secondary-button { margin: 0; padding: 10px 13px; background: white; font-size: 12px; }
.icon-button { padding: 9px 13px; }
.summary-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-card, .workspace-card { border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 8px 30px rgba(29,79,71,.07); }
.summary-card { padding: 19px; }
.summary-card > span, .summary-card small { display: block; color: var(--muted); font-size: 11px; }
.summary-card strong { margin-right: 3px; font-size: 25px; }
.accent-card { background: var(--mint); }
.workspace-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.workspace-card { padding: 24px; }
.section-title { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title h2 { margin: 0; font-family: inherit; font-size: 21px; }
.section-title > span { color: var(--muted); font-size: 11px; }
.small-button { padding: 8px 11px; font-size: 11px; }
.task-list { display: grid; gap: 8px; }
.premium-task { padding: 11px; display: grid; grid-template-columns: auto 74px 1fr auto; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 11px; }
.premium-task input, .premium-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.premium-task small { display: block; color: var(--muted); font-size: 10px; }
.premium-task button { border: 0; color: #9aa9a6; background: transparent; }
.premium-task.done { opacity: .55; }
.premium-task.done strong { text-decoration: line-through; }
.premium-task.overdue .task-date { color: var(--danger); font-weight: 800; }
.task-date { font-size: 11px; }
.empty-list { padding: 24px 8px; color: var(--muted); font-size: 12px; text-align: center; }
.note-panel label { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; font-weight: 800; }
.note-panel textarea { width: 100%; margin-top: 4px; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fbfcfb; font: inherit; font-size: 13px; line-height: 1.6; }
.quick-checks { margin-top: 18px; }
.premium-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.premium-check { padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.premium-check:has(input:checked) { color: var(--muted); background: #f3f6f5; text-decoration: line-through; }
.app-dialog { width: min(480px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: var(--shadow); }
.app-dialog::backdrop { background: rgba(15,42,38,.55); }
.app-dialog form { padding: 25px; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dialog-heading h2 { margin: 0; font-family: inherit; font-size: 23px; }
.dialog-close { border: 0; color: var(--muted); background: transparent; font-size: 24px; }
.app-dialog form > label { display: block; margin-top: 15px; color: var(--muted); font-size: 12px; font-weight: 800; }
.app-dialog input, .app-dialog select { width: 100%; margin-top: 5px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; }
.dialog-actions { margin-top: 24px; justify-content: flex-end; }
.dialog-actions .danger { margin-right: auto; }
@media (max-width: 820px) {
  .hero { padding-top: 48px; padding-bottom: 360px; }
  .hero::before { width: 390px; height: 390px; top: auto; bottom: 25px; right: -70px; }
  .hero-card { top: auto; right: 7%; bottom: 68px; width: min(340px, 86%); }
  .premium-shell { grid-template-columns: 1fr; }
  .people-sidebar { padding: 12px 16px; }
  .people-list { display: flex; overflow-x: auto; }
  .person-tab { min-width: 160px; }
  .storage-note { display: none; }
  .workspace-columns { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { padding: 0 16px; }
  .local-badge { font-size: 0; padding: 7px; }
  .local-badge::after { content: "端末内保存"; font-size: 11px; }
  .screen { padding-left: 18px; padding-right: 18px; }
  .panel { margin: 20px 12px 64px; padding: 28px 18px; border-radius: 18px; }
  .trust-row { flex-wrap: wrap; gap: 5px 12px; }
  .result-heading { display: block; }
  .share-fields { grid-template-columns: 1fr; }
  .share-fields label.wide { grid-column: auto; }
  .score { display: inline-flex; gap: 5px; align-items: baseline; margin-bottom: 18px; }
  .form-actions, .result-actions { gap: 10px; }
  .emergency-note { display: block; }
  .premium-section { margin: 20px 12px 64px; padding: 30px 20px; grid-template-columns: 1fr; gap: 22px; }
  .legal-page { margin: 12px 10px 60px; padding: 30px 20px; }
  .commercial-list > div { grid-template-columns: 1fr; gap: 4px; }
  .premium-header { align-items: flex-start; padding: 10px 12px; }
  .premium-header .brand > span:last-child, .preview-badge { display: none; }
  .care-workspace { padding: 28px 13px 55px; }
  .workspace-top { display: block; }
  .workspace-actions { margin-top: 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { padding: 14px; }
  .premium-checklist { grid-template-columns: 1fr; }
  .workspace-card { padding: 18px 14px; }
  .premium-task { grid-template-columns: auto 1fr auto; }
  .premium-task .task-date { grid-column: 2; grid-row: 2; }
}
@media print {
  .site-header, #intro, #course-select, #questionnaire, .result-actions, .premium-section, footer { display: none !important; }
  body { background: white; }
  #result { display: block !important; margin: 0; padding: 0; box-shadow: none; border: 0; }
  .check-item { break-inside: avoid; }
  .premium-header, .people-sidebar, .workspace-actions, .small-button, .premium-task button, .app-dialog { display: none !important; }
  .premium-shell, .workspace-columns { display: block; }
  .care-workspace { padding: 0; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace-card, .summary-card { margin-bottom: 12px; box-shadow: none; break-inside: avoid; }
}
