/* Seaside sketchbook: shared by guides, tools and generated lessons. */
:root {
  --paper: #fff;
  --paper2: #f3f8f4;
  --card: #fff;
  --ink: #29484b;
  --ink2: #526b68;
  --ink3: #637871;
  --line: #dce9e2;
  --line2: #bfd6ca;
  --shu: #cc3f63;
  --shu-soft: #fff0f3;
  --shu-deep: #b33153;
  --ai: #24797c;
  --ai-soft: #eef8f5;
  --matcha: #37745d;
  --matcha-soft: #edf8f2;
  --kin: #8c681e;
  --kin-soft: #fbf7e8;
  --murasaki: #74618d;
  --murasaki-soft: #f4f0f8;
  --rad: 8px;
  --rad-s: 8px;
  --maxw: 1440px;
  --shadow: 0 6px 24px #14445108;
  --sans: "Tabika WenKai", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --wordmark: "Tabika Kalam", var(--sans);
  --serif: var(--sans);
  --ui: "PingFang SC", "Hiragino Sans", "Microsoft YaHei", system-ui, sans-serif;
}
[data-theme="dark"] {
  --paper: #142428;
  --paper2: #1c3035;
  --card: #192c30;
  --ink: #edf7f6;
  --ink2: #b7cccf;
  --ink3: #9bb5bb;
  --line: #30494e;
  --line2: #47636a;
  --shu: #ff91a9;
  --shu-soft: #3b2831;
  --shu-deep: #ffabc0;
  --ai: #80d6e1;
  --ai-soft: #1b3940;
  --matcha: #9cdbbf;
  --matcha-soft: #213c32;
}
body { font-size: 17px; line-height: 1.85; }
body, h1, h2, h3, h4, p, a, button, input, select, textarea, small, span, rt, .kicker, .roma, .tbl th { letter-spacing: 0; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.45; }
a { color: var(--ai); }
a:hover { color: var(--shu-deep); }
button, input, select, textarea { max-width: 100%; }
img { display: block; }
:focus-visible { outline-color: var(--ai); outline-width: 2px; }
.wrap { max-width: var(--maxw); padding: 0 80px; }
main { padding-bottom: 64px; }
section { margin: 60px 0; }
[id] { scroll-margin-top: 176px; }

#hdr {
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #dce9e2a6;
  border-radius: 0;
  background: #ffffffec;
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hdr-in { max-width: 1440px; height: 72px; padding: 0 80px; gap: 24px; }
.logo { color: #157e86 !important; gap: 8px; }
.logo b { font-family: ui-rounded, "Arial Rounded MT Bold", var(--ui); font-size: 32px; letter-spacing: 0; font-weight: 750; line-height: 1.2; }
.brand-flower { color: #ff88a5; }
.brand-flower .icon { width: 30px; height: 30px; }
nav.main { margin-left: 36px; gap: 24px; }
nav.main a { font-family: var(--ui); font-size: 16px; font-weight: 600; color: var(--ink); padding: 8px 0; border-radius: 0; }
nav.main a:hover, nav.main a.on { color: var(--ai); background: none; }
nav.main a.on::after { display: block; left: 0; right: 0; bottom: 0; background: var(--ai); }
.header-youtube { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.header-youtube .icon { color: #ed2639; width: 23px; height: 23px; }
.header-search { width: 42px; height: 42px; justify-content: center; padding: 10px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; }
.header-search span, .header-search kbd { display: none; }
.header-search .icon { width: 22px; height: 22px; color: var(--ink); }
.icon-button { width: 40px; height: 40px; padding: 9px; border-radius: 8px; }
.study-toolbar { position: sticky; top: 72px; z-index: 35; max-width: 1440px; margin: 0 auto; padding: 0 80px; background: var(--paper); }
.study-toolbar-in { min-height: 64px; padding: 12px 0; gap: 20px; }
.study-toolbar nav { gap: 20px; min-width: 0; }
.study-toolbar nav a { font-size: 13px; padding: 4px 0; }
.study-toolbar nav a.on { color: var(--ai); }
.tgl { border-radius: 6px; background: var(--paper); padding: 6px 9px; }
.tgl[aria-pressed="true"] { background: var(--ai-soft); color: var(--ai); border-color: var(--line2); }

.page-head { position: relative; min-height: 230px; padding: 54px 340px 36px 0; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.page-head h1 { font-size: 40px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.page-head .desc { font-size: 16px; line-height: 1.9; max-width: 790px; margin: 12px 0 0; }
.page-head:not(.guide-heading)::after { content: ""; position: absolute; right: 0; top: 40px; width: 280px; height: 168px; border-radius: 8px; background: url('/assets/illustrations/sketchbook-hero.webp') 69% 50% / cover no-repeat; }
.kicker { font-size: 12px; color: var(--ai); margin-bottom: 10px; }
.sec-title { font-size: 30px; font-weight: 400; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-title::before { display: block; width: 24px; height: 24px; background: #e48aa3; border-radius: 0; mask: url('/assets/icons/flower.svg') center / contain no-repeat; -webkit-mask: url('/assets/icons/flower.svg') center / contain no-repeat; }
.sec-title small { font-size: 11px; font-weight: 400; }
.grid2, .grid3, .grid4 { gap: 24px; }
.grid2 > *, .grid3 > *, .grid4 > *, .plan-board > * { min-width: 0; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card { padding: 26px 28px; border-radius: 8px; box-shadow: none; }
.card:hover { box-shadow: none; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card .sub { font-size: 14px; line-height: 1.8; }
a.card { transition: border-color .18s, background .18s; }
a.card:hover { transform: none; background: var(--ai-soft); border-color: var(--line2); }
.btn { min-height: 44px; padding: 9px 18px; border-radius: 8px; font-size: 16px; justify-content: center; }
.btn.primary { background: var(--shu); color: #fff; border-color: var(--shu); }
.btn.primary:hover { background: var(--shu-deep); border-color: var(--shu-deep); color: #fff; }
[data-theme="dark"] .btn.primary, [data-theme="dark"] .btn.primary:hover { color: #142428; }
.chip { border-radius: 6px; padding: 7px 14px; min-height: 38px; font-size: 14px; }
.chip[aria-pressed="true"] { color: var(--ai); background: var(--ai-soft); border-color: var(--line2); }
.chips { gap: 8px; margin: 20px 0; }
.search { padding: 12px 16px; border-radius: 8px; margin: 22px 0; }
.search input { min-width: 0; }
.note, .tip, .warn { border-radius: 6px; font-size: 14px; line-height: 1.85; padding: 18px 22px; margin: 22px 0; }
.ex { background: var(--paper2); padding: 18px 22px; margin: 14px 0; border-radius: 6px; }
.ex .jp { font-size: 18px; }
.ex .cn { font-size: 14px; margin-top: 5px; }
.spk { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; color: var(--ai); }
.spk .icon { width: 18px; height: 18px; }
.tbl-wrap { max-width: 100%; margin: 22px 0; overscroll-behavior-x: contain; border-radius: 8px; }
.tbl { font-size: 16px; }
.tbl th { background: var(--paper2); font-size: 15px; padding: 14px 18px; }
.tbl td { padding: 16px 18px; line-height: 1.85; }
.tbl tr:nth-child(even) td { background: color-mix(in srgb, var(--paper2) 45%, var(--paper)); }
.tbl-wrap .tbl { min-width: 580px; }
details.acc { border-radius: 8px; margin: 14px 0; }
details.acc summary { padding: 18px 22px; font-size: 16px; flex-wrap: wrap; }
details.acc summary::after { content: ""; width: 18px; height: 18px; background: currentColor; mask: url('/assets/icons/plus.svg') center / contain no-repeat; -webkit-mask: url('/assets/icons/plus.svg') center / contain no-repeat; }
details.acc[open] summary::after { content: ""; mask-image: url('/assets/icons/minus.svg'); -webkit-mask-image: url('/assets/icons/minus.svg'); }
details.acc .acc-body { padding: 16px 22px 22px; border-top-style: solid; }
.dlg { gap: 20px; }
.dlg .bub { border-radius: 8px; max-width: 900px; padding: 16px 20px; min-width: 0; }
.dlg .bub .jp { font-size: 18px; }
.dlg .bub .cn { font-size: 14px; }
.kana-tbl { gap: 10px; }
.kana-cell { border-radius: 8px; min-height: 66px; display: flex; flex-direction: column; justify-content: center; }
.vlist { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); }
.vcard { border-radius: 8px; padding: 18px 20px 14px; }
.vcard .w { font-size: 23px; }
.vcard .cn { font-size: 14px; }
.flash-card { border-radius: 8px; min-height: 270px; }
.count-note { color: var(--ink3); margin: 12px 0 22px; }
.stat { border-radius: 8px; }
.deep-links a { padding: 13px 15px; }
.site-search { border-radius: 8px; }
.search-results a { border-radius: 6px; padding: 14px 12px; }
.search-results span { overflow-wrap: anywhere; }
.guide-heading { padding-right: 0; gap: 40px; }
.guide-heading > div { min-width: 0; }
.guide-mascot { width: 280px; height: 168px; object-fit: cover; object-position: 70% center; border-radius: 8px; }
.guide-stage { padding: 48px 0; }
.stage-grid { gap: 56px; }
.stage-title h2 { font-size: 28px; }
.stage-index { border-radius: 8px; background: var(--ai-soft); color: var(--ai); }
.stage-aside { background: none; border-radius: 0; border-left: 1px solid var(--line); padding: 0 0 0 28px; }
.stage-grid h3 { font-size: 18px; }
.stage-grid p { font-size: 15px; }
.guide-links a { font-size: 14px; padding: 15px 0; }
.route-progress { border-radius: 8px; background: var(--ai-soft); }
.route-progress progress { accent-color: var(--ai); }
.resource-item { gap: 28px; padding: 40px 0; }
.resource-item > div:last-child { min-width: 0; max-width: 960px; }
.resource-item h2 { font-size: 26px; }
.resource-item p { font-size: 15px; }
.resource-icon { width: 56px; height: 56px; border-radius: 8px; color: var(--ai); }
.resource-icon.kotomichi-logo { background: none; }
.kotomichi-logo img { width: 100%; height: 100%; object-fit: contain; }
.typing-practice { border-radius: 8px; padding: 24px; }
.check-hero > .card { padding: 0; border: 0; }
.check-hero { gap: 48px; }
.check-stat { background: var(--paper2); }
.check-stat b { color: var(--ai); }
.check-stat, .phase-chip, .task-row, .review-item { border-radius: 8px; }
.task-row { padding: 16px 18px; }
.task-link { color: var(--ai); }

#ftr { margin-top: 32px; padding: 26px 0 0; }
#ftr .wrap { max-width: 1440px; gap: 16px 24px; }
.footer-brand .logo b { font-size: 28px; }
.footer-brand p { font-size: 12px; }
#ftr .trust-links { width: auto; }
#ftr .library-links { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; gap: 12px 24px; }
#ftr nav a { font-size: 12px; }
#ftr .footer-note { margin-top: 0; }
#ftr::after { content: ""; display: block; height: 112px; margin-top: 16px; background: url('/assets/illustrations/sketchbook-footer.webp') center bottom / auto 112px no-repeat; }
[data-theme="dark"] #hdr { background: #142428ef; }
[data-theme="dark"] .header-search { background: none; }
[data-theme="dark"] .page-head::after, [data-theme="dark"] .guide-mascot { opacity: .85; }

@media (min-width: 1600px) {
  .page-head h1 { font-size: 42px; }
}
@media (max-width: 1150px) {
  .wrap, .hdr-in, .study-toolbar { padding-left: 48px; padding-right: 48px; }
  .hdr-in { height: 68px; gap: 16px; }
  .logo b { font-size: 29px; }
  nav.main { margin-left: 12px; gap: 16px; }
  nav.main a { font-size: 14px; }
  .header-youtube { font-size: 11px; }
  .study-toolbar { top: 68px; }
  .page-head { padding-right: 270px; }
  .page-head:not(.guide-heading)::after, .guide-mascot { width: 230px; height: 150px; }
  .page-head h1 { font-size: 32px; }
  .study-toolbar-in { flex-wrap: wrap; gap: 10px; }
  .study-toolbar nav { flex-basis: 100%; }
  .hdr-tools { margin-left: auto; }
}
@media (max-width: 760px) {
  .wrap, .hdr-in, .study-toolbar { padding-left: 22px; padding-right: 22px; }
  .hdr-in { height: 64px; gap: 10px; }
  #hdr { width: 100%; top: 0; margin: 0; border-radius: 0; }
  .logo b { font-size: 29px; }
  .brand-flower .icon { width: 26px; height: 26px; }
  .header-youtube { margin-left: auto; }
  .header-youtube span { display: none; }
  .header-search { margin-left: 0; border: 0; width: 36px; }
  .menu-toggle { display: inline-flex; }
  nav.main { top: 64px; left: 12px; right: 12px; margin-left: 0; border-radius: 8px; padding: 12px 18px; }
  nav.main a { padding: 12px 0; font-size: 15px; }
  nav.main a.on::after { display: none; }
  .study-toolbar { top: 64px; padding-top: 0; }
  .study-toolbar-in { gap: 6px; padding: 10px 0; }
  .study-toolbar nav { gap: 20px; }
  .study-toolbar nav a { font-size: 12px; }
  .hdr-tools .tgl { min-height: 32px; }
  .page-head, .guide-heading { min-height: 0; padding: 32px 0 28px; margin-bottom: 26px; }
  .page-head h1 { font-size: 29px; }
  .page-head .desc { font-size: 14px; line-height: 1.9; }
  .page-head:not(.guide-heading)::after { position: static; display: block; margin-top: 22px; width: 100%; height: 116px; background-position: 62% 43%; }
  .guide-mascot { display: block; width: 100%; height: 116px; margin-top: 22px; object-position: 62% 43%; }
  .guide-heading { display: block; }
  section { margin: 38px 0; }
  .sec-title { font-size: 25px; margin-bottom: 20px; }
  .grid2, .grid3, .grid4 { gap: 16px; }
  .card { padding: 20px; }
  .card h3 { font-size: 18px; }
  .tbl { font-size: 15px; }
  .tbl td { padding: 14px; }
  .tbl th { padding: 12px 14px; }
  .note, .tip, .warn, .ex { padding: 16px; }
  .dlg .bub { padding: 14px; }
  .dlg .bub .jp { font-size: 16px; }
  .dlg .who { width: 32px; height: 32px; font-size: 12px; }
  .kana-tbl { gap: 6px; }
  .kana-cell { min-height: 58px; }
  .stage-grid { grid-template-columns: 1fr; gap: 28px; }
  .stage-aside { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .stage-title h2 { font-size: 24px; }
  .resource-item { gap: 14px; padding: 30px 0; }
  .resource-icon { width: 38px; height: 38px; }
  .resource-icon .icon { width: 22px; height: 22px; }
  .resource-item h2 { font-size: 22px; }
  .resource-item p { font-size: 14px; }
  .check-hero { gap: 32px; }
  .resource-actions .btn { width: 100%; font-size: 13px; }
  .search-results a { flex-direction: column; gap: 2px; }
  #ftr { padding-top: 32px; }
  #ftr .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
  #ftr nav, #ftr .trust-links, #ftr .library-links { margin: 0; gap: 12px 20px; }
  #ftr .footer-note { margin: 0; }
  #ftr::after { height: 80px; background-size: auto 80px; }
}
