:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #23201c;
  --sub: #6b655c;
  --line: #ddd6c8;
  --accent: #7a3b2e;
  --accent-bg: #f7ece8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
.hero, main, footer { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.hero { padding-top: 28px; padding-bottom: 8px; }
.badge { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 12px; }
h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: 0.04em; }
h1 small { font-size: 14px; font-weight: normal; color: var(--sub); }
h2 { margin: 0 0 12px; font-size: 19px; }
h3 { margin: 24px 0 8px; font-size: 16px; border-left: 4px solid var(--accent); padding-left: 8px; }
.lead { margin: 0 0 12px; }
.points { margin: 0; padding-left: 20px; color: var(--sub); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px; margin: 16px 0; }
.card.accent { background: var(--accent-bg); border-color: #e3c9c1; }
.row { display: grid; gap: 12px; margin-bottom: 12px; }
.row.three { grid-template-columns: 2fr 1fr 1fr; }
.row.two { grid-template-columns: 1fr 1fr; align-items: end; }
.row.narrow { max-width: 360px; }
label { display: block; font-size: 13px; color: var(--sub); }
input[type="number"], input[type="time"], select {
  display: block; width: 100%; margin-top: 4px; padding: 10px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:disabled, select:disabled { background: #eee; color: #999; }
label.check, label.radio { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); padding: 8px 0; }
fieldset { border: 0; margin: 0 0 12px; padding: 0; }
legend { padding: 0; font-size: 13px; color: var(--sub); }
.settings { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 12px; }
.settings summary { cursor: pointer; font-size: 14px; margin-bottom: 8px; }
.primary { display: block; width: 100%; padding: 14px; font-size: 17px; font-weight: bold; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; text-align: center; text-decoration: none; }
.error { color: #b00020; font-size: 14px; }
.note { color: var(--sub); font-size: 13px; margin: 8px 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--line); padding: 8px 6px; text-align: center; font-size: 14px; white-space: nowrap; }
th { background: #faf8f3; font-weight: normal; color: var(--sub); font-size: 12px; }
.meishiki td.kanji { font-size: 30px; font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif; padding: 6px; }
td.kanji-s { font-size: 18px; font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif; }
.list.small td, .list.small th { font-size: 12px; white-space: normal; }
.premises { margin: 0; padding-left: 20px; font-size: 14px; }
.method dt { font-weight: bold; margin-top: 12px; font-size: 14px; }
.method dd { margin: 2px 0 0; font-size: 14px; }
footer { padding-top: 8px; padding-bottom: 40px; color: var(--sub); font-size: 13px; }
footer .small { font-size: 12px; }
a { color: var(--accent); }
.printonly { display: none; }
.report { border-top: 1px solid var(--line); margin-top: 24px; }
.report textarea, .report input[type="text"] {
  display: block; width: 100%; margin-top: 4px; padding: 10px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.report .primary { margin-top: 12px; }
@page { size: A4; margin: 14mm; }
@media print {
  body { background: #fff; font-size: 10.5pt; line-height: 1.5; }
  .hero, .noprint, footer { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; margin: 0; }
  .scroll { overflow: visible; }
  h2 { font-size: 13pt; margin: 0 0 4pt; }
  h3 { font-size: 10.5pt; margin: 7pt 0 3pt; }
  th, td { padding: 1.5pt 4pt; font-size: 9pt; line-height: 1.25; }
  th { font-size: 8.5pt; }
  .meishiki td.kanji { font-size: 17pt; padding: 1pt; }
  td.kanji-s { font-size: 11pt; }
  .note, .premises { font-size: 8.5pt; margin: 3pt 0; }
  .fortunes { display: grid; grid-template-columns: 1fr 1fr; gap: 12pt; align-items: start; }
  body.as-report .printonly { display: block; }
  .sheet-header { text-align: center; border-bottom: 1.5pt solid #7a3b2e; padding-bottom: 6pt; margin-bottom: 8pt; }
  .sheet-header p { margin: 0; }
  .sheet-shop { font-size: 10pt; color: #555; text-align: right; }
  .sheet-title { font-size: 18pt; letter-spacing: 0.3em; font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif; }
  .sheet-client { font-size: 14pt; margin-top: 6pt !important; }
  .sheet-birth, .sheet-date { font-size: 9.5pt; color: #333; }
  .sheet-note p { margin: 0 0 5pt; white-space: pre-wrap; font-size: 10pt; }
  table, .sheet-note p, .premises li { break-inside: avoid; }
}
