/* Lun uses the site's paper and ink; the reference artwork is kept as vector contours. */
:root { --lun-corner-size: 128px; }
.lun-letter { display: inline-block; position: relative; width: .76em; height: .76em; vertical-align: -.035em; letter-spacing: 0; text-align: center; line-height: .76; }
.lun-letter.is-lun-origin { color: transparent; }
.lun-letter.has-lun-mini { cursor: pointer; }
.lun-letter > .lun-mini { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink); overflow: visible; }
.lun-section { position: relative; z-index: 5; min-height: 100svh; margin-top: clamp(36px, 7svh, 90px); overflow-anchor: none; background: var(--paper); }
.lun-stage { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: clamp(32px, 5vw, 90px); align-items: center; width: min(100%, 1440px); min-height: 100svh; margin: 0 auto; padding: 100px clamp(0px, 2vw, 38px); }
.lun-seat { position: relative; width: min(27vw, 350px); aspect-ratio: 1; justify-self: center; }
.lun-agent { position: fixed; z-index: 6; top: 0; left: 0; width: 700px; height: 700px; transform-origin: 0 0; color: var(--ink); cursor: pointer; touch-action: pan-y; opacity: 0; overflow: visible; appearance: none; -webkit-appearance: none; contain: layout style; will-change: transform; }
/* Once seated, native document scrolling owns the position, including Safari's async scroll. */
.lun-agent.is-docked { position: absolute; width: 100%; height: 100%; transform: none; will-change: auto; }
.lun-agent > svg,.lun-launcher > svg,.lun-letter > .lun-mini { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; max-width: none; overflow: visible; display: block; }
/* SVG painted geometry owns pointer hits, including the circle's fill and stroke. */
.lun-agent,.lun-launcher,.lun-letter.has-lun-mini,.lun-agent > svg,.lun-launcher > svg,.lun-letter > .lun-mini { pointer-events: none; }
.lun-agent .lun-outline,.lun-launcher .lun-outline,.lun-mini .lun-outline { pointer-events: visiblePainted; }
.lun-agent:focus-visible { outline: none; }
.lun-agent:focus-visible .lun-outline { stroke-dasharray: 6 8; }
.lun-conversation-slot { height: clamp(340px, 62svh, 650px); min-width: 0; }
.lun-conversation { --lun-type-size: clamp(25px, 2.45vw, 38px); display: flex; flex-direction: column; height: clamp(340px, 62svh, 650px); min-width: 0; opacity: 0; transform: translateY(20px); transition: opacity .35s ease, transform .4s cubic-bezier(.2,.75,.2,1); pointer-events: none; }
.lun-section.is-ready .lun-conversation { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lun-log-wrap { position: relative; min-height: 0; flex: 1; isolation: isolate; }
.lun-log { height: 100%; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-width: none; padding: 42px 0 26px; overflow-anchor: none; -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 14px), transparent); }
.lun-log::-webkit-scrollbar { display: none; }
.lun-log:focus-visible { outline: 1px solid var(--muted); outline-offset: 6px; }
.lun-log-wrap::before { content: ""; position: absolute; z-index: 2; pointer-events: none; top: 0; left: -4px; right: -4px; height: 42px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.lun-message { margin-bottom: clamp(24px, 4svh, 44px); font-size: clamp(25px, 2.45vw, 38px); font-weight: 400; letter-spacing: -.025em; line-height: 1.16; overflow-wrap: anywhere; white-space: pre-wrap; }
.lun-message:last-child { margin-bottom: 0; }
.lun-message.is-user { text-align: right; padding-left: 10%; }
.lun-message.is-lun { padding-right: 7%; }
.lun-message a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
.lun-message a:hover { opacity: .55; }
.lun-thinking-dots { white-space: nowrap; }
.lun-thinking-dots > span { display: inline-block; animation: lun-dot 1.05s ease-in-out infinite; opacity: .18; }
.lun-thinking-dots > span:nth-child(2) { animation-delay: .16s; }
.lun-thinking-dots > span:nth-child(3) { animation-delay: .32s; }
@keyframes lun-dot { 0%, 65%, 100% { opacity: .18; } 28% { opacity: 1; } }
.lun-latest { position: absolute; z-index: 3; bottom: 6px; right: 2px; font-size: 29px; line-height: 1; background: var(--paper); padding: 4px 9px; }
.lun-form { width: min(100%, 500px); align-self: flex-end; margin-top: clamp(30px, 6svh, 70px); }
.lun-suggestions { display: flex; flex-direction: column; align-self: flex-end; flex: 0 1 auto; gap: 6px; width: min(100%,500px); min-height: 0; max-height: min(260px,32svh); margin-top: 16px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.lun-suggestions::-webkit-scrollbar { display: none; }
.lun-suggestion { flex-shrink: 0; padding: 0 .5em 0 0; background: transparent; color: color-mix(in srgb,var(--ink) 32%,transparent); text-align: right; font: 400 var(--lun-type-size)/1.14 var(--font); letter-spacing: -.025em; transition: color .2s ease; animation: lun-question-in .35s var(--ease) both; }
.lun-suggestion:nth-child(2) { animation-delay: .045s; }
.lun-suggestion:nth-child(3) { animation-delay: .09s; }
.lun-suggestion:nth-child(4) { animation-delay: .135s; }
.lun-suggestion:hover,.lun-suggestion:focus-visible { color: var(--ink); }
.lun-suggestion:focus-visible { outline: 1px solid currentColor; outline-offset: -1px; }
.lun-suggestion:disabled { opacity: .5; }
.lun-suggestions:not([hidden]) + .lun-form { margin-top: 18px; }
.lun-conversation.is-intro .lun-log-wrap { flex: 1 0 128px; }
@keyframes lun-question-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lun-input-line { position: relative; display: flex; align-items: flex-end; font: 400 var(--lun-type-size)/1.14 var(--font); letter-spacing: -.025em; }
.lun-input-line textarea { display: block; flex: 1; width: 0; min-width: 0; border: 0; outline: none; padding: 0 .5em 0 0; margin: 0; max-height: 4.4em; resize: none; background: transparent; color: inherit; font: 400 1em/1.14 var(--font); letter-spacing: -.025em; text-align: right; border-radius: 0; caret-color: transparent; }
.lun-input-line textarea::placeholder { color: inherit; opacity: .32; }
.lun-input-line.is-empty::after,.lun-input-line.has-caret::after { content: ""; position: absolute; right: .18em; top: .06em; width: 1.5px; height: .98em; background: currentColor; opacity: var(--lun-caret-opacity,.32); pointer-events: none; animation: lun-caret 1.2s steps(1,end) infinite; }
.lun-input-line.has-caret::after { --lun-caret-opacity: 1; right: auto; left: var(--lun-caret-x); top: var(--lun-caret-y); }
.lun-input-mirror { position: absolute; top: 0; left: 0; padding: 0 .5em 0 0; font: inherit; letter-spacing: inherit; text-align: right; white-space: pre-wrap; overflow-wrap: break-word; visibility: hidden; pointer-events: none; }
.lun-input-line.is-composing textarea { caret-color: var(--ink); }
.lun-input-line.is-composing::after { display: none; }
.lun-privacy { margin-top: 12px; font: 400 13px/1.4 var(--font); text-align: right; color: var(--muted); }
.lun-privacy a { color: inherit; text-decoration: underline; text-underline-offset: .16em; }
@keyframes lun-caret { 0%, 49% { opacity: var(--lun-caret-opacity,.32); } 50%, 100% { opacity: 0; } }
.lun-section + .work-preview + .work-list { margin-top: clamp(70px, 12svh, 150px); }
.photo-mode .lun-agent { visibility: hidden; }
.lun-companion { --lun-panel-width: min(420px,calc(100vw - var(--edge) * 2 - 16px)); --lun-panel-limit: 510px; --lun-panel-height: min(var(--lun-panel-limit),calc(100dvh - var(--lun-corner-size) - 106px)); --lun-panel-bottom: calc(var(--lun-corner-size) + 22px); --lun-haze-feather: 88px; --lun-input-width: min(80%,320px); position: fixed; z-index: 110; right: var(--edge); bottom: max(24px,env(safe-area-inset-bottom)); color: var(--ink); pointer-events: none; }
.lun-companion-presence { opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .7s ease,transform .85s var(--ease),visibility 0s .85s; pointer-events: none; }
.lun-companion.is-available .lun-companion-presence { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.lun-companion.is-footer-docked { --lun-panel-height: min(var(--lun-panel-limit),calc(100dvh - var(--lun-corner-size) - 106px - var(--lun-footer-height,0px) - var(--edge))); position: absolute; right: 0; bottom: calc(100% + 24px); }
.lun-companion.is-over-sheet { --lun-panel-height: min(var(--lun-panel-limit),calc(100dvh - var(--lun-corner-size) - 202px)); }
.lun-launcher { display: block; position: relative; width: var(--lun-corner-size); height: var(--lun-corner-size); overflow: visible; appearance: none; -webkit-appearance: none; }
.lun-launcher:focus-visible { outline: none; }
.lun-launcher:focus-visible .lun-outline { stroke-dasharray: 6 8; }
.lun-companion-panel { position: absolute; right: 0; bottom: var(--lun-panel-bottom); width: var(--lun-panel-width); height: var(--lun-panel-height); opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; transition: opacity .3s ease,transform .4s var(--ease),visibility 0s .4s; }
.lun-companion-haze { position: absolute; right: calc(-1 * var(--lun-haze-feather)); bottom: calc(var(--lun-panel-bottom) - var(--lun-haze-feather)); width: calc(var(--lun-panel-width) + var(--lun-haze-feather) * 2); height: calc(var(--lun-panel-height) + var(--lun-haze-feather) * 2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb,var(--paper) 64%,transparent); mask-image: linear-gradient(transparent,#000 var(--lun-haze-feather),#000 calc(100% - var(--lun-haze-feather)),transparent),linear-gradient(90deg,transparent,#000 var(--lun-haze-feather),#000 calc(100% - var(--lun-haze-feather)),transparent); -webkit-mask-image: linear-gradient(transparent,#000 var(--lun-haze-feather),#000 calc(100% - var(--lun-haze-feather)),transparent),linear-gradient(90deg,transparent,#000 var(--lun-haze-feather),#000 calc(100% - var(--lun-haze-feather)),transparent); mask-composite: intersect; -webkit-mask-composite: source-in; opacity: 0; visibility: hidden; transition: opacity .3s ease,visibility 0s .4s; pointer-events: none; }
.lun-companion.is-open .lun-companion-haze { opacity: 1; visibility: visible; transition-delay: 0s; }
.lun-companion.is-open .lun-companion-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.lun-companion-panel .lun-conversation { --lun-type-size: clamp(20px,1.8vw,26px); height: 100%; opacity: 1; transform: none; pointer-events: auto; }
.lun-companion-panel .lun-message { font-size: clamp(20px,1.8vw,26px); margin-bottom: 26px; }
.lun-companion-panel .lun-message.is-user { max-width: var(--lun-input-width); padding-left: 0; margin-left: auto; }
.lun-companion-panel .lun-form { width: var(--lun-input-width); margin-top: 22px; }
.lun-companion-panel .lun-log { overscroll-behavior: contain; }
.lun-companion-panel .lun-suggestions { width: var(--lun-input-width); }
.photo-mode .lun-companion { --paper: #090909; --ink: #fff; --muted: #aaa; }
@media (max-width: 700px) {
  :root { --lun-corner-size: 108px; }
  .lun-section { margin-top: 56px; }
  .lun-stage { grid-template-columns: 1fr; gap: 28px; align-content: center; min-height: max(780px, 100svh); padding: 86px 4px 48px; }
  .lun-seat { width: clamp(210px, 58vw, 270px); justify-self: center; margin-left: 0; }
  /* The travelling face belongs to the document on iOS, not its async fixed layer. */
  .lun-agent:not(.is-docked) { position: absolute; }
  .lun-agent.is-scroll-flight { animation: lun-mobile-flight 1s cubic-bezier(.3333333333,0,.6666666667,1) both; animation-timeline: scroll(root block); animation-range: var(--flight-start) var(--flight-end); }
  .lun-suggestion.is-desktop-question { display: none; }
  .lun-conversation { --lun-type-size: 26px; height: clamp(300px, 49svh, 470px); }
  .lun-conversation-slot { height: clamp(300px, 49svh, 470px); }
  .lun-conversation.has-ai-connection.is-intro .lun-log-wrap { flex-basis: 96px; }
  .lun-companion { --lun-panel-limit: 440px; }
  .lun-message { font-size: clamp(24px, 6.2vw, 30px); line-height: 1.15; margin-bottom: 27px; }
  .lun-message.is-lun { padding-right: 4%; }
  .lun-message.is-user { padding-left: 8%; }
  .lun-log { padding-top: 30px; }
  .lun-log-wrap::before { height: 30px; }
  .lun-form { margin-top: 24px; width: 90%; }
  .lun-suggestions { width: 90%; }
}
@keyframes lun-mobile-flight {
  from { transform: translate3d(var(--flight-from-x),var(--flight-from-y),0) scale(var(--flight-from-scale)); }
  to { transform: translate3d(var(--flight-to-x),var(--flight-to-y),0) scale(var(--flight-to-scale)); }
}
@media (prefers-reduced-motion: reduce) {
  .lun-agent { will-change: auto; }
  .lun-conversation { transform: none; }
  .lun-thinking-dots > span { animation: none; opacity: 1; }
  .lun-companion-presence,.lun-companion-panel,.lun-companion-haze { transition: none; }
  .lun-suggestion { animation: none; }
  .lun-input-line.is-empty::after,.lun-input-line.has-caret::after { animation: none; }
}
