:root { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #30312c; background: #fcfcfa; font-synthesis: none; --muted: #898b82; --line: #e9e9e3; --accent: #ec704c; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.topbar { height: 88px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0eb; }
.brand, .topbar-actions { display: flex; gap: 14px; align-items: center; }
.brand { font-size: 17px; letter-spacing: -.3px; }
.brand > span:last-child { color: var(--muted); font-weight: 400; }
.brand-mark { display: block; width: 38px; height: 38px; border-radius: 10px; object-fit: contain; }
.brand-divider { color: #cdcec6; margin: 0 2px; }
.topbar-actions { gap: 24px; font-size: 12px; color: #75776e; }
#connection::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #b1b2a8; }
#connection[data-state="ready"]::before { background: #73986a; }
#connection[data-state="offline"]::before { background: var(--accent); }
.quiet { background: none; border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; color: #606257; }
.quiet:hover { background: #f0f1eb; }
main { max-width: 1120px; margin: 0 auto; padding: 0 36px; }
.endpoint-settings { margin-top: 20px; font-size: 12px; color: #75776e; line-height: 1.6; }
.connection-health { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 12px; color: #75776e; }
.connection-health small { flex-basis: 100%; }
#connection-result[data-state="ready"] { color: #426744; }
#connection-result[data-state="error"] { color: #b74929; }
.queue-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: #75776e; }
#queue-count { display: inline-block; min-width: 1em; margin-left: 6px; color: #30312c; font-size: 16px; font-variant-numeric: tabular-nums; }
#queue-detail { color: var(--muted); }
.endpoint-settings summary { cursor: pointer; }
#endpoint-current { margin-left: 10px; color: var(--muted); overflow-wrap: anywhere; }
.endpoint-settings form { padding: 14px 0 0; max-width: 680px; }
.endpoint-row { display: flex; gap: 10px; margin-top: 6px; }
.endpoint-row input, #endpoint-model { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: white; color: #30312c; }
#endpoint-error { color: #b74929; }
.welcome { padding: 64px 0 44px; text-align: center; }
.intro-tag { font-size: 10px; font-weight: 600; letter-spacing: 2.1px; color: #82867a; }
.tiny-spark { color: var(--accent); margin-right: 7px; font-size: 16px; vertical-align: -1px; }
h1 { font-size: clamp(36px, 4.4vw, 59px); line-height: 1.13; letter-spacing: -2.9px; font-weight: 500; margin: 22px 0 19px; }
h1 span { font-family: Georgia, "Times New Roman", serif; font-style: italic; color: #788365; font-weight: 400; }
.welcome > p { color: #898b81; font-size: 14px; line-height: 1.8; }
.examples { margin: 39px auto 0; max-width: 760px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; text-align: left; }
.examples > button { min-width: 0; padding: 0; border: 1px solid #e5e7dd; border-radius: 14px; background: white; overflow: hidden; text-align: left; transition: transform .18s, box-shadow .18s; }
.examples > button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px #3341240a; }
.benchmark-prompt { border: 0; background: none; color: #879075; font-size: 11px; margin-top: 20px; padding: 5px; }
.benchmark-prompt:hover { color: #526246; }
.request-settings { color: #93968a; font-size: 10px; margin: 12px 8px 0; line-height: 1.7; }
.settings-fields { display: flex; gap: 15px; flex-wrap: wrap; padding-top: 12px; }
.settings-fields label { display: flex; gap: 6px; align-items: center; }
.settings-fields input[type="number"] { width: 115px; padding: 5px; color: #646d59; background: white; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.settings-fields input[type="checkbox"] { accent-color: #77856a; }
#measurement-json { max-height: 300px; overflow: auto; padding: 12px; background: #f4f5ee; font: 11px/1.6 ui-monospace, monospace; }
.example-art { height: 136px; display: flex; position: relative; overflow: hidden; }
.poster-art { background: #ecedd8; padding: 19px 22px; align-items: center; }
.poster-art > span { font-size: 36px; line-height: .89; font-weight: 900; letter-spacing: -2px; color: #476344; transform: rotate(-5deg); z-index: 1; }
.poster-art i { position: absolute; right: 1px; top: 1px; font-size: 123px; font-style: normal; color: #ed805b; line-height: 1.1; transform: rotate(10deg); }
.app-art { background: #efe5da; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #785449; }
.mini-title { font-size: 8px; letter-spacing: 2px; }
.mini-clock { font-family: Georgia, serif; font-size: 40px; line-height: 1; }
.mini-button { background: #a56854; color: #fff9f3; padding: 5px 15px; border-radius: 20px; font-size: 7px; }
.orbit-art { background: #e8ecf1; align-items: center; justify-content: center; }
.orbit-art i { position: absolute; width: 138px; height: 58px; border: 1px solid #889aab; border-radius: 50%; transform: rotate(-30deg); }
.orbit-art i:nth-child(2) { transform: rotate(30deg); }
.orbit-art i:nth-child(3) { transform: rotate(90deg); }
.orbit-art > span { color: #dd9377; font-size: 33px; }
.example-label { display: block; padding: 15px 18px; }
.example-label strong { display: block; font-size: 12px; font-weight: 600; }
.example-label > span { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.example-label b { float: right; font-size: 13px; font-weight: 400; }
.bottom-area { padding-bottom: 18px; }
.rate-panel { border: 1px solid #eeeee8; background: #f5f5f1; border-radius: 18px; margin: 15px 0 12px; padding: 20px 24px 12px; }
.curve-heading { display: flex; justify-content: space-between; gap: 12px; color: #96998d; font-size: 11px; }
.curve-heading > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.curve-heading strong { font-weight: 500; color: #6e7664; }
.curve-key::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 2px; background: #8d9484; }
.output-key::before { background: var(--accent); }
#rate-chart { width: 100%; display: block; margin-top: 10px; overflow: visible; }
.curve-grid path { stroke: #e4e6dc; stroke-width: 1; stroke-dasharray: 3 5; fill: none; }
.curve-line { stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.thinking-line { stroke: #8d9484; } .output-line { stroke: var(--accent); }
.curve-labels { fill: #919786; font: 14px ui-monospace, monospace; }
.curve-caption { color: #93998a; margin: 7px 0 0; font-size: 10px; line-height: 1.6; }
.curve-empty { color: #93998a; font-size: 12px; padding: 20px 0; }
@media (max-width: 700px) { .rate-panel { padding: 16px 14px 12px; } .curve-heading { font-size: 10px; } .curve-heading > span:first-child { gap: 8px; } #rate-chart { min-height: 110px; } .curve-labels { font-size: 24px; } }
.composer { background: #fff; border: 1px solid #e5e6df; border-radius: 20px; padding: 20px 23px 15px; box-shadow: 0 7px 25px #313b2306; }
.composer:focus-within { border-color: #bdc5b0; }
textarea { display: block; resize: vertical; width: 100%; border: 0; background: transparent; outline: none; padding: 0; min-height: 61px; max-height: 260px; color: #3b4034; font-size: 16px; line-height: 1.6; }
textarea::placeholder { color: #a7aaa0; }
.composer-bar, .composer-options, .send-actions { display: flex; align-items: center; gap: 15px; }
.composer-bar { justify-content: space-between; margin-top: 12px; }
.composer-options { gap: 12px; color: #7e8375; font-size: 11px; }
.thinking-toggle { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.thinking-toggle input { accent-color: #77856a; margin: 0; }
.thinking-toggle > span { font-size: 16px; color: #7b896a; }
.option-divider { height: 14px; width: 1px; background: var(--line); }
.limit-label { display: flex; gap: 6px; align-items: center; }
#max-tokens { width: 76px; padding: 4px 5px; border: 1px solid var(--line); border-radius: 5px; color: #747a69; background: #fcfcfa; font-size: 11px; }
.key-hint { color: #adafa7; font-size: 10px; }
.send { border: 0; width: 38px; height: 38px; border-radius: 50%; background: #333c2e; color: white; font-size: 25px; }
.stop { background: #faf0eb; border: 1px solid #f2d7c9; color: #a2593c; border-radius: 18px; padding: 9px 14px; font-size: 12px; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 14px 0 0; color: #aaaDA3; font-size: 10px; }
.metrics { margin: 15px 0 12px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 14px; border: 1px solid #eeeee8; background: #f5f5f1; border-radius: 18px; }
.metric { padding: 0 21px; border-right: 1px solid #e7e8e0; min-width: 0; }
.metric:last-child { border: 0; }
.metric > span { display: block; color: #8a8b82; font-size: 12px; margin-bottom: 10px; }
.metric > span small { font-size: 9px; margin-left: 3px; }
.metric strong { display: block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 30px; letter-spacing: -1px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric > small { display: block; font-size: 10px; color: #999b90; margin-top: 8px; line-height: 1.5; }
.output-metric strong { color: var(--accent); }
.peak-metric { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 21px; margin: -10px 0 22px; border: 1px solid #f3d9cc; border-radius: 11px; background: #fff0e8; }
.peak-metric span { color: #a6583c; font-size: 13px; font-weight: 600; }
.peak-metric small { display: block; color: #b47b64; font-size: 10px; margin-top: 5px; }
.peak-value { display: flex; align-items: baseline; gap: 8px; }
.peak-metric strong { color: var(--accent); font-size: 38px; }
.peak-value small { font-size: 12px; white-space: nowrap; }
.request-details { font-size: 11px; color: #93968a; margin: 0 8px 14px; line-height: 1.7; }
summary { cursor: pointer; }
#details-summary { margin-left: 12px; }
.request-details p { max-width: 780px; }
#detail-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px; }
#detail-values > div { display: flex; justify-content: space-between; gap: 10px; }
#detail-values dd { margin: 0; font-variant-numeric: tabular-nums; color: #676c5c; }
.turn { padding: 30px 0 14px; }
.user-message { margin: 0 0 28px auto; max-width: 80%; width: fit-content; padding: 13px 19px; border: 1px solid #e9eae3; border-radius: 18px 18px 4px 18px; background: #f2f3ed; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-label { font-size: 11px; color: #879075; display: flex; align-items: center; gap: 9px; margin-bottom: 15px; }
.assistant-label::before { content: "✳"; font-size: 19px; color: #879075; }
.thoughts { border-left: 2px solid #e2e5da; padding-left: 15px; margin: 0 0 20px; color: #8c9182; font-size: 12px; }
.thoughts summary { margin-bottom: 10px; }
.thinking-text { white-space: pre-wrap; line-height: 1.75; max-height: 270px; overflow: auto; overflow-wrap: anywhere; }
.answer-text { font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0; }
.artifact { margin: 17px 0; border: 1px solid #e7e7df; border-radius: 15px; overflow: hidden; background: #fff; }
.artifact-toolbar { min-height: 60px; padding: 10px 16px 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f4f4f0; }
.artifact-title { font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; color: #6e7364; }
.artifact-actions, .artifact-tabs { display: flex; align-items: center; gap: 5px; }
.artifact-actions button { padding: 7px 10px; border: 0; background: transparent; border-radius: 7px; color: #7d8174; font-size: 11px; }
.artifact-actions button:hover { background: #e9eae2; }
.artifact-tabs { margin-right: 9px; }
.artifact-tabs button[aria-selected="true"] { background: white; color: #3d4534; box-shadow: 0 1px 4px #0000000a; }
.artifact pre { margin: 0; padding: 22px; overflow: auto; max-height: 620px; min-height: 100px; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; color: #495241; tab-size: 2; }
.preview { background: #fff; min-height: 180px; }
.preview iframe { display: block; width: 100%; height: min(68vh, 740px); min-height: 400px; border: 0; background: #fff; }
.preview img { display: block; width: 100%; max-height: 740px; min-height: 160px; object-fit: contain; }
.artifact-note { margin: 0; padding: 9px 20px; border-top: 1px solid #eeeee7; color: #9a9e90; font-size: 10px; }
.artifact:fullscreen { overflow: auto; border-radius: 0; display: flex; flex-direction: column; }
.artifact:fullscreen .preview { flex: 1; }
.artifact:fullscreen .preview iframe { height: calc(100vh - 90px); }
.artifact:fullscreen .preview img { max-height: calc(100vh - 90px); }
.artifact:fullscreen pre { max-height: none; flex: 1; }
.turn-status { color: #92988a; font-size: 11px; padding: 8px 0; }
.turn[data-status="working"] .assistant-label::before { animation: breathe 1.4s ease-in-out infinite; }
#notice { margin: 15px 0; padding: 14px 18px; border-radius: 10px; color: #9c563a; background: #fff0e7; font-size: 13px; line-height: 1.6; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #343d2e; color: #fff; border-radius: 10px; padding: 12px 20px; font-size: 12px; z-index: 3; box-shadow: 0 4px 20px #0002; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
@media (min-width: 900px) and (min-height: 850px) { .welcome { padding-top: 85px; padding-bottom: 57px; } .examples { margin-top: 45px; } .example-art { height: 155px; } }
@media (max-width: 700px) {
  .topbar { height: 68px; padding: 0 20px; } .brand { gap: 8px; font-size: 14px; } .brand-mark { width: 32px; height: 32px; }
  .topbar-actions { gap: 10px; } .topbar-actions > a, #connection { display: none; }
  main { padding: 0 18px; } .welcome { padding: 44px 0 32px; } h1 { letter-spacing: -1.8px; } .welcome > p { font-size: 12px; }
  .examples { gap: 9px; margin-top: 27px; } .example-art { height: 100px; } .poster-art { padding: 10px; } .poster-art > span { font-size: 25px; } .poster-art i { font-size: 75px; top: 15px; right: -13px; }
  .mini-clock { font-size: 29px; } .mini-title { font-size: 6px; } .orbit-art i { width: 87px; height: 37px; } .orbit-art > span { font-size: 22px; }
  .example-label { padding: 12px 9px; } .example-label strong { font-size: 10px; } .example-label > span { font-size: 9px; line-height: 1.5; } .example-label b { display: none; }
  .composer { padding: 16px; border-radius: 15px; } .composer-options { gap: 8px; } .key-hint, .option-divider, .thinking-toggle > span { display: none; } .send-actions { gap: 7px; }
  .limit-label { font-size: 10px; } #max-tokens { width: 65px; } .thinking-toggle { font-size: 10px; } .send { width: 34px; height: 34px; }
  .metrics { grid-template-columns: repeat(2, 1fr); padding: 18px 4px; gap: 22px 0; } .metric { padding: 0 16px; } .metric:nth-child(odd):not(.peak-metric) { border-right: 0; } .metric strong { font-size: 27px; }
  .peak-metric { margin: -8px 5px 0; padding: 14px 12px; gap: 8px; } .peak-metric strong { font-size: 32px; } .peak-metric span { font-size: 12px; } .peak-metric small { font-size: 9px; } .peak-value { gap: 5px; }
  .artifact-toolbar { padding: 10px; gap: 4px; } .artifact-actions { gap: 1px; } .artifact-actions button { padding: 7px; } .artifact-tabs { margin-right: 2px; } .artifact-title { font-size: 10px; }
  #detail-values { grid-template-columns: 1fr; } .user-message { max-width: 93%; } .preview iframe { min-height: 420px; }
}

#endpoint-model { display: block; margin-top: 6px; width: 100%; }
.auth-fields { display: grid; gap: 8px; margin-top: 16px; }
.auth-fields input:not([type="checkbox"]), .auth-fields select { display: block; width: 100%; padding: 10px 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #30312c; }
.auth-fields .quiet { justify-self: start; }
.auth-fields p { margin: 0; }
.endpoint-row + label { display: block; margin-top: 12px; }
