/* ===========================================================
   マヤ暦手帳 - スタイルシート
   ------------------------------------------------------------
   デザインの方向性:
   - 深い夜空のような背景色に、羊皮紙のような温かい生成り色の文字
   - アクセントカラーは彩度を抑えた翡翠色(じゃすい)。黒KINなど特別な
     結果だけ、抑えた琥珀色(あんばー)を控えめに使う
   - 装飾的なグラデーションや絵文字は使わない
   - 情報は折りたたみ(details)で段階的に開示する
   - 「13の音の環」を、結果ごとに表示する独自のサイン(signature)として使う
   =========================================================== */

:root {
  --bg: #12141c;
  --bg-elevated: #181b26;
  --bg-elevated-2: #1f2330;
  --text: #ece6d6;
  --text-muted: #9c9686;
  --text-faint: #726d60;
  --accent: #5f9484;
  --accent-soft: rgba(95, 148, 132, 0.16);
  --accent-line: rgba(95, 148, 132, 0.45);
  --clay: #b2704f;
  --clay-soft: rgba(178, 112, 79, 0.16);
  --divider: rgba(236, 230, 214, 0.1);
  --radius: 4px;
  --max-width: 560px;

  --font-display: "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "Noto Serif JP", serif;
  --font-body: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  padding-bottom: 64px;
}

a { color: var(--accent); }

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

/* ---------------- レイアウト共通 ---------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 20, 28, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--divider);
  padding: 18px 20px 0;
}

.app-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  color: var(--text);
}

.tab-nav {
  display: flex;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px 4px 12px;
  letter-spacing: 0.04em;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

section + section { margin-top: 32px; }

h2.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin: 0 0 14px;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

/* ---------------- フォーム ---------------- */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.date-inputs {
  display: flex;
  gap: 8px;
}

input[type="number"], input[type="text"], input[type="email"], input[type="password"], select {
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  color: var(--text);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 16px;
  width: 100%;
  font-family: inherit;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.date-inputs input { text-align: center; }
.date-inputs .y { flex: 1.4; }
.date-inputs .m, .date-inputs .d { flex: 1; }

.btn-primary {
  display: inline-block;
  width: 100%;
  background: var(--accent);
  color: #0e1712;
  border: none;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: underline;
  padding: 4px;
}

.btn-danger {
  color: var(--clay);
}

.form-error {
  color: var(--clay);
  font-size: 13px;
  margin-top: 8px;
}

/* ---------------- KINヒーロー表示 ---------------- */

.kin-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--divider);
}

.kin-hero .kin-number {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.kin-hero .kin-label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.kin-hero .seal-name {
  font-size: 18px;
  margin-top: 2px;
}

.one-liner {
  font-size: 15px;
  color: var(--text);
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin: 18px 0;
}

/* 13の音の環(サイン要素) */
.tone-ring { flex-shrink: 0; }
.tone-ring circle.dot { fill: var(--divider); }
.tone-ring circle.dot.active { fill: var(--accent); }
.tone-ring text.tone-num {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-body);
}

/* ---------------- 基本情報カード ---------------- */

.basic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin: 18px 0;
  font-size: 14px;
}

.basic-grid .item-label { color: var(--text-faint); font-size: 12px; }
.basic-grid .item-value { color: var(--text); }

/* ---------------- 読み物ブロック ---------------- */

.reading-block {
  margin-bottom: 20px;
}

.reading-block h3 {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  font-weight: 500;
}

.reading-block p {
  color: var(--text);
  font-size: 15px;
}

.special-note {
  border-left: 2px solid var(--clay);
  background: var(--clay-soft);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 10px;
}

/* ---------------- 折りたたみ(詳細) ---------------- */

details.detail-box {
  border-top: 1px solid var(--divider);
  padding: 14px 0;
}

details.detail-box summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.detail-box summary::-webkit-details-marker { display: none; }

details.detail-box summary::after {
  content: "＋";
  color: var(--text-faint);
  font-size: 13px;
}

details.detail-box[open] summary::after { content: "－"; }

.detail-list { margin-top: 14px; font-size: 14px; }
.detail-list .row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--divider);
}
.detail-list .row .k { color: var(--text-faint); }
.detail-list .row .v { color: var(--text); text-align: right; }

/* ---------------- 人物カード ---------------- */

.person-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-card .info { flex: 1; min-width: 0; }
.person-card .name { font-size: 15px; }
.person-card .meta { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.person-card .actions { display: flex; gap: 6px; flex-shrink: 0; }
.person-card .actions button {
  background: none;
  border: 1px solid var(--divider);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 12px;
  padding: 6px 10px;
}

.empty-state {
  color: var(--text-faint);
  font-size: 14px;
  padding: 24px 0;
  text-align: center;
}

/* ---------------- 相性診断 ---------------- */

.compat-select {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.compat-select select { flex: 1; }

.compat-oneliner {
  font-size: 16px;
  font-family: var(--font-display);
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.compat-people-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.compat-people-row .person-col {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
}
.compat-people-row .person-col .name { color: var(--text); font-size: 15px; margin-bottom: 4px; }

.direction-block {
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 14px;
}

/* ---------------- フッター ---------------- */

.footnote {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding: 0 20px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.8;
}

/* ---------------- レスポンシブ ---------------- */

@media (min-width: 640px) {
  main { padding-top: 32px; }
  .kin-hero .kin-number { font-size: 60px; }
}

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

/* ===========================================================
   ここから下は 2026-07 の機能拡張で追記したスタイルです。
   既存クラスは変更していません。
   デザインコンセプト: 「迷わない、探さない、すぐ分かる。」
   =========================================================== */

:root {
  /* マヤ暦の4色+中央(城の色)。原色を避けた上品なトーン */
  --maya-red: #a5604f;
  --maya-white: #b9b3a0;
  --maya-blue: #5a7d99;
  --maya-yellow: #b3985c;
  --maya-green: #5f9484; /* 既存アクセントと同系 */
}

/* ---------------- ヘッダー(辞典リンク) ---------------- */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
}
.header-row .app-title { margin: 0; }
.dict-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- 下部固定ナビ ---------------- */
body { padding-bottom: 96px; } /* ナビの高さ分の余白を上書き */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  background: rgba(18, 20, 28, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--divider);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.nav-btn .nav-mark { font-size: 15px; line-height: 1; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-label { color: var(--text); }

.back-link { margin-bottom: 12px; display: inline-block; }

.lead-note { font-size: 13px; color: var(--text-muted); }

/* ---------------- ホーム画面 ---------------- */

/* A. 今日のひとこと(最重要: 最も大きく) */
.today-oneliner {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 2;
  letter-spacing: 0.03em;
  margin: 8px 0 26px;
  color: var(--text);
}
.today-date {
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

/* B. 今日のKIN(コンパクトな一覧) */
.today-kin-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.today-kin-line .big {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
}
.today-kin-line .sub { font-size: 14px; color: var(--text-muted); }

.day-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid var(--divider);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.badge.special { border-color: rgba(178,112,79,0.5); color: var(--clay); }
.badge.accent { border-color: var(--accent-line); color: var(--accent); }

/* C. あなたと今日の関係 */
.relation-today {
  margin: 26px 0;
}
.relation-today .rel-title {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
}
.relation-today p { font-size: 14.5px; color: var(--text-muted); }

/* D. 流れ(13日間・52日間) */
.flow-block {
  margin: 26px 0;
}
.flow-item { margin-bottom: 18px; }
.flow-item .flow-name {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 2px;
}
.flow-item .flow-count { font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; }
.flow-item p { font-size: 14px; color: var(--text-muted); }

/* 260日バンド(現在地の視覚表現) */
.tzolkin-band-wrap { margin: 18px 0 6px; }
.tzolkin-band {
  position: relative;
  height: 14px;
  border-radius: 3px;
  overflow: visible;
  display: flex;
}
.tzolkin-band .seg { height: 100%; }
.tzolkin-band .seg.c1 { background: rgba(165, 96, 79, 0.4); border-radius: 3px 0 0 3px; }
.tzolkin-band .seg.c2 { background: rgba(185, 179, 160, 0.32); }
.tzolkin-band .seg.c3 { background: rgba(90, 125, 153, 0.4); }
.tzolkin-band .seg.c4 { background: rgba(179, 152, 92, 0.4); }
.tzolkin-band .seg.c5 { background: rgba(95, 148, 132, 0.4); border-radius: 0 3px 3px 0; }
.tzolkin-band .ws-window {
  position: absolute;
  top: -3px; bottom: -3px;
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  pointer-events: none;
}
.band-marker {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1;
}
.band-marker.today-m { top: -16px; color: var(--text); }
.band-marker.self-m { bottom: -16px; color: var(--accent); }
.band-caption {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 22px;
}
.band-legend {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
}
.band-legend .you { color: var(--accent); }

/* E. 明日 */
.tomorrow-block {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  margin-top: 26px;
}
.tomorrow-block .t-label { font-size: 12px; color: var(--text-faint); letter-spacing: 0.12em; margin-bottom: 6px; }
.tomorrow-block .t-line { font-family: var(--font-display); font-size: 17px; color: var(--text); margin-bottom: 8px; }
.tomorrow-block p { font-size: 13.5px; color: var(--text-muted); }

.home-links { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- 月間カレンダー ---------------- */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.06em; }
.cal-nav-btn {
  background: none;
  border: 1px solid var(--divider);
  color: var(--text-muted);
  border-radius: var(--radius);
  width: 38px; height: 38px;
  font-size: 18px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  padding: 4px 0;
}
.cal-cell {
  min-height: 58px;
  background: var(--bg-elevated);
  border-radius: 3px;
  border: none;
  border-left: 3px solid transparent;
  padding: 4px 3px 3px;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-body);
}
.cal-cell:disabled { opacity: 0.28; }
.cal-cell.color-red { border-left-color: var(--maya-red); }
.cal-cell.color-white { border-left-color: var(--maya-white); }
.cal-cell.color-blue { border-left-color: var(--maya-blue); }
.cal-cell.color-yellow { border-left-color: var(--maya-yellow); }
.cal-cell.is-today { outline: 1px solid var(--accent-line); }
.cal-cell .c-day { font-size: 12.5px; line-height: 1.2; }
.cal-cell .c-kin { font-size: 10px; color: var(--text-faint); line-height: 1.2; }
.cal-cell .c-marks { display: flex; flex-wrap: wrap; gap: 2px; margin-top: auto; }
.mini-mark {
  font-size: 9px;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 2px;
  background: var(--bg-elevated-2);
  color: var(--text-muted);
}
.mini-mark.mm-black { background: #2a2118; color: var(--clay); }
.mini-mark.mm-ext { color: var(--maya-yellow); }
.mini-mark.mm-ws { color: var(--accent); }
.mini-mark.mm-castle { color: var(--maya-blue); }
.mini-mark.mm-self { background: var(--accent-soft); color: var(--accent); }
.mini-mark.mm-birthday { color: var(--maya-red); }
.mini-mark.mm-mirror, .mini-mark.mm-ao { color: var(--text); }

.legend-list { margin-top: 12px; font-size: 13px; }
.legend-list .row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--divider); align-items: baseline; }
.legend-list .row .mini-mark { flex-shrink: 0; font-size: 10px; }
.legend-list .row .desc { color: var(--text-muted); }

/* ---------------- 日付詳細 ---------------- */
.di-plan-title {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 16px 0 4px;
}
.di-theme {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 2;
  margin: 14px 0 20px;
}
.di-kin-summary {
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 12px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  margin-bottom: 18px;
  line-height: 1.9;
}

/* ---------------- 相性(強化版) ---------------- */
.compat-headline {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.9;
  margin: 10px 0 6px;
  color: var(--text);
}
.compat-oneword {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 18px;
}
.approach-list .row {
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.approach-list .row .k { font-size: 12.5px; color: var(--accent); display: block; margin-bottom: 4px; }
.approach-list .row .v { font-size: 14px; color: var(--text); }
.plain-list p { padding-left: 1em; text-indent: -1em; }
.plain-list p::before { content: "・"; color: var(--text-faint); }

/* ---------------- 自分ページ ---------------- */
.self-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.self-header .kin-big { font-family: var(--font-display); font-size: 40px; }
.self-header .meta { font-size: 13px; color: var(--text-muted); }
.self-header .name { font-size: 16px; color: var(--text); }

/* ---------------- 辞典 ---------------- */
.dict-entry { border-bottom: 1px solid var(--divider); }
.dict-entry summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dict-entry summary::-webkit-details-marker { display: none; }
.dict-entry summary::after { content: "＋"; color: var(--text-faint); font-size: 13px; }
.dict-entry[open] summary::after { content: "－"; }
.dict-entry .dict-body { padding: 0 0 16px; }
.dict-entry .dict-body h4 {
  font-size: 12px; color: var(--accent); font-weight: 500;
  letter-spacing: 0.08em; margin: 10px 0 4px;
}
.dict-entry .dict-body p { font-size: 14px; color: var(--text-muted); }

@media (min-width: 640px) {
  .bottom-nav { max-width: var(--max-width); margin: 0 auto; left: 50%; transform: translateX(-50%); right: auto; width: 100%; border-left: 1px solid var(--divider); border-right: 1px solid var(--divider); }
  .cal-cell { min-height: 66px; }
}

/* ===========================================================
   2026-07 追記: 初心者向けリニューアル分のスタイル
   方針: 最初に見えるのは体験的な文章だけ。専門用語は
   "detail-box"(<details>)の中に閉じ込め、装飾を落ち着かせる。
   =========================================================== */

/* ---- ホーム: 4つの体験ブロック ---- */
.home-block { margin: 0 0 28px; }
.home-block-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 500;
}
.home-block .today-oneliner { margin: 0; font-size: 20px; }
.home-block p { font-size: 15px; color: var(--text); line-height: 1.9; margin: 0 0 8px; }
.home-block .lead-note { font-size: 13px; color: var(--text-muted); }

.flow-highlight {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px !important;
}
.flow-castle-note { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--divider); }

.step-text {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 15px !important;
}

.home-detail-toggle { margin-top: 10px; }

/* ---- 自分ページ: タイプ名を主役にしたヒーロー ---- */
.type-hero { margin-bottom: 6px; }
.type-hero-label { font-size: 12px; color: var(--text-faint); letter-spacing: 0.1em; margin-bottom: 4px; }
.type-hero-name {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  line-height: 1.4;
}
.type-hero-birth { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* 相性画面の見出し(専門用語を含まない体験フレーズが主役) */
.compat-headline { font-size: 19px; line-height: 1.8; }

/* ---- 相性: カテゴリ別の具体的な付き合い方(2026-07-11 追加) ---- */
.compat-category-heading {
  margin: 28px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-display);
  font-size: 17px;
}
.compat-block h4 { font-size: 14px; color: var(--accent); margin: 0 0 6px; font-weight: 500; }

/* ---- アカウント(会員登録・ログイン・メール認証) Phase 2C追加 ----
   既存のフォーム(.field, .btn-primary等)を基本に、最小限のスタイルのみ追加する。
   青い専用デザインや別製品風の見た目にはしない。 */

.account-mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.account-mode-toggle .btn-secondary,
.account-mode-toggle .btn-text {
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.password-toggle {
  display: block;
  margin: -8px 0 16px;
  text-decoration: underline;
}

.account-resend-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.account-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* ---- データの保存・読み込み(同期) Phase 2F追加 ---- */

.sync-card {
  margin-bottom: 14px;
}
.sync-card .name {
  font-weight: 600;
  margin-bottom: 4px;
}
.sync-choice-group {
  margin-top: 8px;
}
.sync-choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sync-choice-row input[type="radio"] {
  width: auto;
}
.sync-choice-label {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 0;
}




/* =========================================================
 * My Compass 本体機能完成(260マップ/時代/期間/特別な日/相性状況)
 * 既存トークン(深紺・生成り・翡翠、--maya-*、--radius:4px)を踏襲。
 * マヤ的な図像装飾は付けず、既存の reading-block / detail-box に馴染ませる。
 * ========================================================= */

/* ---- 時代の1行導線(ホーム) ---- */
.era-line { margin-bottom: 4px; }
.era-map-link {
  display: inline-block;
  margin: 0 0 14px;
  padding: 0;
}

/* ---- ツォルキン260マップ(フル画面・ヒートマップ型) ---- */
.tz-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 4px;
  padding-bottom: 6px;
}
.tz-grid {
  display: inline-block;
  min-width: 100%;
}
.tz-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-bottom: 2px;
  padding: 2px;
  border-radius: var(--radius);
}
/* 城(時代)ごとの帯色。薄い背景で段を区別する(色だけに意味を依存させない) */
.tz-row.cst-red    { background: rgba(165, 96, 79, 0.12); }
.tz-row.cst-white  { background: rgba(185, 179, 160, 0.10); }
.tz-row.cst-blue   { background: rgba(90, 125, 153, 0.12); }
.tz-row.cst-yellow { background: rgba(179, 152, 92, 0.12); }
.tz-row.cst-green  { background: rgba(95, 148, 132, 0.12); }

.tz-row-label {
  flex: 0 0 76px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tz-cell {
  flex: 1 1 0;
  min-width: 26px;
  height: 34px;
  border: 1px solid var(--divider);
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1.1;
}
.tz-cell:hover { border-color: var(--accent-line); }
.tz-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tz-kin { font-size: 10px; }
.tz-mark { font-size: 11px; color: var(--text); margin-top: 1px; }

/* 現在の13日間(行)・現在の時代(城)を、色以外の手掛かりでも示す */
.tz-cell.in-ws { background: var(--accent-soft); }
.tz-cell.in-castle { border-color: rgba(95, 148, 132, 0.4); }
.tz-cell.is-today {
  border-color: var(--accent);
  border-width: 2px;
  color: var(--text);
}
.tz-cell.is-self {
  background: var(--clay-soft);
  border-color: var(--clay);
  color: var(--text);
}
.tz-cell.is-black .tz-kin::after {
  content: "";
  display: inline-block;
  width: 3px; height: 3px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--clay);
  vertical-align: super;
}

.tz-legend {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 13px;
}
.tz-legend .row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.tz-legend .row:last-child { margin-bottom: 0; }
.tz-legend-mark {
  flex: 0 0 24px;
  text-align: center;
  color: var(--text);
}
.tz-legend .desc { color: var(--text-muted); }

/* ---- 期間サマリー(この先7日間 / 今月のながれ) ---- */
.period-box { margin-bottom: 12px; }
.period-body { padding-top: 10px; }
.period-highlights { margin-bottom: 10px; }
.period-day-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0;
}
.period-day-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
}
.period-day-row:hover { border-color: var(--accent-line); }
.period-day-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pd-date { flex: 0 0 46px; font-size: 13px; color: var(--text-muted); }
.pd-type {
  flex: 0 0 68px;
  font-size: 12px;
  color: var(--accent);
}
.pd-type.pd-type-none { color: var(--text-faint); }
.pd-theme { flex: 1 1 auto; font-size: 13px; color: var(--text); }
.period-subhead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 4px;
}
.period-sub-list p { margin: 2px 0; font-size: 14px; }
.period-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---- 特別な日の翻訳(日付詳細) ---- */
.special-day-block {
  border-left: 2px solid var(--clay);
  padding-left: 12px;
}

/* ---- 相性の状況別タブ ---- */
.compat-sit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}
.compat-sit-tab {
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}
.compat-sit-tab:hover { border-color: var(--accent-line); }
.compat-sit-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.compat-sit-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
