/* エステート：落ち着いた紺と真鍮色。スマホは下のタブ、PCは左のメニュー */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-text-size-adjust: 100%; }
:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --text: #1b1f2a;
  --sub: #6b7080;
  --line: #e7e3da;
  --ink: #15203a;          /* 紺 */
  --ink2: #24345c;
  --brass: #b08a4e;        /* 真鍮 */
  --brass-soft: #f3ead9;
  --red: #c2412d;
  --red-soft: #fbe9e5;
  --amber: #c98a12;
  --amber-soft: #fbf1dc;
  --ok: #2f7a57;
  --ok-soft: #e3f2ea;
  --shadow: 0 1px 2px rgba(21,32,58,.06), 0 6px 18px rgba(21,32,58,.06);
  --r: 14px;
  --nav-h: 64px;
}
html, body { background: var(--bg); }
body {
  font-family: 'Zen Kaku Gothic New', -apple-system, 'Hiragino Sans', sans-serif;
  color: var(--text); line-height: 1.6;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
}
a { color: inherit; }

/* ---------- 上の帯 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink); color: #fff;
  padding: 10px 16px; display: flex; align-items: center; gap: 10px;
}
.brand { font-family: 'Shippori Mincho', serif; font-weight: 700; font-size: 20px; letter-spacing: .12em; text-decoration: none; color: #fff; }
.brand small { font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 11px; letter-spacing: .04em; color: #c9b58f; margin-left: 8px; font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12px; color: #c7cbe0; }
.topbar button, .topbar a.back {
  color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; text-decoration: none; cursor: pointer; font-family: inherit;
}

/* ---------- メニュー（スマホ＝下のタブ） ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--sub); font-size: 11px; font-weight: 500;
}
.nav a svg { width: 22px; height: 22px; stroke: currentColor; }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav a.on svg { stroke: var(--brass); }
.nav a.mic { color: var(--ink); }
.nav a.mic .dot {
  width: 44px; height: 44px; margin-top: -18px; border-radius: 50%;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(21,32,58,.3); border: 3px solid var(--bg);
}
.nav a.mic .dot svg { stroke: #fff; }

/* ---------- PC：左のメニュー ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 24px; padding-left: 232px; }
  .nav {
    top: 0; right: auto; bottom: 0; width: 232px; height: auto;
    grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start;
    background: var(--ink); border-top: 0; padding: 88px 14px 20px; gap: 4px;
  }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 14px; color: #c7cbe0; padding: 11px 14px; border-radius: 10px; }
  .nav a.on { background: rgba(255,255,255,.08); color: #fff; }
  .nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .nav a.mic .dot { width: 22px; height: 22px; margin: 0; border: 0; box-shadow: none; background: transparent; }
  .nav a.mic .dot svg { stroke: #c9b58f; }
  .nav a.mic { color: #fff; background: rgba(176,138,78,.18); }
  .topbar { margin-left: -232px; padding-left: 28px; z-index: 40; }
  .topbar .brand { width: 204px; }
}

main { padding: 16px; max-width: 1120px; margin: 0 auto; }
.pagehead { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 14px; }
.pagehead h1 { font-family: 'Shippori Mincho', serif; font-size: 22px; letter-spacing: .04em; }
.pagehead .note { font-size: 13px; color: var(--sub); }

/* ---------- カード・行 ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--line); color: var(--sub); white-space: nowrap; }
.badge.warn, .badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.brass { background: var(--brass-soft); color: #8a6a36; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row .main { min-width: 0; }
.row .title { font-size: 15px; font-weight: 700; }
.row .sub { font-size: 12.5px; color: var(--sub); }
.right { text-align: right; white-space: nowrap; font-size: 13px; }
.empty { color: var(--sub); font-size: 14px; padding: 8px 0; }
a.block { display: block; text-decoration: none; color: inherit; }
.sub { color: var(--sub); }

/* ---------- 入力 ---------- */
label { display: block; font-size: 12.5px; font-weight: 700; margin: 12px 0 6px; color: var(--ink2); }
input, select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(176,138,78,.35); border-color: var(--brass); }
textarea { min-height: 110px; resize: vertical; }
button.primary {
  width: 100%; padding: 14px; margin-top: 16px; border: 0; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
}
button.primary:disabled { background: #9aa0b3; }
button.small { padding: 7px 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: 12.5px; cursor: pointer; font-family: inherit; font-weight: 700; color: var(--ink); }
.pwwrap { position: relative; }
.pwwrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brass); font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px; font-family: inherit; }
.err { color: var(--red); font-size: 13.5px; margin-top: 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--sub); font-size: 12px; font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* 出てくるときの小さな動き */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }

/* スマホの上の帯は、ブランドとボタンだけにして折り返させない */
.topbar button, .topbar a.back, .brand { white-space: nowrap; }
@media (max-width: 899px) {
  .topbar .who, .topbar a.back { display: none; }
}

/* 見出しは1語の途中で折り返さない。説明はスマホでは次の行へ */
.pagehead { flex-wrap: wrap; row-gap: 2px; }
.pagehead h1 { white-space: nowrap; }
@media (max-width: 899px) { .pagehead .note { flex-basis: 100%; } }
