:root {
  color-scheme: light;
  --color-1: #E57B65;
  --color-2: #F1D8A5;
  --color-3: #376B61;
  --ink: #272b31;
  --muted: #62656a;
  --line: #deded8;
  --paper: #faf9f5;
  --accent: #3d4a42;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, select, input, textarea { border: 1px solid var(--line); border-radius: 10px; }
button {
  min-height: 44px;
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.4;
  transition: background-color 140ms ease, border-color 140ms ease;
}
button:hover:not(:disabled) { background: #f0f2ee; border-color: #89978c; }
button:disabled { cursor: not-allowed; background: #e7e8e3; color: #676b66; }
:focus-visible { outline: 3px solid #465cab; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: 1.15rem; line-height: 1.4; margin-bottom: 8px; }
h3 { font-size: 1rem; margin-bottom: 0; }
p { margin-bottom: 12px; }
.page-width { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 26px; border-bottom: 1px solid var(--line); }
.studio { display: flex; align-items: center; gap: 12px; font-size: .7rem; letter-spacing: .13em; font-weight: 750; }
.studio-mark { display: flex; padding-left: 0; }
.studio-mark i { display: block; width: 18px; height: 18px; border-radius: 50%; background: #e57b65; }
.studio-mark i + i { margin-left: -4px; background: #f1d8a5; }
.studio-mark i:last-child { background: #376b61; }
.language-control { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-control label { font-size: .8rem; color: var(--muted); }
select { min-height: 44px; padding: 8px 12px; background: #fff; color: var(--ink); }
.hero { padding: 56px 0 36px; max-width: 780px; }
.eyebrow { font-size: .8rem; font-weight: 700; color: #576c60; letter-spacing: .14em; margin-bottom: 12px; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3.15rem); letter-spacing: -.035em; line-height: 1.25; margin-bottom: 20px; }
.intro { color: var(--muted); max-width: 650px; font-size: 1rem; }
.muted { color: var(--muted); font-size: .9rem; }
.small { font-size: .78rem; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.section-toolbar p { margin-bottom: 0; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); padding-inline: 22px; flex-shrink: 0; }
.primary:hover:not(:disabled) { background: #293a30; border-color: #293a30; }
.lock-hint { font-size: .8rem; color: var(--muted); margin: 14px 0 20px; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.swatch-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 18px #272b3105; }
.color-surface { height: 210px; background: var(--swatch); border-radius: 17px 17px 0 0; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.swatch-number, .swatch-code { background: #fff; color: #272b31; border: 1px solid #272b311c; border-radius: 7px; padding: 4px 9px; font-size: .8rem; }
.swatch-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.swatch-code { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; letter-spacing: .035em; }
.swatch-details { padding: 18px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.lock { font-size: .8rem; padding: 8px 12px; }
.lock[aria-pressed="true"] { background: #e5eee7; border-color: #728b79; color: #304b39; }
.color-inputs { display: grid; grid-template-columns: minmax(82px, .8fr) minmax(0, 1.2fr); gap: 12px; }
.color-inputs > div { min-width: 0; }
label { display: block; font-size: .78rem; font-weight: 650; margin-bottom: 6px; }
.language-control label { margin-bottom: 0; }
input { width: 100%; height: 46px; background: #fff; color: var(--ink); }
input[type="color"] { padding: 5px; cursor: pointer; }
input[type="text"] { padding: 9px; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }
input[aria-invalid="true"] { border: 2px solid #a32d2d; background: #fff8f7; }
.field-error { font-size: .78rem; color: #942525; margin: 10px 0 0; }
.copy-one { width: 100%; margin-top: 16px; font-size: .85rem; }
.workspace-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; min-width: 0; }
.preview-art { height: 224px; border-radius: 12px; background: var(--color-2); position: relative; overflow: hidden; margin-top: 22px; }
.preview-circle { width: 185px; height: 185px; border-radius: 50%; background: var(--color-1); position: absolute; left: 9%; top: 24px; }
.preview-block { width: 43%; height: 112px; border-radius: 12px 70px 12px 12px; background: var(--color-3); position: absolute; right: 9%; bottom: 26px; }
.preview-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--color-3); position: absolute; right: 12%; top: 30px; }
.preview-strip { display: flex; height: 14px; border-radius: 20px; overflow: hidden; margin-top: 16px; }
.preview-strip span:nth-child(1) { width: 48%; background: var(--color-1); }
.preview-strip span:nth-child(2) { width: 28%; background: var(--color-2); }
.preview-strip span:nth-child(3) { width: 24%; background: var(--color-3); }
.export-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.export-actions button { flex: 1 1 140px; font-size: .85rem; }
.status { color: #3d5545; font-size: .83rem; margin: 14px 0; min-height: 1.65em; }
textarea { display: block; width: 100%; padding: 13px 15px; resize: vertical; min-height: 80px; background: #f6f7f3; color: #303c34; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; line-height: 1.6; }
#selection-hint { margin: 10px 0 0; }
.notice { padding: 12px 14px; border: 1px solid #bd9859; border-radius: 10px; color: #634313; background: #fff6e3; font-size: .85rem; }
.about { padding: 48px 0 20px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 40px; margin: 24px 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 16px; }
dt { font-size: .88rem; font-weight: 700; margin-bottom: 8px; }
dd { margin: 0; color: var(--muted); font-size: .85rem; }
footer { border-top: 1px solid var(--line); padding-block: 24px 34px; font-size: .75rem; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .swatches { gap: 12px; }
  .swatch-details { padding: 14px; }
  .color-inputs { grid-template-columns: minmax(70px, .7fr) minmax(0, 1.3fr); gap: 8px; }
  .color-inputs label { font-size: .7rem; }
  .studio { letter-spacing: .06em; }
}

@media (max-width: 700px) {
  .page-width { width: calc(100% - 32px); }
  .site-header { align-items: flex-start; padding-block: 18px; gap: 12px; }
  .studio { max-width: 160px; font-size: .6rem; gap: 8px; padding-top: 10px; }
  .studio-mark i { width: 14px; height: 14px; }
  .language-control { flex-direction: column; align-items: flex-start; gap: 4px; }
  .language-control label { font-size: .7rem; }
  select { font-size: .85rem; padding-inline: 8px; }
  .hero { padding: 36px 0 24px; }
  .section-toolbar { flex-direction: column; align-items: stretch; gap: 16px; }
  .swatches, .workspace-bottom, .facts { grid-template-columns: minmax(0, 1fr); }
  .swatches { gap: 18px; }
  .color-surface { height: 165px; }
  .swatch-details { padding: 18px; }
  .color-inputs { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; }
  .color-inputs label { font-size: .78rem; }
  .panel { padding: 20px; }
  .facts { gap: 20px; }
  .about { padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
