/* AzWalk — 紙と地図の世界。小さく洗練された寸法、静かな動き。 */
:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --ink: #1c2b33;
  --sub: #6b7680;
  --accent: #0d5c57;
  --accent-deep: #0d3b3a;
  --line: #e5e1d8;
  --warn: #fdf3e3;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--paper); color: var(--ink);
  overflow: hidden;
}
.scr { display: none; height: 100dvh; flex-direction: column; }
.scr.active { display: flex; }
.page {
  flex: 1; display: flex; flex-direction: column; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.hidden { display: none !important; }

/* スプラッシュ */
#scr-splash { align-items: center; justify-content: center; background: var(--accent-deep); }
.splash-inner { text-align: center; color: #fff; animation: fadein 0.5s ease; }
.logo-mark { font-size: 34px; font-weight: 800; letter-spacing: 0.04em; }
.logo-mark.sm { font-size: 26px; color: var(--accent-deep); }
.logo-sub { margin-top: 6px; font-size: 12px; opacity: 0.85; letter-spacing: 0.2em; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.h-title { font-size: 20px; font-weight: 800; }
.title-catch { font-size: 14px; color: var(--sub); }
.lead { font-size: 13.5px; line-height: 1.7; }
.notes { margin: 10px 0 0 18px; font-size: 12.5px; line-height: 1.8; color: var(--ink); }
.note-line { font-size: 12px; color: var(--sub); text-align: center; }
.note-line.small { font-size: 11px; }
.sig { margin-top: auto; text-align: center; font-size: 10px; letter-spacing: 0.35em; color: var(--sub); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: 0 1px 3px rgba(28, 43, 51, 0.05);
}
.card.warn { background: var(--warn); }

.btn {
  appearance: none; border: none; cursor: pointer; font: inherit;
  border-radius: 999px; padding: 11px 18px; font-size: 14px; font-weight: 700;
  text-align: center; text-decoration: none; display: inline-block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.big { width: 100%; padding: 14px; }
.btn.huge { width: 100%; padding: 17px; font-size: 17px; border-radius: 999px; }
.btn:disabled { opacity: 0.4; }

/* メイン・タブ */
#scr-main { padding: 0; }
.tab-pages { flex: 1; position: relative; overflow: hidden; }
.tab-page {
  display: none; position: absolute; inset: 0; flex-direction: column; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}
.tab-page.active { display: flex; }
.mini-head { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 15px; font-weight: 800; color: var(--accent-deep); }
.member-chip { font-size: 11px; color: var(--sub); background: #eceae3; border-radius: 999px; padding: 4px 10px; }
.stat-row { display: flex; gap: 8px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 6px; text-align: center; }
.stat-num { font-size: 17px; font-weight: 800; }
.stat-num.big { font-size: 22px; }
.stat-label { font-size: 10px; color: var(--sub); margin-top: 2px; }
.map-card { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.map-card.grow { flex: 1; }
.japan-map { width: 100%; height: 100%; max-height: 100%; }
.map-poly { stroke: #f7f5f0; stroke-width: 0.6; }
.mini-map-card { height: 240px; display: flex; align-items: center; justify-content: center; }

.tabbar {
  display: flex; gap: 4px; margin: 0 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); border-radius: 999px; padding: 5px;
  backdrop-filter: blur(8px);
}
.tab { flex: 1; border: none; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--sub); border-radius: 999px; padding: 9px 0; cursor: pointer; }
.tab.active { background: var(--ink); color: #fff; }

/* 踏破マップ */
.region-tabs, .pref-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--sub); cursor: pointer; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 記録 */
.rec-list { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.rec-item { padding: 11px 13px; }
.rec-head { display: flex; justify-content: space-between; font-size: 13px; }
.rec-memo { margin-top: 5px; font-size: 12px; color: var(--ink); }
.pager { display: flex; align-items: center; justify-content: space-between; }

/* マイページ */
.my-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
#btn-login { margin-top: 10px; }
.my-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.my-row:last-of-type { border-bottom: none; }
.tadataka { margin-top: 10px; }
.tadataka-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar { height: 8px; background: #eceae3; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.6s ease; }
.tadataka .note-line { text-align: left; margin-top: 6px; }

/* 歩行中 */
.walk-page { align-items: stretch; }
.walk-stats { display: flex; gap: 10px; }
.walk-stats > div { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.walk-num { font-size: 30px; font-weight: 800; }
.walk-canvas { flex: 1; min-height: 0; width: 100%; border-radius: 16px; border: 1px solid var(--line); }

/* 終了サマリ */
.done-nums { display: flex; gap: 10px; text-align: center; margin-bottom: 8px; }
.done-nums > div { flex: 1; }
.visit-line { font-size: 13px; padding: 3px 0; }
.points-line { margin-top: 10px; font-size: 14px; font-weight: 800; color: var(--accent-deep); }
.fld-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.memo-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px; font: inherit; font-size: 13px; resize: none; margin-bottom: 8px; }

/* シート */
.sheet { position: fixed; inset: 0; background: rgba(20, 30, 36, 0.45); display: flex; align-items: flex-end; z-index: 50; }
.sheet-card { background: var(--paper); width: 100%; border-radius: 22px 22px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; animation: sheetup 0.25s ease; }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
