/* Portal demo: static, no JS. Views switch with :target. All data is invented. */
:root { --side: #1b1b1b; --side-ink: #e9e3d6; --side-muted: #9d968a; --bg: #f6f2ea; --card: #fffdf8; --ink: #1b1915; --muted: #5a5349; --line: #e3dccd; --gold: #d9ad4c; --gold-text: #7a5a1a; --green: #2f6b3a; --red: #a3302a; --r: 14px;
  --font: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: inherit; }
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 900px) { .app { grid-template-columns: 240px minmax(0, 1fr); } }

.side { min-width: 0; background: var(--side); color: var(--side-ink); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.logo { font-weight: 800; letter-spacing: .14em; color: var(--gold); text-decoration: none; padding: 4px 8px; }
.logo small { display: block; letter-spacing: .04em; font-weight: 500; color: var(--side-muted); font-size: .75rem; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
@media (min-width: 900px) { .nav { flex-direction: column; } }
.nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; white-space: nowrap; color: var(--side-ink); display: flex; justify-content: space-between; gap: 10px; }
.nav a:hover { background: #262626; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 7px; line-height: 1.6; align-self: center; }
.side-foot { margin-top: auto; font-size: .8rem; color: var(--side-muted); padding: 8px; display: none; }
@media (min-width: 900px) { .side-foot { display: block; } }
.side-foot a { color: var(--gold); }

/* active nav item */
body:not(:has(.view:target)) .nav a[href="#dash"],
body:has(#dash:target) .nav a[href="#dash"],
body:has(#schedule:target) .nav a[href="#schedule"],
body:has(#clients:target) .nav a[href="#clients"],
body:has(#sales:target) .nav a[href="#sales"],
body:has(#follow:target) .nav a[href="#follow"] { background: #2a2a2a; box-shadow: inset 3px 0 0 var(--gold); }

.main { padding: 20px clamp(14px, 3vw, 36px) 48px; min-width: 0; }
.demo-bar { background: #fbefcf; border: 1px solid #ecd48f; border-radius: 999px; padding: 8px 16px; font-size: .88rem; color: var(--gold-text); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.demo-bar a { font-weight: 700; }

.view { display: none; scroll-margin-top: 0; }
.view:target, body:not(:has(.view:target)) #dash { display: block; }
h1 { font-size: 1.6rem; margin: 22px 0 4px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: .92rem; }
h2 { font-size: .95rem; letter-spacing: .08em; color: var(--gold-text); margin: 26px 0 10px; }

.alert { display: flex; align-items: center; gap: 12px; background: #fbf3dd; border: 1px solid #ecd48f; border-radius: var(--r); padding: 12px 16px; margin-top: 14px; }
.alert b.n { background: var(--gold); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; flex: none; font-size: .85rem; }
.alert span { flex: 1; }
.alert a { font-weight: 700; color: var(--gold-text); text-decoration: none; white-space: nowrap; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.kpi.dark { background: #1b1b1b; color: #f4efe5; border-color: #1b1b1b; }
.kpi span { font-size: .85rem; color: var(--muted); }
.kpi.dark span, .kpi.dark small { color: #bdb5a7; }
.kpi b { display: block; font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 4px 0 0; }
.kpi.dark b { color: var(--gold); }
.kpi b.good { color: var(--green); }
.kpi small { color: var(--muted); font-size: .8rem; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row time { font-weight: 700; }
.row small { display: block; color: var(--muted); font-size: .82rem; }
.day { background: #efe8da; font-weight: 700; font-size: .85rem; padding: 6px 16px; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }

.tag { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; border: 1px solid var(--line); background: #fff; }
.tag.ok { color: var(--green); border-color: #bfd8c3; background: #eef6ef; }
.tag.warn { color: var(--gold-text); border-color: #ecd48f; background: #fbf3dd; }
.tag.bad { color: var(--red); border-color: #e7bdb9; background: #fbeeed; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { border-top: 0; font-size: .8rem; color: var(--muted); }
.bar { height: 6px; background: #ece5d6; border-radius: 99px; width: 90px; display: inline-block; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); }
.w0 { width: 0; } .w60 { width: 60%; } .w70 { width: 70%; } .w90 { width: 90%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chips li { border-bottom: 2px solid transparent; padding: 4px 2px; margin-right: 12px; color: var(--muted); font-size: .92rem; }
.chips li:first-child { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.cta { margin-top: 36px; background: #1b1b1b; color: #f4efe5; border-radius: var(--r); padding: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.cta p { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; background: var(--gold); color: #1b1305; }

/* ---------- Buy page demo (no JS: radios/checkbox + :has, overlays with :target) ---------- */
.shop { max-width: 760px; margin: 0 auto; padding: 18px 16px 56px; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0 18px; }
.shop-head .logo { color: var(--gold-text); padding: 0; }
.shop-head h1.logo { margin: 0; font-size: inherit; line-height: inherit; }
.shop-head .logo small { color: var(--muted); }
.shop-head a.back { font-size: .85rem; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.step { font-size: .8rem; font-weight: 800; letter-spacing: .12em; color: var(--gold-text); margin: 28px 0 10px; }
.pkgs { display: grid; gap: 10px; }
@media (min-width: 640px) { .pkgs { grid-template-columns: repeat(3, 1fr); } }
.pkg { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; }
.pkg b { font-size: 1.15rem; }
.pkg .yen { font-size: 1.35rem; font-weight: 800; }
.pkg small { color: var(--muted); font-size: .82rem; }
.pkg .rec { position: absolute; top: -10px; right: 12px; background: var(--gold); color: #1b1305; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 10px; }
.pkg:has(input:checked) { border-color: var(--gold); background: #fbf3dd; box-shadow: 0 0 0 3px rgba(217,173,76,.2); }
.pkg:has(input:focus-visible), .opt:has(input:focus-visible), .agree:has(input:focus-visible) { outline: 3px solid var(--gold-text); outline-offset: 2px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; font-size: .92rem; }
.summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.sum { display: none; }
body:has(#p5:checked) .sum-p5, body:has(#p10:checked) .sum-p10, body:has(#p20:checked) .sum-p20 { display: contents; }
.amt { display: none; }
body:has(#p5:checked) .amt-p5, body:has(#p10:checked) .amt-p10, body:has(#p20:checked) .amt-p20 { display: inline; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; }
.agree:has(input:checked) { border-color: var(--green); background: #eef6ef; }
.agree input, .opt input { width: 20px; height: 20px; accent-color: var(--gold-text); margin: 2px 0 0; flex: none; }
.opts { display: grid; gap: 10px; }
@media (min-width: 640px) { .opts { grid-template-columns: 1fr 1fr; } }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; }
.opt small { display: block; color: var(--muted); font-size: .82rem; }
.opt:has(input:checked) { border-color: var(--gold); background: #fbf3dd; }
.buy { margin-top: 18px; width: 100%; }
.buy-cash { display: none; }
body:has(#cash:checked) .buy-card { display: none; }
body:has(#cash:checked) .buy-cash { display: inline-flex; }
body:not(:has(#agree:checked)) .buy { opacity: .4; pointer-events: none; }
.buy-lock { margin-top: 18px; width: 100%; opacity: .4; cursor: not-allowed; }
body:not(:has(#agree:checked)) a.buy { display: none; }
body:has(#agree:checked) .buy-lock { display: none; }
body:has(#cash:checked) .buy-lock-card, body:not(:has(#cash:checked)) .buy-lock-cash { display: none; }
.hint { font-size: .82rem; color: var(--muted); margin: 8px 0 0; text-align: center; }
body:has(#agree:checked) .hint { visibility: hidden; }
.qr { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin-top: 28px; padding: 16px; background: var(--card); border: 1px dashed #d7c9a8; border-radius: var(--r); }
.qr img { width: 120px; height: 120px; display: block; }
.qr p { margin: 0; font-size: .9rem; }
.qr b { display: block; margin-bottom: 4px; }

.overlay { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(11,12,13,.6); padding: 16px; overflow-y: auto; }
.overlay:target { display: grid; place-items: center; }
.sheet { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 22px; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.sheet .x { position: absolute; top: 10px; right: 14px; text-decoration: none; font-size: 1.4rem; color: var(--muted); }
.sheet h2 { margin: 6px 0 4px; letter-spacing: 0; color: var(--ink); font-size: 1.2rem; }
.sheet .demo-tag { display: inline-block; background: #fbefcf; color: var(--gold-text); border-radius: 999px; font-size: .75rem; font-weight: 800; padding: 2px 10px; }
.fake-field { border: 1px solid #d9d9d9; border-radius: 8px; padding: 10px 12px; margin-top: 8px; color: #777; font-size: .92rem; }
.fake-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .btn { width: 100%; margin-top: 14px; }
.ok-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 30px; margin: 4px auto 10px; }
.sheet.center { text-align: center; }
.sheet p { color: var(--muted); font-size: .9rem; }

/* ---------- Calendar (week grid) ---------- */
.cal-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px; }
.cal { display: grid; grid-template-columns: 46px repeat(7, minmax(84px, 1fr)); grid-template-rows: 40px repeat(13, 34px); min-width: 660px; position: relative; font-size: .78rem; }
.cal .dh { grid-row: 1; text-align: center; padding: 6px 2px; font-weight: 700; border-bottom: 1px solid var(--line); background: #faf6ee; }
.cal .dh.today { color: var(--gold-text); background: #fbf3dd; }
.cal .hr { grid-column: 1; color: var(--muted); text-align: right; padding: 0 6px; border-top: 1px solid #f0eadf; font-size: .72rem; }
.cal .gl { grid-column: 2 / -1; border-top: 1px solid #f0eadf; }
.cal .ev { margin: 1px 3px; border-radius: 6px; padding: 2px 6px; line-height: 1.25; overflow: hidden; background: #fbf3dd; border-left: 3px solid var(--gold); z-index: 1; }
.cal .ev.trial { background: #eef3fc; border-left-color: #4285f4; }
.cal .ev.bad { background: #fbeeed; border-left-color: var(--red); }
.cal .ev small { display: block; color: var(--muted); }
.c1 { grid-column: 2; } .c2 { grid-column: 3; } .c3 { grid-column: 4; } .c4 { grid-column: 5; } .c5 { grid-column: 6; } .c6 { grid-column: 7; } .c7 { grid-column: 8; }
.r1 { grid-row: 2; } .r2 { grid-row: 3; } .r3 { grid-row: 4; } .r4 { grid-row: 5; } .r5 { grid-row: 6; } .r6 { grid-row: 7; } .r7 { grid-row: 8; } .r8 { grid-row: 9; } .r9 { grid-row: 10; } .r10 { grid-row: 11; } .r11 { grid-row: 12; } .r12 { grid-row: 13; } .r13 { grid-row: 14; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .8rem; color: var(--muted); margin: -6px 0 18px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--gold); }
.legend i.t { background: #4285f4; } .legend i.b { background: var(--red); }
.muted { color: var(--muted); }
.btn-ghost-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
