/* 10 min for two アプリ共通スタイル（Brand Color Guideline v1.0 の6色＋モヤモヤ色） */
:root {
  --primary: #789486;   /* メインボタン・主要アクション */
  --bg: #FBFAF7;        /* アプリ全体の背景 */
  --surface: #FFFDF9;   /* カード・入力欄 */
  --sub: #DCE8DF;       /* ありがとう・ポジティブ */
  --moya: #F3DDD3;      /* 相談・モヤモヤ */
  --accent: #D9957C;    /* アクセント */
  --text: #393C36;      /* 見出し・本文 */
  --soft: #73776f;
  --line: #ECE8E0;
  --danger: #a5432b;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --en: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7; }
body.talk { background: var(--sub); }

.wrap {
  max-width: 480px; margin: 0 auto;
  padding: 16px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.45; font-weight: 700; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.muted { color: var(--soft); font-size: 14px; }
.small { font-size: 12px; }
.center { text-align: center; }
.en { font-family: var(--en); }

.brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--en); font-weight: 500; font-size: 19px; color: var(--text); text-decoration: none; }
.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 12px; background: var(--surface); border: 1px solid var(--line); color: var(--soft); white-space: nowrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.sub { background: var(--sub); border-color: transparent; }
.card.moya { background: var(--moya); border-color: transparent; }
.card.save { border: 1.5px solid var(--accent); }
.eyebrow { font-family: var(--en); font-size: 12px; letter-spacing: .16em; color: var(--primary); font-weight: 600; }

.btn {
  font: inherit; font-weight: 700; font-size: 16px; min-height: 54px; border-radius: 999px; border: 0;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; cursor: pointer; text-decoration: none; padding: 8px 18px;
}
.btn.accent { background: var(--accent); }
.btn.line { background: #06c755; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--soft); font-size: 15px; min-height: 48px; }
.btn.white { background: var(--surface); color: var(--primary); border: 1.5px solid var(--line); }
.btn.text { background: transparent; color: var(--soft); font-size: 14px; min-height: 40px; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid #ecd1c7; font-size: 14px; min-height: 44px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.picked { outline: 3px solid var(--primary); outline-offset: 2px; }
.row-btns { display: flex; gap: 8px; }
.row-btns .btn { flex: 1; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--soft); }
input[type="text"], textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; min-height: 50px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: inherit; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: 15px; background: var(--surface); color: var(--text); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; }
.seg button { font: inherit; font-weight: 700; font-size: 14px; border: 0; background: transparent; color: var(--soft); border-radius: 999px; padding: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(57,60,54,.1); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { border: 0; font: inherit; color: var(--text); text-align: left; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 2px; min-height: 120px; cursor: pointer; }
.mini.thanks { background: var(--sub); }
.mini.topic { background: var(--moya); }
.mini .ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.7); display: grid; place-items: center; margin-bottom: 6px; }
.mini b { font-size: 16px; }
.mini span { font-size: 12px; color: var(--soft); }
.mini .count { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--primary); }
.mini.topic .count { color: #a45b41; }

.week { display: flex; justify-content: space-between; align-items: flex-end; }
.week .n { font-family: var(--en); font-size: 40px; line-height: 1; font-weight: 500; }
.days { display: flex; gap: 7px; }
.days i { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--soft); }
.days i.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.days i.today { border-color: var(--accent); }
.prompt { background: var(--bg); border-radius: 16px; padding: 12px 14px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.lock { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }

.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.items li { display: flex; gap: 10px; align-items: flex-start; border-radius: 16px; padding: 11px 13px; font-size: 15px; background: var(--bg); overflow-wrap: anywhere; }
.items li.thanks { background: var(--sub); }
.items li.topic { background: var(--moya); }
.items .x { margin-left: auto; flex: none; border: 0; background: transparent; color: var(--soft); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.tag { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; margin-top: 3px; color: #fff; background: var(--primary); }
.tag.b { background: var(--accent); }

.who { display: flex; align-items: center; gap: 10px; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--primary); flex: none; }
.av.b { background: var(--accent); }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 24px 24px 24px 8px; padding: 20px; font-size: 22px; font-weight: 700; line-height: 1.5; white-space: pre-line; }

.steps { display: flex; gap: 6px; }
.steps span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 7px 0; border-radius: 999px; background: rgba(255,255,255,.6); color: var(--soft); }
.steps span.done { background: var(--surface); color: var(--primary); }
.steps span.on { background: var(--primary); color: #fff; }
.timer { font-family: var(--en); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.timer.over { color: var(--accent); }
.turn { background: var(--surface); border-radius: 28px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.turn .av { width: 60px; height: 60px; font-size: 22px; }
.turn .items { width: 100%; text-align: left; }

.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; font-size: 13px; color: var(--soft); display: flex; flex-direction: column; gap: 4px; }
.notice strong { color: var(--text); font-size: 14px; }
.error { color: var(--danger); font-weight: 700; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 20; }
.foot { text-align: center; font-size: 13px; color: var(--soft); }
.foot a, .legal a { color: var(--primary); }
.linkbox { background: var(--bg); border: 1.5px dashed var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; overflow-wrap: anywhere; color: var(--soft); }

/* 規約ページ */
.legal { max-width: 680px; }
.legal h1 { font-size: 24px; }
.legal h2 { font-size: 17px; margin-top: 12px; }
.legal p, .legal li { font-size: 15px; }
.legal ol, .legal ul { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--surface); width: 34%; }
.fill { background: #fff3c4; padding: 0 4px; border-radius: 4px; }

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