/* =========================================================
   CHART — トレーニングカルテ
   紙のカルテと朱色の印をモチーフにした、道具としてのUI
   ========================================================= */

:root {
  color-scheme: light;
  --bg: #f1eee6;
  --surface: #fbfaf6;
  --surface-2: #f6f3eb;
  --surface-3: #ece8dc;
  --ink: #1a1916;
  --ink-2: #4f4c44;
  --muted: #858174;
  --line: #e3ded1;
  --line-strong: #cbc4b1;
  --accent: #d9472b;          /* 朱色：パーソナル・主要操作 */
  --accent-ink: #b5361d;
  --accent-soft: #fbe5de;
  --teal: #1f6f6b;            /* ピラティス */
  --teal-soft: #dcefec;
  --good: #1e7a34;
  --good-soft: #e1f2e3;
  --warning: #9a6408;
  --warning-soft: #fbefd5;
  --serious: #b9461b;
  --serious-soft: #fbe3d6;
  --critical: #c0302f;
  --sat: #2f62b0;             /* カレンダーの土曜 */
  --pfc-p: #d9472b; --pfc-f: #2f74c0; --pfc-c: #b8860b;  /* たんぱく質・脂質・炭水化物（色覚の違いでも見分けられる組み合わせ） */
  --phase-up: #2a5bd7;        /* 増量期 */
  --shadow: 0 1px 0 rgba(26, 25, 22, .04), 0 6px 20px -12px rgba(26, 25, 22, .25);
  --shadow-lg: 0 24px 60px -24px rgba(26, 25, 22, .45);
  --radius: 14px;
  --radius-sm: 9px;
  --ring: 0 0 0 3px rgba(217, 71, 43, .25);
  --font: "IBM Plex Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Hiragino Sans", "Hiragino Kaku Gothic ProN", ui-monospace, "SFMono-Regular", Menlo, "Noto Sans JP", monospace; /* iPhone は ui-monospace に日本語が無く「?」の箱になるので、日本語の字体を ui-monospace より前に（数字・英字は IBM Plex Mono のまま） */
  --header-h: 56px;
  --tabbar-h: 64px;
  /* グラフ */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7;
  /* 有酸素の走る・こぐ種目（泳ぎ方の色 series-1〜6 と見分けられる色。成長グラフ） */
  --land-1: #4a3aa7; --land-2: #8a5a2b; --land-3: #3d3a33;
  --heat-0: #e9e4d6; --heat-1: #f6cfc2; --heat-2: #f0a088; --heat-3: #e46d4d; --heat-4: #c9401f; --heat-5: #93290f;
  --grid: #e6e1d4;
  --axis: #a7a294;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #11100d;
    --surface: #1b1a16;
    --surface-2: #211f1a;
    --surface-3: #2a2822;
    --ink: #f1ede3;
    --ink-2: #c9c4b6;
    --muted: #8f8a7d;
    --line: #2e2c25;
    --line-strong: #46433a;
    --accent: #ec5b3d;
    --accent-ink: #ff8467;
    --pfc-p: #ec5b3d; --pfc-f: #4a8ad6; --pfc-c: #b98c12;
    --accent-soft: #3a1c14;
    --teal: #42aaa2;
    --teal-soft: #13302d;
    --good: #4cc26a;
    --good-soft: #13301b;
    --warning: #e5a72e;
    --warning-soft: #362a10;
    --serious: #f08a5c;
    --serious-soft: #3a2014;
    --critical: #f26a6a;
    --sat: #7fa8ec;
    --phase-up: #6b93f0;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9;
    --land-1: #9085e9; --land-2: #c08a55; --land-3: #d6d1c3;
    --heat-0: #2c2a24; --heat-1: #4a2a20; --heat-2: #7a3523; --heat-3: #b04428; --heat-4: #e25a37; --heat-5: #ff8b68;
    --grid: #2c2a24;
    --axis: #5d594f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11100d; --surface: #1b1a16; --surface-2: #211f1a; --surface-3: #2a2822;
  --ink: #f1ede3; --ink-2: #c9c4b6; --muted: #8f8a7d; --line: #2e2c25; --line-strong: #46433a;
  --accent: #ec5b3d; --accent-ink: #ff8467; --accent-soft: #3a1c14; --teal: #42aaa2; --teal-soft: #13302d;
  --good: #4cc26a; --good-soft: #13301b; --warning: #e5a72e; --warning-soft: #362a10; --serious: #f08a5c; --serious-soft: #3a2014; --critical: #f26a6a; --sat: #7fa8ec; --phase-up: #6b93f0;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --series-7: #9085e9;
  --land-1: #9085e9; --land-2: #c08a55; --land-3: #d6d1c3;
  --heat-0: #2c2a24; --heat-1: #4a2a20; --heat-2: #7a3523; --heat-3: #b04428; --heat-4: #e25a37; --heat-5: #ff8b68;
  --grid: #2c2a24; --axis: #5d594f;
  --pfc-p: #ec5b3d; --pfc-f: #4a8ad6; --pfc-c: #b98c12;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* 方眼紙のような薄い罫線 */
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }
/* アイコンの安全網：大きさの指定が抜けていても文字と同じくらいで出す（指定があればそちらが優先）。狭いところで縮んで消えないように */
:where(svg[viewBox="0 0 24 24"]) { width: 1.25em; height: 1.25em; flex-shrink: 0; }
/* 文の最後の1〜2文字だけが次の行に落ちないように（対応していないブラウザでは今までどおり） */
p, li, dd { text-wrap: pretty; }
/* Safari（iPhone・ストアのアプリ）の pretty は段落全体の行の長さを均すので、日本語では行の右に大きな空きが出る。
   Safari だけ、ふつうの折り返しに戻す（hanging-punctuation に対応しているのは Safari だけ） */
@supports (hanging-punctuation: first) { p, li, dd { text-wrap: wrap; } }
.flash, .toast { text-wrap: balance; } /* 短いお知らせは2行に均等に分ける（「…切れてい／ます」にならない） */
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- レイアウト ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* ストアのアプリの中は画面の一番上まで使うので、時計・電池の帯のぶんだけヘッダーを下げる */
html.native-app { --header-h: calc(56px + env(safe-area-inset-top)); }
.native-app .app-header { padding-top: env(safe-area-inset-top); }
.native-app .pub-head { padding-top: calc(14px + env(safe-area-inset-top)); }
.native-app .auth-wrap { padding-top: calc(24px + env(safe-area-inset-top)); }
/* 公開のページ（紹介・規約）は上の帯が動くので、時計・電池のところに中身が重ならないよう、同じ色の帯を置く */
.native-app body.pub::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--bg); z-index: 1000; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.brand-name { font-size: 15px; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
/* ロゴ：PERSONAL GYM ／ HAMSTAR の2段 */
.brand-stack { display: inline-grid; justify-items: center; gap: 3px; line-height: 1; }
.brand-stack small { font-size: 9px; font-weight: 600; letter-spacing: .26em; color: var(--muted); }
.brand-stack b { font-size: 19px; font-weight: 800; letter-spacing: .12em; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a, .nav .nav-form button {
  padding: 7px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
/* お客様の上のメニューの「記録する」はフォームのボタン（記録の画面を開く） */
.nav .nav-form { display: contents; }
.nav .nav-form button { border: 0; background: transparent; font: inherit; cursor: pointer; }
.nav a:hover, .nav .nav-form button:hover { background: var(--surface-3); color: var(--ink); }
.nav a.is-active, .nav .nav-form button.is-active { background: var(--ink); color: var(--surface); }
.header-search { margin-left: auto; position: relative; width: min(320px, 34vw); }
.header-search input {
  width: 100%; height: 36px; padding: 0 14px 0 36px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
}
.header-search svg { position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; color: var(--muted); }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-results a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.is-focus { background: var(--surface-2); }
.user-menu { position: relative; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #fff; background: var(--ink-2); flex: none;
}
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.dropdown {
  position: absolute; right: 0; top: 42px; min-width: 200px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px;
}
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; font-size: 14px;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.eyebrow { font-size: 12px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; font-weight: 600; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .nav, .header-search.desktop { display: none; }
  .app-header { padding: 0 14px; gap: 10px; }
  .header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
  /* 下に固定のメニュー（タブ）＋ iPhone の下の安全な領域のぶんを空ける（2026-11-25 社長：最後のカードがメニューに密着していた） */
  .page { padding: 16px 14px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 20px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar .tab-form button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; color: var(--muted); font-weight: 500;
  }
  .tabbar .tab-form { display: contents; }
  .tabbar .tab-form button { border: 0; background: transparent; font-family: inherit; padding: 0; width: 100%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--accent); }
  .tabbar.five { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 861px) { .mobile-only { display: none !important; } }
/* スタッフの上のメニュー：タブレットの横向きや小さめのパソコン（861〜1399px）では、検索は虫めがねだけにして、
   メニューは横にスクロールできるようにする（項目が多く、右の「決済リンク」などがはみ出していた） */
@media (min-width: 1400px) { .header-actions .hdr-search { display: none; } }
@media (min-width: 861px) and (max-width: 1399px) {
  .header-search.desktop { display: none; }
  .header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
  .app-header .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; }
  .app-header .nav::-webkit-scrollbar { display: none; }
  .app-header .nav a, .app-header .nav .nav-form button { padding: 7px 9px; }
}
@media (max-width: 860px) { .desktop-only { display: none !important; } }

/* ---------- 基本部品 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 20px; }
.section-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin: 28px 0 10px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.dark:hover { opacity: .9; color: var(--surface); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.teal:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--critical); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { color: var(--accent-ink); font-weight: 500; }
.link:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2);
}
.chip.personal { background: var(--accent-soft); color: var(--accent-ink); }
.chip.pilates { background: var(--teal-soft); color: var(--teal); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warning { background: var(--warning-soft); color: var(--warning); }
.chip.serious { background: var(--serious-soft); color: var(--serious); }
.chip.outline { background: transparent; border: 1px solid var(--line-strong); }
.chip.pr { background: var(--ink); color: var(--surface); letter-spacing: .06em; }
.chip.draft { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
/* 「Apple ヘルスケアから」の印と、設定の「Apple ヘルスケアとつなぐ」（審査 2.5.1）。マークは Apple の絵をそのまま：枠・影・丸め・ほかの絵への重ねはしない。まわりに高さの 1/10 以上の空き（HIG） */
.ah-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ah-tag.is-lg { font-size: 13px; }
.ah-icon { display: block; flex: none; margin: 2px; }
.ah-head { display: flex; align-items: center; gap: 12px; }
.ah-head .ah-icon { margin: 4px; }
.ah-head-t { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ah-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; line-height: 1.55; }
.ah-facts dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.ah-facts dd { margin: 0; color: var(--ink-2); }

.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(520px, calc(100% - 28px)); }
.flash {
  padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg);
  animation: flash-in .3s ease-out both, flash-out .4s ease-in 4.5s forwards;
}
.flash.error { background: var(--critical); color: #fff; animation: flash-in .3s ease-out both; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes flash-out { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }

/* フォーム */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
/* iOS の日付・時刻の入力欄は、独自の最小幅と高さを持っていて、となりの欄にはみ出す。ほかの入力欄と同じ大きさに収める */
.input[type="date"], .input[type="time"], .input[type="month"], .input[type="datetime-local"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; display: block; }
.input::-webkit-date-and-time-value { min-height: 1.5em; margin: 0; text-align: left; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23858174' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-2 > .field + .field, .grid-3 > .field + .field { margin-top: 0; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; flex-wrap: wrap; }
.segmented a, .segmented button, .segmented label {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.segmented input { display: none; }
.segmented .is-active, .segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented label span { display: block; padding: 0; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented label:has(input:checked) input:checked + span { background: transparent; box-shadow: none; }

/* 表 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- 朱印（フェーズ） ---------- */
.hanko {
  --c: var(--accent);
  flex: none;
  width: 64px; height: 64px; border-radius: 50%;
  border: 2.5px solid var(--c); color: var(--c);
  display: grid; place-items: center; text-align: center;
  font-weight: 700; font-size: 15px; line-height: 1.1; letter-spacing: .04em;
  transform: rotate(-10deg);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--c) 12%, transparent);
  position: relative;
}
.hanko::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.hanko small { display: block; font-size: 9px; letter-spacing: .1em; font-weight: 600; opacity: .85; }
.hanko.up { --c: var(--phase-up); }
.hanko.flat { --c: var(--teal); }
.hanko.sm { width: 44px; height: 44px; font-size: 11px; border-width: 2px; }
.hanko.sm::after { inset: 3px; }

.phase-card { display: flex; gap: 16px; align-items: center; }
.phase-figures { display: flex; gap: 22px; flex-wrap: wrap; }
.figure .v { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.figure .v small { font-size: 13px; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.figure .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 999px; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-line svg { width: 16px; height: 16px; }
.status-line.good { color: var(--good); }
.status-line.warning { color: var(--warning); }
.status-line.serious { color: var(--serious); }
.status-line.neutral { color: var(--muted); }

/* ---------- お客様ヘッダー ---------- */
.cust-head { display: flex; gap: 18px; align-items: flex-start; padding: 20px; flex-wrap: wrap; }
.cust-name { font-size: 24px; font-weight: 700; letter-spacing: .03em; }
.cust-kana { font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.cust-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.cust-meta b { font-weight: 600; color: var(--ink); }
.bday { color: var(--accent-ink); font-weight: 600; }
.caution {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: var(--warning-soft); color: var(--ink);
}
.caution svg { width: 18px; height: 18px; color: var(--warning); flex: none; margin-top: 1px; }
.caution b { color: var(--warning); white-space: nowrap; }
.subnav { display: flex; gap: 4px; padding: 0 12px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { padding: 12px 12px 11px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a.is-active { color: var(--ink); border-color: var(--accent); }

/* ---------- 一覧 ---------- */
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); color: inherit; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 18px; }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--muted); font-weight: 600; }

.booking { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.booking:last-child { border-bottom: 0; }
.booking .time { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.booking .time small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---------- カルテ履歴 ---------- */
.timeline { position: relative; }
.session-card { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.session-card:last-child { border-bottom: 0; }
.session-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.session-date { font-weight: 700; font-size: 16px; }
.session-ex { margin-top: 10px; display: grid; gap: 6px; }
.ex-line { display: grid; grid-template-columns: 4.5em minmax(0, 13em) 1fr; gap: 10px; font-size: 14px; align-items: baseline; }
.ex-line .part { font-size: 12px; color: var(--muted); font-weight: 600; }
.ex-line .name { font-weight: 600; }
.ex-line .sets { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ex-line .sets .pr-mark { color: var(--accent-ink); font-weight: 700; }
@media (max-width: 640px) {
  .ex-line { grid-template-columns: 1fr; gap: 0; padding: 6px 0; border-bottom: 1px dashed var(--line); }
  .ex-line:last-child { border-bottom: 0; }
  .ex-line .part { display: none; }
}
.note-box { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.note-box .k { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 2px; }
.note-box.handover { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.note-box.private { border: 1px dashed var(--line-strong); background: transparent; }

/* ---------- カルテ入力 ---------- */
body.is-editor { background-image: none; }
.editor {
  --mm-w: 44%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100dvh - var(--header-h));
}
@media (min-width: 900px) {
  .editor.with-map { grid-template-columns: minmax(0, 1fr) 8px var(--mm-w); }
  .editor.with-map .mm-panel { display: flex; }
  .editor.with-map .mm-resizer { display: block; }
}
.editor-main { min-width: 0; padding: 16px 18px 140px; }
.editor-main-inner { max-width: 820px; margin: 0 auto; }
.mm-resizer { display: none; cursor: col-resize; background: var(--line); position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); }
.mm-resizer::after { content: ""; position: absolute; left: 2px; top: 50%; width: 4px; height: 40px; margin-top: -20px; border-radius: 4px; background: var(--line-strong); }
.mm-resizer:hover::after { background: var(--accent); }
.mm-panel {
  display: none; flex-direction: column;
  position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h));
  background: var(--surface); border-left: 1px solid var(--line); min-width: 0;
}
.mm-panel.is-overlay {
  display: flex; position: fixed; inset: 0; z-index: 80; height: 100dvh; border: 0;
  animation: sheet-up .25s ease-out;
}
.mm-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mm-toolbar .title { font-weight: 600; font-size: 14px; margin-right: auto; display: flex; gap: 8px; align-items: center; }
.mm-status { font-size: 12px; color: var(--muted); }
.mm-canvas { flex: 1; min-height: 0; position: relative; }
.mm-canvas .map-container { background: var(--surface) !important; }
.mm-help { font-size: 12px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); display: flex; gap: 14px; flex-wrap: wrap; }
.mm-help kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); }

.editor-head { display: grid; gap: 12px; margin-bottom: 16px; }
.editor-cust { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.editor-cust .name { font-size: 20px; font-weight: 700; }
.editor-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .editor-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.editor-meta > label { min-width: 0; }
.editor-meta .input, .editor-meta .select { height: 40px; min-height: 40px; padding: 6px 10px; line-height: 1.4; }
.editor-meta .select { padding-right: 28px; }
.mini-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-bottom: 3px; display: block; }

.part-recency { display: flex; gap: 6px; flex-wrap: wrap; }
.part-recency .chip { font-weight: 500; }
.part-recency .chip b { font-weight: 700; }
.part-recency .fresh { background: var(--accent-soft); color: var(--accent-ink); }
.part-recency .stale { background: transparent; border: 1px solid var(--line-strong); }

.prev-card summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.prev-card summary::-webkit-details-marker { display: none; }
.prev-card summary .chev { transition: transform .2s; width: 18px; height: 18px; color: var(--muted); }
.prev-card[open] summary .chev { transform: rotate(180deg); }
.prev-card .prev-body { padding: 0 16px 14px; }

.ex-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.ex-block.is-new { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.98); opacity: 0; } }
.ex-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.ex-head .order { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.ex-head .title { flex: 1; min-width: 0; }
.ex-head .title .name { font-weight: 700; font-size: 16px; cursor: pointer; }
.ex-head .title .name:hover { color: var(--accent-ink); }
.ex-head .title .meta { font-size: 12px; color: var(--muted); }
.ex-prev { padding: 0 14px 8px 48px; font-size: 13px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.ex-prev .k { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.ex-prev .best { color: var(--muted); }

.sets { padding: 0 8px 4px; }
.set-head, .set-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 6px; align-items: center; }
.set-head { padding: 0 6px 4px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.set-head span { text-align: center; }
.set-row { padding: 5px 6px; border-radius: 10px; position: relative; }
.set-row.is-done { background: color-mix(in srgb, var(--good-soft) 70%, transparent); }
.set-row.pilates { grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 46px; }
.set-head.pilates { grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 46px; }
.set-no {
  height: 36px; border-radius: 9px; border: 0; background: var(--surface-3);
  font-weight: 700; font-size: 14px; cursor: pointer; position: relative;
}
.set-no.warmup { background: var(--warning-soft); color: var(--warning); }
.set-no.drop { background: var(--teal-soft); color: var(--teal); }
.set-no.failure { background: var(--serious-soft); color: var(--serious); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); overflow: hidden; height: 40px; }
.stepper:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.stepper button { width: 34px; height: 100%; border: 0; background: transparent; color: var(--muted); font-size: 18px; font-weight: 500; cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.stepper button:active { background: var(--surface-3); color: var(--ink); }
.stepper input {
  width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; text-align: center;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 2px;
}
.stepper input:focus { outline: none; }
.stepper input::placeholder { color: var(--line-strong); font-weight: 500; }
.stepper .unit { font-size: 11px; color: var(--muted); padding-right: 4px; flex: none; }
.plain-input { height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 0 10px; width: 100%; min-width: 0; font-weight: 600; }
.plain-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.done-btn {
  height: 38px; width: 42px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--muted); justify-self: end;
}
.done-btn svg { width: 20px; height: 20px; }
.done-btn.on { background: var(--good); border-color: var(--good); color: #fff; }
.pr-badge {
  position: absolute; right: 54px; top: -6px; z-index: 2;
  background: var(--ink); color: var(--surface); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 999px; animation: pr-pop .5s cubic-bezier(.2, 1.6, .4, 1);
  pointer-events: none;
}
@keyframes pr-pop { from { transform: scale(.3); opacity: 0; } }
.ex-foot { display: flex; gap: 6px; padding: 6px 14px 12px; align-items: center; flex-wrap: wrap; }
.ex-foot .spacer { flex: 1; }
.ex-memo { padding: 0 14px 12px; display: grid; gap: 8px; }
.ex-memo .textarea { min-height: 54px; font-size: 14px; }
.spring-chips { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 14px 10px 54px; }
.spring-chips button { height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12px; font-weight: 600; cursor: pointer; }
.spring-chips button i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }

.add-ex { width: 100%; height: 56px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); background: transparent; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-ex:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--surface); }
.add-ex svg { width: 20px; height: 20px; }

.editor-notes { display: grid; gap: 12px; margin-top: 20px; }
.score-row { display: flex; gap: 6px; flex-wrap: wrap; }
.score-row button { width: 40px; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; cursor: pointer; }
.score-row button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.score-row.pain button { width: 34px; }

.editor-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.editor.with-map ~ .editor-bar { right: 0; }
.save-state { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.save-state.saving .dot { background: var(--warning); animation: blink 1s infinite; }
.save-state.error .dot { background: var(--critical); }
@keyframes blink { 50% { opacity: .3; } }
.timer {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px;
  border-radius: 12px; background: var(--surface-3); font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.timer .t { font-size: 20px; font-weight: 700; min-width: 3.2em; text-align: center; }
.timer.running { background: var(--ink); color: var(--surface); }
.timer.running .btn { color: var(--surface); }
.timer.done { background: var(--accent); color: #fff; animation: pulse 1s 3; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.timer .btn.ghost:hover { background: rgba(127, 127, 127, .18); }
.timer .timer-set svg { width: 17px; height: 17px; }
/* タイマーを使わないとき：バーには設定のボタン（オフ）だけ */
.timer.is-off { background: transparent; padding: 0; }
.timer.is-off > :not(.timer-set) { display: none; }
.timer.is-off .timer-set { width: auto; gap: 4px; padding: 0 10px; color: var(--muted); }
.timer-off-label { font-size: 12px; }
/* 休憩タイマーの設定（シート） */
.tset { display: grid; gap: 4px; }
.tset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tset-row > span:first-child { display: grid; gap: 2px; }
.tset-row b { font-size: 15px; }
.tset-row small { font-size: 12px; color: var(--muted); }
.tset-row.is-dim { opacity: .5; }
.tset-step { display: inline-flex; align-items: center; gap: 4px; }
.tset-len { min-width: 3em; text-align: center; font-size: 18px; }
.tset-sw { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.tset-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.tset-sw:checked { background: var(--accent); border-color: var(--accent); }
.tset-sw:checked::after { transform: translateX(18px); }
.tset-sw:focus-visible { box-shadow: var(--ring); }

/* シート（下から出るパネル） */
.sheet-backdrop { position: fixed; inset: 0; z-index: 85; background: rgba(17, 16, 13, .45); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 86; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(720px, 100%); max-height: 88dvh;
  background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: sheet-up .25s ease-out;
}
@keyframes sheet-up { from { transform: translate(-50%, 30px); opacity: 0; } }
.mm-panel.is-overlay { animation-name: fade; }
@media (min-width: 900px) {
  .sheet { bottom: auto; top: 8vh; border-radius: 18px; max-height: 84vh; }
  .sheet.side { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: min(520px, 100%); max-height: none; border-radius: 0; animation: slide-in .25s ease-out; }
}
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 16px; margin-right: auto; }
.sheet-body { overflow-y: auto; padding: 12px 16px 20px; -webkit-overflow-scrolling: touch; }
.sheet-search { padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.part-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.part-tabs::-webkit-scrollbar { display: none; }
.part-tabs button { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.part-tabs button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pick-group { margin-bottom: 14px; }
.pick-group h4 { font-size: 12px; color: var(--muted); letter-spacing: .08em; margin: 6px 2px 6px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.pick-item { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: grid; gap: 1px; }
.pick-item:hover { border-color: var(--accent); background: var(--surface); }
.pick-item .n { font-weight: 600; font-size: 14px; }
.pick-item .m { font-size: 11px; color: var(--muted); }
/* 同じ名前で道具のちがう種目：1つにまとめて道具を選ぶ */
.pick-item.pick-multi { cursor: default; }
.pick-item.pick-multi:hover { border-color: var(--line); background: var(--surface-2); }
.pick-equip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pick-equip button { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.pick-equip button:hover { border-color: var(--accent); }
.pick-equip button.last { border-color: var(--accent); background: var(--accent-soft); }
.pick-equip .pick-own { margin-left: 4px; }
/* 「＋ほかの道具」（道具ちがいを作って入れる） */
.pick-equip button.add { border-style: dashed; color: var(--ink-2); background: transparent; font-weight: 600; }
.pick-one { position: relative; display: grid; }
.pick-one > .pick-item { padding-right: 112px; }
.pick-one .pick-other { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pick-one .pick-other:hover { border-color: var(--accent); color: var(--ink); }
/* 記録の見出しの道具（押すと「道具を変える」） */
.ex-head .meta .eq-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; padding: 1px 4px 1px 8px; min-height: 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer; vertical-align: middle; }
.ex-head .meta .eq-switch svg { width: 14px; height: 14px; }
.ex-head .meta .eq-switch:hover { border-color: var(--accent); }
/* 道具を選ぶシート */
.equip-sheet .equip-list { display: grid; gap: 6px; margin-top: 10px; }
.equip-opt { text-align: left; display: grid; gap: 1px; min-height: 52px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.equip-opt .n { font-weight: 600; font-size: 15px; }
.equip-opt .m { font-size: 12px; color: var(--muted); }
.equip-opt.on { border-color: var(--accent); background: var(--accent-soft); cursor: default; }
.equip-opt:disabled { opacity: 1; }
.equip-more-h { font-size: 12px; color: var(--muted); letter-spacing: .08em; margin: 16px 2px 2px; }

.hist-session { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.hist-session .hs-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 10px 12px; background: var(--surface-2); }
.hist-session .hs-info { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; flex: 1; min-width: 0; min-height: 32px; }
.hist-session .hs-copy { flex: none; margin: -2px 0; }
.hist-session .hs-body { padding: 8px 12px 10px; display: grid; gap: 6px; }
.hist-ex { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.hist-ex .n { font-weight: 600; min-width: 0; flex: 1; }
.hist-ex .s { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 95; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: flash-in .25s ease-out;
  max-width: calc(100% - 28px);
}
.toast.error { background: var(--critical); color: #fff; }
.toast.has-link { display: flex; align-items: center; gap: 14px; }
.toast.has-link a { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.conflict-bar { position: sticky; top: var(--header-h); z-index: 30; background: var(--warning-soft); color: var(--ink); padding: 10px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; border-bottom: 1px solid var(--line); }

/* ---------- グラフ ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box.h220 { height: 220px; }
.chart-box.h260 { height: 260px; }
.chart-box.h300 { height: 300px; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; border-radius: 2px; width: 14px; }
.legend i.dash { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; width: 14px; }
.chart-table { margin-top: 10px; }
.chart-table summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.chart-table .table { font-size: 13px; margin-top: 6px; }
/* 列の多い表（水泳の SWOLF つき）：375px に入るよう、すきまをつめる */
.chart-table .table-tight th, .chart-table .table-tight td { padding-left: 4px; padding-right: 4px; }

.prog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .prog-grid { grid-template-columns: 1fr; } }
.span-2 { grid-column: 1 / -1; }

/* 筋肉マップ */
.muscle-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; }
.muscle-wrap figure { margin: 0; text-align: center; }
.muscle-wrap figcaption { font-size: 11px; color: var(--muted); letter-spacing: .14em; margin-top: 4px; }
.muscle svg { width: 100%; height: auto; }
.muscle .base { fill: var(--surface-3); }
.muscle .m { stroke: var(--surface); stroke-width: 1.6; stroke-linejoin: round; transition: fill .3s; cursor: pointer; }
.muscle .m:hover { stroke: var(--ink); }
.heat-scale { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: 11px; color: var(--muted); margin-top: 10px; }
.heat-scale i { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }
.part-bars { display: grid; gap: 7px; margin-top: 14px; }
.part-bar { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 3.5em; gap: 10px; align-items: center; font-size: 13px; }
.part-bar .track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.part-bar .track span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.part-bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* 来店カレンダー */
.cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.cal i { width: 13px; height: 13px; border-radius: 3px; background: var(--surface-3); display: block; }
.cal i.p { background: var(--accent); }
.cal i.l { background: var(--teal); }
.cal i.c { background: var(--cardio); }
.cal i[data-day] { cursor: pointer; }
.cal i.is-pick { box-shadow: 0 0 0 2px var(--ink); }
.cal-pick { margin: 6px 0 0; min-height: 1.5em; }
.cal-pick.on { color: var(--ink); }
.cal i.f { visibility: hidden; }
.cal i.today { box-shadow: 0 0 0 1.5px var(--ink); }
.cal-months { display: flex; font-size: 11px; color: var(--muted); margin-bottom: 4px; gap: 0; }

/* 成長率ランキング */
.growth { display: grid; gap: 10px; }
.growth-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 4.2em; gap: 10px; align-items: center; font-size: 13px; }
.growth-row .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.growth-row .track { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.growth-row .track span { display: block; height: 100%; background: var(--series-1); border-radius: 999px; min-width: 3px; }
.growth-row .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.growth-row .v.neg { color: var(--muted); }

.ex-picker { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; }
.ex-picker::-webkit-scrollbar { display: none; }
.ex-picker button { flex: none; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.ex-picker button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ex-summary { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }

.pr-list { display: grid; }
.pr-item { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 14px; }
.pr-item:last-child { border-bottom: 0; }
.pr-item .d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-item .n { font-weight: 600; }
.pr-item .n small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.pr-item .val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* フェーズのタイムライン */
.phase-line { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.phase-line span { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; padding: 0 4px; }
.phase-line .down { background: var(--accent); }
.phase-line .up { background: var(--phase-up); }
.phase-line .flat { background: var(--teal); }
.phase-line .gap { background: transparent; }
.phase-line .past { opacity: .45; }
.phase-flow .phase-line { position: relative; }
.phase-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); }
.phase-dates { position: relative; }
.phase-now-label { position: absolute; top: 0; transform: translateX(-50%); color: var(--ink); }
.phase-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.phase-item:last-child { border-bottom: 0; }

/* ---------- 認証画面 ---------- */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 32px 28px; }
.auth-card .brand { justify-content: center; margin-bottom: 22px; font-size: 18px; }
.auth-card .brand-stack { justify-items: center; gap: 5px; }
.auth-card .brand-stack small { font-size: 11px; }
.auth-card .brand-stack b { font-size: 28px; }
.auth-title { font-size: 20px; text-align: center; margin-bottom: 6px; }
.auth-lead { font-size: 14px; color: var(--ink-2); text-align: center; margin-bottom: 22px; }
/* 中央ぞろえの短い文：語のまとまり（<wbr> の位置）で折り返す。入りきらないときだけ途中で折る */
.auth-lead, .phrase { word-break: keep-all; overflow-wrap: anywhere; }
.code-input { font-size: 30px; letter-spacing: .5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: .5em; }
.dev-note { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); font-size: 13px; }

/* ---------- お客様マイページ ---------- */
.my-head { padding: 22px 0 6px; }
.my-greet { font-size: 22px; font-weight: 700; }
.my-greet small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.hero-card { padding: 20px; overflow: hidden; position: relative; }
.hero-card .big { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.hero-card .big small { font-size: 16px; margin-left: 4px; font-weight: 600; color: var(--ink-2); }
.wrap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.wrap-grid .cell { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.wrap-grid .cell .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.wrap-grid .cell .v { font-size: 22px; font-weight: 700; }
.wrap-grid .cell .v small { font-size: 12px; color: var(--ink-2); margin-left: 2px; }
.comment-bubble { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; margin-top: 10px; }
.comment-bubble .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }

.ex-detail { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ex-detail:last-child { border-bottom: 0; }
.ex-detail .h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ex-detail .h .n { font-weight: 700; font-size: 16px; }
.set-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.set-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.set-table tr:last-child td { border-bottom: 0; }
.set-table td.no { width: 2.4em; color: var(--muted); font-size: 13px; font-weight: 600; }
.set-table td.w { font-weight: 700; }
.set-table td.r { text-align: right; }

.anim-in > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.anim-in > *:nth-child(2) { animation-delay: .05s; }
.anim-in > *:nth-child(3) { animation-delay: .1s; }
.anim-in > *:nth-child(4) { animation-delay: .15s; }
.anim-in > *:nth-child(5) { animation-delay: .2s; }
.anim-in > *:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
body.is-editor .tabbar { display: none; }
body.is-editor .page { padding: 0; max-width: none; }
.card-title svg { width: 18px; height: 18px; flex: none; }
.stack { grid-template-columns: minmax(0, 1fr); }
.dash-grid > *, .prog-grid > * { min-width: 0; }
.mm-toolbar .title svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.mm-toolbar .btn.sm { height: 30px; padding: 0 9px; }
.editor-meta { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.editor .mm-panel:not(.is-overlay), .editor .mm-resizer { height: calc(100dvh - var(--header-h) - 64px - env(safe-area-inset-bottom)); }
.hist-ex { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 0; align-items: center; }
.hist-ex .n, .hist-ex .s { grid-column: 1; }
.hist-ex > button { grid-column: 2; grid-row: 1 / span 2; }
.hist-set { display: flex; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hist-set .no { width: 2em; color: var(--muted); font-weight: 600; }
.cal-months span { white-space: nowrap; overflow: visible; }
.card-head { flex-wrap: wrap; row-gap: 8px; }
.card-head .segmented { flex-wrap: nowrap; }
.card-head .card-title { white-space: nowrap; }
@media (max-width: 600px) {
  .card-head { padding: 12px 16px; }
  .card-body { padding: 14px 16px; }
  .cust-head { padding: 16px; }
  .cust-name { font-size: 21px; }
}
.editor-bar > .btn, .editor-bar > .timer { flex: none; }
.save-state { flex: 1 1 auto; min-width: 0; }
.save-state .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .editor-bar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .editor-bar > .btn.sm.ghost { width: 38px; padding: 0; }
  .timer { padding: 0 2px; gap: 0; height: 42px; }
  .timer .t { font-size: 18px; min-width: 2.9em; }
  .timer .btn.icon.sm { width: 30px; }
  .timer .timer-set { width: 32px; }
  #complete-btn { padding: 0 12px; font-size: 13px; }
  .save-state .label { display: none; }
  .editor-main { padding: 12px 12px 120px; }
  .ex-head { padding: 10px 10px 6px; gap: 6px; }
  .ex-prev { padding: 0 10px 8px 40px; }
  .sets { padding: 0 4px 4px; }
  .set-row, .set-head { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 42px; gap: 5px; }
  .set-row.pilates, .set-head.pilates { grid-template-columns: 34px minmax(0, 1.2fr) minmax(0, 1fr) 54px 42px; }
  .stepper button { width: 30px; }
  .done-btn { width: 40px; }
  .spring-chips { padding-left: 10px; }
}
@media (max-width: 600px) {
  .set-row.pilates, .set-head.pilates { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.15fr) 46px 40px; gap: 4px; }
  .set-row.pilates .stepper button { width: 26px; }
  .set-row.pilates .plain-input { padding: 0 6px; }
}

/* バッジ */
.hanko.ink { --c: var(--ink); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 4px; }
.badge-stamp { width: 58px; height: 58px; font-size: 14px; margin-bottom: 2px; }
.badge-title { font-size: 12px; font-weight: 600; line-height: 1.35; }
.badge-date { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.next-goals { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.next-goal { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.next-goals details[open] { display: grid; gap: 8px; }
.next-goal .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-goal .track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.next-goal .track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.next-goal .v { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .next-goal { grid-template-columns: minmax(0, 1fr) auto; } .next-goal .track { grid-column: 1 / -1; grid-row: 2; } }
.new-badges { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.repbest { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); max-width: 460px; }
.repbest .table td, .repbest .table th { padding: 6px 8px; }
.segmented button:disabled { opacity: .35; cursor: not-allowed; }

/* 写真 */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-item { margin: 0; display: grid; gap: 4px; align-content: start; }
.photo-thumb { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--surface-3); aspect-ratio: 3 / 4; display: block; width: 100%; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-item figcaption { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.photo-edit summary { cursor: pointer; }
.compare-view.side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-view.side figure { margin: 0; }
.compare-view.side img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--surface-3); border-radius: 12px; cursor: zoom-in; }
.compare-view.side figcaption { font-size: 13px; margin-top: 6px; color: var(--ink-2); }
.compare-view.slider { max-width: 460px; margin: 0 auto; }
.slider-stage { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.slider-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.slider-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.slider-tag { position: absolute; top: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(17,16,13,.65); color: #fff; }
.slider-tag.l { left: 10px; } .slider-tag.r { right: 10px; }
.compare-view.slider input[type=range] { width: 100%; margin-top: 10px; accent-color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 8, .92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; animation: fade .2s; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 80px); object-fit: contain; border-radius: 8px; }
.lightbox-caption { color: #fff; font-size: 14px; margin-top: 10px; text-align: center; }
.compare-view.side { max-width: 640px; margin: 0 auto; }

/* 予約カレンダー（ALMS）：時間軸の週表示・日表示 */
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav .btn.icon { font-size: 22px; line-height: 1; }
.cal-label { font-size: 16px; margin-left: 4px; }
.cal-daychips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
.cal-daychips button { display: grid; justify-items: center; gap: 0; padding: 6px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cal-daychips button span { font-size: 11px; color: var(--muted); }
.cal-daychips button b { font-size: 17px; line-height: 1.2; }
.cal-daychips button small { font-size: 10px; color: var(--muted); min-height: 14px; }
.cal-daychips button.today b { color: var(--accent-ink); }
.cal-daychips button.on { background: var(--ink); border-color: var(--ink); }
.cal-daychips button.on span, .cal-daychips button.on b, .cal-daychips button.on small { color: var(--surface); }
.cal-grid { --times: 52px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cal-head { display: grid; grid-template-columns: var(--times) repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface); }
.cal-dayhead { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 8px 4px; border-left: 1px solid var(--line); font-size: 13px; }
.cal-dayhead .w { color: var(--muted); font-size: 12px; }
.cal-dayhead .n { font-weight: 700; font-size: 18px; }
.cal-dayhead .c { font-size: 11px; color: var(--muted); }
.cal-dayhead.today .n { background: var(--accent); color: #fff; border-radius: 999px; min-width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 15px; }
.cal-dayhead.today .w { color: var(--accent-ink); font-weight: 700; }
.cal-vscroll { max-height: min(68vh, 720px); overflow-y: auto; overscroll-behavior: contain; }
.cal-body { display: grid; grid-template-columns: var(--times) repeat(var(--cols), minmax(0, 1fr)); position: relative; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.cal-col.today { background-color: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.cal-col.closed { background-color: var(--surface-3); }
.cal-off { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--surface-3) 70%, transparent); }
.cal-break { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--surface-3) 90%, transparent) 0 6px, transparent 6px 12px); display: flex; align-items: flex-start; }
.cal-break span { font-size: 10px; color: var(--muted); padding: 2px 4px; }
.cal-ev { position: absolute; z-index: 2; text-align: left; border-radius: 7px; padding: 3px 6px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 0; line-height: 1.25;
  background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); color: var(--ink); }
.cal-ev:hover { border-color: var(--teal); z-index: 3; box-shadow: var(--shadow); }
.cal-ev .t { font-size: 10.5px; font-weight: 700; color: var(--teal); display: flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.cal-ev .t svg { width: 12px; height: 12px; }
.cal-ev .n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .m { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.is-unknown { background: var(--surface); border: 1.5px dashed var(--line-strong); }
.cal-ev.is-unknown .t { color: var(--muted); }
.cal-ev.is-trial { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 50%, transparent); }
.cal-ev.is-trial .t { color: var(--warning); }
.cal-ev.is-trial.is-unknown { border-style: dashed; }
.cal-ev.is-trial-personal { border-style: dashed; }
.bk-totrial { margin: -4px 0 8px auto; display: block; }
.bk-guest { display: grid; gap: 8px; }
.cal-ev.is-done { background: var(--surface-2); border-color: var(--line-strong); }
.cal-ev.is-done .t { color: var(--good); }
.cal-ev.is-past { opacity: .7; }
.cal-grid.is-day .cal-ev { padding: 5px 10px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.cal-grid.is-day .cal-ev .n { font-size: 14px; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--critical); z-index: 1; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--critical); }
.cal-pop { position: fixed; z-index: 70; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px 14px 14px; animation: fade .15s; }
.cal-pop-name { font-size: 18px; font-weight: 700; margin-top: 4px; }
.cal-pop-name a:hover { text-decoration: underline; }
.cal-pop-actions { display: grid; gap: 6px; margin-top: 12px; }
.cal-pop-actions form { margin: 0; }
@media (max-width: 600px) {
  .cal-grid { --times: 40px; }
  .cal-dayhead { flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; }
  .cal-dayhead .c { display: none; }
  .cal-ev { padding: 2px 4px; }
  .cal-ev .m { display: none; }
}
.cal-ev .r1 { display: flex; flex-direction: column; min-width: 0; }
.cal-ev.compact { justify-content: center; padding-top: 2px; padding-bottom: 2px; }
.cal-ev.compact .r1 { flex-direction: row; align-items: baseline; gap: 5px; }
.cal-ev.compact .n { flex: 1; min-width: 0; }
.cal-grid.is-day .cal-ev .r1 { flex-direction: row; align-items: baseline; gap: 8px; }
.cal-ev { justify-content: flex-start; align-items: stretch; }
.cal-grid.is-day .cal-head { display: none; }
.cal-grid.is-day .cal-ev { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 1px; }
.cal-grid.is-day .cal-ev .m { display: block; font-size: 12px; }
.cal-grid.is-day .cal-ev .t { font-size: 12px; }
/* 現在時刻の線は予約の上に重ねる（Googleカレンダー・Square と同じ） */
.cal-now { z-index: 5; box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 70%, transparent); }
.cal-now::before { left: -6px; top: -4px; box-shadow: 0 0 0 2px var(--surface); }
.cal-times .cal-now-label { right: 4px; z-index: 6; color: #fff; background: var(--critical); border-radius: 999px; padding: 1px 5px; font-size: 10.5px; font-weight: 700; transform: translateY(-50%); }
@media (max-width: 600px) { .cal-times .cal-now-label { right: 2px; font-size: 9.5px; padding: 1px 3px; letter-spacing: -.02em; } }
.cal-ev.is-group { cursor: default; background: transparent; border: 1.5px dashed color-mix(in srgb, var(--teal) 55%, transparent); color: var(--ink-2); }
.cal-ev.is-group .t { color: var(--teal); }
.cal-ev.is-group:hover { box-shadow: none; }
/* 予約カレンダー：空き枠・キャンセル・キャンセル待ち・シフト */
.cal-dayhead { flex-direction: column; align-items: center; gap: 2px; }
.cal-dayhead-top { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.cal-dayhead-shift { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--ink-2); line-height: 1.35; }
.cal-tag { font-size: 10px; font-weight: 700; color: var(--warning); background: var(--warning-soft); border-radius: 999px; padding: 0 6px; }
.cal-free { position: absolute; left: 2px; right: 2px; z-index: 1; border-radius: 6px; background: color-mix(in srgb, var(--good-soft) 70%, transparent); border: 1px dotted color-mix(in srgb, var(--good) 45%, transparent); pointer-events: none; overflow: hidden; }
.cal-free span { font-size: 10px; color: var(--good); font-weight: 600; padding: 1px 5px; display: block; white-space: nowrap; }
.cal-ev.is-cancel { background: var(--surface); border: 1px dashed color-mix(in srgb, var(--critical) 55%, transparent); }
.cal-ev.is-cancel .t, .cal-ev.is-cancel .n { text-decoration: line-through; color: var(--critical); }
.cal-ev.is-cancel .m { color: var(--critical); }
.cal-ev.is-wait { background: var(--surface); border: 1px dashed color-mix(in srgb, var(--warning) 60%, transparent); }
.cal-ev.is-wait .t { color: var(--warning); }
.cal-ev.is-pending { box-shadow: inset 0 0 0 1.5px var(--serious); }
.cal-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 10px; }
.cal-sum-item { border-radius: 10px; font-size: 13px; }
.cal-sum-item summary { cursor: pointer; list-style: none; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.cal-sum-item summary::-webkit-details-marker { display: none; }
.cal-sum-item.cancel summary { background: var(--serious-soft); color: var(--critical); }
.cal-sum-item.wait summary { background: var(--warning-soft); color: var(--warning); }
.cal-sum-item.pending summary { background: var(--serious-soft); color: var(--serious); }
.cal-sum-item[open] { flex-basis: 100%; background: var(--surface-2); }
.cal-sum-list { padding: 6px 12px 10px; display: grid; gap: 4px; }
.cal-shiftline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; margin-bottom: 8px; }
.cal-shift { background: var(--surface-2); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
@media (max-width: 600px) { .cal-dayhead-shift { display: none; } }

/* ---------- スマホ表示の調整 ---------- */
.session-top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.st-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-meta { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }
.st-meta .ink-2 { font-size: 13px; margin-right: auto; }
.phase-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; }
.phase-actions form { margin: 0; }
.fold-card > summary { cursor: pointer; list-style: none; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card:not([open]) > summary { border-bottom: 0; }
.color-input { width: 72px; height: 42px; padding: 4px; }
@media (max-width: 600px) {
  .grid-2.m-2, .grid-3.m-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .m-span-2 { grid-column: 1 / -1; }
  /* フェーズのカード：印は小さく上に、数字は3列、操作は下に横並び */
  .phase-card { align-items: flex-start; gap: 12px; }
  .phase-card > .hanko:not(.sm) { width: 46px; height: 46px; font-size: 12px; border-width: 2px; }
  .phase-card > .hanko:not(.sm)::after { inset: 3px; }
  .phase-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; }
  .figure .v { font-size: 21px; }
  .figure .v small { font-size: 11px; }
  .phase-item { flex-direction: column; gap: 10px; padding: 14px 16px; }
  .phase-actions { flex-direction: row; justify-content: flex-end; width: 100%; }
  /* カルテ履歴の見出し：日付と「開く」を1行目、テーマや担当を2行目に */
  .session-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .st-meta { grid-column: 1 / -1; grid-row: 2; }
  .st-act { grid-column: 2; grid-row: 1; }
  .session-card { padding: 14px 16px; }
  /* 横にスクロールできるタブは右端を薄くして気づけるように */
  .subnav, .ex-picker, .part-tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .list-row { padding: 12px 16px; gap: 10px; }
  .card-pad { padding: 16px; }
  .page-head { margin-bottom: 14px; }
}
@media (max-width: 600px) {
  .phase-card.is-full { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; row-gap: 0; align-items: center; }
  .phase-card.is-full > .grow { display: contents; }
  .phase-card.is-full > .grow > * { grid-column: 1 / -1; }
  .phase-card.is-full > .grow > :first-child { grid-column: 2; grid-row: 1; }
  .phase-card.is-full > .hanko { grid-row: 1; }
  .phase-card.is-full .phase-figures { margin-top: 12px; }
}
.label { flex-wrap: wrap; column-gap: 8px; row-gap: 0; } .label .hint { margin-left: auto; }

/* 部位のバランス（種目の追加）：人体図を状態で色分け */
.bal-panel { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.bal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.bal-body figure { margin: 0; text-align: center; }
.bal-body svg { width: 100%; height: auto; max-height: 200px; }
.bal-body figcaption { font-size: 10px; color: var(--muted); letter-spacing: .14em; }
.bal-body .m { cursor: pointer; stroke: var(--surface-2); stroke-width: 2.4; stroke-linejoin: round; transition: opacity .15s; }
.bal-body .m:hover { stroke: var(--ink); }
.bal-body .m.s-lack { fill: var(--critical); }
.bal-body .m.s-low { fill: var(--warning); }
.bal-body .m.s-ok { fill: var(--good); }
.bal-body .m.s-high { fill: var(--series-1); }
.bal-body .m.s-none { fill: var(--surface-3); cursor: default; }
.bal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.bal-dot.lack { background: var(--critical); } .bal-dot.low { background: var(--warning); }
.part-tabs button.on .bal-dot { box-shadow: 0 0 0 1.5px var(--surface); }

/* トレーニングの目的と、部位ごとの1週間のセット数（partials/train_target_form.php・動きは ui.js） */
.tt-form { min-width: 0; }
.tt-by { margin: 0 0 8px; }
.tt-h { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0; margin: 0 0 6px; }
.tt-h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tt-goals { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.tt-goals legend { grid-column: 1 / -1; }
.tt-goal { position: relative; display: block; cursor: pointer; }
.tt-goal input { position: absolute; opacity: 0; pointer-events: none; }
.tt-goal span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.tt-goal b { font-size: 13.5px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.tt-goal small { font-size: 11px; color: var(--muted); line-height: 1.4; }
.tt-goal input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tt-goal input:checked + span small { color: var(--ink-2); }
.tt-goal input:focus-visible + span { box-shadow: var(--ring); }
.tt-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.tt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: 1px solid var(--line); }
.tt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tt-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; white-space: nowrap; min-width: 0; }
.tt-tag { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; }
.tt-tag:empty { display: none; }
.tt-tag.is-high { background: var(--accent-soft); color: var(--accent-ink); }
.tt-tag.is-low { background: var(--surface-3); color: var(--ink-2); }
.tt-tag.is-off { border: 1px dashed var(--line-strong); color: var(--muted); }
.tt-step { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); flex: none; }
.tt-btn { width: 36px; height: 34px; border: 0; background: transparent; color: var(--ink); font-size: 17px; cursor: pointer; touch-action: manipulation; }
.tt-btn:active { background: var(--surface-3); }
.tt-n { width: 40px; height: 34px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: transparent; color: var(--ink); text-align: center; font-size: 16px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.tt-n::-webkit-outer-spin-button, .tt-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 760px) { .tt-grid { grid-template-columns: minmax(0, 1fr); } }
/* 成長グラフ・カルテの「目的」の行 */
.tt-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tt-line-l { display: flex; flex-direction: column; min-width: 0; }
.tt-line .btn { flex: none; }
/* 部位のバランス（種目を追加するとき）：人体図と色の説明と、目安の設定のボタンだけ */
.bal-panel { display: grid; gap: 8px; }
.bal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bal-head b { font-size: 14px; }
.bal-title { display: grid; gap: 1px; min-width: 0; }
.bal-goal { font-size: 12px; color: var(--ink-2); }
.bal-set { flex: none; gap: 4px; }
.bal-set svg { width: 15px; height: 15px; }
.bal-body { justify-content: center; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 18px; }
.bal-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.bal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bal-legend .s-lack { background: var(--critical); }
.bal-legend .s-low { background: var(--warning); }
.bal-legend .s-ok { background: var(--good); }
.bal-legend .s-high { background: var(--series-1); }
.bal-legend .s-off { background: var(--surface-3); border: 1px dashed var(--line-strong); }
.bal-body .m.s-off { fill: var(--surface-3); stroke-dasharray: 2 2; stroke: var(--line-strong); cursor: pointer; }
.bal-body .m.is-focus { stroke: var(--ink); stroke-width: 4; }
.tt-grid { max-width: 820px; }

/* ===================== トレーニングノート（お客様の記録・週の目標） ===================== */
:root {
  --self: var(--series-1);
  --self-soft: color-mix(in srgb, var(--series-1) 13%, var(--surface));
  --cardio: var(--series-4); /* トレーニングカレンダーの有酸素（パーソナルの朱・ピラティスの青緑・自分の記録の青と見分ける山吹） */
}
.mt-4 { margin-top: 4px; }
.clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.self { background: var(--self-soft); color: var(--self); }
.chip.new { background: var(--accent); color: #fff; font-size: 10px; padding: 1px 6px; letter-spacing: .06em; margin-left: 6px; }
.cal i.s { background: var(--self); }
.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--self); margin-left: 6px; vertical-align: middle; }

/* 中央の「記録する」タブ（押すとトレーニングの記録の画面へ） */
.tabbar .tab-record { color: var(--ink-2); }
.tab-plus {
  display: grid; place-items: center; width: 34px; height: 26px; border-radius: 9px;
  background: var(--ink); color: var(--surface); transition: transform .15s;
}
.tabbar .tab-record svg { width: 18px; height: 18px; }
.tabbar .tab-record.is-active .tab-plus { background: var(--accent); }
.tabbar .tab-record:active .tab-plus { transform: scale(.94); }

/* 週の記録：曜日ごとの印と目標のピップ */
.week-pace { display: grid; gap: 14px; }
.wp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wp-day {
  display: grid; justify-items: center; gap: 6px; padding: 7px 0 8px; border-radius: 10px;
  background: var(--surface-2); min-height: 58px; align-content: start;
}
.wp-day .wd { font-size: 11px; color: var(--muted); font-weight: 600; }
.wp-day.is-today { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); }
.wp-day.is-today .wd { color: var(--ink); }
.wp-day.is-future { background: transparent; border: 1px dashed var(--line); }
.wp-day .marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 34px; }
.m-gym, .m-self, .m-weigh { display: inline-block; width: 10px; height: 10px; flex: none; }
.m-gym { background: var(--accent); border-radius: 3px; }
.m-self { background: var(--self); border-radius: 50%; }
.m-weigh { border: 2px solid var(--ink-2); border-radius: 50%; }
.wp-goals { display: grid; gap: 8px; }
.wp-goal { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; }
.wp-goal .lb { display: flex; align-items: center; gap: 7px; color: var(--ink-2); min-width: 0; }
.wp-goal .pips { display: flex; gap: 4px; }
.wp-goal .pips b { width: 16px; height: 8px; border-radius: 4px; background: var(--surface-3); }
.wp-goal:has(.m-gym) .pips b.on { background: var(--accent); }
.wp-goal:has(.m-self) .pips b.on { background: var(--self); }
.wp-goal:has(.m-weigh) .pips b.on { background: var(--ink-2); }
.wp-goal .pips b.extra { opacity: .55; }
.wp-goal .ct { min-width: 64px; text-align: right; color: var(--muted); font-size: 12px; }
.wp-goal .ct b { color: var(--ink); font-size: 15px; }
.wp-goal .ok { color: var(--good); font-weight: 700; }
.wp-legend { display: flex; gap: 14px; }
.wp-legend span { display: flex; align-items: center; gap: 5px; }
.wp-cheer { font-size: 13px; font-weight: 600; color: var(--good); }
.week-pace.is-compact { gap: 10px; }
.week-pace.is-compact .wp-day { min-height: 44px; padding: 5px 0 6px; gap: 4px; }
.week-row { display: grid; gap: 6px; max-width: 520px; }
@media (max-width: 420px) {
  .wp-goal { grid-template-columns: minmax(0, 1fr) auto; }
  .wp-goal .pips { grid-column: 1 / -1; grid-row: 2; }
  .wp-goal .pips b { flex: 1; max-width: 40px; }
}

.pace-card .card-title { margin-top: 2px; }

/* 体重のクイック入力 */
.qw-row { display: flex; gap: 10px; align-items: stretch; }
.qw-input { position: relative; flex: 1; min-width: 0; }
.qw-input .input { font-size: 22px; font-weight: 700; padding-right: 44px; height: 50px; letter-spacing: .02em; }
.qw-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.qw-row .btn { min-width: 96px; height: 50px; }
.pace-card .qw-row .qw-input .input { font-size: 17px; height: 44px; }
.pace-card .qw-row .btn { height: 44px; }

/* トレーニングの記録の開始 */
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.start-grid form { display: contents; }
.start-btn {
  display: grid; justify-items: start; gap: 2px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font: inherit; transition: border-color .15s, transform .1s;
}
.start-btn svg { width: 20px; height: 20px; color: var(--self); margin-bottom: 4px; }
.start-btn b { font-size: 15px; }
.start-btn span { font-size: 12px; color: var(--muted); }
.start-btn:hover { border-color: var(--self); }
.start-btn:active { transform: scale(.98); }
.menu-list { display: grid; gap: 8px; margin-top: 8px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--self-soft); }
.menu-row .btn { flex: none; }
@media (max-width: 480px) { .menu-row { flex-wrap: wrap; } .menu-row .btn { width: 100%; } }
.resume-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.resume-row .small { color: var(--self); font-weight: 600; }

/* コメント */
.comment-card { display: block; }
.comment-card .who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-2); }
.comment-card p { font-size: 14px; }
.note-box.self-note { background: var(--self-soft); }
.note-box.advice { background: var(--self-soft); }
.note-box.advice summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.note-box.advice[open] summary { margin-bottom: 8px; }
.note-box.advice summary::after { content: '（タップで開く）'; font-weight: 400; }
.note-box.advice[open] summary::after { content: ''; }
.self-comment { margin-top: 12px; display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--self) 35%, var(--line)); }
.self-comment .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.self-comment .textarea { min-height: 60px; }

/* 週の目標の入力 */
.goal-input { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.goal-input .select { min-height: 36px; padding: 4px 26px 4px 10px; width: auto; flex: 1; }

/* お客様の記録の入力画面 */
body.is-self .editor-meta.is-self { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 640px) { body.is-self .editor-meta.is-self { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.is-self .editor-meta.is-self > label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } }
.comment-card .who .grow { min-width: 0; flex: 1; }
.self-comment-edit summary { list-style: none; cursor: pointer; position: relative; padding-right: 40px; }
.self-comment-edit summary::-webkit-details-marker { display: none; }
.self-comment-edit .edit-link { position: absolute; right: 0; top: 0; color: var(--self); font-weight: 600; }
.self-comment-edit[open] .edit-link { display: none; }
.self-comment-edit .self-comment { border: 0; padding: 0; margin-top: 10px; }

/* 確認ダイアログ（ブラウザ標準の confirm の代わり） */
.confirm-box {
  position: fixed; z-index: 95; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(360px, calc(100% - 32px)); padding: 22px 20px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: fade .15s;
}
.confirm-msg { font-size: 16px; font-weight: 700; line-height: 1.6; }
.confirm-box .small { margin-top: 4px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-actions .btn { min-width: 96px; justify-content: center; }
.btn.danger-fill { background: #c0302f; border-color: #c0302f; color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.05); }

/* 種目の追加（スマホで一覧を広く使う） */
.sheet.picker .pick-items { margin-top: 12px; scroll-margin-top: 8px; }
@media (max-width: 899px) {
  .sheet.picker { height: 94dvh; max-height: 94dvh; }
}
@media (max-width: 600px) {
  /* iPhone で入力欄を押したときに画面が拡大されないように */
  .input, .select, .textarea { font-size: 16px; }
  .sheet.picker .sheet-head { padding: 10px 14px; }
  .sheet.picker .sheet-search { padding: 8px 12px; gap: 8px; }
  .sheet.picker .sheet-search .input { min-height: 40px; padding: 7px 12px; }
  .sheet.picker .sheet-body { padding: 10px 12px 28px; }
  .sheet.picker .bal-panel { padding: 8px 10px; }
  .sheet.picker .pick-list { grid-template-columns: 1fr; gap: 6px; }
  .sheet.picker .pick-item { min-height: 54px; padding: 10px 14px; align-content: center; }
  .sheet.picker .pick-item .n { font-size: 15px; }
  .sheet.picker .pick-item .m { font-size: 12px; }
  .sheet.picker .pick-equip button { min-height: 40px; font-size: 14px; }
}

/* カルテ入力（スマホ）：上部をコンパクトに */
.meta-compact { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: end; }
.meta-fold { min-width: 0; }
.meta-fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
}
.meta-fold summary::-webkit-details-marker { display: none; }
.meta-fold summary .ms { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-fold[open] { grid-column: 1 / -1; }
.meta-fold[open] summary .xsmall::after { content: "（閉じる）"; }
.meta-fold .editor-meta { margin-top: 8px; }
.meta-compact .input { min-height: 38px; padding: 6px 10px; }
@media (max-width: 600px) {
  .part-recency { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .part-recency::-webkit-scrollbar { display: none; }
  .part-recency .chip { flex: none; }
  .ex-foot { flex-wrap: nowrap; gap: 2px; padding: 4px 8px 10px; }
  .ex-foot .btn.sm { padding: 0 9px; }
  .hide-sm { display: none; }
}
/* 幅 320px くらいの電話では、種目の下のボタン（＋セット・−セット・メモ・設定・履歴）がカードの右からはみ出していた（2026-11-29） */
@media (max-width: 359px) { .ex-foot .btn.sm { padding: 0 6px; gap: 4px; } .ex-foot { padding-left: 6px; padding-right: 6px; } }
.meta-compact > * { min-width: 0; }
.meta-fold .editor-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meta-fold .editor-meta > label:nth-child(3) { grid-column: 1 / -1; }
.meta-fold .editor-meta .input, .meta-fold .editor-meta .select { min-width: 0; width: 100%; }
.editor-head { grid-template-columns: minmax(0, 1fr); }
.editor-head > * { min-width: 0; }

/* お客様画面（スマホ）：コンパクトな記録の行 */
.srow-list { display: grid; gap: 8px; }
.srow {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: inherit; transition: border-color .15s, transform .1s;
}
.srow:active { transform: scale(.99); }
.srow:hover { border-color: var(--line-strong); }
.srow-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.srow-date { font-weight: 700; font-size: 16px; }
.srow-side { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.srow-side b { color: var(--ink); font-size: 14px; }
.srow-src { margin-top: 4px; }
.srow-meta { font-size: 12px; color: var(--muted); }
.srow-ex { font-size: 14px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow-note { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin-top: 2px; }
.srow-note .k { font-size: 11px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.srow.is-self .srow-note { background: var(--self-soft); }
.card .srow-list .srow { box-shadow: none; }

/* ホーム：目標を名前の下に */
.my-goal { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.my-goal span { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; }
.comment-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 記録する：始め方のボタンは横に2つ */
@media (max-width: 600px) {
  .start-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .start-btn { padding: 12px; }
  .start-btn b { font-size: 14px; }
}

/* 写真の追加：大きなボタンとプレビュー */
.photo-pick {
  position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 16px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--surface-2);
}
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.photo-pick:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.pp-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--surface); }
.pp-icon svg { width: 22px; height: 22px; }
.pp-text { display: grid; gap: 2px; }
.pp-text b { font-size: 15px; }
.pp-text small { font-size: 12px; color: var(--muted); }
.pp-preview { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pp-preview:empty { display: none; }
.pp-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
@media (max-width: 600px) { .pp-submit { flex: 1; height: 46px; } }
.srow-note { display: flex; gap: 6px; align-items: baseline; -webkit-line-clamp: unset; }
.srow-note .k { flex: none; margin-right: 0; }
.srow-note .t { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 種目の見出し：スマホでは操作を「…」にまとめる */
.ex-head .act-more { display: none; }
.ex-head .act-more.keep { display: inline-flex; }
.block-menu button:disabled { opacity: .35; cursor: default; }
@media (max-width: 600px) {
  .ex-head { gap: 8px; padding: 12px 8px 4px 12px; align-items: flex-start; }
  .ex-head .order { margin-top: 1px; }
  .ex-head .act-full { display: none; }
  .ex-head .act-more { display: inline-flex; margin: -4px 0 0 auto; }
  .ex-head .title .name { font-size: 16px; line-height: 1.35; }
  .ex-head .title .meta { margin-top: 1px; }
  .ex-prev { padding: 2px 12px 8px 44px; gap: 2px 10px; }
}

/* セットの入力（スマホ）：指で押しやすい大きさに */
.stepper button { -webkit-user-select: none; user-select: none; }
.stepper input.long { font-size: 15px; letter-spacing: -.02em; }
@media (max-width: 600px) {
  .sets { padding: 0 6px 4px; }
  .set-row, .set-head { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 6px; }
  .set-row { padding: 4px; }
  .set-head { padding: 0 4px 2px; font-size: 10px; }
  .set-no { height: 44px; width: 30px; border-radius: 10px; font-size: 14px; }
  .stepper { height: 44px; border-radius: 12px; }
  .stepper button { width: 38px; font-size: 22px; color: var(--ink-2); }
  .stepper input { font-size: 18px; padding: 0; }
  .stepper input.long { font-size: 15px; }
  .done-btn { width: 44px; height: 44px; border-radius: 12px; }
  .done-btn svg { width: 22px; height: 22px; }
  .pr-badge { right: 50px; }
  .set-row.pilates, .set-head.pilates { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.15fr) 46px 44px; gap: 5px; }
  .set-row.pilates .plain-input { height: 44px; }
  .set-row.pilates .stepper button { width: 30px; }
  body.is-typing .editor-bar { display: none; }
}
/* 補助あり：「済」の右のチェック */
.set-head.has-assist, .set-row.has-assist { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 46px 46px; }
.assist-btn {
  height: 38px; width: 42px; padding: 0; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--muted); cursor: pointer; justify-self: end;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.assist-btn svg { width: 20px; height: 20px; }
.assist-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 600px) {
  .set-head.has-assist, .set-row.has-assist { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 40px 36px; gap: 4px; }
  .set-row.has-assist .stepper button { width: 32px; }
  .set-row.has-assist .done-btn { width: 40px; }
  .assist-btn { width: 36px; height: 44px; border-radius: 12px; }
  .assist-btn svg { width: 20px; height: 20px; }
}
/* 左右べつ（片側ずつの種目。2026-11-29 社長）：1セット＝先にやる側（上の段）ともう片方（下の段） */
.ex-head .meta .uni-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700; line-height: 20px; vertical-align: middle; white-space: nowrap; }
/* 左右の色：左＝藍・右＝赤茶。字と札だけに使い、枠や背景には使わない（2026-11-29 社長「もう少しまとまりがある見た目」） */
:root { --side-l: #3949ab; --side-r: #9c4f2a; --side-l-soft: #e7e9f5; --side-r-soft: #f5e7de; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --side-l: #a3adf2; --side-r: #e6a682; --side-l-soft: #272b45; --side-r-soft: #3b291f; } }
:root[data-theme="dark"] { --side-l: #a3adf2; --side-r: #e6a682; --side-l-soft: #272b45; --side-r-soft: #3b291f; }
/* 案A：左右の2段を1つのかたまりに。上に「1セット目 [左][右]」の見出し、行の頭は同じ色の札（ほかの記録のカードと同じ地の色・細い線・角丸） */
.uni-pair { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 2px 0 3px; margin: 6px 0 8px; }
.uni-pair .set-row { padding-top: 3px; padding-bottom: 3px; }
.uni-pair .set-row.is-done { background: transparent; }
.pair-tag { display: flex; align-items: center; gap: 8px; padding: 5px 10px 2px; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 18px; white-space: nowrap; }
.pair-lr { display: inline-flex; gap: 3px; }
.pair-lr b, .set-no.uni, .rl-side { font-weight: 800; }
.pair-lr b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }
.pair-lr .sd-l, .set-no.uni.side-L, .rl-side.side-L { background: var(--side-l-soft); color: var(--side-l); }
.pair-lr .sd-r, .set-no.uni.side-R, .rl-side.side-R { background: var(--side-r-soft); color: var(--side-r); }
.set-no.uni { display: grid; place-items: center; padding: 0; border: 0; font-size: 14px; }
/* 左右べつの組の「PR」は、行の頭の札の中（上のほう）に収め、札の字は下へずらす。
   前は札の字に重なり、組の枠の左へはみ出していた（2026-11-29 社長「PRのラベルが右って時にへんな重なり方」「はみ出てる」） */
.uni-pair .pr-badge { left: 7px; top: 10px; width: 38px; padding: 1px 0; text-align: center; letter-spacing: .02em; border-radius: 6px; }
.uni-pair .set-row:has(.pr-badge) .set-no.uni { padding-top: 15px; }
/* 表示の中の左右の字（前回・この日の結果・カルテの一覧・履歴） */
.sd-l { color: var(--side-l); font-weight: 700; }
.sd-r { color: var(--side-r); font-weight: 700; }
.set-row.is-skip .stepper { opacity: .45; }
.set-row.is-skip .stepper input::placeholder { color: transparent; }
/* 成長グラフの左右べつ：差のひとこと・回数別ベストの弱いほう */
.side-gap { font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; color: var(--ink-2); margin: 0 0 12px; }
.repbest td.weak b { color: var(--serious); }
/* ピラティス：スプリング・回数・左右・済・補助 */
.set-row.pilates.has-assist, .set-head.pilates.has-assist { grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) 46px 46px; }
@media (max-width: 600px) {
  .set-row.pilates.has-assist, .set-head.pilates.has-assist { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.1fr) 42px 38px 34px; gap: 4px; }
  .set-row.pilates.has-assist .stepper button { width: 26px; }
  .set-row.pilates.has-assist .done-btn { width: 38px; }
  .set-row.pilates.has-assist .assist-btn { width: 34px; }
}
/* 自己ベストの印は、数字や＋ボタンに重ならないようにセット番号の上に出す */
.pr-badge { left: 0; right: auto; top: -7px; padding: 1px 6px; }
@media (max-width: 600px) { .pr-badge { left: -2px; right: auto; font-size: 9px; } }
@media (max-width: 600px) { .uni-pair .pr-badge { left: 5px; top: 7px; width: 28px; } .uni-pair .set-row:has(.pr-badge) .set-no.uni { padding-top: 19px; } }
/* 幅 320px くらいの電話では、数字の枠の −／＋ が広く、「20」が「2」に切れていた。−／＋ を細くして数字の場所をあける（2026-11-29） */
@media (max-width: 359px) { .set-row .stepper button, .set-row.has-assist .stepper button { width: 22px; font-size: 18px; } }

/* マインドマップ：ツールバーを1行に。スマホでは上から下に伸ばして表示 */
.mm-actions, .mm-end { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mm-page { display: flex; position: relative; top: auto; height: min(72vh, 760px); border: 1px solid var(--line); }
.mm-panel.is-overlay { height: 100dvh !important; border-radius: 0 !important; }
.mm-help-touch { font-size: 11px; color: var(--muted); padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 600px) {
  .mm-toolbar { flex-wrap: nowrap; gap: 4px; padding: 6px 8px; position: relative; }
  .mm-toolbar .title { margin-right: 0; flex: none; }
  .mm-toolbar .mm-title-text { display: none; }
  .mm-toolbar .mm-status { position: absolute; left: 12px; top: calc(100% + 6px); z-index: 5; font-size: 11px; pointer-events: none; }
  .mm-actions { flex: 1; min-width: 0; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent); }
  .mm-actions::-webkit-scrollbar { display: none; }
  .mm-actions .btn.sm, .mm-end .btn.sm { flex: none; height: 38px; padding: 0 11px; }
  .mm-end { flex: none; flex-wrap: nowrap; gap: 2px; }
  .mm-canvas .mind-elixir-toolbar.lt { display: none; }
  .mm-canvas .mind-elixir-toolbar.rb { bottom: 12px; right: 12px; }
  .mm-page { height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 32px - env(safe-area-inset-bottom)); min-height: 380px; }
  body.mm-full .tabbar, body.mm-full .app-header { visibility: hidden; }
}
.mm-page { scroll-margin-top: calc(var(--header-h) + 8px); }
.mm-canvas .map-container:focus, .mm-canvas .map-container:focus-visible { outline: none; }
@media (max-width: 600px) { .mm-actions .btn.sm { padding: 0 9px; } }
@media (max-width: 600px) {
  /* 保存の状態はマップの左下に小さく（話題に重ならないように） */
  .mm-toolbar { position: static; }
  .mm-toolbar .mm-status { top: auto; bottom: 48px; left: 12px; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 6px; border-radius: 6px; }
}
.mm-canvas .map-container:focus, .mm-canvas .map-container:focus-visible { box-shadow: none !important; }

/* 成長グラフ（スマホ） */
.pr-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 10px 0 2px; list-style: none; }
.pr-more summary::-webkit-details-marker { display: none; }
.pr-more summary::before { content: "▸ "; color: var(--muted); }
.pr-more[open] summary::before { content: "▾ "; }
.sec { scroll-margin-top: calc(var(--header-h) + 60px); }
/* 成長グラフの上のタブ（まとめ／筋トレ／有酸素／ピラティス）：今のタブの中身だけ出す（partials/progress_tabs.php・ui.js） */
[data-ptab-current="summary"] [data-ptab]:not([data-ptab="summary"]),
[data-ptab-current="strength"] [data-ptab]:not([data-ptab="strength"]),
[data-ptab-current="cardio"] [data-ptab]:not([data-ptab="cardio"]),
[data-ptab-current="pilates"] [data-ptab]:not([data-ptab="pilates"]) { display: none !important; }
.ptabs-wide { display: flex; width: 100%; flex-wrap: nowrap; }
.ptabs-wide button { flex: 1; }
.sec-nav {
  position: sticky; top: var(--header-h); z-index: 30; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -14px 14px; padding: 8px 14px; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav a { flex: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sec-nav a.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.badge-scroll { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; margin: 0 -4px; scroll-snap-type: x proximity; }
.badge-scroll::-webkit-scrollbar { display: none; }
.badge-scroll .badge { flex: none; width: 88px; scroll-snap-align: start; }
@media (max-width: 600px) {
  .prog-grid { gap: 14px; }
  .prog-grid .sec-exercise { order: 1; }
  .prog-grid .sec-weekly { order: 2; }
  .prog-grid .sec-cardio { order: 3; }
  .prog-grid .sec-cweekly { order: 4; }
  .prog-grid .sec-swimcmp { order: 5; }
  .prog-grid .sec-parts { order: 6; }
  .prog-grid .sec-prs { order: 7; }
  .prog-grid .sec-growth { order: 8; }
  .chart-box.h300, .chart-box.h260 { height: 230px; }
  .growth-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 3.9em; gap: 8px; }
  .growth-row .n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .pr-item { grid-template-columns: 3.6em minmax(0, 1fr) auto; gap: 8px; font-size: 13px; }
  .ex-summary { gap: 10px 18px; }
  .card-head .small.muted { font-size: 11px; }
}
/* お客様ページ（スマホ）：カルテ履歴以外のタブでは、上のお客様情報を短く */
@media (max-width: 600px) {
  .cust-card.is-sub .cust-extra, .cust-card.is-sub .cust-plans { display: none !important; }
  .cust-card.is-sub .cust-details.no-caution { display: none; }
  .cust-card.is-sub .cust-head { padding-bottom: 12px; }
}

/* マイページ（ダッシュボード） */
.dash-booking .db-main { font-size: 20px; font-weight: 700; margin-top: 6px; }
.dash-booking .db-next { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dash-booking .db-next span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.dash-tickets .ticket { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.dash-tickets .ticket:first-of-type { border-top: 0; padding-top: 4px; }
.tk-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.tk-name .chip { flex: none; }
.tk-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tk-count b { font-size: 28px; line-height: 1; }
.tk-count b.zero { color: var(--muted); }
.tk-count small { font-size: 13px; margin-left: 2px; }
.tk-pips { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-pips i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); background: var(--accent); }
.tk-pips i.used { background: transparent; border-color: var(--line-strong); }
.dash-homework { display: block; background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.dash-homework p { font-weight: 600; }
.dash-body { display: block; }
.db-weight { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; }
.db-weight .k { font-size: 12px; color: var(--muted); width: 100%; }
.db-weight .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.db-weight .v small { font-size: 14px; margin-left: 2px; }
.db-diff { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.db-diff small { font-weight: 500; color: var(--muted); font-size: 11px; }

/* 体重のかんたん入力：日付などは「くわしく」に */
.qw-more { margin-top: 10px; }
.qw-more summary { cursor: pointer; font-size: 12px; color: var(--ink-2); font-weight: 600; list-style: none; }
.qw-more summary::-webkit-details-marker { display: none; }
.qw-more summary::before { content: "＋ "; color: var(--muted); }
.qw-more[open] summary::before { content: "－ "; }
.quick-weight .qw-input { max-width: 320px; }
/* 文の中の小さなアイコン（「✓ 今日は記録済みです」など） */
.i-inline { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
@media (max-width: 600px) { .quick-weight .qw-input { max-width: none; } }

/* メニューの新着の印 */
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; vertical-align: 6px; }
.tab-ic { position: relative; display: inline-flex; }
.tab-ic .nav-dot { position: absolute; top: -1px; right: -4px; margin: 0; box-shadow: 0 0 0 2px var(--surface); }

/* ===================== チャット ===================== */
body.is-chat .page { padding: 0; max-width: none; }
body.is-chat .tabbar { display: none; }
.chat { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: calc(100dvh - var(--header-h)); background: var(--surface); }
.chat.with-thread { grid-template-columns: 220px minmax(0, 1fr) minmax(320px, 400px); }
.chat-side { border-right: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; padding: 12px 8px; }
.cs-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; font-size: 13px; color: var(--muted); }
.cs-list { display: grid; gap: 2px; }
.cs-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.cs-item:hover { background: var(--surface-3); }
.cs-item.on { background: var(--ink); color: var(--surface); }
.cs-item.unread { font-weight: 700; color: var(--ink); }
.cs-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.chat-ch-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 17px; color: var(--ink); cursor: pointer; position: relative; padding: 4px 2px; }
.chat-ch-btn svg { width: 16px; height: 16px; color: var(--muted); }
.chat-ch-btn .nav-dot { position: absolute; top: 2px; right: -8px; }
.chat-desc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 12px; overscroll-behavior: contain; }
.chat-more { text-align: center; padding: 6px; }
.chat-empty { padding: 40px 20px; text-align: center; color: var(--muted); display: grid; gap: 6px; }
.chat-empty strong { color: var(--ink); font-size: 17px; }
.chat-day { display: flex; align-items: center; gap: 10px; margin: 14px 14px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-day span { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chat-unread { display: flex; align-items: center; gap: 8px; margin: 8px 14px; color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.chat-unread::before { content: ""; flex: 1; height: 1px; background: var(--accent); }
.cm { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 6px 14px; }
.cm.compact { padding-top: 1px; padding-bottom: 1px; }
.cm:hover { background: var(--surface-2); }
.cm.pinned { background: color-mix(in srgb, var(--warning-soft) 45%, transparent); }
.cm.flash { animation: cmflash 1.6s ease-out; }
@keyframes cmflash { from { background: var(--accent-soft); } }
.cm-side .avatar { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
.cm-time-sm { display: block; text-align: right; font-size: 10px; color: var(--muted); padding-top: 4px; opacity: 0; }
.cm.compact:hover .cm-time-sm { opacity: 1; }
.cm-head { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.cm-time { font-size: 11px; color: var(--muted); }
.cm-pin { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--warning); font-weight: 600; }
.cm-pin svg { width: 12px; height: 12px; }
.cm-text { font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-text a { color: var(--series-1); text-decoration: underline; }
.cm-edited { font-size: 11px; color: var(--muted); }
.cm.deleted .cm-text { font-style: italic; font-size: 13px; }
.cm-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cm-react { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; cursor: pointer; }
.cm-react b { font-size: 12px; color: var(--ink-2); }
.cm-react.mine { border-color: var(--series-1); background: color-mix(in srgb, var(--series-1) 12%, var(--surface)); }
.cm-thread { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 3px 8px 3px 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 12px; color: var(--series-1); cursor: pointer; }
.cm-thread:hover { border-color: var(--line); background: var(--surface); }
.cm-thread .muted { color: var(--muted); font-weight: 400; }
.cm-repliers { display: inline-flex; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; border-radius: 6px; margin-right: -4px; box-shadow: 0 0 0 2px var(--surface); }
.cm-tools { position: absolute; top: -12px; right: 14px; display: none; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.cm-tools button { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 7px; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.cm-tools button:hover { background: var(--surface-3); }
.cm-tools svg { width: 17px; height: 17px; }
@media (hover: hover) { .cm:hover .cm-tools { display: flex; } }
.cm-editbox { display: grid; gap: 6px; margin-top: 4px; }
.chat-compose { display: grid; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.cc-row { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.chat-compose .textarea { min-height: 42px; max-height: 160px; resize: none; padding: 10px 12px; line-height: 1.45; }
.chat-compose .btn.icon { width: 44px; height: 42px; flex: none; }
.chat-compose .cc-attach { width: 40px; color: var(--ink-2); }
.chat-compose .cc-attach svg { width: 22px; height: 22px; }
/* 送る前の画像 */
.cc-files { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 2px; scrollbar-width: none; }
.cc-files::-webkit-scrollbar { display: none; }
.cc-file { position: relative; flex: none; width: 64px; height: 64px; }
.cc-file img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.cc-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--surface); background: var(--ink); color: var(--surface); display: grid; place-items: center; padding: 0; cursor: pointer; }
.cc-x svg { width: 12px; height: 12px; }
.cc-more { flex: none; width: 64px; height: 64px; border-radius: 10px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.cc-more svg { width: 20px; height: 20px; }
.cc-status { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.cc-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.cc-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s; }
.cc-status.indeterminate .cc-bar i { width: 35%; animation: ccload 1.1s ease-in-out infinite; }
@keyframes ccload { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.chat-main.is-drop, .chat-thread.is-drop { outline: 2px dashed var(--accent); outline-offset: -6px; }
/* メッセージの画像 */
.cm-images { display: grid; gap: 4px; margin-top: 6px; max-width: 360px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cm-images.n2, .cm-images.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 300px; }
.cm-images.one { display: block; }
.cm-img { display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.cm-images:not(.one) .cm-img { aspect-ratio: 1; }
.cm-images.one .cm-img { max-width: 100%; }
.cm-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pin-imgs { display: flex; gap: 4px; margin-top: 6px; }
.pin-imgs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cp-img { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; color: var(--ink-2); font-weight: 600; vertical-align: -2px; }
.cp-img svg { width: 15px; height: 15px; }
/* 画像の拡大表示 */
.img-viewer { position: fixed; inset: 0; z-index: 100; background: #0c0c0a; display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fade .2s; }
.iv-bar { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 16px; color: #fff; }
.iv-count { font-size: 13px; font-variant-numeric: tabular-nums; opacity: .85; }
.iv-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.iv-btn:hover { background: rgba(255, 255, 255, .2); }
.iv-btn svg { width: 22px; height: 22px; }
.iv-stage { position: relative; min-height: 0; overflow: hidden; }
.iv-stage img { position: absolute; inset: 0 12px calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 24px); height: calc(100% - 16px - env(safe-area-inset-bottom)); object-fit: contain; user-select: none; -webkit-user-drag: none; }
@media (pointer: fine) { .iv-stage img { inset-inline: 64px; width: calc(100% - 128px); } }
.iv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.iv-nav svg { width: 26px; height: 26px; }
.iv-nav.prev { left: 10px; }
.iv-nav.next { right: 10px; }
@media (pointer: coarse) { .iv-nav { display: none; } }
.chat-newpill { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 5; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-lg); cursor: pointer; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.ct-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 52px; }
.ct-head .btn { margin-left: auto; }
.ct-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0; }
.ct-count { margin: 6px 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.emoji-pop { position: fixed; z-index: 90; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.emoji-pop button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; font-size: 19px; cursor: pointer; }
.emoji-pop button:hover { background: var(--surface-3); }
.chat-actions { display: grid; gap: 2px; }
.as-emojis { display: flex; justify-content: space-between; gap: 4px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.as-emojis button { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 22px; cursor: pointer; }
.as-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 6px; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; text-align: left; border-radius: 10px; }
.as-item:hover, .as-item.on { background: var(--surface-2); }
.as-item svg { width: 20px; height: 20px; color: var(--ink-2); }
.as-item.danger, .as-item.danger svg { color: var(--critical); }
.chat-newch { display: grid; gap: 6px; }
.pin-item { padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
/* ホームのチャット */
.chat-preview { display: grid; gap: 10px; color: inherit; }
.cp-row { display: flex; gap: 10px; align-items: flex-start; }
.cp-row .avatar.sm { flex: none; }
.cp-body { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
@media (max-width: 899px) {
  .chat, .chat.with-thread { grid-template-columns: minmax(0, 1fr); }
  .chat-side { display: none; }
  .chat-thread { position: fixed; inset: var(--header-h) 0 0 0; z-index: 70; border-left: 0; }
  .chat-top { padding: 6px 10px; }
  .cm { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 6px 12px; }
  .cm-side .avatar { width: 34px; height: 34px; }
  .cm-time-sm { opacity: 1; }
  .chat-newpill { bottom: 80px; }
}

/* カウンセリングシート（ALMS の同意書） */
.cn-head { align-items: flex-start; }
.cn-head .card-title { white-space: normal; }
.cn-meta { margin-top: 4px; }
.cn-sec { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 2px; letter-spacing: .02em; }
.cn-sec:first-of-type { margin-top: 4px; }
.qa { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.qa > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.qa dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.qa dd { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cn-chips .chip { white-space: normal; height: auto; min-height: 26px; padding-top: 3px; padding-bottom: 3px; line-height: 1.4; }
.cn-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.cn-older { margin-bottom: 16px; }
.cn-older > summary { cursor: pointer; padding: 10px 4px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
/* カルテの「初回カウンセリング」（要点だけ。全部の答えとマインドマップは、カウンセリングのタブ） */
.cn-first > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cn-first > summary::-webkit-details-marker { display: none; }
.cn-first > summary::after { content: '開く'; flex: none; font-size: 12px; color: var(--muted); }
.cn-first[open] > summary::after { content: 'とじる'; }
.cn-first > summary .grow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.cn-first-goals { flex-basis: 100%; margin-top: 4px; }
.cn-first-body { padding: 0 16px 14px; }
.cn-first-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* 同じ方かもしれない記録 */
.cust-dupe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cust-dupe-row .grow { min-width: 200px; }
.cn-unmatched { display: grid; gap: 10px; }
.cn-unmatched form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 599px) {
  .qa > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 0; }
  .cn-unmatched form { grid-template-columns: minmax(0, 1fr) auto; }
  .cn-unmatched form .cn-who { grid-column: 1 / -1; }
}

/* 設定：パーソナルの予約 */
.booking-alms { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.booking-alms b { width: 100%; color: var(--ink); font-size: 13px; }
.booking-hours { display: grid; gap: 6px; }
.bh-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.bh-row .input { min-width: 0; padding-left: 8px; padding-right: 6px; }
.bs-shift { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
/* フェーズの棒（時間軸の上に、始まり〜終わり） */
.pbar { --c: var(--accent); position: relative; height: 12px; border-radius: 6px; background: var(--surface-3); }
.pbar.up { --c: var(--phase-up); }
.pbar.flat { --c: var(--teal); }
.pbar-all, .pbar-done { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.pbar-all { background: color-mix(in srgb, var(--c) 28%, var(--surface)); }
.pbar.open .pbar-all { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 28%, var(--surface)) 70%, transparent); }
.pbar-done { background: var(--c); }
.pbar.past { opacity: .45; }
.pbar-today { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
/* フェーズ（全員） */
.ph-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ph-stat { display: grid; gap: 2px; padding: 10px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; color: var(--ink); text-align: center; cursor: pointer; }
.ph-stat .k { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ph-stat .v { font-size: 22px; font-weight: 700; line-height: 1.1; }
.ph-stat .v small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.ph-stat.down .k { color: var(--accent-ink); } .ph-stat.up .k { color: var(--phase-up); } .ph-stat.flat .k { color: var(--teal); }
.ph-stat.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ph-axis { position: relative; height: 18px; margin-bottom: 4px; font-size: 10.5px; color: var(--muted); }
.ph-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ph-axis span:not(.today)::after { content: ""; position: absolute; left: 50%; top: 15px; height: 4px; border-left: 1px solid var(--line-strong); }
.ph-axis .today { color: var(--ink); font-weight: 700; }
.ph-rows { display: grid; }
.ph-row { display: grid; gap: 6px; padding: 10px 0 12px; border-top: 1px solid var(--line); color: var(--ink); }
.ph-row[hidden] { display: none; }
.ph-row:hover .ph-name { text-decoration: underline; }
.ph-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ph-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-type { flex: none; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: var(--accent-ink); background: var(--accent-soft); }
.ph-type.up { color: var(--phase-up); background: color-mix(in srgb, var(--phase-up) 14%, var(--surface)); }
.ph-type.flat { color: var(--teal); background: var(--teal-soft); }
.ph-left { margin-left: auto; flex: none; font-size: 13px; color: var(--ink-2); }
.ph-left b { font-size: 16px; color: var(--ink); }
.ph-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--ink-2); }
.ph-sub .status-line { font-size: 12px; }
@media (max-width: 600px) { .ph-stat .v { font-size: 20px; } }

/* 種目マスタ：お客様が追加した種目 */
.pick-own { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 10px; font-weight: 600; vertical-align: 2px; }
.ex-custom-actions { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.ex-merge { display: grid; gap: 6px; }
.ex-merge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ex-custom-actions > form:last-child { justify-self: start; }

/* 決済リンク */
.pay-btn { flex: none; white-space: nowrap; gap: 0; font-weight: 700; border-color: var(--accent); color: var(--accent-ink); background: var(--surface); }
.app-header .header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.pay-btn:hover { background: var(--accent-soft); }
.pl-sheet .sheet-body { padding-top: 4px; }
.pl-sheet-cat { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pl-sheet-list .pl-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pl-sheet-list .pl-item { padding: 8px 8px 8px 12px; }
.pl-sheet-list .pl-copy { min-height: 40px; }
.send-tabs { display: flex; width: 100%; }
.send-tabs button { flex: 1; text-align: center; }
.pl-sheet .pl-search { margin-bottom: 4px; }
.cs-box { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.cs-type { display: flex; width: 100%; }
.cs-type button { flex: 1; text-align: center; }
.cs-actions { display: flex; gap: 6px; flex: none; }
.cs-row .cs-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.cs-row .cs-info .pl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* QR コード：暗い画面でも白地に黒（読み取りやすさのため） */
.qr-wrap { display: grid; justify-items: center; gap: 10px; text-align: center; padding-bottom: 8px; }
.qr-box { width: min(280px, 78vw); padding: 10px; border-radius: 14px; background: #fff; line-height: 0; }
.qr-box svg { width: 100%; height: auto; display: block; }
.qr-url { max-width: 100%; overflow-wrap: anywhere; font-family: var(--mono); }
.pl-item .chip.sm { height: 18px; padding: 0 7px; font-size: 10.5px; margin-left: 6px; vertical-align: 2px; }
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-top { position: sticky; top: var(--header-h); z-index: 20; margin: 0 -16px; padding: 10px 16px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
/* スマホは画面の左右の余白が14pxなので、そこに合わせて端まで広げる（16pxだと横にはみ出す） */
@media (max-width: 860px) { .pl-top { margin: 0 -14px; padding-left: 14px; padding-right: 14px; } }
.pl-search { font-size: 16px; }
.pl-chips { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chips .chip { height: 30px; padding: 0 12px; font-size: 13px; color: var(--ink-2); flex: none; }
.pl-group { margin-top: 20px; scroll-margin-top: calc(var(--header-h) + 110px); }
.pl-group[hidden] { display: none; }
.pl-cat { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; }
.pl-list { padding: 0; overflow: hidden; }
.pl-item { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 14px; border-top: 1px solid var(--line); }
.pl-item:first-child { border-top: 0; }
.pl-item[hidden] { display: none; }
.pl-info { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; }
.pl-name { font-weight: 700; overflow-wrap: anywhere; }
.pl-price { font-weight: 700; white-space: nowrap; }
.pl-price small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.pl-url { grid-column: 1 / -1; font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.pl-copy { flex: none; min-width: 72px; min-height: 44px; }
/* 決済リンクの「追加」「変更」は編集中だけ出す（食事の目標の「変える」も .pl-edit なので、決済リンクの中だけに絞る） */
:is(.pl-head, .pl-item) .pl-edit { flex: none; display: none !important; }
.pl-editing :is(.pl-head, .pl-item) .pl-edit { display: inline-flex !important; }
.pl-how summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.pl-how ol { margin: 6px 0 0; padding-left: 1.3em; }

/* シフト：週の表 */
.wk { display: grid; gap: 8px; }
.wk-axis { position: relative; height: 14px; margin-left: 30px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.wk-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.wk-d { font-size: 13px; text-align: center; line-height: 20px; }
.wk-track { position: relative; min-height: 22px; border-radius: 6px; background-color: var(--surface-2);
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.wk-bar { position: absolute; height: 20px; padding: 0 6px; border: 0; border-radius: 5px; background: var(--ink-2); color: var(--surface);
  font: inherit; font-size: 11px; font-weight: 700; line-height: 20px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wk-bar.pilates { background: var(--teal); }
.wk-bar.personal { background: var(--accent); }
.wk-bar.both { background: var(--ink-2); }
.wk-empty { display: block; padding-left: 8px; font-size: 11px; line-height: 22px; color: var(--muted); }
.wk-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; color: var(--ink-2); }
.wk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wk-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--ink-2); }
.wk-legend i.pilates { background: var(--teal); } .wk-legend i.personal { background: var(--accent); }
/* 毎週のシフト：曜日ごとにピラティス（上）とパーソナル（下）の2段。名前はその時間の担当 */
.wk-day { display: grid; gap: 3px; min-width: 0; }
.wk-lane { position: relative; height: 20px; border-radius: 6px; background-color: var(--surface-2);
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.wk-day.is-closed .wk-lane { height: 43px; }
.wk-seg { position: absolute; top: 0; bottom: 0; padding: 0 6px; border-radius: 5px; color: var(--surface); font-size: 11px; font-weight: 700; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-day.is-closed .wk-seg { line-height: 43px; text-align: center; }
.wk-seg.pilates { background: var(--teal); }
.wk-seg.personal { background: var(--accent); }
.wk-seg.is-off { color: var(--muted); text-align: center; box-shadow: inset 0 0 0 1px var(--line-strong); }
.wk-seg.is-mine { font-weight: 800; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--surface) 70%, transparent); }
.wk-none { position: absolute; left: 8px; top: 0; font-size: 11px; line-height: 20px; color: var(--muted); }
/* だれもいない時間（予約を受けない） */
.wk-gap, .wk-seg.is-off, .wk-legend i.gap { background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 8px); }
.wk-gap { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 10px; font-weight: 700; color: var(--muted); pointer-events: none; overflow: hidden; }
.wk-legend i.gap { box-shadow: inset 0 0 0 1px var(--line-strong); }
span.wk-bar { cursor: default; opacity: .8; }
.wk-bar.is-mine { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.sf-person.is-static { cursor: default; }
.sf-person.is-static:hover { background: none; }
.sf-mine-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-mine-changes { display: grid; gap: 2px; margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.sf-log { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sf-log li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.confirm-box p.small { white-space: pre-line; }
/* シフト：スタッフ */
.sf-list { display: grid; border-top: 1px solid var(--line); }
.sf-person { display: grid; gap: 2px; width: 100%; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.sf-person:hover { background: var(--surface-2); }
.sf-top { display: flex; align-items: center; gap: 8px; }
.sf-top b { font-size: 15px; }
.sf-role { display: flex; width: 100%; }
.sf-role label { flex: 1; text-align: center; }
.sf-week { display: grid; gap: 6px; margin-top: 4px; }
.sf-day { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: start; }
.sf-on { display: block; cursor: pointer; }
.sf-on input { position: absolute; opacity: 0; pointer-events: none; }
.sf-on span { display: grid; place-items: center; height: 40px; border-radius: 10px; border: 1.5px solid var(--line-strong); font-weight: 700; color: var(--muted); }
.sf-on input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sf-on input:focus-visible + span { box-shadow: var(--ring); }
.sf-times { display: grid; gap: 4px; min-width: 0; }
.sf-day:not(:has(.sf-on input:checked)) .sf-times { opacity: .4; }
.sf-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.sf-range .input { min-width: 0; height: 40px; padding-left: 8px; padding-right: 6px; }
.sf-range[hidden] { display: none; }
.sf-slot { display: grid; gap: 4px; }
.sf-slot[hidden] { display: none; }
.sf-slot + .sf-slot { padding-top: 6px; border-top: 1px dashed var(--line); }
.sf-day:not(:has(.sf-on input:checked)) :is(.sf-slot-role, .sf-more) { display: none; }
.sf-slot-role { height: 34px; min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.sf-more { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.sf-form:has(.sf-always input:checked) .sf-owner-week { display: none; }
.sf-always { margin-bottom: 8px; }
.dc-form:not(:has(option[value="__other"]:checked)) .dc-other { display: none; }
.dc-form:not(:has(option[value="__sub_other"]:checked)) .dc-sub-other { display: none; }
.dc-form:has(input[value="off"]:checked) .dc-hours-opt { display: none; }

/* お休み・臨時の変更 */
.dc-list { display: grid; border-top: 1px solid var(--line); }
.dc-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dc-item b { margin-right: 6px; }
.dc-kind { display: flex; width: 100%; }
.dc-kind label { flex: 1; text-align: center; }
.dc-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 12px; }
.dc-field { display: grid; gap: 4px; min-width: 0; }
.dc-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.dc-range .input { min-width: 0; padding-left: 8px; padding-right: 6px; }
.dc-form:has(input[value="off"]:checked) .dc-hours, .dc-form:has(input[value="hours"]:checked) .dc-off { display: none; }
@media (max-width: 600px) { .dc-fields { grid-template-columns: minmax(0, 1fr); } }
.bh-wd { text-align: center; }

/* 予約カレンダー：パーソナル */
.cal-ev.is-personal { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cal-ev.is-personal .t { color: var(--accent-ink); }
.cal-ev.is-personal:hover { border-color: var(--accent); }
.cal-ev.is-personal.is-done .t { color: var(--good); }
.cal-ev.is-personal.is-error { box-shadow: inset 0 0 0 1.5px var(--critical); }
.cal-ev.is-personal-alms { background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.cal-ev.is-personal-alms .t { color: var(--accent-ink); }
.cal-free.is-personal { pointer-events: auto; cursor: pointer; text-align: left; padding: 0; font: inherit; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); border: 1px dotted color-mix(in srgb, var(--accent) 55%, transparent); }
.cal-free.is-personal span { color: var(--accent-ink); }
.cal-free.is-personal:hover { background: var(--accent-soft); border-style: solid; }
.cal-dayhead-shift.is-duty { color: var(--teal); }
.cal-freemode { display: inline-flex; align-items: center; gap: 6px; }
.segmented.sm button { padding: 3px 10px; font-size: 12px; }
.btn.danger-text { color: var(--critical); }
/* パーソナルの予約シート */
.bk-form { display: grid; gap: 6px; }
.bk-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
@media (max-width: 459px) { .bk-when { grid-template-columns: minmax(0, 1fr); } }
.bk-where { color: var(--ink-2); margin: 2px 0 0; }
.bk-results { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.bk-cust { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.bk-cust:hover { background: var(--surface-2); }
.bk-picked { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.bk-picked .btn { margin-left: auto; }
.bk-ticket { color: var(--ink-2); }
.bk-warn { color: var(--critical); margin: 4px 0 0; }
.bk-series { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.bk-sinfo { margin: 0; padding: 10px 12px; }
.bk-srow { display: grid; grid-template-columns: 26px 78px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 8px 10px; }
.bk-srow + .bk-srow { border-top: 1px solid var(--line); }
.bk-srow.is-off { color: var(--muted); }
.bk-sdate { font-weight: 600; font-size: 14px; }
.bk-srow > span:nth-child(4) { white-space: nowrap; }
.bk-snote { grid-column: 2 / -1; margin: 0; }

/* お客様：パーソナルの予約 */
.bk-mine-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bk-mine-row:first-of-type { border-top: 0; }
.bk-weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bk-weeknav .btn { width: 44px; height: 40px; font-size: 20px; }
.bk-ticketline { color: var(--ink-2); margin-bottom: 8px; }
.bk-days { display: grid; }
.bk-day { padding: 12px 0; border-top: 1px solid var(--line); }
.bk-dayhead { margin-bottom: 8px; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bk-time { min-height: 46px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--surface); color: var(--accent-ink); font: inherit; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.bk-time:hover, .bk-time:focus-visible { background: var(--accent-soft); }
.bk-pickhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.bk-pickhead .segmented { flex-wrap: nowrap; }
.bk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px 0; }
.bk-wd { padding: 2px 0 6px; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.bk-cell { display: grid; justify-items: center; align-content: start; gap: 2px; min-height: 52px; padding: 3px 0 4px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.bk-cell:hover:not(:disabled) { background: var(--surface-2); }
.bk-cell:disabled { cursor: default; }
.bk-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bk-m { min-height: 13px; font-size: 12px; line-height: 13px; color: var(--muted); }
.bk-cell.is-open .bk-m, .bk-cell.is-few .bk-m { color: var(--accent-ink); font-weight: 700; }
.is-sun, .is-sun .bk-n { color: var(--critical); }
.is-sat, .is-sat .bk-n { color: var(--sat); }
.bk-cell.is-out .bk-n { color: var(--muted); opacity: .5; }
.bk-cell.is-today .bk-n { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.bk-cell.is-today .bk-m { font-size: 10px; }
.bk-cell.is-sel .bk-n { background: var(--ink); color: var(--surface); }
.bk-legend { margin: 6px 0 0; text-align: center; }
.bk-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bk-error .bk-warn { margin: 0; }
.bk-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bk-confirm-when { font-size: 22px; }
.bk-done { text-align: center; display: grid; gap: 6px; }
.bk-done-mark { width: 56px; height: 56px; margin: 4px auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good); font-size: 28px; font-weight: 700; }
.db-actions { display: grid; gap: 8px; }
.bk-service { display: flex; width: 100%; }
.bk-service a { flex: 1; text-align: center; }
/* 予約カレンダー：休憩（押すと変更） */
button.cal-break { border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
button.cal-break:hover { background-color: color-mix(in srgb, var(--surface-3) 60%, transparent); }
.cal-break span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-break.is-pilates-only { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--teal-soft) 90%, transparent) 0 6px, transparent 6px 12px); }
.cal-break.is-pilates-only span { color: var(--teal); }
.cal-break.is-personal-only { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 90%, transparent) 0 6px, transparent 6px 12px); }
.cal-break.is-personal-only span { color: var(--accent-ink); }
.bk-scope { display: flex; width: 100%; }
.bk-scope button { flex: 1; }
.bk-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bk-chips .chip { cursor: pointer; }
.cal-issue { padding: 4px 0; }
.cal-issue + .cal-issue { border-top: 1px solid var(--line); }

/* ALMS 連携の見守り */
.alms-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 16px; background: color-mix(in srgb, var(--critical) 12%, var(--surface)); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--critical) 35%, transparent); font-size: 14px; line-height: 1.55; }
.alms-alert svg { width: 20px; height: 20px; color: var(--critical); flex: none; margin-top: 1px; }
.alms-alert b { color: var(--critical); }
.alms-alert-detail { display: block; font-size: 12.5px; color: var(--ink-2); }
.alms-alert a { font-weight: 700; text-decoration: underline; }
.health-problems { margin: 0; padding-left: 18px; list-style: disc; color: var(--critical); font-size: 13.5px; display: grid; gap: 4px; }

/* 記録をコピー */
.copy-record { gap: 6px; }
[data-copy-text].is-copied { border-color: var(--good); color: var(--good); }
.copy-fallback { font-size: 14px; line-height: 1.6; font-family: inherit; }
.notes-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.notes-tools > .btn { order: 2; }
.copy-range { display: grid; gap: 6px; }
.copy-periods { display: flex; flex-wrap: wrap; }
.copy-periods button { flex: 1 1 auto; }
.copy-dates { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 6px; }
.copy-kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.copy-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.copy-pair .btn { padding-left: 8px; padding-right: 8px; gap: 6px; white-space: nowrap; }

/* 入会・入金（ALMS に読み書きする） */
.mm-tabs { display: flex; width: 100%; max-width: 420px; }
.mm-tabs a { flex: 1; text-align: center; }
.mm-name { font-weight: 700; color: var(--ink); }
a.mm-name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.mm-notice { border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); background: color-mix(in srgb, var(--good-soft) 55%, var(--surface)); border-radius: var(--radius); padding: 10px 12px 12px 14px; margin-bottom: 16px; font-size: 14px; }
.mm-notice-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.mm-notice ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; color: var(--ink-2); font-size: 13px; }
.mm-add { flex-wrap: wrap; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.mm-add svg { width: 18px; height: 18px; }
.en-month { display: flex; align-items: center; gap: 2px; font-size: 14px; }
.en-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.en-stats > div { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.en-stats .k { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.en-stats .v { font-size: 22px; font-weight: 700; line-height: 1.15; }
.en-stats .v small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.en-stats .good .v { color: var(--good); } .en-stats .warning .v { color: var(--warning); } .en-stats .serious .v { color: var(--critical); }
.en-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 11px 20px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.en-row:last-child { border-bottom: 0; }
.en-row:hover { background: var(--surface-2); }
.en-date { font-size: 13px; color: var(--ink-2); min-width: 64px; }
.en-main { display: grid; min-width: 0; }
.en-main b, .en-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0 0 16px; font-size: 14px; }
.en-dl dt { color: var(--muted); font-size: 13px; }
.en-dl dd { margin: 0; overflow-wrap: anywhere; }
.en-status { display: flex; }
.en-status button { flex: 1; }
.mm-who { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 16px; }
.mm-form .field + .field, .mm-sheet .field + .field { margin-top: 12px; }
.mm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.mm-grid > .field + .field { margin-top: 0; }
.mm-grid > [hidden] { display: none; }
.mm-plan-wrap { display: grid; gap: 8px; }
.mm-plan { display: flex; }
.mm-plan button { flex: 1; padding-left: 4px; padding-right: 4px; }
.mm-form .segmented:not(.mm-plan) { display: flex; }
.mm-form .segmented:not(.mm-plan) button { flex: 1; }
.mm-day-row { display: flex; align-items: center; gap: 8px; }
.mm-day { max-width: 90px; text-align: right; }
.nj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nj-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nj-chip.is-active { background: var(--critical); border-color: var(--critical); color: #fff; }
.mm-mail-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--ink); }
.mm-mail-prev { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow: auto; margin: 0; color: var(--ink-2); }
.pc-tabs { display: flex; width: 100%; margin-bottom: 12px; }
.pc-tabs button { flex: 1; gap: 5px; padding-left: 4px; padding-right: 4px; }
.pc-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--critical); color: #fff; font-size: 11px; font-weight: 700; }
.pc-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pc-sum > div { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.pc-sum .k { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pc-sum .v { font-size: 24px; font-weight: 700; line-height: 1.15; }
.pc-sum .v small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.pc-sum .bad .v { color: var(--critical); }
.pc-row { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.pc-row:last-child { border-bottom: 0; }
.pc-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.pc-top .chip.sm { height: 19px; padding: 0 7px; font-size: 11px; }
.pc-paid-on { display: inline-flex; align-items: center; gap: 4px; color: var(--good); font-weight: 600; }
.pc-paid-on svg { width: 13px; height: 13px; }
.pc-row.is-paid .mm-name { color: var(--ink-2); }
.pc-pay { background: var(--good); border-color: var(--good); color: #fff; white-space: nowrap; }
.pc-pay:hover { filter: brightness(1.07); color: #fff; }
.pc-state { flex: none; }
.pc-unset-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 20px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pc-unset-head > span { display: grid; gap: 2px; }
.pc-unset-head svg { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; flex: none; }
.pc-unset-head[aria-expanded="true"] svg { transform: rotate(180deg); }
.pc-unset .pc-list { border-top: 1px solid var(--line); }
.pc-menu { display: grid; gap: 10px; }
.pc-menu .field + .field { margin-top: 0; }
.pc-date-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pc-methods { display: flex; flex-wrap: wrap; }
.pc-methods button { flex: 1 1 auto; }
.pc-ok { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 600; }
.pc-ok svg { width: 20px; height: 20px; }
.pc-over { display: grid; justify-items: end; font-weight: 700; font-size: 15px; line-height: 1.1; }
.pc-over small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.pc-over.warn { color: var(--warning); } .pc-over.bad { color: var(--critical); }
.pc-amt { font-size: 14px; font-weight: 600; min-width: 64px; text-align: right; }
.todo-strip { display: grid; gap: 8px; }
.todo-strip[hidden] { display: none; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--line)); font-size: 14px; color: var(--ink); box-shadow: var(--shadow); }
.todo-item > svg { width: 18px; height: 18px; color: var(--warning); flex: none; }
.todo-item > svg:last-child { margin-left: auto; color: var(--muted); }
.todo-item b { font-size: 16px; color: var(--critical); }
button.todo-item { width: 100%; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
button.todo-item > span.small { margin-left: auto; color: var(--accent, var(--ink-2)); font-weight: 700; white-space: nowrap; }
button.todo-item:disabled { opacity: .6; }
@media (max-width: 600px) {
  .en-row { padding: 11px 16px; gap: 10px; }
  .en-stats { padding: 10px 12px; gap: 6px; }
  .en-stats > div { padding: 7px 8px; }
  .pc-row { padding: 11px 8px 11px 16px; }
  .pc-unset-head { padding: 12px 16px; }
  .mm-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pc-amt { min-width: 0; }
}

/* 体験・入会 */
.tr-lede { margin-top: 4px; max-width: 640px; }
.tr-tabs { display: flex; width: 100%; max-width: 420px; margin-bottom: 14px; }
.tr-tabs button { flex: 1; gap: 5px; }
.tr-sec { margin-bottom: 22px; }
.tr-sec-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.tr-sec-head h2 { font-size: 15px; font-weight: 700; }
.tr-sec-n { font-size: 13px; color: var(--ink-2); }
.tr-sec-head .tr-blank { margin-left: auto; }
.tr-list { display: grid; gap: 10px; }
.tr-empty { padding: 4px 2px 0; }
.tr-hint { margin: -2px 2px 8px; }
.tr-day { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 12px 2px 6px; }
.tr-day:first-child { margin-top: 0; }
.tr-card { display: grid; gap: 8px; padding: 14px 14px 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tr-card.is-mine { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tr-card.is-new { animation: tr-flash 2s ease-out; }
@keyframes tr-flash { from { background: var(--accent-soft); } }
.tr-top { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.tr-time { font-weight: 700; font-size: 15px; color: var(--ink); }
.tr-name { font-weight: 700; font-size: 16px; color: var(--ink); }
a.tr-name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.tr-top .chip.sm, .tr-mine { height: 20px; padding: 0 8px; font-size: 11px; }
.tr-mine { background: var(--accent-soft); color: var(--accent-ink); }
.tr-member-note { margin: 0; }
.tr-more { margin-left: auto; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.tr-ok, .tr-warn { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.tr-ok { color: var(--good); } .tr-warn { color: var(--warning); }
.tr-ok svg, .tr-warn svg, .tr-wait svg { width: 15px; height: 15px; flex: none; }
.tr-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-tools .btn svg { width: 16px; height: 16px; }
.tr-decide { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tr-decide .btn { height: 44px; }
.tr-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 2px 0; padding: 0; list-style: none; counter-reset: none; }
.tr-steps li { display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tr-steps li .num { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10.5px; }
.tr-steps li svg { width: 15px; height: 15px; }
.tr-steps li.is-done { background: var(--good-soft); color: var(--good); }
.tr-steps li.is-now { background: var(--surface); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tr-step-body { display: grid; gap: 8px; }
.tr-step-body > p { margin: 0; }
.tr-wait { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.tr-plan { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.tr-plan dt { color: var(--muted); font-size: 12.5px; }
.tr-plan dd { margin: 0; font-weight: 600; }
.tr-links { display: grid; gap: 6px; }
.tr-link { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.tr-link.is-main { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }
.tr-link-info { flex: 1; min-width: 0; display: grid; }
.tr-link-info b { font-size: 14px; overflow-wrap: anywhere; }
.tr-link-info span { font-size: 12.5px; }
.tr-recent { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-recent .chip svg { width: 13px; height: 13px; }
.tr-flow { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 12px; }
.tr-flow li { padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-weight: 600; }
.tr-flow li.is-done { background: var(--good-soft); color: var(--good); }
.tr-flow li.is-now { background: var(--accent); color: #fff; }
.tr-send { display: grid; gap: 12px; }
.tr-send .segmented { display: flex; } .tr-send .segmented button { flex: 1; }
.tr-send-btns { display: grid; gap: 8px; }
.tr-send-btns .btn svg { width: 17px; height: 17px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 4px; }
.back-link svg { width: 16px; height: 16px; }
.pl-qr { flex: none; min-height: 44px; }
.pay-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 600px) {
  .tr-card { padding: 12px 12px 12px 14px; }
}
@media (max-width: 600px) {
  .pl-item .pl-info { grid-template-columns: minmax(0, 1fr); }
  .pl-qr { padding: 0 11px; }
  .pl-copy { min-width: 64px; }
}
/* その他：メニュー */
.menu-card { max-width: 900px; overflow: hidden; }
.menu-card .list-main { display: grid; gap: 1px; }
.menu-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.menu-ic svg { width: 18px; height: 18px; }
.menu-go { font-size: 20px; color: var(--muted); }
/* 設定（/my/settings）：ログアウトはフォームのボタンだが、ほかの行と同じ見た目にする */
.settings-logout { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.menu-card > form:not(:last-child) .list-row.settings-logout { border-bottom: 1px solid var(--line); }
.settings-logout:hover { background: var(--surface-2); }
/* カウンセリング：シート・マインドマップ・食事の目標（広い画面はシートか食事の目標を左、マップを右に並べる） */
.cn-tabs { display: flex; flex-wrap: nowrap; width: 100%; max-width: 420px; margin-bottom: 12px; scroll-margin-top: calc(var(--header-h) + 10px); }
.cn-tabs button { flex: 1 1 auto; min-width: 0; padding-inline: 10px; overflow: hidden; text-overflow: ellipsis; }
.cn-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cn-split > * { min-width: 0; }
.cn-split .cn-map { height: calc(100dvh - var(--header-h) - var(--tabbar-h) - 120px - env(safe-area-inset-bottom)); min-height: 420px; }
.cn-split:not([data-show="meal"]) .cn-split-meal { display: none; }
@media (max-width: 899px) {
  .cn-split:not([data-show="sheet"]) .cn-split-sheet, .cn-split:not([data-show="map"]) .cn-split-map { display: none; }
}
@media (max-width: 400px) {
  .cn-tabs button { padding-inline: 4px; font-size: 12px; }
}
@media (min-width: 900px) {
  .cn-tabs [data-cn-tab="map"] { display: none; }
  .cn-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .cn-split-sheet, .cn-split-meal { grid-column: 1; grid-row: 1; }
  .cn-split[data-show="meal"] .cn-split-sheet { display: none; }
  .cn-split-map { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 12px); }
  .cn-split .cn-map { height: calc(100dvh - var(--header-h) - 64px); }
  .cn-split-sheet .cn-sheet:last-child { margin-bottom: 0; }
}
/* 前回のカルテ：横スワイプ・矢印でさかのぼる */
.prev-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 6px; }
.prev-pager .btn:disabled { opacity: .3; }
.prev-pos { text-align: center; }
.prev-card .prev-body { touch-action: pan-y; }
.prev-body.slide-l { animation: prev-in-l .22s ease-out; }
.prev-body.slide-r { animation: prev-in-r .22s ease-out; }
@keyframes prev-in-l { from { opacity: 0; transform: translateX(28px); } }
@keyframes prev-in-r { from { opacity: 0; transform: translateX(-28px); } }
@media (prefers-reduced-motion: reduce) { .prev-body.slide-l, .prev-body.slide-r { animation: none; } }
/* 有酸素（距離＋時間）：数字が長くなるので、スマホでは +− を少し細く */
@media (max-width: 600px) {
  .set-row.cardio .stepper button { width: 26px; }
}
/* 成長グラフ：有酸素 */
.cardio-sub { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0; }
/* 泳ぎ方ごと（くらべる）：距離の割合の帯 */
.swim-share-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.swim-share-bar i { display: block; height: 100%; min-width: 3px; }
.chart-box.h240 { height: 240px; }
.repbest td.xsmall { white-space: nowrap; }
.repbest .dot, .sec-swimcmp .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.ex-picker button i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
/* 有酸素の種目のボタン：走る・こぐ／泳ぐ の2段（端の種目が隠れないよう、段の中は折り返す） */
.ex-picker.ex-picker-rows { flex-direction: column; gap: 10px; overflow: visible; }
.ex-picker-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-picker-k { width: 100%; font-size: 11px; font-weight: 600; color: var(--muted); }
/* SNS用の画像 */
/* 編集は画面いっぱいで（ダイアログにすると、スマホでは画像が小さくて窮屈になる） */
.sheet.sh-sheet { inset: 0; transform: none; width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; animation: fade .2s; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.sh-sheet .sheet-body { flex: 1; min-height: 0; }
.sh-editor { display: grid; gap: 12px; }
.sh-stage { position: sticky; top: -12px; z-index: 3; display: grid; justify-items: center; gap: 8px; margin: -12px -16px 0; padding: 12px 16px 8px; background: radial-gradient(120% 90% at 50% 0%, #2d2b25 0%, #161511 70%); }
.sh-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 50dvh; border-radius: 4px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.sh-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
.sh-canvas.pen { cursor: crosshair; }
.sh-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sh-tool { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.08); color: #f1ede3; font: 700 12px/1 var(--font); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sh-tool:disabled { opacity: .35; cursor: default; }
.sh-tool.pen { background: var(--accent); border-color: transparent; color: #fff; }
.sh-tool[hidden] { display: none; }
.sh-busy { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(17,16,13,.72); color: #f1ede3; font-size: 14px; font-weight: 700; text-align: center; }
.sh-busy[hidden] { display: none; }
.sh-spin { width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: sh-spin .8s linear infinite; }
@keyframes sh-spin { to { transform: rotate(360deg); } }
.sh-grads { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-grads button { width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.sh-grads button.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.sh-ico { display: inline-grid; place-items: center; }
.sh-ico svg { width: 17px; height: 17px; display: block; }
.btn .sh-ico svg { width: 15px; height: 15px; }
.sh-sub { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; margin-top: 4px; }
.sh-slider { display: grid; grid-template-columns: 70px minmax(0, 1fr) 46px; align-items: center; gap: 8px; }
.sh-sl { font-size: 13px; color: var(--ink-2); }
.sh-val { padding: 4px 0; border: 0; background: none; color: var(--muted); font: 600 12px/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; cursor: pointer; }
.sh-fthumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 2px; }
.sh-fthumbs::-webkit-scrollbar, .sh-fonts::-webkit-scrollbar { display: none; }
.sh-fthumb { flex: 0 0 62px; display: grid; justify-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 700 11px/1.2 var(--font); cursor: pointer; }
.sh-fthumb img { display: block; width: 62px; height: 78px; object-fit: cover; border-radius: 8px; }
.sh-fthumb.on { color: var(--ink); }
.sh-fthumb.on img { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.sh-fonts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.sh-fonts button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.sh-fonts button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chips button { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 13px/1.2 var(--font); cursor: pointer; }
.sh-chips button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sh-addgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.sh-addbtn { display: grid; justify-items: center; gap: 6px; padding: 10px 2px 9px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 11px/1.2 var(--font); cursor: pointer; }
.sh-glyph { display: block; width: 26px; height: 20px; border: 2.5px solid currentColor; box-sizing: border-box; }
.sh-petthumb { display: block; width: 34px; height: 34px; margin: -6px 0 -4px; }
.sh-petthumb img { width: 100%; height: 100%; object-fit: contain; }
.sh-petthumb.pixel img { image-rendering: pixelated; }
.sh-glyph.rect { border-radius: 4px; }
.sh-glyph.ellipse { width: 22px; border-radius: 50%; }
.sh-glyph.line { height: 0; margin: 9px 0; border-width: 2.5px 0 0; border-radius: 2px; }
.sh-glyph.arrow { position: relative; height: 0; margin: 9px 0; border-width: 2.5px 0 0; }
.sh-glyph.arrow::after { content: ""; position: absolute; right: -1px; top: -7.5px; border: 6px solid transparent; border-left: 9px solid currentColor; border-right: 0; }
.sh-glyph.img { border-radius: 4px; background: linear-gradient(135deg, transparent 55%, currentColor 55% 62%, transparent 62%); }
.sh-glyph.pen { width: 22px; border: 0; background: linear-gradient(135deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.sh-glyph.mosaic { border: 0; background: conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 0 0 / 10px 10px; opacity: .8; }
.sh-glyph.year { border: 0; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 0 / 6.5px 6.5px; }
.sh-glyph.week { border: 0; background: radial-gradient(circle, currentColor 2.6px, transparent 3px) 0 50% / 7.4px 10px repeat-x; }
.sh-glyph.g-rank { border: 0; background: linear-gradient(currentColor, currentColor) 0 2px / 100% 4px no-repeat, linear-gradient(currentColor, currentColor) 0 8px / 75% 4px no-repeat, linear-gradient(currentColor, currentColor) 0 14px / 50% 4px no-repeat; }
.sh-glyph.g-line { border-width: 0 0 2.5px 2.5px; border-radius: 0; background: linear-gradient(135deg, transparent 45%, currentColor 45% 58%, transparent 58%) 4px 2px / 18px 14px no-repeat; }
.sh-glyph.g-bars { border-width: 0 0 2.5px; border-radius: 0; background: linear-gradient(currentColor, currentColor) 3px 100% / 4px 50% no-repeat, linear-gradient(currentColor, currentColor) 11px 100% / 4px 80% no-repeat, linear-gradient(currentColor, currentColor) 19px 100% / 4px 65% no-repeat; }
.sh-glyph.g-body { width: 16px; border: 0; background: radial-gradient(circle at 50% 3px, currentColor 3px, transparent 3.5px), linear-gradient(currentColor, currentColor) 50% 7px / 8px 7px no-repeat, linear-gradient(currentColor, currentColor) 4px 13px / 3px 7px no-repeat, linear-gradient(currentColor, currentColor) 9px 13px / 3px 7px no-repeat; }
.sh-glyph.note { border-radius: 4px; background: linear-gradient(currentColor, currentColor) 4px 5px / 12px 2px no-repeat, linear-gradient(currentColor, currentColor) 4px 10px / 8px 2px no-repeat; }
.sh-glyph.qr { width: 20px; height: 20px; border: 0; background: linear-gradient(currentColor, currentColor) 0 0 / 8px 8px no-repeat, linear-gradient(currentColor, currentColor) 12px 0 / 8px 8px no-repeat, linear-gradient(currentColor, currentColor) 0 12px / 8px 8px no-repeat, linear-gradient(currentColor, currentColor) 13px 13px / 3px 3px no-repeat, linear-gradient(currentColor, currentColor) 17px 17px / 3px 3px no-repeat; }
.sh-layers { display: grid; gap: 4px; }
.sh-layer { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px 30px 30px; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; }
.sh-layer.on { border-color: var(--ink); background: var(--surface-2); }
.sh-layer.off .sh-lname { opacity: .45; }
.sh-layer.photo { display: block; padding: 9px 12px; border-style: dashed; color: var(--muted); font-size: 12px; }
.sh-lname { display: grid; gap: 1px; min-width: 0; padding: 6px 4px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.sh-lname b { font-size: 13px; }
.sh-lname small { overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.sh-lbtn { display: grid; place-items: center; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.sh-lbtn:disabled { opacity: .25; cursor: default; }
.sh-swatches .none { background: linear-gradient(to top right, transparent calc(50% - 1.5px), #d9472b calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)), #fff; }
.sh-seg { display: flex; flex-wrap: wrap; }
.sh-seg button { flex: 1 1 auto; padding-inline: 8px; }
.sh-range { width: 100%; accent-color: var(--accent); }
.sh-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 -16px; padding: 0 12px; }
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tabs button { flex: 0 0 auto; padding: 10px 10px 9px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; border-bottom: 2px solid transparent; cursor: pointer; }
.sh-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.sh-panelbox { min-height: 150px; }
.sh-panel { display: grid; gap: 10px; }
.sh-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 12px 8px; } /* スマホ・右の道具の列では4つ、タブレットの縦では1列に多く */
.sh-tpl { display: grid; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 700 11px/1.2 var(--font); text-align: center; cursor: pointer; }
.sh-tpl .th { display: block; aspect-ratio: var(--ar, 4 / 5); overflow: hidden; border-radius: 8px; background: linear-gradient(160deg, #8a8172, #3b362e 60%, #1c1a16); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.sh-tpl .th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sh-tpl .th img:not([src]) { visibility: hidden; }
.sh-tpl.on { color: var(--ink); }
.sh-tpl.on .th { outline: 3px solid var(--accent); outline-offset: 2px; }
.sh-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.sh-swatches button.on, .sh-custom.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.sh-custom { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; background: conic-gradient(#ff6a3d, #f4c64e, #7fd6c2, #2a78d6, #ff9cbc, #ff6a3d); }
.sh-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sh-custom::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 0 2px var(--surface); }
.sh-filters, .sh-stamps { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-filters button, .sh-stamps button { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sh-filters button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sh-stamps button { font-family: "Bebas Neue", var(--font); font-size: 16px; font-weight: 400; letter-spacing: .04em; }
.sh-free { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-edit { min-height: 0; resize: vertical; }
.sh-items { display: grid; gap: 6px; }
.sh-item { align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.sh-item span { display: grid; gap: 1px; min-width: 0; }
.sh-item b { font-size: 14px; }
.sh-item small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sh-note { margin: 4px 0 0; }
/* パソコン・タブレット（横）：左に大きな画像、右に道具。道具だけがスクロールする */
@media (min-width: 900px) {
  .sh-sheet .sheet-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
  .sh-editor { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; }
  .sh-stage { grid-column: 1; grid-row: 1 / -1; position: relative; top: auto; margin: 0; padding: 24px 24px 18px; align-content: center; gap: 14px; }
  .sh-canvas { max-height: calc(100dvh - 160px); }
  .sh-tabs { grid-column: 2; grid-row: 1; margin: 0; padding: 4px 12px 0; border-left: 1px solid var(--line); flex-wrap: wrap; overflow: visible; }
  .sh-panelbox { grid-column: 2; grid-row: 2; min-height: 0; overflow-y: auto; padding: 14px 16px 20px; border-left: 1px solid var(--line); }
  .sh-note { grid-column: 2; grid-row: 3; margin: 0; padding: 8px 16px 12px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
}
.sh-share svg { width: 16px; height: 16px; }

/* ペット */
.pet-page { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.pet-stage { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 16px 20px; border-radius: var(--radius); overflow: hidden; background: radial-gradient(120% 80% at 50% 10%, #fff6dc 0%, #fbe6cf 45%, #f1d6bd 100%); color: #2b2620; }
.pet-stage.adult, .pet-stage.master { background: radial-gradient(120% 80% at 50% 10%, #fff3d6 0%, #ffd9b8 45%, #f2b98f 100%); }
.pet-stage.master { box-shadow: inset 0 0 0 2px rgba(242, 185, 46, .5); }
.pet-art { position: relative; width: min(280px, 72vw); aspect-ratio: 1; }
.pet-art.small { width: 160px; margin: 0 auto; }
.pet-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pet-meta { display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 320px; text-align: center; }
.pet-name { display: flex; align-items: center; gap: 4px; font-size: 20px; }
.pet-name .btn { color: #6b5d4d; }
.pet-lv { display: flex; align-items: center; gap: 8px; }
.pet-lvnum { font: 800 22px/1 var(--font); letter-spacing: .04em; }
.pet-stage-chip { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 700; color: #8a5a2b; }
.pet-xp { width: 100%; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(120, 80, 40, .12); }
.pet-xp i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffb347, #ff6a3d); transition: width .6s ease; }
.pet-stage .muted { color: #8a7a64; }
.pet-stage .ink-2 { color: #6b5d4d; }
/* ご飯：押すたびに1つ、長押しで続けて */
.pet-feed { display: grid; gap: 10px; }
.pet-feed-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.pet-bag { display: grid; gap: 2px; padding: 8px 16px; border-radius: 14px; background: var(--surface-2); }
.pet-bag > small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pet-bag b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.pet-bag small { margin-left: 2px; font-size: 12px; color: var(--muted); }
.pet-feed-lv { display: grid; gap: 6px; min-width: 0; }
.pet-feed-lvrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pet-feed-lvrow > * { white-space: nowrap; }
.pet-feed-lvrow b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pet-feed .pet-xp { height: 10px; background: var(--surface-3); box-shadow: none; }
.pet-feed .pet-xp i { transition: width .18s ease; }
.pet-feed-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: 800 17px/1 var(--font); letter-spacing: .04em; cursor: pointer; box-shadow: 0 4px 0 var(--accent-ink); touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .06s, box-shadow .06s; }
.pet-feed-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-ink); }
.pet-feed-btn:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; cursor: default; }
.pet-feed-hint { text-align: center; }
.pet-feed-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pet-feed-more .btn[hidden] { display: none; }
.pet-wishcard { display: grid; gap: 10px; }
.pet-consent { display: grid; gap: 10px; }
.pet-consent-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; list-style: disc; }
.pet-consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pet-consent-btns .btn { min-height: 48px; width: 100%; }
.pet-consent-btns.is-one { grid-template-columns: 1fr; }
.pet-artlater { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pet-artlater .btn { margin-top: 0; }
/* シンプル版のホームのいちばん上：ログインの入口（小さく）と、はじめの1回だけの同意の1行 */
.guest-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 4px 12px; padding-top: 12px; font-size: 12px; }
.guest-agree { flex: 1 1 100%; margin: 0; color: var(--muted); line-height: 1.6; }
.guest-agree a { color: inherit; text-decoration: underline; }
.guest-login { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.guest-login small { font-size: 11px; color: var(--muted); }
.pet-name-note { margin-top: 4px; }
.pet-name-note.is-ng { color: var(--accent-ink); font-weight: 700; }
.pet-next { display: grid; gap: 4px; }
.pet-gauges { display: grid; gap: 8px; margin: 4px 0 14px; }
/* はじめての案内（guide.js）。会話はいちばん上、光らせる案内はシートの下 */
.gd-talk { -webkit-touch-callout: none; position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; padding: 16px 12px calc(env(safe-area-inset-bottom) + 16px); background: rgba(8, 10, 16, .35); cursor: pointer; -webkit-user-select: none; user-select: none; animation: fade .2s; }
.gd-talk.is-night { align-items: center; background: #0a1019; }
.gd-box { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: end; width: min(560px, 100%); margin-inline: auto; padding: 12px 14px 22px; border: 1px solid rgba(255, 220, 160, .35); border-radius: 14px; background: rgba(16, 20, 30, .95); color: #f4f0e6; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.gd-box.is-n { grid-template-columns: minmax(0, 1fr); padding-block: 18px 24px; text-align: center; }
.gd-box.is-noface { grid-template-columns: minmax(0, 1fr); }
.gd-talk.is-night .gd-box { border: 0; background: none; box-shadow: none; }
.gd-talk.is-night .gd-say p { font-size: 18px; line-height: 2; letter-spacing: .04em; }
.gd-ph { display: inline-block; }
.gd-face { width: 72px; height: 72px; object-fit: contain; image-rendering: pixelated; }
.gd-say { display: grid; gap: 2px; min-width: 0; }
.gd-say b { font-size: 12px; color: #ffd9a0; }
.gd-box.is-v .gd-say b, .gd-box.is-v .gd-say p { color: #d9b8ee; }
.gd-say p { margin: 0; font-size: 15px; line-height: 1.75; }
.gd-next { position: absolute; right: 12px; bottom: 8px; width: 0; height: 0; border: 6px solid transparent; border-top-color: #ffc46b; border-bottom-width: 0; animation: gd-next .9s ease-in-out infinite alternate; }
@keyframes gd-next { to { transform: translateY(3px); } }
.gd-skip { position: fixed; top: calc(env(safe-area-inset-top) + 12px); right: 12px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
/* 下の話の枠があるとき（夜の語りでないとき）：「案内をとばす」は話の枠のすぐ上の右に（上の「プラン」・出口のマーク・町の「メニュー」に重ねない） */
.gd-talk:not(.is-night):has(.gd-skip) { flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 8px; }
.gd-talk:not(.is-night) .gd-skip { position: static; order: -1; align-self: flex-end; margin-right: max(0px, calc((100% - 560px) / 2)); }
.gd-block { position: fixed; z-index: 84; background: rgba(8, 10, 16, .62); }
.gd-block.is-clear { background: none; }
.gd-ring { position: fixed; z-index: 84; box-sizing: border-box; border: 3px solid #ffc46b; border-radius: 14px; box-shadow: 0 0 18px rgba(255, 196, 107, .7); pointer-events: none; animation: gd-ring 1.1s ease-in-out infinite alternate; }
@keyframes gd-ring { to { box-shadow: 0 0 30px rgba(255, 196, 107, .95); } }
.gd-bubble { position: fixed; left: 12px; right: 12px; z-index: 84; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: center; width: auto; max-width: 480px; margin-inline: auto; padding: 8px 12px; border-radius: 12px; background: #161c28; color: #f4f0e6; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); pointer-events: none; }
.gd-bubble img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; }
.gd-bubble p { margin: 0; font-size: 14px; line-height: 1.6; }
/* シートの中を示すとき（むすび・掲示板・メニュー）：シートの上に */
.gd-block.is-above, .gd-ring.is-above, .gd-bubble.is-above { z-index: 89; }
.gd-goal { justify-self: center; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 12px 3px 4px; border: 1px solid rgba(255, 220, 160, .4); border-radius: 999px; background: rgba(16, 20, 30, .85); color: #ffe6bd; font-size: 12px; font-weight: 700; pointer-events: none; }
.wd-door:has(.gd-goal) { min-height: 180px; }
.wd-door .gd-goal { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); }
.gd-goal img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
@media (prefers-reduced-motion: reduce) { .gd-ring, .gd-next { animation: none; } }
.wd-door { position: relative; display: block; width: 100%; min-height: 148px; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #1b2a3a; color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.wd-door-art { position: absolute; inset: 0; background-position: center 45%; background-size: cover; }
.wd-door-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 16, 26, .9), rgba(10, 16, 26, .5) 45%, rgba(10, 16, 26, 0) 75%); }
.wd-door-text { position: absolute; left: 14px; right: 14px; bottom: 58px; display: grid; gap: 2px; }
.wd-door-text b { font-size: 21px; letter-spacing: .08em; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.wd-door-live { font-size: 12px; line-height: 1.5; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.wd-door-go { position: absolute; left: 14px; right: 14px; bottom: 12px; padding: 9px 0; border-radius: 10px; background: #ffc46b; color: #1a1916; font-size: 14px; font-weight: 800; text-align: center; }
.wd-door:active .wd-door-go { background: #f5b24f; }
.pet-gauge { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.pet-gauge .v { min-width: 52px; text-align: right; white-space: nowrap; }
.pet-gauge-help { margin: -8px 0 12px; }
.pet-gauge .k, .pet-attr .k { font-weight: 800; letter-spacing: .04em; color: var(--ink-2); }
.pet-gauge .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pet-gauge .bar i { display: block; width: 100%; height: 100%; border-radius: 999px; background: var(--accent); }
.pet-gauge.mp .bar i { background: var(--ink-2); opacity: .55; }
.pet-gauge .v, .pet-attr .v { text-align: right; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pet-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.pet-attr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 8px; }
.pet-attr .k small { margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.pet-attr .bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
/* ステータスポイント（RO 式）：残りポイント・▲で上げる・活動で上がった分は ＋ で */
.pet-status-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pet-points { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.pet-points b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pet-points-help { margin: 0 0 10px; }
.pet-attr-v { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 4px; }
.pet-bonus { font-size: 12px; font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; }
.pet-attrs.can-up .pet-attr { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.pet-attrs.can-up .pet-attr .k small { display: block; margin: 1px 0 0; line-height: 1.2; }
.pet-up { display: inline-grid; grid-auto-flow: column; align-items: baseline; gap: 2px; min-width: 40px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--accent-ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.pet-up small { font-size: 10px; font-weight: 700; color: var(--muted); }
.pet-up:disabled { color: var(--muted); opacity: .45; cursor: default; }
.pet-attr.is-up .v { color: var(--accent-ink); }
.pet-alloc-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pet-attr .bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); opacity: .8; }
/* ランキングへ */
.pet-rank-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.pet-rank-link > span:nth-child(2) { display: grid; gap: 2px; }
.pet-rank-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); font-size: 22px; }
.pet-rank-go { font-size: 22px; color: var(--muted); }
.pet-rules { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pet-rules li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.pet-rules b { color: var(--accent-ink); white-space: nowrap; }
.pet-wishes { display: grid; gap: 10px; margin-top: 8px; }
.pet-wish-row { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pet-wish-row .pet-wish-head > .btn, .pet-wish-row .pet-wish-head > .pet-chip { flex: 0 0 auto; margin-left: auto; }
.pet-wish-text { min-width: 0; }
.pet-wish-row.is-shown .pet-wish-img { box-shadow: 0 0 0 2px var(--accent); }
span.pet-wish-img { display: grid; place-items: center; overflow: hidden; }
span.pet-wish-img svg { width: 100%; height: 100%; }
.pet-wish-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pet-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pet-chip { padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700; }
.pet-chip.ok { background: var(--good-soft); color: var(--good); }
/* 動き */
.pet-svg .pet-bob { animation: pet-bob 2.6s ease-in-out infinite; }
.pet-svg .pet-shadow { transform-origin: 120px 212px; animation: pet-shadow 2.6s ease-in-out infinite; }
.pet-svg .pet-eyes { animation: pet-blink 4.2s infinite; }
.pet-svg .pet-flame { animation: pet-flame 1.1s ease-in-out infinite alternate; }
.pet-svg .pet-float { animation: pet-float 3s ease-in-out infinite; }
.pet-svg .pet-twinkle { animation: pet-twinkle 1.8s ease-in-out infinite; }
.pet-svg .pet-flash { animation: pet-flash 1.6s steps(2) infinite; }
.pet-svg .pet-ember { animation: pet-float 1.6s ease-in-out infinite; }
.pet-svg .pet-egg { transform-origin: 120px 210px; animation: pet-wobble 3.2s ease-in-out infinite; }
.pet-svg .pet-crack { opacity: 0; }
@keyframes pet-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(.985, 1.015); } }
@keyframes pet-shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.9); } }
@keyframes pet-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pet-flame { from { transform: scale(1, 1); opacity: .85; } to { transform: scale(.92, 1.08); opacity: 1; } }
@keyframes pet-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pet-twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }
@keyframes pet-flash { 0% { opacity: 1; } 100% { opacity: .35; } }
@keyframes pet-wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-6deg); } 82% { transform: rotate(5deg); } 88% { transform: rotate(-3deg); } 94% { transform: rotate(2deg); } }
.pet-art.is-hatching .pet-egg { animation: pet-shake .18s linear infinite; }
.pet-art.is-hatching .pet-crack { opacity: 1; transition: opacity .6s .4s; }
.pet-art.is-evolving { animation: pet-glow 1.6s ease-in-out; }
@keyframes pet-shake { 0% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } 100% { transform: rotate(-5deg); } }
@keyframes pet-glow { 0% { filter: none; } 60% { filter: brightness(2.2) saturate(.2); } 100% { filter: brightness(3) saturate(0); opacity: .6; } }
.pet-art.is-born { animation: pet-born .9s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pet-born { 0% { transform: scale(.3); opacity: 0; filter: brightness(2.5); } 100% { transform: scale(1); opacity: 1; filter: none; } }
.pet-art.is-eating .pet-bob { animation: pet-eat .9s ease-in-out; }
@keyframes pet-eat { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14px) scale(.96, 1.06); } 55% { transform: translateY(0) scale(1.06, .94); } 75% { transform: translateY(-4px) scale(1); } }
.pet-seed { position: absolute; left: 50%; bottom: -10px; width: 22px; height: 22px; animation: pet-seed .55s ease-in forwards; pointer-events: none; }
.pet-seed svg { display: block; width: 100%; height: 100%; }
@keyframes pet-seed { from { transform: translate(-50%, 0) scale(1); opacity: 1; } to { transform: translate(-50%, -150px) scale(.4); opacity: 0; } }
.pet-heart { position: absolute; top: 30%; color: #ff5a7a; font-size: 22px; opacity: 0; animation: pet-heart 1s ease-out forwards; pointer-events: none; }
@keyframes pet-heart { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.2); } }
.pet-levelup { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(17, 16, 13, .25); animation: fade .2s; pointer-events: none; }
.pet-levelup > div { display: grid; justify-items: center; gap: 6px; padding: 26px 34px; border-radius: 22px; background: linear-gradient(160deg, #fff6dc, #ffd9b8); color: #2b2620; text-align: center; box-shadow: var(--shadow-lg); animation: pet-born .7s cubic-bezier(.2, 1.4, .4, 1); }
.pet-levelup small { font: 800 14px/1 var(--font); letter-spacing: .3em; color: #ff6a3d; }
.pet-levelup b { font: 800 44px/1 var(--font); }
.pet-levelup span { font-size: 13px; color: #6b5d4d; }
/* ホームの小さな表示（ほかのカードと同じ地の色。下に「いまのようす」を3つまで） */
.pet-mini { display: grid; gap: 10px; padding: 14px 20px; color: var(--ink); text-decoration: none; }
@media (max-width: 600px) { .pet-mini { padding: 12px 16px; } }
.pet-mini-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pet-mini-art { width: 64px; height: 64px; border-radius: 16px; background: var(--surface-2); }
.pet-mini-text { display: grid; gap: 5px; min-width: 0; }
.pet-mini-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.pet-mini-name b { font-size: 16px; }
.pet-mini-lv { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.pet-mini-title { padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--ink-2); }
.pet-mini-xp { display: block; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pet-mini-xp i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.pet-mini-go { font-size: 24px; color: var(--muted); }
.pet-mini-food { display: flex; flex-wrap: wrap; gap: 0 10px; }
.pet-mini-food > span { white-space: nowrap; }
.pet-mini-now { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.pet-mini-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; }
.pet-mini-tag { font-size: 11px; color: var(--muted); }
.pet-mini-line { display: grid; gap: 5px; min-width: 0; color: var(--ink-2); }
.pet-mini-row.is-strong .pet-mini-line { color: var(--ink); font-weight: 700; }
.pet-mini-badge { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.pet-mini-badge.is-trip { background: var(--rare-3); }
@media (prefers-reduced-motion: reduce) { .pet-svg * { animation: none !important; } }
/* ペット：AIが描いた絵 */
.pet-ai { position: relative; width: 100%; height: 100%; }
.pet-ai-shadow { position: absolute; left: 24%; bottom: 6%; width: 52%; height: 7%; border-radius: 50%; background: rgba(60, 40, 20, .25); filter: blur(5px); transform-origin: 50% 50%; animation: pet-shadow 2.6s ease-in-out infinite; }
.pet-imgwrap { position: absolute; inset: 2% 4% 8%; transform-origin: 50% 100%; animation: pet-bob 2.6s ease-in-out infinite; }
.pet-imgwrap img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .18)); user-select: none; -webkit-user-drag: none; }
.pet-art.is-eating .pet-imgwrap { animation: pet-eat .9s ease-in-out; }
.pet-art.is-drawing > svg, .pet-art.is-drawing > .pet-ai { animation: pet-changing 1.6s ease-in-out infinite; }
@keyframes pet-changing { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.6) saturate(.5) drop-shadow(0 0 14px rgba(255, 236, 170, .9)); } }
/* 生まれる絵を描いている間：ひびの入った卵が、ときどき大きくゆれる */
.pet-art.is-hatch-wait .pet-egg { animation: pet-hatch-wait 1.8s ease-in-out infinite; }
.pet-art.is-hatch-wait .pet-crack { opacity: 1; }
@keyframes pet-hatch-wait { 0%, 45%, 100% { transform: rotate(0); } 52% { transform: rotate(-8deg); } 60% { transform: rotate(7deg); } 68% { transform: rotate(-5deg); } 76% { transform: rotate(3deg); } }
.pet-ai-busy { position: absolute; inset: auto 0 6px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto; width: max-content; max-width: 100%; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #4a3a2a; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px -8px rgba(60, 40, 20, .45); }
.pet-ai-busy small { display: block; font-size: 11px; font-weight: 600; color: #8a7a64; }
.pet-ai-busy i { width: 18px; height: 18px; border: 3px solid rgba(255, 106, 61, .25); border-top-color: #ff6a3d; border-radius: 50%; animation: sh-spin .8s linear infinite; }
.pet-ai-failed { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: #8a5a2b; }
.pet-wish-head { display: flex; align-items: center; gap: 10px; }
.pet-wish-img { flex: 0 0 auto; width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: linear-gradient(160deg, #fff6dc, #fbe6cf); }
.pet-mini-art .pet-ai { width: 64px; height: 64px; }
.pet-svg .pet-rays { animation: pet-spin 24s linear infinite; }
@keyframes pet-spin { to { transform: rotate(360deg); } }
/* ドット絵のペットは、ドットをくっきり拡大 */
.pet-imgwrap img.pixel, .pet-wish-img.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ===== ランキング（ペットの名前と絵で参加） ===== */
.rank-page { display: grid; gap: 14px; }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-join { display: grid; gap: 10px; }
.rank-joined { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--good-soft); }
.rank-joined b { color: var(--good); }
.rank-board { display: grid; gap: 12px; }
.rank-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rank-chips::-webkit-scrollbar { display: none; }
.rank-chips button { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 700 13px/1.2 var(--font); cursor: pointer; }
.rank-chips button.is-on { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.rank-select { width: 100%; }
.rank-title { margin-top: 2px; }
.rank-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rank-row { display: grid; grid-template-columns: 30px 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.rank-row.is-me { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.rank-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rank-row.top1 .rank-no { background: #f2c14e; color: #4a3500; }
.rank-row.top2 .rank-no { background: #c7ccd6; color: #2b2f38; }
.rank-row.top3 .rank-no { background: #d9925a; color: #3b1d06; }
.rank-face { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 12px; background: linear-gradient(160deg, #fff6dc, #fbe6cf); }
.rank-face img, .rank-face svg { width: 100%; height: 100%; object-fit: contain; }
.rank-face img.pixel { image-rendering: pixelated; }
.rank-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.rank-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rank-name small { color: var(--muted); font-size: 12px; }
.rank-name em { padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 10px/1.5 var(--font); font-style: normal; }
.rank-val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== 食事の記録 ===== */
.ml-page { display: grid; gap: 12px; padding-bottom: 72px; }
.ml-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ml-date { display: flex; align-items: center; justify-content: center; gap: 6px; }
.ml-date b { min-width: 120px; text-align: center; font-size: 15px; }
.ml-coach { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.ml-coach-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.ml-coach-icon svg { width: 18px; height: 18px; }
.ml-coach p { margin: 2px 0 0; }
/* ===== 栄養のカルテ（食事の1日のまとめ）：紙のカルテの罫線と、朱色の印 ===== */
.mlk-card { padding: 0; overflow: hidden; }
.mlk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.mlk-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.mlk-day { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 700 12px/1.3 var(--font); white-space: nowrap; cursor: pointer; }
.mlk-day.train { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.mlk-day small { font-weight: 500; font-size: 11px; }
.mlk-hero { display: grid; gap: 2px; padding: 14px 16px 4px; }
.mlk-cap { font-size: 12px; color: var(--muted); }
.mlk-cap.hi { color: var(--warning); font-weight: 700; }
.mlk-big { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.mlk-big > b { font: 700 40px/1.05 var(--font); letter-spacing: -.01em; }
.mlk-big > span:not(.mlk-side) { font-size: 14px; color: var(--ink-2); }
.mlk-side { display: grid; justify-items: end; margin-left: auto; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: right; }
.mlk-side b.num { font-size: 14px; color: var(--ink); }
.mlk-side .mlk-j { font-size: 12px; }
/* カロリーの棒：たんぱく質・脂質・炭水化物から取った分で塗り分け、目標の線と目盛り */
.mlk-kbar { position: relative; height: 14px; margin: 24px 16px 0; border-radius: 4px; background: var(--surface-3); }
.mlk-kbar.no-goal { margin-top: 12px; }
.mlk-kfill { display: flex; gap: 2px; height: 100%; max-width: 100%; overflow: hidden; border-radius: 4px; transition: width .3s ease; }
.mlk-kfill i { display: block; min-width: 2px; height: 100%; }
.mlk-kfill i.p, .mlk-key.p { background: var(--pfc-p); }
.mlk-kfill i.f, .mlk-key.f { background: var(--pfc-f); }
.mlk-kfill i.c, .mlk-key.c { background: var(--pfc-c); }
.mlk-kfill i.x { background: var(--ink-2); }
.mlk-goal { position: absolute; top: -19px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.mlk-goal span { position: absolute; top: -2px; left: 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.mlk-ticks { height: 6px; margin: 4px 16px 0; background: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px var(--tick, 10%)); }
.mlk-ticks:has(+ .mlk-row) { margin-bottom: 16px; }
/* 目盛りがない（目標がない）ときも、棒と下の点線の間を空ける（2026-11-25 社長：棒が点線に密着していた） */
.mlk-kbar:has(+ .mlk-row) { margin-bottom: 16px; }
.mlk-mix { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px 14px; font-size: 12px; color: var(--ink-2); }
.mlk-mix span { display: inline-flex; align-items: center; gap: 5px; }
.mlk-mix small { width: 100%; font-size: 11px; color: var(--muted); }
.mlk-key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
/* 1行に1つの栄養：名前・量／目標・棒・言葉 */
.mlk-row { display: grid; gap: 7px; padding: 10px 16px 11px; border-top: 1px dashed var(--line-strong); }
.mlk-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mlk-name { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.mlk-val { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mlk-val b { margin-right: 2px; font-size: 16px; font-weight: 700; color: var(--ink); }
.mlk-row-bot { display: grid; grid-template-columns: minmax(0, 1fr) 86px; align-items: center; gap: 10px; }
.mlk-g { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--surface-3); }
.mlk-g i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; transition: width .3s ease; }
.mlk-g::after { content: ''; position: absolute; top: -4px; bottom: -4px; left: 80%; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.mlk-j { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: right; white-space: nowrap; }
.mlk-j.ok { color: var(--good); }
.mlk-j.hi { color: var(--warning); }
.mlk-subs { padding: 4px 16px 8px; border-top: 1px dashed var(--line-strong); }
.mlk-subs h3 { margin: 8px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.mlk-srow { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) 5.6em 6.8em; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; }
.mlk-srow.no-goal { grid-template-columns: 4.2em minmax(0, 1fr); }
.mlk-srow .mlk-g { height: 5px; }
.mlk-srow .mlk-g::after { top: -3px; bottom: -3px; }
.mlk-srow .mlk-val { text-align: right; }
.mlk-srow .mlk-val b { font-size: 13px; }
.mlk-lack { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: calc(100% - 32px); margin: 4px 16px 12px; padding: 9px 12px; border: 0; border-radius: 10px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.mlk-note { margin: 0 16px 12px; }
.mlk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mlk-who { padding: 0; border: 0; background: none; color: var(--muted); text-align: left; cursor: pointer; }
.mlk-micro { margin-left: auto; padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; white-space: nowrap; cursor: pointer; }
/* その日の食事：時間の流れ（時間・点と線・写真・名前と栄養）。今日は最後に点線で「次の食事の目安」 */
.mlk-meals { padding: 0; overflow: hidden; }
.mlk-meals-title { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.mlk-tl { margin: 0; padding: 6px 16px 10px; list-style: none; }
.mlk-tl-i { position: relative; display: grid; grid-template-columns: 44px 14px minmax(0, 1fr); gap: 8px; padding: 10px 0; }
/* 点をつなぐ線：最初の点から最後の点まで */
.mlk-tl-i::before { content: ''; position: absolute; top: 0; bottom: 0; left: 58px; width: 2px; background: var(--line-strong); }
.mlk-tl-i:first-child::before { top: 23px; }
.mlk-tl-i:last-child::before { bottom: calc(100% - 23px); }
.mlk-tl-i:only-child::before { display: none; }
.mlk-tl-i.is-next::before { width: 0; border-left: 2px dashed var(--line-strong); background: none; }
.mlk-tl-t { display: grid; align-content: start; padding-top: 4px; font: 500 12px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.mlk-tl-t small { font: 600 11px/1.4 var(--font); color: var(--ink-2); }
.mlk-tl-i.is-next .mlk-tl-t { font: 700 10.5px/1.4 var(--font); letter-spacing: -.02em; color: var(--accent-ink); }
.mlk-tl-dot { position: relative; }
.mlk-tl-dot::after { content: ''; position: absolute; top: 8px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 3px var(--surface); }
.mlk-tl-i.is-next .mlk-tl-dot::after { top: 7px; left: 1px; width: 12px; height: 12px; border: 2px dashed var(--accent); background: var(--surface); box-sizing: border-box; }
.mlk-tl-i.is-next .ml-next { margin-top: 0; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: none; }
.mlk-tl .ml-next-opt { display: grid; justify-items: start; gap: 6px; }
.mlk-meal { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mlk-meal:active .mlk-meal-text > b { color: var(--accent-ink); }
.mlk-ph { position: relative; display: block; width: 52px; height: 52px; }
.mlk-ph img, .mlk-ph-none { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface-3); color: var(--muted); }
.mlk-ph-none svg { width: 22px; height: 22px; }
.mlk-seal { position: absolute; top: -10px; right: -9px; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--surface) 72%, transparent); color: var(--accent); font: 800 10px/1 var(--font); letter-spacing: -.04em; white-space: nowrap; transform: rotate(-14deg); }
.mlk-seal.long { font-size: 8px; }
.mlk-meal-text { display: grid; gap: 2px; min-width: 0; }
.mlk-meal-text > b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.mlk-meal-nums { font-size: 12px; color: var(--muted); }
.mlk-meal-nums b { color: var(--ink-2); }
.mlk-meal-cm { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.mlk-meal-cm svg { width: 13px; height: 13px; }
.mlk-empty { padding: 14px 16px; }
.mlk-table { padding: 0 16px 12px; }
/* タップできない食事（トレーナーの画面で写真がないとき）も、見た目は同じ */
.mlk-meal:disabled { opacity: 1; cursor: default; }
/* トレーナーの画面：写真と栄養の下に、中身・印・コメント */
.mlk-tl-body { display: grid; gap: 10px; min-width: 0; }
/* 目標どおりだった日の数（期間のまとめ・トレーナーの7日のまとめ） */
.mlk-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--surface-2); }
.mlk-counts > span { display: grid; gap: 2px; padding: 10px 12px; text-align: center; }
.mlk-counts > span + span { border-left: 1px dashed var(--line-strong); }
.mlk-counts small { font-size: 11px; color: var(--muted); }
.mlk-counts b { font-size: 18px; font-weight: 700; }
.mlk-counts b + small { margin-left: 2px; }
div.mlk-lack { cursor: default; }
/* 1食のまとめ（記録する所・食事を開いた所） */
.ml-totals { display: grid; gap: 12px; }
.mlk-sum { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mlk-sum-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mlk-sum-top b { font-size: 24px; font-weight: 700; }
.mlk-sum .mlk-kbar { margin: 0; height: 10px; }
.mlk-sum-pfc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.mlk-sum-pfc span { display: inline-flex; align-items: center; gap: 5px; }
.mlk-sum-pfc b { color: var(--ink); }
/* 記録すると、その日はどうなるか（1日の画面と同じ棒） */
.mlk-after { display: grid; gap: 4px; padding: 10px 12px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.mlk-after-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mlk-after-top b { font-size: 16px; }
.mlk-after .mlk-kbar { margin: 22px 0 4px; height: 10px; }
.mlk-after .mlk-goal { top: -17px; bottom: -4px; }
.mlk-after-p { display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.mlk-after-p .mlk-j { margin-left: auto; }
/* 食事を開いた所：写真の角に朱色の判子 */
.mlk-photo { position: relative; }
.mlk-photo .mlk-seal { top: 10px; right: 10px; width: 60px; height: 60px; border-width: 3px; font-size: 15px; }
.mlk-photo .mlk-seal.long { font-size: 12px; }
.mlk-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mlk-title .mlk-seal { position: static; flex: none; }
/* ホームの「今日の食事」も同じ棒 */
.mlh .mlk-kbar { margin: 18px 0 0; height: 10px; }
.mlh .mlk-goal { top: -16px; bottom: -4px; }
.mlh-nut .mlk-g { height: 5px; }
.mlh-nut-k { display: inline-flex; align-items: center; gap: 5px; }
.mlh-nut-k .mlk-key { width: 8px; height: 8px; }
.mlh-nut .mlk-g::after { top: -3px; bottom: -3px; }
.ml-nut-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; white-space: nowrap; }
.ml-nut-row b { font-size: 15px; }
.ml-empty { display: grid; gap: 10px; }
.ml-start { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ml-start .btn svg, .ml-fab svg, .ml-pick-btn > span svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ml-source { margin: 0; }
.ml-fab { position: fixed; right: max(16px, calc(50vw - 380px)); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 13px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 800 15px/1 var(--font); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5); cursor: pointer; white-space: nowrap; }
.ml-pick { display: grid; gap: 10px; }
.ml-pick-btn { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.ml-pick-btn > span { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); }
.ml-pick-btn small { color: var(--muted); font-size: 12px; }
.ml-pick-btn.primary { border-color: var(--accent); }
.ml-pick-btn.primary > span { background: var(--accent); color: #fff; }
.ml-preview { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; }
.ml-wait { display: grid; justify-items: center; gap: 6px; padding: 18px 0; text-align: center; }
.ml-wait p { margin: 0; }
.ml-spin { width: 34px; height: 34px; border: 4px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: sh-spin .8s linear infinite; }
.ml-editor { gap: 12px; }
.ml-question { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.ml-when { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; }
.ml-time { padding-left: 8px; padding-right: 8px; }
.ml-slots { display: flex; width: 100%; }
.ml-slots button { flex: 1; }
.ml-scale, .ml-oil { display: grid; gap: 6px; }
.ml-scale .segmented, .ml-oil .segmented { display: flex; flex-wrap: nowrap; }
.ml-scale .segmented button, .ml-oil .segmented button { flex: 1; }
.ml-items { display: grid; gap: 10px; }
.ml-dish { display: grid; gap: 6px; }
.ml-dish-name { font-weight: 700; }
.ml-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.ml-item-name { display: grid; min-width: 0; }
.ml-item-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-grams { display: flex; align-items: center; gap: 2px; }
.ml-grams button { width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); font: 700 16px/1 var(--font); cursor: pointer; }
.ml-grams input { width: 52px; height: 30px; padding: 0 4px; border: 0; background: none; color: var(--ink); font: 700 15px/1 var(--font); text-align: right; font-variant-numeric: tabular-nums; }
.ml-grams small { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ml-del { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.ml-results { display: grid; gap: 4px; }
.ml-results:empty { display: none; }
.ml-result { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 0; border-radius: 10px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.ml-detail { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ml-detail li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ml-comments { display: grid; gap: 8px; }
.ml-comment { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.ml-comment.coach { background: var(--accent-soft); }
.ml-comment p { margin: 2px 0 0; }
.ml-target-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ml-target-form label { display: grid; gap: 4px; }
.ml-home { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.ml-home-text { display: grid; gap: 2px; min-width: 0; }
.ml-home-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.ml-home-cam { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; }
.ml-home-cam svg { width: 22px; height: 22px; }
/* スタッフ：お客様の食事 */
.mlx { display: grid; gap: 14px; }
.mlx-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-top: 10px; }
@media (max-width: 560px) { .mlx-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mlx-field { display: grid; gap: 4px; }
.mlx-input { display: flex; align-items: center; gap: 4px; }
.mlx-input input { min-width: 0; }
.mlx-check { margin: 8px 0; }
.mlx-check.is-ng { color: var(--accent-ink); font-weight: 700; }
.mlx-why { margin: 6px 0 0; padding-left: 18px; }
.mlx-why:empty { display: none; }
.mlx-history { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.mlx-kpi { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mlx-kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mlx-items { margin: 4px 0 0; padding-left: 18px; }
.mlx-stamps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mlx-stamps { gap: 5px; }
.mlx-stamps button { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 700 11px/1.3 var(--font); cursor: pointer; }
/* 押した印は、お客様の写真に出る判子と同じ朱色 */
.mlx-stamps button.is-on { border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); }
.mlx-comments { display: grid; gap: 6px; }
.mlx-say { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.mlx-say[hidden] { display: none; }
/* 日ごと：お客様と同じカルテとタイムライン */
.mlx-day.is-empty .mlk-head { border-bottom: 0; }
.mlx-day .mlk-head h2 small { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.mlx-tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 16px 0; border-top: 1px solid var(--line); }
.mlx-tl-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.mlx-meal-x { display: grid; gap: 8px; min-width: 0; }
.mlx-meal-x details summary { cursor: pointer; }
.mlx-cm-open { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.mlx-dayfoot { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.mlx-none { margin-top: 12px; }
.cn-meal-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; }
.cn-meal-link > span:first-child { display: grid; gap: 2px; }
.cn-meal-link > span:last-child { color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.ml-checkin { display: grid; gap: 8px; }
.ml-checkin-kcal { font-size: 15px; }
.ml-checkin-kcal b { font-size: 24px; font-weight: 800; }
.ml-checkin-why { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.ml-checkin-kcal { display: grid; gap: 2px; }
.ml-checkin-ask { display: flex; gap: 8px; flex-wrap: wrap; }
.ml-review summary { cursor: pointer; list-style: none; }
.ml-review summary::-webkit-details-marker { display: none; }
.ml-review-body { display: grid; gap: 8px; margin-top: 10px; }
.ml-review-body ul { margin: 4px 0 0; padding-left: 18px; }
.ml-frequent { display: grid; gap: 6px; margin-top: 4px; }
.ml-freq-list { display: grid; gap: 6px; }
.ml-freq-list button { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.ml-mine { margin-right: 6px; padding: 1px 6px; font-size: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.mlx-checkin { display: grid; gap: 4px; border: 1.5px solid var(--accent); }
.mlx-checkin.done { border-color: var(--line); }
.mlx-checkin-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.mlx-rest { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mlx-rest[hidden] { display: none; }
.mlx-from-checkin { margin: 6px 0 0; color: var(--accent-ink); font-weight: 700; }
.ml-suggest-btn { justify-self: stretch; }
.ml-ideas { display: grid; gap: 10px; }
.ml-idea { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.ml-idea ul { margin: 0; padding-left: 18px; }
.ml-idea p { margin: 0; }
.ml-idea .btn { justify-self: start; }
.ml-idea-kind { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.ml-micro-seg { display: flex; }
.ml-micro-seg button { flex: 1; }
.ml-micro { display: grid; gap: 10px; }
.ml-micro-row { display: grid; gap: 4px; }
.ml-micro-pct { margin-left: 6px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.ml-micro-pct.low { color: #c98a12; }
.ml-micro-pct.ok { color: var(--good); }
.sh-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sh-badges button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.sh-badges small { font-size: 10px; line-height: 1.3; color: var(--muted); text-align: center; }
.sh-hanko { display: grid; place-items: center; width: 44px; height: 44px; border: 2.5px solid #d9472b; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px #d9472b; color: #d9472b; font: 800 12px/1 var(--font); }
.ml-notarget { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.ml-notarget .link { justify-self: start; }
.ml-notarget .link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; }
/* 目標設定ウィザード */
.gw-sheet .sheet-body { padding-bottom: 0; }
.gw { display: grid; gap: 14px; }
.gw-dots { display: flex; justify-content: center; gap: 6px; }
.gw-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.gw-dots i.on { background: var(--accent); }
.gw-step { display: grid; gap: 12px; }
.gw-q { margin: 4px 0 0; font-size: 16px; font-weight: 800; }
.gw-cards { display: grid; gap: 8px; }
.gw-card { display: grid; gap: 2px; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.gw-card b { font-size: 15px; }
.gw-card b em { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font: 700 11px/1.5 var(--font); font-style: normal; vertical-align: 1px; }
.gw-card small { color: var(--muted); font-size: 12px; }
.gw-card.is-on { border-color: var(--accent); background: var(--accent-soft); }
.gw-seg { display: flex; flex-wrap: wrap; }
.gw-seg button { flex: 1 1 auto; }
.gw-row { display: grid; gap: 6px; }
.gw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.gw-field { display: grid; gap: 4px; }
.gw-input { display: flex; align-items: center; gap: 4px; }
.gw-input input { min-width: 0; }
.gw-input small { color: var(--muted); white-space: nowrap; }
.gw-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.gw-peek { justify-self: center; font-weight: 800; color: var(--accent-ink); }
.gw-result { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.gw-kcal { font-size: 15px; }
.gw-kcal b { font-size: 38px; font-weight: 800; letter-spacing: .01em; }
.gw-macro { display: grid; gap: 4px; }
.gw-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gw-bar i { display: block; height: 100%; border-radius: 999px; }
.gw-bar i.p { background: var(--pfc-p); }
.gw-bar i.f { background: var(--pfc-f); }
.gw-bar i.c { background: var(--pfc-c); }
.gw-date { font-weight: 700; color: var(--good); }
.gw-warn { padding: 10px 12px; border-radius: 12px; background: #fff3d6; color: #7a5200; }
.gw-warn p { margin: 0; }
.gw-why ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 3px; }
.gw-pro { display: grid; gap: 10px; }
.gw-pro[open] { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.gw-pro > *:not(summary) { margin-top: 10px; }
.ml-goal-start { justify-self: start; }
.sheet.gw-sheet { min-height: min(86vh, 760px); }
.gw-block { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.gw-block p, .gw-note p { margin: 0; }
.gw-note { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.rank-joined-wrap { display: grid; gap: 10px; }
.rank-sex-pick { display: grid; gap: 8px; }
.rank-sex-need { display: grid; gap: 10px; }
.rank-sex-need .btn { justify-self: start; }
.pet-book { display: grid; gap: 10px; }
.pet-book-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pet-book-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; }
button.pet-book-chip { cursor: pointer; }
.pet-book-chip.found { border-style: solid; border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.pet-book-chip.found b { color: var(--accent); font-weight: 800; }
.pet-log { display: grid; border-top: 1px solid var(--line); padding-top: 6px; }
.sheet .pet-log { border-top: 0; padding-top: 0; }
/* ペットの能力 */
.pet-ability-list { display: grid; gap: 10px; margin-top: 10px; }
.pet-ability { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pet-ability-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pet-ability-head b { font-size: 15px; }
.pet-ability-lv { margin-left: auto; }
.pet-ability p { margin-top: 4px; }
.pet-log-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.pet-log-d { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pet-log-t { color: var(--ink-2); }
.pet-log-n { color: var(--accent); font-variant-numeric: tabular-nums; }
.pet-log-more { justify-self: center; margin-top: 2px; color: var(--muted); }

/* =========================================================
   アプリ会員（ジムの外の方）：紹介ページ・法律の表記・プラン
   ========================================================= */
.pub { background: var(--bg); }
.pub-preview { background: var(--warning-soft); color: var(--warning); text-align: center; font-size: 12px; font-weight: 700; padding: 6px 12px; }
.pub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; padding: 14px 16px; }
.pub-main { max-width: 640px; margin: 0 auto; padding: 0 16px 32px; }
.pub-foot { max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pub-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.pub-foot a { color: var(--ink-2); }
.pub-studio { font-weight: 700; font-size: 16px; letter-spacing: .02em; }

/* 体験の予約ページ（まだ会員でない方） */
.tk-head { margin: 4px 0 14px; }
.tk-title { font-size: 21px; line-height: 1.35; margin: 0 0 6px; }
.tk-service { display: flex; }
.tk-service a { flex: 1; text-align: center; }
.tk-form { display: grid; gap: 10px; }
.tk-field { display: grid; gap: 4px; margin: 0; }
.tk-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tk-err:empty { display: none; }
.tk-exist { margin: 6px 0; padding-left: 20px; }
.tk-done { text-align: center; display: grid; gap: 8px; }
.tk-when { font-size: 20px; margin: 0; }
.tk-next { text-align: left; display: grid; gap: 10px; margin-top: 8px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.tk-next p { margin: 0; }

.lp-hero { padding: 28px 0 8px; }
.lp-eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin: 0 0 10px; }
.lp-title { font-size: clamp(34px, 10vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; }
.lp-lead { color: var(--ink-2); font-size: 15px; line-height: 1.8; margin: 0 0 18px; }
.lp-pets { display: flex; align-items: flex-end; justify-content: space-between; gap: 0; margin: 4px 0 22px; padding: 18px 6px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.lp-pet { flex: 1 1 0; min-width: 0; display: grid; place-items: end center; }
.lp-pet svg { width: 100%; height: auto; }
.lp-pet:nth-child(1) { flex-grow: .7; }
.lp-pet:nth-child(3) { flex-grow: .8; }
.lp-pet:nth-child(5) { flex-grow: 1; }
.lp-pet:nth-child(7) { flex-grow: 1.2; }
.lp-pet:nth-child(9) { flex-grow: 1.4; }
.lp-arrow { flex: 0 0 auto; color: var(--line-strong); font-style: normal; font-size: 14px; align-self: center; }
.lp-note { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.lp-sec { padding: 28px 0 4px; border-top: 1px solid var(--line); margin-top: 24px; }
.lp-h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.lp-p { color: var(--ink-2); line-height: 1.85; margin: 0 0 10px; }
.lp-features { display: grid; gap: 10px; }
.lp-feat { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.lp-feat b { display: block; margin-bottom: 2px; }
.lp-feat p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.lp-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.lp-ic svg { width: 20px; height: 20px; }
.lp-list { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); line-height: 1.9; font-size: 14px; }
.lp-gym { }
.lp-price { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-price > div { padding: 16px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: center; display: grid; gap: 4px; }
.lp-price > div:first-child { border-color: var(--accent); }
.lp-price-k { font-size: 12px; color: var(--muted); }
.lp-price b { font-size: 22px; }
.lp-price small { font-size: 11px; font-weight: 500; color: var(--muted); }
.lp-form { display: grid; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.lp-form fieldset { border: 0; padding: 0; margin: 0; }
.lp-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-choice { position: relative; }
.lp-choice input { position: absolute; opacity: 0; inset: 0; }
.lp-choice span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; cursor: pointer; }
.lp-choice input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.lp-choice input:focus-visible + span { box-shadow: var(--ring); }
.lp-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-top: 8px; line-height: 1.6; }
.lp-agree input { margin-top: 3px; }
.lp-faq { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; font-weight: 600; }
.lp-faq p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.8; }

.lg { padding: 20px 0; line-height: 1.85; }
.lg h1 { font-size: 22px; margin: 0 0 16px; }
.lg h2 { font-size: 16px; margin: 22px 0 6px; }
.lg p, .lg li { color: var(--ink-2); font-size: 14px; }
.lg ol, .lg ul { margin: 0; padding-left: 1.4em; }
.lg ul { list-style: disc; }
.lg li + li { margin-top: 4px; }
/* プライバシーポリシー：目次・項目の区切り・委託先の一覧（文は変えず、見せ方だけ） */
.lg-toc { margin: 18px 0 8px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lg .lg-toc-k { padding: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lg .lg-toc ol { list-style: none; padding: 0; }
.lg .lg-toc li + li { margin-top: 0; border-top: 1px solid var(--line); }
.lg .lg-toc a { display: grid; grid-template-columns: 2em minmax(0, 1fr); padding: 7px 0; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.5; }
.lg .lg-toc .lg-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-sec { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.lg .lg-sec h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.45; }
.lg .lg-sec h2 .lg-n { color: var(--accent-ink); margin-right: 2px; }
.lg .lg-sec p, .lg .lg-sec li { font-size: 15px; line-height: 1.9; }
.lg-sec p + p, .lg-sec ul + p, .lg-sec p + ul { margin-top: 12px; }
.lg .lg-note { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-weight: 600; }
.lg-terms b { color: var(--ink); }
.lg .lg-terms li + li { margin-top: 8px; }
/* 委託先：1つの枠の中に、線で区切って並べる（業務は小さな見出し、会社名を大きく） */
.lg .lg-vendors { list-style: none; padding: 0 16px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lg .lg-vendors li { margin: 0; padding: 14px 0; }
.lg .lg-vendors li + li { border-top: 1px solid var(--line); }
.lg-v-job, .lg-v-who, .lg-v-what { display: block; }
.lg-v-job { font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.5; }
.lg-v-colon { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lg-v-who { margin-top: 3px; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.55; }
.lg-v-what { margin-top: 4px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.lg .lg-contact { color: var(--ink); line-height: 1.9; }
.lg-dl { display: grid; grid-template-columns: 1fr; margin: 0; border-top: 1px solid var(--line); }
.lg-dl dt { font-weight: 700; font-size: 13px; padding-top: 12px; }
.lg-dl dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
@media (min-width: 640px) {
  .lg-dl { grid-template-columns: 11em minmax(0, 1fr); }
  .lg-dl dt { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .lg-dl dd { padding: 12px 0; margin: 0; }
}

.app-bar { display: flex; justify-content: center; align-items: center; gap: 6px; text-align: center; margin: 0 auto; max-width: 760px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.app-bar .app-bar-go { color: var(--muted); font-weight: 400; }
.app-header .header-settings { padding-left: 8px; padding-right: 8px; }
.app-header .header-settings.is-active { color: var(--accent-ink); }
/* 上の帯の QR（代わりに書いてもらう）。設定の歯車と同じ大きさの線のアイコン */
.app-header .header-qr-form { display: contents; }
.app-header .header-qr { padding-left: 8px; padding-right: 8px; }
.app-header .header-qr.is-active { color: var(--accent-ink); }
/* 上の帯の QR を押したときに重ねて出す QR（header-qr.js）。読む人に向けやすいように大きく */
.qr-pop {
  position: fixed; z-index: 95; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; padding: 14px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: fade .15s;
}
.qr-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qr-pop-code { display: flex; align-items: center; justify-content: center; margin: 10px auto 0; width: min(300px, 100%); aspect-ratio: 1; border-radius: 12px; background: #fff; }
.qr-pop-code svg { width: 100%; height: 100%; border-radius: 12px; }
.qr-pop-status { text-align: center; margin-top: 10px; }
.qr-pop-writer { text-align: center; margin-top: 6px; }
.qr-pop-writer:empty { display: none; }
.qr-pop-note { margin: 10px 0 12px; text-align: center; }
.qr-pop-more { text-align: center; margin-top: 10px; }
/* 登録のフォーム：同意にふくまれること（外の AI に送るデータ）の説明 */
.lp-agree-note { margin: 8px 0 0; color: var(--ink-2); }
/* ストアのアプリ：通知をオンにするかの問いかけ */
.push-ask { margin: 0 auto; max-width: 760px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.push-ask p { margin: 0 0 8px; color: var(--ink-2); }
.push-ask div { display: flex; gap: 8px; }
.app-bar.is-ended { background: var(--accent-soft); color: var(--accent-ink); }
.plan-now { display: grid; gap: 6px; justify-items: start; margin-bottom: 16px; }
/* プランの画面のカード同士（月額で続ける・機種を変えても…）と、解約のボタンのあとのカードにも、同じ余白 */
.plan-now ~ .card { margin-top: 16px; }
.plan-big { font-size: 18px; margin: 4px 0 0; }
.plan-big b { font-size: 32px; font-variant-numeric: tabular-nums; }
.plan-terms { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px 10px; margin: 12px 0 14px; font-size: 13px; }
.plan-terms dt { color: var(--muted); }
.plan-terms dd { margin: 0; }
.plan-card { min-height: 56px; }
.plan-gym { margin-top: 16px; }
.plan-cancel { display: flex; justify-content: center; margin-top: 16px; }
.plan-links { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 18px; }
.plan-links a { color: var(--muted); }
/* 退会（アカウントの削除） */
/* 箇条書きの点を出す（全体の ul は点なしなので、ここで戻す） */
.leave-list { display: grid; gap: 4px; margin: 10px 0 8px; padding-left: 1.3em; list-style: disc; }
.leave-list li::marker { color: var(--muted); }
/* 点つきの箇条書き（余白はつけない。mt-8 などと組み合わせる） */
.dot-list { display: grid; gap: 2px; padding-left: 1.3em; list-style: disc; }
.dot-list li::marker { color: var(--muted); }
.leave-warn { background: var(--warning-soft); border-color: transparent; }
.leave-warn .card-title { color: var(--warning); }
.leave-form .check { display: flex; align-items: flex-start; }
.leave-form .check input { flex-shrink: 0; margin-top: 2px; }

.am-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.am-stats .card { display: grid; gap: 2px; }
.am-stats b { font-size: 24px; }
.seg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seg-scroll .segmented { flex-wrap: nowrap; white-space: nowrap; }
.am-row { align-items: flex-start; }
.am-row .list-sub { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.6; }
.am-row .list-side { display: grid; gap: 6px; justify-items: end; text-align: right; }
.am-convert { position: relative; }
.am-convert summary { list-style: none; }
.am-convert summary::-webkit-details-marker { display: none; }
.am-convert-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(300px, calc(100vw - 32px)); text-align: left; box-shadow: var(--shadow-lg); }
.am-results { display: grid; gap: 2px; margin-top: 4px; }
.am-pick { text-align: left; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 0; font: inherit; color: var(--ink); cursor: pointer; }
.lp-agree a, .plan-legal a, .lg a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .lp-agree a, :root:where(:not([data-theme="light"])) .plan-legal a { color: var(--accent); } }
/* 紹介ページ：実際の画面をスマホの枠で見せる */
.lp-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin: 18px 0 16px; padding: 0 4px; }
.lp-phones > .is-back { margin-top: 36px; }
.lp-phones.is-single { grid-template-columns: minmax(0, 260px); justify-content: center; }
.lp-phone { margin: 0; border-radius: 26px; padding: 5px; background: #2b2924; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, var(--shadow-lg); }
.lp-phone img { display: block; width: 100%; height: auto; border-radius: 21px; background: #11100d; }
.lp-hero-phones { margin: 6px 0 22px; }
.lp-hero-phones > .lp-phone:first-child { transform: rotate(-2deg); }
.lp-hero-phones > .is-back { transform: rotate(2.5deg); }
.lp-post { margin: 36px 0 0; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); }
.lp-post img, .lp-card-shot img { display: block; width: 100%; height: auto; }
.lp-card-shot { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.lp-toc { display: flex; gap: 6px; overflow-x: auto; margin: 26px -16px 0; padding: 2px 16px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lp-toc::-webkit-scrollbar { display: none; }
.lp-toc a { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.lp-num { margin: 0 0 6px; color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.lp-feature .lp-h2 { font-size: 22px; line-height: 1.45; }
.lp-feature .lp-pets { margin: 8px 0 14px; }
@media (min-width: 700px) {
  .lp-phones { gap: 22px; padding: 0 24px; }
}
.lp-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.lp-list li { position: relative; padding-left: 18px; line-height: 1.75; }
.lp-list li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
/* 紹介ページ：テンプレートの見本を横スクロールで */
.lp-carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 6px; padding: 4px 16px 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.lp-carousel::-webkit-scrollbar { display: none; }
.lp-carousel:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 12px; }
.lp-slide { flex: 0 0 min(64%, 250px); margin: 0; scroll-snap-align: center; }
.lp-slide img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow-lg); background: var(--surface-3); }
.lp-slide figcaption { margin-top: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.lp-swipe { text-align: center; margin: 0 0 10px; }
.lp-h3 { font-size: 18px; margin: 30px 0 8px; }
.lp-slide.is-phone { flex-basis: min(58%, 230px); }
.lp-slide.is-phone .lp-phone img { border-radius: 21px; box-shadow: none; }
.lp-slide.is-phone figcaption { display: grid; gap: 2px; text-align: left; padding: 0 4px; }
.lp-slide.is-phone figcaption b { font-size: 13px; color: var(--ink); }
.lp-slide.is-phone figcaption span { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.5; }
.lp-cover { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 14px; align-items: center; margin: 14px 0 10px; }
.lp-cover .lp-post { margin: 0; }
.lp-cover p { margin: 0; line-height: 1.75; }
.week-goal summary { cursor: pointer; color: var(--ink-2); }
.week-goal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.week-goal-form .btn { grid-column: 1 / -1; }
.plan-form summary { cursor: pointer; list-style: none; }
.plan-form summary::-webkit-details-marker { display: none; }
.plan-type { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.plan-type label { position: relative; text-align: center; }
.plan-type input { position: absolute; opacity: 0; inset: 0; }
.plan-type span { display: block; padding: 8px 4px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.plan-type input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.plan-type input:focus-visible + span { box-shadow: var(--ring); }
.plan-form:has(input[value="maintain"]:checked) .plan-target, .plan-form:has(input[value="maintain"]:checked) .plan-pace { display: none; }

/* スタッフ画面：お客様のペット */
.pet-staff { display: grid; gap: 14px; }
.pet-staff-main, .pet-staff-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.pet-staff .pet-ability-list { margin-top: 0; }
.pet-staff-facts dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.pet-staff-facts dt { font-size: 12px; color: var(--muted); }
.pet-staff-facts dd { margin: 2px 0 0; font-size: 14px; }
.pet-staff-facts dd b { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (min-width: 960px) {
  .pet-staff { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
}

/* 食事：見かたのタブ・ひとこと・グラフ・写真のカレンダー */
.ml-view { display: grid; gap: 12px; min-width: 0; }
.ml-spin.sm { width: 18px; height: 18px; border-width: 3px; }
.ml-advice { display: grid; gap: 10px; transition: opacity .2s; }
.ml-advice.is-updating .ml-advice-row { opacity: .55; }
.ml-advice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ml-advice-row { display: grid; gap: 3px; }
.ml-advice-row p { margin: 0; }
.ml-advice-k { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.ml-advice-k.good { color: var(--good); }
.ml-tr-range { display: flex; justify-self: start; }
.ml-tr-stat { display: grid; gap: 2px; align-content: start; min-width: 0; }
.ml-tr-stat b { font-size: 20px; font-weight: 800; }
.ml-tr-stat small { margin-left: 3px; font-size: 12px; }
.ml-tr-card { display: grid; gap: 8px; }
.ml-tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ml-tr-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ml-tr-key i.dash, .ml-tr-legend i.dash { width: 18px; border-top: 2px dashed var(--ink-2); }
.ml-tr-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.ml-tr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ml-tr-karte { margin: 0; }
.ml-tr-avg .mlk-j { margin-left: 8px; }
.ml-tr-chart { position: relative; height: 190px; }
.ml-tr-empty { margin: 0; }
.ml-top { display: grid; gap: 6px; margin: 4px 0 0; padding-left: 20px; }
.ml-top li { padding: 2px 0; }
.ml-top li::marker { color: var(--muted); font-size: 12px; }
.ml-top li { display: list-item; }
.ml-top li > span:first-child { margin-right: 8px; }
.ml-cal { display: grid; gap: 10px; }
.ml-cal-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ml-cal-head b { min-width: 110px; text-align: center; font-size: 15px; }
.ml-cal-sum { display: flex; justify-content: center; gap: 16px; color: var(--ink-2); }
.ml-cal-sum b { font-size: 16px; color: var(--ink); }
.ml-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ml-cal-wd { padding: 2px 0; text-align: center; font-size: 11px; color: var(--muted); }
.ml-cal-wd.sun { color: var(--critical); }
.ml-cal-wd.sat { color: var(--sat); }
.ml-cal-cell { position: relative; display: block; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; background: var(--surface-2) center / cover no-repeat; color: var(--ink-2); font: inherit; cursor: pointer; overflow: hidden; }
.ml-cal-cell.blank { background: none; cursor: default; }
.ml-cal-cell.future { opacity: .35; cursor: default; }
.ml-cal-cell.logged { background-color: var(--good-soft); }
.ml-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.ml-cal-d { position: absolute; top: 3px; left: 5px; font-size: 11px; font-weight: 700; line-height: 1; }
.ml-cal-cell.has-photo .ml-cal-d { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.ml-cal-n { position: absolute; right: 3px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.ml-cal-cell.logged .ml-cal-n { background: var(--good); }
/* トレーナーが印を押した日：右上に小さな朱色の判子 */
.ml-cal-seal { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--accent); font: 800 9px/1 var(--font); transform: rotate(-12deg); }
@media (min-width: 720px) {
  .ml-tr-chart { height: 230px; }
}

/* 紹介ページ：見出しごとの画面2枚（説明つき） */
.lp-shot { margin: 0; min-width: 0; }
.lp-shot figcaption { display: grid; gap: 2px; margin-top: 10px; padding: 0 2px; }
.lp-shot figcaption b { font-size: 13px; color: var(--ink); }
.lp-shot figcaption span { font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.lp-pair { margin: 12px 0 14px; }

.rank-note { display: block; margin-top: 2px; font-size: 11px; }

/* 称号（ランキングの総合で1位のあいだ） */
.rank-honor { display: block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #c9921f; line-height: 1.3; }
.rank-honors summary { cursor: pointer; }
.rank-honors p { margin: 8px 0 6px; }
.rank-honor-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rank-honor-list .rank-honor { display: inline; font-size: 12px; }
.pet-honor { padding: 3px 12px; border: 1px solid rgba(138, 90, 43, .35); border-radius: 999px; background: linear-gradient(180deg, #fff8e6, #f7e3bf); color: #8a5a2b; font: 800 12px/1.4 var(--font); letter-spacing: .06em; cursor: pointer; }
.pet-honor.is-off { border-style: dashed; background: rgba(255, 255, 255, .6); font-weight: 700; }
.pet-honor-list { display: grid; gap: 8px; }
.pet-honor-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: 700 15px/1.3 var(--font); text-align: left; cursor: pointer; }
.pet-honor-opt.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rank-name .rank-honor { flex-basis: 100%; }

/* 予約表：シフト（日付の見出しは名前だけ。だれもいない時間は、列に斜線の「担当なし」） */
.cal-dayhead-duty { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; max-width: 100%; font-size: 10.5px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.cal-dayhead-duty span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-nostaff { position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; background: color-mix(in srgb, var(--surface-3) 70%, transparent); }
.cal-nostaff span { display: block; padding: 2px 4px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.cal-shift small { margin-left: 2px; font-weight: 500; color: var(--muted); }

/* 予約表：予約の担当を選ぶ */
.cal-assign { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 10px; }
.cal-assign-select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }

/* 送信中のボタン（処理中…） */
.btn.is-busy, .btn:disabled .btn-spin { cursor: progress; }
.btn-spin { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: sh-spin .7s linear infinite; flex: 0 0 auto; }
.dc-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* ペット：進化できるとき */
.pet-art.is-ready::before { content: ''; position: absolute; inset: 6% 10% 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 120, .65), rgba(255, 214, 120, 0)); animation: pet-ready 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes pet-ready { 0%, 100% { opacity: .45; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
.pet-evolve-btn { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 4px; padding: 8px 16px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ff8a3d, #ff5a3d); color: #fff; font: 800 15px/1.2 var(--font); box-shadow: 0 6px 18px -6px rgba(255, 90, 61, .7); cursor: pointer; animation: pet-evolve-bob 1.8s ease-in-out infinite; }
.pet-evolve-btn span { font-size: 13px; font-weight: 700; opacity: .92; }
@keyframes pet-evolve-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.pet-wishcard.is-evolve { border-color: color-mix(in srgb, #ffb347 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, #ffb347 45%, transparent), 0 8px 28px -10px rgba(255, 150, 60, .55); }
.pet-evolve-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #b8600c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pet-evolve-kicker { color: #f0a050; } }
:root[data-theme="dark"] .pet-evolve-kicker { color: #f0a050; }
/* ペットのホーム：舞台（ご飯のボタン・連れている仲間・称号とランキング） */
.pet-stage-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 26px; }
.pet-rank-chip { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); color: #8a5a2b; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.pet-rank-chip.is-on { background: linear-gradient(135deg, #ffe08a, #e9a63a); color: #3a2500; }
.pet-art-wrap { position: relative; display: grid; justify-items: center; width: 100%; }
.pet-party { position: absolute; left: 0; bottom: 6px; display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.pet-party-mon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .75); box-shadow: 0 2px 6px rgba(120, 80, 40, .18); overflow: hidden; }
.pet-party-mon img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.pet-party small { font-size: 10px; font-weight: 700; color: #8a7a64; }
.pet-stage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* 連打するボタンは none に。iPhone は manipulation だけでは、すばやく2回押すと拡大してしまう */
.pet-stage .pet-fab-btn, .pet-attrs .pet-up { touch-action: none; }
.pet-fab { position: absolute; right: 0; bottom: 4px; display: grid; justify-items: center; gap: 2px; }
.pet-fab-btn { width: 64px; height: 64px; border: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #ffb04a, #e8662c); box-shadow: 0 5px 0 #b8481c, 0 8px 18px rgba(232, 102, 44, .45); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .06s, box-shadow .06s; }
.pet-fab-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #b8481c, 0 4px 10px rgba(232, 102, 44, .4); }
.pet-fab-btn:disabled { background: #d8d0c2; box-shadow: 0 3px 0 #b9b0a0; cursor: default; }
.pet-fab-seed { width: 30px; height: 30px; display: grid; place-items: center; }
.pet-fab-seed svg { width: 30px; height: 30px; }
.pet-fab-count { margin-top: -12px; position: relative; min-width: 34px; padding: 1px 8px; border-radius: 999px; background: #fff; color: #b5361d; font-size: 12px; font-weight: 800; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); font-variant-numeric: tabular-nums; }
.pet-fab-hint { font-size: 10px; font-weight: 700; color: #8a7a64; white-space: nowrap; }
.pet-xp-row { display: flex; justify-content: space-between; width: 100%; font-size: 11px; font-weight: 700; color: #8a7a64; }
.pet-stage .pet-feed-more { flex-wrap: nowrap; gap: 6px; }
/* 舞台はいつも明るい色なので、暗い表示のときも文字は濃い色のまま */
.pet-stage .pet-feed-more .btn { min-height: 0; padding: 5px 11px; font-size: 12px; background: rgba(255, 255, 255, .75); color: #4a3a28; border-color: rgba(120, 80, 40, .28); white-space: nowrap; }
/* メニューのアイコン（ペットのホーム・町・フィールドで同じ） */
.pet-menu { padding: 4px 0; }
.gm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.gm-ic { position: relative; display: grid; justify-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 700 11px/1.2 var(--font); cursor: pointer; }
.gm-art { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--line); transition: transform .08s; }
.gm-ic:active .gm-art { transform: translateY(2px); box-shadow: none; }
.gm-art img { width: 46px; height: 46px; object-fit: contain; }
.gm-label { white-space: nowrap; }
.gm-wiki { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.gm-wiki img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.gm-wiki > span:not(.gm-wiki-go) { display: grid; min-width: 0; }
.gm-wiki b { font-size: 13px; }
.gm-wiki small { font-size: 11px; color: var(--ink-3, var(--ink-2)); }
.gm-wiki-go { margin-left: auto; color: var(--ink-2); }
.sheet.mn-sheet .gm-wiki { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #e6eaff; }
.sheet.mn-sheet .gm-wiki small, .sheet.mn-sheet .gm-wiki-go { color: rgba(230, 234, 255, .7); }
.gm-badge { position: absolute; top: -5px; left: calc(50% + 16px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; border: 2px solid var(--bg); }
.sheet.mn-sheet .gm-ic { color: #e6eaff; }
.sheet.mn-sheet .gm-art { background: #f6f1e4; border-color: rgba(255, 255, 255, .25); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.sheet.mn-sheet .gm-badge { border-color: #1a2139; }
.sheet.mn-sheet .mn-home { margin-top: 4px; background: rgba(255, 255, 255, .1); color: #eef1ff; border-color: rgba(160, 180, 255, .3); }
.wd-sheet button.link, .ch button.link, .wd-sec-head button.link { padding: 0; border: 0; background: none; cursor: pointer; }
.wd-nm-more { justify-self: center; padding: 6px 0 0; border: 0; background: none; cursor: pointer; font-weight: 800; }
/* 育成：ペットと連れている仲間（ペットのページの「育成」と、メニューの「ステータス」で同じ） */
.ch { display: grid; gap: 12px; }
.ch-who { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.ch-who::-webkit-scrollbar { display: none; }
.ch-chip { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 13px/1 var(--font); cursor: pointer; }
.ch-chip.is-on { border-color: #e9a63a; background: #fff1dc; color: #3a2500; box-shadow: 0 0 0 1px #e9a63a inset; }
.ch-chip.is-add { padding: 8px 12px; color: var(--muted); border-style: dashed; }
.ch-chip-art { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.ch-chip-art img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.ch-sec { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.ch-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ch-sec-head h3 { font-size: 15px; font-weight: 800; }
.ch-sec-head small { font-size: 11px; font-weight: 700; color: var(--accent-ink); }
.ch-sec-head .link { padding: 0; border: 0; background: none; font-size: 12px; font-weight: 800; cursor: pointer; }
.ch-prof { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.ch-prof-text { display: grid; gap: 4px; min-width: 0; }
.ch-prof-text > b { font-size: 18px; }
.ch-sec .wd-field { margin: 0; }
.ch-sec .pet-status { padding: 0; }
.ch-sec .pet-status-head b.small { font-size: 15px; font-weight: 800; }
.ch-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ch-chips small { font-size: 11px; font-weight: 700; margin-right: 2px; }
.ch-tag { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.ch-tag.is-new { background: #fff1dc; color: #b5361d; }
.ch-tag.is-ability { background: #efe9ff; color: #5a3fa0; }
.ch-tag.is-more { color: var(--muted); }
/* 進化の質問：ペットの小さな姿と、吹き出し */
.pet-ask { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.pet-ask-face { width: 64px; height: 64px; overflow: hidden; border-radius: 14px; background: var(--surface-2); position: relative; }
.pet-ask-face .pet-ai, .pet-ask-face svg { width: 100%; height: 100%; }
.pet-ask-face .pet-ai-shadow { display: none; }
.pet-ask-face .pet-imgwrap { width: 100%; height: 100%; animation: none; }
.pet-ask-face img { width: 100%; height: 100%; object-fit: contain; }
.pet-ask-bubble { position: relative; display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #ffb347 16%, var(--surface)); }
.pet-ask-bubble::before { content: ''; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.pet-ask-bubble b { font-size: 16px; line-height: 1.45; }
.pet-ask-bubble span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .pet-art.is-ready::before, .pet-evolve-btn { animation: none; } }

/* 食事の記録：食品の行（タップで栄養の数字を直す）・栄養の手入力・マイ食品 */
.ml-item { grid-template-columns: minmax(0, 1fr) auto auto; }
.ml-item-name { display: grid; min-width: 0; gap: 1px; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ml-item-name b { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ml-item-name .chip { flex: 0 0 auto; }
.ml-item-nut { display: flex; gap: 6px; align-items: baseline; font-variant-numeric: tabular-nums; }
.ml-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-item-more { flex: 0 0 auto; color: var(--accent); font-style: normal; font-size: 11px; }
.ml-item-nut { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ml-item-edit .link, .ml-ff .link, .ml-manual-in .link, .ml-mine-link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.ml-item.is-open { background: var(--surface-3, var(--surface-2)); outline: 1px solid var(--line-strong); }
.ml-item-edit { grid-column: 1 / -1; display: grid; gap: 8px; padding: 8px 0 2px; border-top: 1px solid var(--line); }
.ml-item-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ml-nutin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ml-nutin label { display: grid; gap: 3px; min-width: 0; }
.ml-nutin-f { display: flex; align-items: center; gap: 3px; height: 38px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.ml-nutin-f input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--ink); font: 700 15px/1 var(--font); font-variant-numeric: tabular-nums; text-align: right; }
.ml-nutin-f input:focus { outline: none; }
.ml-nutin-f:focus-within { border-color: var(--accent); }
.ml-nutin-f small { font-size: 11px; color: var(--muted); }
.ml-ff-auto { justify-self: start; text-align: left; }
.ml-ff { display: grid; gap: 10px; }
.ml-ff-amount { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 8px; }
.ml-ff-save { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.ml-ff-save input { margin-top: 3px; flex: 0 0 auto; }
.ml-manual-in { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.ml-manual-btn svg { width: 16px; height: 16px; }
.ml-tip { margin: 0; }
.ml-detail-pfc { display: block; }
.ml-mine-link { justify-self: center; margin-top: 2px; }
.ml-mine-list { display: grid; gap: 6px; }
.ml-mine-row { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.ml-mine-row > span:first-child { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

/* 鍛えた部位・回復：3段階（緑＝十分・鍛えてOK／黄＝もう少し・軽めならOK／赤＝少ない・回復中）。色だけにせず文字も出す */
:root { --lv-good: #239b85; --lv-mid: #d4a017; --lv-low: #cf3b2c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lv-good: #2aa58a; --lv-mid: #d2a533; --lv-low: #dd4f3c; } }
:root[data-theme="dark"] { --lv-good: #2aa58a; --lv-mid: #d2a533; --lv-low: #dd4f3c; }
.muscle .m { fill: var(--heat-0); }
.muscle .m.lv-good { fill: var(--lv-good); }
.muscle .m.lv-mid { fill: var(--lv-mid); }
.muscle .m.lv-low { fill: var(--lv-low); }
.lv-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.lv-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lv-legend i { width: 10px; height: 10px; border-radius: 3px; }
.lv-legend i.lv-good, .part-bar.lv-good .track > span { background: var(--lv-good); }
.lv-legend i.lv-mid, .part-bar.lv-mid .track > span { background: var(--lv-mid); }
.lv-legend i.lv-low, .part-bar.lv-low .track > span { background: var(--lv-low); }
.part-bar { grid-template-columns: 5.5em minmax(0, 1fr) 3.6em 4.6em; }
.part-bar .track { position: relative; overflow: visible; }
.part-bar .track > span { border-radius: 999px; }
.part-bar .track > b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); opacity: .55; }
.part-bar .v small { color: var(--muted); font-size: 11px; }
.lv-tag { justify-self: start; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.lv-good .lv-tag { color: var(--lv-good); background: color-mix(in srgb, var(--lv-good) 14%, transparent); }
.lv-mid .lv-tag { color: color-mix(in srgb, var(--lv-mid) 75%, var(--ink)); background: color-mix(in srgb, var(--lv-mid) 18%, transparent); }
.lv-low .lv-tag { color: var(--lv-low); background: color-mix(in srgb, var(--lv-low) 14%, transparent); }
.rec-list { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.rec-list li { display: grid; grid-template-columns: 5.5em auto minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.rec-list li .muted { text-align: right; font-variant-numeric: tabular-nums; }

/* 栄養の入力：糖質・食物繊維は炭水化物の内訳。詳細はビタミン・ミネラル */
.ml-nutblock { display: grid; gap: 8px; }
.ml-nutin label.sub .xsmall { padding-left: 2px; }
.ml-nutin label.sub .ml-nutin-f { background: var(--surface-2); }
.ml-micro-toggle { justify-self: start; }
.ml-micro-in { padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.ml-micro-in[hidden] { display: none; }
.ml-micro-in .ml-nutin-f { height: 34px; }
.ml-micro-in .ml-nutin-f input { font-size: 14px; }
.ml-item-nut { white-space: normal; overflow: visible; }

/* 食事ごとの栄養の表 */
.ml-mtable { margin-top: 10px; }
.ml-mtable summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; padding: 4px 0; }
.ml-mtable-t { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-mtable-t th, .ml-mtable-t td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.ml-mtable-t .num { text-align: right; }
.ml-mtable-t thead th { color: var(--muted); font-weight: 600; font-size: 11px; }
.ml-mtable-t tbody th { font-weight: 500; display: grid; max-width: 9em; }
.ml-mtable-name { overflow: hidden; text-overflow: ellipsis; }
.ml-mtable-t tfoot th, .ml-mtable-t tfoot td { font-weight: 800; border-bottom: 0; }

/* 栄養素ごとのグラフ・書き出し */
.ml-tr-nut { height: 38px; }
.ml-tr-avg { margin: 0; }
.ml-export { display: grid; gap: 10px; }
.ml-export-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.ml-export-range .input { min-width: 0; }
.ml-export-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ml-export-btns .btn { flex: 1; justify-content: center; }
.ml-mtable, .ml-mtable .table-wrap { min-width: 0; max-width: 100%; }
.ml-mtable .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ml-mtable-t tbody th, .ml-mtable-t thead th:first-child, .ml-mtable-t tfoot th { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.ml-export-range .input { font-size: 14px; padding-left: 8px; padding-right: 6px; }

/* 減量・増量の期間（からだの画面・繰り返しで作る） */
.pp { display: grid; gap: 10px; }
.pp-list { display: grid; gap: 8px; }
.pp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pp-row.is-past { opacity: .6; }
.pp-chip { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; background: var(--muted); }
.pp-chip.down { background: var(--pfc-f); }
.pp-chip.up { background: var(--accent); }
.pp-chip.flat { background: var(--ink-2); color: var(--surface); }
.pp-body { display: grid; gap: 2px; min-width: 0; }
.pp-state { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.pp-acts { display: flex; gap: 2px; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-actions .btn svg { width: 16px; height: 16px; }
.pp-form .input { min-width: 0; }
.pp-field { display: grid; gap: 4px; min-width: 0; }
.pp-field[hidden] { display: none; }
.pp-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pp-dates .input[type="date"] { font-size: 14px; padding-left: 8px; padding-right: 6px; }
.pp-lens { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-pace { margin: 0; display: grid; gap: 4px; }
.pp-warn { color: var(--warning); }
.pp-steps { display: grid; gap: 8px; }
.pp-step { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "no type type del" "no kg len len"; align-items: center; gap: 6px 8px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.pp-step > .pp-step-no { grid-area: no; } .pp-step > select { grid-area: type; } .pp-step > .pp-step-kg { grid-area: kg; } .pp-step > .pp-step-len { grid-area: len; } .pp-step > .btn { grid-area: del; }
.pp-step .input { height: 38px; padding: 0 6px; font-size: 14px; }
.pp-step-no { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font-weight: 700; }
.pp-step-kg, .pp-step-len { display: flex; align-items: center; gap: 3px; min-width: 0; }
.pp-step-kg .input { width: 100%; }
.pp-step-len .input:first-child { width: 52px; flex: 0 0 auto; }
.pp-step-len select { flex: 1; min-width: 0; }
.pp-times { grid-template-columns: auto 80px; align-items: center; gap: 10px; }
.pp-preview { display: grid; gap: 8px; }

.mlx-stale, .ml-stale { padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--ink); }
.ml-stale .link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.mlx-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.mlx-save label { display: inline-flex; align-items: center; gap: 6px; }
.mlx-from { width: 150px; height: 34px; font-size: 14px; }
.mlx-save .link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-align: left; }

/* 食事の画面：目標・期間の入口 */
.ml-goal-btn { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 700 13px/1 var(--font); cursor: pointer; white-space: nowrap; }
.ml-phase-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--ink); }
.ml-phase-chip.down { background: color-mix(in srgb, var(--pfc-f) 22%, transparent); }
.ml-phase-chip.up { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ml-phase-chip small { font-weight: 500; color: var(--ink-2); }
.ml-goal-h { margin: 6px 0 0; font-size: 15px; }
.ml-goal-phases { display: grid; gap: 8px; }

/* 食事の画面：今の設定（目標・期間） */
.ml-set { display: grid; gap: 10px; }
.ml-set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ml-set-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--ink); }
.ml-set-row { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ml-set-k { color: var(--muted); font-weight: 600; line-height: 1.4; }
.ml-set-v { display: grid; gap: 2px; min-width: 0; }
.ml-set-row.is-missing .ml-set-v > b { color: var(--warning); }

/* ホーム：設定のお知らせ */
.home-setup { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; background: var(--warning-soft); }
.home-setup-link { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.home-setup-close { padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 12px/1 var(--font); cursor: pointer; white-space: nowrap; }
/* からだ：今の期間のひとこと */
.pp-now { margin: 0; font-weight: 700; }
.pp-now.is-missing { padding: 8px 10px; border-radius: 10px; background: var(--warning-soft); font-weight: 600; }

/* スタッフ：お客様の見出しの「今の設定」 */
.cust-setting { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cust-setting a { color: inherit; text-decoration: none; }
.cust-unset { color: var(--warning); font-weight: 700; }

/* 食事：4つのタブ・進み具合・お知らせ・目標タブ */
.ml-tabs button { padding-left: 10px; padding-right: 10px; position: relative; }
.ml-tab-dot { position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ml-progress { display: grid; gap: 8px; width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ml-pr-row { display: grid; grid-template-columns: 5.4em minmax(0, 1fr); gap: 8px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.ml-pr-k { color: var(--muted); font-weight: 600; }
.ml-pr-warn { color: var(--warning); font-weight: 700; }
.ml-pr-tone { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.ml-pr-tone.good { background: var(--good-soft); color: var(--good); }
.ml-pr-tone.warning, .ml-pr-tone.serious { background: var(--warning-soft); color: var(--warning); }
.ml-notices { display: grid; gap: 8px; }
.ml-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--warning-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ml-notice b { color: var(--accent-ink); white-space: nowrap; }
.ml-goal { display: grid; gap: 14px; }
.ml-phase { display: grid; gap: 10px; }
.ml-ph-weights { display: flex; align-items: flex-end; gap: 18px; }
.ml-ph-weights span { display: grid; gap: 2px; }
.ml-ph-weights small { color: var(--muted); font-size: 11px; }
.ml-ph-weights b { font-size: 22px; font-weight: 800; }
.ml-ph-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-3); }
.ml-ph-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.ml-ph-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .7; }
.ml-ph-lines { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.ml-phase .btn { justify-self: start; }
.ml-week-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ml-week-tiles .ml-tr-stat { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ml-hist summary { cursor: pointer; }

/* 目標を手動で決める（PFCバランス・数値） */
.te-mark { font-weight: 800; font-size: 14px; }
.te { gap: 14px; }
.te-kcal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.te-kcal-in { display: inline-flex; align-items: baseline; gap: 6px; }
.te-kcal { width: 120px; height: 48px; font-size: 26px; font-weight: 800; text-align: right; }
.te-bumps, .te-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.te-bumps .btn { flex: 1; justify-content: center; }
.te-sliders { display: grid; gap: 12px; }
.te-slider { display: grid; gap: 6px; }
.te-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.te-range { width: 100%; accent-color: var(--c); height: 28px; }
.te-warn { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); }
.te-warn[hidden] { display: none; }
.te-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.te-more label { display: grid; gap: 4px; }
.te-unit { display: flex; align-items: center; gap: 4px; }
.te-unit .input { min-width: 0; }
.te-unit small { color: var(--muted); white-space: nowrap; }
.te-from-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.te-from-row label { display: inline-flex; align-items: center; gap: 6px; }
.te-from { width: 150px; height: 34px; font-size: 14px; }
.te-from-row .link, .te-info .link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-align: left; }
.te-info { display: grid; gap: 6px; }
.te-field { display: grid; gap: 3px; min-width: 0; }
.gw-mkphase { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }

/* 目標と期間（期間ごとの食事の目標・からだと生活） */
.pl { display: grid; gap: 12px; }
.pl-head { display: grid; gap: 2px; margin-top: 4px; }
.pl-profile { display: grid; gap: 6px; }
.pl-missing { color: var(--warning); font-weight: 600; }
.pl-missing .link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.pl-period { display: grid; gap: 8px; }
.pl-period.is-current { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pl-period.is-past { opacity: .65; }
.pl-row1 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.pl-title { display: grid; gap: 2px; min-width: 0; }
.pl-title b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-tag { padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700; }
.is-current .pl-tag { background: var(--accent); color: #fff; }
.pl-warn { margin: 0; color: var(--warning); }
.pl-meal { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pl-meal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-mode { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; }
.pl-edit { margin-left: auto; }
.pl-tgt { font-size: 15px; font-variant-numeric: tabular-nums; }
.pl-period-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-period-acts .btn svg { width: 15px; height: 15px; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-actions .btn svg { width: 16px; height: 16px; }
.pl-hist summary { cursor: pointer; }
.pl-modes { display: flex; }
.pl-modes button { flex: 1; }
.pl-pane { display: grid; gap: 12px; }
.pl-goal { display: grid; gap: 6px; }
.pl-goal .segmented { display: flex; }
.pl-goal .segmented button { flex: 1; }
.pl-auto { display: grid; gap: 8px; }
.pl-mealsheet .te-kcal-row .xsmall { margin-left: auto; }
.pp-link { justify-self: start; }
.ml-goal-rest { display: grid; gap: 14px; margin-top: 14px; }

.pl-start { display: grid; gap: 10px; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pl-wz-link { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-align: left; }
.pl-sect { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pl-editor { display: grid; gap: 12px; }
.te-pct { display: inline-flex; align-items: center; gap: 4px; }
.te-pct .input { width: 58px; height: 32px; padding: 0 6px; font-size: 15px; text-align: right; }
.te-pct b { min-width: 3.4em; text-align: right; }

/* からだと生活：数字のタイルと、項目と答え */
.pl-profile { gap: 12px; }
.pl-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.pl-stat { display: grid; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--surface-2); text-align: center; min-width: 0; }
.pl-stat b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.pl-stat b small { margin-left: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.pl-stat.is-empty b { color: var(--warning); }
.pl-stat-hint { font-size: 10px; color: var(--muted); line-height: 1.2; }
/* 今の期間への助言（目標に届いた・遅れている・維持期のすすめ） */
.pl-advice { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pl-advice p { margin: 0; line-height: 1.6; }
.pl-advice.is-good { background: var(--good-soft); }
.pl-advice.is-good > b { color: var(--good); }
.pl-advice.is-warn { background: var(--warning-soft); }
.pl-advice-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-rows { display: grid; margin: 0; }
.pl-rows > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.pl-rows dt { font-weight: 600; }
.pl-rows dd { margin: 0; }

/* 次の食事の目安 */
.ml-progress { width: auto; cursor: default; }
.ml-pr-more { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; justify-self: start; }
.ml-next { display: grid; gap: 8px; margin-top: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.ml-next-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.ml-next-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ml-next-opt .btn { flex: 0 0 auto; }

/* =========================================================
   冒険（ルミナリア）：カード・地図・出発・記録・持ち物
   珍しさは色の枠と淡い背景で（左のふちの色帯は使わない）
   ========================================================= */
:root { --rare-2: #2e8b57; --rare-3: #5a4fc7; --rare-4: #b8860b; --rare-2-soft: #e2f3ea; --rare-3-soft: #e9e7fb; --rare-4-soft: #f8efd6; --rare-5: #b0244a; --rare-5-soft: #fbe3ea; --rare-6: #0f7f8c; --rare-6-soft: #dcf3f4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rare-6: #5fd6df; --rare-6-soft: #10302f; --rare-5: #f07a98; --rare-5-soft: #3a1522; --rare-2: #4cc28a; --rare-3: #9a92f2; --rare-4: #e0b74a; --rare-2-soft: #14301f; --rare-3-soft: #24213f; --rare-4-soft: #352a10; } }
:root[data-theme="dark"] { --rare-6: #5fd6df; --rare-6-soft: #10302f; --rare-2: #4cc28a; --rare-3: #9a92f2; --rare-4: #e0b74a; --rare-2-soft: #14301f; --rare-3-soft: #24213f; --rare-4-soft: #352a10; --rare-5: #f07a98; --rare-5-soft: #3a1522; }

.wd-card { display: grid; gap: 10px; }
.wd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wd-card p { margin: 0; }
.wd-progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wd-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rare-3), var(--accent)); transition: width .4s; }
.wd-light { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--rare-4-soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.wd-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wd-links .link { padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }

.wd-map { display: grid; gap: 10px; }
.wd-town { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--rare-4-soft); text-align: center; }
.wd-region { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-region:disabled { cursor: default; }
.wd-region:not(:disabled):hover { border-color: var(--line-strong); }
.wd-region.is-locked { opacity: .55; }
.wd-region-art { width: 76px; height: 76px; border-radius: 10px; background: linear-gradient(135deg, var(--teal-soft), var(--rare-3-soft)) center / cover no-repeat; image-rendering: pixelated; }
.wd-region-text { display: grid; gap: 3px; min-width: 0; }
.wd-region-text b { font-size: 15px; }
.wd-region-text b small { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
/* カードはどれも同じ高さ：説明は2行まで。期間・ボスは右上の札 */
.wd-region { position: relative; min-height: 98px; }
.wd-region.has-tag .wd-region-text b { padding-right: 70px; }
.wd-region-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-region-desc.is-1 { -webkit-line-clamp: 1; }
.wd-corner { position: absolute; top: 8px; right: 10px; padding: 1px 8px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: 10px; font-weight: 800; }
.wd-corner.is-boss { background: #5a2a8a; color: #fff; }
/* 出現中のネームド（フィールドの上の欄） */
/* いま出ているネームドのアイコン（フィールドのカード・難易度を選ぶ画面）。戦闘中は暗く、ワールドボスは金のふち */
.wd-nm-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.wd-nm-icons i { display: grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.wd-nm-icons img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wd-nm-icons i.is-wb { border-color: #d9a43a; box-shadow: 0 0 0 1px #d9a43a; }
.wd-nm-icons i.is-fight img { opacity: .4; }
.wd-nm-icons small { color: var(--muted); font-size: 11px; }
/* 難易度を選ぶ画面 */
.tier-list { display: grid; gap: 8px; }
.tier-row { display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tier-row.is-rec { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier-head { display: flex; align-items: center; gap: 8px; }
.tier-name { font-size: 15px; letter-spacing: .08em; }
.tier-row.t1 .tier-name { color: #2f9a52; } .tier-row.t2 .tier-name { color: #1f8f8a; } .tier-row.t3 .tier-name { color: #3a6fd0; }
.tier-row.t4 .tier-name { color: #c9770e; } .tier-row.t5 .tier-name { color: #d2432c; } .tier-row.t6 .tier-name { color: #8a4bd0; }
.tier-tag { padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; }
.tier-tag.is-last { background: var(--surface-3); color: var(--ink-2); }
.tier-meta { color: var(--ink-2); font-size: 12px; }
.tier-pen { color: var(--accent-ink); font-size: 11px; }
.tier-none { color: var(--muted); font-size: 11px; }
.tier-row .wd-nm-icons { margin-top: 2px; }
.wd-nm-sec { display: grid; gap: 8px; margin-bottom: 6px; }
.wd-nm-list { display: grid; gap: 6px; }
.wd-nm-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-nm-art { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.wd-nm-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wd-nm-text { display: grid; gap: 1px; min-width: 0; }
.wd-nm-text b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.wd-nm-text small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wd-nm-state { flex: none; padding: 1px 8px; border-radius: 999px; background: #b5361d; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.wd-nm-state.is-fight { background: #6a5a4a; }
.wd-here { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-top: 2px; }
.wd-here img { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); object-fit: contain; image-rendering: pixelated; }
.wd-here .xsmall { margin-left: 4px; color: var(--ink-2); }

.wd-depart p { margin: 0; }
.wd-field { display: grid; gap: 6px; }
.wd-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-take { display: inline-flex; align-items: center; gap: 6px; }
.wd-take .wd-icon { width: 20px; height: 20px; }

.wd-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); flex: none; }
.wd-icon img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wd-icon i { width: 45%; height: 45%; border-radius: 50%; background: var(--line-strong); }
.wd-icon.r2 { border-color: var(--rare-2); background: var(--rare-2-soft); }
.wd-icon.r2 i { background: var(--rare-2); }
.wd-icon.r3 { border-color: var(--rare-3); background: var(--rare-3-soft); }
.wd-icon.r3 i { background: var(--rare-3); }
.wd-icon.r4 { border-color: var(--rare-4); background: var(--rare-4-soft); box-shadow: 0 0 0 2px var(--rare-4-soft); }
.wd-icon.r4 i { background: var(--rare-4); }
/* 神話（黙示録の騎士の装備・証） */
.wd-icon.r5 { border-color: var(--rare-5); background: var(--rare-5-soft); box-shadow: 0 0 0 2px var(--rare-5-soft), 0 0 10px color-mix(in srgb, var(--rare-5) 45%, transparent); }
.wd-icon.r6 { border-color: var(--rare-6); background: var(--rare-6-soft); box-shadow: 0 0 0 2px var(--rare-6-soft), 0 0 12px color-mix(in srgb, var(--rare-6) 50%, transparent); }
.wd-icon.r6 i { background: var(--rare-6); }
.wd-icon.r5 i { background: var(--rare-5); }
.wd-icon.empty { border-style: dashed; background: none; }
.wd-icon.empty i { background: none; }
.wd-rare { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.wd-rare.r2 { background: var(--rare-2-soft); color: var(--rare-2); }
.wd-rare.r3 { background: var(--rare-3-soft); color: var(--rare-3); }
.wd-rare.r4 { background: var(--rare-4-soft); color: var(--rare-4); }
.wd-rare.r5 { background: var(--rare-5-soft); color: var(--rare-5); }
.wd-rare.r6 { background: var(--rare-6-soft); color: var(--rare-6); }
/* 装備レベルが足りず、つけていても効かない */
.wd-off { color: var(--warning); }
.wd-slot.is-off .wd-icon { opacity: .45; filter: grayscale(.8); }
.wd-fx { color: var(--rare-5); font-weight: 700; }

.wd-result p { margin: 0; }
.wd-party { display: grid; gap: 6px; }
.wd-party-list { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-mate { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.wd-mate img, .wd-mate i { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); object-fit: contain; image-rendering: pixelated; }
.wd-log { display: grid; gap: 8px; margin: 0; padding: 12px; border-radius: 12px; background: var(--surface-2); list-style: none; }
.wd-line { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.6; }
.wd-line.big { font-weight: 700; }
.wd-line.light, .wd-line.ability { color: var(--accent-ink); }
.wd-line.early, .wd-line.trap { color: var(--ink-2); }
.wd-mon { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; flex: none; }
.wd-loot-head { display: flex; align-items: baseline; justify-content: space-between; }
.wd-loot { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.wd-loot-item { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.wd-loot-item .wd-icon { width: 44px; height: 44px; }

.wd-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wd-slot { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.wd-items { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wd-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.wd-item-text { display: grid; gap: 2px; min-width: 0; }
.wd-item-text b small { margin-left: 6px; font-weight: 600; color: var(--muted); }
.wd-item .btn { white-space: nowrap; }
.wd-solo { display: flex; align-items: flex-start; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink-2); }
.wd-solo input { margin-top: 3px; }

/* 冒険 第2段階：ワールドボス・お礼スタンプ・工房・図鑑 */
.wd-boss { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--rare-3-soft); }
.wd-boss p { margin: 0; }
.wd-boss-top { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.wd-boss-art { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: var(--surface); }
.wd-boss-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wd-boss-text { display: grid; gap: 4px; min-width: 0; }
.wd-boss-text b { font-size: 16px; }
.wd-boss-hp { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wd-boss-hp i { display: block; height: 100%; border-radius: 999px; background: var(--rare-3); transition: width .4s; }
.wd-boss.is-down { background: var(--rare-4-soft); }
.wd-boss.is-down .wd-boss-art img { filter: grayscale(1); opacity: .6; }
.wd-mate small { min-width: 14px; font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; }
.wd-mate.is-me { outline: 1.5px solid var(--rare-3); }
.wd-boss-mark { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--rare-3-soft); color: var(--rare-3); font-size: 11px; font-weight: 700; }
.wd-reward { display: grid; gap: 8px; }
.wd-card .wd-last { justify-self: start; padding: 0; border: 0; background: none; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.wd-reward p { margin: 0; }
/* 持ち物：道具で効いているもの（お肉・クローバー） */
.wd-buffs { display: grid; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.wd-buff { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wd-buff img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.wd-mate-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wd-stamp-send { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.wd-recipe { align-items: start; }
.wd-need { display: flex; gap: 4px 10px; flex-wrap: wrap; margin-top: 2px; }
.wd-need-one { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); }
.wd-need-one.is-short { color: var(--muted); }
/* 工房：数を選んで、まとめて作る（「作る」で、その行の下に開く） */
.wd-recipe.is-open { border-color: var(--line-strong); }
.wd-craft-pick { grid-column: 1 / -1; display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.wd-craft-row { display: flex; align-items: center; gap: 6px; }
.wd-craft-row .stepper { flex: 1; min-width: 0; }
.wd-craft-row .btn.sm { height: 40px; }
.wd-craft-use { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.wd-craft-use .wd-need { margin-top: 0; }
.wd-icon.sm { width: 18px; height: 18px; border-radius: 5px; }
/* 文章ページ用の .lg（上下の余白・行の高さ）が、大きい絵の枠に当たらないように */
.wd-icon.lg, .wd-mon-art.lg { padding: 0; line-height: normal; }
.wd-dex-event { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid rgba(230, 120, 40, .45); border-radius: 14px; background: linear-gradient(135deg, rgba(255, 150, 60, .1), rgba(120, 60, 160, .08)); }
.wd-dex-bar { position: relative; height: 8px; overflow: hidden; border-radius: 4px; background: rgba(0, 0, 0, .1); }
.wd-dex-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: linear-gradient(90deg, #e8782a, #ffc24a); }
.wd-breed-special.is-nm { background: #e0b74a; color: #1a1916; }
.wd-chip-icon { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }
.wd-dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.wd-dex-one { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.wd-dex-one.is-boss { background: var(--rare-3-soft); }
.wd-dex-art { display: grid; place-items: center; width: 64px; height: 64px; }
.wd-dex-art img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: pixelated; }
.wd-dex-art i { width: 40%; height: 40%; border-radius: 50%; background: var(--line-strong); }
.wd-dex-one.is-unknown .wd-dex-art img { filter: brightness(0); opacity: .35; }
.wd-dex-one.is-unknown b { color: var(--muted); }

/* 冒険 第3段階：季節のイベント・特典の引換券 */
.wd-event { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--warning-soft); }
.wd-event > div { display: grid; gap: 2px; min-width: 0; }
.wd-event .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wd-event-mark { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: 11px; font-weight: 700; }
.wd-ticket-btn { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--rare-4); border-radius: 14px; background: var(--rare-4-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-ticket { display: grid; justify-items: center; gap: 6px; padding: 16px; border: 2px dashed var(--rare-4); border-radius: 16px; background: var(--rare-4-soft); text-align: center; }
.wd-ticket b { font-size: 17px; }
.wd-ticket-code { font-size: 32px; font-weight: 800; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.wd-line.prize { padding: 6px 8px; border-radius: 10px; background: var(--rare-4-soft); color: var(--ink); font-weight: 800; }
.pet-prize-list { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.pet-prize { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--rare-4); border-radius: 12px; background: var(--rare-4-soft); }
.pet-prize > div { display: grid; gap: 2px; }
.pet-prize.is-done { border-color: var(--line); background: var(--surface-2); }
.pet-prize-code { font-size: 15px; font-weight: 800; letter-spacing: .12em; }
.prize-legal { padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); }

/* ---------- 仲間のモンスター（牧場・くわしく） ---------- */
.wd-mon-art { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); flex: none; }
.wd-mon-art img { width: 100%; height: 100%; object-fit: contain; }
.wd-mon-art i { width: 40%; height: 40%; border-radius: 50%; background: var(--line-strong); }
.wd-mon-art.sm { width: 28px; height: 28px; border-radius: 8px; }
.wd-mon-art.lg { width: 96px; height: 96px; overflow: hidden; border-radius: 18px; }
.wd-mon-art.lg img { max-width: 100%; max-height: 100%; }
.wd-farm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wd-note { padding: 8px 10px; border-radius: 10px; background: var(--warning-soft); }
.wd-going { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-going-one { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 1.5px solid var(--accent); border-radius: 14px; background: var(--accent-soft); color: var(--ink); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.wd-going-one b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-going-one.is-empty { border: 1.5px dashed var(--line-strong); background: none; cursor: default; }
.wd-farm-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wd-farm-one { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: 14px; }
.wd-farm-one.is-going { border-color: var(--accent); }
.wd-farm-one .btn { white-space: nowrap; }
.wd-farm-main { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wd-farm-text { display: grid; gap: 2px; min-width: 0; }
.wd-farm-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-farm-text b small { margin-left: 6px; color: var(--muted); font-weight: 600; }
.wd-farm-empty { padding: 16px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.wd-exp { display: block; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wd-exp i { display: block; height: 100%; border-radius: 999px; background: var(--good); }
.wd-mates-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-mate-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-2); }
.wd-mate-chip small { color: var(--muted); }
.wd-mates-edit { margin-left: auto; color: var(--accent-ink); font-weight: 700; }
.wd-mon-top { display: flex; align-items: center; gap: 14px; }
.wd-mon-id { display: grid; gap: 3px; min-width: 0; flex: 1; }
.wd-mon-id b { font-size: 17px; }
.wd-mon-hpmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-mon-hpmp span { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-mon-hpmp small { color: var(--muted); font-weight: 700; }
.wd-mon-hpmp b { font-size: 17px; font-variant-numeric: tabular-nums; }
.wd-mon-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.wd-mon-stats li { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(28px, auto); align-items: center; gap: 6px; }
.wd-statnum { white-space: nowrap; }
.wd-statnum .pet-bonus { margin-left: 2px; font-size: 10px; }
.wd-mon-stats b { text-align: right; font-variant-numeric: tabular-nums; }
.wd-bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wd-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink-2); }
.wd-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-skill { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; }
.wd-skill.magic, .wd-skill.breath { background: var(--accent-soft); color: var(--accent-ink); }
.wd-skill.heal, .wd-skill.buff { background: var(--good-soft); color: var(--good); }
.wd-skill.ailment { background: var(--warning-soft); color: var(--warning); }
.wd-skill.is-unknown { border: 1px dashed var(--line-strong); background: none; color: var(--muted); }
.wd-res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.wd-res-one { display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); }
.wd-res-one b { font-weight: 700; color: var(--muted); }
.wd-res-one.is-weak { background: var(--serious-soft); }
.wd-res-one.is-weak b { color: var(--serious); }
.wd-res-one.is-strong { background: var(--good-soft); }
.wd-res-one.is-strong b { color: var(--good); }
.wd-res-one.is-null { background: var(--teal-soft); }
.wd-res-one.is-null b { color: var(--teal); }
.wd-mon-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-release { justify-self: center; padding: 6px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.wd-tame { font-size: 10px; letter-spacing: -.05em; color: var(--warning); }
.wd-tame i { font-style: normal; color: var(--line-strong); opacity: .9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wd-tame i { color: #6f6a5e; } }
:root[data-theme="dark"] .wd-tame i { color: #6f6a5e; }
.wd-tamed { padding: 0 6px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: 10px; font-weight: 700; }
.wd-line.recruit { padding: 6px 8px; border-radius: 10px; background: var(--good-soft); color: var(--ink); }
.wd-line.mate { color: var(--good); }
.wd-mates-pick.is-static { cursor: default; }

/* ---------- わざ（スキルと特技） ---------- */
.wd-linebox { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.wd-linebox + .wd-linebox { margin-top: 8px; }
.wd-linebox summary { display: flex; align-items: center; gap: 6px; padding: 10px 0; cursor: pointer; list-style: none; }
.wd-linebox summary::-webkit-details-marker { display: none; }
.wd-linebox summary::after { content: '›'; margin-left: 4px; color: var(--muted); transition: transform .15s; }
.wd-linebox[open] summary::after { transform: rotate(90deg); }
.wd-linebox .wd-count { margin-left: auto; }
.wd-linebox > p { margin: 0 0 8px; }
.wd-linebox.is-sp { border-color: var(--rare-4); background: var(--rare-4-soft); }
.wd-from { color: var(--accent-ink); font-weight: 600; }
.wd-skill-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.wd-skill-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 8px; }
.wd-skill-row > div { display: grid; gap: 1px; min-width: 0; }
.wd-skill-row .wd-skill { padding: 2px 0; font-size: 10px; white-space: nowrap; text-align: center; }
.wd-skill.ws { background: var(--rare-3-soft); color: var(--ink); }
.wd-skill.song, .wd-skill.dance, .wd-skill.roll, .wd-skill.geo, .wd-skill.rune { background: var(--teal-soft); color: var(--teal); }
.wd-skill.trait { background: var(--surface-3); color: var(--ink-2); }
.wd-skill.sp { background: var(--rare-4); color: #fff; }
.wd-skill.summon, .wd-skill.puppet { background: var(--rare-3-soft); color: var(--rare-3); }
.wd-skill.raise { background: var(--good-soft); color: var(--good); }
.wd-newskill { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--rare-4-soft); }
.wd-newskill > div { display: grid; gap: 2px; min-width: 0; }
.wd-newskill .btn { white-space: nowrap; }

/* ---------- ペットのページ：ようす・育成・冒険・記録（食事のページと同じ切りかえ） ---------- */
.pet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pet-tabs button { position: relative; padding-left: 10px; padding-right: 10px; }
.pet-tab-dot { position: absolute; top: 4px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pet-notices { display: grid; padding: 4px 0; overflow: hidden; }
.pet-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pet-notice:first-child { border-top: 0; }
.pet-notice-go { flex: none; color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.pet-mini-adv { display: grid; gap: 4px; width: 100%; border: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pet-mini-top { display: flex; align-items: baseline; justify-content: space-between; }
.pet-mini-bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pet-mini-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pet-skilltree { display: grid; gap: 10px; }
.pet-tree { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pet-tree-src { display: grid; gap: 6px; }
.pet-src { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; }
.pet-src > div { min-width: 0; }
.pet-src p { margin: 2px 0 0; }
.pet-src-tag { min-width: 40px; padding: 2px 8px; border-radius: 6px; background: var(--rare-4-soft); color: var(--ink); font-size: 11px; font-weight: 700; text-align: center; }
.pet-src-tag.is-stat { background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); }
.pet-tree-line { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pet-tree-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pet-tree-name .xsmall { margin-left: auto; }
.pet-tree-arrow { color: var(--accent-ink); font-weight: 700; }
.pet-tree-skills { display: grid; gap: 8px; }
.pet-skill { position: relative; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pet-skill.ws { border-color: var(--rare-3); }
.pet-skill.magic, .pet-skill.breath { color: var(--accent-ink); }
.pet-skill.heal, .pet-skill.raise, .pet-skill.buff { color: var(--good); }
.pet-skill.song, .pet-skill.dance, .pet-skill.roll, .pet-skill.geo, .pet-skill.rune { color: var(--teal); }
.pet-skill.trait { color: var(--ink-2); border-style: dashed; }
.pet-skill.sp { border-color: var(--rare-4); background: var(--rare-4-soft); }
.pet-skill.is-new::after { content: 'NEW'; position: absolute; top: -7px; right: -4px; padding: 0 4px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.pet-tree.is-sp .pet-tree-line { background: var(--rare-4-soft); }
.wd-mates-card { display: grid; gap: 8px; }

/* わざのくわしい中身（効果・威力・補正・消費） */
.sk-card { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sk-card.is-new { border-color: var(--accent); }
.sk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sk-top .wd-skill { padding: 1px 8px; font-size: 10px; }
/* わざの共鳴の色札（戦闘の .fb-sc と同じ見た目）。2色は並べて、途中で折り返さない */
.sk-sc { display: inline-flex; flex: none; flex-wrap: nowrap; gap: 2px; white-space: nowrap; }
.sk-sc .fb-sc { margin: 0; }
.ch-tag .sk-sc { margin-left: 4px; vertical-align: 1px; }
.sk-new { padding: 0 6px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.sk-desc { margin: 0; }
.sk-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; margin: 2px 0 0; font-size: 12px; }
.sk-info dt { color: var(--muted); white-space: nowrap; }
.sk-info dd { margin: 0; color: var(--ink); white-space: pre-line; }
.pet-boost { padding: 1px 8px; border-radius: 999px; background: var(--rare-4-soft); color: var(--ink); font-size: 11px; font-weight: 700; }
.wd-skill-list > li { list-style: none; }

/* 冒険のタブ：地図をそのまま並べる・持ち物の棚 */
.wd-map-inline { display: grid; gap: 8px; }
.wd-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.wd-shelf { display: grid; gap: 10px; }
.wd-shelf-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wd-shelf-tile { display: grid; gap: 2px; justify-items: center; padding: 12px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.wd-shelf-tile .xsmall { white-space: nowrap; }
.wd-last { justify-self: center; padding: 6px 12px; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.wd-map-inline .wd-region { grid-template-columns: 64px minmax(0, 1fr); padding: 8px; }
.wd-map-inline .wd-region-art { width: 64px; height: 64px; }
.wd-map-inline .wd-region-text > .xsmall.muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-more-regions { margin: 0; text-align: center; }

/* 冒険の記録：成績・日誌・戦いのログ */
.wd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-stats > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.wd-stats b small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.wd-stats-wide { grid-column: 1 / -1; }
.wd-diary-wrap { display: grid; gap: 6px; }
.wd-log-toggle { justify-self: end; padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.wd-diary .wd-line { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 6px; }
.wd-time { padding-top: 2px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.wd-line-body { display: grid; gap: 4px; min-width: 0; }
.wd-line-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.wd-tag { padding: 0 6px; border-radius: 4px; background: var(--rare-4-soft); color: var(--ink); font-size: 10px; font-weight: 800; }
.wd-battle { border-radius: 10px; background: var(--surface); }
.wd-battle summary { padding: 4px 8px; cursor: pointer; list-style: none; }
.wd-battle summary::-webkit-details-marker { display: none; }
.wd-blog { display: grid; gap: 2px; margin: 0; padding: 4px 8px 8px; list-style: none; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--ink); }
.wd-b-f { color: var(--serious); }
.wd-b-s { color: var(--accent-ink); font-weight: 700; }
.wd-b-k { color: var(--critical); font-weight: 700; }
.wd-b-w { color: var(--good); font-weight: 700; }
.wd-b-n { color: var(--muted); }

/* ワールドボスの結果（自分のペット＝朱色、ほかのペット＝灰色。数字より形で分かるように） */
.wd-bossres { display: grid; gap: 16px; }
.wd-bossres .wd-boss-top { padding: 12px; border-radius: 14px; background: var(--rare-3-soft); }
.wd-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11px; color: var(--ink-2); }
.wd-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wd-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--axis); }
.wd-legend i.is-me { background: var(--accent); }
.wd-legend i.is-avg { width: 2px; height: 12px; border-radius: 1px; background: var(--ink-2); }
.wd-legend i.is-left { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* MVP（分野ごとの1位からくじ） */
.wd-mvp { display: grid; grid-template-columns: auto 40px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--rare-4-soft); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-mvp.is-me { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd-mvp > img, .wd-mvp > i { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); object-fit: contain; image-rendering: pixelated; }
.wd-mvp > div { display: grid; gap: 1px; min-width: 0; }
.wd-mvp b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-mvp-tag { padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 900; letter-spacing: .06em; color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rare-4); }
/* 項目ごとの活躍（バーの右はし＝1位、縦の線＝平均） */
.wd-contrib { display: grid; gap: 8px; }
.wd-role { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.wd-role b { font-size: 18px; }
.wd-cb { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wd-cb li { display: grid; gap: 6px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-cb li.is-none { opacity: .6; }
.wd-cb-head { display: flex; align-items: center; gap: 6px; }
.wd-cb-head b { margin-left: auto; font-size: 16px; font-variant-numeric: tabular-nums; }
.wd-first { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; color: var(--ink); background: var(--rare-4-soft); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-cb-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); }
.wd-cb-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.wd-cb-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.wd-cb-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wd-cb-who { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.wd-cb-who img, .wd-cb-who i { width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); object-fit: contain; image-rendering: pixelated; flex: none; }
/* 日ごとのダメージ */
.wd-days { display: grid; gap: 8px; }
.wd-days-cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; border-bottom: 1px solid var(--line-strong); }
.wd-day { display: grid; justify-items: center; gap: 2px; padding: 4px 0 0; border: 0; border-radius: 8px 8px 0 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.wd-day.is-on { background: var(--surface-2); color: var(--ink); }
.wd-day.is-on small { font-weight: 800; }
.wd-day-flag { height: 14px; font-size: 10px; font-weight: 800; color: var(--ink-2); }
.wd-day-bar { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: 24px; height: 96px; }
.wd-day-bar i { flex: 0 1 auto; min-height: 2px; background: var(--axis); }
.wd-day-bar i:first-child { border-radius: 4px 4px 0 0; }
.wd-day-bar i.is-me { background: var(--accent); }
.wd-day small { padding-bottom: 4px; font-size: 11px; }
.wd-days-cap { min-height: 1.5em; margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wd-days-cap b { color: var(--ink); }
/* 各分野の1位（6つを同じ大きさで。押すと上位3匹） */
.wd-fields { display: grid; gap: 8px; }
.wd-fd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wd-fd { display: grid; gap: 4px; min-width: 0; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-fd.is-me { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd-fd.is-mvp { background: var(--rare-4-soft); }
.wd-fd.is-on { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.wd-fd.is-none { opacity: .55; }
.wd-fd-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); }
.wd-fd-label em { padding: 0 6px; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .05em; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-fd-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wd-fd-who img, .wd-fd-who i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); object-fit: contain; image-rendering: pixelated; }
.wd-fd-who b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wd-fd .xsmall { font-variant-numeric: tabular-nums; }
.wd-fd.is-static { cursor: default; }
.wd-fd-foot { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.wd-fd-foot > span:last-child:not(:first-child) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-boss-fields { display: grid; gap: 6px; }
.wd-boss .wd-fd { background: var(--surface); }
.wd-boss .wd-fd.is-mvp { background: var(--rare-4-soft); }
.wd-fd-detail { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-fd-detail p { margin: 0; }
.wd-fd-top { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wd-fd-top li { display: grid; grid-template-columns: 16px 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; }
.wd-fd-top li.is-me { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wd-fd-top li > small { text-align: center; font-weight: 800; color: var(--muted); }
.wd-fd-top li > img, .wd-fd-top li > i { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); object-fit: contain; image-rendering: pixelated; }
.wd-fd-top li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-fd-top b { font-variant-numeric: tabular-nums; }
.wd-role-firsts { margin-top: 4px; font-weight: 700; }
/* もらったごほうび（参加・1位・MVP を1行ずつ） */
.wd-rw { display: grid; gap: 8px; }
.wd-rw p { margin: 0; }
.wd-rw-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wd-rw-list li { display: grid; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.wd-rw-list li.is-mvp { background: var(--rare-4-soft); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-rw-label { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.wd-rw-label em { padding: 0 6px; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 900; color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-rw-label em.is-first { box-shadow: inset 0 0 0 1px var(--accent); }
.wd-rw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-rw-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px 3px 3px; border-radius: 10px; background: var(--surface); }
.wd-rw-chip .wd-icon { width: 30px; height: 30px; border-radius: 8px; }
.wd-rw-chip > span.xsmall { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 配合（むすびの祭壇） */
.wd-plus { margin-left: 4px; font-weight: 800; color: var(--warning); }
.wd-breed-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.wd-breed-entry > div { display: grid; gap: 2px; min-width: 0; }
.wd-breed-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.wd-breed-x { font-size: 20px; font-weight: 800; color: var(--muted); }
.wd-breed-slot { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 10px 6px; border: 1.5px solid var(--accent); border-radius: 14px; background: var(--accent-soft); color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.wd-breed-slot b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-breed-slot.is-empty { border: 1.5px dashed var(--line-strong); background: none; cursor: default; }
/* むすぶ前の確認：いなくなる2体（押せない） */
.wd-breed-pair.is-confirm { margin: 12px 0 4px; }
.wd-breed-slot.is-gone { padding: 8px 6px; cursor: default; }
.wd-breed-plan { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--rare-3-soft); }
.wd-breed-plan .wd-field { gap: 4px; }
.wd-breed-child { display: flex; align-items: center; gap: 12px; }
.wd-breed-child .wd-mon-art { background: var(--surface); }
.wd-mon-art.is-unknown img { filter: brightness(0); opacity: .55; }
.wd-breed-special { justify-self: start; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; color: var(--ink); background: var(--rare-4-soft); box-shadow: inset 0 0 0 1px var(--rare-4); }
.wd-breed-bonus { margin: 0; line-height: 1.7; font-variant-numeric: tabular-nums; }
.wd-breed-res { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.wd-breed-res b { margin-right: 6px; }
.wd-breed-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-chip { display: inline-grid; gap: 1px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-chip span { font-size: 12px; font-weight: 700; }
.wd-chip small { font-size: 10px; color: var(--muted); }
.wd-chip.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.wd-chip:disabled { opacity: .45; cursor: default; }
.wd-breed-list .wd-farm-main:disabled { opacity: .5; cursor: default; }
.wd-breed-tag { padding: 2px 10px; border-radius: 999px; font-weight: 800; color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* 灯台の町（歩ける 2D の町。シートより下、画面より上） */
html.town-open, html.town-open body { overflow: hidden; }
.town { position: fixed; inset: 0; z-index: 80; background: #1b2a3a; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* スマホのブラウザが、押した場所を青や灰色でぴかっと光らせるのを止める（町・フィールド・戦い） */
.town, .town *, .fb, .fb * { -webkit-tap-highlight-color: transparent; }
.town-canvas { outline: none; -webkit-touch-callout: none; }
.town-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.town-top { position: absolute; top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: calc(env(safe-area-inset-top) + 10px) 12px 18px; background: linear-gradient(rgba(10, 10, 8, .7), rgba(10, 10, 8, 0)); color: #fff; pointer-events: none; }
.town-top > * { pointer-events: auto; }
.town-close { flex: none; white-space: nowrap; border: 0; border-radius: 999px; padding: 7px 12px; background: rgba(20, 18, 14, .72); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
/* チュートリアルで町へ帰る手順：「町へ」のボタンを、目印と同じ色でゆっくり光らせる */
.town-close.is-goal { box-shadow: 0 0 0 2px #ffd860; animation: town-home 1.6s ease-in-out infinite; }
@keyframes town-home { 50% { box-shadow: 0 0 0 2px #ffd860, 0 0 14px 4px rgba(255, 216, 96, .75); } }
.town-title { flex: none; white-space: nowrap; font-size: 15px; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.town-count { margin-left: auto; min-width: 0; max-width: calc(100% - 96px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 10px; border-radius: 999px; background: rgba(20, 18, 14, .62); font-size: 12px; font-weight: 700; }
/* 長いときは折り返さずに「…」（2行目に回ると、左上の依頼・物語の札に重なっていた） */
.town:has(.fd-left) .town-top { flex-wrap: nowrap; }
.town-count:empty { display: none; }
.town-note { position: absolute; top: calc(env(safe-area-inset-top) + 56px); left: 50%; max-width: calc(100% - 32px); margin: 0; padding: 6px 12px; overflow: hidden; border-radius: 10px; background: rgba(20, 18, 14, .78); color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-50%); }
.town-note[hidden], .town-act[hidden] { display: none; }
.town-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 18px 12px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(rgba(10, 10, 8, 0), rgba(10, 10, 8, .72)); pointer-events: none; }
.town-bottom > * { pointer-events: auto; }
.town-act { justify-self: center; min-width: 220px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
/* 連れて歩いている精霊・人形を押したとき：頭の上の小さな札（名前と「帰す」・「しまう」） */
.town-sumpop { position: absolute; z-index: 6; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 6px; padding: 3px 3px 3px 10px; border-radius: 999px; background: rgba(20, 18, 14, .82); color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); animation: town-sumpop-in .16s ease-out both; }
.town-sumpop b { font-weight: 700; }
.town-sumpop button { border: 0; border-radius: 999px; padding: 4px 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.town-sumpop button:disabled { opacity: .6; }
@keyframes town-sumpop-in { from { opacity: 0; transform: translate(-50%, -85%); } }
.town-stamps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.town-stamps::-webkit-scrollbar { display: none; }
.town-stamp { flex: none; padding: 8px 12px; border: 0; border-radius: 999px; background: rgba(255, 250, 240, .94); color: #1a1916; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.town-stamp:active { transform: scale(.96); }
.hb { --s: min(42px, calc((100vw - 104px) / 6)); justify-self: center; display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 5px; border: 1px solid rgba(255, 235, 200, .18); border-radius: 14px; background: rgba(18, 16, 12, .74); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.hb-slots { display: grid; grid-template-columns: repeat(var(--n, 6), var(--s)); gap: 4px; }
.hb { position: relative; }
.hb-slot, .hb-side { touch-action: none; }
.hb-slot.is-lifted { opacity: .3; }
.hb-pen::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.2V21h3.8L18 9.8 14.2 6 3 17.2zM20.7 7.1a1 1 0 0 0 0-1.4l-2.4-2.4a1 1 0 0 0-1.4 0l-1.8 1.8 3.8 3.8 1.8-1.8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.2V21h3.8L18 9.8 14.2 6 3 17.2zM20.7 7.1a1 1 0 0 0 0-1.4l-2.4-2.4a1 1 0 0 0-1.4 0l-1.8 1.8 3.8 3.8 1.8-1.8z'/%3E%3C/svg%3E") center / contain no-repeat; }
.hb-slot.is-gone { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hb-slot.is-over { background: rgba(255, 196, 107, .22); }
.hb-slot.is-merge { outline: 2px solid #ffc46b; transform: scale(1.1); }
.hb-ghost { position: fixed; left: 0; top: 0; z-index: 3000; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255, 235, 200, .6); border-radius: 9px; background: rgba(40, 34, 26, .92); color: #fff6dc; box-shadow: 0 10px 22px rgba(0, 0, 0, .5); pointer-events: none; }
.hb-ghost img { width: 84%; height: 84%; object-fit: contain; image-rendering: pixelated; }
.hb-fold { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1px; width: 84%; height: 84%; padding: 2px; border-radius: 7px; background: rgba(255, 250, 240, .16); }
.hb-fold i { display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; font-style: normal; }
.hb-fold img, .hb-fold .hb-emote { width: 100% !important; height: 100% !important; object-fit: contain; }
.hb-dot { font-size: 9px; font-weight: 700; }
.hb-pop { position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 5; transform: translateX(-50%); display: grid; gap: 6px; padding: 8px; border: 1px solid rgba(255, 235, 200, .26); border-radius: 14px; background: rgba(18, 16, 12, .94); box-shadow: 0 10px 24px rgba(0, 0, 0, .5); color: #fff1d6; }
.hb-pop > b { font-size: 12px; text-align: center; }
.hb-pop-grid { display: grid; grid-template-columns: repeat(3, var(--s)); gap: 5px; }
.hb-side { flex: none; display: grid; place-items: center; align-content: center; gap: 0; width: 26px; height: var(--s); padding: 0; border: 0; border-radius: 9px; background: rgba(255, 250, 240, .1); color: #fff1d6; font: inherit; font-size: 14px; line-height: 1; cursor: pointer; }
.hb-side b { font-size: 12px; }
.hb-side i { font-style: normal; font-size: 13px; opacity: .8; }
.hb-side:active { background: rgba(255, 250, 240, .24); }
.hb-slot { position: relative; display: grid; place-items: center; width: var(--s); height: var(--s); padding: 0; overflow: hidden; border: 1px solid rgba(255, 235, 200, .24); border-radius: 9px; background: rgba(255, 250, 240, .08); color: #fff6dc; font: inherit; cursor: pointer; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.hb-slot:active { transform: scale(.94); background: rgba(255, 250, 240, .2); }
.hb-slot img { width: 84%; height: 84%; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.hb-slot.is-empty { border-style: dashed; background: none; }
.hb-slot.is-none img { filter: grayscale(1) brightness(.55); }
.hb-slot.is-none .hb-qty { color: #ff9a7a; }
.hb-slot.is-none .hb-word, .hb-slot.is-none .hb-dot { opacity: .38; }
.hb-plus { font-size: 14px; opacity: .4; }
.hb-word { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 0 2px; font-size: 9px; font-weight: 700; line-height: 1.15; text-align: center; }
.hb-emote { width: 100%; height: 100%; pointer-events: none; }
.hb-qty { position: absolute; right: 3px; bottom: 1px; font-size: 10px; font-weight: 800; text-shadow: 0 1px 2px #000, 0 0 2px #000; pointer-events: none; }
.hb-key { display: none; position: absolute; left: 3px; top: 1px; font-size: 9px; font-weight: 700; opacity: .7; text-shadow: 0 1px 2px #000; pointer-events: none; }
.hb-cd { position: absolute; inset: 0; background: rgba(10, 10, 8, .62); transform-origin: top; animation: hb-cd linear forwards; pointer-events: none; }
@keyframes hb-cd { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@media (min-width: 720px) { .hb { --s: 46px; } .hb-key { display: block; } }
.hb-sheet .hb-slot { --s: 100%; width: auto; height: auto; aspect-ratio: 1; border-color: var(--border, rgba(127, 127, 127, .4)); background: #2a2620; }
.hb-sheet .hb-slot.is-sel { outline: 2px solid #ffc46b; outline-offset: 1px; }
.hb-edit-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.hb-edit-foot { display: grid; justify-items: end; gap: 8px; }
:is(.hb, .hb-sheet):is(.is-lift, .is-edit) .hb-slot:not(.is-empty):not(.is-lifted):not(.is-merge) { animation: hb-jiggle .26s ease-in-out infinite alternate; }
@keyframes hb-jiggle { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .hb .hb-slot, .hb-sheet .hb-slot { animation: none !important; } }
.hb-x { display: none; position: absolute; top: -5px; right: -5px; z-index: 3; width: 18px; height: 18px; border-radius: 50%; background: #2a2823; box-shadow: 0 0 0 1.5px rgba(255, 250, 240, .85); pointer-events: none; }
.hb-x::before, .hb-x::after { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; height: 2px; border-radius: 1px; background: #fffaf0; }
.hb-x::before { transform: rotate(45deg); }
.hb-x::after { transform: rotate(-45deg); }
.hb .hb-x { top: -6px; right: -6px; width: 16px; height: 16px; }
.hb .hb-x::before, .hb .hb-x::after { left: 3px; right: 3px; top: 7px; }
:is(.hb, .hb-sheet).is-edit .hb-x { display: block; }
:is(.hb, .hb-sheet).is-edit .hb-slot { overflow: visible; }
.hb-done { display: none; position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 6; padding: 6px 16px; border: 0; border-radius: 999px; background: #ffc46b; color: #1a1916; font: inherit; font-size: 13px; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.hb.is-edit .hb-done { display: block; }
.hb-sheet-done { display: none; }
.hb-sheet.is-edit .hb-sheet-done { display: inline-flex; }
.hb-tabs { display: flex; gap: 6px; }
.hb-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.hb-pick { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; border: 1px solid var(--border, rgba(127, 127, 127, .35)); border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.hb-pick, .hb-edit-grid { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hb-pop.is-away, .hb-scrim.is-away { visibility: hidden; }
.hb-scrim { position: absolute; inset: 0; z-index: 6; border-radius: inherit; background: rgba(17, 16, 13, .5); animation: fade .15s; }
.hb-sheet .hb-pop { --s: 66px; bottom: auto; z-index: 7; transform: none; box-sizing: border-box; align-content: start; gap: 10px; padding: 12px; border-color: var(--line); background: var(--surface); color: inherit; animation: hb-pop .14s ease-out; }
.hb-sheet .hb-pop .input { width: 100%; text-align: center; }
.hb-sheet .hb-pop-grid { justify-content: center; }
@keyframes hb-pop { from { opacity: 0; transform: scale(.94); } }
.hb-sheet .hb-edit-grid { position: sticky; top: -12px; z-index: 2; padding: 6px 0; background: var(--surface); }
.hb-pick.is-lifted { opacity: .4; }
span.hb-slot { cursor: default; }
.hb-pick.is-on { border-color: #ffc46b; }
.hb-pick img { flex: none; width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.hb-pick .hb-emote { flex: none; width: 34px; height: 34px; }
.hb-pick span { display: grid; min-width: 0; }
.hb-pick b { font-size: 13px; }
.hb-pick small { font-size: 11px; opacity: .7; }
.wd-event-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wd-event.is-stack { display: grid; gap: 8px; }
.wd-event.is-stack > div:first-child { display: grid; gap: 3px; }
.wd-event.is-stack .wd-event-btns { justify-content: stretch; }
.wd-event.is-stack .wd-event-btns .btn { flex: 1 1 0; justify-content: center; }
.wd-town-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.wd-town-card.is-event { border-color: rgba(230, 120, 40, .55); background: linear-gradient(135deg, rgba(255, 150, 60, .1), rgba(120, 60, 160, .1)), var(--surface); }
.wd-ev-tag { display: inline-block; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: #e8782a; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.wd-town-art { width: 96px; height: 72px; border-radius: 12px; background-color: var(--surface-3); background-position: center 42%; background-size: 160%; image-rendering: pixelated; }
.wd-town-text { display: grid; gap: 3px; min-width: 0; }
.wd-town-text b { font-size: 15px; }
.wd-light-list { display: grid; gap: 4px; margin: 0; padding-left: 1.2em; }

/* フィールドの戦い（上は戦いの場：背景・魔物・味方の姿・演出。まん中にことば、下に味方と技） */
.fb { position: fixed; inset: 0; z-index: 82; display: grid; grid-template-rows: minmax(34vh, 1fr) auto auto minmax(0, 52vh); padding-top: env(safe-area-inset-top); background: #10202c; color: #1a1916; user-select: none; -webkit-user-select: none; opacity: 0; transition: opacity .25s; }
.fb.is-in { opacity: 1; }
.fb p { margin: 0; }
.fb-stage { position: relative; min-height: 0; overflow: hidden; background: linear-gradient(#7cc8f2 0%, #c4e8f6 46%, #a4d483 46.3%, #6fb553 100%); background-position: center 30%; background-size: cover; image-rendering: pixelated; }
.fb-stage::after { content: ''; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .18)); pointer-events: none; }
.fb-stage.is-night { filter: brightness(.74) saturate(.8) hue-rotate(14deg); }
.fb-stage.is-dusk::before, .fb-stage.is-dim::before { content: ''; position: absolute; inset: 0; z-index: 0; background: rgba(255, 130, 60, .22); mix-blend-mode: multiply; pointer-events: none; }
.fb-stage.is-dim::before { background: rgba(60, 80, 140, .22); }
.fb-stage.is-rain::before, .fb-stage.is-fog::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* 戦いの雨：見やすさ優先。少し暗く青い色をかけて、細い雨すじをまばらに・うすく・ゆっくり（画面酔いしないように） */
.fb-stage.is-rain::before { background: repeating-linear-gradient(100deg, rgba(220, 232, 255, 0) 0 58px, rgba(220, 232, 255, .14) 58px 59px, rgba(220, 232, 255, 0) 59px 116px), linear-gradient(rgba(36, 52, 80, .24), rgba(36, 52, 80, .12)); background-size: 150px 260px, 100% 100%; animation: fb-drizzle 3s linear infinite; }
@keyframes fb-drizzle { to { background-position: -40px 260px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .fb-stage.is-rain::before { animation: none; } }
.fb-stage.is-fog::before { background: radial-gradient(120% 60% at 30% 40%, rgba(240, 244, 248, .55), rgba(240, 244, 248, .15)); }
/* 戦いの雪：白い粒をまばらに、ゆっくり落とす */
.fb-stage.is-snow::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .85) 0 1.5px, transparent 2px) 0 0 / 46px 52px, radial-gradient(circle, rgba(255, 255, 255, .6) 0 1px, transparent 1.5px) 20px 26px / 34px 38px, linear-gradient(rgba(200, 220, 240, .12), rgba(200, 220, 240, .06)); animation: fb-snow 6s linear infinite; }
@keyframes fb-snow { to { background-position: 12px 52px, 26px 64px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .fb-stage.is-snow::before { animation: none; } }
@keyframes fb-rain { from { background-position: 0 0; } to { background-position: -30px 120px; } }
.fb.is-lost .fb-stage { filter: grayscale(.7) brightness(.7); transition: filter .8s; }
.fb-foe-head { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px; background: rgba(20, 18, 14, .78); color: #fff; font-size: 13px; }
.fb-foe-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-foe-head .fb-bar.is-foe { flex: 1 1 auto; min-width: 50px; }
.fb-nm { padding: 1px 7px; border-radius: 6px; background: #e0b74a; color: #1a1916; font-size: 10px; font-weight: 900; }
.fb-foe-box.is-book .fb-shadow, .fb-foe-box.is-book .fb-sub-plate, .fb-foe-box.is-book .bst { display: none; }   /* 敵の書は召喚物として出すだけ（名前・HP・状態は出さない。社長 2026-11-26） */
.fb-foe-box.is-book .fb-foe { animation: fbBookFloat 2.6s ease-in-out infinite; }
.fb-foe-book { position: absolute; left: 24%; top: 12%; z-index: 2; width: 28%; pointer-events: none; image-rendering: pixelated; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); animation: fbBookFloat 2.6s ease-in-out infinite; }
@keyframes fbBookFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
.fb-foe-box { position: absolute; left: 50%; top: 22%; z-index: 1; width: min(48vw, 210px); aspect-ratio: 1; transform: translateX(-50%); }
.fb-foe-box.is-boss { top: 16%; width: min(62vw, 270px); }
.fb-foe { position: relative; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; transition: opacity .6s, transform .6s, filter .6s; animation: fb-idle 2.4s ease-in-out infinite; }
.fb-shadow { position: absolute; left: 18%; right: 18%; bottom: 2%; height: 12%; border-radius: 50%; background: rgba(0, 0, 0, .28); }
/* 物語のヨドミ：黒いもやのかたまりに見える姿 */
.fb-foe.is-dark { filter: brightness(.28) saturate(.35) drop-shadow(0 0 10px rgba(160, 110, 255, .95)); }
/* 混沌のネームド：黒いオーラ（体のふちに黒いもや、その外に暗い紫。上へゆらめきながら、モヤモヤと濃さが変わる） */
.fb-foe.is-chaos { filter: drop-shadow(0 0 3px rgba(0, 0, 0, .95)) drop-shadow(0 0 9px rgba(10, 0, 20, .9)) drop-shadow(0 0 16px rgba(110, 40, 170, .55)); animation: fb-chaos-haze 2.6s ease-in-out infinite; }
/* パステリア：色を失った国の魔物（色を抜く。戦いの絵を描きなおす battle-post.js は、filter の brightness と saturate だけを読むので saturate で） */
.fb-foe.is-gray { filter: saturate(var(--sat, 0)); }
/* 物語のボスの光（ふつうの魔物と同じ絵のボスを見分ける。WebGL のときは battle-post.js が、同じ色の光をうしろに描く） */
.fb-foe.is-aura { filter: drop-shadow(0 0 6px var(--aura, #ffd27a)) drop-shadow(0 0 14px var(--aura, #ffd27a)); }
.fb-foe.is-gray.is-aura { filter: saturate(var(--sat, 0)) drop-shadow(0 0 6px var(--aura, #ffd27a)) drop-shadow(0 0 14px var(--aura, #ffd27a)); }
/* 混沌の中の暗い姿（光る裂け目の、もうひとりの自分）：混沌のもやより、暗い姿を先に */
.fb-foe.is-dark.is-chaos { filter: brightness(.28) saturate(.35) drop-shadow(0 0 10px rgba(160, 110, 255, .95)); animation: none; }
@keyframes fb-chaos-haze { 50% { filter: drop-shadow(0 -2px 5px rgba(0, 0, 0, .95)) drop-shadow(0 -5px 14px rgba(10, 0, 20, .85)) drop-shadow(0 -8px 22px rgba(110, 40, 170, .6)); } }
.fb-foe-box.is-acting .fb-foe { animation: fb-lunge .4s; }
.fb-foe-box.is-hit .fb-foe { animation: fb-shake .3s; filter: brightness(2.2); }
.fb-foe-box.is-bighit .fb-foe { animation: fb-shake .45s; filter: brightness(3) saturate(0); }
.fb-foe-box.is-down .fb-foe { opacity: 0; transform: translateY(18px) scale(.85); filter: brightness(3) saturate(0); }
.fb-foe-box.is-down .fb-shadow { opacity: 0; transition: opacity .6s; }
/* 凍結（タロ）：青白く凍りつき、氷の膜がかかる（動かない） */
.fb-foe-box.is-frozen .fb-foe { animation: none; filter: saturate(.25) brightness(1.18) drop-shadow(0 0 6px rgba(150, 215, 255, .95)); }
.fb-foe-box.is-frozen::after { content: ''; position: absolute; inset: 4% 6% 2%; z-index: 2; border-radius: 24%; border: 2px solid rgba(232, 248, 255, .95); background: linear-gradient(160deg, rgba(215, 242, 255, .62), rgba(110, 185, 250, .42) 52%, rgba(215, 242, 255, .6)); box-shadow: 0 0 18px rgba(140, 205, 255, .8), inset 0 0 22px rgba(255, 255, 255, .7); pointer-events: none; }
.fb-card.is-frozen { background: #dcefff; box-shadow: 0 3px 0 rgba(0, 0, 0, .25), inset 0 0 0 2px #8fcaff; }
.fb-fx { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }
.fb-stage.is-bighit { animation: fb-quake .45s; }
.fb-banner { position: absolute; left: 0; right: 0; top: 46%; z-index: 5; padding: 8px 16px; color: #fff; font-size: 17px; font-weight: 900; letter-spacing: .06em; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); opacity: 0; transform: translateY(-50%) scaleY(.2); transition: opacity .18s, transform .18s; pointer-events: none; }
.fb-banner.is-on { opacity: 1; transform: translateY(-50%) scaleY(1); }
.fb-banner.is-skill { top: 12%; padding: 4px 12px; font-size: 13px; background: none; }
.fb-banner.is-skill.is-on { transform: translateY(0); }
.fb-banner.is-ws, .fb-banner.is-sp { background: linear-gradient(90deg, rgba(20, 18, 14, 0), rgba(20, 18, 14, .85) 20%, rgba(20, 18, 14, .85) 80%, rgba(20, 18, 14, 0)); color: #ffd27a; font-size: 20px; }
.fb-banner.is-sp { color: #ffb0f0; }
.fb-banner.is-chain { background: linear-gradient(90deg, rgba(255, 210, 122, 0), rgba(255, 140, 60, .9) 20%, rgba(255, 70, 120, .9) 80%, rgba(255, 70, 120, 0)); font-size: 22px; }
.fb-banner.is-burst { top: 30%; color: #fffbe0; font-size: 24px; text-shadow: 0 0 12px #ffe27a, 0 2px 0 rgba(0, 0, 0, .5); }
.fb-banner.is-win { top: 40%; color: #ffd27a; font-size: 34px; text-shadow: 0 3px 0 #8a4a10, 0 0 18px rgba(255, 210, 122, .8); }
.fb-banner.is-lose { color: #d9d4c7; font-size: 18px; background: rgba(20, 18, 14, .7); }
.fb-bar { position: relative; display: block; height: 7px; overflow: hidden; border-radius: 4px; background: rgba(0, 0, 0, .35); }
.fb-bar i { position: absolute; left: 0; top: 0; bottom: 0; display: block; border-radius: 4px; transition: width .35s; }
.fb-bar i.fb-lag { background: rgba(255, 255, 255, .85); transition: width .6s ease-in; }
.fb-bar.is-foe i:not(.fb-lag) { background: linear-gradient(#ff8a7a, #e0453a); }
.fb-bar.is-hp i:not(.fb-lag) { background: linear-gradient(#6fdc86, #2f9e4c); }
.fb-bar.is-mp, .fb-bar.is-tp { height: 4px; }
.fb-bar.is-mp i { background: #3d7fd0; }
.fb-bar.is-tp i { background: #e5a72e; }
.fb-msg { display: flex; align-items: center; min-height: 54px; margin: 8px 12px 0; padding: 10px 14px; border: 2px solid #fffaf0; border-radius: 12px; background: rgba(20, 18, 14, .92); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); color: #fff; }
.fb-msg-text { font-size: 14px; font-weight: 700; line-height: 1.45; }
/* ことばの枠は、いつも2行ぶんの高さ（行数で戦いの場の大きさがゆれないように） */
.fb-msg { box-sizing: border-box; height: calc(2.9em * 1 + 24px); }
.fb-msg-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-msg-text.is-s { color: #ffd27a; }
.fb-msg-text.is-w { color: #9be59b; }
.fb-msg-text.is-k { color: #ff9a9a; }
.fb-msg-text.is-n { color: #d9d4c7; }
.fb-msg-text.is-f { color: #ffcfb8; }
.fb-party { display: flex; gap: 6px; padding: 8px 12px 0; }
.fb-party.is-many { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fb-card { position: relative; flex: 1 1 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border-radius: 12px; background: rgba(255, 250, 240, .96); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); transition: transform .15s; }
.fb-card.is-pet { box-shadow: inset 0 0 0 2px var(--accent), 0 3px 0 rgba(0, 0, 0, .25); }
.fb-card.is-cmd { cursor: pointer; }
.fb-card.is-active { outline: 3px solid #ffb02e; outline-offset: 1px; transform: translateY(-2px); }
.fb-act { overflow: hidden; color: #b5501d; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.fb-act[hidden] { display: block; visibility: hidden; }
.fb-card.is-low { background: #ffe1d8; }
.fb-card.is-hit { animation: fb-shake .3s; }
.fb-card.is-acting { transform: translateY(-4px); }
.fb-card.is-down { opacity: .5; filter: grayscale(1); }
.fb-card.is-helper { background: rgba(240, 248, 255, .96); }
.fb-help { flex: none; padding: 0 5px; border-radius: 5px; background: #3d7fd0; color: #fff; font-size: 9px; }
.fb-banner.is-help { top: 30%; background: linear-gradient(90deg, rgba(40, 90, 160, 0), rgba(40, 90, 160, .88) 20%, rgba(40, 90, 160, .88) 80%, rgba(40, 90, 160, 0)); color: #fff; font-size: 18px; }
.fb-face { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 8px; background: #e9e4d6; }
.fb-face img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.fb-card-main { display: grid; gap: 2px; min-width: 0; }
.fb-name { display: flex; align-items: center; gap: 4px; overflow: hidden; font-size: 11px; font-weight: 800; white-space: nowrap; }
.fb-ready { flex: none; padding: 0 5px; border-radius: 5px; background: #e5a72e; color: #1a1916; font-size: 9px; animation: fb-glow 1.2s ease-in-out infinite; }
.fb-ready[hidden] { display: none; }
.fb-num { font-size: 10px; line-height: 1; color: #4f4c44; font-variant-numeric: tabular-nums; }
.fb-pop { position: absolute; left: 50%; top: 10%; z-index: 6; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #c0302f, 0 0 6px rgba(0, 0, 0, .55); white-space: nowrap; pointer-events: none; animation: fb-pop 1.2s forwards; }
.fb-pop.is-heal { text-shadow: 0 2px 0 #1e7a34, 0 0 6px rgba(0, 0, 0, .5); }
.fb-pop.is-crit { color: #ffe27a; font-size: 30px; text-shadow: 0 3px 0 #b5361d, 0 0 10px rgba(255, 210, 122, .9); }
.fb-pop.is-crit::before { content: '会心！'; display: block; font-size: 12px; text-align: center; }
.fb-pop.is-miss { color: #d9d4c7; font-size: 16px; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.fb-card .fb-pop { top: -8px; font-size: 15px; }
.fb-card .fb-pop.is-crit { font-size: 19px; }
.fb-cmd { display: grid; grid-auto-rows: max-content; align-content: start; gap: 8px; max-height: 50vh; margin-top: 8px; padding: 10px 12px calc(env(safe-area-inset-bottom) + 12px); overflow-y: auto; border-radius: 16px 16px 0 0; background: rgba(20, 18, 14, .94); color: #fff; }
.fb-cmd-head { display: flex; align-items: center; gap: 6px; }
.fb-turn { margin-right: auto; font-size: 12px; font-weight: 700; color: #d9d4c7; font-variant-numeric: tabular-nums; }
/* 協力プレイ：ターンの下に、のこり時間。ほかの人のペットの札の印・待っているあいだの文 */
.fb-turn-box { display: grid; margin-right: auto; line-height: 1.2; }
.fb-turn-box .fb-turn { margin-right: 0; }
.fb-timer { font-size: 11px; font-weight: 800; color: #9fd0ff; font-variant-numeric: tabular-nums; }
.fb-timer:empty { display: none; }
.fb-timer.is-hurry { color: #ff9b7a; animation: fb-glow .8s ease-in-out infinite; }
.fb-help.is-player { background: #3a9a5b; }
/* 呼んだ精霊の札：紫の印。MP と気力の帯はない（呼んだ子の MP を使う・必殺技は使わない）。帰ったら札をしまう。あらわれたときは、ふわっと */
.fb-help.is-summon { background: #7a55c4; }
.fb-card.is-summon { background: rgba(246, 241, 255, .96); }
/* 精霊・人形の札は細く（MP・気力の帯と、指示の行はない）。札が4枚より多いときは3列に（味方の段・精霊と人形の段） */
.fb-card.is-summon .fb-bar.is-mp, .fb-card.is-summon .fb-bar.is-tp, .fb-card.is-summon .fb-act, .fb-card.is-summon .fb-act[hidden] { display: none; }
.fb-card.is-summon .fb-ready { display: none; }
/* 札がせまいとき（3枚ならぶ）：印と名前が入りきらなければ、名前を次の行に */
.fb-card.is-summon .fb-name { flex-wrap: wrap; row-gap: 1px; font-size: 10px; letter-spacing: -.02em; }
.fb-card.is-gone { display: none; }
/* オートマシン：人形のモード（指示の上の段。押すと次のターンのはじめに切りかわる） */
.fb-card.is-arrive { animation: fb-arrive .5s ease-out; }
@keyframes fb-arrive { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
/* 召喚：精霊・人形の姿（味方の側の左下。相手のほうを向く）。あらわれる瞬間は透けて光り、実体になって名前が出る。そのあと小さくなって札へ */
.fb-spirit { position: absolute; left: 3%; bottom: 2%; z-index: 3; display: grid; justify-items: center; width: min(36vw, 156px); pointer-events: none; opacity: 0; transform: translateY(10px) scale(.92); filter: brightness(2.2) saturate(.4) blur(1px); transition: opacity .3s, transform .35s, filter .45s; }
.fb-spirit img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; transform: scaleX(-1); }
.fb-spirit b { margin-top: -8px; padding: 3px 12px; border-radius: 999px; background: rgba(20, 16, 34, .8); color: #fff3c8; font-size: 13px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.fb-spirit.is-in { opacity: .5; transform: none; }
.fb-spirit.is-solid { opacity: 1; filter: none; }
.fb-spirit.is-solid b { opacity: 1; transform: none; }
.fb-spirit.is-puppet { filter: none; }
.fb-spirit.is-act { animation: fb-spirit-pop .18s ease-out; }
@keyframes fb-spirit-pop { from { opacity: 0; transform: translateY(6px) scale(.94); } }
.fb-spirit.is-away { opacity: 0; transform: translateY(40px) scale(.4); transition: opacity .38s, transform .38s ease-in; }
/* 対戦：自分の側の精霊は、戦いの場の上のまんなかにあらわれる（下には相手がならんでいる） */
.fb-spirit.is-top { left: calc(50% - min(30vw, 130px) / 2); top: 3%; bottom: auto; width: min(30vw, 130px); }
/* 精霊は浮いている（人形は立っている） */
.fb-spirit:not(.is-puppet) img { animation: fb-spirit-float 1.8s ease-in-out infinite; }
@keyframes fb-spirit-float { 50% { transform: scaleX(-1) translateY(-6px); } }
/* 技の前：体に属性の色の光がたまる（ふつうの攻撃は、札の顔が光る） */
.fb-spirit.is-charge { animation: fb-spirit-pop .18s ease-out, fb-spirit-charge .45s ease-in forwards; }
@keyframes fb-spirit-charge { from { filter: drop-shadow(0 0 0 var(--glow)); } to { filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 12px var(--glow)) brightness(1.25); } }
.fb-card.is-charge .fb-face { box-shadow: 0 0 0 2px var(--glow), 0 0 10px var(--glow); }
/* 帰る：光の柱の中で、透けて消える */
.fb-card.is-leave { animation: fb-leave .65s ease-in forwards; pointer-events: none; }
@keyframes fb-leave { 35% { filter: brightness(1.5); } to { opacity: 0; transform: translateY(-10px); filter: brightness(2); } }
/* 味方が呼んだ精霊・機械人形：札にしないで、ログの上に名前と HP の帯だけ（FF11 のペットの表示にならう。2026-11-04 オーナー）。いないときは出さない */
.fb-log { display: grid; min-width: 0; }
.fb-pets { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 12px 0; }
.fb-pets[hidden] { display: none; }
.fb-pets:not([hidden]) + .fb-msg { margin-top: 5px; }
.fb-pet { position: relative; display: flex; flex: 1 1 100%; align-items: center; gap: 8px; min-width: 0; padding: 3px 9px; border: 1px solid rgba(255, 250, 240, .55); border-radius: 9px; background: rgba(20, 18, 14, .86); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.35; }
.fb-pets.is-many .fb-pet { flex-basis: calc(50% - 3px); }
.fb-pet-name { display: flex; flex: 0 1 auto; align-items: center; gap: 4px; min-width: 0; max-width: 62%; }
.fb-pet-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-pet-bar { flex: 1 1 auto; min-width: 36px; height: 6px; }
.fb-pet.is-gone { display: none; }
.fb-pet.is-down .fb-pet-label { opacity: .5; }
.fb-pet.is-arrive { animation: fb-pet-in .4s ease-out; }
@keyframes fb-pet-in { from { opacity: 0; transform: translateY(5px); } }
.fb-pet.is-leave { animation: fb-leave .65s ease-in forwards; pointer-events: none; }
.fb-pet.is-charge { box-shadow: 0 0 0 1px var(--glow), 0 0 10px var(--glow); }
.fb-pet .fb-dmg { top: -20px; font-size: 18px; }
.fb-pet .fb-dmg.is-crit { font-size: 22px; }
/* 機械人形のモードのタブ（帯の左上に、つまみのように出す。押すと、次のターンのはじめに切りかわる） */
/* 何体かいるときも、タブの出る帯（いま技を選んでいる子の人形）は、いちばん上に1本で */
.fb-pets .fb-pet.has-tabs { order: -1; flex-basis: 100%; margin-top: 21px; }
.fb-pet-tabs { position: absolute; left: 8px; bottom: 100%; display: flex; align-items: flex-end; gap: 2px; white-space: nowrap; }
.fb-pet-tabs:empty { display: none; }
.fb-pet-tab { min-width: 34px; padding: 4px 7px 3px; border: 1px solid rgba(255, 250, 240, .55); border-bottom: 0; border-radius: 7px 7px 0 0; background: rgba(20, 18, 14, .86); color: #d9d4c7; font: inherit; font-size: 11px; font-weight: 800; line-height: 1.2; cursor: pointer; }
.fb-pet-tab.is-on { background: #fffaf0; color: #1a1916; }
.fb-pet-tab.is-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.fb-pet-tab:disabled { cursor: default; }
.fb-pet-next { margin: 0 0 3px 4px; color: #fffaf0; font-size: 10px; font-weight: 800; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.fb-hint.fb-waiting { padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); text-align: center; }
.fb-go:disabled { opacity: .55; }
.fb-toggle { padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fb-toggle.is-on { background: #fffaf0; color: #1a1916; }
/* 上の列は文字を折り返さない。入りきらない幅では、ボタンごと次の段へ */
.fb-cmd-head { flex-wrap: wrap; row-gap: 6px; }
.fb-cmd-head .fb-toggle, .fb-turn-box { flex: none; white-space: nowrap; }
.fb-cmd-head > .fb-toggle:nth-last-child(2) { margin-left: auto; }
@media (max-width: 480px) {
  .fb-cmd-head { gap: 4px; }
  .fb-cmd-head .fb-toggle { padding: 6px; font-size: 11px; }
  .fb-cmd-head .fb-turn { font-size: 11px; }
}
.fb-hint { font-size: 12px; color: #d9d4c7; }
.fb-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fb-skill { display: grid; gap: 4px; width: 100%; height: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: #fffaf0; color: #1a1916; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.fb-skill:active { transform: translateY(1px); box-shadow: none; }
.fb-skill .fb-skill-name { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; font-size: 13px; font-weight: 800; line-height: 1.3; }
.fb-skill small { font-size: 10px; color: #6b675c; }
.fb-skill.is-ws { background: linear-gradient(#fff1c4, #ffd27a); animation: fb-glow 1.4s ease-in-out infinite; }
.fb-skill.is-sp { background: linear-gradient(#ffe0f6, #f6a8e0); }
.fb-skill.is-queued { box-shadow: inset 0 0 0 3px var(--accent), 0 2px 0 rgba(0, 0, 0, .3); }
.fb-skill.is-auto { background: rgba(255, 255, 255, .14); color: #fff; }
.fb-skill:disabled { opacity: .5; }
.fb-skill.is-auto .fb-skill-name { padding-right: 0; }
.fb-skill.is-lack { opacity: .5; }
.fb-skill-wrap { position: relative; }
/* 合わせ技：共鳴の色の札・つながる技の印・いまの共鳴と残光のようす */
.fb-sc { display: inline-block; margin: 0 2px; padding: 0 6px; border-radius: 999px; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.6; vertical-align: 1px; }
.fb-sc.is-light { color: #1a1916; }
.fb-act .fb-sc { padding: 0 4px; font-size: 9px; line-height: 12px; vertical-align: 0; }
/* 指示の行は高さを決めておく（色の札が入っても、札の高さ＝戦いの場の大きさが変わらないように） */
.fb-act, .fb-act[hidden] { display: block; height: 14px; line-height: 14px; }
.fb-skill.is-link { box-shadow: 0 0 0 2px #9fd0ff, 0 0 12px rgba(120, 190, 255, .7); }
.fb-skill.is-link.is-queued { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 2px #9fd0ff, 0 0 12px rgba(120, 190, 255, .7); }
.fb-link-tag { padding: 0 6px; border-radius: 5px; background: #2c6fd0; color: #fff; font-size: 10px; font-weight: 800; }
.fb-link-tag.is-mb { background: #8a3fd0; }
.fb-link { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(60, 120, 210, .18); font-size: 11px; line-height: 1.5; color: #dfe9f7; }
.fb-link b { margin-right: 4px; color: #9fd0ff; }
.fb-link b.is-mb { color: #d4b0ff; }
.fb-link p.is-combo { color: #fff; font-weight: 700; }
.fb-link .fb-dim { color: #b9c6d8; font-weight: 400; }
.fb-chainhows { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; font-weight: 700; }
.fb-chainhow { display: inline-flex; align-items: center; white-space: nowrap; }
.fb-chainhow .fb-sc { margin: 0 1px; }
.fb-detail-link { padding: 6px 8px; border-radius: 8px; background: rgba(60, 120, 210, .25); color: #dfe9f7 !important; font-weight: 700; }
.fb-skill-sub { display: flex; flex-wrap: wrap; gap: 3px; }
.fb-cat, .fb-el, .fb-tag { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 6px; font-size: 10px; font-weight: 800; line-height: 17px; white-space: nowrap; }
.fb-tag { background: rgba(26, 25, 22, .08); color: #4f4c44; }
.fb-skill.is-auto .fb-tag { background: rgba(255, 255, 255, .12); color: #e9e4d6; }
.fb-tag.is-ws { background: #e5a72e; color: #1a1916; }
.fb-tag.is-sp { background: #d66fbf; color: #fff; }
.fb-cat.is-phys { background: #c8642e; color: #fff; }
.fb-cat.is-magic { background: #6a4fc8; color: #fff; }
.fb-cat.is-breath { background: #c0302f; color: #fff; }
.fb-cat.is-fixed { background: #5a5244; color: #fff; }
.fb-cat.is-heal { background: #2f9e4c; color: #fff; }
.fb-cat.is-buff { background: #2f7fd0; color: #fff; }
.fb-cat.is-debuff, .fb-cat.is-ail { background: #7a5aa0; color: #fff; }
.fb-el { color: #1a1916; }
.fb-el.is-fire { background: #ffb08a; }
.fb-el.is-ice { background: #bfe8ff; }
.fb-el.is-wind { background: #b9f0c8; }
.fb-el.is-earth { background: #e2c690; }
.fb-el.is-thunder { background: #ffe680; }
.fb-el.is-water { background: #9fcdf5; }
.fb-el.is-light { background: #fff6cc; }
.fb-el.is-dark { background: #c9b0ea; }
.fb-el.is-weak { background: #ffd0d0; }
.fb-el.is-none { background: #f1f2f7; box-shadow: inset 0 0 0 1px #c9cedb; }
.fb-cmd { position: relative; }
.fb-skill { -webkit-touch-callout: none; touch-action: manipulation; }
.fb-meat { position: fixed; z-index: 9; object-fit: contain; image-rendering: pixelated; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.fb-fed { position: absolute; right: 10%; top: 6%; z-index: 3; box-sizing: border-box; width: 30px; height: 30px; padding: 3px; border-radius: 50%; background: rgba(20, 18, 14, .75); box-shadow: 0 0 0 1.5px #ffd27a; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.fb-bag-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-bag-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.fb-bag-row img { width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.fb-bag-row b { display: block; font-size: 14px; }
.fb-bag-row small { display: block; color: #d9d4c7; font-size: 11px; line-height: 1.4; }
.fb-bag-row i { padding: 6px 13px; border-radius: 999px; background: #ffd27a; color: #1a1916; font-size: 12px; font-style: normal; font-weight: 800; }
.fb-bag-row:disabled { opacity: .45; cursor: default; }
.fb-bag-row:active:not(:disabled) { background: rgba(255, 255, 255, .14); }
.fb-skill.is-links { background: rgba(60, 120, 210, .3); color: #fff; }
.fb-skill.is-links .fb-tag { background: rgba(255, 255, 255, .14); color: #e9e4d6; }
.fb-lcs { gap: 8px; }
.fb-lc-row { display: grid; gap: 3px; width: 100%; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 12px; line-height: 1.5; text-align: left; cursor: pointer; }
.fb-lc-row:active:not(.is-lack) { background: rgba(255, 255, 255, .14); }
.fb-lc-row.is-lack { opacity: .5; }
.fb-lc-seq { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-weight: 800; }
.fb-lc-seq i { font-style: normal; color: #ffd27a; }
.fb-lc-res { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; }
.fb-lc-mb { color: #e2c9ff; font-weight: 700; }
.fb-lc-why { color: #ffd27a; font-weight: 700; }
.fb-skill.is-grim { color: #fff; }
.fb-skill.is-grim.is-black { background: linear-gradient(135deg, #2b2140, #4a2f6e); }
.fb-skill.is-grim.is-white { background: linear-gradient(135deg, #6b5a2e, #a88a3e); }
.fb-skill.is-grim .fb-tag, .fb-skill.is-flip .fb-tag { background: rgba(255, 255, 255, .16); color: #f3eee2; }
.fb-skill.is-flip { background: rgba(255, 255, 255, .1); color: #fff; }
.fb-skill.is-art { box-shadow: 0 0 0 2px #b69cf0 inset; }
.fb-pages { display: inline-flex; gap: 3px; align-items: center; margin-left: 4px; }
.fb-pages i { width: 7px; height: 10px; border-radius: 2px; border: 1px solid rgba(255, 255, 255, .55); }
.fb-pages i.is-on { background: #f1e6c6; border-color: #f1e6c6; }
.fb-pages i.is-use { background: #b69cf0; border-color: #b69cf0; }
.fb-arts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fb-art { display: grid; gap: 1px; padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.fb-art b { font-size: 14px; letter-spacing: .04em; }
.fb-art small { color: #cfc8b8; font-size: 10px; }
.fb-arts.is-black .fb-art.is-on { background: #4a2f6e; border-color: #b69cf0; }
.fb-arts.is-white .fb-art.is-on { background: #8a6f2e; border-color: #f0d98a; }
.fb-skill.is-art-card.is-black .fb-skill-name { color: #4a2f6e; }
.fb-skill.is-art-card.is-white .fb-skill-name { color: #7a5f1e; }
.fb-detail-wrap { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; padding: 10px 12px calc(env(safe-area-inset-bottom) + 12px); background: rgba(10, 9, 7, .55); }
.fb-detail { display: grid; gap: 6px; width: 100%; max-height: 100%; overflow-y: auto; padding: 14px; border-radius: 14px; background: #2a2620; box-shadow: 0 -6px 20px rgba(0, 0, 0, .4); font-size: 12px; line-height: 1.5; animation: fb-rise .18s ease-out; }
.fb-detail .fb-tag { background: rgba(255, 255, 255, .12); color: #e9e4d6; }
.fb-detail b { font-size: 13px; }
.fb-detail p { color: #e9e4d6; }
.fb-detail dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 2px 0 0; }
.fb-detail dt { color: #b9b4a6; font-weight: 700; }
.fb-detail dd { margin: 0; color: #fff; }
.fb-cmd.is-cmd { display: flex; flex-direction: column; gap: 8px; max-height: none; overflow: hidden; padding-bottom: 0; }
.fb-cmd.is-cmd > .fb-cmd-head { flex: none; }
.fb-cmd-body { flex: 1 1 auto; display: grid; grid-auto-rows: max-content; gap: 8px; min-height: 0; overflow-y: auto; padding-bottom: 8px; -webkit-mask-image: linear-gradient(#000 calc(100% - 14px), transparent); mask-image: linear-gradient(#000 calc(100% - 14px), transparent); }
.fb-cmd-foot { flex: none; padding: 8px 0 calc(env(safe-area-inset-bottom) + 12px); border-top: 1px solid rgba(255, 255, 255, .1); }
.fb-go { min-height: 48px; font-size: 16px; }
.fb-summary { line-height: 1.5; }
.fb-result { display: grid; gap: 8px; }
.fb-result-head { font-size: 17px; }
.fb-result-head.is-win { color: #ffd27a; }
.fb-dim { color: #d9d4c7; }
.fb-up { color: #9be59b; }
.fb-loot { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-loot-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.fb-loot-item, .fb-recruit, .fb-result p { animation: fb-rise .4s backwards; }
.fb-loot-item .wd-icon, .fb-recruit .wd-icon { width: 30px; height: 30px; }
.fb-recruit { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(255, 210, 122, .18); }
.wd-town-art.is-field { background-position: center 70%; }
@keyframes fb-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes fb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes fb-quake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -2px); } }
@keyframes fb-pop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.25); } 30% { transform: translate(-50%, -4px) scale(1); } 75% { opacity: 1; transform: translate(-50%, -14px); } 100% { opacity: 0; transform: translate(-50%, -26px); } }
@keyframes fb-lunge { 40% { transform: translateY(12px) scale(1.1); } }
@keyframes fb-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes fb-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* 画面の加工（WebGL）を使うときは、背景・魔物・粒は WebGL の絵に描くので、DOM のほうは見せない（位置や動きは読みとる） */
.fb-gl { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.fb-stage.is-gl { background-image: none !important; }
.fb-stage.is-gl .fb-foe, .fb-stage.is-gl .fb-shadow, .fb-stage.is-gl .fb-fx { visibility: hidden; }
/* 大技の演出シーン：上下の黒い帯 */
.fb-cine { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.fb-cine i { position: absolute; left: 0; right: 0; height: 13%; background: #050403; transition: transform .28s cubic-bezier(.2, .8, .3, 1); }
.fb-cine i:first-child { top: 0; transform: translateY(-101%); }
.fb-cine i:last-child { bottom: 0; transform: translateY(101%); }
.fb-cine.is-on i { transform: none; }
/* 縦が短い画面（折りたたみを閉じたとき・小さいスマホ）：魔物の出る場所を広く残して、ことば・札・技を詰める */
.fb > .fb-cmd { min-height: 0; }
@media (max-height: 720px) {
  .fb-msg { min-height: 0; height: calc(2.8em + 18px); margin-top: 6px; padding: 7px 12px; }
  .fb-msg-text { font-size: 13px; line-height: 1.4; }
  .fb-party { padding-top: 6px; }
  .fb-card { padding: 4px 8px; gap: 6px; }
  .fb-face { width: 26px; height: 26px; }
  .fb-act { line-height: 13px; height: 13px; }
  .fb-cmd { margin-top: 6px; padding-top: 8px; gap: 6px; }
  .fb-cmd.is-cmd { gap: 6px; }
  .fb-toggle { padding: 4px 9px; font-size: 11px; }
  .fb-skills { gap: 5px; }
  .fb-skill { gap: 3px; padding: 6px 8px; }
  .fb-skill .fb-skill-name { font-size: 12px; }
  .fb-cat, .fb-el, .fb-tag { line-height: 15px; font-size: 9px; }
  .fb-cmd-foot { padding-top: 6px; padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .fb-go { min-height: 42px; }
}
/* 戦いの迫力：ダメージの数字・連続ヒット・カットイン・赤いふち・はじまりの切りかえ・ネームドの警告・魔物の気持ち */
.fb.is-stop .fb-stage *, .fb.is-stop .fb-dmg { animation-play-state: paused !important; }
.fb-foe-box.is-enter .fb-foe { animation: fb-enter .7s cubic-bezier(.3, 1.5, .5, 1) backwards, fb-idle 2.4s 0.7s ease-in-out infinite; }
/* 倒した魔物は消す（回廊の魔物のゆらめき fb-mirror など、透明度を動かすアニメーションも止める。止めないと、消えずに残る） */
.fb-foe-box.is-gone .fb-foe, .fb-foe-box.is-gone .fb-shadow { opacity: 0; transition: none; animation: none; }
.fb-emote-slot { position: absolute; right: -4%; top: -6%; z-index: 5; pointer-events: none; }
.fb-foe-box.is-boss .fb-emote-slot { right: 4%; top: 0; }
.emote { display: block; }
.fb-dmg { position: absolute; left: 50%; top: 18%; z-index: 6; font-size: 26px; font-weight: 900; font-style: italic; color: #fff; letter-spacing: -.02em; -webkit-text-stroke: 1px rgba(80, 20, 10, .6); text-shadow: 0 3px 0 #c0302f, 0 0 8px rgba(0, 0, 0, .55); white-space: nowrap; pointer-events: none; animation: fb-dmg 1.25s cubic-bezier(.2, .9, .3, 1) forwards; }
.fb-dmg.is-crit { color: #ffe27a; font-size: 38px; text-shadow: 0 4px 0 #b5361d, 0 0 14px rgba(255, 210, 122, .95); }
.fb-dmg.is-crit::before { content: '会心！'; display: block; width: max-content; margin: 0 auto 2px; padding: 1px 7px; border-radius: 7px; background: #c0302f; color: #fff; font-size: 12px; font-style: normal; letter-spacing: .06em; -webkit-text-stroke: 0; text-shadow: none; }
.fb-dmg.is-chain { color: #ffd0f0; font-size: 42px; text-shadow: 0 4px 0 #a0306f, 0 0 16px rgba(255, 120, 200, .95); }
/* 共鳴・残光の数字には札（会心と同じ形）。連携なら、青い札 */
.fb-dmg.is-chain::before, .fb-dmg.is-burst::before { display: block; width: max-content; margin: 0 auto 2px; padding: 1px 8px; border-radius: 7px; color: #fff; font-size: 12px; font-style: normal; letter-spacing: .06em; -webkit-text-stroke: 0; text-shadow: none; }
.fb-dmg.is-chain::before { content: '共鳴'; background: #a0306f; }
.fb-dmg.is-chain.is-coop::before { content: '連携の共鳴'; background: #2f6fc0; }
.fb-dmg.is-burst { color: #fffbe0; font-size: 34px; text-shadow: 0 4px 0 #a8700c, 0 0 16px rgba(255, 226, 122, .95); }
.fb-dmg.is-burst::before { content: '残光'; background: #b8860b; }
.fb-dmg.is-burst.is-coop::before { content: '連携の残光'; background: #2f6fc0; }
.fb-card .fb-dmg.is-chain, .fb-card .fb-dmg.is-burst { font-size: 24px; }
/* 共鳴：画面のまん中に、段と名前（属性の色）。3段は、うしろに回る光の筋 */
.fb-chainshow { position: absolute; left: 50%; top: 64%; z-index: 7; padding: 8px 34px 12px; text-align: center; white-space: nowrap; pointer-events: none; background: radial-gradient(ellipse at center, rgba(20, 18, 14, .72), rgba(20, 18, 14, 0) 72%); transform: translate(-50%, -50%); animation: fb-chainshow 1.1s cubic-bezier(.2, .9, .3, 1) forwards; }
.fb-chainshow small { display: inline-block; padding: 2px 12px; border-radius: 999px; background: rgba(20, 18, 14, .82); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.fb-chainshow-how { display: inline-block; margin-top: 4px; padding: 2px 12px; border-radius: 999px; background: rgba(20, 18, 14, .82); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.fb-chainshow b { display: block; margin-top: 2px; font-size: 44px; font-weight: 900; line-height: 1.1; letter-spacing: .06em; background: linear-gradient(90deg, var(--c1), #ffffff 50%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px rgba(40, 18, 8, .75); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .6)) drop-shadow(0 0 12px var(--c1)); }
.fb-chainshow.is-lv2 b { font-size: 52px; }
.fb-chainshow.is-lv3 b { font-size: 62px; }
.fb-chainshow.is-lv3::before { content: ''; position: absolute; left: 50%; top: 58%; z-index: -1; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--c1) 60%, transparent) 0 7deg, transparent 7deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%); mask-image: radial-gradient(circle, #000 18%, transparent 68%); animation: fb-rays 1.3s linear forwards; }
@keyframes fb-chainshow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(.92); } 24% { transform: translate(-50%, -50%) scale(1.05); } 32% { transform: translate(-50%, -50%) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.02); } }
@keyframes fb-rays { from { rotate: 0deg; } to { rotate: 45deg; } }
/* 残光：上のほうに、光る文字（属性の色） */
.fb-burstshow { position: absolute; left: 50%; top: 16%; z-index: 7; color: #fffbe0; font-size: 34px; font-weight: 900; letter-spacing: .1em; white-space: nowrap; pointer-events: none; -webkit-text-stroke: 1.5px rgba(70, 36, 0, .85); text-shadow: 0 0 10px var(--c1), 0 0 24px var(--c1), 0 3px 0 rgba(0, 0, 0, .6); transform: translate(-50%, -50%); animation: fb-burstshow .8s ease-out forwards; }
.fb-burstshow.is-coop { font-size: 26px; }
@keyframes fb-burstshow { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); letter-spacing: .5em; } 22% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); letter-spacing: .1em; } 40% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
@media (prefers-reduced-motion: reduce) { .fb-chainshow, .fb-burstshow, .fb-chainshow::before { animation-duration: 1.1s; animation-name: fb-fadeout; } }
@keyframes fb-fadeout { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.fb-dmg.is-heal { color: #d8ffd0; text-shadow: 0 3px 0 #1e7a34, 0 0 6px rgba(0, 0, 0, .5); }
.fb-dmg.is-miss { color: #e9e4d6; font-size: 18px; font-style: normal; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.fb-card .fb-dmg { top: -10px; font-size: 18px; }
/* 物理の種類（斬・突・打）の札 */
.fb-pt { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 5px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; }
.fb-pt.is-slash { background: #8a5a2b; }
.fb-pt.is-pierce { background: #4b6b2f; }
.fb-pt.is-blunt { background: #5b4d7a; }
/* いまかかっている効果のアイコン（札の上のはし・魔物の名札の下）。押すと名前の一覧 */
.bst { position: absolute; top: -11px; right: 6px; z-index: 4; display: flex; gap: 2px; cursor: pointer; }
.bst[hidden] { display: none; }
.bst-i { position: relative; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 2px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.bst-i { grid-auto-flow: column; gap: 0; }
.bst-i small { margin-left: 1px; font-size: 7px; line-height: 1; }
.bst-i.is-up { background: #2f6fd6; }
.bst-i.is-up small { color: #bfe0ff; }
.bst-i.is-down { background: #c0392b; }
.bst-i.is-down small { color: #ffd0c8; }
.bst-i.is-ail { background: #7b3fb0; }
.bst-i.is-more { background: #5b5750; font-size: 9px; }
/* スライムの分かれた体の数（×7） */
.bst-i.is-body { background: #2c8fb3; min-width: 22px; padding: 0 3px; font-size: 10px; }
.bst.is-foe { top: 56px; left: 12px; right: auto; }
.bst.is-dv { top: -4px; left: 50%; right: auto; transform: translateX(-50%); }
.bst.is-dv.is-smn { top: 2px; transform: translateX(-50%) scale(.85); transform-origin: 50% 100%; }
/* MP がもどったとき（青）。HP の数字と重ならないように、少し下に */
.fb-dmg.is-mp { color: #dcebff; font-style: normal; -webkit-text-stroke: 0; text-shadow: 0 3px 0 #2c5fb8, 0 0 6px rgba(0, 0, 0, .5); }
.fb-card .fb-dmg.is-mp { top: 12px; font-size: 14px; }
.fb-card .fb-dmg.is-crit { font-size: 22px; }
.fb-combo { position: absolute; right: 12px; top: 30%; z-index: 6; color: #fff6dc; font-size: 22px; font-weight: 900; font-style: italic; text-shadow: 0 3px 0 #b5361d, 0 0 10px rgba(255, 140, 60, .8); opacity: 0; pointer-events: none; }
.fb-combo.is-on { animation: fb-combo .9s ease-out forwards; }
.fb-banner.is-ambush { top: 36%; background: linear-gradient(90deg, rgba(30, 60, 140, 0), rgba(30, 60, 140, .85) 20%, rgba(30, 60, 140, .85) 80%, rgba(30, 60, 140, 0)); color: #fff; font-size: 24px; }
.fb-vignette { position: absolute; inset: 0; z-index: 7; background: radial-gradient(ellipse at center, rgba(255, 40, 30, 0) 45%, rgba(255, 30, 20, .6) 100%); box-shadow: inset 0 0 36px 8px rgba(255, 40, 30, .65); opacity: 0; pointer-events: none; }
.fb.is-danger .fb-vignette { animation: fb-danger 1.1s ease-in-out infinite; }
.fb-cutin { position: absolute; inset: 0; z-index: 8; display: grid; align-items: center; pointer-events: none; visibility: hidden; }
.fb-cutin.is-on { visibility: visible; animation: fb-cut-dim 1s ease-out forwards; }
.fb-cutin-band { position: relative; height: 38%; min-height: 110px; overflow: hidden; transform: skewY(-7deg); border-block: 3px solid #ffd27a; background: linear-gradient(90deg, #120c08, #3a1c0c 55%, #120c08); clip-path: inset(0 0 0 100%); }
.fb-cutin.is-sp .fb-cutin-band { border-color: #ffb0f0; background: linear-gradient(90deg, #160a1a, #4a1446 55%, #160a1a); }
.fb-cutin.is-foe .fb-cutin-band { border-color: #ff6a4a; background: linear-gradient(90deg, #1a0606, #5a0f0a 55%, #1a0606); }
.fb-cutin-band::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0) 0 22px, rgba(255, 255, 255, .13) 22px 24px, rgba(255, 255, 255, 0) 24px 61px); animation: fb-speed .25s linear infinite; }
.fb-cutin.is-on .fb-cutin-band { animation: fb-cut-band 1s cubic-bezier(.2, .8, .3, 1) forwards; animation-duration: inherit; }
.fb-cutin-face { position: absolute; left: 4%; bottom: -14%; height: 135%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; transform: skewY(7deg); filter: drop-shadow(0 0 10px rgba(255, 210, 122, .6)); }
.fb-cutin.is-on .fb-cutin-face { animation: fb-cut-face 1s cubic-bezier(.2, .8, .3, 1) forwards; animation-duration: inherit; }
.fb-cutin-text { position: absolute; right: 6%; top: 50%; display: grid; justify-items: end; gap: 2px; max-width: 58%; transform: translateY(-50%) skewY(7deg); text-align: right; }
.fb-cutin-text small { color: #e9e4d6; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.fb-cutin-text b { color: #ffd27a; font-size: clamp(22px, 7.5vw, 32px); font-weight: 900; font-style: italic; line-height: 1.1; text-shadow: 0 3px 0 #8a4a10, 0 0 14px rgba(255, 210, 122, .7); }
.fb-cutin.is-sp .fb-cutin-text b { color: #ffd0f4; text-shadow: 0 3px 0 #7a2a6a, 0 0 14px rgba(255, 160, 230, .7); }
.fb-cutin.is-foe .fb-cutin-text b { color: #ffb0a0; text-shadow: 0 3px 0 #6a1a10, 0 0 14px rgba(255, 90, 60, .8); }
.fb-cutin.is-on .fb-cutin-text { animation: fb-cut-text 1s ease-out forwards; animation-duration: inherit; }
.fb-wipe { position: absolute; inset: 0; z-index: 90; display: grid; grid-template-rows: repeat(6, 1fr); pointer-events: none; }
.fb-wipe i { display: block; background: #0c0a08; animation: fb-wipe-l .55s cubic-bezier(.6, 0, .3, 1) .12s forwards; }
.fb-wipe i:nth-child(even) { animation-name: fb-wipe-r; }
.fb-wipe i:nth-child(3), .fb-wipe i:nth-child(4) { animation-delay: .05s; }
.fb-warn { position: absolute; inset: 0; z-index: 8; display: grid; grid-template-rows: 18px 1fr 18px; align-content: center; gap: 0; height: 120px; margin: auto 0; pointer-events: none; animation: fb-warn 2.1s ease-out forwards; }
.fb-warn > i { display: block; background: repeating-linear-gradient(-45deg, #e0b74a 0 12px, #1a1916 12px 24px); background-size: 34px 34px; animation: fb-hazard .5s linear infinite; }
.fb-warn > div { display: grid; place-items: center; align-content: center; gap: 2px; background: rgba(60, 6, 4, .88); }
.fb-warn b { color: #ff5a3a; font-size: 26px; font-weight: 900; letter-spacing: .2em; text-shadow: 0 0 12px rgba(255, 60, 30, .9); animation: fb-blink .35s steps(2) 4; }
.fb-warn span { color: #ffd27a; font-size: 14px; font-weight: 800; letter-spacing: .1em; }
@keyframes fb-dmg { 0% { opacity: 0; transform: translate(-50%, 6px) scale(2.2); } 12% { opacity: 1; transform: translate(-50%, 0) scale(.9); } 22% { transform: translate(-50%, -6px) scale(1.08); } 32% { transform: translate(-50%, -4px) scale(1); } 78% { opacity: 1; transform: translate(-50%, -16px); } 100% { opacity: 0; transform: translate(-50%, -30px); } }
@keyframes fb-combo { 0% { opacity: 0; transform: scale(1.8) rotate(-6deg); } 18% { opacity: 1; transform: scale(1) rotate(-6deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px) rotate(-6deg); } }
@keyframes fb-enter { 0% { opacity: 0; transform: translateY(-40%) scale(.5); filter: brightness(4) saturate(0); } 55% { opacity: 1; transform: translateY(4%) scale(1.08, .9); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
@keyframes fb-danger { 0%, 100% { opacity: .15; } 50% { opacity: .75; } }
@keyframes fb-cut-dim { 0% { background: rgba(0, 0, 0, 0); } 15%, 80% { background: rgba(0, 0, 0, .45); } 100% { background: rgba(0, 0, 0, 0); } }
@keyframes fb-cut-band { 0% { clip-path: inset(0 0 0 100%); } 16% { clip-path: inset(0 0 0 0); } 84% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 100% 0 0); opacity: 1; } }
@keyframes fb-cut-face { 0% { transform: skewY(7deg) translateX(120%) scale(.9); } 22% { transform: skewY(7deg) translateX(-4%) scale(1.06); } 80% { transform: skewY(7deg) translateX(-10%) scale(1.1); } 100% { transform: skewY(7deg) translateX(-30%) scale(1.1); } }
@keyframes fb-cut-text { 0%, 14% { opacity: 0; transform: translate(40%, -50%) skewY(7deg); } 30% { opacity: 1; transform: translate(0, -50%) skewY(7deg); } 84% { opacity: 1; transform: translate(-6%, -50%) skewY(7deg); } 100% { opacity: 0; transform: translate(-6%, -50%) skewY(7deg); } }
@keyframes fb-speed { from { background-position-x: 0; } to { background-position-x: -61px; } }
@keyframes fb-wipe-l { to { transform: translateX(-102%); } }
@keyframes fb-wipe-r { to { transform: translateX(102%); } }
@keyframes fb-warn { 0% { opacity: 0; transform: scaleY(.1); } 10% { opacity: 1; transform: scaleY(1); } 85% { opacity: 1; transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(.1); } }
@keyframes fb-hazard { to { background-position: 34px 0; } }
@keyframes fb-blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .fb *, .fb *::before { animation: none !important; transition: none !important; } }

/* フィールド：地域の名前・調べるカード・小さな地図・ネームドの一覧 */
.town-zone { position: absolute; top: calc(env(safe-area-inset-top) + 120px); left: 50%; margin: 0; padding: 6px 18px; border-top: 1px solid rgba(255, 236, 190, .7); border-bottom: 1px solid rgba(255, 236, 190, .7); background: linear-gradient(90deg, rgba(20, 18, 14, 0), rgba(20, 18, 14, .7) 20%, rgba(20, 18, 14, .7) 80%, rgba(20, 18, 14, 0)); color: #fff6dc; font-size: 15px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; opacity: 0; transform: translate(-50%, -6px); transition: opacity .5s, transform .5s; pointer-events: none; }
.town-zone.is-on { opacity: 1; transform: translate(-50%, 0); }
.fd-mini { position: absolute; top: calc(env(safe-area-inset-top) + 50px); right: 10px; width: 64px; height: 96px; border: 2px solid rgba(255, 250, 240, .85); border-radius: 10px; background: #1b2a3a; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); image-rendering: pixelated; pointer-events: none; }
.fd-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(20, 18, 14, .92); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.fd-card[hidden] { display: none; }
.fd-card-art { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.fd-card-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.fd-card-text { display: grid; gap: 2px; min-width: 0; }
.fd-card-text b { font-size: 15px; }
.fd-card-text small { color: #d9d4c7; font-weight: 700; }
.fd-nm { margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: #e0b74a; color: #1a1916; font-size: 10px; font-weight: 900; vertical-align: 2px; }
.fd-con { font-size: 12px; font-weight: 800; }
.fd-con.is-easy { color: #9be59b; }
.fd-con.is-even { color: #fff6dc; }
.fd-con.is-tough { color: #ffc46b; }
.fd-con.is-vtough { color: #ff8a7a; }
.fd-dim { color: #d9d4c7; }
.fd-card-btns { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.fd-target { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 8px 10px; border: 1px solid rgba(255, 120, 90, .55); }
.fd-target .fd-card-art { width: 44px; height: 44px; }
.fd-target .fd-card-btns { grid-column: auto; flex-direction: column; align-items: stretch; }
.fd-target .fd-card-text b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.fd-target.is-going { border-color: rgba(255, 90, 60, .9); }
.fd-going { color: #ffb09a; font-weight: 700; animation: fd-going 1.2s ease-in-out infinite; }
@keyframes fd-going { 50% { opacity: .55; } }
.fd-nms { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fd-nms li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--surface-2); }
.fd-nms li > div { display: grid; gap: 2px; }
.fd-nm-art { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); }
.fd-nm-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.fd-nm-art i { width: 40%; height: 40%; border-radius: 50%; background: var(--line-strong); }
.fd-fade { position: fixed; inset: 0; z-index: 84; background: #05070c; opacity: 0; transition: opacity .28s; pointer-events: none; }
.fd-fade.is-on { opacity: 1; }
.fd-lamp-bar { position: relative; height: 10px; overflow: hidden; border-radius: 5px; background: rgba(0, 0, 0, .12); }
.fd-lamp-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: linear-gradient(90deg, #e8782a, #ffc24a); }
.fd-quests { position: absolute; top: calc(env(safe-area-inset-top) + 50px); left: 10px; display: grid; gap: 2px; max-width: calc(100% - 96px); padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(20, 18, 14, .62); color: #fff; font: inherit; font-size: 11px; line-height: 1.4; text-align: left; cursor: pointer; }
.fd-quests[hidden] { display: none; }
.fd-quests b { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #ffd27a; letter-spacing: .06em; }
.fd-quests i { font-style: normal; font-size: 8px; color: #d8cfb8; }
.fd-quests.is-folded { display: flex; align-items: center; gap: 6px; padding: 5px 10px; }
.fd-quests span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-quests .is-done { color: #ffd27a; font-weight: 700; }
.fd-quests .is-claimed { color: #b9b4a6; }
/* 左上：今日の依頼と、パーティ（たてにならべる） */
.fd-left { position: absolute; top: calc(env(safe-area-inset-top) + 50px); left: 10px; display: grid; justify-items: start; gap: 6px; max-width: calc(100% - 96px); pointer-events: none; }
.fd-left > * { pointer-events: auto; }
/* 体力の輪（右上の地図の下）：ペットの顔のまわりに HP。満タンでないときだけ。押すと休む */
/* 右上：地図の下に、体力の輪とメニュー（たてにならべる） */
/* 世界のお知らせ（新種が生まれた）：画面の上から降りてくる帯 */
.town-news { position: absolute; left: 10px; right: 84px; top: calc(env(safe-area-inset-top) + 56px); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(185, 147, 240, .7); border-radius: 14px; background: linear-gradient(135deg, rgba(40, 24, 70, .95), rgba(20, 16, 34, .95)); color: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 18px rgba(185, 147, 240, .35); animation: town-news-in .5s cubic-bezier(.2, 1.3, .4, 1) both; pointer-events: none; }
.town-news.is-elite { border-color: rgba(255, 210, 122, .85); background: linear-gradient(135deg, rgba(80, 52, 10, .95), rgba(34, 22, 6, .95)); box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 210, 122, .45); }
.town-news.is-unique { border-color: rgba(95, 214, 223, .85); background: linear-gradient(135deg, rgba(10, 58, 64, .95), rgba(6, 26, 30, .95)); box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 22px rgba(95, 214, 223, .45); }
.town-news.is-unique b { color: #5fd6df; }
.town-news.is-unique img { filter: drop-shadow(0 0 8px rgba(95, 214, 223, .7)); }
.town-news.is-land { border-color: rgba(255, 231, 173, .9); background: linear-gradient(135deg, rgba(62, 48, 18, .96), rgba(14, 16, 34, .96)); box-shadow: 0 6px 22px rgba(0, 0, 0, .45), 0 0 26px rgba(255, 226, 166, .5); }
.town-news.is-land b { color: #ffe7ad; }
.town-news img { flex: none; width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255, 210, 122, .7)); }
.town-news div { display: grid; gap: 2px; min-width: 0; }
.town-news b { font-size: 10px; letter-spacing: .12em; color: #d4b0ff; }
.town-news.is-elite b { color: #ffd27a; }
.town-news span { font-size: 13px; font-weight: 700; line-height: 1.45; }
.town-news.is-out { animation: town-news-out .5s ease-in forwards; }
@keyframes town-news-in { from { opacity: 0; transform: translateY(-24px) scale(.96); } }
@keyframes town-news-out { to { opacity: 0; transform: translateY(-16px); } }
.fd-right { position: absolute; top: calc(env(safe-area-inset-top) + 154px); right: 14px; display: grid; justify-items: center; gap: 8px; width: 56px; }
.fd-right.is-town { top: calc(env(safe-area-inset-top) + 56px); }
.fd-menu { display: grid; justify-items: center; gap: 1px; width: 46px; padding: 6px 0 4px; border: 0; border-radius: 12px; background: rgba(20, 18, 14, .7); color: #fff; font: inherit; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.fd-menu span { font-size: 16px; line-height: 1; }
.fd-bars { display: grid; gap: 3px; width: 16px; padding: 1px 0 2px; }
.fd-bars i { height: 2px; border-radius: 1px; background: currentColor; }
.fd-menu small { font-size: 9px; font-weight: 800; }
.fd-ring { position: static; display: grid; justify-items: center; gap: 2px; width: 56px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.fd-ring[hidden] { display: none; }
.fd-ring-face { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(20, 18, 14, .7); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.fd-ring-arc { position: absolute; inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(circle, transparent 18px, #000 19px); mask: radial-gradient(circle, transparent 18px, #000 19px); }
.fd-ring-face img { position: relative; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; image-rendering: pixelated; }
.fd-ring-label { padding: 1px 7px; border-radius: 999px; background: rgba(20, 18, 14, .7); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.fd-ring.is-on .fd-ring-face { box-shadow: 0 0 0 2px #9be59b, 0 0 14px rgba(155, 229, 155, .6); animation: fd-going 1.6s ease-in-out infinite; }
.fd-ring.is-on .fd-ring-label { background: #2f7a45; }
.fd-low { color: #ff9a7a; font-weight: 700; }
/* 冒険のタブ：フィールドの札に、いま出ているネームド */
.wd-nm-up { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #b5361d; }
.wd-live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #3fbf6a; vertical-align: 1px; }

/* 経済：所持金・競売所・バザー */
.mk-gold { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #a86a00; font-variant-numeric: tabular-nums; }
.mk-gold img { width: 16px; height: 16px; image-rendering: pixelated; }
.mn-gold { display: inline-flex; align-items: center; gap: 3px; color: #ffd27a; font-weight: 800; }
.mn-gold img { width: 14px; height: 14px; image-rendering: pixelated; }
.fb-loot-item.is-gold { padding: 3px 10px; background: rgba(255, 210, 122, .25); color: #ffd27a; }
.mk { gap: 10px; }
.mk-head { display: grid; gap: 8px; }
.mk-wallet { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 210, 122, .22), rgba(255, 210, 122, .05)); }
.mk-wallet .mk-gold { font-size: 16px; white-space: nowrap; }
.mk-wallet { flex-wrap: wrap; }
.mk-wallet-note { flex: 1 1 140px; text-align: right; }
.mk-search { width: 100%; }
.mk-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mk-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mk-row.is-static { cursor: default; }
.mk-row-text { display: grid; gap: 2px; min-width: 0; }
.mk-row-text b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.mk-row-text small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mk-price { display: grid; justify-items: end; gap: 2px; }
.mk-price small { color: var(--muted); font-size: 10px; }
.mk-price b { color: #a86a00; font-size: 14px; font-variant-numeric: tabular-nums; }
.mk-hist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mk-hist li { display: grid; grid-template-columns: 40px 34px auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); }
.mk-hist li > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-field { display: grid; gap: 4px; }
.mk-field small { color: var(--muted); font-size: 11px; }
.mk-price-in { width: 100%; font-variant-numeric: tabular-nums; }
.mk-price-in.is-sm { width: 84px; }
.mk-step { display: inline-flex; align-items: center; gap: 6px; }
.mk-step button { min-width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.mk-step .mk-step-max { padding: 0 8px; font-size: 11px; }
.mk-step-v { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.mk-pick { display: grid; gap: 6px; }
.mk-pick.is-on > .mk-row { border-color: #e5a72e; box-shadow: inset 0 0 0 1px #e5a72e; }
/* 長押しで品物のくわしい中身（文字の選択やメニューを出さない）。.mk-look は絵と名前をまとめるだけ（並びはそのまま） */
.mk-row, .mk-look { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.mk-look { display: contents; }
.mk-check { color: #e5a72e; font-size: 18px; font-weight: 900; }
.mk-pick-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 4px 4px; }
.mk-pick-opts small { color: var(--muted); font-size: 11px; }
.mk-empty { padding: 12px; text-align: center; }
.mk-bar { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 8px 10px; border: 1px solid rgba(255, 210, 122, .6); }
.mk-bar[hidden] { display: none; }
.mk-bar .fd-card-art { width: 44px; height: 44px; }
.mk-bar .fd-card-btns { grid-column: auto; flex-direction: column; align-items: stretch; }
.mk-warn { padding: 6px 10px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-weight: 700; }

/* 対戦：相手のチーム（戦いの場に3匹ならぶ。押すと、ねらう相手）・闘技場 */
.dv-stage { position: relative; }
.dv-foes { position: absolute; left: 0; right: 0; bottom: 6%; display: flex; justify-content: center; align-items: flex-end; gap: 4%; padding: 0 3%; transition: bottom .38s ease; }
/* 精霊・人形がいるあいだ、相手のならびは一歩うしろ（手前に精霊・人形が立つ） */
.dv-foes.has-front { bottom: calc(6% + 26px); }
.dv-front { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.dv-foe { position: relative; display: grid; justify-items: center; gap: 2px; width: 30%; max-width: 150px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
/* 重なりの順：ならんだ相手の姿 ＜ 手前の精霊・人形の姿 ＜ 名前・HP の帯・状態（名前と帯は、いつも見える） */
.dv-foe-img { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); transition: opacity .4s, filter .4s; }
.dv-foe-blank { display: block; width: 60%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.dv-foe-name { position: relative; z-index: 4; max-width: 100%; overflow: hidden; padding: 0 6px; border-radius: 6px; background: rgba(20, 18, 14, .62); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.dv-foe-name small { font-weight: 600; opacity: .8; }
.dv-foe-bar { z-index: 4; width: 86%; }
.dv-foe.is-down .dv-foe-img { opacity: .25; filter: grayscale(1); }
/* 対戦の精霊・人形（相手の側）：すこし小さく、印つき。精霊は浮いている。帰った札は出さない */
/* 精霊・人形は、呼んだ子のすぐ前（人形は左前の床に立ち、足もとに影・精霊は右前に浮かぶ）。場所は duel.js の placeSummons */
.dv-foe.is-summon { position: absolute; bottom: 3px; left: 0; width: 20%; max-width: 96px; }
.dv-foe.is-summon.is-placed { transition: left .3s ease; }
.dv-front.is-crowd .dv-foe.is-summon { width: 16.4%; }
.dv-foe.is-summon .dv-foe-img { z-index: 3; }
.dv-foe.is-summon:not(.is-spirit) .dv-foe-img { background: radial-gradient(ellipse 30% 6% at 50% 95%, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0)); }
.dv-foe-name .fb-help { margin-right: 3px; }
.dv-foe.is-summon .dv-foe-name { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 1px; padding: 0 3px; font-size: 10px; letter-spacing: -.02em; white-space: nowrap; text-align: center; line-height: 1.25; }
.dv-foe.is-summon .dv-foe-name .fb-help { margin-right: 0; }
.dv-foe.is-spirit .dv-foe-img { animation: dv-float 1.8s ease-in-out infinite; }
@keyframes dv-float { 50% { translate: 0 -5px; } }
.dv-foe.is-gone { display: none; }
/* あらわれる：白く光って透けた姿から、実体に（名前と HP の帯は、そのあと） */
.dv-foe.is-summoning .dv-foe-img { opacity: 0; filter: brightness(2.2) saturate(.4) blur(1px); }
.dv-foe.is-summoning.is-in .dv-foe-img { opacity: .5; }
.dv-foe.is-summoning.is-solid .dv-foe-img { opacity: 1; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
.dv-foe.is-summoning .dv-foe-name, .dv-foe.is-summoning .dv-foe-bar { opacity: 0; transition: opacity .3s; }
.dv-foe.is-summoning.is-solid .dv-foe-name, .dv-foe.is-summoning.is-solid .dv-foe-bar { opacity: 1; }
/* 技の前：属性の色の光がたまる。帰る：光の柱の中で透けて消える */
.dv-foe.is-charge .dv-foe-img { filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 12px var(--glow)) brightness(1.2); }
.dv-foe.is-leave { animation: fb-leave .65s ease-in forwards; pointer-events: none; }
.dv-foe.is-summon.is-leave { z-index: 3; }
.dv-ring { position: absolute; left: 10%; right: 10%; top: 72%; z-index: 3; height: 14%; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 90, 60, 0); transition: box-shadow .2s; pointer-events: none; }
.dv-ring.is-on { box-shadow: 0 0 0 3px #ff5a3a, 0 0 14px rgba(255, 90, 60, .7); animation: fd-going 1.2s ease-in-out infinite; }
.dv-vs { position: absolute; top: 10px; left: 12px; z-index: 3; display: grid; padding: 4px 10px; border-radius: 10px; background: rgba(20, 18, 14, .62); color: #fff; }
.dv-vs b { font-size: 14px; }
.dv-vs small { font-size: 10px; color: #ffd27a; }
.dv-aim { font-size: 11px; }
.dv-me { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(229, 167, 46, .2), rgba(229, 167, 46, .05)); }
.dv-me > div:first-child { display: flex; align-items: center; gap: 8px; }
.dv-title { padding: 1px 8px; border-radius: 999px; background: #e5a72e; color: #1a1916; font-size: 10px; font-weight: 800; }
.dv-me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dv-me-stats span { display: grid; justify-items: center; padding: 6px 2px; border-radius: 10px; background: var(--surface); }
.dv-me-stats small { color: var(--muted); font-size: 10px; }
.dv-me-stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.dv-rival { grid-template-columns: auto minmax(0, 1fr) auto; }
.dv-team { display: flex; }
.dv-team .dv-face + .dv-face { margin-left: -8px; }
.dv-face { width: 30px; height: 30px; overflow: hidden; border-radius: 50%; background: var(--surface-2); }
.dv-face img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.dv-rank { color: #a86a00; font-size: 12px; white-space: nowrap; }
.mk-row.is-me { border-color: #e5a72e; }
.dv-champ { grid-template-columns: 30px minmax(0, 1fr) auto; }

/* メニュー：RPG の窓（紺のガラス・細い光のふち・金の見出し）。上にペットと仲間、下に項目 */
.sheet.mn-sheet { background: linear-gradient(180deg, #1c2440 0%, #121628 100%); color: #eef1ff; border: 1px solid rgba(160, 180, 255, .28); border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
.sheet.mn-sheet .sheet-head { border-bottom-color: rgba(160, 180, 255, .18); }
.sheet.mn-sheet .sheet-head h3 { color: #ffd27a; letter-spacing: .2em; font-size: 14px; }
.sheet.mn-sheet .sheet-head .btn { color: #cfd6f5; }
.mn { display: grid; gap: 12px; }
.mn-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid rgba(160, 180, 255, .2); }
.mn-face { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a4675, #1a2038); box-shadow: 0 0 0 2px rgba(255, 210, 122, .7), 0 0 16px rgba(255, 210, 122, .25); }
.mn-face img { width: 88%; height: 88%; object-fit: contain; image-rendering: pixelated; }
.mn-hero-text { display: grid; gap: 4px; min-width: 0; }
.mn-hero-text > b { display: flex; align-items: baseline; gap: 8px; font-size: 17px; }
.mn-hero-text > b small { color: #ffd27a; font-size: 12px; font-weight: 800; }
.mn-title { font-size: 11px; color: #aab3d8; }
.mn-gauge { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.mn-gauge em { font-style: normal; font-size: 10px; font-weight: 800; color: #aab3d8; }
.mn-gauge small { font-size: 10px; color: #cfd6f5; font-variant-numeric: tabular-nums; }
.mn-bar { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.mn-bar i { display: block; height: 100%; border-radius: 3px; }
.mn-bar.is-hp i { background: linear-gradient(90deg, #4cc46a, #8de29a); }
.mn-bar.is-mp i { background: linear-gradient(90deg, #3f7fe0, #8ab6ff); }
.mn-party { display: flex; gap: 8px; }
.mn-mate { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(160, 180, 255, .14); }
.mn-mate > span:last-child { display: grid; min-width: 0; }
.mn-mate b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mn-mate small { font-size: 10px; color: #aab3d8; }
.mn-list { display: grid; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px solid rgba(160, 180, 255, .14); }
.mn-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mn-row:active, .mn-row:hover { background: linear-gradient(90deg, rgba(255, 210, 122, .16), rgba(255, 210, 122, 0)); }
.mn-row + .mn-row { box-shadow: 0 -1px 0 rgba(160, 180, 255, .1); }
.mn-art { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #33406d, #1a2038); }
.mn-mate .mn-art { width: 32px; height: 32px; border-radius: 9px; }
.mn-art img { width: 86%; height: 86%; object-fit: contain; image-rendering: pixelated; }
.mn-art i { width: 40%; height: 40%; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.mn-label { display: grid; gap: 2px; min-width: 0; }
.mn-label b { font-size: 15px; letter-spacing: .04em; }
.mn-label small { overflow: hidden; font-size: 11px; color: #aab3d8; text-overflow: ellipsis; white-space: nowrap; }
.mn-go { color: #ffd27a; font-size: 20px; }
.wd-st-gauge { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.wd-st-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(0, 0, 0, .08); }
.wd-st-bar i { display: block; height: 100%; border-radius: 4px; }
.wd-st-gauge.is-hp i { background: #4cbf6a; }
.wd-st-gauge.is-mp i { background: #4a8fe0; }
.wd-item-top { display: flex; align-items: center; gap: 12px; }
.wd-item-top > div { display: grid; gap: 2px; }
.wd-icon.lg { width: 56px; height: 56px; }
.wd-item-look { padding: 0; border: 0; background: none; cursor: pointer; }
.wd-sig-head { color: #b5361d; font-weight: 800; }
button.wd-slot { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
button.fb-loot-item { border: 0; font: inherit; color: inherit; cursor: pointer; }
/* 新種：卵（牧場の一覧）・かえる画面・お披露目 */
.wd-mon-art.is-egg i { width: 56%; height: 70%; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f3e7ff 30%, #b993f0 100%); box-shadow: 0 0 10px rgba(185, 147, 240, .7); }
.wd-variant { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 210, 122, .18), rgba(185, 147, 240, .18)); }
.wd-variant b { color: #b5361d; }
.wd-hatch { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; background: radial-gradient(circle at 50% 40%, #3a2a5a, #0d0a16 70%); color: #fff; text-align: center; opacity: 0; transition: opacity .25s; }
.wd-hatch.is-in { opacity: 1; }
.wd-hatch-stage { display: grid; place-items: center; width: 220px; height: 220px; }
.wd-egg { position: relative; width: 110px; height: 140px; }
.wd-egg-shell { position: absolute; inset: 0; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 28%, #fff 0 10%, #f3e7ff 28%, #b993f0 70%, #7a52c0 100%); box-shadow: 0 0 30px rgba(185, 147, 240, .7); }
.wd-egg-glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 160, .45), transparent 65%); animation: wd-glow 1.6s ease-in-out infinite; }
.wd-egg.is-shake { animation: wd-shake 1.1s ease-in-out infinite; }
/* 上位種の卵：金色に光る */
.wd-egg.is-elite .wd-egg-shell { background: radial-gradient(circle at 35% 28%, #fff 0 10%, #fff3c8 28%, #ffd27a 65%, #c8862a 100%); box-shadow: 0 0 40px rgba(255, 210, 122, .85); }
.wd-egg.is-elite .wd-egg-glow { background: radial-gradient(circle, rgba(255, 220, 140, .6), transparent 65%); }
.wd-variant.is-elite { background: linear-gradient(135deg, rgba(255, 210, 122, .32), rgba(255, 170, 80, .14)); }
.wd-egg.is-crack .wd-egg-shell { animation: wd-crack .9s ease-in forwards; }
/* 待っているあいだ、だんだん強く：ふるえが速く・光が強く */
.wd-egg.is-shake.is-s1 { animation-duration: .95s; }
.wd-egg.is-shake.is-s2 { animation-duration: .8s; }
.wd-egg.is-shake.is-s3 { animation-duration: .6s; }
.wd-egg.is-shake.is-s4 { animation-duration: .45s; }
.wd-egg.is-s2 .wd-egg-glow, .wd-egg.is-s3 .wd-egg-glow { inset: -42px; animation-duration: 1.1s; }
.wd-egg.is-s4 .wd-egg-glow { inset: -56px; animation-duration: .8s; }
.wd-egg.is-s3 .wd-egg-shell, .wd-egg.is-s4 .wd-egg-shell { filter: brightness(1.15); }
.wd-hatch-line { display: block; animation: wd-line 1.2s ease-out both; }
@keyframes wd-line { from { opacity: 0; transform: translateY(6px); letter-spacing: .12em; } }
@keyframes wd-shake { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-8deg); } 80% { transform: rotate(7deg); } 90% { transform: rotate(-4deg); } }
@keyframes wd-glow { 50% { opacity: .5; transform: scale(1.08); } }
@keyframes wd-crack { 60% { filter: brightness(2); transform: scale(1.1); } 100% { filter: brightness(4); transform: scale(1.4); opacity: 0; } }
.wd-born { display: grid; place-items: center; width: 220px; height: 220px; animation: wd-born .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.wd-born img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(255, 210, 122, .7)); }
@keyframes wd-born { from { transform: scale(.3); opacity: 0; } }
.wd-hatch-text { display: grid; gap: 4px; font-size: 16px; font-weight: 800; }
.wd-hatch-text b { font-size: 24px; }
.wd-born-tag { color: #ffd27a; font-size: 12px; letter-spacing: .1em; }
.wd-hatch-sub { display: grid; gap: 6px; max-width: 320px; color: #ddd3f0; font-size: 13px; }
.wd-born-sig { color: #ffd27a; font-weight: 700; }
.wd-hatch-acts { display: flex; gap: 10px; }
/* 配合の頂点・図鑑のヒント */
.wd-breed-special.is-apex { background: linear-gradient(90deg, #ffd27a, #ff9a5a); color: #3a1d00; }
.wd-breed-need { padding: 8px 10px; border-radius: 10px; background: rgba(185, 147, 240, .16); color: #5a3a8f; font-weight: 700; }
button.wd-dex-one { border: 0; font: inherit; color: inherit; cursor: pointer; }
.wd-dex-one.is-apex { box-shadow: inset 0 0 0 2px #e5a72e; }
.wd-dex-hint { padding: 0 6px; border-radius: 999px; background: #5a3a8f; color: #fff; font-size: 9px; font-weight: 800; }
.wd-hints { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wd-hints li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2, #f3efe6); }
.wd-hints li:first-child { font-weight: 700; }
.wd-star { margin-right: 2px; color: #e5a72e; text-shadow: 0 0 6px rgba(255, 210, 122, .8); }
.wd-nm-up em { flex: none; white-space: nowrap; padding: 0 6px; border-radius: 999px; background: #b5361d; color: #fff; font-size: 10px; font-style: normal; }
.fd-left .fd-quests { position: static; max-width: 100%; }
/* イベントの難易度（フィールドの左上）。押すと敵の目安。レベル差で戦利品が減っているときは、くすんだ色 */
.fd-tier { padding: 3px 10px; border: 0; border-radius: 999px; background: rgba(8, 10, 16, .66); color: #fff; font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.fd-tier.t1 { color: #a8ecb8; } .fd-tier.t2 { color: #9fe3e0; } .fd-tier.t3 { color: #a9c8ff; } .fd-tier.t4 { color: #ffc98a; } .fd-tier.t5 { color: #ff9f8f; } .fd-tier.t6 { color: #e2b4ff; }
.fd-tier.is-pen { opacity: .7; text-decoration: line-through; text-decoration-thickness: 1px; }
/* 混沌：のこり時間（5分を切ると赤く脈打つ）と、はじき出されるときの言葉 */
.fd-tier.fd-chaos-left { cursor: default; color: #d9b8ff; background: rgba(30, 6, 48, .78); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.fd-tier.fd-ob-left { cursor: default; color: #ffd98a; background: rgba(44, 26, 6, .76); letter-spacing: .04em; }
/* 灯台の光：冒険の門の、暗がりの向こうの土地（ほかの子には影だけ）・回廊で光に届いた瞬間 */
.wd-region.is-dark .wd-region-art { background-color: #05070f; filter: brightness(.16) saturate(.4) blur(1.5px); }
.wd-region.is-dark .wd-region-text b { letter-spacing: .3em; }
.wd-region.is-mine .wd-region-art { background-color: #05070f; filter: brightness(.5) saturate(.7); }
.fb-quest.fb-shook { text-align: center; font-size: 20px; letter-spacing: .3em; color: #ffe7ad; }
.fd-tier.fd-chaos-left.is-low { color: #ffb0c4; animation: fd-chaos-pulse 1.2s ease-in-out infinite; }
@keyframes fd-chaos-pulse { 50% { background: rgba(110, 10, 50, .85); } }
.fd-chaos-out { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 0 24px; background: radial-gradient(circle at 50% 50%, rgba(40, 0, 60, .82), rgba(4, 0, 10, .97)); opacity: 0; transition: opacity .9s ease; pointer-events: auto; }
.fd-chaos-out.is-on { opacity: 1; }
.fd-chaos-out.is-off { opacity: 0; }
.fd-chaos-out p span { display: inline-block; }
.fd-chaos-out p { margin: 0; color: #e8d6ff; font-size: 17px; font-weight: 700; line-height: 1.7; text-align: center; letter-spacing: .06em; text-shadow: 0 0 12px rgba(170, 90, 255, .8); animation: fd-chaos-shake 2.4s ease-in-out; }
@keyframes fd-chaos-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-2px); } 40% { transform: translateX(2px); } 60% { transform: translateX(-1px); } }
.fd-party { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; border-radius: 10px; background: rgba(30, 70, 50, .78); color: #fff; font: inherit; font-size: 11px; cursor: pointer; }
.fd-party[hidden] { display: none; }
.fd-party b { font-size: 10px; color: #b8f0c8; letter-spacing: .06em; }
.fd-party-near { padding: 0 6px; border-radius: 999px; background: #3a9a5b; font-size: 10px; font-weight: 800; }
.fd-party-list { display: grid; gap: 8px; margin: 10px 0 14px; padding: 0; list-style: none; }
.fd-party-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.fd-party-list small { margin-left: 4px; font-weight: 400; color: var(--muted, #777); }
/* いっしょに戦う子（パーティ・乱入で1人1匹）：ペットと連れている仲間を、横に並べた札で。選んでいる札は枠と「戦う」の印 */
.fd-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fd-pick-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 12px 6px 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.fd-pick-tile:active { transform: scale(.97); }
.fd-pick-tile img { width: 56px; height: 56px; margin-bottom: 4px; object-fit: contain; image-rendering: pixelated; }
.fd-pick-name { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.fd-pick-sub { font-size: 11px; color: var(--muted); }
.fd-pick-bar { width: 78%; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.fd-pick-bar i { display: block; height: 100%; border-radius: 2px; background: #4cbb6c; }
.fd-pick-bar.is-low i { background: #e5533d; }
.fd-pick-tile.is-on { border: 2px solid var(--accent); padding: 11px 5px 9px; background: var(--accent-soft); }
.fd-pick-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.fd-pick-sec { margin: 12px 0 16px; }
.fd-pick-sec > p { margin: 0 0 12px; }
.fd-pick-note { margin: 12px 0 0; }
/* フィールドの札（暗い地）の中：加わる前に、その場で選ぶ */
.fd-pick-row { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
.fd-pick-row .fd-pick { gap: 6px; }
.fd-pick-row .fd-pick-tile { gap: 1px; padding: 11px 4px 7px; border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; }
.fd-pick-row .fd-pick-tile img { width: 36px; height: 36px; margin-bottom: 2px; }
.fd-pick-row .fd-pick-name { font-size: 12px; }
.fd-pick-row .fd-pick-sub { font-size: 10px; color: #cfc8b8; }
.fd-pick-row .fd-pick-bar { height: 3px; margin-top: 2px; background: rgba(255, 255, 255, .15); }
.fd-pick-row .fd-pick-tile.is-on { padding: 10px 3px 6px; border-color: #ffb35c; background: rgba(255, 179, 92, .16); }
.fd-pick-row .fd-pick-badge { top: -8px; background: #ffb35c; color: #2a1a08; }
.fd-party img { width: 18px; height: 18px; margin: -2px -2px -2px 2px; object-fit: contain; image-rendering: pixelated; }
/* とどいたパーティのさそい・ほかのペットの札 */
.fd-invite { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 8px 10px; border: 1px solid rgba(120, 220, 150, .6); }
.fd-invite .fd-card-art { width: 44px; height: 44px; }
.fd-invite .fd-card-btns { grid-column: auto; flex-direction: column; align-items: stretch; }
.fd-petcard { border-color: rgba(159, 208, 255, .55); }
.fd-con.is-party { padding: 0 6px; border-radius: 999px; background: #3a9a5b; color: #fff; font-size: 10px; }
.fd-join { color: #9fd0ff; font-weight: 700; }
/* ネームド出現（このエリアに現れたとき）：画面のまん中に帯 */
.fd-nm-pop { position: absolute; left: 0; right: 0; top: 34%; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0; background: linear-gradient(90deg, rgba(90, 10, 10, 0), rgba(90, 10, 10, .88) 20%, rgba(90, 10, 10, .88) 80%, rgba(90, 10, 10, 0)); color: #fff; pointer-events: none; }
.fd-nm-pop[hidden] { display: none; }
.fd-nm-pop i { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #ffd27a); }
.fd-nm-pop i:last-child { transform: scaleX(-1); }
.fd-nm-pop div { display: grid; justify-items: center; }
.fd-nm-pop b { font-size: 11px; letter-spacing: .3em; color: #ffd27a; }
.fd-nm-pop span { font-size: 20px; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.fd-nm-pop.is-on { animation: fd-nm-pop 3.2s ease-out forwards; }
@keyframes fd-nm-pop { 0% { opacity: 0; transform: scaleY(.2); } 8% { opacity: 1; transform: scaleY(1.08); } 14% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.fb-quest { color: #ffd27a; font-weight: 700; }
.wd-quests { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wd-quests li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.wd-quests li > div { display: grid; gap: 1px; min-width: 0; }
.wd-quests li.is-done { box-shadow: inset 0 0 0 1.5px var(--rare-4); background: var(--rare-4-soft); }
.wd-quests li.is-claimed { opacity: .6; }

/* ===== むすびの儀式（配合の演出：breed-scene.js） ===== */
.bs { position: fixed; inset: 0; z-index: 92; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px 16px; background: radial-gradient(circle at 50% 36%, #2d1f4f, #0b0814 72%); color: #fff; text-align: center; opacity: 0; transition: opacity .3s; overflow: hidden; }
.bs.is-gold { background: radial-gradient(circle at 50% 36%, #4a3412, #120c04 72%); }
.bs.is-in { opacity: 1; }
.bs-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bs-stage { position: relative; width: 300px; height: 300px; }
.bs-circle { position: absolute; inset: 20px; width: 260px; height: 260px; mix-blend-mode: screen; opacity: 0; animation: bs-in-scale 1s .2s forwards, bs-rot 16s linear infinite; }
.bs.is-s3 .bs-circle { opacity: .95; scale: 1.05; animation: bs-rot 2.4s linear infinite; filter: brightness(1.4); }
.bs.is-born .bs-circle { opacity: .55; scale: 1.15; animation: bs-rot 12s linear infinite; transition: opacity .8s, scale .8s; }
.bs-mon { position: absolute; top: 102px; width: 96px; height: 96px; display: grid; place-items: center; transition: left .95s cubic-bezier(.5, 0, .3, 1), scale .95s cubic-bezier(.5, 0, .3, 1), opacity .9s, filter .9s; filter: drop-shadow(0 0 10px rgba(190, 160, 255, .55)); }
.bs.is-gold .bs-mon { filter: drop-shadow(0 0 10px rgba(255, 200, 110, .6)); }
.bs-mon img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.bs-mon.is-a { left: 0; }
.bs-mon.is-b { left: 204px; }
.bs-mon.is-a img { animation: bs-enter-a .8s .25s both, bs-bob 2.4s ease-in-out 1.1s infinite; }
.bs-mon.is-b img { animation: bs-enter-b .8s .25s both, bs-bob 2.4s ease-in-out 1.3s infinite; }
.bs.is-s3 .bs-mon { left: 102px; scale: .12; opacity: 0; filter: brightness(4) blur(3px); }
.bs-beam { position: absolute; top: 149px; left: 60px; right: 60px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, #fff 20%, #fff 80%, transparent); box-shadow: 0 0 14px 4px rgba(190, 160, 255, .8); transform: scaleX(0); opacity: 0; transition: transform .8s ease-out, opacity .4s; }
.bs.is-gold .bs-beam { box-shadow: 0 0 14px 4px rgba(255, 210, 120, .85); }
.bs.is-s2 .bs-beam { transform: scaleX(1); opacity: 1; animation: bs-pulse 1s ease-in-out infinite; }
.bs.is-s3 .bs-beam, .bs.is-born .bs-beam { opacity: 0; animation: none; }
.bs-orb { position: absolute; left: 140px; top: 141px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #e8dcff 32%, rgba(160, 120, 255, 0) 70%); scale: 0; transition: scale 1.5s cubic-bezier(.3, 0, .2, 1); }
.bs.is-gold .bs-orb { background: radial-gradient(circle, #fff 0%, #ffe7a8 32%, rgba(255, 190, 80, 0) 70%); }
.bs.is-s3 .bs-orb { scale: 7; animation: bs-throb .45s ease-in-out infinite; }
.bs.is-born .bs-orb { scale: 0; transition: scale .25s; animation: none; }
.bs-pillar { position: absolute; left: 50%; top: -140px; width: 150px; height: 440px; margin-left: -75px; object-fit: fill; mix-blend-mode: screen; opacity: 0; transform-origin: 50% 100%; scale: 1 0; transition: scale .5s ease-out, opacity .3s; }
.bs.is-s4 .bs-pillar { opacity: 1; scale: 1 1; }
.bs.is-born .bs-pillar { opacity: 0; transition: opacity 1.4s .2s; }
.bs-burst { position: absolute; inset: 0; width: 300px; height: 300px; mix-blend-mode: screen; opacity: 0; scale: .3; pointer-events: none; }
.bs.is-born .bs-burst { animation: bs-burst 1.2s ease-out forwards; }
.bs-child { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; display: grid; place-items: center; animation: bs-pop .75s cubic-bezier(.2, 1.4, .4, 1) both; }
.bs-child-img { position: relative; width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .5)); animation: bs-bob 2.6s ease-in-out .8s infinite; }
.bs-halo { position: absolute; left: -25px; top: -25px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(225, 205, 255, .55) 0%, rgba(170, 130, 255, .25) 40%, rgba(120, 80, 220, 0) 70%); animation: bs-halo 2.2s ease-in-out infinite; }
.bs.is-gold .bs-halo { background: radial-gradient(circle, rgba(255, 238, 190, .6) 0%, rgba(255, 200, 100, .28) 40%, rgba(255, 170, 60, 0) 70%); }
@keyframes bs-halo { 0%, 100% { opacity: .75; scale: .92; } 50% { opacity: 1; scale: 1.06; } }
.bs-child.is-egg .wd-egg { scale: .8; }
.bs-text { min-height: 66px; display: grid; gap: 6px; align-content: start; max-width: 340px; font-size: 16px; font-weight: 800; }
.bs-line { display: block; animation: wd-line 1.2s ease-out both; }
.bs-tag { font-size: 13px; letter-spacing: .08em; color: #d9c8ff; animation: bs-pop .5s both; }
.bs-tag.is-gold { color: #ffd77a; text-shadow: 0 0 10px rgba(255, 200, 90, .8); }
.bs-name { font-size: 26px; animation: bs-pop .6s .1s both; }
.bs-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; color: #ddd3f0; font-size: 12px; font-weight: 700; animation: wd-line 1s .3s both; }
.bs-rank { padding: 1px 9px; border-radius: 6px; background: #5b5750; color: #fff; font-style: normal; animation: bs-stamp .55s .4s both; }
.bs-rank.is-s { background: linear-gradient(135deg, #ffe08a, #e09a1e); color: #3a2500; box-shadow: 0 0 12px rgba(255, 200, 90, .7); }
/* 上位種のランク「？」：虹色 */
.bs-rank.is-q { background: linear-gradient(135deg, #ff8fb1, #ffd36e, #8fe3ff, #b59bff); color: #2a1640; box-shadow: 0 0 14px rgba(200, 160, 255, .8); }
.bs-rank.is-a { background: #c0392b; }
.bs-rank.is-b { background: #7b3fb0; }
.bs-rank.is-c { background: #2f6fd6; }
.bs-rank.is-d { background: #2e8b57; }
.bs-sub { display: grid; gap: 6px; max-width: 340px; color: #ddd3f0; font-size: 13px; }
.bs-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; animation: wd-line 1s .5s both; }
.bs-skills small { width: 100%; color: #b9acd6; }
.ch-look { justify-self: start; margin-top: 4px; }
/* 編成セット：ペットと連れていく仲間を、絵・名前・装備で */
.wd-pset-team { display: grid; gap: 6px; }
.wd-pset-one { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wd-pset-one.is-gone { opacity: .55; }
.wd-pset-one .wd-mon-art { flex: none; width: 40px; height: 40px; }
.wd-pset-text { display: grid; min-width: 0; }
.wd-pset-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-pset-gear { color: var(--ink-2); }
.wd-farm-head .wd-pset-open { margin-left: auto; }
.bs-other { margin: 8px 0 0; font-size: 13px; color: #e9dfff; animation: wd-line 1s .8s both; }
.bs-chip { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 700; }
.bs-acts { display: flex; justify-content: center; gap: 10px; min-height: 44px; }
.bs-skip { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; color: rgba(255, 255, 255, .45); font-size: 11px; }
.bs.is-born .bs-skip { display: none; }
@keyframes bs-in-scale { from { opacity: 0; scale: .4; } to { opacity: .85; scale: 1; } }
@keyframes bs-rot { to { rotate: 360deg; } }
@keyframes bs-enter-a { from { opacity: 0; translate: -70px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes bs-enter-b { from { opacity: 0; translate: 70px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes bs-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bs-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.8); } }
@keyframes bs-throb { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes bs-burst { 0% { opacity: 1; scale: .3; } 100% { opacity: 0; scale: 1.7; } }
@keyframes bs-pop { from { opacity: 0; scale: 0; } to { opacity: 1; scale: 1; } }
@keyframes bs-stamp { 0% { opacity: 0; scale: 2.4; } 60% { opacity: 1; scale: .9; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .bs * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* 進化の演出（evolve-scene.js）：光につつまれ、光の繭で待ち、光の柱とともに新しい姿が現れる */
.ev { position: fixed; inset: 0; z-index: 92; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px 16px; background: radial-gradient(circle at 50% 36%, #3a2a12, #0d0905 72%); color: #fff; text-align: center; opacity: 0; transition: opacity .3s; overflow: hidden; }
.ev.is-in { opacity: 1; }
.ev-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ev-stage { position: relative; width: 280px; height: 280px; }
.ev-circle { position: absolute; inset: 10px; width: 260px; height: 260px; mix-blend-mode: screen; opacity: 0; animation: bs-in-scale 1s .2s forwards, bs-rot 16s linear infinite; }
.ev.is-s3 .ev-circle { opacity: .95; filter: brightness(1.4); animation: bs-rot 3s linear infinite; }
.ev.is-born .ev-circle { opacity: .5; scale: 1.1; animation: bs-rot 12s linear infinite; transition: opacity .8s, scale .8s; }
.ev-pet { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; display: grid; place-items: center; transition: filter 1.2s, scale 1.2s; filter: drop-shadow(0 0 10px rgba(255, 210, 120, .5)); }
.ev-pet > *, .ev-new-art > * { width: 100%; height: 100%; }
.ev-pet img, .ev-new-art img { width: 100%; height: 100%; object-fit: contain; }
.ev-pet img.pixel, .ev-new-art img.pixel { image-rendering: pixelated; }
.ev-pet .pet-ai-shadow, .ev-new-art .pet-ai-shadow { display: none; }
.ev.is-s2 .ev-pet { filter: brightness(1.9) drop-shadow(0 0 22px rgba(255, 230, 160, .95)); }
/* 光の繭：白い影になって、ふくらんだり縮んだりする */
.ev.is-s3 .ev-pet { filter: brightness(0) invert(1) drop-shadow(0 0 26px #fff) drop-shadow(0 0 40px rgba(255, 210, 120, .9)); animation: ev-flicker 1.1s ease-in-out infinite; }
.ev-orb { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #ffe9b0 30%, rgba(255, 190, 80, 0) 70%); scale: 0; transition: scale 1.6s cubic-bezier(.3, 0, .2, 1); }
.ev.is-s3 .ev-orb { scale: 6; animation: bs-throb 1.1s ease-in-out infinite; }
.ev.is-born .ev-orb { scale: 0; transition: scale .25s; animation: none; }
.ev-pillar { position: absolute; left: 50%; top: -150px; width: 150px; height: 440px; margin-left: -75px; object-fit: fill; mix-blend-mode: screen; opacity: 0; transform-origin: 50% 100%; scale: 1 0; transition: scale .5s ease-out, opacity .3s; pointer-events: none; }
.ev.is-s4 .ev-pillar { opacity: 1; scale: 1 1; }
.ev.is-born .ev-pillar { opacity: 0; transition: opacity 1.4s .2s; }
.ev-burst { position: absolute; inset: 0; width: 280px; height: 280px; mix-blend-mode: screen; opacity: 0; scale: .3; pointer-events: none; }
.ev.is-born .ev-burst { animation: bs-burst 1.2s ease-out forwards; }
.ev-new { position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px; display: grid; place-items: center; animation: bs-pop .75s cubic-bezier(.2, 1.4, .4, 1) both; }
.ev-new-art { position: relative; width: 190px; height: 190px; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .45)); animation: bs-bob 2.6s ease-in-out .8s infinite; }
.ev-halo { position: absolute; left: -30px; top: -30px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 238, 190, .6) 0%, rgba(255, 200, 100, .26) 40%, rgba(255, 170, 60, 0) 70%); animation: bs-halo 2.2s ease-in-out infinite; }
.ev-text { min-height: 66px; display: grid; gap: 6px; align-content: start; max-width: 340px; font-size: 16px; font-weight: 800; }
.ev-line { display: block; animation: wd-line 1.2s ease-out both; }
.ev-tag { font-size: 13px; letter-spacing: .12em; color: #ffd77a; text-shadow: 0 0 10px rgba(255, 200, 90, .8); animation: bs-pop .5s both; }
.ev-name { font-size: 26px; animation: bs-pop .6s .1s both; }
.ev-meta { color: #f0e3c8; font-size: 12px; font-weight: 700; animation: wd-line 1s .3s both; }
.ev-sub { display: grid; gap: 6px; max-width: 340px; color: #efe4cf; font-size: 13px; }
.ev-ability { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); animation: wd-line 1s .5s both; }
.ev-ability small { color: #d9c9a6; }
.ev-ability b { font-size: 15px; color: #ffe2a0; }
.ev-acts { display: flex; justify-content: center; gap: 10px; min-height: 44px; }
.ev-later { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .25); }
.ev.is-fail .ev-pet { filter: grayscale(.4) brightness(.9); animation: none; }
.ev.is-fail .ev-orb { scale: 0; }
@keyframes ev-flicker { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.08; opacity: .82; } }
@media (prefers-reduced-motion: reduce) { .ev * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ワールドボス（フィールド）：札の HP バーと、結果の欄 */
.fd-nm.is-wb { background: #6a2fb0; color: #fff; }
.fd-wb-bar { display: block; height: 6px; margin: 3px 0 2px; border-radius: 999px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.fd-wb-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6a3d, #ffb13d); }
.fb-wb { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(106, 47, 176, .12); }
.fb-nm.is-wb { background: #6a2fb0; color: #fff; }

/* ===================== イベント「きさらぎ駅」：紙芝居の場面・駅名標・プレート・スマホ・左上の物語・掲示板のスレ・冒険のカード ===================== */
.kg-scene { position: fixed; inset: 0; z-index: 88; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 14px); background: #04050a; color: #f2efe6; opacity: 0; transition: opacity .38s; user-select: none; -webkit-user-select: none; cursor: pointer; font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; }
.kg-scene.is-on { opacity: 1; }
.kg-scene.is-over { background: radial-gradient(ellipse at 50% 45%, rgba(4, 5, 10, .05), rgba(4, 5, 10, .55) 75%); }
.kg-scene-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.kg-scene-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s; background: linear-gradient(180deg, #0b1020, #04050a); }
.kg-scene-layer.is-on { opacity: 1; }
.kg-scene-layer img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transform-origin: 50% 60%; animation: kg-drift 22s ease-out forwards; }
.kg-scene-layer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 5, 10, .35), rgba(4, 5, 10, 0) 30%, rgba(4, 5, 10, 0) 55%, rgba(4, 5, 10, .85)); }
@keyframes kg-drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }
/* 絵がまだないときの、色だけの背景 */
.kg-bg-train { background: radial-gradient(ellipse at 50% 30%, #2a3348, #0a0d16 70%); }
.kg-bg-platform, .kg-bg-dawn { background: radial-gradient(ellipse at 50% 20%, #33405a, #0a0d16 70%); }
.kg-bg-dawn { background: linear-gradient(180deg, #6b7fa8, #d9b8a0 40%, #1a1d2a); }
.kg-bg-tunnel { background: radial-gradient(circle at 50% 40%, #000 18%, #232a33 19%, #10141a 60%); }
.kg-bg-car, .kg-bg-road { background: radial-gradient(ellipse at 70% 60%, rgba(255, 245, 200, .35), #0b0e14 50%); }
.kg-bg-festival, .kg-bg-mask { background: radial-gradient(ellipse at 50% 40%, #6a2418, #12070a 70%); }
.kg-scene-extra { position: relative; z-index: 1; display: grid; justify-items: center; margin-bottom: 14px; pointer-events: none; }
.kg-scene-box { position: relative; z-index: 1; width: 100%; max-width: 560px; margin: 0 auto; min-height: 112px; padding: 16px 18px 22px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(8, 10, 16, .84); box-shadow: 0 18px 50px -20px #000; }
.kg-scene-box.is-empty { min-height: 0; padding: 10px; background: transparent; border-color: transparent; box-shadow: none; }
.kg-text { margin: 0; font-size: 16px; line-height: 1.95; letter-spacing: .04em; white-space: pre-wrap; }
.kg-text.is-say { color: #fff6dc; }
.kg-who { display: inline-block; margin-bottom: 4px; padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #ffd9b0; font-size: 12px; letter-spacing: .12em; }
.kg-next { position: absolute; right: 14px; bottom: 6px; font-style: normal; font-size: 10px; color: #c9c4b6; animation: kg-blink 1.1s infinite; }
@keyframes kg-blink { 50% { opacity: .2; } }
.kg-scene-skip { position: absolute; top: calc(env(safe-area-inset-top) + 10px); right: 12px; z-index: 2; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(0, 0, 0, .35); color: #e8e4d8; font: inherit; font-size: 12px; cursor: pointer; }
.kg-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kg-choice { justify-content: center; min-height: 48px; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff6dc; font-family: inherit; font-size: 16px; letter-spacing: .2em; }
.kg-scene.is-shake { animation: kg-shake .45s; }
@keyframes kg-shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 1px); } }
.kg-scene.is-flash::before { content: ""; position: absolute; inset: 0; z-index: 3; background: #fff; pointer-events: none; animation: kg-flash .7s forwards; }
@keyframes kg-flash { from { opacity: .85; } to { opacity: 0; } }
/* 駅名標（白い板にひらがなの駅名。下の帯の、となりの駅の名前は空白） */
.kg-sign { display: grid; justify-items: center; width: min(320px, 84vw); padding: 14px 10px 0; border: 2px solid #3a3a36; border-radius: 6px; background: linear-gradient(180deg, #f4f2ea, #dedbd0); color: #1c1c1a; box-shadow: 0 12px 30px -10px #000, inset 0 0 30px rgba(120, 110, 90, .25); transform: rotate(-.6deg); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; animation: kg-rise .6s ease-out; }
.kg-sign b { font-size: 40px; font-weight: 800; letter-spacing: .32em; text-indent: .32em; line-height: 1.1; }
.kg-sign small { font-size: 13px; letter-spacing: .3em; color: #55534c; }
.kg-sign-band { display: grid; grid-template-columns: auto 1fr 1fr auto; align-items: center; gap: 8px; width: calc(100% + 20px); margin-top: 10px; padding: 7px 12px; border-radius: 0 0 4px 4px; background: #2d6a4f; color: #fff; font-weight: 800; }
.kg-sign-band i { height: 12px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
@keyframes kg-rise { from { opacity: 0; transform: translateY(10px) rotate(-.6deg); } }
.kg-plate { padding: 10px 26px; border: 3px double #6a6458; border-radius: 4px; background: linear-gradient(180deg, #3a3833, #24221e); color: #d8d2c2; font-size: 30px; letter-spacing: .5em; text-indent: .5em; text-shadow: 0 1px 0 #000, 0 -1px 0 rgba(255, 255, 255, .12); box-shadow: 0 10px 26px -8px #000; animation: kg-rise .8s ease-out; }
.kg-phone { width: min(260px, 72vw); padding: 10px 12px 16px; border: 6px solid #15161a; border-radius: 22px; background: #0d1117; color: #e8eef8; font-family: "Hiragino Kaku Gothic ProN", sans-serif; box-shadow: 0 0 40px rgba(130, 170, 255, .25); animation: kg-rise .5s ease-out; }
.kg-phone-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 11px; color: #9aa4b8; }
.kg-battery { position: relative; width: 22px; height: 10px; border: 1.5px solid #9aa4b8; border-radius: 2px; }
.kg-battery::before { content: ""; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 3px; background: #ff5a4a; animation: kg-blink .8s infinite; }
.kg-phone p { margin: 0; font-size: 14px; line-height: 1.7; }
/* 左上：いまの章とやること・スレ・音 */
/* 箱とボタンのほか（すきま・ボタンの右の何もない帯）は、押す手を地図へ通す。
   2026-11-14：パステリア④→⑤の上の出入り口の札が、この何もない帯にかくれて、375px の画面で押せなかった（通しの試しで見つけた） */
.kg-hud { display: grid; gap: 5px; max-width: 100%; pointer-events: none; }
.kg-hud > *, .kg-hud-row > * { pointer-events: auto; }
.kg-hud > .kg-hud-row { pointer-events: none; }
.kg-hud[hidden] { display: none; }
.kg-hud-goal { display: grid; gap: 2px; padding: 6px 10px; border: 0; border-radius: 10px; background: rgba(8, 10, 16, .66); color: #fff; font: inherit; font-size: 11px; line-height: 1.45; text-align: left; cursor: pointer; }
.kg-hud-goal b { font-size: 10px; color: #ffd9b0; letter-spacing: .08em; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
.kg-hud-goal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kg-hud-row { display: flex; gap: 5px; }
.kg-hud-btn { position: relative; padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(8, 10, 16, .6); color: #e8e4d8; font: inherit; font-size: 11px; cursor: pointer; }
.kg-hud-btn.has-new::after { content: ""; position: absolute; top: 1px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4a; box-shadow: 0 0 0 2px rgba(8, 10, 16, .8); }
/* 掲示板のスレ（むかしの掲示板のような見た目） */
.kg-thread { display: grid; gap: 10px; margin: -4px -4px 0; padding: 12px; border-radius: 10px; background: #efefef; color: #222; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
.kg-thread-note { margin: -2px 0 2px; padding-bottom: 8px; border-bottom: 1px dashed #c8c8c8; color: #666; font-size: 12px; line-height: 1.6; }
.kg-thread-title { margin: 0 0 4px; color: #c00; font-size: 15px; line-height: 1.5; }
.kg-posts { display: grid; gap: 12px; }
.kg-post-head { font-size: 12px; color: #333; }
.kg-post-head b { color: #117743; }
.kg-post-head b.is-hasumi { color: #117743; }
.kg-no { color: #333; }
.kg-date { color: #666; }
.kg-post-text { margin: 3px 0 0 1.2em; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.kg-post.is-new { margin: -4px -6px; padding: 4px 6px; border-radius: 6px; background: #fff7cc; }
.kg-stopped { margin: 4px 0 0; color: #777; font-size: 12px; text-align: center; }
.kg-thread .btn.primary { margin-top: 4px; }
/* 冒険のタブのカード */
.kg-event { position: relative; display: grid; gap: 8px; padding: 14px; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, rgba(8, 12, 24, .55), rgba(8, 10, 18, .92)), url(../world/kisaragi/platform.png) center 30% / cover, radial-gradient(ellipse at 50% 0%, #2c3650, #0a0d16 75%); color: #f2efe6; }
.kg-event.ev-halloween { background: linear-gradient(180deg, rgba(30, 12, 28, .45), rgba(20, 8, 18, .9)), url(../world/battle/halloween.png) center 40% / cover, radial-gradient(ellipse at 50% 0%, #5a2a1a, #140a10 75%); }
.kg-event.ev-halloween .kg-event-tag { color: #ffc46b; }
.kg-event + .kg-event { margin-top: 10px; }
.kg-event-top { display: grid; gap: 2px; }
.kg-event-tag { justify-self: start; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #ffd9b0; font-size: 11px; }
.kg-event-title { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 24px; letter-spacing: .3em; }
.kg-event-sub { font-size: 12px; color: #c9c4b6; }
.kg-event-goal { margin: 0; color: #e8e4d8; }
.kg-event-dex { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.kg-event-dex .wd-dex-bar { background: rgba(255, 255, 255, .15); }
.kg-event-claim { font-style: normal; font-size: 11px; color: #ffd27a; }
.kg-event .wd-event-btns { justify-content: stretch; }
.kg-event .wd-event-btns .btn { flex: 1 1 calc(50% - 6px); justify-content: center; }
.kg-event .btn:not(.primary) { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #f2efe6; }
/* 物語と図鑑 */
.kg-chapters { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.kg-chapters li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.kg-chapters li.is-now { background: var(--accent-soft); }
.kg-chapters li.is-later { color: var(--muted); }
.kg-ch-head { font-size: 11px; color: var(--muted); }
.kg-ch-mark { font-size: 11px; color: var(--good); font-weight: 700; }
.kg-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.kg-dex-one { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); }
.kg-dex-one.is-nm { background: var(--warning-soft); }
.kg-dex-one img { width: 84%; height: 84%; object-fit: contain; image-rendering: pixelated; }
.kg-dex-one.is-unknown img { filter: brightness(0) opacity(.35); }
.kg-dex-one i { width: 50%; height: 50%; border-radius: 50%; background: var(--line); }
.kg-dex-one em { position: absolute; right: 2px; bottom: 2px; padding: 0 3px; border-radius: 4px; background: var(--good); color: #fff; font-size: 9px; font-style: normal; }
.kg-claim { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.kg-claim > div { display: grid; gap: 2px; min-width: 0; }
.kg-claim.is-claimed { opacity: .7; }
.kg-lore { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; line-height: 1.9; }
.kg-clear-head { margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 20px; letter-spacing: .14em; text-align: center; }

/* 予約表：担当の色（スタッフのアカウントの色）。カードの右下に頭文字、1人に決まっていない予約は輪だけ */
.cal-av { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; }
.cal-av.is-maybe { background: var(--surface); color: var(--av); box-shadow: inset 0 0 0 1.5px var(--av); }
.cal-avs { position: absolute; right: 3px; bottom: 3px; display: flex; gap: 2px; pointer-events: none; }
.cal-grid:not(.is-day) .cal-avs .cal-av { width: 15px; height: 15px; font-size: 9px; }
.cal-grid.is-day .cal-avs { right: 6px; bottom: 5px; }
.cal-grid.is-day .cal-avs .cal-av { width: 22px; height: 22px; font-size: 12px; }
.cal-grid.is-day .cal-ev.has-av { padding-right: 36px; }
.cal-grid.is-day .cal-ev.has-av2 { padding-right: 60px; }
.cal-grid:not(.is-day) .cal-ev.compact.has-av { padding-right: 20px; }
.cal-ev.is-dim { opacity: .35; }
.cal-ev.is-dim:hover { opacity: .8; }
.cal-dayhead-duty span.p { display: inline-flex; align-items: center; gap: 3px; }
.cal-dayhead-duty .cal-av { width: 16px; height: 16px; font-size: 9.5px; }
@media (max-width: 600px) { .cal-dayhead-duty span.p b { display: none; } .cal-dayhead-duty { gap: 2px; } }
.cal-shift { display: inline-flex; align-items: center; gap: 6px; padding-left: 3px; }
.cal-shift .cal-av { width: 20px; height: 20px; font-size: 11px; }
/* 日表示：左の出勤の帯（人ごとに細い線）。予約はその右に並べる */
.cal-duty { position: absolute; top: 0; bottom: 0; left: 0; width: var(--duty-w, 0); z-index: 1; pointer-events: none; }
.cal-duty i { position: absolute; width: 4px; border-radius: 2px; pointer-events: auto; }
.cal-col-in { position: absolute; top: 0; bottom: 0; right: 0; left: var(--duty-w, 0); }

/* ホームの「今日の食事」：カロリーと PFC、朝・昼・夕の記録と写真、続けている日数・足りない栄養 */
.mlh { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.mlh-head { display: flex; align-items: center; gap: 8px; }
.mlh-head b { font-size: 15px; }
.mlh-head .ml-home-cam { margin-left: auto; width: 40px; height: 40px; }
.mlh-day { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 11px; color: var(--ink-2); }
.mlh-kcal { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.mlh-kcal b { font-size: 22px; }
.mlh-over { color: var(--warning); font-weight: 700; }
.mlh-pfc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 2px; }
.mlh-nut { display: grid; gap: 3px; min-width: 0; }
.mlh-meals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.mlh-slot { padding: 2px 9px; border: 1px dashed var(--line-strong); border-radius: 999px; font-size: 12px; color: var(--muted); }
.mlh-slot.is-done { border: 1px solid transparent; background: var(--good-soft); color: var(--good); font-weight: 700; }
.mlh-photos { display: flex; gap: 4px; margin-left: auto; }
.mlh-photos img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.mlh-note { display: flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 700; }
.mlh-note .ml-home-dot { margin-left: 0; vertical-align: 0; }
/* ホーム：ご予約とご契約・チケットを1枚に（チケットの部分は線で区切る） */
.db-tickets { margin-top: 14px; border-top: 1px solid var(--line); }
.db-tickets .ticket:first-of-type { padding-top: 12px; }
.db-tickets.is-only { margin-top: 4px; border-top: 0; }
.db-tickets.is-only .ticket:first-of-type { padding-top: 4px; }
/* ホーム：今日の食事とからだを1枚に（上が食事、下が体重と減量・増量の期間） */
.mlh-card { display: grid; padding: 0; }
.mlh-card .mlh-body { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.mlh-body-head { display: flex; align-items: baseline; justify-content: space-between; }
.mlh-weight { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.mlh-weight b { font-size: 20px; }
.mlh-weight small { margin-left: 2px; font-size: 12px; }
/* ホーム：今週の記録の下に、今月の数字とトレーニングカレンダー */
.tr-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tr-cal { min-width: 0; }
.tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tr-head > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.tr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.tr-cell { display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.tr-cell .xsmall { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-cell b { font-size: 18px; }
.tr-cell small { margin-left: 2px; font-size: 11px; color: var(--ink-2); }
/* ホーム：カルテ（ホームワーク・トレーナーからのコメント・前回のカルテ・コピー）を1枚に */
.karte-card { display: grid; gap: 10px; }
.kc-block { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: inherit; text-decoration: none; }
.kc-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.kc-label .avatar { width: 22px; height: 22px; font-size: 11px; }
.kc-latest { display: grid; gap: 4px; }
.karte-card .srow { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.karte-card .srow:hover { border-color: transparent; }
/* トレーニングノート：月のカレンダー（記録した日に色の点。押すとその日の記録） */
.notes-cal { display: grid; gap: 8px; }
.nc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nc-nav { display: flex; align-items: center; gap: 4px; }
.nc-nav b { min-width: 3.5em; text-align: center; }
.nc-head b { font-size: 16px; }
.nc-head .btn { width: 36px; padding: 0; justify-content: center; }
.nc-head .btn svg { width: 18px; height: 18px; }
.nc-head .nc-next svg { transform: scaleX(-1); }
.nc-head .is-off { visibility: hidden; }
.nc-sum { text-align: center; }
.nc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.nc-wd { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 4px 0 6px; border-radius: 8px; text-align: center; font-size: 11px; color: var(--muted); }
.nc-wd b { font-weight: 600; }
.nc-wd.is-today { background: var(--accent-soft); }
.nc-wd.is-today b, .nc-wd.is-today .nc-plan-parts i { color: var(--accent-ink); }
.nc-day { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 38px; padding: 6px 0 4px; border-radius: 10px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.nc-day.has { background: var(--surface-2); color: var(--ink); font-weight: 700; }
a.nc-day:hover { background: var(--surface-3); }
.nc-day.today .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-top: -3px; border-radius: 999px; background: var(--ink); color: var(--surface); }
.nc-day.on { box-shadow: inset 0 0 0 2px var(--ink); }
.nc-day.is-future .n { color: var(--muted); }
.nc-dots { display: flex; gap: 3px; min-height: 6px; }
.nc-dots i { width: 6px; height: 6px; border-radius: 50%; }
.nc-dots i.p { background: var(--accent); }
.nc-dots i.l { background: var(--teal); }
.nc-dots i.s { background: var(--self); }
.notes-month { margin: 12px 2px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.srow-list > .notes-month:first-child { margin-top: 0; }
.notes-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.notes-head { flex-wrap: nowrap; align-items: center; }
.notes-head > div { min-width: 0; }
.notes-head form { flex: none; }
/* 曜日ごとのメニュー（「月曜は胸と背中」）：一覧・ホームの「今日は◯◯の日」・入力 */
.ws-card { display: grid; gap: 8px; }
.ws-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ws-list li { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.ws-list li.is-today { background: var(--accent-soft); }
.ws-list li.is-today .ws-wd, .ws-now { color: var(--accent-ink); font-weight: 700; }
.ws-list li.is-rest .ws-what { color: var(--muted); }
.ws-wd { font-size: 13px; color: var(--ink-2); }
.ws-today { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: -4px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.ws-today b { font-size: 16px; color: var(--accent-ink); }
.ws-today.is-rest { background: var(--surface-2); }
.ws-today.is-rest b { color: var(--ink-2); }
.ws-form { display: grid; gap: 10px; }
.ws-row { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 8px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ws-row:last-child { padding-bottom: 0; border-bottom: 0; }
.ws-row .ws-wd { padding-top: 6px; font-weight: 700; color: var(--ink); }
.ws-edit { display: grid; gap: 6px; min-width: 0; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-chip { position: relative; cursor: pointer; }
.ws-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ws-chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.ws-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); font-weight: 700; }
.ws-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ws-note { height: 34px; font-size: 13px; }
/* トレーニングノートのカレンダー：曜日ごとのメニュー（曜日の行に、その曜日の部位を1回だけ） */
.nc-plan-parts { display: grid; justify-items: center; gap: 1px; max-width: 100%; }
.nc-plan-parts i { max-width: 100%; overflow: hidden; font-size: 10px; font-style: normal; font-weight: 600; line-height: 1.25; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }
/* トレーニングノート：絞り込みは横いっぱいに1列、まとめてコピーは見出しの横のアイコン */
.notes-head-actions { display: flex; flex: none; align-items: center; gap: 4px; }
.btn.notes-copy { width: 36px; padding: 0; justify-content: center; }
.btn.notes-copy svg { width: 18px; height: 18px; }
.notes-seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; width: 100%; }
.notes-seg a { padding-left: 4px; padding-right: 4px; text-align: center; }
.notes-tools-row { flex-wrap: nowrap; gap: 6px; }
.notes-tools-row .notes-seg { flex: 1; min-width: 0; width: auto; }
.notes-tools-row .btn.notes-copy { order: 2; flex: none; width: 40px; height: 38px; }
.notes-tools-row.is-app { justify-content: flex-end; }
@media (max-width: 400px) { .notes-seg a { padding-left: 2px; padding-right: 2px; font-size: 12.5px; } }
/* トレーニングノートの一覧：右上の「SNS用の画像を作る」 */
.srow-wrap { position: relative; }
.srow-wrap .srow-top { padding-right: 42px; }
.srow-share { position: absolute; top: 9px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); }
.srow-share:hover { border-color: var(--line-strong); color: var(--ink); }
.srow-share svg { width: 18px; height: 18px; }
/* 記録のページ：この日の結果（人体図・バッジ・メニュー）と、種目ごとの前回との比べ・棒 */
.sd-result { display: grid; gap: 12px; }
.sd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-badge { display: inline-flex; align-items: baseline; gap: 4px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sd-badge b { font-size: 15px; color: var(--ink); }
.sd-badge.is-pr, .sd-badge.is-pr b { color: var(--warning); }
.sd-badge.is-pr { background: var(--warning-soft); }
.sd-badge.is-up, .sd-badge.is-up b { color: var(--good); }
.sd-badge.is-up { background: var(--good-soft); }
.sd-badge.is-done, .sd-badge.is-done b { color: var(--accent-ink); }
.sd-badge.is-done { background: var(--accent-soft); }
.sd-badge.is-plain { padding-left: 2px; background: none; font-weight: 500; color: var(--muted); }
.sd-map svg { max-height: 240px; }
.sd-map .m.h0 { fill: var(--heat-0); }
.sd-map .m.h1 { fill: var(--heat-2); }
.sd-map .m.h2 { fill: var(--heat-3); }
.sd-map .m.h3 { fill: var(--heat-4); }
.sd-map .m.h4 { fill: var(--heat-5); }
.sd-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: 12.5px; color: var(--ink-2); }
.sd-part { display: inline-flex; align-items: center; gap: 5px; }
.sd-part i { width: 10px; height: 10px; border-radius: 3px; }
.sd-part i.h1 { background: var(--heat-2); }
.sd-part i.h2 { background: var(--heat-3); }
.sd-part i.h3 { background: var(--heat-4); }
.sd-part i.h4 { background: var(--heat-5); }
.sd-part b { font-weight: 700; color: var(--ink); }
.sd-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.sd-plan { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border: 1px dashed var(--line-strong); border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.sd-plan.is-ok { border: 1px solid transparent; background: var(--good-soft); color: var(--good); font-weight: 700; }
.sd-plan svg { width: 13px; height: 13px; }
.sd-cmp { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.sd-cmp.is-up { background: var(--good-soft); color: var(--good); }
.sd-cmp.is-same { font-weight: 600; color: var(--muted); }
.sd-cmp.is-new { background: var(--surface-2); color: var(--ink-2); }
.sd-cmp svg { width: 13px; height: 13px; }
.sd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -2px 0 8px; }
.sd-sets td.no { min-width: 2.4em; white-space: nowrap; }
.sd-sets td.w { white-space: nowrap; }
.sd-sets td.w .pace { margin-left: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.sd-sets td.bar { width: 32%; padding-right: 8px; padding-left: 10px; }
.sd-sets td.bar i { display: block; height: 8px; border-radius: 4px; background: var(--accent); opacity: .85; }
.sd-sets tr.is-warm td { color: var(--muted); }
.sd-sets tr.is-warm td.bar i { background: var(--line-strong); }
.sd-sets tr.is-pr td.bar i { background: var(--warning); opacity: 1; }
.sd-sets td.r { width: 4.4em; }
.sd-nav { display: flex; justify-content: space-between; gap: 8px; }
.sd-nav .btn svg { width: 16px; height: 16px; }
.sd-next svg { transform: scaleX(-1); }
/* 記録のページ：コピーと画像のボタンは1列。種目ごとの推移のグラフ */
.sd-actions { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; }
.sd-actions .btn { justify-content: center; min-width: 0; padding-right: 8px; padding-left: 8px; white-space: nowrap; }
@media (max-width: 400px) { .sd-long { display: none; } }
.sd-chart { margin: 0 0 8px; }
.sd-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.sd-chart .base { stroke: var(--line); stroke-width: 1; }
.sd-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-chart .pt circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.sd-chart .pt circle.hit { fill: transparent; stroke: none; cursor: default; }
.sd-chart .pt.is-cur circle:not(.hit) { stroke-width: 2.5; }
.sd-chart .lb { font-size: 11px; font-weight: 600; fill: var(--muted); }
.sd-chart .lb.is-cur { font-weight: 700; fill: var(--ink); }
.sd-chart figcaption { margin-top: 2px; }

/* 食事：バーコードで記録（カメラの読み取り・見つかった商品の量） */
.bc-sheet [hidden], .bc-product [hidden] { display: none !important; }
.bc-body { gap: 10px; }
.bc-view { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #0d0d0c; }
.bc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-frame { position: absolute; left: 4%; right: 4%; top: 20%; bottom: 20%; border: 2px solid rgba(255, 255, 255, .92); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .38); }
.bc-line { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; border-radius: 2px; background: var(--accent); opacity: 0; }
.bc-view.is-live .bc-line { opacity: .9; animation: bc-scan 1.6s ease-in-out infinite alternate; }
@keyframes bc-scan { from { top: 18%; } to { top: 82%; } }
@media (prefers-reduced-motion: reduce) { .bc-view.is-live .bc-line { animation: none; } }
.bc-hint, .bc-status { margin: 0; text-align: center; }
.bc-alt { display: flex; justify-content: center; gap: 8px; }
.bc-type { display: flex; gap: 8px; }
.bc-type .input { flex: 1; min-width: 0; letter-spacing: .04em; }
.bc-q { display: grid; gap: 6px; }
.bc-amt { display: flex; flex-wrap: nowrap; }
.bc-amt button { flex: 1 1 auto; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.bc-grams { display: flex; align-items: center; gap: 6px; }
.bc-grams .input { width: 120px; }
.bc-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.bc-sum b { font-size: 20px; }
.bc-fix { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ml-search-row { display: flex; gap: 8px; }
.ml-search-row .input { flex: 1; min-width: 0; }
.ml-bc-btn { flex: none; width: 44px; height: auto; align-self: stretch; }
.ml-bc-btn svg { width: 20px; height: 20px; }

/* 装備セット（2026-11-08）：名前をつけて保存した頭飾り・首飾り・お守り。いまの装備と同じセットは、枠と札で */
.wd-gset-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.wd-gset-now { display: grid; gap: 0; min-width: 0; }
.wd-gset-now b { overflow-wrap: anywhere; }
.wd-gset-bar .btn { flex: none; }
.wd-gset-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wd-gset { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.wd-gset.is-on { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); background: color-mix(in srgb, var(--good-soft) 45%, var(--surface)); }
.wd-gset-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wd-gset-head b { overflow-wrap: anywhere; }
.wd-gset-tag { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--good); background: var(--good-soft); }
.wd-gset-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wd-gset-item { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.wd-gset-item .xsmall { overflow-wrap: anywhere; }
.wd-gset-item.is-miss .wd-icon { opacity: .45; filter: grayscale(.8); }
.wd-gset-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wd-gset-need { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.bs-acts { flex-wrap: wrap; }

/* 顧客画面のチケットの回数（手で足した回数） */
.tg-card .tg-add > summary { cursor: pointer; }
.tg-card .tg-grant.is-off { opacity: .55; }
.tg-card .list-sub { white-space: normal; overflow: visible; }
.tg-card .tg-list { padding-bottom: 4px; }
.tg-card .tg-list .list-row { padding-left: 0; padding-right: 0; align-items: flex-start; }

/* ===== /join（2026-11-17 v3：画面いっぱいのヒーロー・3つの柱・比較表）=====
   地は白、色はアイコンのオレンジのプレートが主役。ゲームの節だけ、ルミナリアの夜の色。濃い表示の設定でも明るいまま */
.pub:has(.j) {
  color-scheme: light; overflow-x: clip;
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f3f5f4; --surface-3: #e9ecea;
  --ink: #15181b; --ink-2: #4c535a; --muted: #7c838a; --line: #e3e6e4; --line-strong: #c9cecb;
  --accent: #ec5a24; --accent-ink: #c2441a; --accent-soft: #fde8de; --ring: 0 0 0 3px rgba(236, 90, 36, .28);
  --j-paper: #f3f5f4; --j-plate: linear-gradient(140deg, #ffb65e 0%, #f98a3e 48%, #f0552a 100%); --j-night: #10172b;
  background: #fff; color: var(--ink);
}
.j p, .j li, .j dd, .j figcaption, .j span, .j b { text-wrap: wrap; }
.pub:has(.j) .pub-head { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: none; }
.j-bleed, .j-hero, .j-game { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
/* ヒーロー：画面いっぱい */
.j-hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 16px 30px; background: #fff; overflow: hidden; isolation: isolate; }
.j-hero-in { position: relative; z-index: 2; max-width: 560px; }
.j-hero-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.j-title { margin: 0; font-size: clamp(36px, 10.4vw, 66px); line-height: 1.16; font-weight: 700; letter-spacing: -.015em; }
.j-lead { margin: 12px 0 0; max-width: 30em; color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.j-cta { margin-top: 18px; width: 100%; max-width: 420px; }
.j-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
/* App Store のバッジ（Apple 配布の SVG のまま。高さ 56px・まわりの余白は高さの1/4＝14px 以上） */
.j-store { display: inline-block; margin-top: 18px; padding: 0; line-height: 0; border-radius: 9px; }
.j-store img { display: block; width: auto; height: 56px; }
.j-store-note { margin: 14px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.j-web { display: inline-block; margin-top: 6px; padding: 6px 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.j-start-note { margin: -6px 0 14px; color: var(--ink-2); font-size: 14px; }
.j-start-note b { color: var(--accent-ink); }
.j-faq .lp-faq a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
/* 絵は背景いっぱい（上 2/3）。下は白へとけて、その上に見出しとボタンを重ねる */
.j-hero-art { position: absolute; inset: 0 0 auto 0; height: 72%; z-index: 0; pointer-events: none; overflow: hidden; background: var(--j-plate); }
.j-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .88) 74%, #fff 88%, #fff 100%); z-index: 3; }
.j-plate { position: absolute; width: 120vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); left: 50%; top: -14%; transform: translateX(-50%); }
.j-phone { margin: 0; position: relative; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid rgba(21, 24, 27, .12); box-shadow: 0 18px 40px -22px rgba(21, 24, 27, .5); }
.j-phone img { display: block; width: 100%; height: auto; }
.j-hero-art .j-phone { position: absolute; top: 9%; left: 50%; width: 54vw; max-width: 300px; aspect-ratio: 720 / 1300; border-radius: 26px; }
.j-hero-art .j-phone img { height: 100%; object-fit: cover; object-position: top; }
.j-hero-art .is-b { transform: translateX(-50%); z-index: 2; top: 5%; }
.j-hero-art .is-a { transform: translateX(-118%) rotate(-9deg); z-index: 1; }
.j-hero-art .is-c { transform: translateX(18%) rotate(9deg); z-index: 1; }
/* スマホ：バッジと案内の分だけ文が高くなるので、絵を少し短く（見出しが絵にかからないように） */
@media (max-width: 759px) { .j-hero-art { height: max(40%, calc(100% - 380px)); } .j-hero-art .j-phone { width: 46vw; } }
/* 低い画面（iPhone SE・Safari の帯が出たとき）：絵を小さく上に寄せ、文を詰める（見出しが絵に重ならないように） */
@media (max-width: 759px) and (max-height: 699px) {
  .j-hero { padding-bottom: 14px; }
  .j-hero-art { height: 46%; }
  .j-hero-art::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .9) 84%, #fff 96%); }
  .j-hero-art .j-phone { width: 34vw; top: 7%; border-radius: 18px; }
  .j-hero-art .is-b { top: 4%; }
  .j-hero-kicker { margin-bottom: 4px; font-size: 12px; }
  .j-title { font-size: clamp(30px, 8.8vw, 40px); }
  .j-lead { margin-top: 6px; font-size: 13px; line-height: 1.6; }
  .j-store { margin-top: 14px; }
  .j-store-note { font-size: 12px; }
  .j-web { margin-top: 2px; }
}
/* 3つで1つ */
.j-sec { padding: 48px 0 0; }
.j-sum { text-align: center; }
.j-sum-eq { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 6px; font-size: clamp(16px, 4.5vw, 22px); font-weight: 700; }
.j-sum-eq i { font-style: normal; color: var(--accent); font-weight: 700; }
.j-sum-price { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); }
.j-sum-price b { font-size: 34px; color: var(--ink); letter-spacing: -.01em; }
.j-sum-price small { font-size: 13px; }
.j-sum .j-p { max-width: 26em; margin-left: auto; margin-right: auto; }
/* 文字 */
.j-h1 { margin: 6px 0 0; font-size: clamp(27px, 7.6vw, 40px); line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.j-h2 { margin: 0; font-size: 22px; line-height: 1.45; font-weight: 700; }
.j-h3 { margin: 0; font-size: 17.5px; line-height: 1.5; font-weight: 700; }
.j-mt { margin-top: 30px; }
.j-p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.j-small { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.j-pillar-no { margin: 0; font-size: 14px; font-weight: 700; color: var(--accent-ink); }
/* お客さまの声：同じ形のカードを横に流す（スマホは次のカードが少し見える） */
.j-voice { margin: 56px calc(50% - 50vw) 0; padding: 52px 0 44px; background: var(--j-paper); }
.j-voice-head { max-width: 608px; margin: 0 auto; padding: 0 16px; }
.j-voices { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 18px 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; }
.j-voices::-webkit-scrollbar { display: none; }
.j-v { flex: 0 0 min(80vw, 320px); margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; padding: 22px 20px 18px; border-radius: 20px; background: #fff; box-shadow: 0 14px 34px -26px rgba(21, 24, 27, .5); }
.j-v blockquote { margin: 0; flex: 1; }
.j-v-h { margin: 0; font-size: 18.5px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.j-v-h::before { content: "“"; display: block; height: .62em; font-size: 2.4em; line-height: 1; color: var(--accent); font-weight: 700; }
.j-v blockquote p + p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.85; }
.j-v figcaption { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }
@media (min-width: 760px) {
  .j-voices { padding-left: max(16px, calc(50vw - 520px)); padding-right: max(16px, calc(50vw - 520px)); scroll-padding: 0 max(16px, calc(50vw - 520px)); }
  .j-voice-head { max-width: 1040px; }
}
/* 機能のタイル：本物の画面の切り抜き＋見出し＋1行 */
.j-bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; align-items: start; }
.j-tile { margin: 0; padding: 10px 10px 14px; border-radius: 18px; background: var(--j-paper); display: flex; flex-direction: column; gap: 10px; }
.j-tile.is-wide { grid-column: 1 / -1; }
.j-tile img { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.j-tile figcaption { display: grid; gap: 3px; padding: 0 4px; }
.j-tile b { font-size: 14.5px; line-height: 1.45; }
.j-tile span { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.j-more { margin: 26px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.j-more + .j-chips { margin-top: 10px; }
.j-sum-k { margin: 0 0 14px; font-size: clamp(20px, 5.6vw, 26px); line-height: 1.45; font-weight: 700; }
@media (min-width: 760px) { .j-bento { gap: 14px; } }
/* 機能の段 */
.j-pillar { padding-top: 64px; }
.j-feat { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 26px; }
.j-feat.is-flip { grid-template-columns: minmax(0, 1fr) 128px; }
.j-feat.is-flip > .j-phone { order: 2; }
.j-feat .j-phone { border-radius: 16px; }
.j-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.j-chips li { padding: 7px 12px; border-radius: 999px; background: var(--j-paper); font-size: 13px; font-weight: 600; color: var(--ink); }
.j-shares { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 14px -16px 0; padding: 4px 16px 10px; scroll-padding-inline: 16px; scrollbar-width: none; }
.j-shares::-webkit-scrollbar { display: none; }
.j-shares figure { flex: 0 0 156px; margin: 0; scroll-snap-align: start; }
.j-shares img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 24px -16px rgba(21, 24, 27, .6); }
.j-shares figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.j-editor figure { flex-basis: 172px; }
.j-editor img { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 14px 30px -20px rgba(21, 24, 27, .5); }
.j-editor figcaption { display: grid; gap: 2px; }
.j-editor figcaption b { font-size: 13px; color: var(--ink); }
.j-editor figcaption span { font-weight: 500; font-size: 11.5px; line-height: 1.5; }
/* 食事：記録のしかた・文字の例 */
.j-ways { margin-top: 18px; }
.j-ways-k { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.j-ways ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.j-ways li { padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.j-type { margin-top: 20px; padding: 16px; border-radius: 18px; background: var(--j-paper); }
.j-type-in { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.j-type-in::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--accent); }
.j-type-out { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; }
.j-type-out td { padding: 7px 2px; border-bottom: 1px solid var(--line); }
.j-type-out td:nth-child(2), .j-type-out td:nth-child(3) { text-align: right; white-space: nowrap; color: var(--ink-2); }
.j-type-out .is-sum td { border-bottom: 0; font-weight: 700; color: var(--ink); }
/* ゲーム：Wiki と同じ灯台の絵を見出しに。中はルミナリアの夜の色 */
.j-game { margin: 72px calc(50% - 50vw) 0; background: var(--j-night); color: #eef1fa; }
.j-game-kv { position: relative; min-height: min(118vw, 620px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.j-game-kv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; z-index: -1; }
.j-game-kv::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 23, 43, 0) 30%, rgba(16, 23, 43, .7) 62%, var(--j-night) 96%); }
.j-game-kv-copy { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px 8px; }
.j-game-k { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #ffbf6b; }
.j-game .j-h1, .j-game .j-h3 { color: #fff; }
.j-game .j-p { color: #c6cbe0; }
.j-game-in { max-width: 640px; margin: 0 auto; padding: 18px 16px 56px; }
.j-flow { list-style: none; counter-reset: f; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.j-flow::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 13px; height: 2px; background: rgba(255, 191, 107, .45); }
.j-flow li { counter-increment: f; position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.j-flow li::before { content: counter(f); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ffbf6b; color: var(--j-night); font-size: 13px; }
.j-gcards { display: grid; gap: 14px; margin-top: 30px; }
.j-gcard { margin: 0; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); display: grid; grid-template-columns: 116px minmax(0, 1fr); }
.j-gcard img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.j-gcard figcaption { padding: 16px 16px 18px; display: grid; gap: 6px; align-content: center; }
.j-gcard b { font-size: 16px; line-height: 1.45; color: #fff; }
.j-gcard span { font-size: 13px; line-height: 1.75; color: #c6cbe0; }
.j-gcard.is-rare { border-color: rgba(255, 191, 107, .5); background: linear-gradient(135deg, rgba(255, 191, 107, .14), rgba(255, 255, 255, .03)); }
.j-gcard.is-rare { grid-template-columns: 1fr; }
.j-gcard.is-rare img { height: auto; aspect-ratio: 828 / 192; object-fit: contain; padding: 18px 16px 6px; background: radial-gradient(ellipse at 50% 60%, rgba(255, 191, 107, .25), transparent 70%); }
.j-gshots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 26px -16px 0; padding: 0 16px 6px; scroll-padding-inline: 16px; scrollbar-width: none; }
.j-gshots::-webkit-scrollbar { display: none; }
.j-gshots figure { flex: 0 0 150px; margin: 0; scroll-snap-align: start; }
.j-gshots img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 980; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); }
.j-gshots figcaption { margin-top: 8px; font-size: 12px; color: #c6cbe0; font-weight: 600; }
.j-gfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 0; }
.j-gfacts div { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
.j-gfacts dt { font-size: 12px; color: #aab1cc; font-weight: 600; }
.j-gfacts dd { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: #eef1fa; }
.j-gfacts b { font-size: 17px; color: #ffbf6b; }
.j-game .j-chips li { background: rgba(255, 255, 255, .1); color: #eef1fa; }
.j-link { display: inline-block; margin-top: 18px; color: var(--accent-ink); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.j-game .j-link { color: #ffbf6b; }
@media (min-width: 760px) {
  .j-gcards { grid-template-columns: 1fr 1fr; }
  .j-gcard { grid-template-columns: 1fr; grid-template-rows: 200px auto; }
  .j-gshots figure { flex-basis: 190px; }
}
/* 比較：表をやめて、2つを並べて見せる */
.j-vs { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; margin-top: 20px; }
.j-vs-col { padding: 16px 14px; border-radius: 18px; background: var(--j-paper); display: grid; align-content: start; gap: 4px; }
.j-vs-col.is-us { background: var(--accent); color: #fff; }
.j-vs-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.45; }
.j-vs-col.is-us .j-vs-name { color: #fff; font-size: 15px; letter-spacing: .02em; }
.j-vs-price { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.j-vs-price b { font-size: 22px; color: var(--ink); }
.j-vs-col.is-us .j-vs-price, .j-vs-col.is-us .j-vs-price b { color: #fff; }
.j-vs-price small { font-size: 11.5px; }
.j-vs-free { margin: 2px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.j-vs-col.is-us .j-vs-free { color: rgba(255, 255, 255, .9); font-weight: 600; }
/* 比較表：グループ分け、HAMLIFT の列はオレンジの帯、印は ✓・一部・— の3つ */
.j-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.j-table { margin-top: 18px; }
.j-table table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.j-table thead th { padding: 10px 2px; font-size: 11.5px; line-height: 1.35; font-weight: 700; color: var(--ink-2); text-align: center; vertical-align: bottom; width: 17%; }
.j-table thead th:first-child { width: auto; }
.j-table thead th.is-us { width: 20%; background: var(--accent); color: #fff; border-radius: 14px 14px 0 0; font-size: 12px; }
.j-table tbody th { padding: 11px 6px 11px 0; text-align: left; font-size: 13.5px; line-height: 1.45; font-weight: 600; }
.j-table td { padding: 8px 2px; text-align: center; vertical-align: middle; font-size: 15px; color: var(--muted); }
.j-table td.is-us { color: var(--accent-ink); font-weight: 700; }
.j-table tbody tr:not(.is-group) > * { border-bottom: 1px solid var(--line); }
.j-table td.is-us { background: var(--accent-soft); }
.j-table tbody tr:last-child td.is-us { border-radius: 0 0 14px 14px; }
.j-table .is-group th { padding: 20px 0 6px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.j-ok.is-dim { background: #d6dbd8; color: #4c535a; width: 22px; height: 22px; font-size: 12px; }
.j-part { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #eef0ef; color: var(--ink-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.j-no { font-style: normal; color: #b9bfbb; font-size: 15px; }
.j-compare .j-vs { margin-top: 28px; }
.j-cmp { list-style: none; margin: 18px 0 0; padding: 0; }
.j-cmp li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.j-ok { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-style: normal; font-weight: 700; line-height: 1; }
.j-price-foot { margin: 14px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.75; }
/* 料金・登録 */
.j-start .j-h2 { margin-bottom: 14px; }
.j-start .lp-form { background: var(--j-paper); border: 0; }
.j-start .input { background: #fff; }
.j-faq { padding-bottom: 8px; }
.j-faq .j-h2 { margin-bottom: 4px; }
@media (min-width: 760px) {
  .j-hero { justify-content: center; padding: 40px max(32px, calc(50vw - 560px)); }
  .j-hero-art { inset: 0 0 0 auto; width: 62%; height: 100%; }
  .j-hero-art::after { background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .7) 18%, rgba(255, 255, 255, 0) 40%); }
  .j-plate { width: 640px; top: 50%; left: 56%; transform: translate(-50%, -50%); }
  .j-hero-art .j-phone { width: 230px; top: 50%; left: 56%; }
  .j-hero-art .is-b { width: 260px; top: 50%; transform: translate(-50%, -50%); }
  .j-hero-art .is-a { transform: translate(-125%, -42%) rotate(-9deg); }
  .j-hero-art .is-c { transform: translate(25%, -42%) rotate(9deg); }
  .j-feat { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .j-feat.is-flip { grid-template-columns: minmax(0, 1fr) 200px; }
  .j-loop { grid-template-columns: repeat(4, 1fr); }
}

/* ===================== 領地（灯台の光の土地の主。lords.js） ===================== */
.ld-flag { display: inline-block; position: relative; width: 10px; height: 13px; margin-right: 4px; vertical-align: -1px; flex: none; }
.ld-flag::before { content: ''; position: absolute; left: 0; top: 0; width: 1.5px; height: 13px; background: currentColor; border-radius: 1px; }
.ld-flag::after { content: ''; position: absolute; left: 1.5px; top: 1px; border-left: 8px solid #e8913f; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.ld-dot { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.ld-tabs { flex-wrap: wrap; }
.ld-head { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #2a2032, #1b2433); color: #f5ecdc; }
.ld-head-title { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; color: #ffd9a8; }
.ld-head-title b { font-size: 16px; color: #fff3df; }
.ld-head-title small { color: #c8bfd8; font-size: 11px; }
.ld-head .xsmall.muted, .ld-head small { color: #c8bfd8; }
.ld-tier { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.ld-tier-bar { display: inline-flex; gap: 3px; }
.ld-tier-bar i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.ld-tier-bar i.is-on { background: #f0b25a; }
.ld-tier small { font-weight: 500; font-size: 11px; }
.ld-seat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ld-seat-icons { display: flex; gap: 2px; flex: none; }
.ld-seat-icons .wd-mon-art { width: 40px; height: 40px; }
.ld-seat-icons img, .ld-zone-units img, .ld-pick img, .ld-seat-who img, .ld-box-head img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.ld-seat-text { display: grid; gap: 2px; min-width: 0; }
.ld-seat-text small { font-weight: 500; color: var(--muted); }
.ld-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ld-zone { position: relative; aspect-ratio: 2 / 3; display: grid; grid-template-rows: auto 1fr auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: 10px; background-size: cover; background-position: center; color: #fff; font: inherit; text-align: left; overflow: hidden; cursor: pointer; }
.ld-zone::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 14, .55), rgba(10, 8, 14, .15) 45%, rgba(10, 8, 14, .7)); }
.ld-zone > * { position: relative; }
.ld-zone.is-on { border-color: #e8913f; box-shadow: 0 0 0 2px rgba(232, 145, 63, .45) inset; }
.ld-zone-name { font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.ld-zone-name small { display: block; color: #ffd9a8; font-size: 10px; }
.ld-zone-units { display: flex; gap: 1px; align-self: center; justify-self: center; }
.ld-zone-units img { width: 34px; height: 34px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.ld-zone-empty { align-self: center; justify-self: center; font-size: 22px; font-weight: 300; opacity: .8; }
.ld-zone-way { font-size: 10px; line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.ld-sec { padding-top: 8px; border-top: 1px solid var(--line); gap: 6px; }
.ld-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }
.ld-pick { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ld-pick .wd-mon-art { width: 44px; height: 44px; }
.ld-pick .xsmall { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-pick small { color: var(--muted); font-size: 10px; }
.ld-pick.is-on { border-color: var(--accent); box-shadow: var(--ring); }
.ld-pick.is-used { opacity: .45; }
.ld-ways { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-way { display: grid; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.ld-way small { font-weight: 500; font-size: 10px; color: var(--muted); }
.ld-way.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.ld-way:disabled { opacity: .5; cursor: default; }
.ld-radio { display: flex; align-items: flex-start; gap: 8px; }
.ld-radio input { margin-top: 3px; }
.ld-line { display: grid; gap: 4px; }
.ld-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.ld-presets .btn { white-space: normal; text-align: left; min-height: 0; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 11px; font-weight: 500; line-height: 1.4; }
.ld-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ld-box { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ld-box-head { display: flex; align-items: center; gap: 8px; }
.ld-box-head .wd-mon-art { width: 36px; height: 36px; }
.ld-box-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-box-items { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ld-box-items li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ld-box-items img, .ld-box-items i { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.ld-box-add { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; gap: 6px; }
.ld-qty { text-align: right; }
.ld-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ld-stats div { display: grid; justify-items: center; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); }
.ld-stats b { font-size: 18px; }
.ld-stats small { font-size: 10px; color: var(--muted); text-align: center; }
.ld-rec, .ld-log, .ld-rank, .ld-rumors { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ld-rec li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.ld-log li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px; }
.ld-log time { font-size: 11px; color: var(--muted); }
.ld-rank { list-style: decimal; padding-left: 1.4em; }
.ld-rank li { padding: 4px 0; }
.ld-rank li > * { margin-right: 6px; }
.ld-rumors li { padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.ld-name { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ld-hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.ld-about { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ld-about p { margin: 0; }
.ld-light { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--warning-soft); color: var(--ink); }
.ld-seat-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.ld-seat-who { display: flex; align-items: center; gap: 6px; }
.ld-seat-who .wd-mon-art { width: 40px; height: 40px; }
.ld-seat-who > div { display: grid; min-width: 0; }
.ld-quote { margin: 0; font-size: 13px; font-style: italic; color: var(--ink-2); }
.ld-say { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.ld-gift { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.ld-gift-art { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle, rgba(240, 178, 90, .45), rgba(240, 178, 90, 0) 70%); }
.ld-gift-art img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.ld-gift > div { display: grid; }
.ld-stomp { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 10px 12px; border-radius: 12px; background: #2a2032; color: #ffe2b8; }
.ld-stomp small { color: #c8bfd8; }
.ld-chip { display: inline-flex; align-items: center; color: #ffd9a8; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ld-card .ld-tag { color: #ffd9a8; }
.ld-card .ld-quote { color: #e8dccb; }
.wd-lord { display: block; margin-top: 2px; color: #b36a1d; font-weight: 700; }
.gm-art.is-lords img { filter: sepia(.7) hue-rotate(-25deg) saturate(1.8) brightness(1.05); }
.ld-box-head b { white-space: nowrap; flex: none; }
.ld-box-head small { min-width: 0; }
.ld-box { grid-template-columns: minmax(0, 1fr); }
.ld-box-head { min-width: 0; }

/* 主の入れかわりの場面（lords.js）：さいごのひとことは、ボタンの上に */
.ld-take-scene .ft-text { bottom: calc(env(safe-area-inset-bottom) + 150px); min-height: 0; }

/* スタッフ：受け取った同意書のサイン（staff/counseling/consent.php）。白い紙に署名の線 */
.cn-agreed { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cn-sig { margin: 8px 0 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.cn-sig img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; }
.cn-sig figcaption { padding: 8px 12px; border-top: 1px dashed var(--line); font-size: 12px; color: #4f4c44; background: #fbfaf6; }
/* 今すぐ払うと使えるようになること（確認・済みの画面） */
.paynow-unlocks { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, rgba(0, 0, 0, .04)); font-size: 13px; }
.paynow-unlocks-head { margin: 0 0 6px; font-weight: 700; }
.paynow-unlocks ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; list-style: disc; }
.paynow-unlocks small { color: var(--muted); font-size: 12px; }
.paynow-unlocks li { overflow-wrap: anywhere; }

/* おためし中（無料期間で、まだ申し込んでいない方）の印：名前の左の新芽（public/assets/js/sprout.js） */
.trial-sprout { display: inline-block; flex: none; width: 14px; height: 14px; margin-right: 4px; vertical-align: -1px; font-style: normal; line-height: 0; }
.trial-sprout svg { display: block; width: 100%; height: 100%; }

/* スタッフのホーム：対応すること（StaffTodo） */
.todo-card .todo-group + .todo-group { border-top: 1px solid var(--line); }
.todo-card .todo-group-head { padding: 12px 18px 4px; font-size: 14px; }
.todo-card .todo-group-head .num { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--self-soft); color: var(--self); font-size: 12px; text-align: center; }
.todo-card .todo-group .list-row { padding: 10px 18px; }
.todo-card .todo-more { padding: 6px 18px 12px; }
.todo-card .empty { padding: 18px 20px; }
.todo-card .list-side svg { transform: rotate(-90deg); }

/* いっしょに歩く（walk.js） */
.walk-card .card-title { margin: 0; }
.walk-who { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.walk-who-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--surface-2); image-rendering: pixelated; flex: none; }
.walk-meter { margin-top: 12px; }
.walk-meter-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.walk-gain { font-size: 14px; color: #2a8aa6; white-space: nowrap; }
.walk-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 6px 0; }
.walk-bar i { display: block; height: 100%; background: #6fb6c8; border-radius: inherit; transition: width .4s; }
.walk-week { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 64px; margin-top: 12px; }
.walk-week-day { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.walk-week-day i { width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; background: var(--line-strong); }
.walk-week-day:last-child i { background: #6fb6c8; }
.walk-week-day small { font-size: 10px; color: var(--muted); }
.walk-choices { display: grid; gap: 8px; margin-top: 10px; }
.walk-choice { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.walk-choice.is-on { border-color: var(--ink); background: var(--surface-2); }
.walk-choice img, .walk-choice > i { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--surface-2); image-rendering: pixelated; flex: none; }
.walk-choice-main, .walk-choice-num { display: flex; flex-direction: column; min-width: 0; }
.walk-choice-main { flex: 1; }
.walk-choice-num { text-align: right; }
.walk-choice small { font-size: 11px; color: var(--muted); }
.walk-home { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 22, .55); }
.walk-home-card { width: min(340px, 100%); padding: 24px 20px; border-radius: 18px; background: var(--surface); text-align: center; box-shadow: var(--shadow-lg); }
.walk-home-icon { display: block; width: 96px; height: 96px; margin: 0 auto 8px; object-fit: contain; image-rendering: pixelated; animation: walk-bob 1.2s ease-in-out infinite; }
.walk-home-lead { font-weight: 700; margin: 0; }
.walk-home-steps { margin: 8px 0 0; font-size: 14px; }
.walk-home-steps b { font-size: 28px; margin-right: 2px; }
.walk-home-gain { margin: 10px 0 0; font-size: 18px; font-weight: 700; color: #2a8aa6; }
@keyframes walk-bob { 50% { transform: translateY(-6px); } }

/* いっしょに歩く：歩くフィールド（カードの行と、えらぶ画面） */
.walk-field { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; }
.walk-field-img { width: 52px; height: 40px; border-radius: 8px; background: var(--surface-3) center / cover; image-rendering: pixelated; flex: none; }
.walk-field-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.walk-field-main small { font-size: 11px; color: var(--muted); }
.walk-field-go { font-size: 12px; color: var(--muted); white-space: nowrap; }
.walk-fields { display: grid; gap: 10px; margin-top: 10px; }
.walk-fieldc { display: flex; gap: 12px; align-items: stretch; width: 100%; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.walk-fieldc.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.walk-fieldc.is-locked { opacity: .5; }
.walk-fieldc-img { width: 84px; min-height: 84px; border-radius: 10px; background: var(--surface-3) center / cover; image-rendering: pixelated; flex: none; }
.walk-fieldc.is-locked .walk-fieldc-img { filter: grayscale(1); }
.walk-fieldc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.walk-fieldc-main > small { font-size: 11px; color: var(--muted); }
.walk-fieldc-on { margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--good); }
.walk-fieldc-finds { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.walk-find { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-2); }
.walk-find img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }

/* いっしょに歩く：開きながら歩く（walk-live.js）。まんなかに歩く子と、次の結晶までたまる光の輪。景色は灯の道の絵 */
.walk-go { width: 100%; margin-top: 12px; }
.wl { position: fixed; inset: 0; z-index: 210; display: flex; flex-direction: column; gap: 10px; color: #f2f4fa; overflow: hidden; background: #141a2b;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(16px, env(safe-area-inset-left, 0px)); font-variant-numeric: tabular-nums; }
.wl svg { display: block; }
.wl-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #2b3a2c; }
.wl-field { position: absolute; inset: -6% 0; background-size: cover; background-position: center 100%; image-rendering: pixelated; opacity: 0; transition: opacity 1.2s ease; animation: wl-pan 40s linear infinite alternate; }
.wl-field.is-on { opacity: 1; }
.wl.is-idle .wl-field, .wl.is-paused .wl-field { animation-play-state: paused; }
.wl-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 18, 32, .45) 0%, rgba(14, 18, 32, 0) 18%, rgba(14, 18, 32, 0) 45%, rgba(14, 18, 32, .35) 70%); }
@keyframes wl-pan { from { background-position: center 100%; } to { background-position: center 0%; } }
.wl-head { display: flex; align-items: center; gap: 10px; }
.wl-icon { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(14, 18, 32, .5); color: #fff; display: grid; place-items: center; padding: 0; flex: none; }
.wl-icon svg { width: 18px; height: 18px; }
.wl-title { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; min-width: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.wl-dot { width: 9px; height: 9px; border-radius: 50%; background: #5fd39a; box-shadow: 0 0 8px #5fd39a; flex: none; }
.wl.is-idle .wl-dot, .wl.is-paused .wl-dot { background: #8a96a8; box-shadow: none; }
.wl.is-misfit .wl-dot { background: #f2b35c; box-shadow: 0 0 8px #f2b35c; }
.wl-sensor { display: inline-flex; align-items: flex-end; gap: 2px; font-size: 11px; color: #c9d2e0; padding: 4px 8px; border-radius: 999px; background: rgba(14, 18, 32, .5); }
.wl-sensor i { display: inline-block; width: 3px; border-radius: 1px; background: #4b5566; }
.wl-sensor i:nth-of-type(1) { height: 5px; margin-left: 5px; } .wl-sensor i:nth-of-type(2) { height: 8px; } .wl-sensor i:nth-of-type(3) { height: 11px; }
.wl-sensor.is-on { color: #5fd39a; } .wl-sensor.is-on i { background: #5fd39a; }
.wl-hero { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.wl-orbit { position: relative; width: min(56vw, 230px); aspect-ratio: 1; display: grid; place-items: center; }
.wl-orbit > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.wl-orbit-track { fill: rgba(14, 18, 32, .32); stroke: rgba(255, 255, 255, .35); stroke-width: 8; }
.wl-orbit-fill { fill: none; stroke: #8fe3f7; stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(127, 220, 245, .8)); transition: stroke-dashoffset .35s; }
.wl-orbit.is-full::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(191, 240, 255, .9); animation: wl-burst .9s ease-out; }
.wl-walker { width: 58%; height: 58%; object-fit: contain; image-rendering: pixelated; animation: wl-step .5s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .4)); }
.wl.is-idle .wl-walker, .wl.is-paused .wl-walker { animation-play-state: paused; }
.wl.is-paused .wl-orbit { filter: saturate(.3) brightness(.8); }
.wl-name { margin: 8px 0 0; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(14, 18, 32, .5); }
.wl-fx { position: absolute; inset: 0; pointer-events: none; }
.wl-coin { position: absolute; left: 50%; top: 40%; width: 24px; height: 24px; margin-left: -12px; opacity: 0; animation: wl-coin 1.2s cubic-bezier(.2, .7, .3, 1) var(--d, 0ms) forwards; }
.wl-coin.is-big { width: 32px; height: 32px; margin-left: -16px; }
.wl-coin svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(127, 220, 245, .9)); }
.wl-pulse { position: absolute; left: -40px; right: -40px; top: 58%; text-align: center; font-size: 30px; font-weight: 900; color: #e9fbff; text-shadow: 0 0 14px rgba(127, 220, 245, .95), 0 2px 0 rgba(0, 0, 0, .35); animation: wl-pulse 1.4s ease-out forwards; }
@keyframes wl-pulse { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 18% { opacity: 1; transform: scale(1.12); } 30% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
.wl-cointext { position: absolute; left: -40px; right: -40px; top: -8px; text-align: center; font-size: 20px; font-weight: 800; color: #e9fbff; text-shadow: 0 0 12px rgba(127, 220, 245, .9); animation: wl-cointext 1.6s ease-out forwards; }
.wl-earn { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.wl-seed { width: 26px; height: 26px; align-self: center; }
.wl-seed svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(127, 220, 245, .7)); }
.wl-gain { font-size: 38px; line-height: 1; font-weight: 800; color: #bff0ff; }
.wl-earn { position: relative; }
.wl-gain.is-tick { animation: wl-tick .14s ease-out; }
.wl-plus { position: absolute; right: 18%; top: -6px; font-size: 15px; font-weight: 900; color: #bff0ff; text-shadow: 0 0 8px rgba(127, 220, 245, .9); pointer-events: none; animation: wl-plus .9s ease-out forwards; }
@keyframes wl-tick { 50% { transform: scale(1.08); color: #fff; } }
@keyframes wl-plus { 0% { opacity: 0; transform: translate(0, 8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0px), -34px); } }
.walk-gem-pick { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.walk-gem-pick button { min-width: 36px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 700; }
.walk-gem-pick button.is-on { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.wl-gain.is-pop { animation: wl-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.wl-earn small { font-size: 12px; color: #a9b6cc; }
.wl-note { margin: 0; font-size: 12px; color: #c9d6e3; text-align: center; }
.wl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wl-card { padding: 10px 8px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); text-align: center; }
.wl-card b { display: block; font-size: 21px; font-weight: 800; }
.wl-card small { font-size: 11px; color: #a9b6cc; }
.wl-band { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.wl-band-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; color: #c9d6e3; }
.wl-band-top b { font-size: 18px; color: #fff; }
.wl-fit { font-size: 11px; color: #5fd39a; }
.wl.is-misfit .wl-fit { color: #f2b35c; }
.wl-band-track { position: relative; height: 10px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.wl-band-zone { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: rgba(95, 211, 154, .55); }
.wl-band-mark { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 2px 6px rgba(0, 0, 0, .4); transition: left .5s cubic-bezier(.3, 1.3, .5, 1); }
.wl-band-scale { display: flex; justify-content: space-between; margin-top: 4px; font-size: 9px; color: #7f8ba0; }
.wl-cap-top { display: flex; justify-content: space-between; font-size: 12px; color: #a9b6cc; }
.wl-cap-top b { color: #fff; font-weight: 700; }
.wl-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 6px; }
.wl-bar i { display: block; height: 100%; border-radius: inherit; background: #6fb6c8; transition: width .35s; }
.wl-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
/* 歩ける距離も、上のカードと同じ形の箱に */
.wl-cap { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.wl-panel { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 6px; border-radius: 24px; background: rgba(16, 20, 34, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 -6px 24px rgba(0, 0, 0, .25); }
.wl-pill { position: relative; flex: 1; height: 56px; border-radius: 14px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 16px; font-weight: 800; background: #f2f4fa; color: #1a2230; overflow: hidden; touch-action: none; }
.wl-pill svg { width: 20px; height: 20px; position: relative; } .wl-pill span { position: relative; }
.wl-pill.is-play { background: #5fd39a; color: #0d2a1d; }
.wl-pill.is-stop { background: rgba(232, 100, 74, .18); color: #ffb3a3; border: 2px solid #e8644a; }
.wl-stop-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; white-space: nowrap; }
.wl-stop-label small { font-size: 10px; font-weight: 700; opacity: .8; }
.wl-hold { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #e8644a; }
.wl-pill.is-stop.is-hold .wl-hold { width: 100%; transition: width 1.1s linear; }
.wl-pill.is-stop.is-hold { color: #fff; }
.wl-hint { margin: 0; text-align: center; font-size: 11px; color: #7f8ba0; }
.wl.is-ending { opacity: .5; transition: opacity .3s; }
@keyframes wl-step { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes wl-coin { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0px), -140px) scale(1.15); } }
@keyframes wl-cointext { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 20% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes wl-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes wl-burst { 0% { box-shadow: 0 0 0 0 rgba(191, 240, 255, .9); } 100% { box-shadow: 0 0 0 28px rgba(191, 240, 255, 0); } }

/* 歩き終えた画面（walk-result.js）：上に光の輪の中の歩く子と結晶、下は明るい紙の地に「きょうの道・できたこと・手に入れたもの」 */
.wr { position: fixed; inset: 0; z-index: 215; overflow-y: auto; background: #f6f3ee; color: #1f1d2b; font-variant-numeric: tabular-nums;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); opacity: 0; transition: opacity .3s; }
.wr.is-in { opacity: 1; }
.wr.is-out { opacity: 0; }
.wr-hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 30px; color: #f2f4fa;
  background: linear-gradient(180deg, rgba(14, 18, 32, .35), rgba(14, 18, 32, .7)), var(--field, none) center / cover no-repeat, #2b3a2c; image-rendering: pixelated; border-radius: 0 0 28px 28px; overflow: hidden; }
.wr-hero > * { image-rendering: auto; }
.wr-title, .wr-date, .wr-sub, .wr-earn { text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.wr-sub, .wr-date { color: #e6ecf6; }
.wr-date { font-size: 12px; color: #b8c2d6; }
.wr-orbit { position: relative; width: 168px; height: 168px; margin-top: 10px; display: grid; place-items: center; }
.wr-orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.wr-orbit-track { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .14); stroke-width: 7; }
.wr-orbit-fill { fill: none; stroke: #8fe3f7; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(127, 220, 245, .8)); transition: stroke-dashoffset .9s cubic-bezier(.3, .8, .4, 1); }
.wr-orbit.is-fill .wr-orbit-fill { stroke-dashoffset: 0 !important; }
.wr-orbit.is-burst::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; animation: wl-burst .9s ease-out; }
.wr-orbit img { width: 62%; height: 62%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .35)); }
.wr-orbit.is-fill img { animation: wr-hop .8s cubic-bezier(.3, 1.5, .5, 1) .5s 2 both; }
.wr-title { margin: 10px 0 0; font-size: 20px; font-weight: 800; text-align: center; text-wrap: balance; }
.wr-sub { margin: 2px 0 0; font-size: 12px; color: #b8c2d6; }
.wr-earn { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.wr-seed { width: 30px; height: 30px; align-self: center; }
.wr-seed svg { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(127, 220, 245, .8)); }
.wr-gain { font-size: 46px; line-height: 1; font-weight: 900; color: #bff0ff; text-shadow: 0 0 18px rgba(127, 220, 245, .45); }
.wr-gain.is-pop { animation: wl-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.wr-earn small { font-size: 12px; color: #b8c2d6; }
.wr-plan { margin: 12px 0 0; font-size: 13px; color: #d6dff0; text-align: center; }
.wr-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: -18px 16px 0; position: relative; background: #fff; border-radius: 18px; box-shadow: 0 8px 20px -12px rgba(31, 29, 43, .35); padding: 12px 4px; }
.wr-cell { text-align: center; opacity: .3; transition: opacity .3s; min-width: 0; }
.wr-cell + .wr-cell { border-left: 1px solid #ece6dc; }
.wr-cell.is-on { opacity: 1; }
.wr-cell b { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; }
.wr-cell small { font-size: 10px; color: #8a8296; }
.wr-noted { margin: 10px 16px 0; text-align: center; font-size: 12px; font-weight: 700; color: #2f7d58; }
.wr-sec { margin: 18px 16px 0; }
.wr-h { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.wr-map-frame { position: relative; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 18px; overflow: hidden; background: #efe3c8; }
.wr-map-canvas, .wr-map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wr-map-canvas[hidden], .wr-map-img[hidden] { display: none; }
.wr-map-toggle { position: absolute; right: 8px; top: 8px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 12px; color: #3a3546; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.wr-switch { width: 42px; height: 26px; border-radius: 999px; border: 0; background: #d6d0c4; position: relative; padding: 0; transition: background .2s; }
.wr-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.wr-switch.is-on { background: #3fb37a; }
.wr-switch.is-on i { transform: translateX(16px); }
.wr-switch:disabled { opacity: .45; }
.wr-map-note { margin: 6px 2px 0; font-size: 11px; color: #8a8296; }
.wr-stamps { display: flex; flex-wrap: wrap; gap: 10px; }
.wr-stamp { width: 88px; height: 88px; padding: 6px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1.25; color: #3a7f9a; border: 2.5px solid currentColor; background: #fff;
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5.5px currentColor; animation: ws-stamp .45s cubic-bezier(.3, 1.6, .5, 1); }
.wr-stamp b { font-size: 10px; font-weight: 700; }
.wr-stamp span { font-size: 12px; font-weight: 900; }
.wr-stamp.is-best { color: #c98a12; } .wr-stamp.is-full { color: #2a8aa6; } .wr-stamp.is-fit { color: #2f9a63; } .wr-stamp.is-far, .wr-stamp.is-long { color: #7a5cc4; } .wr-stamp.is-walk { color: #8a8296; }
.wr-got { display: grid; gap: 8px; }
.wr-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; animation: ws-drop .45s cubic-bezier(.3, 1.5, .5, 1); }
.wr-item.is-box { background: #fff8e2; box-shadow: 0 0 0 2px #f0d58a inset; }
.wr-item-ico { width: 34px; height: 34px; flex: none; color: #6fb6c8; }
.wr-item-ico svg { width: 100%; height: 100%; }
.wr-item.is-box .wr-item-ico { width: 44px; height: 42px; animation: ws-glow 1.6s ease-in-out infinite; }
.wr-item-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.wr-item-name small { display: block; font-size: 11px; font-weight: 500; color: #8a8296; }
.wr-item b { font-size: 18px; font-weight: 900; }
.wr-full { margin: 0; font-size: 12px; color: #c0392b; }
.wr-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin: 22px 16px 0; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.wr.is-done .wr-actions { opacity: 1; transform: none; pointer-events: auto; }
.wr-share { height: 54px; border-radius: 999px; font-weight: 800; background: #fff; color: #1f1d2b; border: 2px solid #1f1d2b; }
.wr-yoshi { height: 54px; border-radius: 999px; font-size: 20px; font-weight: 900; }
@keyframes wr-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px) scale(1.06); } }
@keyframes ws-stamp { 0% { transform: scale(1.8) rotate(-12deg); opacity: 0; } 100% { transform: rotate(-6deg); opacity: 1; } }
@keyframes ws-drop { 0% { transform: translateY(-40px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes ws-glow { 50% { filter: drop-shadow(0 0 10px rgba(240, 190, 70, .9)); } }
@keyframes ws-in { from { opacity: 0; } }

.walk-home-fights { margin-top: 10px; }
.walk-home-nm { color: #c0392b; }
.walk-home-loot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.walk-home-loot span { display: inline-flex; align-items: center; gap: 3px; }
.walk-home-loot img { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; }
/* 歩きながらの戦い：歩いている画面の知らせと、歩き終えた画面の魔物の列 */
.wl-fights { position: absolute; left: 16px; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 56px); z-index: 2; display: grid; gap: 6px; pointer-events: none; }
.wl-fight { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(16, 20, 34, .88); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: wl-fight-in .35s cubic-bezier(.3, 1.5, .5, 1); transition: opacity .3s, transform .3s; }
.wl-fight.is-out { opacity: 0; transform: translateY(-8px); }
.wl-fight.is-nm { background: linear-gradient(90deg, rgba(120, 30, 30, .92), rgba(60, 20, 40, .92)); border-color: #f2b35c; box-shadow: 0 0 18px rgba(242, 179, 92, .5); }
.wl-fight.is-lose { opacity: .85; }
.wl-fight-ico { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; flex: none; }
.wl-fight-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-fight-main b { font-size: 13px; }
.wl-fight-main small { font-size: 11px; color: #c9d6e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-fight-res { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #5fd39a; color: #0d2a1d; }
.wl-fight.is-lose .wl-fight-res { background: #6b7588; color: #fff; }
@keyframes wl-fight-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.wr-fights { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-foe { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; animation: ws-drop .35s ease-out; }
.wr-foe img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.wr-foe.is-lose { opacity: .35; filter: grayscale(1); }
.wr-foe.is-nm { box-shadow: 0 0 0 2px #e0a33a, 0 0 12px rgba(224, 163, 58, .6); }
.wr-item.is-rare { background: #fff8e2; box-shadow: 0 0 0 2px #f0d58a inset; }
img.wr-item-ico { object-fit: contain; image-rendering: pixelated; }

/* 道の宝箱：カードの4つの枠と、開ける場面（walk-fx.js） */
.wbx-row { margin-top: 12px; }
.wbx-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.wbx { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; }
.wbx.is-empty { border-style: dashed; background: transparent; color: var(--muted); font-size: 11px; justify-content: center; min-height: 70px; }
.wbx-chest { width: 42px; height: 40px; }
.wbx-chest svg { width: 100%; height: 100%; }
.wbx small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.wbx.is-ready { border-color: #d9a62e; box-shadow: 0 0 0 2px rgba(217, 166, 46, .25); }
.wbx.is-ready small { color: #b07d10; font-weight: 700; }
.wbx.is-ready .wbx-chest { animation: wbx-bounce 1.4s ease-in-out infinite; }
.wb-open { position: fixed; inset: 0; z-index: 220; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px;
  background: radial-gradient(70% 50% at 50% 40%, #2a2340 0%, #0d0f18 75%); color: #fff; animation: ws-in .25s ease-out; }
.wb-open.is-flash::after { content: ""; position: fixed; inset: 0; background: #fff; pointer-events: none; animation: wb-flash .5s ease-out forwards; }
.wb-open-title { margin: 0; font-size: 20px; font-weight: 800; }
.wb-open-stage { position: relative; width: 180px; height: 170px; display: grid; place-items: center; }
.wb-open-chest { width: 150px; height: 140px; position: relative; z-index: 1; }
.wb-open-chest svg { width: 100%; height: 100%; }
.wb-open-chest.is-shake { animation: wb-shake .32s ease-in-out; }
.wb-open-chest.is-glow { filter: drop-shadow(0 0 14px rgba(255, 233, 166, .9)); }
.wb-open-chest.is-open { animation: wb-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.wb-open-rays { position: absolute; inset: -60px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 233, 166, .35) 0 10deg, transparent 10deg 24deg); opacity: 0; mask: radial-gradient(circle, #000 20%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); }
.wb-open-rays.is-on { opacity: 1; animation: wb-spin 8s linear infinite; transition: opacity .4s; }
.wb-open-items { display: grid; gap: 8px; width: 100%; max-width: 360px; }
.wb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); animation: ws-drop .45s cubic-bezier(.3, 1.5, .5, 1); }
.wb-item img, .wb-item i { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; flex: none; }
.wb-item span { flex: 1; font-weight: 700; }
.wb-yoshi { min-width: 200px; height: 54px; font-size: 20px; font-weight: 800; border-radius: 999px; opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .3s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.wb-yoshi.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wb-item.is-rare { background: rgba(255, 214, 107, .18); box-shadow: 0 0 0 1px rgba(255, 214, 107, .6), 0 0 18px rgba(255, 214, 107, .35); }
@keyframes wbx-bounce { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
@keyframes wb-shake { 0%, 100% { transform: none; } 25% { transform: rotate(-8deg) translateX(-4px); } 75% { transform: rotate(8deg) translateX(4px); } }
@keyframes wb-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes wb-spin { to { transform: rotate(360deg); } }
@keyframes wb-flash { from { opacity: .85; } to { opacity: 0; } }

/* 持ち物を捨てる（くわしい中身の窓の下） */
.wd-discard { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 8px; }

/* ヘルスケアから取り込んだ水泳（docs/health.md・partials/health_swim.php） */
.hs-gone { color: var(--warning); }
.hs-strokes { display: grid; gap: 6px; margin-top: 6px; }
.hs-stroke { display: grid; grid-template-columns: 5.5em 1fr 10.5em; align-items: center; gap: 8px; font-size: 13px; }
.hs-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.hs-bar i { display: block; height: 100%; border-radius: 4px; background: var(--series-1); }
.hs-bar i[data-stroke="breaststroke"] { background: var(--series-2); }
.hs-bar i[data-stroke="backstroke"] { background: var(--series-3); }
.hs-bar i[data-stroke="butterfly"] { background: var(--series-4); }
.hs-bar i[data-stroke="mixed"] { background: var(--series-5); }
.hs-bar i[data-stroke="kickboard"] { background: var(--series-6); }
.hs-bar i[data-stroke="unknown"] { background: var(--axis); }
/* 走る・歩く・こぐの1kmごとのペース（partials/health_move.php）。いちばん速い1km */
.hs-splits .hs-stroke { grid-template-columns: 4em 1fr 6.5em; }
.hs-bar i[data-pace="fast"] { background: var(--series-2); }
.hs-num { text-align: right; white-space: nowrap; }
.hs-num small { color: var(--muted); font-size: 11px; }
.hs-laps td, .hs-laps th { padding: 6px 8px; }
.hs-rest td { text-align: center; color: var(--muted); font-size: 11px; background: var(--surface-2, transparent); padding: 3px; }

/* ===== 代わりに書いてもらう（RecordLinks。本人の QR・確かめ・書く人の画面 /r/…） ===== */
.rl-start { width: 100%; }
.rl-qr-wrap { margin-top: 12px; }
.rl-qr { display: flex; justify-content: center; padding: 6px 0 2px; }
.rl-qr svg { width: min(220px, 62vw); height: auto; aspect-ratio: 1; border-radius: 10px; background: #fff; }
.rl-qr.is-off svg { opacity: .18; }
.rl-status { text-align: center; margin-top: 8px; }
.rl-note { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.btn.rl-drop { color: var(--critical); border-color: var(--critical); }
.rl-back { text-align: center; }
.rl-sum { border-top: 1px solid var(--line); }
.rl-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rl-sum-name { flex: none; max-width: 45%; }
.rl-sum-sets { text-align: right; overflow-wrap: anywhere; }
.rl-actions { display: grid; gap: 8px; }
.rl-home { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: inherit; text-decoration: none; }
.rl-home-text { flex: 1 1 60%; font-weight: 600; font-size: 14px; }
.rl-home .small { color: var(--accent-ink); font-weight: 600; }
/* 書く人の画面（ログインなし） */
.rl-body { background: var(--bg); color: var(--ink); min-height: 100vh; }
.rl-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rl-title { font-size: 16px; font-weight: 700; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-left { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); font-weight: 600; }
.rl-main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.rl-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rl-err { color: var(--critical); margin-top: 6px; min-height: 0; }
.rl-err:empty { display: none; }
.rl-ex-name { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.rl-sets { display: grid; grid-template-columns: 22px 1fr 1fr 28px; gap: 6px 8px; align-items: center; }
.rl-sets.one { grid-template-columns: 22px 1fr 28px; }
/* 左右べつ（片側ずつの種目）：「1 左」「右」の2行で1セット */
.rl-sets.uni { grid-template-columns: 34px 1fr 1fr 28px; }
.rl-sets.uni.one { grid-template-columns: 34px 1fr 28px; }
.rl-pair { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: 6px 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 6px 6px; margin: 4px -6px 2px; }
.rl-pair .pair-tag { grid-column: 1 / -1; padding: 6px 0 0; }
.rl-side { display: grid; place-items: center; height: 40px; border-radius: 9px; font-size: 14px; }
.rl-h { font-size: 12px; color: var(--muted); }
.rl-no { font-size: 14px; color: var(--ink-2); }
.rl-in { text-align: right; font-size: 16px; padding: 8px 10px; min-width: 0; }
.rl-x { width: 28px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 8px; }
.rl-x:hover { color: var(--critical); background: var(--surface-2); }
.rl-add { background: var(--surface); }
.rl-done { margin-top: 4px; }
.rl-save { text-align: center; margin: 0; min-height: 1.4em; }
.rl-join { text-align: center; font-size: 13px; margin: 4px 0 0; }
.rl-join .link { color: var(--muted); }
.rl-closed h2 { font-size: 18px; }
/* スタッフ：お客様の QR を読む（qr-scan.js）・QR から開いたとき */
.bc-frame.qr-frame { left: 20%; right: 20%; top: 10%; bottom: 10%; }
.rl-staff .rl-note { margin-top: 14px; }
[data-qr-scan] { flex: none; white-space: nowrap; gap: 0; }
.swimcmp-table { font-size: 12px; }
.swimcmp-table th, .swimcmp-table td { padding-left: 3px !important; padding-right: 3px !important; }
.swimcmp-table .dot { margin-right: 4px !important; }

/* 記録の画面：手入力の水泳の泳ぎ方（任意）。色は成長グラフ・ラップの帯と同じ */
.stroke-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; padding: 0 12px; }
.stroke-k { width: 100%; font-size: 11px; font-weight: 600; color: var(--muted); }
.stroke-chips button { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.stroke-chips button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.stroke-chips i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--series-1); }
.stroke-chips i[data-stroke="breaststroke"] { background: var(--series-2); }
.stroke-chips i[data-stroke="backstroke"] { background: var(--series-3); }
.stroke-chips i[data-stroke="butterfly"] { background: var(--series-4); }
.stroke-chips i[data-stroke="mixed"] { background: var(--series-5); }
