@font-face {
  font-family: "Anton";
  src: url("assets/fonts/anton-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("assets/fonts/oswald-500-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/bebas-neue-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Archivo Black";
  src: url("assets/fonts/archivo-black-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("assets/fonts/oswald-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-600-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-700-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-400-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("assets/fonts/roboto-condensed-700-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-400-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/space-mono-700-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #201f1d;
  --muted: #7d7971;
  --muted-strong: #5f5b55;
  --paper: #f3f1eb;
  --panel: #faf8f3;
  --field: #fdfcf8;
  --stage: #e9e6df;
  --line: #d8d4cb;
  --line-soft: #e5e1d9;
  --card: #242a2f;
  --card-ink: #f7f7f4;
  --green: #6e7d61;
  --amber: #a8732a;
  --red: #9c4c43;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
[contenteditable] {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: var(--ink);
  background: #d8d2c5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* — Top bar ——————————————————————————————————————————— */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #f8f7f3;
  background: var(--ink);
  font-family: "Anton", var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .035em;
  line-height: 1;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__copy strong {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .055em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand__copy > span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .175em;
  line-height: 1.2;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 72px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .055em;
  white-space: nowrap;
}

.save-state__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  transition: background-color .2s ease;
}

.save-state[data-state="saving"] .save-state__dot {
  background: var(--amber);
}

.save-state[data-state="error"] .save-state__dot {
  background: var(--red);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s var(--ease);
}

.button:hover {
  background: #eae6dd;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.button--quiet {
  color: var(--muted-strong);
}

.button--dark {
  color: #fbfaf7;
  background: var(--ink);
  border-color: var(--ink);
}

.button--dark:hover {
  background: #050505;
}

.button--dark:disabled {
  cursor: wait;
  opacity: .58;
}

.button__icon {
  flex: 0 0 auto;
}

/* — Workspace and stage ——————————————————————————————— */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  min-height: 0;
  overflow: hidden;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 22px 34px 17px;
  overflow: hidden;
  background-color: var(--stage);
  background-image:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .35), transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(32, 31, 29, .075) 0.8px, transparent 0.9px);
  background-size: auto, 24px 24px;
}

.stage__meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  color: rgba(32, 31, 29, .48);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}

.stage__canvas {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.card-shell {
  position: relative;
  flex: 0 0 auto;
  width: 960px;
  height: 540px;
}

.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 675px;
  overflow: hidden;
  color: var(--card-ink);
  background: var(--card);
  transform: scale(.8);
  transform-origin: top left;
  box-shadow:
    0 34px 62px -20px rgba(37, 33, 27, .36),
    0 8px 18px -8px rgba(37, 33, 27, .2);
  isolation: isolate;
}

.card::selection,
.card *::selection {
  color: var(--card-ink);
  background: rgba(255, 255, 255, .24);
}

.card__content {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}

.card__sub {
  display: contents;
}

.card-block {
  position: absolute;
  max-width: 100%;
  min-width: 160px;
  min-height: 1em;
  border-radius: 2px;
  outline: none;
  caret-color: currentColor;
  cursor: text;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
  transition: color .18s ease, background-color .15s ease, box-shadow .15s ease;
}

.card-block[hidden],
.card__sub[hidden] {
  display: none !important;
}

.card-block:hover {
  background: rgba(255, 255, 255, .035);
}

.card-block:focus {
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
}

.card-block:empty::before {
  color: currentColor;
  content: attr(data-placeholder);
  opacity: .32;
  pointer-events: none;
}

.card-block--title {
  top: 201px;
  left: 100px;
  width: 1000px;
  font-family: "Anton", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 120px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.card-block--sub {
  top: 350px;
  left: 130px;
  width: 940px;
  max-width: none;
  font-family: "Roboto Condensed", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 64px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.06;
}

.card-block[data-block="sub2"] {
  top: 418px;
}

.card__tag {
  position: absolute;
  top: 34px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .48);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s var(--ease);
  pointer-events: none;
}

.card__tag::after {
  width: 28px;
  height: 1px;
  margin-left: 2px;
  background: currentColor;
  content: "";
  opacity: .6;
}

.card[data-active] .card__tag {
  opacity: 1;
  transform: translateY(0);
}

#cardTagIndex {
  color: rgba(255, 255, 255, .72);
}

.stage__hint {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 0;
  color: rgba(32, 31, 29, .55);
  font-size: 10px;
  letter-spacing: .045em;
  line-height: 1.4;
}

.stage__shortcut {
  color: rgba(32, 31, 29, .38);
}

/* — Inspector ——————————————————————————————————————— */

.inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 27px 26px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--panel);
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #cbc6bc transparent;
}

.inspector::-webkit-scrollbar {
  width: 8px;
}

.inspector::-webkit-scrollbar-thumb {
  background: #cbc6bc;
  border: 2px solid var(--panel);
  border-radius: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .19em;
  line-height: 1;
  text-transform: uppercase;
}

.inspector__intro {
  flex: 0 0 auto;
}

.inspector__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.inspector__title-row h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}

.inspector__lead {
  max-width: 280px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .015em;
  line-height: 1.65;
}

.controls {
  flex: 0 0 auto;
  margin-top: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.control {
  position: relative;
  padding: 13px 0 14px;
  border-top: 1px solid var(--line-soft);
}

.control__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.control__identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.control__number {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .03em;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.control h2 {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.3;
}

.control__hint {
  margin-left: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .01em;
}

.control.is-active .control__number {
  color: #fbfaf7;
  background: var(--ink);
  border-color: var(--ink);
}

.size-field {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: 69px;
  height: 31px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 9.5px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.size-field:focus-within {
  border-color: var(--muted-strong);
  box-shadow: 0 0 0 3px rgba(32, 31, 29, .07);
}

.size-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.size-field input::-webkit-outer-spin-button,
.size-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.size-field span {
  margin-left: 4px;
  font-size: 8.5px;
  letter-spacing: .04em;
}

.space-field {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 6px;
  color: var(--muted);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 8.5px;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.space-field:focus-within {
  border-color: var(--muted-strong);
  box-shadow: 0 0 0 3px rgba(32, 31, 29, .07);
}

.space-field__label {
  letter-spacing: .035em;
}

.space-field input {
  width: 24px;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.space-field input::-webkit-outer-spin-button,
.space-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.space-field__unit {
  font-size: 8px;
  letter-spacing: .035em;
}

.text-field {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 10px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  font-size: 12px;
  letter-spacing: .01em;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.text-field:hover {
  border-color: #c8c3b8;
}

.text-field:focus {
  background: #fffefb;
  border-color: var(--muted-strong);
  box-shadow: 0 0 0 3px rgba(32, 31, 29, .07);
}

.font-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.font-field__label {
  flex: 0 0 auto;
  color: var(--muted-strong);
  font-size: 10px;
  letter-spacing: .02em;
  line-height: 1;
}

.font-field__control {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.font-select {
  width: 100%;
  height: 30px;
  padding: 0 26px 0 9px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.font-select:hover {
  border-color: #c8c3b8;
}

.font-select:focus {
  background: #fffefb;
  border-color: var(--muted-strong);
  box-shadow: 0 0 0 3px rgba(32, 31, 29, .07);
}

.font-field__chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.type-style {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  height: 30px;
  overflow: hidden;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.style-toggle {
  display: grid;
  width: 27px;
  padding: 0;
  place-items: center;
  color: var(--muted-strong);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.style-toggle:first-child {
  border-left: 0;
}

.style-toggle:hover {
  background: #eeeae2;
}

.style-toggle[aria-pressed="true"] {
  color: #fbfaf7;
  background: var(--ink);
}

.style-toggle:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.style-toggle--bold span {
  font-weight: 700;
}

.style-toggle--italic span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 600;
}

.control__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  margin-top: 8px;
}

.color-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  color: var(--muted-strong);
  border-radius: 4px;
  cursor: pointer;
}

.color-control__swatch {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--swatch-color, #f7f7f4);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .14),
    0 0 0 1px rgba(32, 31, 29, .12);
  transition: transform .16s var(--ease);
}

.color-control:hover .color-control__swatch {
  transform: scale(1.08);
}

.color-control__label {
  font-size: 10px;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}

.color-control__value {
  color: #a39e94;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.color-control__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.color-control:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.visibility-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0;
  color: var(--muted-strong);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.visibility-toggle__track {
  position: relative;
  width: 27px;
  height: 15px;
  background: #d4cfc5;
  border-radius: 999px;
  transition: background-color .18s ease;
}

.visibility-toggle__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(32, 31, 29, .18);
  content: "";
  transition: transform .18s var(--ease);
}

.visibility-toggle:hover .visibility-toggle__track {
  background: #bbb6ab;
}

.visibility-toggle[aria-pressed="true"] .visibility-toggle__track {
  background: var(--ink);
}

.visibility-toggle[aria-pressed="true"] .visibility-toggle__track::after {
  transform: translateX(12px);
}

.visibility-toggle[aria-pressed="false"] .visibility-toggle__label {
  color: #a39e94;
}

.visibility-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.control.is-hidden .control__identity h2 {
  color: var(--muted);
}

.control.is-hidden .control__number {
  opacity: .55;
}

.control.is-hidden .text-field {
  color: #9b968c;
  background: #f6f3ed;
}

.control.is-hidden .font-select {
  color: #9b968c;
  background: #f6f3ed;
}

.control.is-hidden .font-field__label {
  color: #a39e94;
}

.control.is-hidden .type-style {
  opacity: .68;
}

.control.is-hidden .space-field {
  opacity: .68;
}

.control.is-hidden .color-control {
  opacity: .72;
}

.range-row {
  margin-top: 6px;
}

.range {
  display: block;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  outline: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: #d6d1c7;
  border-radius: 2px;
}

.range::-moz-range-track {
  width: 100%;
  height: 2px;
  background: #d6d1c7;
  border-radius: 2px;
}

.range::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5.5px;
  background: var(--ink);
  border: 2px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: transform .14s var(--ease);
}

.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--ink);
  border: 2px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ink);
}

.range:hover::-webkit-slider-thumb {
  transform: scale(1.12);
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px rgba(32, 31, 29, .16);
}

.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px rgba(32, 31, 29, .16);
}

.inspector__foot {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 22px;
}

.local-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 10px;
  letter-spacing: .015em;
  line-height: 1.5;
}

.local-note__dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}

.key-hint {
  margin: 9px 0 0;
  color: #a09b91;
  font-size: 9.5px;
  letter-spacing: .015em;
  line-height: 1.65;
}

/* — Toast ————————————————————————————————————————————— */

.toast {
  position: fixed;
  z-index: 30;
  bottom: 22px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
  padding: 9px 10px 9px 15px;
  color: #f6f4ee;
  background: #1d1c1a;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  box-shadow: 0 12px 32px rgba(24, 22, 18, .25);
  font-size: 11px;
  letter-spacing: .02em;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .25s var(--ease);
  pointer-events: none;
}

.toast[hidden] {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast button {
  height: 25px;
  padding: 0 9px;
  color: #f6f4ee;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
}

.toast button:hover {
  background: rgba(255, 255, 255, .18);
}

.toast button:focus-visible {
  outline: 2px solid #f6f4ee;
  outline-offset: 2px;
}

/* — Responsive ——————————————————————————————————————— */

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .topbar {
    padding: 0 20px;
  }

  .inspector {
    padding-right: 22px;
    padding-left: 22px;
  }

  .stage {
    padding-right: 26px;
    padding-left: 26px;
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-rows: 66px auto;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .stage {
    min-height: 58vh;
    padding: 18px 24px 15px;
  }

  .inspector {
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 25px 24px 28px;
  }

  .controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
    margin-top: 20px;
  }

  .control {
    min-width: 0;
    padding: 16px 0;
  }

  .control__hint {
    display: block;
    margin: 2px 0 0;
  }

  .control__identity {
    align-items: flex-start;
  }

  .inspector__lead {
    max-width: 440px;
  }

  .inspector__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 0;
    padding-top: 18px;
  }

  .key-hint {
    max-width: 330px;
    margin-top: 0;
    text-align: right;
  }
}

@media (max-width: 720px) {
  .topbar {
    gap: 12px;
    padding: 0 16px;
  }

  .brand {
    gap: 9px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .brand__copy > span {
    display: none;
  }

  .brand__copy strong {
    font-size: 12px;
  }

  .save-state {
    min-width: 0;
    margin-right: 0;
  }

  .save-state span:last-child {
    display: none;
  }

  .button {
    height: 34px;
    padding: 0 12px;
    font-size: 11px;
  }

  #resetButton {
    display: none;
  }

  .stage {
    min-height: 300px;
    padding: 15px 16px 13px;
  }

  .stage__meta {
    font-size: 8px;
    letter-spacing: .13em;
  }

  .stage__hint {
    margin-top: 9px;
    font-size: 9px;
  }

  .stage__shortcut {
    display: none;
  }

  .inspector {
    padding: 22px 18px 26px;
  }

  .inspector__title-row h1 {
    font-size: 20px;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 18px;
  }

  .control {
    padding: 16px 0;
  }

  .control__hint {
    display: inline;
    margin: 0 0 0 2px;
  }

  .control__identity {
    align-items: center;
  }

  .inspector__foot {
    display: block;
    padding-top: 16px;
  }

  .key-hint {
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: space-between;
    transform: translateY(8px);
  }

  .toast.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .topbar__actions {
    gap: 4px;
  }

  .button--dark {
    padding: 0 10px;
  }

  .button--dark .button__icon {
    display: none;
  }

  .stage {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 721px) and (max-width: 920px) {
  .color-control__value {
    display: none;
  }

  .space-field {
    gap: 2px;
    padding: 0 5px;
  }

  .space-field__label {
    display: none;
  }

  .space-field::before {
    color: var(--muted);
    content: "↑";
    font-size: 9px;
    line-height: 1;
  }
}
