html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:root {
  /* 色・書体は公式サイト（AGT_HP dist/assets/css/main.css）の定義に合わせる */
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --text: #1F1F1F;
  --muted: #6E6E6E;
  --line: #E5DFD3;
  --accent: #846A3C;        /* 公式の --gold-text */
  --accent-soft: #FBF6EC;   /* 公式の --pro-gold-bg */
  --navy: #1B2B3F;
  --warn: #826028;          /* 公式の --brand-gold-text */
  --warn-soft: #FBF6EC;
  --radius: 4px;
  font-family: 'Zen Kaku Gothic New', "Hiragino Sans", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.75; font-size: 16px; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
header.site a.brand { color: var(--text); text-decoration: none; font-weight: 700; }
header.site nav a { font-size: 14px; margin-left: 12px; }

main { padding: 24px 0 48px; }
h1, h2, header.site a.brand { font-family: 'Shippori Mincho', serif; }
h1 { font-size: 24px; line-height: 1.4; margin: 8px 0 8px; }
h2 { font-size: 19px; margin: 32px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cards a.card { display: block; margin: 0; text-decoration: none; color: var(--text); }
.cards a.card strong { display: block; color: var(--accent); margin-bottom: 4px; }
.cards .card.soon { opacity: .6; }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; margin-bottom: 8px; }
label.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--surface); cursor: pointer; }
label.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
label.opt input { margin-top: 6px; }
.optgroup { font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input[type="text"], input[type="date"], input[type="email"], textarea {
  font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text);
}
.amount { display: flex; align-items: center; gap: 8px; }
.amount input { max-width: 260px; text-align: right; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.hidden { display: none !important; }

.result { border: 1px solid var(--accent); }
.result .tax { font-family: 'Shippori Mincho', serif; font-size: 34px; font-weight: 700; color: var(--text); line-height: 1.3; }
.result .class { color: var(--muted); font-size: 14px; }
.result ul { padding-left: 1.2em; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.sources { font-size: 13px; }
.sources li { margin-bottom: 4px; }

.cta { background: var(--accent-soft); border: 1px solid var(--accent); }
button, .btn { font: inherit; background: var(--text); color: #fff; border: 0; border-radius: 4px; padding: 12px 28px; letter-spacing: 0.05em; cursor: pointer; text-decoration: none; display: inline-block; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--muted); }
footer.site .wrap { padding-top: 20px; padding-bottom: 28px; }
footer.site p { margin: 4px 0; }

.btn-reset { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 10px 20px; font: inherit; font-size: 14px; cursor: pointer; }
.btn-reset:hover { border-color: var(--text); }
header.site nav a + a { margin-left: 12px; }
.free-use { background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 0 0 16px; }
header.site .wrap { flex-wrap: wrap; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
header.site nav a, header.site nav a + a { margin-left: 0; }
.related ul { margin: 6px 0 0; padding-left: 1.2em; }
.related li { margin-bottom: 4px; }
.hp-links a { margin-right: 4px; }
section.off { opacity: .45; }
.cands { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.cands button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.cands button:last-child { border-bottom: 0; }
.cands button:hover, .cands button:focus { background: var(--accent-soft); }
.picked { margin-top: 8px; font-size: 14px; }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; border: 1px solid currentColor; margin-left: 6px; white-space: nowrap; }
.tag.ok, .ok { color: #2f6b3a; } .tag.no, .muted { color: var(--muted); }
.ng { color: #b3261e; } .warn { color: var(--warn); }
.logrow { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
#guide table { width: 100%; border-collapse: collapse; font-size: 14px; }
#guide td, #guide th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
#guide th.kind, #guide td.kind { white-space: nowrap; width: 3.5em; }
