/* ポイ活台帳 PWA — モバイル前提の1カラム。アクセントは1色（#2fe8a4）、角丸と余白は単一リズム */
:root {
  --bg: #0a0e0d;
  --surface: #131a17;
  --surface2: #1a2320;
  --text: #e9f2ed;
  --muted: #9db3aa;
  --border: #26332e;
  --accent: #2fe8a4;
  --accent-text: #06231a;
  --danger: #ff7a7a;
  --warn: #ffc46b;
  --radius: 14px;
  --gap: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
.app-header {
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px;
  max-width: 620px; margin: 0 auto;
}
.app-title { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.app-sub { color: var(--muted); font-size: 13px; }
main { max-width: 620px; margin: 0 auto; padding: 6px 14px 20px; }
h2 { font-size: 16px; margin: 0 0 8px; }
p { margin: 6px 0; }
.note { color: var(--muted); font-size: 12.5px; }
.lead { color: var(--muted); font-size: 14px; margin: 8px 2px 12px; }
ul.plain { padding-left: 20px; margin: 8px 0; }
ul.plain li { margin: 4px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 var(--gap);
}
.card.notice p { font-size: 14px; }
.big-num { font-size: 30px; font-weight: 700; margin: 2px 0 8px; }
.big-num small { font-size: 14px; color: var(--muted); font-weight: 400; }
.progress { background: var(--surface2); border-radius: 999px; height: 10px; overflow: hidden; }
.progress-bar { background: var(--accent); height: 100%; width: 0%; transition: width .3s; }

.alert { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 var(--gap); border: 1px solid var(--border); font-size: 14px; }
.alert.danger { border-color: var(--danger); color: #ffd9d9; background: #2a1416; }
.alert.warn { border-color: var(--warn); color: #ffe9c4; background: #2a2110; }
.alert.info { color: var(--muted); background: var(--surface); }
.alert .alert-site { font-weight: 700; }

.site-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.site-row:first-of-type { border-top: none; }
.site-name { font-weight: 600; }
.site-meta { color: var(--muted); font-size: 12.5px; }
.pill {
  display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); vertical-align: middle;
}
.pill.accent { color: var(--accent-text); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.pill.danger { color: #2a0d0d; background: var(--danger); border-color: var(--danger); font-weight: 700; }

button, .btn-primary, .btn-ghost, .btn-quiet, .file-label {
  font: inherit; cursor: pointer; border-radius: 10px; min-height: 44px;
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700;
  border: 1px solid var(--accent); padding: 10px 18px; text-decoration: none; width: 100%;
}
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: 10px 16px; text-decoration: none;
}
.btn-quiet {
  background: transparent; color: var(--accent); border: none; padding: 6px 4px; min-height: 36px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn-ghost { flex: 1 1 150px; }
.file-label { width: 100%; margin-top: 10px; }
.btn-small { min-height: 36px; padding: 6px 12px; width: auto; }

.ref-box {
  border: 1px dashed var(--accent); border-radius: var(--radius);
  padding: 12px; margin: 10px 0; display: grid; gap: 8px;
}
.ad-label {
  justify-self: start; font-size: 11.5px; font-weight: 700; color: var(--accent-text);
  background: var(--accent); border-radius: 6px; padding: 2px 8px;
}
.ref-note { font-size: 12.5px; color: var(--muted); margin: 0; }
.steps { margin: 8px 0; padding-left: 22px; }
.steps li { margin: 3px 0; font-size: 14px; }
.cautions { margin: 8px 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.day-head { font-size: 13px; color: var(--muted); margin: 18px 2px 8px; font-weight: 700; }

form label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
form input, form select {
  width: 100%; margin-top: 4px; padding: 11px 12px; min-height: 44px;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px;
}
form .btn-primary { margin-top: 16px; }

.entry {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.entry:first-of-type { border-top: none; }
.entry .amt { font-weight: 700; white-space: nowrap; }
.entry .del { color: var(--danger); }
.month-head { font-size: 13px; color: var(--muted); font-weight: 700; margin: 4px 2px 6px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kv:first-of-type { border-top: none; }
.kv .k { color: var(--muted); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: rgba(13, 18, 16, .97); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; background: none; border: none; color: var(--muted);
  padding: 8px 0 10px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 56px; border-radius: 0;
}
.tab .tab-ico { font-size: 19px; line-height: 1; }
.tab.active { color: var(--accent); }

.tutorial {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  overflow-y: auto; padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
}
.tutorial-inner { max-width: 560px; margin: 0 auto; }
.tutorial h2 { font-size: 20px; }
.tutorial .btn-primary { margin-top: 18px; }
.diagram { display: grid; gap: 10px; margin: 14px 0; }
.diagram .dstep {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px;
}
.diagram .dnum {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.diagram .dicon { flex: 0 0 34px; text-align: center; }
.diagram p { margin: 0; font-size: 14px; }
.diagram .dsub { color: var(--muted); font-size: 12.5px; }
.mock-share { width: 30px; height: 30px; }
[hidden] { display: none !important; }
