:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-raised: #fffaf0;
  --paper-soft: #ebe6dc;
  --ink: #17130d;
  --muted: #665f55;
  --subtle: #80766a;
  --line: rgba(23, 19, 13, 0.14);
  --line-strong: rgba(23, 19, 13, 0.25);
  --accent: #b66b2f;
  --accent-strong: #8d4d22;
  --forest: #365746;
  --danger: #963e37;
  --deep: #1b1812;
  --on-deep: #f4f1ea;
  --surface: rgba(255, 250, 240, 0.72);
  --surface-strong: rgba(255, 250, 240, 0.94);
  --surface-hover: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 70px rgba(80, 61, 38, 0.12);
  --shadow-small: 0 12px 32px rgba(80, 61, 38, 0.1);
  --radius: 16px;
  --radius-inner: 12px;
  --focus: #8d4d22;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(182, 107, 47, 0.13), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(54, 87, 70, 0.1), transparent 24rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 36rem),
    var(--paper);
  color: var(--ink);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(23, 19, 13, 0.018) 1px, transparent 1px);
  background-size: 100% 26px;
  pointer-events: none;
  content: "";
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 72%, transparent);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1220px, calc(100% - 40px));
  min-height: var(--header-height);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.brand-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
}

.site-nav a:hover {
  background: rgba(23, 19, 13, 0.06);
  color: var(--ink);
}

.site-nav .nav-home {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(46px, 7vw, 92px);
  min-height: calc(100dvh - var(--header-height));
  padding-block: clamp(56px, 8vh, 88px);
}

.hero-copy {
  max-width: 700px;
}

.eyebrow,
.panel-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 17px 0 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(48px, 6.4vw, 86px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero h1 span {
  display: block;
}

.hero-lede {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.85;
}

.hero-actions,
.status-actions,
.form-actions,
.template-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled),
.copy-button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover:not(:disabled) {
  background: #302a20;
}

.button-secondary,
.button-quiet {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  background: var(--surface-hover);
}

.button-quiet {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 14px;
}

.status-panel,
.draft-panel,
.template-panel,
.guide-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent),
    var(--surface);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: clamp(22px, 3vw, 32px);
  transition: border-color 180ms ease;
}

.status-panel[data-state="ready"] {
  border-color: color-mix(in srgb, var(--forest) 42%, var(--line));
}

.status-panel[data-state="not-installed"],
.status-panel[data-state="update"] {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
}

.status-panel[data-state="error"] {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
}

.status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-head h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 900;
}

[data-state="ready"] .status-badge {
  border-color: color-mix(in srgb, var(--forest) 35%, var(--line));
  color: var(--forest);
}

[data-state="not-installed"] .status-badge,
[data-state="update"] .status-badge {
  color: var(--accent-strong);
}

[data-state="error"] .status-badge {
  color: var(--danger);
}

.status-copy {
  min-height: 3.2em;
  margin: 20px 0 0;
  color: var(--muted);
}

.version-list {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
}

.version-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.version-list dt {
  color: var(--muted);
  font-size: 14px;
}

.version-list dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

.status-actions {
  min-height: 48px;
  margin-top: 18px;
}

.loading-line {
  display: block;
  width: min(240px, 72%);
  height: 13px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent),
    rgba(23, 19, 13, 0.08);
  background-size: 180% 100%;
  animation: loading-sweep 1.4s ease-in-out infinite;
}

@keyframes loading-sweep {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -80% 0;
  }
}

.process {
  padding-block: clamp(56px, 8vw, 92px);
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 660px;
}

.section-heading h2,
.install h2,
.privacy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(34px, 4.3vw, 54px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-heading p,
.install-intro > p:not(.panel-label) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading.compact h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.section-heading.compact p {
  font-size: 15px;
}

.section-heading.compact .panel-label {
  margin-bottom: 8px;
  font-size: 12px;
}

.process-list {
  display: grid;
  grid-template-columns: 0.9fr 1.05fr 1.15fr;
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
  border-block: 1px solid var(--line);
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  min-height: 170px;
  padding: 28px 24px;
}

.process-list li + li {
  border-left: 1px solid var(--line);
}

.process-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.process-list h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.process-list p {
  margin: 9px 0 0;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: start;
  gap: 24px;
  padding-block: clamp(38px, 7vw, 84px);
}

.workspace-main {
  display: grid;
  gap: 24px;
}

.draft-panel,
.template-panel,
.guide-panel {
  padding: clamp(22px, 3vw, 32px);
}

.draft-panel {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
}

.draft-loading {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.draft-loading span,
.template-skeleton span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.54), transparent),
    rgba(23, 19, 13, 0.08);
  background-size: 180% 100%;
  animation: loading-sweep 1.4s ease-in-out infinite;
}

.draft-loading span:first-child {
  width: 72%;
}

.draft-loading span:last-child {
  width: 44%;
}

.draft-form {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.save-mode legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.form-field input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 13px;
  background: var(--paper-raised);
  color: var(--ink);
}

.form-field input[type="text"]::placeholder {
  color: var(--subtle);
}

.form-field input[type="text"]:focus {
  border-color: var(--accent-strong);
}

.form-field small {
  color: var(--muted);
}

.save-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0;
  border: 0;
  padding: 0;
}

.save-mode legend {
  width: 100%;
  margin-bottom: 4px;
}

.save-mode label,
.checkbox-field {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
}

.save-mode input,
.checkbox-field input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 3px 0 0;
  accent-color: var(--accent-strong);
}

.checkbox-field {
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 999px;
  padding-inline: 10px;
  color: var(--accent-strong);
  font-weight: 900;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-message {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.inline-message.is-success {
  color: var(--forest);
}

.inline-message.is-error {
  color: var(--danger);
}

.inline-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-height: 230px;
  align-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-inner);
  padding: 30px;
  background: rgba(255, 255, 255, 0.18);
}

.inline-state h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 26px;
}

.inline-state p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.inline-state .button {
  margin-top: 8px;
}

.inline-state-error {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.template-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.template-region {
  min-height: 270px;
}

.template-skeleton {
  display: grid;
  gap: 12px;
}

.template-skeleton > div {
  display: grid;
  gap: 12px;
  min-height: 102px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  padding: 20px;
}

.template-skeleton span:first-child {
  width: 52%;
}

.template-skeleton span:last-child {
  width: 76%;
}

.template-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.template-item {
  display: grid;
  gap: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
}

.template-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.34);
}

.template-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.template-item h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.default-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--forest) 34%, var(--line));
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--forest);
  background: color-mix(in srgb, var(--paper-raised) 82%, var(--forest) 18%);
  font-size: 12px;
  font-weight: 900;
}

.template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.template-meta span {
  overflow-wrap: anywhere;
}

.template-actions {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.template-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.template-action:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(23, 19, 13, 0.05);
}

.template-action-danger {
  color: var(--danger);
}

.guide-panel {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  background: var(--deep);
  color: var(--on-deep);
  box-shadow: 0 24px 70px rgba(23, 19, 13, 0.18);
}

.guide-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 29px;
  line-height: 1.25;
}

.guide-list {
  display: grid;
  gap: 0;
  margin-top: 24px;
}

.guide-list > div {
  border-top: 1px solid rgba(244, 241, 234, 0.16);
  padding: 18px 0;
}

.guide-list strong {
  font-size: 15px;
}

.guide-list p {
  margin: 7px 0 0;
  color: rgba(244, 241, 234, 0.7);
  font-size: 14px;
}

.install {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(42px, 8vw, 100px);
  padding-block: clamp(60px, 9vw, 110px);
  border-top: 1px solid var(--line);
}

.install-intro {
  align-self: start;
}

.install h2 {
  margin-top: 9px;
}

.install-intro .button {
  margin-top: 26px;
}

.install-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 21px 0;
}

.install-list li:first-child {
  border-top: 1px solid var(--line);
}

.install-list li > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.install-list h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.install-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

code {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 6px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.copy-button {
  min-height: 36px;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 12px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.copy-button:hover {
  background: rgba(23, 19, 13, 0.05);
}

.privacy {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: clamp(36px, 8vw, 110px);
  margin-bottom: clamp(54px, 8vw, 90px);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 54px);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper-raised));
}

.privacy h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 46px);
}

.privacy > p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 110px;
}

.footer-brand {
  font-size: 15px;
}

.footer-brand .brand-mark {
  width: 26px;
  height: 26px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(390px, calc(100% - 40px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  padding: 13px 16px;
  background: var(--deep);
  color: var(--on-deep);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 800;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  border-radius: var(--radius-inner);
  padding: 14px 18px;
  background: var(--danger);
  color: #fffaf0;
  text-align: center;
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 760px;
  }

  .status-panel {
    max-width: 700px;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-list li {
    min-height: auto;
    padding-inline: 0;
  }

  .process-list li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    position: static;
  }

  .install {
    grid-template-columns: 1fr;
  }

  .install-intro {
    max-width: 680px;
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 64px;
  }

  .page-shell,
  .nav-shell {
    width: min(100% - 28px, 1180px);
  }

  .site-nav a:not(.nav-home) {
    display: none;
  }

  .brand {
    font-size: 15px;
  }

  .hero {
    gap: 40px;
    padding-block: 48px;
  }

  .hero h1 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .hero-lede {
    margin-top: 22px;
    font-size: 17px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .status-head,
  .template-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-head {
    display: flex;
  }

  .status-badge {
    order: -1;
  }

  .process {
    padding-block: 52px;
  }

  .process-list {
    margin-top: 30px;
  }

  .workspace {
    gap: 16px;
    padding-block: 48px;
  }

  .draft-panel,
  .template-panel,
  .guide-panel,
  .status-panel {
    padding: 20px;
  }

  .template-heading {
    display: flex;
  }

  .template-heading .button {
    width: 100%;
  }

  .template-item-head {
    flex-direction: column;
  }

  .default-badge {
    order: -1;
  }

  .template-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .template-action {
    min-height: 42px;
  }

  .install {
    gap: 36px;
    padding-block: 60px;
  }

  .install-intro .button {
    width: 100%;
  }

  .privacy {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
  }

  .site-footer .page-shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .site-nav .nav-home {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 13px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .status-panel {
    margin-inline: -2px;
  }

  .version-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .form-actions .button,
  .form-actions .text-link {
    width: 100%;
    justify-content: center;
  }

  .template-actions {
    grid-template-columns: 1fr;
  }

  .install-list li {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .install-list li > span {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #191711;
    --paper-raised: #242119;
    --paper-soft: #302c22;
    --ink: #eee8dd;
    --muted: #bbb2a5;
    --subtle: #a69b8c;
    --line: rgba(238, 232, 221, 0.14);
    --line-strong: rgba(238, 232, 221, 0.26);
    --accent: #d18b52;
    --accent-strong: #e0a06d;
    --forest: #90b89e;
    --danger: #e2877e;
    --deep: #12100c;
    --on-deep: #eee8dd;
    --surface: rgba(36, 33, 25, 0.84);
    --surface-strong: rgba(46, 42, 32, 0.96);
    --surface-hover: rgba(58, 53, 40, 0.92);
    --shadow: 0 24px 70px rgba(5, 4, 3, 0.3);
    --shadow-small: 0 12px 32px rgba(5, 4, 3, 0.22);
    --focus: #e0a06d;
  }

  body {
    background:
      radial-gradient(circle at 16% 10%, rgba(182, 107, 47, 0.14), transparent 26rem),
      radial-gradient(circle at 88% 8%, rgba(94, 137, 113, 0.1), transparent 24rem),
      var(--paper);
  }

  .site-nav a:hover {
    background: rgba(238, 232, 221, 0.08);
  }

  .button-primary {
    background: var(--ink);
    color: var(--paper);
  }

  .button-primary:hover:not(:disabled) {
    background: #d8d0c3;
  }

  .status-panel,
  .draft-panel,
  .template-panel {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent),
      var(--surface);
  }

  .loading-line,
  .draft-loading span,
  .template-skeleton span {
    background:
      linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent),
      rgba(238, 232, 221, 0.09);
    background-size: 180% 100%;
  }

  .inline-state,
  .template-item {
    background: rgba(255, 255, 255, 0.025);
  }

  .template-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .template-action:hover:not(:disabled),
  .copy-button:hover {
    background: rgba(238, 232, 221, 0.07);
  }

  .install-list li > span {
    background: var(--ink);
    color: var(--paper);
  }
}
