:root {
  color-scheme: light;
  --ink: #101010;
  --muted: #696969;
  --line: #e4e4e4;
  --soft: #f7f7f7;
  --white: #fff;
  --accent: #2445cf;
  --orange: #e97552;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; min-height: 100vh; background: var(--white); color: var(--ink); }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.app-shell { width: min(100%, 980px); margin: 0 auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.app-header {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) 58px; align-items: center;
  min-height: 88px; padding: 10px 22px;
  background: rgba(255,255,255,.97); border-bottom: 1px solid #ededed;
  backdrop-filter: blur(12px);
}
.round-button {
  display: grid; width: 52px; height: 52px; place-items: center;
  border: 1px solid #d6d6d6; border-radius: 50%; background: white;
  font-size: 32px; line-height: 1; cursor: pointer;
}
.back-button { font-size: 42px; padding-bottom: 5px; }
.app-title { text-align: center; }
.app-title-main { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 22px; font-weight: 650; letter-spacing: -.035em; }
.app-title-main span { font-size: 21px; }
.app-title-sub { margin-top: 3px; color: #858585; font-size: 15px; }
main { padding: 24px 26px 0; }
.bottom-guide { padding: 0 26px; }
.bottom-guide .app-header { padding: 18px 0; border-bottom: 0; }
.bottom-guide .app-title-main { flex-wrap: wrap; }
.guide-card {
  margin: 0 0 36px; padding: 20px 23px 22px;
  border: 2px solid #e2e2e2; border-radius: 28px;
  background: #f8f8f8;
}
.guide-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #707070; font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.guide-symbol { color: var(--accent); font-size: 18px; }
.flow-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.step-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 54px; padding: 10px 18px; border-radius: 17px; background: white; font-size: clamp(15px, 2vw, 20px); line-height: 1.25; white-space: nowrap; }
.step-chip b { font-weight: 800; }
.step-chip strong { font-weight: 800; }
.flow-arrow { color: #222; font-size: 23px; }
.content-view { padding: 0 0 24px; }
.list-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.eyebrow { margin: 0 0 7px; color: #777; font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.eyebrow span { color: var(--orange); font-size: 15px; margin-left: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(23px, 3.2vw, 31px); font-weight: 700; letter-spacing: -.045em; }
.path-count { flex: 0 0 auto; padding-bottom: 3px; color: #777; font-size: 12px; }
.keyword-list { display: grid; gap: 15px; }
.keyword-card {
  display: grid; grid-template-columns: 66px minmax(0, 1fr) 32px; align-items: center;
  width: 100%; min-height: 132px; padding: 20px 25px;
  border: 2px solid var(--line); border-radius: 29px; background: #fff;
  text-align: left; cursor: pointer;
  transition: border-color .14s, background .14s, transform .14s;
}
.keyword-card:hover { border-color: #bdbdbd; background: #fdfdfd; transform: translateY(-1px); }
.keyword-card:active { transform: scale(.99); }
.card-icon { display: grid; width: 48px; height: 48px; place-items: center; font-size: 34px; }
.card-copy { min-width: 0; display: grid; gap: 5px; }
.card-code { color: #696969; font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.card-title { overflow-wrap: anywhere; font-size: clamp(18px, 2.5vw, 25px); font-weight: 600; line-height: 1.18; letter-spacing: -.025em; }
.card-arrow { justify-self: end; font-size: 30px; font-weight: 400; }
.prompt-view { animation: arrive .18s ease-out; }
@keyframes arrive { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.prompt-top { display: flex; align-items: center; gap: 18px; padding: 2px 0 22px; }
.prompt-icon { display: grid; flex: 0 0 62px; width: 62px; height: 62px; place-items: center; border-radius: 20px; background: #f3f3f3; font-size: 37px; }
.prompt-code { margin: 0 0 5px; color: #696969; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.prompt-title { margin: 0; font-size: clamp(22px, 3.2vw, 31px); font-weight: 700; letter-spacing: -.04em; line-height: 1.18; }
.path-label { margin: 0 0 13px; color: #656565; font-size: 12px; font-weight: 750; letter-spacing: .055em; }
.path-label strong { color: var(--ink); }
.path-label span { color: var(--orange); padding: 0 5px; font-size: 17px; }
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-card { min-height: 165px; padding: 17px 17px 16px; border: 2px solid var(--line); border-radius: 22px; background: #fff; }
.step-card.now { border-top: 5px solid #e87453; }
.step-card.next { border-top: 5px solid #78a68e; }
.step-card.deeper { border-top: 5px solid #677caf; }
.step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.step-head h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .1em; }
.step-mark { color: #777; font-size: 17px; }
.step-card ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.step-card li { position: relative; padding-left: 19px; color: #292929; font-size: 14px; line-height: 1.43; }
.step-card li::before { content: "→"; position: absolute; left: 0; color: #222; font-weight: 750; }
.say-panel { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 19px 20px; border: 2px solid #e6e6e6; border-radius: 20px; background: #fafafa; }
.say-symbol { color: var(--accent); font-size: 27px; line-height: 1; }
.say-label { margin: 0 0 7px; color: #6a6a6a; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.say-text { margin: 0; font-size: 17px; line-height: 1.45; }
.risk-note { margin: 0 0 14px; padding: 16px 18px; border: 2px solid #efbeb5; border-radius: 18px; background: #fff3f1; color: #742e27; font-size: 15px; line-height: 1.5; }
.risk-note strong { display: block; margin-bottom: 5px; font-size: 12px; letter-spacing: .08em; }
.empty-match { padding: 25px; border: 2px dashed #d8d8d8; border-radius: 20px; color: #696969; font-size: 16px; }
.search-dock {
  position: sticky; z-index: 6; top: 0;
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) max(22px, calc((100vw - 910px) / 2)) 14px;
  border-bottom: 1px solid #ededed; background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.plus-button, .go-button { flex: 0 0 52px; display: grid; width: 52px; height: 52px; place-items: center; border: 0; border-radius: 50%; cursor: pointer; }
.plus-button { background: white; font-size: 36px; font-weight: 300; }
.go-button { background: var(--accent); color: white; font-size: 30px; }
.search-field { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; height: 60px; padding: 0 15px 0 18px; border: 1.5px solid #d4d4d4; border-radius: 32px; background: white; }
.search-field:focus-within { border-color: #888; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.search-symbol { margin-right: 12px; color: #222; font-family: Georgia, serif; font-size: 31px; line-height: 1; transform: rotate(-12deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.search-field input:focus-visible { outline: 0; }
.search-field input::placeholder { color: #929292; }
.clear-button { flex: 0 0 31px; width: 31px; height: 31px; border: 0; border-radius: 50%; background: #f2f2f2; font-size: 22px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .app-shell { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .app-header { min-height: 78px; grid-template-columns: minmax(0, 1fr) 49px; padding: 8px 14px; }
  .round-button { width: 45px; height: 45px; font-size: 29px; }
  .back-button { font-size: 38px; }
  .app-title-main { font-size: 19px; }
  main { padding: 20px 14px 0; }
  .bottom-guide { padding: 0 14px; }
  .guide-card { margin-bottom: 27px; padding: 17px 15px 18px; border-radius: 23px; }
  .flow-steps { gap: 7px; }
  .step-chip { min-height: 48px; padding: 9px 12px; border-radius: 16px; font-size: 16px; }
  .flow-arrow { font-size: 20px; }
  .list-heading { margin-bottom: 14px; }
  .keyword-list { gap: 12px; }
  .keyword-card { grid-template-columns: 54px minmax(0,1fr) 27px; min-height: 112px; padding: 16px 15px; border-radius: 25px; }
  .card-icon { width: 42px; height: 42px; font-size: 30px; }
  .card-code { font-size: 14px; }
  .card-title { font-size: 20px; }
  .card-arrow { font-size: 27px; }
  .path-grid { grid-template-columns: 1fr; gap: 9px; }
  .step-card { min-height: auto; padding: 15px 16px; border-radius: 19px; }
  .step-card ul { gap: 7px; }
  .step-card li { font-size: 15px; }
  .search-dock { gap: 7px; padding-right: 10px; padding-left: 10px; }
  .plus-button, .go-button { flex-basis: 42px; width: 42px; height: 42px; }
  .plus-button { font-size: 32px; }
  .go-button { font-size: 26px; }
  .search-field { height: 54px; padding: 0 11px 0 14px; }
  .search-field input { font-size: 16px; }
}
@media (max-width: 380px) {
  .flow-steps { gap: 6px; }
  .step-chip { min-height: 43px; padding: 7px 9px; font-size: 14px; }
  .keyword-card { grid-template-columns: 47px minmax(0,1fr) 24px; min-height: 102px; padding: 13px 11px; }
  .card-icon { width: 38px; height: 38px; font-size: 27px; }
  .card-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.search-dock .back-button { flex: 0 0 42px; width: 42px; height: 42px; }

/* Language stays above search, with room for large touch targets. */
.search-dock { display: block; }
.language-switch { display: flex; justify-content: center; gap: 4px; margin-bottom: 10px; }
.language-switch button { min-height: 40px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 22px; background: white; cursor: pointer; font-size: 15px; font-weight: 650; }
.language-switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.search-row { display: flex; align-items: center; gap: 8px; width: 100%; }
html { scroll-padding-top: 160px; }
.step-chip { white-space: normal; flex-wrap: wrap; }
.card-code { overflow-wrap: anywhere; }

/* Native disclosure cards support touch, mouse, and keyboard. */
.path-grid { align-items: start; }
.step-summary { display: block; cursor: pointer; list-style: none; }
.step-summary::-webkit-details-marker { display: none; }
.step-summary::marker { content: ""; }
.step-summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
.step-expand-hint { display: block; margin-top: 15px; color: var(--accent); font-size: 13px; font-weight: 700; }
.step-card[open] .step-expand-hint { display: none; }
.step-question-area { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.step-question-label { margin: 0 0 13px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.6; letter-spacing: .07em; }
.step-questions { display: grid; gap: 16px; margin: 0; padding-left: 24px; }
.step-card .step-questions li { padding-left: 3px; font-size: 16px; line-height: 1.5; }
.step-card .step-questions li::before { content: none; }
.step-questions li::marker { color: var(--accent); font-weight: 800; }
@media (max-width: 700px) { .step-card .step-questions li { font-size: 17px; } }

.top-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.top-navigation .language-switch { margin: 0; }
.site-navigation { display: flex; gap: 6px; }
.site-navigation a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.site-navigation a[aria-current="page"] { color: var(--ink); background: var(--soft); border-color: #bbb; }
.site-navigation a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width:700px) { .top-navigation { justify-content: center; } .top-navigation .language-switch button { min-height: 38px; padding: 8px 14px; font-size: 14px; } }

/* Consistent creator credit at the end of every page. */
body { display: flex; flex-direction: column; }
.app-shell { flex: 1 0 auto; }
.viewer-main { width: 100%; flex: 1 0 auto; }
.site-credit { margin-top: auto; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid #e4e7ee; background: #fff; text-align: center; color: #50596a; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
