:root {
  --paper: #f5f1e7;
  --white: #fffcf5;
  --ink: #191826;
  --muted: #605d68;
  --blue: #232ac5;
  --blue-dark: #171d98;
  --yellow: #f3ed5c;
  --line: #c9c3b6;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 3rem, 72rem); margin-inline: auto; padding-bottom: 3.5rem; }
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 5.5rem; border-bottom: 1px solid var(--ink);
}
.brand { display: block; }
.wordmark { display: block; width: clamp(8.25rem, 19vw, 10rem); height: auto; }
.brand-lockup { display: flex; align-items: center; gap: 1.1rem; }
.brand-slogan {
  margin: 0; border-left: 1px solid var(--line); padding-left: 1.1rem;
  color: var(--ink); font-size: .94rem; font-weight: 770;
}
.hostname { font: 600 .875rem/1 var(--mono); }
.workbench {
  display: grid; grid-template-columns: 43fr 57fr;
  margin-top: clamp(2rem, 7vw, 6rem);
  border: 1px solid var(--ink);
  background: var(--white);
}
.intro {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: clamp(28rem, 39vw, 34rem);
  padding: clamp(2rem, 5vw, 4.25rem);
  overflow: hidden; isolation: isolate;
  color: var(--white); background: var(--blue);
  border-right: 1px solid var(--ink);
}
h1 { margin: 0; }
.display-latin, .display-zh { display: block; }
.display-latin {
  font: 950 clamp(3.2rem, 7.2vw, 6.2rem)/.95 "Arial Black", system-ui, sans-serif;
  letter-spacing: -.073em; margin-left: -.045em;
}
.display-zh { margin-top: .55rem; font-size: clamp(2rem, 3.65vw, 3.3rem); line-height: 1.12; letter-spacing: .035em; }
.intro p { max-width: 17rem; margin: 1.45rem 0 0; color: #f5f3ff; line-height: 1.7; }
.motif {
  position: absolute; z-index: -1; bottom: 0; right: -3.25rem;
  display: flex; gap: .9rem; align-items: flex-end; transform: skewX(-29deg);
  opacity: .37;
}
.motif span { display: block; width: clamp(1.4rem, 3.5vw, 3rem); background: #777cff; }
.motif span:nth-child(1) { height: 6rem; }
.motif span:nth-child(2) { height: 8.5rem; }
.motif span:nth-child(3) { height: 11rem; }
.controls { display: flex; flex-direction: column; min-width: 0; }
.generator, .access { padding: clamp(1.5rem, 4vw, 3.4rem); }
.generator { flex: 1; }
.modes { display: flex; gap: 0; margin-bottom: 1.35rem; border-bottom: 1px solid var(--line); }
.modes button { padding: .55rem .85rem; border: 1px solid transparent; background: transparent; color: var(--muted); }
.modes button[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.registry-controls { display: flex; align-items: end; gap: .7rem; }
.select-field { flex: 0 0 auto; }
.image-field { min-width: 0; flex: 1; }
select {
  font: inherit; border: 1px solid var(--ink); border-radius: 0;
  padding: .72rem .4rem; color: var(--ink); background: var(--white);
}
.registry-login { font-size: .875rem; color: var(--muted); line-height: 1.55; margin: .65rem 0 0; }
.registry-login code { font-family: var(--mono); color: var(--blue-dark); overflow-wrap: anywhere; }
.access { border-top: 1px solid var(--ink); background: #ebe6da; }
label { display: block; margin-bottom: .65rem; font-weight: 800; }
#generator > label { font-size: 1.35rem; letter-spacing: .01em; }
.input-group { display: flex; min-width: 0; }
input, button, a { font: inherit; }
input, button { border-radius: 0; }
input {
  flex: 1; width: 100%; min-width: 0;
  padding: .75rem .85rem; border: 1px solid var(--ink);
  color: var(--ink); background: var(--white);
}
input::placeholder { color: #696473; opacity: 1; }
#github-url, #image-reference, .mono { font-family: var(--mono); }
#github-url, #image-reference { font-size: .9rem; }
button, .download {
  padding: .75rem 1rem; border: 1px solid var(--ink);
  white-space: nowrap; font-weight: 750; cursor: pointer;
}
.primary, .outline, .copy { border-left: 0; }
.primary { color: var(--ink); background: var(--yellow); min-width: 5rem; }
.primary:hover { background: #e4db34; }
.outline { color: var(--white); background: var(--blue); }
.outline:hover { background: var(--blue-dark); }
button:disabled { opacity: .68; cursor: wait; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.input-group :focus-visible { z-index: 1; }
.text-button {
  border: 0; background: none; color: var(--blue-dark); padding: 0;
  text-decoration: underline; text-underline-offset: .21em; text-decoration-thickness: 1px;
}
.text-button:hover { color: var(--ink); }
.examples { display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem .95rem; margin-top: .95rem; color: var(--muted); font-size: .875rem; }
.feedback { min-height: 1.4em; margin: .75rem 0 0; color: var(--blue-dark); font-size: .895rem; line-height: 1.5; }
.feedback:empty { display: none; }
.result { margin-top: 1.55rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.result label { font-size: .9rem; }
.terminal { background: var(--ink); color: var(--white); align-items: stretch; }
.terminal > span { font: 700 .9rem var(--mono); margin: auto 0 auto .8rem; color: var(--yellow); }
.terminal .mono { border: 0; background: none; color: inherit; font-size: .86rem; }
.copy { border: 1px solid var(--ink); background: #dddafe; color: var(--ink); }
.copy:hover { background: var(--yellow); }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .85rem; margin-top: .9rem; }
.result-actions p { margin: 0; color: var(--muted); font-size: .875rem; }
.download { display: inline-flex; color: var(--white); background: var(--blue); text-decoration: none; padding: .5rem .8rem; }
.download:hover { background: var(--blue-dark); }
#authenticated { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.access-state { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; }
.access-state::before { content: ""; width: .55rem; height: .55rem; background: #267347; }

@media (max-width: 52rem) {
  .workbench { grid-template-columns: 1fr; margin-top: 1.4rem; }
  .intro { min-height: 0; border-right: 0; border-bottom: 1px solid var(--ink); }
  .intro p { max-width: 24rem; margin-top: 1.15rem; }
  .motif { right: -.65rem; opacity: .27; }
  .motif span:nth-child(1) { height: 4.5rem; }
  .motif span:nth-child(2) { height: 6.5rem; }
  .motif span:nth-child(3) { height: 8.5rem; }
}
@media (max-width: 29rem) {
  .shell { width: calc(100% - 1.5rem); }
  .masthead { min-height: 4.6rem; gap: .6rem; }
  .brand-lockup { align-items: flex-start; flex-direction: column; gap: 0; padding-bottom: .45rem; }
  .brand-slogan { margin-left: .25rem; padding: 0; border: 0; font-size: .825rem; }
  .intro, .generator, .access { padding: 1.25rem; }
  .display-latin { font-size: clamp(2.8rem, 13vw, 3.7rem); }
  .display-zh { font-size: 2rem; }
  .motif { right: -2rem; }
  .primary { min-width: 0; }
  input, button { padding-inline: .6rem; }
  #github-url, #image-reference, #token { font-size: 1rem; }
  #github-url::placeholder { font-size: .85rem; }
  .registry-controls { align-items: stretch; flex-direction: column; }
  select { width: 100%; }
}
@media (forced-colors: active) {
  .access-state::before { background: Highlight; }
  .terminal { border: 1px solid CanvasText; }
}
