/* OHANA — 家族のやることを、ふたりで。
   骨格（余白・細い字間のロゴ・装飾を足さない）は ARKUNO（arkuno-api/web）、
   色と角は「沖縄の海と、子どものいる家」に寄せてやわらかく。 */

:root {
  --bg: #fbf7f1;          /* ミルク */
  --surface: #fff;
  --sunken: #f4eee5;
  --text: #2d2b35;        /* 墨ではなく、少し青みのやわらかい黒 */
  --muted: #7a7581;
  --faint: #b5aea5;
  --border: #eee5d9;
  --border-strong: #ddd2c3;
  --accent: #2d2b35;
  --accent-hover: #423f4c;

  /* 家族のパレット（海・サンゴ・たいよう・はっぱ・ゆうぐれ） */
  --sea: #3f97c4;   --sea-bg: #e5f3fa;
  --coral: #ec7f62; --coral-bg: #fdece6;
  --sun: #f2b53a;   --sun-bg: #fdf3da;
  --leaf: #4fb383;  --leaf-bg: #e4f5ec;
  --dusk: #9b7fd0;  --dusk-bg: #f0ebfa;

  --success: #2f9467;
  --success-bg: #e4f5ec;
  --error: #d24b3c;
  --error-bg: #fdecea;
  --warn: #a4690b;
  --warn-bg: #fdf3da;

  /* 担当：パパママ＝ゆうぐれ、Jose＝海、Vanessa＝サンゴ、seo/nasa＝はっぱ */
  --p-c: var(--dusk);
  --p-j: var(--sea);
  --p-w: var(--coral);
  --p-k: var(--leaf);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --font-brand: 'Jost', 'Avenir Next', sans-serif;
  --font-display: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', sans-serif;
  --shadow: 0 1px 2px rgba(45, 43, 53, 0.04), 0 10px 30px rgba(45, 43, 53, 0.07);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--font-brand); font-variant-numeric: tabular-nums; }

/* ---- ブランド・見出し ---- */
.brand {
  font-family: var(--font-brand);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-block { display: grid; gap: 6px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
/* 家族4人（パパ・ママ・seo・nasa）を表す4つの点 */
.family-dots { display: inline-flex; gap: 4px; }
.family-dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.family-dots i:nth-child(1) { background: var(--sea); }
.family-dots i:nth-child(2) { background: var(--coral); }
.family-dots i:nth-child(3) { background: var(--leaf); width: 5px; height: 5px; margin-top: 2px; }
.family-dots i:nth-child(4) { background: var(--sun); width: 5px; height: 5px; margin-top: 2px; }
.tagline { font-family: var(--font-display); font-weight: 500; font-size: 0.84rem; letter-spacing: 0.06em; color: var(--muted); margin: 0; }
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-wrap: pretty;
  margin: 0;
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}
.muted { color: var(--muted); }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(45, 43, 53, 0.14);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--sunken); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.link { background: none; border: none; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* ---- 入力 ---- */
.field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.03em; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px var(--sea-bg); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.6; }

/* ---- メッセージ ---- */
.notice { border-radius: var(--r-sm); padding: 12px 14px; font-size: 0.86rem; }
.notice.error { background: var(--error-bg); color: var(--error); border: 1px solid #f6cfc8; }
.notice.ok { background: var(--success-bg); color: var(--success); border: 1px solid #c3e8d4; }
.notice .code { opacity: 0.6; font-size: 0.75rem; }

/* ---- 認証まわり（ログイン・登録）の1カラム画面 ---- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top, 0px)) 24px calc(32px + env(safe-area-inset-bottom, 0px));
  gap: 28px;
}
.auth-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth h1 { font-size: 1.75rem; }
.auth .lead { margin: 10px 0 0; color: var(--muted); }
.auth-actions { display: grid; gap: 12px; }
.auth-foot { text-align: center; font-size: 0.85rem; color: var(--muted); display: grid; gap: 6px; }
.keymark {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sun-bg); color: #8a5a00;
  box-shadow: inset 0 0 0 6px #fff8e6;
}
.keymark svg { width: 28px; height: 28px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 0.9rem; }
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  font-family: var(--font-brand); font-size: 0.85rem;
}
.steps li.done::before { content: '✓'; background: var(--leaf); border-color: var(--leaf); color: #fff; }
.steps li b { display: block; }
.steps li span { color: var(--muted); font-size: 0.82rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }

.keys { list-style: none; margin: 0; padding: 0; }
.keys li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
.keys li:first-child { border-top: none; }
.keys .k-main { flex: 1; min-width: 0; }
.keys .k-name { font-weight: 600; }
.keys .k-meta { font-size: 0.78rem; color: var(--muted); }
.tag { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: none; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- アプリ内ブラウザ（LINE など）の案内 ---- */
.inapp-note { display: none; background: var(--sun-bg); color: #6b4a00; border-radius: var(--r-sm); padding: 14px 16px; font-size: 0.86rem; line-height: 1.7; }
html[data-inapp] .inapp-note { display: block; }
.inapp-note b { display: block; margin-bottom: 4px; }
.inapp-note .copy { margin-top: 10px; border: 1px solid #e8cf8f; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; }
