/* ===== カラーテーマ ===== */
:root{
  --bg:#0e1116;
  --card:#151a23;
  --text:#e7edf3;
  --muted:#9fb0c0;
  --line:#222a35;
  --accent:#237465;     /* メイン強調色（ボタン / Rental 共通） */
  --accent-2:#3fa7ff;   /* サブ強調色（リンクやアクセント用） */
  --danger:#b94b4b;
  --ok:#2bc46e;
}

/* ===== ベース ===== */
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:"Noto Sans JP",system-ui,-apple-system,Segoe UI,Roboto,
    "Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;
}

/* iOS セーフエリア対応 */
.lp-header,.lp-footer{
  padding-left:calc(env(safe-area-inset-left,0) + 0px);
  padding-right:calc(env(safe-area-inset-right,0) + 0px);
}

.container{
  max-width:860px;
  margin:0 auto;
  padding:16px 16px 24px;
}

/* ===== ヘッダー ===== */
.lp-header{
  position:sticky;
  top:0;
  z-index:10;
  background:rgba(21,26,35,.86);
  backdrop-filter:saturate(120%) blur(8px);
  border-bottom:1px solid var(--line);
}
.hdr-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  max-width:980px;
  margin:0 auto;
  padding:12px 16px;
}
.brand{
  color:#fff;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.2px;
}
.hdr-tools{
  display:flex;
  align-items:center;
  gap:10px;
}

/* 自動更新トグルスイッチ */
.switch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  color:var(--muted);
  font-size:13px;
}
.switch input{display:none}
.switch .slider{
  width:42px;
  height:24px;
  border-radius:20px;
  background:#2a3645;
  position:relative;
  border:1px solid #344558;
  display:inline-block;
  vertical-align:middle;
}
.switch .slider::after{
  content:"";
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  position:absolute;
  top:2px;
  left:2px;
  transition:transform .18s ease;
}
.switch input:checked + .slider{background:var(--accent)}
.switch input:checked + .slider::after{transform:translateX(18px)}
.switch-label{user-select:none}

/* ボタン共通 */
.btn{
  border:1px solid #2f4462;
  background:#223145;
  color:#fff;
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:600;
}
.btn:active{transform:translateY(1px)}
.btn-ghost{
  background:transparent;
  border-color:#2f4462;
}
.btn[disabled]{
  opacity:.5;
  cursor:default;
}

/* タイトル／サブテキスト */
.page-title{
  margin:14px 0 4px;
  font-size:20px;
}
.sub{
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
}

/* 更新時刻 & ネットワーク状態 */
.status-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}
.updated{
  color:var(--muted);
  font-size:12px;
}
.net{
  width:10px;
  height:10px;
  border-radius:50%;
}
.net.ok{background:var(--ok)}
.net.off{background:var(--danger)}

/* ===== フィルター（完了タスクの表示切替） ===== */
.filter-row{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-bottom:10px;
}
.chk{
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  font-size:13px;
  color:var(--muted);
}
.chk input{
  margin:0;
}
.chk-label{
  user-select:none;
}

/* ===== タスクリスト ===== */
.task-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}
.task{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:10px;
}
.title{
  display:flex;
  align-items:center;
  gap:10px;
  line-height:1.35;
}
.bullet{
  width:18px;
  height:18px;
  border:2px solid #7a8aa0;
  border-radius:50%;
  box-shadow:inset 0 0 0 3px var(--card);
}
.label{font-size:15px}
.badge{
  margin-left:6px;
  background:#0f2b26;
  color:#9ee1c7;
  border:1px solid #174c41;
  padding:2px 6px;
  border-radius:6px;
  font-size:11px;
  font-weight:700;
}

.meta{
  display:flex;
  align-items:center;
  gap:10px;
}
.count{
  color:var(--muted);
  font-size:12px;
}

/* 投票ボタン（未完タスクのみ） */
.vote{
  min-height:40px;
  min-width:84px;
  background:var(--accent);
  color:#fff;
  border:0;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
}
.vote:hover{filter:brightness(1.06)}
.vote:active{transform:translateY(1px)}
.vote.voted{
  background:#1b3a27;
  border:1px solid #255a3b;
  box-shadow:inset 0 0 0 1px #255a3b;
  color:#c9ffd8;
  cursor:default;
}

/* 完了タスクの見た目 */
.task.done .label{opacity:.85}
.task.done .badge{
  background:#132331;
  color:#9bd1ff;
  border-color:#2f4f74;
}

/* 完了タスク用セパレーター */
.task-separator{
  list-style:none;
  margin:8px 0 2px;
  padding-top:6px;
  border-top:1px dashed var(--line);
}
.separator-label{
  display:block;
  text-align:center;
  font-size:11px;
  color:var(--muted);
  letter-spacing:.08em;
}

/* 完了タスクの「完了」ラベル */
.done-label{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #243041;
  background:#111920;
  color:var(--muted);
  font-size:11px;
}

/* 完了タスク全体を少しトーンダウン */
.task.done{
  opacity:0.9;
}

/* ===== フッター ===== */
.lp-footer{
  border-top:1px solid var(--line);
  background:#0f141c;
}
.footer-inner{
  max-width:980px;
  margin:0 auto;
  padding:14px 16px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:center;
}
.footer-link{
  color:var(--text);
  text-decoration:none;
}
.footer-link:hover{color:var(--accent-2)}
.sep{opacity:.35}

/* ===== レスポンシブ ===== */
@media (min-width:720px){
  .page-title{font-size:22px}
  .task-list{gap:10px}
}
@media (min-width:960px){
  .container{padding:20px 20px 28px}
  .task{padding:14px}
  .label{font-size:16px}
}
