:root {
  --bg: #0e1424;
  --bg2: #151d33;
  --card: #18213a;
  --line: #2a3557;
  --ink: #e9e4d4;
  --muted: #a3a9be;
  --gold: #d9b45a;
  --harm: #6fa8dc;
  --tens: #e06c6c;
  --conj: #d9b45a;
  --line-green: #06c755;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: radial-gradient(ellipse at top, #1b2747 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink); font-family: var(--sans); line-height: 1.8; font-size: 16px;
}
.top, main, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 40px; padding-bottom: 8px; text-align: center; }
.brand { font-family: var(--serif); color: var(--gold); letter-spacing: .3em; margin: 0; font-size: 14px; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 6vw, 34px); margin: 8px 0 12px; letter-spacing: .05em; }
h2 { font-family: var(--serif); font-size: 18px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 auto; max-width: 34em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 20px 0; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form .row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
label { font-size: 14px; color: var(--muted); }
.opt { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
input, select {
  font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 46px; color-scheme: dark;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.note { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.note.small { font-size: 12px; margin-bottom: 0; }
.btn {
  display: block; width: 100%; text-align: center; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--gold); color: #1a1a1a; border: 0; border-radius: 999px; padding: 13px 20px; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.line { background: var(--line-green); color: #fff; margin-top: 8px; }
.chart-wrap { padding: 12px; }
#chart { width: 100%; height: auto; display: block; touch-action: manipulation; }
.legend { display: flex; justify-content: center; gap: 18px; list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sw { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.sw-conj { background: var(--conj); } .sw-harm { background: var(--harm); } .sw-tens { background: var(--tens); }
.panel { min-height: 120px; }
.panel-hint { color: var(--muted); margin: 0; }
.panel .kind { font-size: 13px; color: var(--gold); margin: 0 0 4px; }
.panel h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; }
.panel p.text { margin: 0; }
.panel .sub { font-size: 13px; color: var(--muted); margin-top: 10px; }
.chips { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li button {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.chips li button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.chips .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.muted { color: var(--muted); font-size: 13px; font-family: var(--sans); }
.cta p { margin: 0 0 8px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 40px; }

/* chart */
.ring { fill: none; stroke: var(--line); stroke-width: 1; }
.sign-glyph { fill: var(--muted); font-size: 18px; text-anchor: middle; dominant-baseline: central; }
.house-num { fill: #5d6789; font-size: 11px; text-anchor: middle; dominant-baseline: central; }
.planet { cursor: pointer; }
.planet circle { fill: var(--bg2); stroke: var(--gold); stroke-width: 1.2; }
.planet text { fill: var(--ink); font-size: 18px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.planet.on circle { fill: var(--gold); } .planet.on text { fill: #1a1a1a; }
.tick { stroke: var(--gold); stroke-width: 1; }
.asp { stroke-width: 1.6; opacity: .8; pointer-events: none; }
.asp.harm { stroke: var(--harm); } .asp.tens { stroke: var(--tens); } .asp.conj { stroke: var(--conj); }
.asp.on { stroke-width: 3.5; opacity: 1; }
.asp-hit { stroke: transparent; stroke-width: 16; cursor: pointer; }
.dim .asp:not(.on) { opacity: .18; }
.asc-mark { fill: var(--gold); font-size: 12px; }

.planet:focus, .asp-hit:focus { outline: none; }
.planet:focus-visible circle { stroke-width: 3; }
