:root {
  color-scheme: light;
  --paper: #fffaf0;
  --paper-deep: #f7e7c6;
  --ink: #2b251d;
  --muted: #736651;
  --line: #dfc895;
  --shelf: #fff4d9;
  --green: #4f8f63;
  --blue: #4b7eac;
  --red: #c65b4a;
  --yellow: #f2c75c;
  --shadow: 0 18px 44px rgba(101, 75, 32, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(79, 143, 99, 0.16), transparent 340px),
    repeating-linear-gradient(90deg, rgba(223, 200, 149, 0.22) 0 1px, transparent 1px 72px),
    var(--paper);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid rgba(115, 102, 81, 0.2);
  background: rgba(255, 250, 240, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-grid;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a,
.button,
button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfa;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.button:hover,
button:hover {
  border-color: var(--green);
}

.button.primary,
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.button.red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 54px 0 26px;
}

.hero-copy,
.hero-art,
.card,
.panel,
.note,
.tool-card,
.typing-stage,
.form-card {
  min-width: 0;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 8px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.05;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.2;
  margin-bottom: 14px;
}

h3 {
  margin-bottom: 8px;
}

.lead {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 660px;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-art {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fffdfa, var(--shelf));
  box-shadow: var(--shadow);
  padding: 22px;
}

.desk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.desk-item {
  border: 1px solid rgba(115, 102, 81, 0.22);
  border-radius: var(--radius);
  background: #fffdfa;
  min-height: 104px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.desk-item strong {
  display: block;
  font-size: 18px;
}

.desk-item span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.desk-item::after {
  background: var(--yellow);
  border-radius: 999px;
  bottom: -24px;
  content: "";
  height: 68px;
  opacity: 0.45;
  position: absolute;
  right: -18px;
  width: 68px;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  min-width: 0;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.tool-card,
.panel,
.note,
.typing-stage,
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
  padding: 18px;
}

.tool-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
}

.tool-card .mark {
  align-items: center;
  background: var(--paper-deep);
  border: 1px solid rgba(115, 102, 81, 0.16);
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.tool-card p,
.note p,
.panel p {
  color: var(--muted);
}

.tool-card.disabled {
  color: var(--muted);
  cursor: default;
}

.note {
  background: #fff7e4;
}

.site-footer {
  border-top: 1px solid rgba(115, 102, 81, 0.2);
  color: var(--muted);
  margin-top: 42px;
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner a {
  color: var(--muted);
  margin-right: 12px;
}

.page-hero {
  padding: 44px 0 16px;
}

.typing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.typing-display {
  align-items: center;
  background: #fff7e4;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  font-size: clamp(72px, 18vw, 150px);
  font-weight: 900;
  justify-content: center;
  min-height: 220px;
  text-align: center;
}

.typing-status {
  color: var(--muted);
  font-weight: 800;
  margin: 16px 0 0;
}

.controls,
.stats {
  display: grid;
  gap: 12px;
}

.control-group {
  display: grid;
  gap: 8px;
}

.radio-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

label {
  color: var(--muted);
  font-weight: 800;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.stat {
  border-bottom: 1px solid rgba(115, 102, 81, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.stat strong {
  font-size: 22px;
}

.content {
  max-width: 820px;
}

.content h2 {
  font-size: 26px;
  margin-top: 28px;
}

.content li + li {
  margin-top: 8px;
}

.form-card {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.play-box {
  display: grid;
  gap: 16px;
}

.result-box {
  align-items: center;
  background: #fff7e4;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 900;
  justify-content: center;
  min-height: 180px;
  padding: 18px;
  text-align: center;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(115, 102, 81, 0.25);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 5px 9px;
}

.tiny {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .header-inner,
  .hero,
  .section-head,
  .typing-layout,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: start;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .wrap {
    width: min(100% - 20px, 1080px);
  }

  .hero {
    padding-top: 34px;
  }

  .nav a,
  .button,
  button {
    width: 100%;
  }

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

  .tool-card,
  .panel,
  .note,
  .typing-stage,
  .form-card,
  .hero-art {
    padding: 14px;
  }

  .radio-row label {
    width: 100%;
  }
}
