/* 色は docs/design/ui-ux-and-requirements.md（アイボリー・紺・緑・金は進みの所だけ）。模様とグラデーションは使わない。スマホの幅を先に作る */
:root {
  --bg: #F7F3EA; --surface: #FFFDF8; --ink: #1F2A44; --muted: #56607a; --line: #E4DCCB;
  --accent: #1F2A44; --accent-ink: #F7F3EA; --link: #2F6B5C; --mark: #F1E6C2; --gold: #C9A227;
  --radius: 14px; --border: 1px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[lang="ar"] { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; line-height: 1.9; }
[dir="rtl"] ol, [dir="rtl"] ul { padding-left: 0; padding-right: 1.4em; }
[dir="rtl"] .result dd { text-align: left; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
.manzil-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.manzil-bar span { display: block; height: 100%; background: var(--gold); }
@media (prefers-color-scheme: dark) { :root { --bg: #141b2d; --surface: #1F2A44; --ink: #F3EEE2; --muted: #b5bccc; --line: #33405f; --accent: #C9A227; --accent-ink: #141b2d; --link: #8fd1bd; --mark: #2b3858; } .result, table, input, select { background: #1a2338; color: #F3EEE2; } th { background: #24304d; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.7; }
a { color: var(--link); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 30px; line-height: 1.3; margin: 8px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1.4; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 20px 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); }
.small, .note { font-size: 14px; color: var(--muted); }

.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.langs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.langs a { color: var(--muted); text-decoration: none; }
.langs a[aria-current] { color: var(--ink); font-weight: 700; }

.hero { padding: 32px 0 8px; }
.cta { display: inline-block; margin: 8px 0 4px; padding: 14px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; font-size: 17px; }
.cta:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.cards { display: grid; gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
.cards li { background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.cards strong { display: block; font-size: 17px; margin-bottom: 4px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } h1 { font-size: 36px; } }

.guide-link { display: block; margin: 20px 0; padding: 16px 18px; border-radius: var(--radius); border: var(--border) solid var(--line); background: var(--mark); color: var(--ink); font-weight: 700; text-decoration: none; }

.tool { background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 17px; width: 100%; padding: 10px 12px; border: 1px solid #b9bec7; border-radius: 10px; background: #fff; color: #1b1d22; }
textarea { min-height: 140px; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
button { font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.result { background: #fff; border: var(--border) solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 8px; }
.result .big { font-size: 30px; font-weight: 800; line-height: 1.2; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.result .warn { color: #a3261b; font-weight: 600; }
.result .ok { color: #13693a; font-weight: 600; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 8px 0 0; font-size: 15px; }
.result dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.tablewrap { overflow-x: auto; margin: 12px 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { font-weight: 700; background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
ol.schedule { padding-left: 1.4em; }

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { font-weight: 700; cursor: pointer; }
.sources { font-size: 14px; color: var(--muted); }
.sources li { margin-bottom: 4px; }

.foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 20px 0 40px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; margin-bottom: 8px; }
.locale-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.locale-list a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface); }
.locale-list span { display: block; font-size: 14px; color: var(--muted); }
.legal h2 { font-size: 19px; margin-top: 28px; }
[dir="rtl"] .manzil-bar span { margin-left: auto; }
