:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --ink: #263b36;
  --moss: #2b6254;
  --muted: #60706a;
  --line: #dce1d9;
  --apricot: #dda16a;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: #dce8dc; color: var(--ink); }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 6px; border-radius: 4px; }
.container { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.eyebrow { color: var(--moss); font: 500 11px/1.5 var(--mono); letter-spacing: .11em; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 10px 20px; background: var(--moss); color: #fff; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* 導覽 */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; font-size: 19px; font-weight: 700; letter-spacing: -.035em; }
.brand-mark { width: 38px; height: 38px; display: block; flex-shrink: 0; object-fit: contain; border-radius: 6px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; color: var(--muted); transition: color 160ms ease; }
.site-nav a:hover { color: var(--moss); }
.site-nav .nav-admin { color: var(--moss); font-weight: 600; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.32fr 1fr; align-items: center; gap: 36px; padding-top: 94px; padding-bottom: 104px; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 23px; }
.small-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); }
.hero-name { font-size: 23px; font-weight: 650; letter-spacing: -.04em; margin-bottom: 14px; }
h1 { font-size: clamp(34px, 4.1vw, 54px); line-height: 1.42; font-weight: 750; letter-spacing: -.045em; }
.ink-underline { color: var(--moss); position: relative; white-space: nowrap; isolation: isolate; }
.ink-underline::after { content: ""; position: absolute; z-index: -1; left: 1px; right: 4px; bottom: 3px; height: 10px; border-radius: 50% 40% 45% 30%; background: #e3b891; opacity: .45; transform: rotate(-2deg); }
.brand-spirit { font: 400 13px/1.9 var(--mono); letter-spacing: -.01em; color: var(--moss); margin-top: 20px; }
.hero-intro { max-width: 530px; margin-top: 23px; color: var(--muted); font-size: 15px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 48px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; transition: background 160ms ease, border-color 160ms ease; }
.button span { font-size: 18px; line-height: 1; }
.button-primary { background: var(--moss); color: #fff; }
.button-primary:hover { background: #234f44; }
.button-secondary { border-color: #cbd4ca; color: var(--moss); background: transparent; }
.button-secondary:hover { background: #edf0e8; border-color: var(--moss); }
.hero-art { position: relative; align-self: center; margin-top: 28px; }
.hero-art img { width: 100%; }
.hero-art figcaption { color: var(--muted); font: 400 11px/1.8 var(--mono); text-align: center; margin-top: 10px; }
.hero-art figcaption span { color: var(--apricot); margin-right: 5px; }

/* 區塊與實驗筆記 */
.section { padding-top: 68px; padding-bottom: 74px; border-top: 1px solid var(--line); }
.section-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 34px; }
.section-number { color: var(--moss); font: 400 12px/1.5 var(--mono); }
.section-label h2 { font-size: 14px; line-height: 1.7; font-weight: 600; letter-spacing: .01em; }
.section-lead { font-size: clamp(24px, 2.7vw, 31px); font-weight: 650; letter-spacing: -.035em; line-height: 1.65; text-wrap: balance; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 92px; align-items: start; }
.about-question { display: block; text-wrap: balance; }
.about-copy > p:not(.section-lead) { font-size: 14px; color: var(--muted); line-height: 1.95; margin-top: 24px; }
.about-copy .about-closing { margin-top: 20px; }
.about-closing strong { font-weight: 500; color: var(--ink); }
.process-note { padding: 22px 27px 20px; border: 1px solid var(--line); border-radius: 3px 15px 15px 3px; background: #fdfcf9; position: relative; box-shadow: 5px 5px 0 #edf0e8; }
.process-note::before { content: ""; position: absolute; top: -12px; right: 47px; width: 82px; height: 25px; background: #eacfb0; opacity: .58; transform: rotate(5deg); }
.note-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.note-scribble { font-size: 25px; color: var(--moss); line-height: 1; }
.process-list { list-style: none; padding: 10px 0 0; margin: 0; }
.process-list li { min-height: 44px; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.step-number { font: 400 10px/1.5 var(--mono); color: var(--moss); }
.step-note { margin-left: auto; color: var(--muted); font-size: 10px; }

/* 三張作品卡 */
.section-heading-row { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 30px; }
.section-side-note { color: var(--muted); font-size: 12px; line-height: 1.8; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project-card { overflow: hidden; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease; }
.project-card:hover, .project-card:focus-within { border-color: #adbfb3; box-shadow: 0 8px 20px #263b3608; }
.project-visual { position: relative; height: 182px; padding-top: 24px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.project-visual svg { width: 100%; height: 160px; }
.project-index { position: absolute; top: 16px; left: 21px; font: 400 9px/1.5 var(--mono); letter-spacing: .1em; opacity: .7; }
.project-learning .project-visual { background: #eaf0e7; color: #55725a; }
.project-data .project-visual { background: #eaf0ef; color: #527472; }
.project-play .project-visual { background: #f6eee3; color: #927044; }
.project-language .project-visual { background: #e9f0f3; color: #567484; }
.project-storyverse .project-visual { background: #eeeaf2; color: #715e83; }
.project-history .project-visual { background: #f2ece1; color: #8b7048; }
.project-body { flex: 1; display: flex; flex-direction: column; padding: 23px 22px 19px; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 14px; }
.project-type { font: 400 10px/1.6 var(--mono); color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 4px; padding: 3px 6px; font: 400 9px/1.5 var(--mono); }
.status-live { color: #315b3b; background: #e9f1e6; }
.status-live span { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-mvp { color: #40675f; background: #edf3f0; }
.status-experiment { color: #806033; background: #f6eddf; }
.status-login { color: #806033; background: #f6eddf; }
.project-card h3 { font-size: 23px; font-weight: 650; letter-spacing: -.025em; line-height: 1.4; margin-bottom: 12px; }
.project-description { font-size: 13px; color: var(--muted); line-height: 1.9; margin-bottom: 24px; }
.project-link { min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 11px; border-top: 1px solid #edf0eb; font-size: 12px; font-weight: 600; color: var(--moss); }
.project-link span { font-size: 19px; font-weight: 400; transition: transform 160ms ease; }
.project-link:hover span { transform: translate(2px, -2px); }

/* 常用連結 */
.shortcuts { scroll-margin-top: 24px; }
.shortcuts-heading-row { align-items: end; }
.shortcuts-intro { max-width: 610px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.shortcuts-admin-link { flex: 0 0 auto; }
.shortcuts-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto minmax(150px, .45fr); align-items: center; gap: 10px 12px; margin-bottom: 22px; }
.shortcut-search-label, .shortcut-category-label { color: var(--muted); font: 500 11px/1.5 var(--mono); }
.shortcut-search, .shortcut-category { min-height: 44px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.shortcut-search:focus, .shortcut-category:focus { border-color: var(--moss); outline: 3px solid #2b625433; outline-offset: 2px; }
.shortcut-list { min-height: 78px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shortcut-card { min-width: 0; display: flex; align-items: flex-start; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.shortcut-card:hover, .shortcut-card:focus-within { border-color: #adbfb3; box-shadow: 0 6px 14px #263b360b; transform: translateY(-2px); }
.shortcut-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 10px; background: #eaf0e7; color: var(--moss); font: 600 18px/1 var(--mono); }
.shortcut-icon.has-icon { background: #f6eee3; color: #806033; font-family: var(--sans); }
.shortcut-content { min-width: 0; flex: 1; }
.shortcut-topline { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.shortcut-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; }
.shortcut-pin { color: var(--apricot); font-size: 13px; }
.shortcut-description { display: -webkit-box; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.shortcut-category-tag { display: inline-flex; max-width: 100%; margin-top: 8px; padding: 3px 6px; border-radius: 4px; background: #edf3f0; color: var(--moss); font: 400 10px/1.5 var(--mono); }
.shortcut-url { display: block; overflow: hidden; margin-top: 7px; color: var(--muted); font: 400 10px/1.5 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.shortcut-state { padding: 19px; border: 1px dashed #cbd4ca; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.shortcut-state.error { color: #806033; background: #fdf8f1; border-color: #e7cba7; }

/* 尚在實驗中的空間 */
.experiments { border-top: 0; padding-top: 10px; padding-bottom: 82px; }
.experiment-note { background: #ecf0e8; border: 1px solid #dbe2d5; border-radius: 16px; padding: 35px 42px 40px; }
.experiment-note .section-label { margin-bottom: 24px; }
.experiment-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 95px; align-items: center; }
.experiment-description { font-size: 13px; color: var(--muted); line-height: 1.95; margin-top: 18px; max-width: 460px; }
.experiment-quote { margin-top: 18px; font: 400 12px/1.8 var(--mono); color: var(--moss); }
.experiment-path > .eyebrow { margin-bottom: 20px; font-size: 10px; }
.current-experiment { margin-bottom: 24px; padding: 15px 17px; border: 1px solid #cbd8c8; border-radius: 10px; background: #f8faf5; }
.current-experiment .eyebrow { margin-bottom: 7px; }
.current-experiment h3 { font-size: 16px; line-height: 1.5; }
.current-experiment p:not(.eyebrow) { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.experiment-stages { list-style: none; margin: 0; padding: 0; }
.experiment-stages li { position: relative; min-height: 49px; display: grid; grid-template-columns: 12px minmax(86px, 1fr) auto; align-items: center; gap: 17px; }
.experiment-stages li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: calc(50% + 9px); bottom: -15px; border-left: 1px dashed #b8c6b4; }
.stage-dot { width: 11px; height: 11px; border-radius: 50%; position: relative; z-index: 1; }
.stage-idea { border: 1px solid #7b8e70; background: #ecf0e8; }
.stage-prototype { background: #dae3cc; border: 1px solid #9ead8d; }
.stage-mvp { background: #a5b49a; border: 1px solid #93a485; }
.stage-live { background: var(--moss); }
.experiment-stages strong { font: 500 13px/1.5 var(--mono); }
.experiment-stages li > span:last-child { font-size: 11px; color: var(--muted); }

/* 頁尾 */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 32px 38px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.footer-brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 650; letter-spacing: -.03em; }
.footer-inner p { color: var(--muted); font: 400 10px/1.8 var(--mono); }
.footer-signature { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.footer-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--apricot); }

@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
  .hero { gap: 22px; padding-block: 74px 80px; }
  .about-grid { gap: 44px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experiment-grid { gap: 45px; }
  .project-card h3 { font-size: 22px; }
  .shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .header-inner { min-height: 102px; flex-direction: column; justify-content: center; gap: 0; padding-block: 12px 5px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .site-nav { gap: 16px 22px; justify-content: center; }
  .site-nav a { font-size: 14px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; padding-bottom: 49px; }
  .hero .eyebrow { font-size: 10px; margin-bottom: 20px; }
  .hero-name { font-size: 20px; margin-bottom: 13px; }
  h1 { font-size: clamp(30px, 7.9vw, 44px); line-height: 1.5; }
  .brand-spirit { font-size: 11px; margin-top: 16px; }
  .hero-intro { font-size: 14px; margin-top: 20px; }
  .hero-actions { gap: 9px; margin-top: 24px; }
  .button { padding-inline: 13px; gap: 14px; font-size: 11px; }
  .hero-art { width: min(330px, 85%); margin: 0 auto; }
  .hero-art figcaption { margin-top: 0; font-size: 10px; }
  .section { padding-top: 44px; padding-bottom: 46px; }
  .section-label { gap: 12px; margin-bottom: 24px; }
  .section-label h2 { font-size: 13px; }
  .about-grid { grid-template-columns: 1fr; gap: 31px; }
  .section-lead { font-size: 25px; line-height: 1.6; }
  .desktop-break { display: none; }
  .about-copy > p:not(.section-lead) { margin-top: 20px; }
  .process-note { padding-inline: 22px; }
  .section-heading-row { flex-direction: column; align-items: start; gap: 12px; margin-bottom: 25px; }
  .section-side-note br { display: none; }
  .section-side-note { font-size: 12px; }
  .project-grid { grid-template-columns: 1fr; gap: 22px; }
  .project-visual { height: 160px; }
  .project-visual svg { height: 140px; }
  .project-body { padding: 21px 22px 16px; }
  .project-description { margin-bottom: 22px; }
  .project-card h3 { font-size: 24px; }
  .project-meta { margin-bottom: 13px; }
  .project-type { font-size: 12px; }
  .status { font-size: 11px; }
  .shortcuts-heading-row { gap: 16px; }
  .shortcuts-intro { font-size: 13px; }
  .shortcuts-admin-link { width: 100%; }
  .shortcuts-toolbar { grid-template-columns: 1fr; gap: 6px; margin-bottom: 18px; }
  .shortcut-search-label, .shortcut-category-label { margin-top: 4px; font-size: 12px; }
  .shortcut-grid { grid-template-columns: 1fr; gap: 11px; }
  .shortcut-card { min-height: 88px; padding: 14px; }
  .shortcut-name { font-size: 16px; }
  .shortcut-description { font-size: 13px; }
  .experiments { padding-top: 2px; padding-bottom: 48px; }
  .experiment-note { padding: 27px 22px 28px; }
  .experiment-note .section-label { gap: 10px; }
  .experiment-note .section-label h2 { font-size: 12px; }
  .experiment-grid { grid-template-columns: 1fr; gap: 29px; }
  .experiment-description { font-size: 13px; }
  .experiment-path > .eyebrow { margin-bottom: 12px; }
  .experiment-stages li { gap: 13px; }
  .experiment-stages strong { font-size: 12px; }
  .experiment-stages li > span:last-child { font-size: 10px; }
  .footer-inner { flex-direction: column; align-items: start; gap: 16px; padding-block: 22px 30px; }
  .footer-inner p { font-size: 10px; }
}

/* V1.2：個人敘事、閱讀與搜尋 */
[hidden] { display: none !important; }
button, input, select { font: inherit; }
.site-nav { align-items: center; gap: 22px; }
.search-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 6px 12px; background: transparent; border: 1px solid #cbd4ca; border-radius: 8px; color: var(--moss); font-size: 13px; cursor: pointer; }
kbd { font: 11px/1.4 var(--mono); color: var(--muted); }
.personal-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.personal-topics span, .topic-tag { padding: 4px 10px; background: #eaf0e7; border-radius: 4px; color: var(--moss); font-size: 12px; }
.project-story { margin: -8px 0 16px; color: var(--muted); font-size: 13px; }
.project-story summary { cursor: pointer; min-height: 44px; padding-block: 10px; color: var(--moss); font-weight: 600; }
.project-story p { margin-bottom: 10px; line-height: 1.9; }
.notebook .section-side-note { margin-top: 10px; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; color: var(--moss); font-size: 14px; font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.note-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 4px 14px 14px 4px; background: #fdfcf9; transition: border-color 160ms ease, transform 160ms ease; }
.note-card:hover { border-color: var(--moss); transform: translateY(-3px); }
.note-card h3 { margin-block: 20px 12px; font-size: 22px; line-height: 1.6; letter-spacing: -.03em; }
.note-card p { margin-bottom: 30px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.note-card-end { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--moss); }
.resource-strip { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 30px 36px; margin-bottom: 64px; border: 1px solid #dbe2d5; border-radius: 14px; background: #ecf0e8; }
.resource-strip h2 { font-size: 25px; margin-block: 10px; letter-spacing: -.035em; }
.resource-strip p:not(.eyebrow) { font-size: 14px; color: var(--muted); }
.resource-strip .button { flex-shrink: 0; }
.lab-timeline { list-style: none; margin: 14px 0 0; padding: 0; }
.lab-timeline li { display: grid; gap: 4px; padding-block: 10px; border-top: 1px solid var(--line); }
.lab-timeline time { font: 11px/1.7 var(--mono); color: var(--moss); }
.lab-timeline span { font-size: 12px; color: var(--muted); }
.page-heading { padding-block: 64px 44px; max-width: 780px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--moss); text-decoration: underline; text-underline-offset: 4px; }
.page-heading h1 { font-size: clamp(32px, 5vw, 48px); margin-block: 14px 20px; }
.page-intro { color: var(--muted); font-size: 17px; line-height: 1.9; }
.library-main { padding-bottom: 80px; }
.library-main .note-grid { padding-bottom: 50px; }
.library-footnote { padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.library-footnote a { color: var(--moss); text-decoration: underline; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.resource-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.resource-card h2 { font-size: 24px; margin-block: 16px 12px; }
.resource-card p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 18px; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(180px, 1fr); gap: 64px; align-items: start; padding-bottom: 70px; }
.reading-content { font-size: 17px; line-height: 2; overflow-wrap: anywhere; }
.reading-content h2 { font-size: 25px; line-height: 1.6; margin: 36px 0 14px; letter-spacing: -.025em; }
.reading-content p { margin-bottom: 20px; }
.reading-content ol { padding-left: 26px; }
.reading-content li { padding-left: 5px; margin-bottom: 12px; }
.reading-content blockquote { margin: 30px 0; padding: 16px 24px; border-left: 3px solid var(--moss); background: #ecf0e8; color: var(--moss); }
.reading-content blockquote p { margin: 0; }
.reading-meta { margin-top: 22px; color: var(--muted); font: 12px/1.8 var(--mono); }
.reading-aside { position: sticky; top: 30px; border-top: 2px solid var(--moss); padding-top: 20px; }
.reading-aside p { color: var(--muted); font-size: 13px; margin-block: 14px; }
.reading-aside a { display: block; min-height: 44px; padding-block: 10px; font-size: 13px; color: var(--moss); }
.reading-next { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 32px; border-top: 1px solid var(--line); margin-top: 40px; }
.search-dialog { width: min(620px, calc(100% - 28px)); max-height: min(720px, calc(100dvh - 48px)); margin: 8vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 100px #16392b33; overflow: auto; }
.search-dialog::backdrop { background: #20392f80; backdrop-filter: blur(4px); }
.search-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 10px; }
.search-dialog h2 { font-size: 18px; }
.search-close { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--moss); cursor: pointer; font-size: 13px; }
.search-field { padding: 0 22px; }
.search-field label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.search-field input { width: 100%; min-height: 50px; padding: 12px; border: 1px solid #b2c3b7; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 16px; }
.search-status { padding: 14px 22px 4px; font-size: 12px; color: var(--muted); }
.search-results { list-style: none; margin: 0; padding: 10px 12px 16px; }
.search-results a { display: block; min-height: 60px; padding: 12px; border-radius: 8px; }
.search-results a:hover, .search-results a:focus-visible { background: #e7eee3; }
.search-result-top { display: flex; align-items: baseline; gap: 12px; }
.search-result-top strong { font-size: 15px; }
.search-result-kind { color: var(--moss); font-size: 11px; flex-shrink: 0; }
.search-results p { margin-top: 3px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.search-fallback { display: flex; flex-wrap: wrap; gap: 20px; padding: 10px 22px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.search-fallback a { display: inline-flex; align-items: center; min-height: 44px; color: var(--moss); }
body.search-open { overflow: hidden; }
@media (max-width: 1050px) {
  .header-inner { gap: 16px; }
  .site-nav { gap: 14px; }
  .note-grid { grid-template-columns: 1fr; }
  .note-card { padding: 24px; }
  .note-card h3 { margin-top: 12px; }
  .note-card p { margin-bottom: 20px; }
  .reading-layout { gap: 36px; grid-template-columns: minmax(0, 1fr) 180px; }
}
@media (max-width: 760px) {
  .header-inner { gap: 8px; padding-block: 14px; }
  .site-nav { gap: 0 16px; }
  .site-nav a { font-size: 13px; }
  .search-trigger { padding-inline: 10px; font-size: 13px; }
  .search-trigger kbd { display: none; }
  .hero-actions .button { font-size: 13px; }
  .resource-strip { flex-direction: column; align-items: start; gap: 22px; padding: 26px 22px; margin-bottom: 44px; }
  .resource-strip h2 { font-size: 23px; }
  .resource-strip .button { width: 100%; font-size: 13px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { padding: 24px; }
  .page-heading { padding-top: 36px; padding-bottom: 30px; }
  .page-intro { font-size: 16px; }
  .reading-layout { grid-template-columns: 1fr; gap: 30px; }
  .reading-aside { position: static; }
  .reading-content { font-size: 16px; }
  .reading-content h2 { font-size: 23px; }
  .search-dialog { margin-top: 20px; }
  .reading-next .button { font-size: 13px; }
}

/* 尊重減少動態與列印需求，不加入網站執行期套件。 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { background: #fff; }
  .container { width: 100%; }
  .site-nav, .hero-actions, .hero-art, .skip-link { display: none; }
  .hero { display: block; padding-block: 20px; }
  .section { padding-block: 24px; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-card, .process-note, .experiment-note { break-inside: avoid; box-shadow: none; }
  .footer-inner { padding-block: 20px; }
}
