/* Layout concept: a pocket almanac for the phone. A quiet input page, then four bottom tabs (calendar / reading / flow / direction).
   Good days glow in rose and gold, cautious days sit in a soft blue-grey, so nothing on screen shouts "bad luck".
   Day details open in a bottom sheet so the calendar itself stays roomy. */
:root {
  --bg: #F7F3F6;
  --surface: #FFFFFF;
  --ink: #2A2540;
  --ink-soft: #6A6481;
  --line: #E7DFEA;
  --accent: #B0436A;
  --accent-soft: #F8E7EE;
  --on-accent: #FFFFFF;
  --gold: #8F6417;
  --gold-soft: #F6EBD3;
  --care: #46628F;
  --care-soft: #E5ECF6;
  --wood: #3B8A5E;
  --fire: #CC4F3B;
  --earth: #A07412;
  --metal: #6F7587;
  --water: #3C69A8;
  --shadow: rgba(42, 37, 64, .12);
  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16131D;
    --surface: #201C2B;
    --ink: #EFEAF5;
    --ink-soft: #A9A2C0;
    --line: #332D44;
    --accent: #EE8FB0;
    --accent-soft: #38202D;
    --on-accent: #2A1520;
    --gold: #E5BE6F;
    --gold-soft: #372C17;
    --care: #93B2E2;
    --care-soft: #1E2A40;
    --wood: #6CC490;
    --fire: #F28A74;
    --earth: #E0B94F;
    --metal: #B2B8C9;
    --water: #7DAAE6;
    --shadow: rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16131D;
  --surface: #201C2B;
  --ink: #EFEAF5;
  --ink-soft: #A9A2C0;
  --line: #332D44;
  --accent: #EE8FB0;
  --accent-soft: #38202D;
  --on-accent: #2A1520;
  --gold: #E5BE6F;
  --gold-soft: #372C17;
  --care: #93B2E2;
  --care-soft: #1E2A40;
  --wood: #6CC490;
  --fire: #F28A74;
  --earth: #E0B94F;
  --metal: #B2B8C9;
  --water: #7DAAE6;
  --shadow: rgba(0, 0, 0, .5);
  color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.75 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 560px; margin: 0 auto; }
.mincho { font-family: var(--font-display); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- 入力画面 ---- */
.hero { padding-block: 36px 20px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; color: var(--accent); font-weight: 700; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: 31px; line-height: 1.35; text-wrap: balance; }
.lede { color: var(--ink-soft); }
.almanac { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0; margin-block: 6px 0; border-block: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.almanac b { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: .06em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.fld > label, .fld > legend { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 0; }
.fld .hint { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.sels { display: grid; gap: 8px; }
.sels.ymd { grid-template-columns: 1.35fr 1fr 1fr; }
.sels.hm { grid-template-columns: 1.4fr 1fr; }
.selwrap { position: relative; min-width: 0; }
.selwrap::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 50px; padding: 8px 30px 8px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
select:disabled { opacity: .5; }
.radios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio { position: relative; display: block; }
.radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.radio span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 15px; }
.radio input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.cta { width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.err { color: var(--accent); font-size: 14px; font-weight: 700; }
.textbtn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.foot-note { font-size: 12px; color: var(--ink-soft); padding-block: 8px 40px; }

/* ---- 結果画面の共通 ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 14px 10px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; }
.pill { min-height: 38px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.sample-note { font-size: 12px; background: var(--gold-soft); color: var(--gold); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.panel { display: flex; flex-direction: column; gap: 14px; }
.sec-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.4; }
.ct { font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.5; margin-bottom: 4px; text-wrap: balance; }
.lead { font-size: 15px; margin-bottom: 4px; }
.small { font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.empty { font-size: 13px; color: var(--ink-soft); }
.row { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.ct + .row, .lead + .row { border-top: 0; }
.row > b { font-size: 13px; color: var(--accent); line-height: 1.9; word-break: keep-all; }
.row.care > b { color: var(--care); }
.row > span { min-width: 0; }
.kw { display: inline-block; padding: 1px 11px; margin: 2px 4px 2px 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.kw.both { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); font-weight: 700; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: none; color: var(--ink-soft); font-size: 14px; }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* ---- 下のタブ ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px max(12px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.tabbar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tb { appearance: none; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; min-height: 54px; font-size: 11px; color: var(--ink-soft); border-radius: 12px; }
.tb svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tb[aria-selected="true"] { color: var(--accent); font-weight: 700; }

/* ---- 今日 ---- */
.today { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.t-mk { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; background: var(--bg); color: var(--ink-soft); }
.t-mk.s5 { background: var(--gold-soft); color: var(--gold); }
.t-mk.s4 { background: var(--accent-soft); color: var(--accent); }
.t-mk.s2, .t-mk.s1 { background: var(--care-soft); color: var(--care); }
.t-body { display: flex; flex-direction: column; min-width: 0; }
.t-date { font-size: 12px; color: var(--ink-soft); }
.t-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.5; }
.t-sub { font-size: 12px; color: var(--ink-soft); }
.t-go { font-size: 22px; color: var(--ink-soft); }

/* ---- カレンダー ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; }
.nav { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { text-align: center; font-size: 12px; color: var(--ink-soft); padding-block: 2px 0; }
.cell { aspect-ratio: 1 / 1.2; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cell .num { font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; }
.cell .mk { font-size: 19px; line-height: 1; color: var(--ink-soft); }
.cell.s5 { background: var(--gold-soft); border-color: var(--gold); }
.cell.s5 .mk { color: var(--gold); }
.cell.s4 { background: var(--accent-soft); }
.cell.s4 .mk { color: var(--accent); }
.cell.s2 { background: var(--care-soft); }
.cell.s2 .mk, .cell.s1 .mk { color: var(--care); }
.cell.s1 { background: var(--care-soft); border-color: var(--care); }
.cell.today .num { background: var(--ink); color: var(--bg); border-radius: 999px; padding: 4px 7px; margin-block: -4px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-soft); }
.legend b { font-weight: 400; margin-right: 3px; }
.legend .g { color: var(--gold); } .legend .r { color: var(--accent); } .legend .c { color: var(--care); }
.lists { display: grid; gap: 16px; }
.lists h3 { font-size: 14px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 14px; }
.chip.good { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.chip.care { border-color: var(--care); background: var(--care-soft); color: var(--care); }

/* ---- 日ごとのシート ---- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 16, 30, .55); }
.sheet-panel { position: relative; width: 100%; max-width: 560px; max-height: 90%; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 0 20px calc(28px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px var(--shadow); overscroll-behavior: contain; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; background: var(--surface); padding: 8px 0 4px; }
.grab { position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
.sh-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-soft); }
.sh-date { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 2px; }
.d-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; background: var(--bg); }
.d-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.45; display: flex; gap: 10px; align-items: baseline; text-wrap: balance; }
.d-mark { font-size: 22px; color: var(--ink-soft); }
.d-mark.s5 { color: var(--gold); } .d-mark.s4 { color: var(--accent); } .d-mark.s2, .d-mark.s1 { color: var(--care); }
.d-level { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin: 4px 0 12px; padding: 14px; border-radius: 14px; background: var(--bg); }
.score-n { font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.score-n small { font-family: var(--font-body); font-weight: 400; font-size: 13px; margin-left: 2px; color: var(--ink-soft); }
.score-b { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sb { display: grid; grid-template-columns: 5em minmax(0, 1fr) 3.4em; gap: 8px; align-items: center; font-size: 12px; }
.sb-l { color: var(--ink-soft); }
.sb-t { height: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.sb-f { display: block; height: 100%; }
.sb-f.a { background: var(--accent); }
.sb-f.b { background: var(--gold); }
.sb-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
details { font-size: 13px; color: var(--ink-soft); }
summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details > :not(summary) { margin-top: 8px; }
.dboard { margin-top: 10px; }

/* ---- 命式 ---- */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pillars.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pillar { border: 1px solid var(--line); border-radius: 12px; padding: 12px 2px; text-align: center; background: var(--bg); min-width: 0; }
.pillar.me { border-color: var(--accent); background: var(--accent-soft); }
.p-label { font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); font-weight: 700; }
.p-god { font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.6; }
.p-kanji { font-family: var(--font-display); font-weight: 800; font-size: 38px; line-height: 1.2; display: flex; flex-direction: column; align-items: center; }
.pillars.four .p-kanji { font-size: 32px; }
.p-kana, .p-sub { font-size: 11px; color: var(--ink-soft); line-height: 1.6; }
.p-kana { white-space: nowrap; font-size: 10px; letter-spacing: -0.03em; }
@media (max-width: 340px) { .p-kana { font-size: 10px; } }
.note { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--care-soft); color: var(--care); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) 1.4em; align-items: center; gap: 8px; margin: 8px 0; }
.bar-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; text-align: center; }
.bar-track { height: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bar-fill { display: block; height: 100%; }
.bar-n { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-soft); text-align: right; }

/* ---- 大運・年運 ---- */
.dn { display: grid; grid-template-columns: 5.4em 3.4em minmax(0, 1fr); gap: 8px; align-items: start; padding: 11px 6px; border-top: 1px solid var(--line); }
.ct + .dn, .ct + .small + .dn { border-top: 0; }
.dn.now { background: var(--accent-soft); border-radius: 10px; border-top-color: transparent; }
.dn.now + .dn { border-top-color: transparent; }
.dn-age { font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.dn-age small { display: block; font-size: 11px; color: var(--ink-soft); }
.dn-gz { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.3; display: flex; flex-direction: column; align-items: center; }
.dn-txt { font-size: 13px; min-width: 0; line-height: 1.65; }
.dn-txt b { display: block; font-size: 14px; }
.ym { font-weight: 400; color: var(--ink-soft); }
.ym.s5 { color: var(--gold); } .ym.s4 { color: var(--accent); } .ym.s2, .ym.s1 { color: var(--care); }

/* ---- 九星の盤 ---- */
.bd { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.bd-cell { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 2px; min-height: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.bd-cell.ctr { background: var(--bg); }
.bd-cell.s5 { background: var(--gold-soft); border-color: var(--gold); }
.bd-cell.s4 { background: var(--accent-soft); }
.bd-cell.s2 { background: var(--care-soft); }
.bd-cell.s1 { background: var(--care-soft); border-color: var(--care); }
.bd-cell.me { outline: 2px solid var(--ink); outline-offset: 1px; }
.bd-dir { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.bd-star { font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.bd-bad { font-size: 11px; color: var(--care); line-height: 1.4; font-weight: 700; }
.bd-me { font-size: 11px; font-weight: 700; color: var(--bg); background: var(--ink); border-radius: 10px; padding: 0 8px; line-height: 1.6; }
.mnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mnav .t { font-family: var(--font-display); font-weight: 800; font-size: 17px; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .sheet-panel { animation: rise .22s ease-out; }
  @keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media (max-width: 340px) {
  h1 { font-size: 27px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .dn { grid-template-columns: 4.6em 3em minmax(0, 1fr); }
}

/* ---- 広告枠 ---- */
.ad { margin: 10px 0 6px; text-align: center; min-height: 100px; }
.ad-l { display: block; font-size: 10px; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 4px; }
.ad-b { min-height: 90px; overflow: hidden; }
.ad-prev { display: grid; place-items: center; min-height: 100px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-soft); font-size: 12px; }
/* ---- シェア ---- */
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sbtn { min-height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; padding: 0 10px; }
.sbtn.line { background: #06C755; border-color: #06C755; color: #fff; }
.sbtn.x { background: #111; border-color: #111; color: #fff; }
.share.inline { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: rgba(42,37,64,.94); color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
/* ---- フッターリンク ---- */
.site-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 18px 0 10px; font-size: 12px; }
.site-foot a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }

/* ---- 質問画面 ---- */
.q-head { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.q-count { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.q-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 18px; }
.q-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }
.q-intro { font-size: 13px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 14px; }
.q-title { font-family: var(--font-display); font-size: 21px; line-height: 1.6; margin-bottom: 16px; }
.q-opts { display: grid; gap: 10px; }
.opt { text-align: left; min-height: 58px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
/* ---- いまのあなた ---- */
.now-sum { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: 14px; line-height: 1.8; }
.now-sum b { display: block; color: var(--gold); font-size: 12px; margin-bottom: 2px; }
.now-adj { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); font-size: 12.5px; line-height: 1.7; display: grid; gap: 2px; }
.now-adj b { color: var(--gold); font-size: 13px; }
.textbtn.inl { padding: 4px 0; font-size: 13px; }

/* ---- 今月のテーマ ---- */
.mtheme { padding: 0; }
.mtheme > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; gap: 2px; position: relative; }
.mtheme > summary::-webkit-details-marker { display: none; }
.mtheme > summary::after { content: '＋'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; }
.mtheme[open] > summary::after { content: '－'; }
.mtheme .mt-l { font-size: 12px; color: var(--accent); font-weight: 700; }
.mtheme > summary b { font-family: var(--font-display); font-size: 17px; padding-right: 28px; line-height: 1.5; }
.mtheme > :not(summary) { margin-inline: 16px; }
.mtheme > :last-child { margin-bottom: 14px; }
.mt-text { font-size: 14.5px; line-height: 1.9; margin-top: 2px; margin-bottom: 4px; }
.mtheme { color: var(--ink); font-size: 14px; }

.morelinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.morelinks a { display: block; padding: 11px 0; color: var(--accent); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.morelinks li:last-child a { border-bottom: 0; }
.morelinks a::after { content: ' ›'; }

/* ---- 日干マーク ---- */
.idrow { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.idmark { flex: none; display: block; line-height: 0; }
.idrow .ct { margin-bottom: 2px; }

/* 選日 */
.cell { position: relative; }
.sen-star { position: absolute; top: 3px; right: 5px; font-size: 11px; line-height: 1; color: var(--gold); }
.sen-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); vertical-align: middle; margin-right: 3px; }
.cell .sen-dot { position: absolute; top: 5px; right: 6px; margin: 0; }
.tag-sen { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.tag-sen.care { border-color: var(--care); background: var(--care-soft); color: var(--care); }
.sen-card { margin-top: 12px; }
.sen-row { margin: 10px 0; }
.sen-row h4 { margin: 0 0 6px; font-size: 14px; }
.sen-both { margin: 10px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font-size: 14px; }
.sen-box { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--gold); border-radius: 14px; background: var(--gold-soft); }
.sen-h { margin: 0 0 6px; font-size: 14px; color: var(--gold); }
.sen-item { display: grid; gap: 2px; margin: 8px 0; font-size: 14px; color: var(--ink); }
.sen-item b { color: var(--gold); }
.sen-item.care b { color: var(--care); }
.sen-x { position: absolute; top: 2px; left: 5px; font-size: 11px; line-height: 1; color: var(--care); }

/* 規約・お問い合わせなどの下層ページ用(色などは app.css のものを使います) */
.pg { max-width: 720px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right)); }
.pg-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.pg-top a.back { color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; padding: 8px 0; }
.pg-top .brand { font-family: var(--font-display, serif); font-weight: 800; font-size: 15px; }
.pg h1 { font-family: var(--font-display, serif); font-size: 26px; line-height: 1.4; margin: 14px 0 6px; }
.pg .meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 18px; }
.pg h2 { font-size: 17px; margin: 28px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); line-height: 1.5; }
.pg p, .pg li { font-size: 14.5px; line-height: 1.95; }
.pg p { margin: 8px 0; }
.pg ul, .pg ol { margin: 6px 0 6px 1.3em; padding: 0; }
.pg a { color: var(--accent); }
.pg .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; }
.f-row { display: grid; gap: 6px; margin-bottom: 16px; }
.f-row label { font-size: 13px; font-weight: 700; }
.f-row .req { color: var(--accent); font-size: 11px; margin-left: 6px; }
.f-row input, .f-row select, .f-row textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.f-row textarea { min-height: 160px; resize: vertical; line-height: 1.7; }
.f-row input:focus, .f-row select:focus, .f-row textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-msg { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
.f-msg.ok { background: var(--gold-soft); color: var(--gold); }
.f-msg.ng { background: var(--care-soft); color: var(--care); }
.pg .cta { width: 100%; }
