/* あさレイ — 建設現場の朝礼・KY（Material 3 Expressive）
   黄＝ヘルメットとマーカー、黒＝看板の文字、白＝ホワイトボード */
:root {
  --y: #ffd21f;
  --y-deep: #f2b700;
  --y-tone: #fff1a8;
  --y-soft: #fff8d6;
  --ink: #151515;
  --ink2: #3b3b3b;
  --ink3: #555452;
  --paper: #ffffff;
  --board: #f3f4f1;
  --line: #d9dad5;
  --grid: #e6e8e2;
  --night: #1b1c1e;
  --night2: #2a2b2e;
  --red: #c8231b;
  --red-tone: #fde3df;
  --yoshi: #17703a;
  --yoshi-tone: #dcf1e2;
  --blue: #1f4f8f;
  --f-disp: "Dela Gothic One", "IBM Plex Sans JP", "Hiragino Sans", sans-serif;
  --f-body: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-mono: "IBM Plex Mono", "IBM Plex Sans JP", monospace;
  --f-hand: "Yomogi", "IBM Plex Sans JP", cursive;
  --r-xl: 28px;
  --r-l: 20px;
  --r-m: 12px;
  --r-s: 8px;
  --sh-1: 0 1px 2px rgba(20, 20, 10, .14), 0 1px 3px rgba(20, 20, 10, .08);
  --sh-2: 0 4px 10px rgba(20, 20, 10, .16), 0 2px 4px rgba(20, 20, 10, .1);
  --sh-3: 0 10px 28px rgba(20, 20, 10, .26), 0 3px 8px rgba(20, 20, 10, .14);
  --spring: cubic-bezier(.3, 1.45, .5, 1);
  --emph: cubic-bezier(.2, 0, 0, 1);
  --t-in: 380ms;
  --t-out: 200ms;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font: 400 15px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-break: strict;
  overflow: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd, fieldset { margin: 0; padding: 0; }
p, dd { text-wrap: pretty; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
.ic-s { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* 見出し・ラベル・ボタンは文節で折り返す */
h1, h2, .abar-h, .sec-t, .st-l, .job-t, .banner-t, .board-q, .tonal, .cta, .tbtn, .fab, .chip, .empty-t, .done-t, .onb-t, .dlg-t, .sheet-t, .hy-lead, .sgsum-t, .form-lead, .preview-t, .banner-cl {
  word-break: keep-all; overflow-wrap: normal; font-feature-settings: "palt";
}

/* ---------- 枠 ---------- */
.app {
  position: relative; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--board); overflow: hidden; margin: 0 auto;
}
@media (min-width: 600px) {
  body {
    background-color: #1b1c1e;
    background-image: radial-gradient(circle at 20% 15%, rgba(255, 210, 31, .14), transparent 40%), linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: auto, 32px 32px, 32px 32px;
  }
  .app { max-width: 430px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
}
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: block; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--board); }
.scr--night { background: var(--night); color: #fff; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: 112px; }
.bare .scroll { padding-bottom: calc(32px + var(--sb)); }
.boot { padding: 40vh 24px 0; text-align: center; }
.boot-t { font: 400 28px/1.2 var(--f-disp); }
.boot-s { margin-top: 8px; color: var(--ink3); }
.nojs { position: fixed; inset: auto 16px 16px; background: #fff; padding: 12px 16px; border-radius: 12px; }

/* 遷移（M3：共有軸・フェードスルー） */
.in-push { animation: inPush var(--t-in) var(--emph) both; z-index: 2; }
.out-push { animation: outPush var(--t-in) var(--emph) both; z-index: 1; }
.in-back { animation: inBack var(--t-in) var(--emph) both; z-index: 1; }
.out-back { animation: outBack var(--t-in) var(--emph) both; z-index: 2; }
.in-tab { animation: inTab 300ms var(--emph) 60ms both; z-index: 2; }
.out-tab { animation: outTab 120ms linear both; z-index: 1; }
@keyframes inPush { from { transform: translateX(14%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outPush { to { transform: translateX(-8%); opacity: 0; } }
@keyframes inBack { from { transform: translateX(-8%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outBack { to { transform: translateX(14%); opacity: 0; } }
@keyframes inTab { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outTab { to { opacity: 0; } }

/* ---------- トップアプリバー ---------- */
.abar { flex: none; padding-top: var(--st); background: var(--board); position: relative; z-index: 3; transition: background-color .2s, box-shadow .2s; }
.abar.lift { background: #fffbe6; box-shadow: 0 1px 0 var(--line); }
.abar--dark { background: var(--night); color: #fff; }
.abar--dark.lift { background: var(--night2); box-shadow: none; }
.abar-row { display: flex; align-items: center; gap: 4px; min-height: 64px; padding: 4px 8px 4px 8px; }
.abar-ttl { flex: 1; min-width: 0; padding: 4px 8px; }
.abar-h { font: 400 22px/1.25 var(--f-disp); letter-spacing: .01em; }
.abar-sub { font-size: 14px; color: var(--ink3); line-height: 1.4; margin-top: 2px; }
.abar--dark .abar-sub { color: #c9c9c9; }
.brand { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.brand img { border-radius: 10px; box-shadow: var(--sh-1); }
.brand-n { font: 400 24px/1 var(--f-disp); letter-spacing: .04em; }
.ibtn { width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; position: relative; overflow: hidden; flex: none; transition: background-color .15s, transform .15s var(--spring); }
.ibtn:active { transform: scale(.9); background: rgba(0, 0, 0, .08); }
.ibtn:disabled { opacity: .35; }
.ibtn--sm { width: 44px; height: 44px; }
.ibtn--dark { color: #fff; background: rgba(255, 255, 255, .08); }
.ibtn--dark:active { background: rgba(255, 255, 255, .2); }
.ibtn--onimg { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .62); color: #fff; }

/* ---------- ナビゲーションバー ---------- */
.nav {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fffbe6; padding: 12px 8px calc(16px + var(--sb)); position: relative; z-index: 5;
  box-shadow: 0 -1px 0 var(--line);
}
.nav-i { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; color: var(--ink2); }
.nav-pill { position: relative; width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background-color .25s, width .35s var(--spring); }
.nav-i.on .nav-pill { background: var(--y); color: var(--ink); width: 68px; }
.nav-i:active .nav-pill { transform: scale(.92); }
.nav-l { font-size: 12px; font-weight: 500; line-height: 1.2; }
.nav-i.on .nav-l { font-weight: 700; color: var(--ink); }
.nav-badge { position: absolute; top: -4px; right: 8px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--red); color: #fff; font: 600 11px/18px var(--f-mono); text-align: center; }

/* ---------- FAB ---------- */
.fab {
  position: absolute; right: 16px; bottom: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 18px;
  border-radius: 20px; background: var(--ink); color: var(--y); font-weight: 700; font-size: 16px;
  box-shadow: var(--sh-3); overflow: hidden; transition: transform .25s var(--spring), border-radius .25s;
}
.fab:active { transform: scale(.94); border-radius: 30px; }
.fab--warn { background: var(--y); color: var(--ink); }
.in-tab .fab, .in-push .fab { animation: fabIn 480ms var(--spring) 120ms both; }
@keyframes fabIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- ボタン ---------- */
:where(.rip) { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .16; transform: scale(0); animation: rip .55s var(--emph) forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.cta {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 20px;
  border-radius: 28px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; text-align: center;
  transition: transform .2s var(--spring), border-radius .2s; margin-top: 20px;
}
.cta:active { transform: scale(.97); border-radius: 16px; }
.cta[aria-disabled="true"] { background: #e2e2dc; color: var(--ink2); }
.cta--warn { background: var(--y); color: var(--ink); }
.tonal {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  border-radius: 22px; background: var(--y-tone); color: var(--ink); font-weight: 700; font-size: 14px; flex: none;
  transition: transform .2s var(--spring);
}
.tonal:active { transform: scale(.94); }
.tonal--ink { background: var(--ink); color: var(--y); }
.tonal--sm { min-height: 44px; padding: 6px 14px; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 22px; font-weight: 700; font-size: 15px; color: var(--ink); }
.tbtn:active { background: rgba(0, 0, 0, .07); }
.tbtn--sm { font-size: 14px; padding: 6px 10px; color: var(--ink2); }
.tbtn--ink { background: var(--ink); color: #fff; }
.tbtn--light { color: var(--y); border: 2px solid var(--y); margin-top: 20px; }
.tbtn--block { display: flex; width: 100%; margin-top: 8px; }
.fbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 20px; border-radius: 22px; background: var(--ink); color: #fff; font-weight: 700; }
.fbtn--danger { background: var(--red); }

/* ---------- 朝礼：ヒーロー ---------- */
.hero {
  margin: 4px 16px 0; height: 196px; border-radius: var(--r-xl) var(--r-xl) var(--r-m) var(--r-m);
  background-size: cover; background-position: center 40%; position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-plate { margin: 0 12px 12px; padding: 10px 14px; background: rgba(15, 15, 15, .86); color: #fff; border-radius: 14px; max-width: calc(100% - 24px); }
.hero-site { font-weight: 700; font-size: 15px; line-height: 1.45; word-break: keep-all; overflow-wrap: normal; }
.hero-date { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font: 500 14px/1.4 var(--f-mono); color: var(--y); margin-top: 2px; }
.hero-dot { width: 4px; height: 4px; border-radius: 2px; background: #888; }
.wx { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 6px 16px 0; }
.wx-i { background: var(--paper); border-radius: var(--r-m); padding: 10px 10px 10px; display: grid; gap: 2px; box-shadow: var(--sh-1); }
.wx-i:first-child { border-bottom-left-radius: var(--r-l); }
.wx-i:last-child { border-bottom-right-radius: var(--r-l); }
.wx-i .ic { width: 22px; height: 22px; color: var(--ink2); }
.wx-k { font-size: 12px; color: var(--ink3); line-height: 1.3; }
.wx-v { font-weight: 700; font-size: 15px; line-height: 1.3; font-family: var(--f-body); }
.wx-i--ok { background: var(--yoshi-tone); }
.wx-i--ok .ic, .wx-i--ok .wx-v { color: var(--yoshi); }
.wx-i--ng { background: var(--red-tone); }

/* 横断幕（行動目標） */
.banner {
  margin: 16px 16px 0; padding: 18px 18px 16px; background: var(--paper); border-radius: 6px;
  border: 3px solid var(--ink); position: relative; box-shadow: 6px 6px 0 var(--y);
}
.banner::before, .banner::after { content: ""; position: absolute; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 3px #9a9a96; }
.banner::before { left: 8px; }
.banner::after { right: 8px; }
.banner-k { font-size: 13px; font-weight: 700; color: var(--ink2); text-align: center; letter-spacing: .12em; }
.banner-t { font: 400 21px/1.5 var(--f-disp); text-align: center; margin-top: 6px; }
.banner-c { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px -6px 0; padding: 10px 14px; min-height: 52px; background: var(--y); border-radius: 26px; font-weight: 700; }
.banner-c:active { transform: scale(.98); }
.banner-hand { width: 40px; height: 40px; color: var(--ink); flex: none; }
.banner-cl { font: 400 17px/1.4 var(--f-disp); }
.banner--flat { box-shadow: none; }
.banner-cl--flat { display: block; text-align: center; margin-top: 10px; background: var(--y); border-radius: 22px; padding: 8px 12px; }

/* セクション */
.sec { margin: 28px 16px 0; }
.sec--flush { margin-left: 0; margin-right: 0; }
.sec--end { margin-bottom: 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-h--pad { padding: 0 16px; }
.sec-t { font: 400 18px/1.3 var(--f-disp); }
.sec-t--mt { margin-top: 24px; margin-bottom: 10px; }
.sec-c { font: 500 15px/1 var(--f-mono); color: var(--ink2); white-space: nowrap; }
.sec-c b { font: 400 26px/1 var(--f-disp); color: var(--ink); margin-right: 2px; }
.meter { height: 10px; border-radius: 5px; background: #e2e3dd; overflow: hidden; margin-bottom: 8px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 5px; transition: width .6s var(--spring); position: relative; }
.meter i::after { content: ""; position: absolute; right: 3px; top: 3px; width: 4px; height: 4px; border-radius: 2px; background: var(--y); }

/* 進行ステップ */
.steps { background: var(--paper); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; }
.st { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 12px; min-height: 72px; border-top: 1px solid #ecece8; }
.st:first-child { border-top: 0; }
.st-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font: 400 20px/1 var(--f-disp); background: var(--board); color: var(--ink); border: 2px solid var(--ink); }
.st--done .st-n { background: var(--y); border-color: var(--y); }
.st-b { flex: 1; min-width: 0; }
.st-l { font-weight: 700; font-size: 16px; line-height: 1.4; }
.st--done .st-l { background: linear-gradient(transparent 62%, var(--y-tone) 62%); display: inline; }
.st-s { font-size: 14px; color: var(--ink3); line-height: 1.5; margin-top: 2px; }
.st-ok { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--yoshi); color: #fff; flex: none; }
.st-ok .ic { width: 20px; height: 20px; }

/* 今日の作業（横スクロール） */
.jobs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 12px; scroll-padding: 16px; overscroll-behavior-x: contain; scrollbar-width: none; }
.jobs::-webkit-scrollbar { display: none; }
.job { scroll-snap-align: start; flex: none; width: 216px; background: var(--paper); border-radius: var(--r-l); padding: 14px 14px 12px; position: relative; box-shadow: var(--sh-1); border-top: 6px solid var(--ink); display: flex; flex-direction: column; gap: 4px; }
.job--c1 { border-top-color: var(--y-deep); }
.job--c2 { border-top-color: #9b6a2c; }
.job--c3 { border-top-color: var(--blue); }
.job--c4 { border-top-color: var(--ink); }
.job-top { display: flex; justify-content: space-between; align-items: baseline; }
.job-crew { font: 400 20px/1.2 var(--f-disp); }
.job-n { font: 500 14px/1 var(--f-mono); color: var(--ink2); }
.job-t { font-weight: 700; font-size: 15px; line-height: 1.45; margin: 4px 0 4px; }
.job-m { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--ink2); line-height: 1.4; }
.job-m .ic { margin-top: 1px; }
.job-co { font-size: 13px; color: var(--ink3); margin-top: auto; padding-top: 6px; }
.job-lv { position: absolute; right: 12px; bottom: 12px; font-size: 12px; font-weight: 700; color: var(--red); background: var(--red-tone); border-radius: 6px; padding: 2px 6px; }

/* 参加者バッジ（M3 cookie 形） */
.crew { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; background: var(--paper); border-radius: var(--r-l); padding: 16px 8px 12px; box-shadow: var(--sh-1); }
.bdg { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; border-radius: 12px; padding: 2px 0; }
.bdg-shape {
  width: 64px; height: 64px; display: grid; place-items: center;
  clip-path: polygon(99.8% 50.0%,99.0% 53.4%,97.0% 56.6%,94.5% 59.5%,92.2% 62.1%,90.6% 64.8%,90.1% 67.8%,90.2% 71.4%,90.3% 75.2%,89.7% 78.9%,88.1% 82.0%,85.3% 84.1%,81.8% 85.3%,78.0% 85.8%,74.5% 86.4%,71.6% 87.5%,69.2% 89.4%,67.0% 92.2%,64.7% 95.2%,61.9% 97.7%,58.6% 99.0%,55.1% 98.9%,51.7% 97.5%,48.4% 95.5%,45.4% 93.6%,42.5% 92.6%,39.4% 92.6%,35.9% 93.3%,32.2% 94.0%,28.5% 94.2%,25.1% 93.1%,22.5% 90.7%,20.8% 87.4%,19.6% 83.8%,18.4% 80.5%,16.9% 77.8%,14.5% 75.8%,11.4% 74.1%,8.1% 72.3%,5.1% 70.0%,3.2% 67.0%,2.8% 63.5%,3.5% 59.9%,4.9% 56.3%,6.2% 53.1%,6.8% 50.0%,6.2% 46.9%,4.9% 43.7%,3.5% 40.1%,2.8% 36.5%,3.2% 33.0%,5.1% 30.0%,8.1% 27.7%,11.4% 25.9%,14.5% 24.2%,16.9% 22.2%,18.4% 19.5%,19.6% 16.2%,20.8% 12.6%,22.5% 9.3%,25.1% 6.9%,28.5% 5.8%,32.2% 6.0%,35.9% 6.7%,39.4% 7.4%,42.5% 7.4%,45.4% 6.4%,48.4% 4.5%,51.7% 2.5%,55.1% 1.1%,58.6% 1.0%,61.9% 2.3%,64.7% 4.8%,67.0% 7.8%,69.2% 10.6%,71.6% 12.5%,74.5% 13.6%,78.0% 14.2%,81.8% 14.7%,85.3% 15.9%,88.1% 18.0%,89.7% 21.1%,90.3% 24.8%,90.2% 28.6%,90.1% 32.2%,90.6% 35.2%,92.2% 37.9%,94.5% 40.5%,97.0% 43.4%,99.0% 46.6%);
  transition: transform .3s var(--spring);
}
.bdg:active .bdg-shape { transform: rotate(20deg) scale(.92); }
.bdg--ok .bdg-shape { background: var(--y); }
.bdg--no .bdg-shape { background: #ecece7; }
.bdg--ab .bdg-shape { background: #e1e6ee; }
.bdg-in { font: 400 22px/1 var(--f-disp); color: #6a6a66; }
.bdg-ab { font-size: 13px; font-weight: 700; color: var(--blue); }
.bdg-n { font-size: 13px; font-weight: 500; line-height: 1.2; }
.bdg--no .bdg-n { color: var(--ink3); }
.sig { width: 58px; height: 24px; overflow: visible; }
.sig-tx { font-family: var(--f-hand); font-size: 30px; fill: #1a1a1a; }
.sig-ul { fill: none; stroke: #1a1a1a; stroke-width: 2; stroke-linecap: round; }
.sig-p { fill: none; stroke: #111; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

.closed { background: var(--yoshi); color: #fff; border-radius: var(--r-l); padding: 18px; display: grid; gap: 6px; justify-items: start; }
.closed-k { font: 400 22px/1.2 var(--f-disp); }
.closed-t { font-size: 15px; }
.closed .tbtn--ink { background: #fff; color: var(--yoshi); margin-top: 6px; }

/* 全員そろって締める演出 */
.zero { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(21, 21, 21, .94); opacity: 0; transition: opacity .25s; }
.zero.on { opacity: 1; }
.zero-in { text-align: center; color: #fff; padding: 24px; }
.zero-hand { width: 120px; height: 120px; color: var(--y); transform: translateX(-30px); }
.zero.on .zero-hand { animation: thrust .5s var(--spring) .1s both; }
.zero-1 { font: 400 30px/1.3 var(--f-disp); margin-top: 8px; word-break: keep-all; }
.zero-2 { font: 400 72px/1.1 var(--f-disp); color: var(--y); }
.zero.on .zero-2 { animation: pop .45s var(--spring) .35s both; }
.zero-3 { margin-top: 10px; color: #e6e6e6; }
@keyframes thrust { from { transform: translateX(-40px); } to { transform: translateX(10px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 指差し唱和 ---------- */
.chant { padding: 16px 20px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.chant-lead { color: #d6d6d6; font-size: 15px; }
.chant-w { font: 400 40px/1.35 var(--f-disp); color: #fff; margin-top: 28px; word-break: keep-all; overflow-wrap: normal; }
.chant-row { display: flex; align-items: center; gap: 10px; margin-top: 36px; }
.chant-hand { width: 96px; height: 96px; color: var(--y); }
.yoshi { width: 168px; height: 168px; border-radius: 50%; background: var(--y); color: var(--ink); font: 400 40px/1 var(--f-disp); box-shadow: 0 0 0 10px rgba(255, 210, 31, .18), 0 0 0 22px rgba(255, 210, 31, .08); transition: transform .2s var(--spring); }
.yoshi:active { transform: scale(.92); }
.chant.fire .chant-hand { animation: thrust .45s var(--spring) both; }
.chant.fire .yoshi { animation: boom .6s var(--spring) both; }
.chant.fire .chant-w { animation: flash .6s ease-out both; }
@keyframes boom { 0% { transform: scale(.85); } 60% { transform: scale(1.12); box-shadow: 0 0 0 26px rgba(255, 210, 31, .28), 0 0 0 52px rgba(255, 210, 31, .1); } 100% { transform: none; } }
@keyframes flash { 0% { color: var(--y); } 100% { color: #fff; } }
.chant-how { margin-top: 36px; width: 100%; display: grid; gap: 8px; text-align: left; counter-reset: how; }
.chant-how li { display: flex; align-items: center; gap: 12px; background: var(--night2); border-radius: 16px; padding: 12px 14px; font-size: 15px; color: #f2f2f2; counter-increment: how; }
.chant-how li::before { content: counter(how); width: 32px; height: 32px; border-radius: 10px; background: var(--y); color: var(--ink); display: grid; place-items: center; font: 400 17px/1 var(--f-disp); flex: none; }
.chant-goal { margin-top: 12px; width: 100%; text-align: left; border: 2px solid #5a5a58; border-radius: 16px; padding: 12px 14px; }
.chant-goal-k { font-size: 13px; font-weight: 700; color: var(--y); }
.chant-goal-t { font-size: 15px; color: #fff; margin-top: 2px; }
.chant-note { margin-top: 32px; color: #e8e8e8; font-size: 15px; min-height: 1.6em; }

/* ---------- KYシート ---------- */
.rgroup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 4px 16px 0; }
.rg { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60px; background: var(--paper); border-radius: 8px; transition: border-radius .3s var(--spring), background-color .2s; box-shadow: var(--sh-1); }
.rg:first-child { border-radius: 24px 8px 8px 24px; }
.rg:last-child { border-radius: 8px 24px 24px 8px; }
.rg.on { background: var(--ink); color: var(--y); border-radius: 24px; }
.rg b { font: 400 20px/1.1 var(--f-disp); }
.rg span { font-size: 12px; font-weight: 700; line-height: 1.3; }
.rg.on span { color: #fff; }
.board {
  margin: 14px 16px 0; padding: 18px 14px 18px; border-radius: var(--r-l);
  background-color: #fbfbf9;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px; border: 1px solid var(--line); position: relative;
}
.board-r { display: inline-block; font-size: 13px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 8px; }
.board-q { font: 400 26px/1.35 var(--f-disp); margin: 8px 0 14px; }
.hint { font-size: 14px; color: var(--ink2); margin: 10px 0 12px; background: #fff; border-radius: 10px; padding: 8px 10px; }

.hz { background: var(--paper); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sh-2); margin-bottom: 14px; }
.hz-ph { position: relative; aspect-ratio: 4 / 3; background: #2a2b2d; }
.hz-cv { width: 100%; height: 100%; display: block; }
.hz-nop { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #d0d0d0; font-size: 14px; }
.hz-draw { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--y); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: var(--sh-2); }
.hz-no { position: absolute; left: 10px; top: 10px; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--y); display: grid; place-items: center; font: 400 18px/1 var(--f-disp); }
.hz-b { padding: 12px 14px 8px; }
.hz-area { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); font-weight: 500; }
.star { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--red); background: var(--red-tone); border-radius: 6px; padding: 1px 8px; }
.hz-t { font-size: 15px; line-height: 1.65; margin-top: 4px; }
.hz-f { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.rk b { font: 600 13px/1 var(--f-mono); }
.rk--hi { background: var(--red); color: #fff; }
.rk--mid { background: var(--y); color: var(--ink); }
.rk--lo { background: #e3e7e4; color: var(--ink); }

.mx-wrap { position: relative; padding: 0 0 26px 28px; }
.mx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; aspect-ratio: 3 / 2; }
.mx-c { border-radius: 8px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; padding: 4px; }
.mx-c--hi { background: #f3b5ae; }
.mx-c--mid { background: var(--y-tone); }
.mx-c--lo { background: #e5e9e6; }
.mx-dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; font: 600 14px/1 var(--f-mono); }
.mx-dot--star { background: var(--ink); color: var(--y); }
.mx-y { position: absolute; left: 0; top: 0; bottom: 26px; writing-mode: vertical-rl; font-size: 13px; font-weight: 700; text-align: center; color: var(--ink2); }
.mx-x { position: absolute; left: 28px; right: 0; bottom: 0; font-size: 13px; font-weight: 700; text-align: center; color: var(--ink2); }
.pt { background: var(--paper); border-radius: var(--r-m); padding: 12px; margin-bottom: 10px; box-shadow: var(--sh-1); border-left: 6px solid transparent; }
.pt--star { border-left-color: var(--red); }
.pt-h { display: flex; gap: 10px; align-items: flex-start; }
.pt-no { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--y); display: grid; place-items: center; font: 400 15px/1 var(--f-disp); flex: none; margin-top: 2px; }
.pt-t { flex: 1; font-size: 15px; line-height: 1.6; }
.pt-star { width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; color: #8b8b86; border: 2px dashed #b9b9b3; flex: none; transition: transform .25s var(--spring); }
.pt-star[aria-pressed="true"] { color: #fff; background: var(--red); border: 2px solid var(--red); transform: rotate(-8deg); }
.pt-lv { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.lv { display: flex; align-items: center; gap: 2px; }
.lv-k { font-size: 13px; font-weight: 700; margin-right: 4px; color: var(--ink2); }
.lv-b { width: 36px; height: 44px; border-radius: 8px; font: 600 15px/1 var(--f-mono); background: #f0f0ec; }
.lv-b.on { background: var(--ink); color: var(--y); }

.ms { background: var(--paper); border-radius: var(--r-l); padding: 14px; margin-bottom: 12px; box-shadow: var(--sh-1); }
.ms-h { display: flex; gap: 10px; font-weight: 700; line-height: 1.55; }
.ms-ht { flex: 1; }
.ms-l { margin: 10px 0 6px; }
.ms-i { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 6px; border-top: 1px dashed var(--line); }
.ms-i:first-child { border-top: 0; }
.ms-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--y); border: 2px solid var(--ink); flex: none; }
.ms-t { flex: 1; font-size: 15px; line-height: 1.55; }
.ms-none { font-size: 14px; color: var(--ink3); padding: 4px 6px; }
.ms-add { display: flex; gap: 8px; margin-top: 6px; }
.ms-add .inp { flex: 1; min-width: 0; }

.goal { background: var(--paper); border-radius: var(--r-l); padding: 16px; box-shadow: var(--sh-1); }
.chantin { display: flex; align-items: stretch; gap: 0; }
.chantin .inp { border-radius: 12px 0 0 12px; flex: 1; min-width: 0; }
.chantin-y { display: grid; place-items: center; padding: 0 14px; background: var(--y); border-radius: 0 12px 12px 0; font: 400 17px/1 var(--f-disp); }
.preview { margin-top: 14px; padding: 14px; border: 3px solid var(--ink); border-radius: 6px; background: #fff; }
.preview-k { font-size: 13px; font-weight: 700; color: var(--ink2); }
.preview-t { font: 400 18px/1.5 var(--f-disp); margin-top: 4px; }

/* ---------- フォーム ---------- */
.form { display: block; }
.form--page { padding: 8px 16px 0; }
.form-lead { font-weight: 700; font-size: 16px; background: var(--y-tone); border-radius: 12px; padding: 10px 14px; }
.fl { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin: 18px 0 8px; }
.req { font-size: 12px; font-weight: 700; color: var(--red); border: 1.5px solid var(--red); border-radius: 6px; padding: 0 6px; line-height: 1.6; }
.inp { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid #c9cac4; border-radius: 12px; background: #fff; font-size: 16px; line-height: 1.5; }
.inp:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--y); }
.inp--area { resize: none; min-height: 96px; }
.inp--err { border-color: var(--red); background: #fff7f6; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.fhelp { font-size: 13px; color: var(--ink3); margin-top: 6px; line-height: 1.5; }
.ferr { font-size: 14px; font-weight: 700; color: var(--red); margin-top: 8px; line-height: 1.5; }
.fnote { font-size: 13px; color: var(--ink2); margin-top: 16px; line-height: 1.6; }
.fnote--c { text-align: center; margin: 20px 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 10px; border: 1.5px solid #a9aaa4; background: #fff; font-size: 14px; font-weight: 500; transition: border-radius .25s var(--spring), background-color .15s; }
.chip .ic { display: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 22px; }
.chip[aria-pressed="true"] .ic { display: inline-block; color: var(--y); }
.phrow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.phbtn { flex: none; width: 88px; height: 88px; border-radius: 14px; border: 2px dashed #8f908a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 700; cursor: pointer; background: #fff; }
.phs { flex: none; width: 88px; height: 88px; border-radius: 14px; overflow: hidden; border: 3px solid transparent; }
.phs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phs[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--y); }
.phprev { position: relative; margin-top: 10px; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: #222; }
.phprev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px; background: #fff; border-radius: 14px; cursor: pointer; }
.sw-row b { display: block; font-size: 15px; }
.sw-s { display: block; font-size: 13px; color: var(--ink3); line-height: 1.5; }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 16px; background: #e2e2dc; border: 2px solid #77776f; position: relative; flex: none; cursor: pointer; transition: background-color .2s; margin: 0; }
.switch::after { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #77776f; transition: all .3s var(--spring); }
.switch:checked { background: var(--ink); border-color: var(--ink); }
.switch:checked::after { left: 22px; top: 2px; width: 24px; height: 24px; background: var(--y); }
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-i { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; cursor: pointer; }
.pick-i input { position: absolute; opacity: 0; }
.pick-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-none { display: grid; place-content: center; justify-items: center; height: 100%; background: #efefea; font-size: 13px; gap: 2px; }
.pick-i:has(input:checked) { box-shadow: inset 0 0 0 4px var(--ink); }
.pick-i:has(input:checked)::after { content: ""; position: absolute; inset: 4px; border: 3px solid var(--y); border-radius: 8px; pointer-events: none; }

/* ---------- ボトムシート ---------- */
.scrim { position: absolute; inset: 0; z-index: 30; background: rgba(10, 10, 5, .5); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet-host { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--board); border-radius: 28px 28px 0 0; box-shadow: var(--sh-3);
  transform: translateY(100%); transition: transform .38s var(--emph);
}
.sheet.on { transform: none; }
.sheet--tall { max-height: 94dvh; }
.sheet-grab { display: grid; place-items: center; height: 24px; cursor: grab; touch-action: none; flex: none; }
.sheet-grab i { width: 36px; height: 4px; border-radius: 2px; background: #8d8d86; }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 20px; flex: none; }
.sheet-t { flex: 1; font: 400 20px/1.3 var(--f-disp); }
.sheet-b { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px calc(24px + var(--sb)); }

/* ---------- 書込みエディタ ---------- */
.ed { padding-bottom: calc(24px + var(--sb)); }
.save { min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--y); color: var(--ink); font-weight: 700; font-size: 15px; margin-right: 4px; }
.save:active { transform: scale(.95); }
.ed-stage { position: relative; margin: 0 0 0; }
.ed-cv { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; cursor: crosshair; background: #2a2b2d; }
.ed-hint { font-size: 14px; color: #e0e0e0; text-align: center; padding: 10px 16px 0; min-height: 34px; }
.ed-pick { padding: 16px; }
.ed-pk { font-weight: 700; margin-bottom: 10px; }
.ed-ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ed-phb { border-radius: 12px; overflow: hidden; background: #333; color: #fff; display: flex; flex-direction: column; font-size: 13px; }
.ed-phb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ed-phb span { padding: 6px; }
.ed-tools { padding: 10px 16px 0; }
.ed-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ed-row--2 { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.tool { min-height: 64px; border-radius: 16px; background: var(--night2); color: #f0f0f0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 700; transition: border-radius .3s var(--spring), background-color .15s; }
.tool.on { background: var(--y); color: var(--ink); border-radius: 28px; }
.sw { display: flex; gap: 10px; }
.sw-b { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #555; transition: transform .25s var(--spring); }
.sw-b--r { background: #e5241b; }
.sw-b--y { background: var(--y); }
.sw-b--w { background: #fff; }
.sw-b.on { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px var(--night), 0 0 0 5px #fff; }
.ed-ops { display: flex; gap: 6px; }
.ed-info { margin: 18px 16px 0; padding: 14px; border-radius: 16px; background: var(--night2); }
.ed-info-k { font-size: 13px; font-weight: 700; color: var(--y); }
.ed-info-t { font-size: 15px; line-height: 1.65; margin-top: 4px; color: #f2f2f2; }
.ed-info .rk { margin-top: 8px; }
.stamps { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; scrollbar-width: none; }
.stp { flex: none; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--night2); color: #fff; font-weight: 700; font-size: 14px; }
.stp.on { background: #fff; color: var(--ink); }

/* ---------- 確認サイン ---------- */
.sgsum { display: flex; align-items: center; gap: 16px; margin: 4px 16px 0; padding: 16px; background: var(--paper); border-radius: var(--r-l); box-shadow: var(--sh-1); }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; position: relative; z-index: 0; }
.ring::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, #fff 76%, transparent 77%), conic-gradient(var(--ink) calc(var(--p) * 1%), #e4e4de 0); }
.ring b { font: 400 30px/1 var(--f-disp); }
.ring span { font: 500 15px/1 var(--f-mono); color: var(--ink2); }
.sgsum-t { font-weight: 700; font-size: 16px; line-height: 1.5; }
.grp { margin: 20px 16px 0; }
.grp-h { font-size: 14px; font-weight: 700; color: var(--ink2); margin: 0 4px 6px; }
.mlist { background: var(--paper); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 68px; border-top: 1px solid #ecece8; }
.mrow:first-child { border-top: 0; }
.ava { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 400 18px/1 var(--f-disp); flex: none; background: #ecece7; }
.ava--元請 { background: var(--ink); color: #fff; }
.ava--鉄骨 { background: var(--y); }
.ava--型枠 { background: #f1dcc0; }
.ava--設備 { background: #d6e2f3; }
.ava--足場 { background: #dfe7dc; }
.ava--lg { width: 56px; height: 56px; font-size: 24px; border-radius: 18px; }
.mrow-b { flex: 1; min-width: 0; }
.mrow-nm { word-break: keep-all; overflow-wrap: normal; }
.mrow-n { font-weight: 700; font-size: 16px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.role { font-size: 12px; font-weight: 700; border: 1.5px solid var(--ink2); color: var(--ink2); border-radius: 6px; padding: 0 5px; line-height: 1.5; }
.mrow-s { font-size: 13px; color: var(--ink3); line-height: 1.45; }
.warn { color: var(--red); font-weight: 700; }
.msig { display: flex; flex-direction: column; align-items: flex-end; }
.msig .sig { width: 76px; height: 30px; }
.msig-at { font: 500 12px/1 var(--f-mono); color: var(--ink3); }
.sgs-who { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.sgs-n { font: 400 22px/1.3 var(--f-disp); }
.sgs-c { font-size: 14px; color: var(--ink3); }
.chk { display: flex; flex-wrap: wrap; gap: 8px; }
.concern { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; line-height: 1.55; cursor: pointer; min-height: 44px; }
.concern input { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin: 1px 0 0; }
.pad-h { display: flex; align-items: center; justify-content: space-between; }
.pad-h .fl { margin-bottom: 4px; }
.pad { position: relative; background: #fff; border-radius: 16px; border: 2px solid var(--ink); aspect-ratio: 5 / 2; overflow: hidden; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; z-index: 2; }
.pad-line { position: absolute; left: 12%; right: 6%; bottom: 26%; border-bottom: 2px dashed #b2b2ab; }
.pad-x { position: absolute; left: 5%; bottom: 23%; font-weight: 700; color: #8a8a84; font-size: 20px; }

/* ---------- ヒヤリハット ---------- */
.hy-top { display: flex; align-items: center; gap: 12px; margin: 4px 16px 0; padding: 14px; background: var(--ink); color: #fff; border-radius: var(--r-xl) var(--r-xl) var(--r-m) var(--r-m); flex-wrap: wrap; }
.pyr { display: flex; align-items: center; gap: 10px; flex: none; }
.pyr svg { width: 112px; height: 84px; }
.pyr-1 { fill: var(--red); }
.pyr-2 { fill: #f08a24; }
.pyr-3 { fill: var(--y); }
.pyr-l { display: grid; gap: 4px; }
.pyr-l li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: #e6e6e6; }
.pyr-l b { font: 400 22px/1 var(--f-disp); color: #fff; min-width: 34px; text-align: right; }
.hy-lead { font-size: 14px; line-height: 1.6; color: #ececec; flex: 1 1 100%; }
.bars { background: var(--paper); border-radius: var(--r-l); padding: 12px 14px; box-shadow: var(--sh-1); display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr auto; align-items: center; gap: 10px; }
.bar-k { font-size: 14px; line-height: 1.35; }
.bar-t { height: 14px; background: #ececE7; border-radius: 7px; overflow: hidden; }
.bar-t i { display: block; height: 100%; background: var(--ink); border-radius: 7px; }
.bar:first-child .bar-t i { background: var(--y-deep); }
.bar-v { font: 600 14px/1 var(--f-mono); }
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 22px 16px 4px; scrollbar-width: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #9b9c96; background: #fff; font-size: 14px; font-weight: 500; transition: border-radius .25s var(--spring); }
.fchip.on { background: var(--y-tone); border-color: var(--ink); border-radius: 22px; font-weight: 700; }
.tickets { padding: 8px 16px 0; display: grid; gap: 10px; }
.tk { display: flex; gap: 12px; background: var(--paper); border-radius: var(--r-m) var(--r-l) var(--r-l) var(--r-m); padding: 12px 12px 12px 14px; box-shadow: var(--sh-1); border-left: 8px solid var(--red); align-items: stretch; transition: transform .2s var(--spring); }
.tk:active { transform: scale(.98); }
.tk--doing { border-left-color: var(--y-deep); }
.tk--done { border-left-color: var(--yoshi); }
.tk-b { flex: 1; min-width: 0; }
.tk-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tk-d { font: 500 13px/1.4 var(--f-mono); color: var(--ink2); }
.tk-c { font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 7px; line-height: 1.6; }
.tk-s { font-size: 12px; font-weight: 700; color: var(--red); line-height: 1.6; }
.tk--doing .tk-s, .tk-s--doing { color: #7a5600; }
.tk--done .tk-s, .tk-s--done { color: var(--yoshi); }
.tk-t { font-size: 15px; line-height: 1.6; margin-top: 4px; }
.tk-a { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink3); margin-top: 4px; }
.tk-img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex: none; align-self: center; }
.hy-ph { height: 240px; background-size: cover; background-position: center; margin: 0 16px; border-radius: var(--r-xl); }
.hy-d { padding: 14px 16px 0; }
.dl { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px 12px; background: var(--paper); border-radius: var(--r-l); padding: 14px; margin-top: 10px; box-shadow: var(--sh-1); }
.dl dt { font-size: 13px; font-weight: 700; color: var(--ink2); line-height: 1.6; }
.dl dd { font-size: 15px; line-height: 1.6; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.seg-b { min-height: 48px; background: #fff; border: 1.5px solid #9b9c96; border-radius: 8px; font-weight: 700; font-size: 15px; transition: border-radius .3s var(--spring); }
.seg-b:first-child { border-radius: 24px 8px 8px 24px; }
.seg-b:last-child { border-radius: 8px 24px 24px 8px; }
.seg-b.on { background: var(--ink); color: var(--y); border-color: var(--ink); border-radius: 24px; }
.done { padding: 24px 20px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.done-badge { width: 96px; height: 96px; border-radius: 32px; background: var(--yoshi); color: #fff; display: grid; place-items: center; animation: pop .5s var(--spring) both; }
.done-badge .ic { width: 52px; height: 52px; }
.done-t { font: 400 26px/1.35 var(--f-disp); margin-top: 18px; }
.done-p { margin-top: 8px; }
.done-card { width: 100%; text-align: left; background: #fff; border-radius: 16px; padding: 14px; margin-top: 18px; box-shadow: var(--sh-1); }

/* ---------- 履歴 ---------- */
.nadays { margin: 4px 16px 0; padding: 18px 18px 16px; background: var(--y); border-radius: var(--r-xl); position: relative; overflow: hidden; }
.nadays::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .35); }
.nadays-k { font-weight: 700; font-size: 15px; }
.nadays-v { display: flex; align-items: baseline; gap: 6px; line-height: 1; margin-top: 6px; }
.nadays-v b { font: 400 76px/1 var(--f-disp); letter-spacing: -.02em; }
.nadays-v span { font: 400 26px/1 var(--f-disp); }
.nadays-bar { position: relative; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .14); margin-top: 16px; }
.nadays-bar i { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.nadays-bar span { position: absolute; top: -5px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }
.nadays-s { font-size: 14px; font-weight: 500; margin-top: 10px; }
.todo { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 12px 12px 12px 14px; border: 2px dashed var(--ink); border-radius: var(--r-l); background: #fff; }
.todo-d { display: grid; justify-items: center; width: 44px; }
.todo-d b { font: 400 24px/1 var(--f-disp); }
.todo-d span { font-size: 12px; }
.todo-t { flex: 1; font-weight: 700; word-break: keep-all; overflow-wrap: normal; }
.hist { margin: 18px 16px 0; position: relative; }
.hist::before { content: ""; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.hist li + li { margin-top: 10px; }
.hrow { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.hrow-d { width: 64px; flex: none; display: grid; justify-items: center; background: var(--board); padding: 6px 0; position: relative; z-index: 1; }
.hrow-d b { width: 48px; height: 48px; border-radius: 16px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 400 22px/1 var(--f-disp); }
.hrow-d span { font-size: 12px; font-weight: 500; margin-top: 4px; color: var(--ink2); white-space: nowrap; }
.hrow-b { flex: 1; min-width: 0; background: var(--paper); border-radius: var(--r-m) var(--r-l) var(--r-l) var(--r-l); padding: 12px 14px; box-shadow: var(--sh-1); display: grid; gap: 4px; transition: transform .2s var(--spring); }
.hrow:active .hrow-b { transform: scale(.98); }
.hrow-g { font-weight: 700; font-size: 15px; line-height: 1.55; }
.hrow-c { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.hrow-m { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 13px/1.5 var(--f-mono); color: var(--ink2); align-items: center; }
.hrow-m .ic { margin-right: 2px; vertical-align: -3px; }
.hrow-h { color: var(--red); font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 16px 0; }
.facts div { background: var(--paper); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); }
.facts dt { font-size: 12px; font-weight: 700; color: var(--ink3); }
.facts dd { font-weight: 700; font-size: 15px; line-height: 1.45; }
.hsigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hs { background: var(--paper); border-radius: 12px; padding: 8px; display: grid; justify-items: center; box-shadow: var(--sh-1); }
.hs-s { height: 36px; display: grid; place-items: center; }
.hs .sig { width: 84px; height: 34px; }
.hs-n { font-size: 12px; color: var(--ink2); }
.hs-ab { font-size: 12px; color: var(--ink3); }
.hs--no { background: #ecece7; }

/* ---------- 設定・アプリについて ---------- */
.set { margin: 14px 16px 0; }
.set-h { font-size: 14px; font-weight: 700; color: var(--ink2); margin: 14px 4px 6px; }
.set-l { background: var(--paper); border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden; }
.set-i { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; border-top: 1px solid #ecece8; width: 100%; text-align: left; }
.set-l > li:first-child > .set-i, .set-l > .set-i:first-child { border-top: 0; }
.set-k { font-weight: 700; flex: none; font-size: 15px; }
.set-v { flex: 1; text-align: right; font-size: 14px; color: var(--ink2); line-height: 1.5; }
.set-btn .set-k { flex: 1; }
.set-btn .set-v { flex: none; }
.about { padding: 16px 20px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-ic { border-radius: 24px; box-shadow: var(--sh-2); }
.about-n { font: 400 28px/1.3 var(--f-disp); margin-top: 12px; }
.about-v { font-size: 14px; color: var(--ink3); }
.about-p { text-align: left; margin-top: 18px; background: #fff; padding: 14px; border-radius: 14px; line-height: 1.7; }
.about .set-h { align-self: flex-start; margin-top: 20px; }
.tech { align-self: stretch; text-align: left; display: grid; gap: 6px; }
.tech li { background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 14px; border-left: 4px solid var(--y); }

/* ---------- 空・エラー ---------- */
.empty { text-align: center; padding: 8px 8px 16px; display: flex; flex-direction: column; align-items: center; }
.empty-img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--r-l); }
.empty-t { font: 400 18px/1.4 var(--f-disp); margin-top: 14px; }
.empty-p { margin-top: 6px; font-size: 14px; line-height: 1.65; color: var(--ink2); }
.empty .tonal { margin-top: 12px; }
.empty--sm { background: #fff; border-radius: 16px; padding: 18px; }
.empty--dark { color: #fff; padding-top: 40px; }
.empty--dark .empty-p { color: #e0e0e0; }
.err { padding: 30vh 24px 0; text-align: center; }
.err-t { font: 400 20px/1.4 var(--f-disp); }
.err-p { margin: 8px 0 16px; }

/* ---------- スナックバー・ダイアログ ---------- */
.snack {
  position: absolute; left: 12px; right: 12px; bottom: calc(96px + var(--sb)); z-index: 50;
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px 6px 16px;
  background: #262624; color: #f4f4f0; border-radius: 12px; box-shadow: var(--sh-3);
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .3s var(--spring), opacity .2s;
}
.bare .snack { bottom: calc(16px + var(--sb)); }
.snack.on { transform: none; opacity: 1; pointer-events: auto; }
.snack-t { flex: 1; font-size: 14px; line-height: 1.5; }
.snack-a { color: var(--y); font-weight: 700; min-height: 44px; padding: 0 10px; border-radius: 8px; flex: none; }
.dlg-wrap { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(10, 10, 5, .5); opacity: 0; transition: opacity .18s; }
.dlg-wrap.on { opacity: 1; }
.dlg { background: #fffbe6; border-radius: 28px; padding: 24px 20px 14px; width: 100%; max-width: 340px; transform: scale(.92); transition: transform .3s var(--spring); }
.dlg-wrap.on .dlg { transform: none; }
.dlg-t { font: 400 20px/1.4 var(--f-disp); }
.dlg-p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--ink2); }
.dlg-a { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--night); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; transition: opacity .28s; }
.splash.out { opacity: 0; }
.splash img { border-radius: 24px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.splash-n { font: 400 30px/1.2 var(--f-disp); margin-top: 8px; letter-spacing: .06em; }
.splash-s { font-size: 14px; color: #dcdcdc; }
.onb { position: absolute; inset: 0; z-index: 80; background: var(--night) center / cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 16px calc(20px + var(--sb)); transition: opacity .25s; }
.onb.out { opacity: 0; }
.onb-skip { position: absolute; top: calc(12px + var(--st)); right: 12px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 700; }
.onb-card { background: var(--paper); border-radius: var(--r-xl); padding: 22px 20px 18px; animation: inPush .45s var(--emph) both; }
.onb-k { font: 500 13px/1 var(--f-mono); color: var(--ink2); }
.onb-t { font: 400 26px/1.4 var(--f-disp); margin-top: 10px; }
.onb-p { margin-top: 10px; line-height: 1.7; }
.onb-dots { display: flex; gap: 6px; margin-top: 16px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: #c9c9c3; transition: width .3s var(--spring); }
.onb-dots i.on { width: 28px; background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
@media (max-width: 370px) {
  .bar { grid-template-columns: 8em 1fr auto; }
  .wx-k { font-size: 11px; }
}
