:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --surface: #fffef9;
  --soft: #eeeae0;
  --ink: #20372f;
  --muted: #59675f;
  --line: #d4d2c4;
  --accent: #244c40;
  --on-accent: #fffdf3;
  --header-bg: #f8f6ef;
  --header-ink: #20372f;
  --assistant-bg: #fffef9;
  --user-bg: #e3ebe1;
  --user-ink: #1e3f32;
  --metal: #927048;
  --display-font: "Baskervville", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --body-font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wheel-bg: #f4ecd7;
  --wheel-grid: #9a9b82;
  --wheel-text: #354738;
  --wheel-outer: #b8d2cc;
  --wheel-inner: #ead294;
  --wheel-symbol: #24332d;
  --wheel-asc: #9a662a;
  --wheel-mc: #427478;
  --aspect-hard: #ae6659;
  --aspect-soft: #4b8582;
  --aspect-conjunction: #9b803d;
  --header-height: 76px;
  --page-gutter: clamp(20px, 5vw, 70px);
  --content-width: 1136px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--body-font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection { background: var(--accent); color: var(--on-accent); }
.icon-library, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.icon, .brand-symbol, .prompt-icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon { width: 17px; height: 17px; stroke-width: 1.65; flex-shrink: 0; }
.topbar {
  color: var(--header-ink);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner, .shell {
  width: min(var(--content-width), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}
.header-inner {
  min-height: calc(var(--header-height) - 1px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-symbol { width: 41px; height: 41px; stroke-width: 1.35; color: var(--accent); }
.brand-wordmark { display: grid; gap: 3px; }
.brand-title { font: 600 22px/1.15 var(--display-font); letter-spacing: .09em; }
.brand-english { font: 12px/1.1 Georgia, serif; font-style: italic; letter-spacing: .045em; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.language-switch {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: inherit;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
}
.language-switch:hover { background: var(--soft); }
.top-actions button {
  min-height: 36px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
}
.top-actions button:hover { background: var(--soft); }
.top-actions #themeToggle { border-color: var(--line); }
.account-mark { font: 18px/1 Georgia, serif; }
.chevron { width: 12px; height: 12px; }
.header-divider { width: 1px; height: 18px; margin-inline: 4px; background: var(--line); }
.shell { padding-block: 0 40px; }
.intro {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 4vw, 68px);
  align-items: center;
  padding-block: clamp(24px, 3.1vw, 46px);
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .19em;
}
.hero-kicker span { width: 33px; height: 1px; background: var(--metal); }
.hero-title {
  margin: 0;
  font: 500 clamp(47px, 4.7vw, 70px)/1.14 var(--display-font);
  letter-spacing: -.04em;
}
.title-line, .title-accent { display: block; }
.title-accent { color: var(--accent); font-style: normal; }
.hero-description {
  max-width: 31em;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: clamp(13px, 1.15vw, 15px);
}
.hero-art {
  position: relative;
  isolation: isolate;
  margin: 0;
  justify-self: end;
  width: min(94%, 460px);
  aspect-ratio: 1.71;
}
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-theme="atlas"] .hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px -4px -4px 5px;
  transform: rotate(2.4deg);
  background: #e3dfcf;
  border: 1px solid #c6bfa9;
}
html[data-theme="atlas"] .hero-art img {
  object-position: 63% 50%;
  transform: rotate(-1.3deg);
  box-shadow: 0 3px 10px rgb(49 43 25 / 10%);
}
.composer {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 19px 13px;
  box-shadow: 0 7px 22px -15px rgb(56 60 36 / 30%);
}
.composer:focus-within { border-color: var(--accent); }
.composer-top, .composer-footer, .section-heading, .chart-card-heading, .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.composer-top label { font: 600 17px/1.35 var(--display-font); }
.prompt-chip, #morePrompts, .close-dialog {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 4px 0 4px 8px;
  font-size: 12px;
}
.prompt-chip:hover, #morePrompts:hover { color: var(--accent); text-decoration: underline; }
.composer textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  height: 45px;
  margin-block: 8px 7px;
  padding: 0;
  resize: none;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: 15px/1.55 var(--body-font);
}
.composer textarea::placeholder { color: var(--muted); opacity: .85; }
.composer textarea:focus { outline: 0; }
.composer-footer p {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}
.composer-footer p::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
}
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.send-button:hover:not(:disabled) { filter: brightness(1.12); }
.prompt-library { margin-top: 27px; }
.contact-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
}
.contact-footer a { color: inherit; }
.contact-footer a:hover { color: var(--accent); }
.privacy-page { min-height: 100dvh; }
.privacy-main { width: min(760px, calc(100% - 2 * var(--page-gutter))); margin: 0 auto; padding: clamp(38px, 8vw, 78px) 0 56px; }
.privacy-main h1 { margin: 0; font: 500 clamp(36px, 5vw, 54px)/1.2 var(--display-font); }
.privacy-main h2 { margin: 31px 0 8px; font: 600 22px/1.35 var(--display-font); }
.privacy-main p, .privacy-main li { color: var(--muted); overflow-wrap: anywhere; }
.privacy-main li { margin: 8px 0; }
.privacy-intro { margin-top: 15px; font-size: 16px; }
.privacy-language { display: flex; gap: 8px; margin-top: 23px; }
.privacy-language a { color: var(--accent); }
.privacy-section { scroll-margin-top: 26px; padding-top: 1px; }
.section-heading { margin-bottom: 11px; }
.section-heading h2 { margin: 0; font: 600 21px/1.4 var(--display-font); }
.prompt-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prompt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 79px;
  padding: 13px 17px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: background .16s, border-color .16s;
}
.prompt-card:hover { background: var(--surface); border-color: var(--accent); }
.prompt-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 41px;
  aspect-ratio: 1;
  color: var(--metal);
}
.prompt-icon svg { width: 36px; height: 36px; stroke-width: 1.25; }
.prompt-label { display: grid; gap: 1px; }
.prompt-label b { font: 600 18px/1.5 var(--display-font); }
.prompt-label small { color: var(--muted); font-size: 12px; }
.card-arrow { align-self: start; margin-left: auto; color: var(--muted); font: 15px/1.4 var(--body-font); }
.shell:has(.has-conversation) { height: calc(100dvh - var(--header-height)); padding-block: 14px max(14px, env(safe-area-inset-bottom)); }
.conversation.has-conversation { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
.has-conversation .intro, .has-conversation .prompt-library, .has-conversation .composer-top { display: none; }
.has-conversation .contact-footer { display: none; }
.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  min-height: 0;
  padding: 6px 4px 16px;
  overscroll-behavior: contain;
  scrollbar-color: var(--line) transparent;
}
.messages:empty, .chat-status:empty { display: none; }
.has-conversation .chat-status:empty { display: block; height: 9px; }
.messages > * { flex-shrink: 0; }
.message { display: flex; align-items: flex-start; gap: 11px; width: fit-content; max-width: min(91%, 880px); }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 13px var(--display-font);
}
.user .avatar { display: none; }
.message-body {
  min-width: 0;
  padding: 12px 16px;
  background: var(--assistant-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px 12px 12px;
}
.user .message-body { color: var(--user-ink); background: var(--user-bg); border-color: transparent; border-radius: 12px 3px 12px 12px; }
.message-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.75; }
.message time { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.user time { display: none; }
.chat-status, .dialog-status { color: var(--muted); margin: 6px 0; font-size: 13px; }
.error { color: var(--error, #a14d42); }
.choice-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.secondary-button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.secondary-button:hover:not(:disabled) { border-color: var(--accent); }
.chart-card {
  margin-left: 39px;
  padding: 18px 21px;
  width: min(calc(100% - 39px), 850px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.chart-card-heading { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.chart-kicker { margin: 0 0 3px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.chart-card h2 { margin: 0; font: 600 25px/1.35 var(--display-font); }
.chart-meta, .chart-limitations { color: var(--muted); font-size: 12px; margin: 9px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 18px; padding-top: 12px; }
.chart-visual { width: 100%; max-width: 310px; margin: auto; }
.chart-visual svg { display: block; width: 100%; height: auto; }
.chart-details { min-width: 0; }
.chart-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0 0 13px; }
.chart-summary dt { color: var(--muted); font-size: 12px; }
.chart-summary dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.chart-details details { border-top: 1px solid var(--line); padding: 9px 0; }
.chart-details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.position-list, .aspect-list { list-style: none; margin: 7px 0 0; padding: 0; font-size: 13px; }
.position-list li, .aspect-list li { padding: 3px 0; }
.aspect-group { font-weight: 700; color: var(--accent); }
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 100px rgb(12 20 21 / 24%);
  max-height: calc(100dvh - 30px);
  overflow: auto;
}
dialog::backdrop { background: rgb(15 23 24 / 52%); }
.dialog-heading { align-items: flex-start; }
.dialog-heading h2 { margin: 0; font: 600 26px/1.3 var(--display-font); }
.close-dialog { display: grid; place-items: center; min-width: 32px; min-height: 32px; padding: 0; font-size: 24px; line-height: 1; }
.design-dialog { width: min(680px, calc(100vw - 30px)); padding: 25px; }
.design-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.design-options button { display: grid; text-align: left; padding: 0 0 12px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.design-options button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.design-options img { width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.design-options b { margin: 11px 10px 1px; font: 600 17px/1.4 var(--display-font); }
.design-options small { margin-inline: 10px; font-size: 11px; color: var(--muted); }
.gemini-dialog { width: min(510px, calc(100vw - 30px)); padding: 24px; }
.account-dialog { width: min(510px, calc(100vw - 30px)); padding: 24px; }
.google-sign-in { min-height: 42px; margin-top: 20px; }
.history-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.history-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.history-heading h3 { margin: 0; font: 600 18px/1.4 var(--display-font); }
.history-list { display: grid; gap: 7px; max-height: min(42dvh, 330px); overflow: auto; margin: 12px 0; }
.history-item { display: grid; width: 100%; gap: 2px; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.history-item:hover { border-color: var(--accent); }
.history-item b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item small { color: var(--muted); font-size: 11px; }
.history-more { justify-self: start; }
.gemini-dialog label { display: grid; gap: 6px; margin-top: 17px; font-size: 14px; }
.provider-choice { display: flex; gap: 17px; margin: 18px 0 0; padding: 0; border: 0; }
.provider-choice legend { margin-bottom: 7px; font-size: 14px; }
.provider-choice label { display: inline-flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; }
.provider-choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.gemini-dialog input, .gemini-dialog select {
  width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 5px; padding-inline: 10px;
  background: var(--paper); color: var(--ink); font-size: 16px;
}
.dialog-heading p, .key-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.model-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.danger-button { margin-right: auto; }
@media (max-width: 760px) {
  :root { --header-height: 64px; }
  .header-inner, .shell { width: calc(100% - 2 * var(--page-gutter)); }
  .top-actions { gap: 2px; }
  .header-divider { margin-inline: 2px; }
  .hero-title { font-size: clamp(38px, 6.5vw, 50px); }
  .hero-description { margin-top: 12px; }
  .intro { gap: 16px; }
  .hero-art { width: 95%; }
  .prompt-card { gap: 6px; padding: 11px; }
  .prompt-icon { width: 34px; }
  .prompt-icon svg { width: 31px; height: 31px; }
}
@media (max-width: 580px) {
  :root { --page-gutter: 17px; --header-height: 61px; }
  .header-inner { gap: 6px; }
  .brand { gap: 4px; }
  .brand-symbol { width: 27px; height: 27px; }
  .brand-title { font-size: 15px; }
  .brand-english { display: none; }
  .top-actions { gap: 0; }
  .top-actions button { min-height: 34px; padding-inline: 6px; font-size: 12px; }
  #newChat span, #openGemini span, .header-divider { display: none; }
  #themeToggle #themeName { display: none; }
  .language-switch { min-height: 34px; padding-inline: 7px; }
  .top-actions #themeToggle { min-height: 34px; }
  .intro { grid-template-columns: 1.1fr .9fr; gap: 10px; padding-block: 27px 23px; }
  .hero-kicker { font-size: 10px; gap: 8px; margin-bottom: 12px; }
  .hero-kicker span { width: 20px; }
  .hero-title { font-size: clamp(32px, 8.5vw, 45px); }
  .hero-description { font-size: 12px; line-height: 1.65; }
  .hero-art { aspect-ratio: .88; }
  .composer { padding: 12px; }
  .composer textarea { font-size: 16px; }
  .prompt-library { margin-top: 21px; }
  .section-heading h2 { font-size: 19px; }
  .prompt-examples { gap: 7px; }
  .prompt-card { min-width: 0; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px; }
  .prompt-label b { font-size: 15px; }
  .prompt-label small { font-size: 10px; }
  .card-arrow { display: none; }
  .chart-layout { grid-template-columns: 1fr; gap: 8px; }
  .chart-card { width: 100%; margin: 0; padding: 13px; }
  .chart-visual { max-width: 270px; }
  .message { max-width: 100%; gap: 7px; }
  .message-body { padding: 9px 12px; }
  .shell:has(.has-conversation) { padding-block: 7px max(8px, env(safe-area-inset-bottom)); }
  .design-dialog, .gemini-dialog, .account-dialog { padding: 17px; }
  .design-options { grid-template-columns: 1fr; gap: 9px; margin-top: 13px; }
  .design-options button { grid-template-columns: 90px 1fr; align-items: end; padding: 0; }
  .design-options img { grid-row: span 2; align-self: stretch; height: 66px; }
  .design-options b { margin: 0 12px; }
  .design-options small { margin: 0 12px; align-self: start; }
}
@media (max-width: 350px) {
  #accountLabel { display: none; }
  .top-actions button { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
