@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600&family=Italiana&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #283d37;
  background: #eceee9;
  font-synthesis: none;
  --ink: #283d37;
  --muted: #637366;
  --line: rgba(48, 69, 59, .18);
}
* { box-sizing: border-box; }
body { position: relative; margin: 0; min-height: 850px; min-height: max(850px, 100svh); overflow-x: hidden; isolation: isolate; }
button, input { font: inherit; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; }
button:disabled { cursor: wait; opacity: .5; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid #5b8a75; outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 20; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 72% 34%, #fafbf6 0%, #ecefe8 45%, #e7ebe4 100%); }
.ambient::after { content: ''; position: absolute; inset: 0; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.7' filter='url(%23n)'/%3E%3C/svg%3E"); pointer-events: none; }
.sunbeam { position: absolute; left: 30%; top: -40%; height: 150%; width: 33%; background: linear-gradient(90deg, transparent, #ffffff80, transparent); transform: rotate(32deg); filter: blur(20px); }
.horizon { position: absolute; top: var(--horizon-top, 65%); bottom: 0; width: 100%; border-top: 1px solid #cbd1c62b; background: linear-gradient(#d9dfd130, transparent); }
.site-header { height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 5.2%; border-bottom: 1px solid var(--line); }
.wordmark { text-decoration: none; font-size: 28px; letter-spacing: .34em; font-weight: 450; }
.wordmark span { display: block; font-size: 12px; letter-spacing: .035em; margin-top: 8px; color: var(--muted); }
.edition { font-size: 12px; display: flex; align-items: center; gap: 9px; }
.edition-number { margin-left: 32px; letter-spacing: .14em; color: var(--muted); font-size: 10px; }
.status-dot, .live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #6f8d73; }
.status-dot { box-shadow: 0 0 0 4px #76978110; }
.live-dot { margin-right: 8px; }
#experience { position: relative; height: calc(100svh - 360px); min-height: 490px; max-height: 820px; }
.hero { position: absolute; left: 5.2%; top: 13%; z-index: 2; max-width: 40%; scroll-margin-top: 28px; transition: opacity .4s, transform .5s; }
.eyebrow, .tiny-label { font-size: 10px; letter-spacing: .19em; font-weight: 500; }
.eyebrow { display: flex; align-items: center; gap: 13px; }
.small-line { height: 1px; width: 24px; background: #7c8e80; }
h1 { font-family: 'Italiana', Georgia, serif; font-size: clamp(52px, 5.3vw, 86px); font-weight: 400; line-height: 1.03; letter-spacing: -.035em; margin: 29px 0 23px; }
h1 em { font-weight: 400; color: #61795f; }
.lead { font-size: 16px; line-height: 1.7; color: #52645b; }
.invitation { font-size: 13px; line-height: 1.6; color: #677760; margin-top: 26px; }
.passages { margin-top: 33px; }
.passages .tiny-label { font-size: 9px; color: #637366; }
.passage-links { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; margin-top: 10px; font-size: 12px; }
.passage-links a { padding: 3px 0; text-decoration: none; border-bottom: 1px solid transparent; }
.passage-links a:hover { border-color: var(--ink); }
.passage-links > span { color: #8c998a; }
.companion-scene { position: absolute; left: 43%; right: 4%; top: 0; bottom: 0; z-index: 4; pointer-events: none; outline-offset: -20px; }
.companion-hit-area { position: absolute; left: 30%; top: 14%; width: 40%; height: 75%; z-index: 1; cursor: pointer; pointer-events: auto; }
.companion-scene canvas { width: 100%; height: 100%; display: block; }
.scene-fallback { position: absolute; top: 40%; left: 30%; font-family: Georgia, serif; font-size: 28px; }
.scene-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.loading-orbit { width: 90px; height: 90px; border: 1px solid #83977650; border-radius: 50%; box-shadow: 0 0 50px #a9b89b25; animation: breathe 2s ease-in-out infinite; }
.scene-ready .scene-loading { display: none; }
html[data-route]:not([data-route="home"]):not([data-route="message"]) .hero { visibility: hidden; }
.companion-greeting { position: absolute; right: 5.2%; top: 15%; width: 185px; pointer-events: none; }
.companion-greeting .tiny-label { font-size: 9px; color: #637366; }
.companion-greeting p { font-family: 'Italiana', Georgia, serif; font-size: 27px; line-height: 1.15; margin: 13px 0; white-space: pre-line; }
.greeting-hint { font-size: 11px; color: #637366; }
.product-orbits { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.orbit-link { position: absolute; pointer-events: auto; display: flex; gap: 10px; align-items: center; text-decoration: none; text-align: left; font-size: 11px; letter-spacing: .12em; padding: 12px; border-radius: 8px; transition: background .3s, transform .3s; }
.orbit-link:hover { background: #ffffff60; transform: translateY(-3px); }
.orbit-link { translate: -50% 0; white-space: nowrap; }
.orbit-link small { display: block; font-size: 8px; letter-spacing: .08em; color: #62735a; margin-top: 5px; }
.orbit-point { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #8b9f80; box-shadow: 0 0 0 5px #83977610; }
.orbit-link--first { left: 52%; top: 14%; }
.orbit-link--second { left: 50%; top: 72%; }
.orbit-link--third { right: 5%; top: 68%; }
.companion-activity { position: absolute; left: 60%; bottom: 0; display: flex; align-items: center; gap: 8px; font-size: 10px; color: #63745f; }
.activity-orbit { width: 13px; height: 13px; border: 1px solid #9cac9550; border-radius: 50%; position: relative; animation: spin 9s linear infinite; }
.activity-orbit::before { content: ''; position: absolute; width: 3px; height: 3px; background: #91a584; border-radius: 50%; top: -1px; left: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.view-panel { position: absolute; left: 5.2%; top: 6%; width: 44%; max-height: 91%; overflow: auto; padding: 4px 24px 20px 4px; z-index: 3; scrollbar-width: none; scroll-margin-top: 28px; animation: arrive .4s ease; }
.view-panel::-webkit-scrollbar, .product-list::-webkit-scrollbar, .connection-branches::-webkit-scrollbar { display: none; }
.view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.back-link { font-size: 10px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #63765b; flex-shrink: 0; padding: 4px 0; }
.return-orbit { width: 20px; height: 20px; border: 1px solid #8d9f81; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.view-navigation { display: flex; flex-wrap: wrap; gap: 14px; font-size: 10px; }
.view-navigation a { padding: 3px 0; color: var(--muted); text-decoration: none; }
.view-navigation a[aria-current="page"] { color: var(--ink); box-shadow: 0 1px var(--ink); }
.view-content h2 { font-family: 'Italiana', Georgia, serif; font-weight: 400; font-size: clamp(36px, 3.6vw, 58px); line-height: 1.08; letter-spacing: -.025em; margin: 16px 0 20px; overflow-wrap: anywhere; }
.view-content h2:focus { outline: none; }
.view-content p { font-size: 14px; color: #52654d; line-height: 1.75; max-width: 440px; }
.view-content .view-deck { font-size: 17px; color: var(--ink); margin: -4px 0 14px; }
.view-content .view-principle { font-family: 'Italiana', Georgia, serif; font-size: 25px; line-height: 1.3; color: #61795f; margin-top: 25px; }
.collection-intro { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.collection-intro .tiny-label { font-size: 9px; letter-spacing: .12em; }
.collection-intro .text-action { flex-shrink: 0; }
.product-list { margin-top: 16px; max-height: 216px; overflow-y: auto; scrollbar-width: none; scroll-snap-type: y proximity; }
.product-list.more-above, .connection-branches.more-above { mask-image: linear-gradient(to bottom, transparent, black 18px); }
.product-list.more-below, .connection-branches.more-below { mask-image: linear-gradient(to bottom, black calc(100% - 18px), transparent); }
.product-list.more-above.more-below, .connection-branches.more-above.more-below { mask-image: linear-gradient(to bottom, transparent, black 18px, black calc(100% - 18px), transparent); }
.catalog-group { margin-bottom: 14px; }
.catalog-category { font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #63765b; margin: 0 0 5px; }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; height: 72px; scroll-snap-align: start; text-decoration: none; }
.product-row-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.product-name { font-size: 16px; overflow-wrap: anywhere; }
.product-summary { font-size: 11px; color: #63765b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-row-meta { display: grid; justify-items: end; gap: 5px; }
.product-category { font-size: 9px; color: #63765b; }
.product-row-index { display: flex; gap: 18px; align-items: center; font-size: 10px; color: #63765b; flex-shrink: 0; }
.product-row-index > span { font-size: 15px; }
.product-row:hover .product-name { color: #537c48; }
.catalog-search { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.catalog-search:focus-visible { outline: 2px solid #5b8a75; outline-offset: 3px; }
.view-content .catalog-count { font-size: 10px; margin: 10px 0; }
.product-features { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; }
.product-features li { display: flex; align-items: baseline; gap: 10px; font-size: 12px; color: #52654d; line-height: 1.6; }
.product-features li::before { content: ''; width: 12px; height: 1px; background: #97a88e; flex-shrink: 0; align-self: center; }
.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin: 22px 0 8px; }
.product-visit { display: inline-block; text-decoration: none; padding: 9px 0; border-bottom: 1px solid #819473; font-size: 13px; }
.text-action { display: inline-block; padding: 7px 0; font-size: 11px; text-decoration: none; color: #586f51; }
.text-action:hover, .product-resources a:hover, .view-next:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.view-content .product-note { font-size: 11px; line-height: 1.7; margin: 20px 0 12px; color: #63765b; }
.product-resources { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; }
.product-resources a { padding: 7px 0; text-decoration: none; }
.view-next { display: inline-block; margin-top: 14px; padding: 5px 0; font-size: 11px; color: #586f51; text-decoration: none; }
.connection-map { display: flex; gap: 25px; align-items: center; margin: 28px 0 12px; }
.connection-root { font-size: 13px; letter-spacing: .15em; }
.connection-branches { border-left: 1px solid #a9b69e; display: flex; flex-direction: column; flex: 1; min-width: 0; max-height: 180px; overflow-y: auto; scrollbar-width: none; scroll-snap-type: y proximity; }
.connection-link { font-size: 13px; display: flex; align-items: center; gap: 12px; padding: 8px 0; height: 60px; flex-shrink: 0; scroll-snap-align: start; text-decoration: none; }
.connection-link::before { content: ''; width: 22px; height: 1px; background: #a9b69e; flex-shrink: 0; }
.connection-link > span:last-child { margin-left: auto; font-size: 12px; color: #63765b; }
.connection-product small { display: block; font-size: 10px; color: #63765b; margin-top: 5px; }
.view-active .hero { opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none; }
.view-active .orbit-link:hover { background: transparent; }
.view-active .greeting-hint { visibility: hidden; }

.conversation { position: relative; z-index: 5; margin: 25px auto 0; width: min(820px, 87%); }
.reply-line { display: flex; align-items: baseline; gap: 12px; min-height: 38px; font-size: 13px; line-height: 1.6; color: #52654d; margin: 0 21px 11px; }
.q-signature { display: inline-flex; align-items: baseline; gap: 7px; flex-shrink: 0; font-family: 'Italiana', Georgia, serif; font-size: 27px; line-height: 1; color: #63765b; }
.signature-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
#reply { max-height: 100px; overflow-y: auto; flex: 1; white-space: pre-line; }
#retry-chat { flex-shrink: 0; padding-top: 0; }
#chat-form { display: flex; align-items: center; gap: 17px; background: #ffffff80; border: 1px solid #ffffffe0; box-shadow: 0 5px 35px #54634409, inset 0 0 0 1px #acb7a615; border-radius: 18px; min-height: 68px; padding: 12px 21px; backdrop-filter: blur(18px); transition: border-color .3s, box-shadow .3s; }
#chat-form:focus-within { border-color: #a8bba0; box-shadow: 0 4px 32px #5b795614; }
.input-star { font-size: 26px; color: #758d68; font-weight: 400; }
input { width: 100%; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ink); }
input::placeholder { color: #63765b; }
.input-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.input-tools button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; min-width: 38px; min-height: 38px; color: #63765b; }
.input-tools svg { width: 17px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.enter-label { font-size: 9px; letter-spacing: .09em; }
.input-tools #voice { border-right: 1px solid var(--line); border-radius: 0; padding-right: 15px; }
.input-tools #voice[aria-pressed="true"] { color: #a45030; }
.conversation-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 10px; color: #63765b; margin: 13px 11px; }
.conversation-meta button { font-size: 10px; color: #586f51; padding: 0; }
.conversation-meta button:hover { text-decoration: underline; }
.conversation-controls { display: flex; align-items: center; gap: 14px; }
#voice-language { border: 0; background: transparent; color: #586f51; font: inherit; padding: 5px 0; max-width: 65px; }
.voice-status { font-size: 11px; color: #63765b; margin: 8px 11px; }
.transcript { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; max-height: 300px; overflow: auto; background: #f8faf5f5; border: 1px solid #cfd9c8; border-radius: 17px; padding: 20px; box-shadow: 0 15px 40px #203b2a15; backdrop-filter: blur(20px); }
.transcript p { font-size: 13px; line-height: 1.6; margin: 0 0 15px; overflow-wrap: anywhere; }
.transcript p:last-child { margin-bottom: 0; }
.transcript strong { font-size: 10px; letter-spacing: .1em; display: block; color: #63765b; margin-bottom: 3px; }
.thinking .q-signature, .thinking .live-dot { animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .3; } }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin: 25px 5.2% 0; padding: 18px 0; border-top: 1px solid var(--line); font-size: 8px; letter-spacing: .16em; color: #63765b; }
.site-footer a { text-decoration: none; }
.footer-star { margin: 0 8px; font-size: 12px; }
.noscript-message { margin: 20px 5.2%; font-size: 14px; }

@media (min-width: 1700px) {
  #experience { max-height: none; }
  .hero { top: 18%; }
  .companion-greeting { top: 23%; }
}
@media (max-height: 820px) and (min-width: 901px) {
  body { min-height: 730px; }
  .site-header { height: 92px; }
  #experience { min-height: 410px; height: calc(100svh - 320px); }
  h1 { font-size: 64px; margin: 20px 0 15px; }
  .hero { top: 10%; }
  .lead { font-size: 14px; }
  .invitation { margin-top: 15px; }
  .passages { margin-top: 20px; }
  .conversation { margin-top: 16px; }
  .site-footer { margin-top: 18px; }
  .view-toolbar { margin-bottom: 18px; }
  .view-content h2 { font-size: 40px; margin: 12px 0 16px; }
  .connection-map { margin-top: 20px; }
  .view-panel { top: 4%; max-height: 95%; padding-bottom: 10px; }
}
@media (max-width: 1100px) {
  body { min-height: 100svh; }
  .site-header { height: 96px; margin: 0 6%; }
  .edition-number { display: none; }
  #experience, .view-active #experience { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(330px, auto) 380px; height: auto; min-height: 0; max-height: none; }
  .hero { position: relative; grid-area: 1 / 1; top: auto; left: auto; max-width: none; margin: 30px 7% 0; }
  h1 { font-size: clamp(46px, 7vw, 64px); margin: 18px 0; }
  .lead { font-size: 14px; }
  .invitation { display: none; }
  .passages { margin-top: 20px; }
  .passages .tiny-label { display: none; }
  .companion-scene, .view-active .companion-scene { position: relative; grid-area: 2 / 1; top: auto; left: auto; right: auto; bottom: auto; width: 100%; min-width: 0; height: 380px; }
  .companion-greeting { display: none; }
  .product-orbits, .view-active .product-orbits { inset: 0; height: auto; }
  .view-active .hero { display: none; }
  .view-panel, .view-active .view-panel { position: relative; grid-area: 1 / 1; top: auto; left: auto; width: auto; max-height: none; overflow: visible; margin: 24px 7% 0; padding: 4px; }
  .view-content p { max-width: 620px; }
  .view-content h2 { font-size: clamp(36px, 5vw, 48px); }
  .companion-activity { left: 50%; bottom: 3px; transform: translateX(-50%); white-space: nowrap; }
  .conversation { margin-top: 12px; }
  .view-toolbar { justify-content: flex-start; flex-wrap: wrap; gap: 10px 24px; }
}
@media (max-width: 600px) {
  .site-header { height: 89px; gap: 12px; }
  .wordmark { font-size: 22px; min-width: 0; }
  .wordmark span { font-size: 9px; letter-spacing: .01em; }
  .edition { font-size: 9px; flex-shrink: 0; white-space: nowrap; line-height: 1.5; }
  .status-dot { flex-shrink: 0; }
  #experience, .view-active #experience { grid-template-rows: minmax(330px, auto) 300px; }
  .companion-scene, .view-active .companion-scene { height: 300px; }
  .eyebrow { font-size: 9px; }
  h1 { font-size: clamp(44px, 12vw, 53px); margin: 16px 0 12px; }
  .lead { font-size: 13px; line-height: 1.55; }
  .passage-links { font-size: 11px; gap: 10px; }
  .orbit-link { font-size: 9px; padding: 8px 5px; letter-spacing: .05em; gap: 7px; }
  .orbit-link small { font-size: 7px; letter-spacing: .025em; }
  .view-content p { font-size: 13px; }
  .view-toolbar { gap: 10px 15px; margin-bottom: 18px; }
  .view-navigation { gap: 13px; }
  .connection-map { gap: 15px; }
  .connection-link::before { width: 15px; }
  .conversation { width: 88%; }
  .reply-line { font-size: 12px; gap: 10px; margin-left: 12px; margin-right: 12px; }
  #chat-form { padding: 10px 12px; gap: 10px; min-height: 61px; }
  input { font-size: 16px; }
  .input-star { font-size: 20px; }
  .enter-label { display: none; }
  .input-tools { gap: 3px; }
  .input-tools #voice { padding-right: 8px; }
  .conversation-meta { font-size: 9px; gap: 8px; flex-wrap: wrap; }
  .conversation-meta button { font-size: 9px; }
  #input-hint { display: none; }
  .site-footer { font-size: 7px; letter-spacing: .08em; margin: 20px 6% 0; padding-bottom: 24px; flex-wrap: wrap; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Only the catalog rows move; keep the toolbar, heading and return link in place. */
body[data-current-view="products"] .view-panel,
body[data-current-view="journey"] .view-panel { display: flex; flex-direction: column; overflow: hidden; bottom: 3%; }
body[data-current-view="products"] .view-content,
body[data-current-view="journey"] .view-content { display: flex; flex-direction: column; min-height: 0; }
.view-toolbar, .view-next, .collection-intro, .view-content h2 { flex-shrink: 0; }
.product-list, .connection-branches { overscroll-behavior-y: contain; }
.connection-map { min-height: 0; }
.connection-branches { height: 180px; max-height: 100%; }
@media (max-width: 1100px) {
  body[data-current-view="products"] .view-panel,
  body[data-current-view="journey"] .view-panel { bottom: auto; }
  .product-list { flex-shrink: 0; }
}
