/* Account pages (login, dashboard). Same warm-paper look as the landing page (assets/theme-d.css). */
:root {
  --bg: #faf7f2; --ink: #1c1b19; --muted: #655f56; --card: #fff; --line: #e9e2d6; --line-strong: #d6cbbb;
  --terra: #c4623f; --accent: #b5532f; --accent-hover: #9e4627; --accent-soft: #f8e9e2; --accent-ink: #fff;
  --err: #b3261e; --ok: #1f7a46; --wait: #a86400; --focus: #1a5fb4;
  --font: Inter, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 30px 70px -30px rgba(90, 50, 25, .28);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--ink); background: radial-gradient(rgba(90, 60, 35, .11) 1px, transparent 1.3px) 0 0/24px 24px, var(--bg); min-height: 100vh; }
[hidden] { display: none !important; }
svg { flex: none; }
a { color: var(--accent); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* header */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px clamp(16px, 4vw, 40px); background: rgba(250, 247, 242, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.bar-r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.me { display: inline-flex; padding: 0 6px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; flex: none; }

/* type */
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -.035em; font-weight: 800; margin: 0 0 8px; }
html[lang="ja"] h1 { letter-spacing: -.01em; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 0 0 4px; }
.eyebrow, .label, .num, .pill { font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow { color: var(--accent); margin: 0 0 10px; }
.label { color: var(--muted); margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0; }
.fine { color: var(--muted); font-size: 12px; margin: 16px 0 0; }

/* cards and buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
button { font: inherit; cursor: pointer; border-radius: 999px; padding: 11px 18px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, .btn-primary { display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: 999px; padding: 12px 18px; text-decoration: none; }
button.primary:hover:not(:disabled), .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 18px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.btn-ghost:hover { border-color: var(--ink); background: #f3ece2; }
button.provider { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-bottom: 12px; padding: 13px 18px; font-weight: 600; transition: border-color .15s, background .15s, transform .15s; }
button.provider:hover:not(:disabled) { border-color: var(--ink); background: #fdfaf6; transform: translateY(-1px); }
button.provider svg { width: 20px; height: 20px; }
button.ghost { border-color: transparent; background: none; color: var(--muted); padding: 6px 10px; }
button.ghost:hover { color: var(--ink); }

/* forms (email sign-in, local development only) */
label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.or { display: flex; align-items: center; gap: 12px; margin: 8px 0 18px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msg { min-height: 1.4em; margin: 14px 0 0; font-size: 13px; }
.msg:empty { min-height: 0; margin: 0; }
.msg.error { color: var(--err); }
.msg.ok { color: var(--ok); }
.links { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 0; font-size: 13px; }
.links:not(:has(a:not([hidden]))) { display: none; }

/* login */
.auth-grid { display: grid; gap: 40px; align-items: center; max-width: 1080px; margin: 0 auto; padding: clamp(32px, 7vw, 88px) clamp(16px, 4vw, 40px); }
@media (min-width: 900px) { .auth-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 72px; min-height: calc(100vh - 64px); } }
.story { display: none; }
@media (min-width: 900px) { .story { display: block; } }
.story-title { white-space: pre-line; font-size: clamp(34px, 4.2vw, 50px); line-height: 1.02; font-weight: 800; letter-spacing: -.05em; margin: 0 0 28px; }
html[lang="ja"] .story-title { white-space: pre-line; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.3; letter-spacing: -.01em; }
.story-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; }
.story-list li { display: flex; gap: 14px; align-items: baseline; color: var(--muted); }
.num { color: var(--accent); }
.story-log { background: #1c1b19; color: #c9c4b9; border-radius: 14px; padding: 14px 18px; font-family: var(--mono); font-size: 12.5px; box-shadow: var(--shadow); max-width: 440px; }
.story-log p { margin: 4px 0; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: #3fb97a; } .dot.wait { background: #e0a43a; } .dot.run { background: var(--terra); }
.login-card { width: 100%; max-width: 440px; margin: 0 auto; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 40px); }
.login-card h1 { font-size: clamp(24px, 3vw, 30px); }
.login-card .lead { margin-bottom: 26px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); font-size: 12.5px; font-weight: 600; }
.badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#consent .other { margin: 12px 0 0; }

/* dashboard */
main.wide { max-width: 980px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 40px) 64px; }
.dash-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.plan-row { margin: 0 0 14px; }
.plan { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.bar-track { height: 8px; border-radius: 999px; background: #f1ebe1; overflow: hidden; margin: 0 0 12px; }
.bar-track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.download-card { background: linear-gradient(160deg, #fff 40%, #fbefe8); }
.download-card .hint { margin-bottom: 20px; }
.download-card .btn-primary { width: auto; }
h2.sec { margin: 44px 0 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pill { display: inline-block; margin: 0 0 12px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }
.help { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .plans { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}
