:root {
  color-scheme: light;
  /* 実際の値は themes.js が適用する（以下はフォールバック） */
  --bg: #fff5f7;
  --card: #ffffff;
  --text: #3a2a30;
  --muted: #8a7078;
  --accent: #d0506f;
  --accent-soft: #fde3ea;
  --border: #f3d3dc;
  --on-accent: #ffffff;
  --bg-art: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.app { max-width: 480px; margin: 0 auto; padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }
header { text-align: center; margin-bottom: 20px; position: relative; }
h1 { font-size: 20px; margin: 0; letter-spacing: .08em; color: var(--accent); }
.date { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
.label { margin: 0; font-size: 13px; color: var(--muted); }
.place {
  display: inline-block;
  margin: 14px 0 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.text { margin: 16px 0 8px; font-size: 24px; line-height: 1.5; font-weight: 700; }
.min { margin: 0; color: var(--muted); font-size: 14px; }
.card.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.96); opacity: .4; } 100% { transform: none; opacity: 1; } }
.card.cleared { border-color: var(--accent); }
.card.cleared .text { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .55; }
.done-msg { margin-top: 18px; color: var(--accent); font-weight: 700; }

.actions { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
button {
  font: inherit;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.primary { background: var(--accent); color: var(--on-accent); border: 0; }
.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }

.stats { display: flex; gap: 12px; }
.stats div {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.stats b { display: block; font-size: 28px; color: var(--accent); }
.stats span { font-size: 12px; color: var(--muted); }

.rank {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.rank-chara { width: 88px; height: 88px; flex: none; background: var(--accent-soft); border-radius: 50%; padding: 8px; }
.rank-chara svg { width: 100%; height: 100%; display: block; }
.rank-info { flex: 1; min-width: 0; }
.rank-info p { margin: 0; }
.rank-lv { font-size: 12px; color: var(--muted); }
.rank-name { font-size: 20px; font-weight: 800; color: var(--accent); margin: 2px 0 8px !important; }
.rank-bar { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.rank-next { font-size: 12px; color: var(--muted); margin-top: 6px !important; }

.view-sub { margin: 0; padding: 0 16px 8px; font-size: 13px; color: var(--muted); }
.chara-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chara-list li {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 8px; text-align: center;
}
.chara-list li.now { border: 2px solid var(--accent); }
.chara-list .ic { width: 80px; height: 80px; margin: 0 auto 6px; background: var(--accent-soft); border-radius: 50%; padding: 6px; }
.chara-list .ic svg { width: 100%; height: 100%; display: block; }
.chara-list li.locked .ic svg { filter: brightness(0) opacity(.35); }
.chara-list li.open { cursor: pointer; }
.chara-list .lv { font-size: 11px; color: var(--muted); }
.chara-list .nm { font-size: 15px; font-weight: 700; margin: 2px 0; }
.chara-list .nd { font-size: 12px; color: var(--muted); }
.chara-list li.now .nd { color: var(--accent); font-weight: 700; }

.change-note { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.change-note.warn { color: #d9534f; font-weight: 700; }

.celebrate {
  position: fixed; inset: 0; z-index: 10; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .35);
}
.celebrate[hidden] { display: none; }
.celebrate.show { animation: cele-bg 3s ease forwards; }
@keyframes cele-bg { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.confetti i { position: absolute; top: -20px; opacity: 0; animation: fall linear forwards; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), 105vh) rotate(720deg); opacity: 1; }
}
.cele-box {
  position: relative; text-align: center; padding: 24px 28px; max-width: 86%;
  background: var(--card); border-radius: 28px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  animation: cele-pop .7s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes cele-pop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cele-chara { width: 120px; height: 120px; margin: 0 auto; background: var(--accent-soft); border-radius: 50%; padding: 10px; animation: cele-jump .6s ease-in-out .5s 4; }
.cele-chara svg { width: 100%; height: 100%; display: block; }
@keyframes cele-jump { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-18px) scale(1.06, .96); } 70% { transform: translateY(0) scale(.96, 1.04); } }
.cele-text { margin: 14px 0 4px; font-size: 30px; font-weight: 800; color: var(--accent); }
.cele-sub { margin: 0; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .cele-box, .cele-chara { animation: none; }
}
.progress { margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.history-list { padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hday { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.hday h3 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.hday h3 span { font-size: 12px; color: var(--accent); font-weight: 700; }
.hday ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hday li { font-size: 14px; line-height: 1.5; }
.hp { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.hempty { text-align: center; color: var(--muted); padding: 24px 0; line-height: 1.8; }

.card.bonus, .card.bonus.cleared {
  border: 3px solid #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, .25), 0 6px 24px rgba(245, 166, 35, .35);
  background: linear-gradient(160deg, var(--card) 60%, rgba(245, 166, 35, .12));
}
.bonus-badge {
  margin: 0 0 10px; padding: 4px 12px; display: inline-block; border-radius: 99px;
  background: #f5a623; color: #3a2400; font-size: 13px; font-weight: 800;
  animation: bonus-shine 1.6s ease-in-out infinite;
}
.bonus-badge[hidden] { display: none; }
@keyframes bonus-shine { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.hb { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: #f5a623; color: #3a2400; font-size: 11px; font-weight: 800; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .bonus-badge { animation: none; } }

.view-sub { padding: 0 !important; margin: 0 0 12px !important; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav button {
  flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 8px; background: transparent; border: 0; border-radius: 0;
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.bottom-nav .ni { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .6; }
.bottom-nav button[aria-current="page"] { color: var(--accent); }
.bottom-nav button[aria-current="page"] .ni { filter: none; opacity: 1; }
.view[hidden] { display: none; }

/* 背景の花イラスト */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--bg-art); background-size: 280px 280px;
}
.theme-btn {
  position: absolute; top: 0; right: 0; padding: 8px 12px; font-size: 13px;
  background: var(--card); color: var(--accent); border: 1px solid var(--border); border-radius: 999px;
}
.dlg {
  width: min(448px, calc(100% - 24px)); max-height: 86vh; padding: 0;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 20px;
}
.dlg::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.dlg-head h2 { margin: 0; font-size: 18px; color: var(--accent); }
.dlg-close { width: 40px; height: 40px; padding: 0; background: transparent; color: var(--muted); border: 0; font-size: 18px; }
.theme-list { list-style: none; margin: 0; padding: 0 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.theme-opt {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 10px 14px; border-radius: 16px; background: var(--card); color: var(--text);
  border: 2px solid var(--border); font-size: 17px;
}
.theme-opt[aria-checked="true"] { border-color: var(--accent); }
.theme-opt .tf { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.theme-opt .tn { flex: 1; font-weight: 700; }
.theme-opt .tc { color: var(--accent); font-weight: 800; }
.theme-opt .dots { display: flex; gap: 4px; }
.theme-opt .dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.bloom-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }


.tip-dlg { width: min(360px, calc(100% - 40px)); }
.tip-body { padding: 20px 20px 22px; text-align: center; }
.tip-body h2 { margin: 0 0 12px; font-size: 14px; color: var(--muted); letter-spacing: .1em; }
.tip-chara { width: 104px; height: 104px; margin: 0 auto 4px; background: var(--accent-soft); border-radius: 50%; padding: 8px; animation: tip-float 2.4s ease-in-out infinite; }
.tip-chara svg { width: 100%; height: 100%; display: block; }
@keyframes tip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.tip-name { margin: 0 0 14px; font-size: 13px; font-weight: 800; color: var(--accent); }
/* 吹き出し（しっぽは神様の方＝上向き） */
.tip-bubble {
  position: relative; margin-bottom: 20px; padding: 16px 16px;
  background: var(--card); border: 2px solid var(--accent); border-radius: 18px;
}
.tip-bubble::before, .tip-bubble::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: solid transparent;
}
.tip-bubble::before { top: -14px; border-width: 0 10px 14px; border-bottom-color: var(--accent); }
.tip-bubble::after { top: -10px; border-width: 0 8px 12px; border-bottom-color: var(--card); }
.tip-text { margin: 0; font-size: 17px; line-height: 1.75; font-weight: 700; text-align: left; }
.tip-body button { width: 100%; }
@media (prefers-reduced-motion: reduce) { .tip-chara { animation: none; } }

/* テーマ切り替え：つぼみから花が咲く演出（背景を暗くして1輪に注目させる） */
.bloomfx {
  position: fixed; inset: 0; z-index: 11; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8, 8, 14, .66);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.bloomfx[hidden] { display: none; }
.bloomfx.show { animation: bf-bg 3s ease forwards; }
@keyframes bf-bg { 0% { opacity: 0; } 10% { opacity: 1; } 87% { opacity: 1; } 100% { opacity: 0; } }

.bf-stage { position: relative; width: 240px; height: 240px; }
.bf-stage > * { position: absolute; inset: 10px; }
.bf-stage svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* 後ろからふわっと差す光 */
.bf-glow {
  inset: -30px !important; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 65%);
  opacity: 0; animation: bf-glow 1.5s ease-out 1.2s forwards;
}
@keyframes bf-glow { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; } 100% { opacity: .6; transform: scale(1.1); } }

/* ① つぼみ：伸びて、ふくらんで、ひらく直前にふるえる */
.bf-bud { animation: bf-bud-grow .8s cubic-bezier(.2, 1.3, .4, 1) .2s both, bf-bud-swell .45s ease-in-out 1s 1, bf-bud-out .3s ease-in 1.45s forwards; transform-origin: 50% 70%; }
@keyframes bf-bud-grow { 0% { transform: translateY(24px) scale(.1); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bf-bud-swell { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.1, 1.06) rotate(-2deg); } 65% { transform: scale(1.14, 1.08) rotate(2deg); } }
@keyframes bf-bud-out { to { transform: scale(1.3); opacity: 0; } }

/* ② 花：1枚ずつ花びらが開いていく */
.bf-flower { opacity: 0; animation: bf-show .01s linear 1.4s forwards, bf-sway 1.1s ease-in-out 2.1s both; }
@keyframes bf-show { to { opacity: 1; } }
@keyframes bf-sway { 0%, 100% { transform: none; } 40% { transform: rotate(3deg) scale(1.03); } 75% { transform: rotate(-2deg) scale(1.01); } }
.bf-flower .pet {
  transform: scale(0);
  animation: bf-petal .8s cubic-bezier(.2, 1.5, .4, 1) both;
  animation-delay: calc(1.4s + var(--i, 0) * 60ms);
}
@keyframes bf-petal { 0% { transform: scale(0) rotate(-25deg); } 100% { transform: scale(1) rotate(0); } }

.bf-name {
  margin: 22px 0 0; font-size: 28px; font-weight: 800; letter-spacing: .15em; color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
  animation: bf-name .7s ease 2.1s both;
}
@keyframes bf-name { 0% { transform: translateY(10px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bloomfx.show { animation: none; } }

/* 掃除の悪魔ミッション */
.card.demon, .card.demon.cleared {
  border: 3px solid #e0323a;
  box-shadow: 0 0 0 3px rgba(224, 50, 58, .3), 0 6px 28px rgba(224, 50, 58, .5);
  background: linear-gradient(160deg, var(--card) 55%, rgba(224, 50, 58, .18));
}
.demon-box { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 12px; border-radius: 16px; background: rgba(224, 50, 58, .14); text-align: left; }
.demon-box[hidden] { display: none; }
.demon-ic { width: 64px; height: 64px; flex: none; animation: demon-shake 1.8s ease-in-out infinite; }
.demon-ic svg { width: 100%; height: 100%; display: block; }
@keyframes demon-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) translateY(-2px); } 75% { transform: rotate(4deg) translateY(-2px); } }
.demon-say { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.demon-say b { font-size: 14px; color: #ff6b6b; }
.demon-say span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.hd { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: #e0323a; color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .demon-ic { animation: none; } }

/* 悪魔が現れている間：テーマ全体が暗い赤になる */
body, .card, .rank, .stats div, .bottom-nav, .theme-btn, .hday, .chara-list li { transition: background-color .7s, color .7s, border-color .7s; }
html[data-demon] body::after {
  content: ""; position: fixed; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 110px 20px rgba(224, 50, 58, .5);
  animation: demon-pulse 2.4s ease-in-out infinite;
}
@keyframes demon-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
/* 登場の瞬間：赤くフラッシュして画面がゆれる */
body.demon-in .app { animation: demon-quake .7s ease; }
body.demon-in::before { animation: demon-flash 1s ease-out; }
@keyframes demon-quake { 0%, 100% { transform: none; } 15% { transform: translate(-6px, 3px); } 30% { transform: translate(6px, -3px); } 45% { transform: translate(-5px, -2px); } 60% { transform: translate(4px, 3px); } 80% { transform: translate(-2px, 1px); } }
@keyframes demon-flash { 0% { filter: none; } 15% { filter: brightness(2.2) saturate(2) hue-rotate(-20deg); } 100% { filter: none; } }
@media (prefers-reduced-motion: reduce) { html[data-demon] body::after, body.demon-in .app, body.demon-in::before { animation: none; } }

/* ローカル専用の検証ボタン */
.dev-btn {
  position: absolute; top: 0; left: 0; padding: 8px 10px; font-size: 12px;
  background: var(--card); color: var(--accent); border: 1px dashed var(--accent); border-radius: 999px;
}

/* 更新・インストールのお知らせバナー */
.banners {
  position: fixed; left: 0; right: 0; z-index: 6; pointer-events: none;
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 12px;
}
.banner {
  pointer-events: auto; width: 100%; max-width: 456px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center;
  padding: 12px 14px; background: var(--card); color: var(--text);
  border: 2px solid var(--accent); border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: banner-in .4s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes banner-in { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.banner-ic { font-size: 26px; }
.banner-text { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.6; }
.banner-btns { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.banner-btns button { padding: 9px 16px; font-size: 14px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .banner { animation: none; } }

/* ミッション候補一覧 */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
}
.chip[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mission-list { display: flex; flex-direction: column; gap: 10px; }
.mgroup { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.mgroup h3 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--accent); }
.mgroup h3 span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mgroup ul { margin: 0; padding: 0; list-style: none; }
.mgroup li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.5; }
.mgroup li:first-child { border-top: 0; }
.mt { flex: 1; min-width: 0; }
.mm { flex: none; font-size: 11px; color: var(--muted); }
.md { flex: none; padding: 0 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; white-space: nowrap; }

/* クリア済みは濃く、未クリアは薄く */
.mgroup li.cleared { opacity: 1; font-weight: 700; }
.mgroup li.todo { opacity: .4; }

/* 掃除のお化け（隠しキャラ） */
.rank.ghost { border-style: dashed; }
.rank.ghost .rank-chara { animation: ghost-float 2.6s ease-in-out infinite; }
@keyframes ghost-float { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .75; } }
.dev-btn2 { top: 38px; }
.ghost-box { background: #24223a; color: #ece9ff; }
.ghost-box .cele-text { color: #cfc8ff; }
.ghost-box .cele-sub { color: #b4aed6; line-height: 1.7; }
.ghost-chara { background: #36335a; animation: ghost-float 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .rank.ghost .rank-chara, .ghost-chara { animation: none; } }

/* お化けテーマ（灰色の薄暗い雰囲気） */
html[data-ghost] body::after {
  content: ""; position: fixed; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(10, 10, 20, .5);
  animation: ghost-breathe 4s ease-in-out infinite;
}
@keyframes ghost-breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* ほこりのこ → お化け の変身演出 */
.ghostfx {
  position: fixed; inset: 0; z-index: 11; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(14, 14, 22, .72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.ghostfx[hidden] { display: none; }
.ghostfx.show { animation: gx-bg 4.4s ease forwards; }
@keyframes gx-bg { 0% { opacity: 0; } 9% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
.gx-stage { position: relative; width: 220px; height: 220px; }
.gx-stage > * { position: absolute; inset: 0; }
.gx-stage svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gx-dust { animation: gx-dust 2.6s ease-in .3s both; }
@keyframes gx-dust {
  0% { transform: none; opacity: 1; filter: none; }
  8% { transform: translateX(-5px) rotate(-3deg); }
  16% { transform: translateX(5px) rotate(3deg); }
  24% { transform: translateX(-5px) rotate(-3deg); }
  32% { transform: translateX(5px) rotate(3deg); }
  44% { transform: scale(1.05); opacity: 1; filter: none; }
  100% { transform: translateY(-34px) scale(1.2, 1.6); opacity: 0; filter: blur(5px) brightness(1.6); }
}
.gx-ghost { opacity: 0; animation: gx-ghost-in 1.8s ease 1.5s both, gx-float 2.4s ease-in-out 3.3s infinite; }
@keyframes gx-ghost-in { 0% { opacity: 0; transform: translateY(34px) scale(.7, .45); filter: blur(7px) brightness(1.5); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes gx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.gx-bits span {
  position: absolute; border-radius: 50%; background: #cfd1da; opacity: 0;
  animation: gx-bit 1.8s ease-out both;
}
@keyframes gx-bit { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 25% { opacity: .9; } 100% { transform: translate(var(--dx), -90px) scale(.3); opacity: 0; } }
.gx-text { margin: 20px 0 0; font-size: 20px; font-weight: 800; letter-spacing: .12em; color: #dcdcf0; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); text-align: center; }
.gx-t1 { position: absolute; bottom: 24%; animation: gx-t1 2.2s ease .3s both; }
@keyframes gx-t1 { 0% { opacity: 0; transform: translateY(8px); } 25%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.gx-t2 { position: absolute; bottom: 24%; animation: gx-t2 .9s ease 2.5s both; }
@keyframes gx-t2 { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html[data-ghost] body::after, .gx-dust, .gx-ghost { animation: none; } }
.gx-sub { position: absolute; bottom: 17%; margin: 0; font-size: 13px; color: #b4aed6; text-align: center; animation: gx-t2 .9s ease 3.2s both; }

/* 設定画面 */
.set-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-row.sub { padding: 12px 0; border-top: 1px solid var(--border); font-size: 15px; font-weight: 700; }
.set-main { display: flex; flex-direction: column; gap: 2px; }
.set-main b { font-size: 16px; }
.set-main small { font-size: 12px; color: var(--muted); }
.set-lead { margin: 10px 0 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.set-times { margin-bottom: 12px; }
.set-test { width: 100%; padding: 12px; font-size: 14px; }
.set-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--accent); font-weight: 700; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: .45; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: #c42f3b; color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; }

/* クリスマステーマに切り替える演出：サンタの顔がドーンと登場 */
.santafx {
  position: fixed; inset: 0; z-index: 11; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8, 24, 14, .74);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.santafx[hidden] { display: none; }
.santafx.show { animation: sx-bg 3.2s ease forwards; }
@keyframes sx-bg { 0% { opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.sx-stage { position: relative; width: 250px; height: 258px; animation: sx-shake .5s ease .3s both; }
@keyframes sx-shake { 0%, 100% { transform: none; } 15% { transform: translate(-9px, 5px); } 30% { transform: translate(8px, -6px); } 45% { transform: translate(-6px, -3px); } 60% { transform: translate(5px, 4px); } 80% { transform: translate(-2px, 2px); } }
.sx-face { position: absolute; inset: 0; animation: sx-boom .75s cubic-bezier(.2, 2.3, .4, 1) .25s both, sx-breath 1.3s ease-in-out 1.1s infinite; }
.sx-face svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); }
@keyframes sx-boom { 0% { transform: scale(0) rotate(-14deg); opacity: 0; } 55% { transform: scale(1.4) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sx-breath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04) rotate(-1deg); } }
/* ドーンの衝撃波 */
.sx-ring { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .9); opacity: 0; animation: sx-ring .8s ease-out .45s both; }
.sx-ring2 { border-color: #ff6b6b; animation-delay: .6s; }
@keyframes sx-ring { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(4); opacity: 0; } }
.sx-text { margin: 18px 0 0; font-size: 30px; font-weight: 800; letter-spacing: .08em; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, .55); animation: sx-text .6s cubic-bezier(.2, 1.6, .4, 1) .9s both; }
.sx-sub { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: #ffd6d6; animation: sx-text .6s ease 1.3s both; }
@keyframes sx-text { 0% { transform: translateY(14px) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sx-snow { position: absolute; inset: 0; pointer-events: none; }
.sx-snow i { position: absolute; top: -20px; border-radius: 50%; background: #fff; opacity: 0; animation: sx-fall linear forwards; }
@keyframes sx-fall { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .9; } 100% { transform: translate(var(--dx), 105vh); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .sx-stage, .sx-face, .sx-ring, .sx-text, .sx-sub { animation: none; } }

/* ハロウィンの切り替え演出（ジャックオーランタン） */
.santafx[data-fx="halloween"] { background: rgba(18, 6, 30, .8); }
.santafx[data-fx="halloween"] .sx-face svg { filter: drop-shadow(0 0 18px rgba(255, 138, 31, .75)) drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); animation: jx-glow 1s ease-in-out 1s infinite; }
@keyframes jx-glow { 0%, 100% { filter: drop-shadow(0 0 14px rgba(255, 138, 31, .6)) drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); } 50% { filter: drop-shadow(0 0 30px rgba(255, 170, 60, 1)) drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); } }
.santafx[data-fx="halloween"] .sx-ring { border-color: rgba(255, 170, 60, .95); }
.santafx[data-fx="halloween"] .sx-ring2 { border-color: #a855f7; }
.santafx[data-fx="halloween"] .sx-text { color: #ffb347; font-size: 26px; text-shadow: 0 0 16px rgba(255, 138, 31, .7), 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="halloween"] .sx-sub { color: #e0c8ff; }
.sx-snow.up i { top: auto; bottom: -20px; animation-name: sx-rise; }
@keyframes sx-rise { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .95; } 100% { transform: translate(var(--dx), -105vh); opacity: 0; } }
.sx-bat { position: absolute; left: -90px; width: 64px; opacity: 0; animation: sx-fly 1.7s ease-in-out forwards; }
.sx-bat svg { display: block; width: 100%; height: auto; }
@keyframes sx-fly { 0% { transform: translate(0, 0) scale(.8); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(60vw, -24px) scale(1.05) rotate(-6deg); } 100% { transform: translate(125vw, 10px) scale(.9) rotate(4deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .santafx[data-fx="halloween"] .sx-face svg, .sx-bat { animation: none; } }

/* 季節テーマの切り替え演出：テーマごとの色 */
.santafx[data-fx="shogatsu"] { background: rgba(58,8,12,.84); }
.santafx[data-fx="shogatsu"] .sx-ring { border-color: #ffd76a; }
.santafx[data-fx="shogatsu"] .sx-ring2 { border-color: #ff5a5a; }
.santafx[data-fx="shogatsu"] .sx-text { color: #ffd76a; text-shadow: 0 0 16px #ffd76a66, 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="shogatsu"] .sx-sub { color: #ffe9c4; }
.santafx[data-fx="setsubun"] { background: rgba(34,10,8,.84); }
.santafx[data-fx="setsubun"] .sx-ring { border-color: #ff7a59; }
.santafx[data-fx="setsubun"] .sx-ring2 { border-color: #ffd23f; }
.santafx[data-fx="setsubun"] .sx-text { color: #ffb199; text-shadow: 0 0 16px #ffb19966, 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="setsubun"] .sx-sub { color: #ffe1d6; }
.santafx[data-fx="natsumatsuri"] { background: rgba(8,12,44,.86); }
.santafx[data-fx="natsumatsuri"] .sx-ring { border-color: #ff5fa2; }
.santafx[data-fx="natsumatsuri"] .sx-ring2 { border-color: #4de1ff; }
.santafx[data-fx="natsumatsuri"] .sx-text { color: #ffd9a0; text-shadow: 0 0 16px #ffd9a066, 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="natsumatsuri"] .sx-sub { color: #c8d2ff; }
.santafx[data-fx="momiji"] { background: rgba(52,20,8,.84); }
.santafx[data-fx="momiji"] .sx-ring { border-color: #ff8a3d; }
.santafx[data-fx="momiji"] .sx-ring2 { border-color: #d9391e; }
.santafx[data-fx="momiji"] .sx-text { color: #ffc38a; text-shadow: 0 0 16px #ffc38a66, 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="momiji"] .sx-sub { color: #ffe2c2; }
.santafx[data-fx="osoji"] { background: rgba(6,40,48,.84); }
.santafx[data-fx="osoji"] .sx-ring { border-color: #4de1ff; }
.santafx[data-fx="osoji"] .sx-ring2 { border-color: #ffffff; }
.santafx[data-fx="osoji"] .sx-text { color: #bff3f7; text-shadow: 0 0 16px #bff3f766, 0 3px 10px rgba(0, 0, 0, .6); }
.santafx[data-fx="osoji"] .sx-sub { color: #dff9fb; }
.santafx[data-fx="natsumatsuri"] .sx-face svg { animation: sx-spark 1.2s ease-in-out 1s infinite; }
@keyframes sx-spark { 0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 95, 162, .7)); } 50% { filter: drop-shadow(0 0 26px rgba(77, 225, 255, .95)); } }
.santafx[data-fx="shogatsu"] .sx-face svg { filter: drop-shadow(0 0 22px rgba(255, 215, 106, .7)); }
.santafx[data-fx="momiji"] .sx-snow i { animation-name: sx-fall-spin; }
@keyframes sx-fall-spin { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 12% { opacity: .95; } 100% { transform: translate(var(--dx), 105vh) rotate(540deg); opacity: .95; } }
.santafx[data-fx="setsubun"] .sx-snow i { animation-name: sx-fall-spin; }
@media (prefers-reduced-motion: reduce) { .santafx[data-fx="natsumatsuri"] .sx-face svg { animation: none; } }

.rank { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rank-more { font-size: 12px; color: var(--accent); font-weight: 700; text-align: right; margin-top: 4px !important; }

dialog#dex {
  width: min(480px, 100%);
  max-height: 88vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
}
dialog#dex::backdrop { background: rgba(0, 0, 0, .45); }
.dex-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.dex-head h2 { flex: 1; margin: 0 0 0 36px; font-size: 17px; text-align: center; color: var(--accent); }
.dex-close {
  width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1;
  background: var(--card); color: var(--accent); border: 1px solid var(--border); border-radius: 50%;
}
#dexBody { padding: 14px; overflow-y: auto; }
.dex-count { margin: 0 0 10px; text-align: center; color: var(--muted); font-size: 13px; }
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dex-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px; font: inherit; font-size: 10px; font-weight: 600;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
}
.dex-cell svg { width: 100%; max-width: 56px; display: block; }
.dex-cell span { line-height: 1.2; text-align: center; }
.dex-cell.locked { color: var(--muted); }
.secret svg { filter: brightness(0) opacity(.35); }
.dex-big { width: 160px; margin: 8px auto 0; }
.dex-big svg { width: 100%; display: block; }
.dex-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
#dexBody h3 { margin: 20px 0 10px; font-size: 15px; }
#dexBody h3 small { color: var(--muted); font-weight: 400; }
.dex-hint { color: var(--muted); font-size: 12px; text-align: center; margin: 14px 0 0; }

.dex-prof { margin: 16px 0 0; display: grid; gap: 8px; }
.dex-prof div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.dex-prof dt { font-size: 11px; color: var(--accent); font-weight: 700; }
.dex-prof dd { margin: 2px 0 0; font-size: 14px; line-height: 1.5; }

/* ロゴ（文字だけのポップなロゴ） */
@font-face { font-family: "Mochiy Pop One"; src: url("fonts/mochiy-pop-logo.woff2") format("woff2"); font-display: block; }
.logo { margin: 0; line-height: 0; }
.logo svg { height: 50px; width: auto; display: inline-block; overflow: visible; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12)); }

/* 「お家にあわせる」設定（ウィザード） */
body.wiz-open { overflow: hidden; }
.wizard { position: fixed; inset: 0; z-index: 12; background: var(--bg); display: flex; flex-direction: column; }
.wizard[hidden] { display: none; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 14px 8px; }
.wiz-icon { width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 1; border-radius: 50%; background: var(--card); color: var(--accent); border: 1px solid var(--border); }
.wiz-dots { display: flex; gap: 6px; align-items: center; }
.wiz-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width .3s, background .3s; }
.wiz-dots i.past { background: var(--accent); opacity: .45; }
.wiz-dots i.cur { background: var(--accent); width: 22px; }
.wiz-viewport { flex: 1; min-height: 0; overflow: hidden; }
.wiz-track { display: flex; height: 100%; transition: transform .42s cubic-bezier(.3, .9, .3, 1); }
.wiz-page { flex: 0 0 100%; height: 100%; overflow-y: auto; padding: 4px max(16px, calc((100% - 448px) / 2)) 24px; }
.wiz-hero { background: var(--accent-soft); border-radius: 24px; padding: 8px 8px 2px; margin-bottom: 14px; }
.wiz-hero svg { width: 100%; height: auto; display: block; }
.wh-bob { animation: wh-bob 2.6s ease-in-out infinite; }
@keyframes wh-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.wiz-hero.done { padding: 14px; }
.wiz-god-big { width: 130px; height: 130px; margin: 0 auto; animation: wh-bob 2.2s ease-in-out infinite; }
.wiz-god-big svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wiz-say { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.wiz-god { width: 60px; height: 60px; flex: none; background: var(--accent-soft); border-radius: 50%; padding: 5px; }
.wiz-god svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wiz-bubble { position: relative; flex: 1; min-width: 0; background: var(--card); border: 2px solid var(--accent); border-radius: 16px; padding: 10px 12px; }
.wiz-bubble::before { content: ""; position: absolute; left: -9px; top: 18px; border: solid transparent; border-width: 7px 9px 7px 0; border-right-color: var(--accent); }
.wiz-bubble::after { content: ""; position: absolute; left: -5px; top: 20px; border: solid transparent; border-width: 5px 7px 5px 0; border-right-color: var(--card); }
.wiz-bubble b { display: block; color: var(--accent); font-size: 15px; }
.wiz-bubble p { margin: 4px 0 0; font-size: 14px; line-height: 1.75; }
.wiz-bubble strong { color: var(--accent); font-size: 18px; }
.wiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wiz-options.sleep { grid-template-columns: repeat(3, 1fr); }
.wiz-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 10px; border-radius: 16px; background: var(--card); color: var(--text);
  border: 2px solid var(--border); font-size: 14px; font-weight: 700; line-height: 1.3;
  transition: border-color .2s, opacity .2s, transform .15s;
}
.wc-ic { width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; transition: filter .2s; }
.wc-ic svg { display: block; }
.wc-name { text-align: center; }
.wc-sub { font-size: 11px; font-weight: 600; color: var(--muted); }
.wc-state { margin-top: 2px; padding: 1px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.wiz-card.on { border-color: var(--accent); }
.wiz-card.on .wc-state { background: var(--accent); color: var(--on-accent); }
.wiz-card.off { opacity: .55; }
.wiz-card.off .wc-ic { filter: grayscale(1); }
.wiz-card.off .wc-name { text-decoration: line-through; }
.wiz-card.off .wc-state { background: var(--border); color: var(--muted); }
.wiz-card.avoid.on { border-color: #f5a623; opacity: 1; }
.wiz-card.avoid.on .wc-state { background: #f5a623; color: #3a2400; }
.wiz-card.avoid.off { opacity: 1; }
.wiz-card.avoid.off .wc-ic { filter: none; }
.wiz-card.avoid.off .wc-name { text-decoration: none; }
.wiz-card.avoid.off .wc-state { background: var(--accent-soft); color: var(--accent); }
.wiz-card.sleep .wc-state { display: none; }
.wiz-card.sleep.on { background: var(--accent-soft); }
.wiz-card.sleep.off { opacity: .7; }
.wiz-card.sleep.off .wc-name { text-decoration: none; }
.wiz-card.sleep.off .wc-ic { filter: none; }
.wiz-card:active { transform: scale(.97); }
.wiz-reasons { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wiz-reasons li { display: flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); font-size: 13px; }
.wiz-reasons b { color: var(--accent); }
.wiz-note { margin: 0; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.7; }
.wiz-foot { width: 100%; max-width: 480px; margin: 0 auto; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wiz-foot .primary { width: 100%; }
.wiz-skip { background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px; }
.wiz-skip[hidden] { display: none; }
.set-mini { padding: 8px 16px; font-size: 14px; border-radius: 12px; }
.mgroup li.skipped { opacity: .3; text-decoration: line-through; }
.mx { flex: none; padding: 0 7px; border-radius: 99px; background: var(--border); color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .wh-bob, .wiz-god-big { animation: none; } .wiz-track { transition: none; } }

/* データの引き継ぎ */
.set-btns { display: flex; gap: 10px; margin-top: 4px; }
.set-btns .set-mini { flex: 1; }
.tr-undo { display: block; width: 100%; margin-top: 10px; padding: 8px; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline; }
.tr-undo[hidden] { display: none; }
.tr-dlg { width: min(448px, calc(100% - 24px)); }
.tr-body { padding: 0 16px 18px; overflow-y: auto; max-height: 72vh; }
.tr-lead { margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.tr-h { margin: 14px 0 6px; font-size: 13px; color: var(--accent); }
.tr-sum { margin: 0 0 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.tr-sum div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.tr-sum dt { color: var(--muted); }
.tr-sum dd { margin: 0; font-weight: 700; text-align: right; }
.tr-code { width: 100%; margin: 4px 0 10px; padding: 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--card); color: var(--text); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; resize: vertical; }
.tr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-btns button { flex: 1; min-width: 120px; padding: 12px; font-size: 15px; }
.tr-note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.tr-msg { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }
.tr-err { color: #d9534f; }

/* 引き継ぎの手順・お知らせ */
.tr-info { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.tr-info.warn { color: #d9534f; font-weight: 700; }
.tr-move { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; padding: 12px; border-radius: 14px; background: var(--accent-soft); border: 2px solid var(--accent); }
.tr-move[hidden] { display: none; }
.tr-move b { color: var(--accent); }
.tr-move span { font-size: 13px; line-height: 1.6; }
.tr-move .primary { padding: 10px; font-size: 14px; }
.tr-sec { margin: 0 0 10px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 12px; }
.tr-sec summary { padding: 10px 0; font-size: 14px; font-weight: 800; color: var(--accent); cursor: pointer; }
.tr-steps { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tr-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.65; }
.trs-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; border-radius: 50%; background: var(--accent-soft); }
.tr-steps small { color: var(--muted); }
.tr-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff4d6; color: #5a3d00; border: 1px solid #f5a623; font-size: 13px; line-height: 1.7; }
.tr-god { width: 96px; height: 96px; margin: 0 auto; background: var(--accent-soft); border-radius: 50%; padding: 8px; }
.tr-god svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tr-name { margin: 4px 0 10px; text-align: center; font-size: 13px; font-weight: 800; color: var(--accent); }
.tr-bubble { position: relative; margin: 0 0 14px; padding: 12px 14px; background: var(--card); border: 2px solid var(--accent); border-radius: 16px; }
.tr-bubble p { margin: 0; font-size: 14px; line-height: 1.8; }

/* このアプリについて（規約などへのリンク） */
.about-card { margin-top: 10px; }
.about-title { display: block; margin-bottom: 6px; font-size: 15px; }
.about-links { list-style: none; margin: 0; padding: 0; }
.about-links li { border-top: 1px solid var(--border); }
.about-links li:first-child { border-top: 0; }
.about-links a { display: block; padding: 11px 2px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.about-links a::after { content: "›"; float: right; color: var(--muted); }

/* アカウント（Googleログイン） */
.ac-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 11px 16px; border-radius: 999px; background: #fff; color: #1f1f1f; border: 1px solid #747775;
  font-family: Roboto, -apple-system, "Hiragino Sans", sans-serif; font-size: 15px; font-weight: 600;
}
.ac-google svg { flex: none; }
.ac-small { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.ac-wide { width: 100%; }
.ac-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ac-choices button { width: 100%; padding: 12px; font-size: 15px; }
.ac-choices small { display: block; font-size: 12px; font-weight: 600; opacity: .85; }
.ac-small a { color: var(--accent); }
