:root {
  color-scheme: light;
  --paper: #f4f1eb;
  --ink: #1e130e;
  --muted: #6a5f54;
  --accent: #d93a06;
  --line: #b4a28e;
  font-family: system-ui, "Noto Sans JP", "Yu Gothic UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; }

.shell {
  width: min(936px, calc(100% - 48px));
  margin: clamp(36px, 8.1vw, 124px) auto 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
  font-size: 44px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.brand svg { color: var(--accent); flex: none; }

h1 {
  margin: 38px 0 14px;
  font-size: clamp(30px, 5.4vw, 64px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.028em;
  overflow-wrap: anywhere;
}

.intro {
  margin: 0 0 38px;
  color: var(--muted);
  font-size: clamp(17px, 2.6vw, 29px);
  line-height: 1.5;
}

.panel {
  padding: 34px 37px 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(17px, 2.2vw, 25px);
  font-weight: 700;
}

.row {
  display: flex;
  gap: 14px;
}

input, button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 18px;
  font: inherit;
  font-size: clamp(16px, 2.1vw, 24px);
  line-height: 1.3;
  color: var(--ink);
}

input {
  width: 100%;
  min-width: 0;
  background: #fff;
}

input::placeholder { color: #746b63; }

input[readonly] {
  border-color: transparent;
  background: #ede9e3;
}

button {
  flex: none;
  padding-inline: 25px;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}

button:hover { background: #f6f1ea; }

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.primary:hover { background: #b93206; }

:focus-visible { outline: 3px solid #9d390d; outline-offset: 3px; }

.result {
  margin-top: 37px;
  border-top: 1px solid #cfc2b3;
  padding-top: 24px;
}

.error, .status { margin: 12px 0 0; }
.error { color: #a12710; }

.help {
  margin-top: 29px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.6;
}

.help p { margin: 0 0 6px; }

@media (max-width: 560px) {
  .shell { width: calc(100% - 36px); }
  .brand { font-size: 32px; padding-bottom: 15px; }
  .brand svg { width: 38px; height: 38px; }
  h1 { margin-top: 28px; }
  .intro { margin-bottom: 25px; }
  .panel { padding: 21px 17px 24px; }
  .row { gap: 9px; }
  form .row { flex-direction: column; }
  input, button { min-height: 47px; padding-inline: 11px; }
  .result { margin-top: 24px; padding-top: 19px; }
  .help { margin-top: 20px; }
}
