/* ==========================================================
   ゆい総合サービス 現場アプリ — app.css
   色・書体はホームページ（style.css）と同じ変数を使う。
   スマホ優先。手袋でも押せる大きさ（最小 52px）を基準にする。
   ========================================================== */
:root {
  --ink: #111317;
  --ink-2: #1a1d23;
  --ink-3: #262a32;
  --ink-4: #333843;
  --paper: #f3efe7;
  --paper-2: #e8e1d4;
  --paper-3: #ddd4c3;
  --white: #fffdf8;
  --text: #1c1d20;
  --muted: #6b675f;
  --muted-2: #8c877d;
  --line: rgba(17, 19, 23, .10);
  --line-2: rgba(17, 19, 23, .16);
  --line-light: rgba(255, 253, 248, .14);
  --orange: #ee6a1f;
  --orange-2: #ff8a3d;
  --orange-soft: #fde7d9;
  --red: #d7262e;
  --red-soft: #fbe1e2;
  --green: #2c8a5a;
  --green-soft: #dcefe4;
  --blue: #2a6f97;
  --blue-soft: #dceaf2;
  --amber: #c98a12;
  --amber-soft: #f8ebcc;

  --f-mincho: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --f-gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --f-en: "Bebas Neue", "Oswald", Impact, sans-serif;

  --r: 18px;
  --r-sm: 12px;
  --r-lg: 26px;
  --shadow-1: 0 1px 2px rgba(17,19,23,.06), 0 2px 8px rgba(17,19,23,.05);
  --shadow-2: 0 2px 6px rgba(17,19,23,.08), 0 12px 32px rgba(17,19,23,.10);
  --shadow-3: 0 10px 30px rgba(17,19,23,.18), 0 30px 80px rgba(17,19,23,.22);
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .5, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 74px;
  --top-h: 60px;
  --side-w: 272px;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-gothic);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* 塗膜のような細かい粒子（ホームページと同じ） */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 900; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.en { font-family: var(--f-en); letter-spacing: .06em; font-weight: 400; }
.mincho { font-family: var(--f-mincho); }
.muted { color: var(--muted); }
.num { font-family: var(--f-en); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.xl { width: 34px; height: 34px; }

/* ---------- 起動画面 ---------- */
.boot {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: var(--ink); color: var(--white); transition: opacity .5s var(--ease), visibility .5s;
}
.boot.out { opacity: 0; visibility: hidden; }
.boot__in { display: grid; justify-items: center; gap: 18px; }
.boot__mark { width: 84px; height: 84px; }
.boot__mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: stroke .7s var(--ease) forwards; }
.boot__mark path:nth-child(2) { animation-delay: .16s; }
.boot__mark path:nth-child(3) { animation-delay: .32s; }
.boot__name { font-family: var(--f-en); font-size: 15px; letter-spacing: .32em; opacity: .7; }
@keyframes stroke { to { stroke-dashoffset: 0; } }

/* ---------- レイアウト ---------- */
.app { min-height: 100dvh; }
.main { min-height: 100dvh; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
.page { padding: 8px 16px 0; max-width: 560px; margin: 0 auto; animation: pageIn .42s var(--ease) both; }
.page--wide { max-width: 1180px; }
.page--flush { padding: 0; max-width: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 画面切り替え時に塗料が横切る（ホームページのヒーローと同じ演出） */
.swipe { position: fixed; inset: 0; z-index: 800; pointer-events: none; transform: translateX(-102%); }
.swipe.go { animation: swipe .62s var(--ease) forwards; }
@keyframes swipe { 0% { transform: translateX(-102%); } 48% { transform: translateX(0); } 100% { transform: translateX(102%); } }

/* ---------- 上部バー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(243, 239, 231, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar__title { flex: 1; min-width: 0; }
.topbar__title h1 { font-size: 18px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__title small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .12em; line-height: 1.3; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  color: var(--ink); transition: background .2s, transform .15s;
}
.iconbtn:active { transform: scale(.92); }
.iconbtn:hover { background: rgba(17,19,23,.06); }
.iconbtn--ink { background: var(--ink); color: var(--white); }
.iconbtn--ink:hover { background: var(--ink-3); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__txt b { display: block; font-size: 15px; letter-spacing: .14em; line-height: 1.15; }
.brand__txt span { display: block; font-family: var(--f-en); font-size: 11px; letter-spacing: .26em; color: var(--muted); line-height: 1.2; }

/* ---------- 下部タブ ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(255, 253, 248, .92);
  backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(17,19,23,.05);
}
.tab {
  height: 100%; display: grid; justify-items: center; align-content: center; gap: 3px;
  color: var(--muted-2); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; position: relative;
  transition: color .2s;
}
.tab svg.i { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on::before {
  content: ""; position: absolute; top: 7px; width: 22px; height: 3px; border-radius: 3px; background: var(--orange);
}
.tab--fab { align-content: start; }
.fab {
  width: 64px; height: 64px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--white);
  background: radial-gradient(circle at 30% 25%, var(--orange-2), var(--orange) 60%, #d4560e);
  box-shadow: 0 10px 24px rgba(238,106,31,.45), 0 0 0 6px var(--paper), inset 0 -3px 0 rgba(0,0,0,.12);
  transition: transform .2s var(--ease-spring);
}
.fab svg.i { width: 30px; height: 30px; stroke-width: 2; }
.tab--fab:active .fab { transform: scale(.9); }
.tab--fab span { margin-top: 4px; color: var(--ink); }

/* ---------- PC：左メニュー ---------- */
.side { display: none; }
@media (min-width: 1100px) {
  .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .tabbar { display: none; }
  .main { padding-bottom: 48px; }
  .page { padding: 12px 40px 0; max-width: 720px; }
  .page--wide { max-width: 1240px; }
  .topbar { padding: 18px 40px 14px; }
  .topbar .iconbtn[data-act="back"] { display: none; }
  .topbar .brand { visibility: hidden; } /* PCでは左メニューにロゴがあるので二重に出さない */
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
    background: var(--ink); color: var(--white); padding: 26px 18px 20px; gap: 6px; overflow-y: auto;
  }
  .side .brand__txt span { color: var(--muted-light, #a9a49a); }
  .side__group { margin: 18px 10px 6px; font-family: var(--f-en); font-size: 12px; letter-spacing: .28em; color: rgba(255,253,248,.42); }
  .side__item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: rgba(255,253,248,.78); font-weight: 500; font-size: 14px; transition: background .2s, color .2s;
  }
  .side__item:hover { background: rgba(255,253,248,.06); color: var(--white); }
  .side__item.on { background: rgba(255,253,248,.10); color: var(--white); }
  .side__item.on svg.i { color: var(--orange); }
  .side__item .pl { margin-left: auto; font-family: var(--f-en); font-size: 11px; letter-spacing: .14em; padding: 0 7px; border-radius: 6px; background: rgba(238,106,31,.18); color: #ffb084; }
  .side__foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line-light); font-size: 11px; color: rgba(255,253,248,.45); line-height: 1.7; }
  .side__phone {
    margin: 14px 4px 0; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(238,106,31,.22), rgba(215,38,46,.14)); border: 1px solid rgba(238,106,31,.35);
    color: var(--white); text-align: left; font-size: 13px; line-height: 1.5;
  }
  .side__phone b { display: block; font-size: 14px; }
}

/* ---------- カード・汎用 ---------- */
.card { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.card + .card, .card + .sec, .sec + .card, .sec + .sec { margin-top: 14px; }
.card__pad { padding: 18px; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card__head h2, .sec__head h2 { font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.card__head .link, .sec__head .link { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--orange); display: inline-flex; align-items: center; gap: 2px; }
.sec { margin-top: 22px; }
.sec__head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.sec__head .en { font-size: 13px; letter-spacing: .24em; color: var(--orange); }
.eyebrow { font-family: var(--f-en); font-size: 13px; letter-spacing: .26em; color: var(--orange); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.note { font-size: 12px; color: var(--muted); line-height: 1.7; }
.note--box { background: var(--paper-2); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; }
.note--box svg.i { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.hide { display: none !important; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; font-weight: 700; letter-spacing: .08em; font-size: 15px;
  transition: transform .15s, background .2s, box-shadow .2s, opacity .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 18px rgba(238,106,31,.32), inset 0 -2px 0 rgba(0,0,0,.12); }
.btn--primary:hover { background: #f27526; }
.btn--ink { background: var(--ink); color: var(--white); box-shadow: 0 8px 18px rgba(17,19,23,.22); }
.btn--ghost { background: var(--white); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn--soft { background: var(--paper-2); color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- チップ ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; scroll-snap-align: start;
  min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--white); border: 1.5px solid var(--line-2); color: var(--ink); white-space: nowrap; transition: all .18s;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .cnt { font-family: var(--f-en); font-size: 13px; opacity: .6; letter-spacing: .04em; }
.chip--done { border-color: rgba(44,138,90,.35); }
.chip--done::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chip.on.chip--done::after { background: #6fdc9f; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink); line-height: 1.6; white-space: nowrap; }
.tag--o { background: var(--orange-soft); color: #b04a0d; }
.tag--g { background: var(--green-soft); color: #1d6a43; }
.tag--r { background: var(--red-soft); color: #a3161d; }
.tag--b { background: var(--blue-soft); color: #1d5677; }
.tag--a { background: var(--amber-soft); color: #8a5c00; }
.tag--ink { background: var(--ink); color: var(--white); }

/* ---------- ホーム ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); color: var(--white);
  background: var(--ink); padding: 20px 20px 18px; box-shadow: var(--shadow-2); isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: auto -20% -60% 30%; height: 220px; z-index: -1;
  background: radial-gradient(closest-side, rgba(238,106,31,.55), transparent); filter: blur(10px);
}
.hero__strokes { position: absolute; right: -6px; top: 18px; width: 130px; opacity: .9; z-index: -1; }
.hero__date { font-family: var(--f-en); font-size: 14px; letter-spacing: .24em; color: rgba(255,253,248,.6); }
.hero__hello { font-size: 21px; font-weight: 700; margin-top: 2px; letter-spacing: .06em; }
.hero__hello small { font-size: 13px; font-weight: 500; color: rgba(255,253,248,.7); margin-left: 4px; }
.wx { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(255,253,248,.07); border: 1px solid var(--line-light); }
.wx__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,253,248,.08); }
.wx__icon svg.i { width: 30px; height: 30px; }
.wx__main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wx__t { font-family: var(--f-en); font-size: 38px; line-height: 1; letter-spacing: .02em; }
.wx__t small { font-size: 18px; margin-left: 2px; opacity: .7; }
.wx__sub { font-size: 12px; color: rgba(255,253,248,.7); line-height: 1.5; }
.wx__judge { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line-light); font-size: 13px; }
.judge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .08em; }
.judge--ok { background: rgba(44,138,90,.22); color: #8ff0bb; }
.judge--ng { background: rgba(215,38,46,.25); color: #ffb3b6; }
.judge--warn { background: rgba(201,138,18,.25); color: #ffd98a; }
.judge i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.judge--ok i { animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(143,240,187,.5); } 50% { box-shadow: 0 0 0 6px rgba(143,240,187,0); } }

.mods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mod {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 152px;
  padding: 16px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  text-align: left; transition: transform .2s var(--ease), box-shadow .2s;
}
.mod:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mod:active { transform: scale(.97); }
.mod__ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--white); background: var(--c, var(--ink)); box-shadow: 0 8px 16px -6px var(--c, var(--ink)); }
.mod__ic svg.i { width: 24px; height: 24px; }
.mod b { font-size: 15.5px; letter-spacing: .06em; line-height: 1.35; }
.mod p { font-size: 12px; color: var(--muted); line-height: 1.55; }
.mod__pl { position: absolute; top: 14px; right: 14px; font-family: var(--f-en); font-size: 11px; letter-spacing: .16em; color: var(--muted-2); }
.mod__badge { position: absolute; top: 12px; right: 12px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.mod--hero { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; background: var(--ink); color: var(--white); border-color: var(--ink); }
.mod--hero p { color: rgba(255,253,248,.65); }
.mod--hero .mod__ic { width: 58px; height: 58px; border-radius: 18px; }
.mod--hero .mod__ic svg.i { width: 30px; height: 30px; }
.mod--hero .go { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,253,248,.08); }
.mod--off { opacity: .45; }
@media (min-width: 720px) { .mods { grid-template-columns: repeat(3, 1fr); } }

/* 進行中の現場カード（横スクロール） */
.hs { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; }
.hs::-webkit-scrollbar { display: none; }
.sitecard {
  flex: 0 0 82%; max-width: 340px; scroll-snap-align: start; border-radius: var(--r); overflow: hidden;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-align: left;
}
.sitecard__img { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2) center / cover no-repeat; }
.sitecard__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(17,19,23,.65)); }
.sitecard__no { position: absolute; left: 12px; top: 12px; z-index: 1; }
.sitecard__ttl { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; color: var(--white); }
.sitecard__ttl b { display: block; font-size: 16px; letter-spacing: .06em; line-height: 1.35; }
.sitecard__ttl span { font-size: 12px; opacity: .85; }
.sitecard__body { padding: 12px 14px 14px; }

/* ---------- 工程ステッパー ---------- */
.stepper { display: flex; gap: 3px; margin: 10px 0 6px; }
.stepper i { flex: 1; height: 6px; border-radius: 3px; background: var(--paper-2); position: relative; }
.stepper i.done { background: var(--ink); }
.stepper i.now { background: var(--orange); }
.stepper i.now::after { content: ""; position: absolute; inset: -3px; border-radius: 6px; border: 2px solid rgba(238,106,31,.35); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stepper-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.stepper-lbl b { color: var(--ink); }

/* 3回塗りメーター（ロゴの3本線） */
.coat { display: grid; gap: 4px; width: 46px; }
.coat i { height: 6px; border-radius: 3px; background: var(--paper-2); transition: background .4s var(--ease), width .4s var(--ease); }
.coat i:nth-child(1) { width: 100%; }
.coat i:nth-child(2) { width: 78%; }
.coat i:nth-child(3) { width: 54%; }
.coat i.on:nth-child(1) { background: var(--orange); }
.coat i.on:nth-child(2) { background: var(--red); }
.coat i.on:nth-child(3) { background: var(--ink); }
.coatgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coatcell { background: var(--paper); border-radius: 12px; padding: 10px; display: grid; gap: 8px; justify-items: start; }
.coatcell b { font-size: 12.5px; letter-spacing: .08em; }
.coatcell small { font-size: 11px; color: var(--muted); }

/* ---------- リスト ---------- */
.list { background: var(--white); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 60px; position: relative; width: 100%; text-align: left; }
.li + .li { border-top: 1px solid var(--line); }
button.li:active, a.li:active { background: var(--paper); }
.li__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); flex: none; }
.li__body { flex: 1; min-width: 0; }
.li__body b { display: block; font-size: 14.5px; letter-spacing: .04em; line-height: 1.4; }
.li__body span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.li__body span.tag { display: inline-flex; color: var(--ink); }
.li__end { margin-left: auto; text-align: right; flex: none; }
.li .chev { color: var(--muted-2); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.check.on { background: var(--green); border-color: var(--green); color: #fff; }
.check.on svg.i { width: 16px; height: 16px; stroke-width: 3; }
.check.miss { border-color: var(--red); border-style: dashed; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 700; font-size: 14px; background: var(--c, var(--ink)); border: 2px solid var(--white);
}
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -10px; }
.avatar--lg { width: 52px; height: 52px; font-size: 20px; }

/* ---------- 出退勤 ---------- */
.clock {
  border-radius: var(--r-lg); background: var(--ink); color: var(--white); padding: 22px 20px 20px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-2); isolation: isolate;
}
.clock::before { content: ""; position: absolute; left: -30%; top: -50%; width: 120%; height: 160%; z-index: -1; background: radial-gradient(closest-side, var(--glow, rgba(238,106,31,.25)), transparent 70%); }
.clock__who { display: flex; align-items: center; gap: 12px; }
.clock__who b { font-size: 17px; letter-spacing: .08em; display: block; line-height: 1.3; }
.clock__who span { font-size: 12px; color: rgba(255,253,248,.62); }
.clock__time { font-family: var(--f-en); font-size: 76px; line-height: .95; letter-spacing: .02em; margin: 18px 0 2px; font-variant-numeric: tabular-nums; }
.clock__time small { font-size: 30px; opacity: .45; margin-left: 4px; }
.clock__date { font-size: 13px; color: rgba(255,253,248,.62); letter-spacing: .12em; }
.state { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 14px 6px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .1em; background: rgba(255,253,248,.08); }
.state i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc, #a9a49a); box-shadow: 0 0 12px var(--sc, transparent); }
.siteSel { margin-top: 16px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: rgba(255,253,248,.07); border: 1px solid var(--line-light); text-align: left; color: var(--white); }
.siteSel b { display: block; font-size: 14.5px; letter-spacing: .04em; }
.siteSel span { font-size: 11.5px; color: rgba(255,253,248,.6); }
.geo { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(44,138,90,.25); color: #9ff0c4; margin-top: 4px; }
.punches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.punch {
  min-height: 92px; border-radius: 20px; display: grid; place-items: center; align-content: center; gap: 4px;
  font-weight: 700; font-size: 17px; letter-spacing: .14em; color: var(--white); background: var(--pc, var(--ink-3));
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 10px 20px -10px var(--pc, #000); transition: transform .15s, opacity .2s, filter .2s;
}
.punch small { font-family: var(--f-en); font-size: 12px; letter-spacing: .3em; opacity: .75; font-weight: 400; }
.punch:active { transform: scale(.96); }
.punch[disabled] { opacity: .28; filter: grayscale(1); pointer-events: none; box-shadow: none; }
.punch--in { --pc: #2c8a5a; grid-column: 1 / -1; min-height: 108px; font-size: 22px; }
.punch--out { --pc: var(--red); }
.punch--break { --pc: #5c6470; }
.punch--back { --pc: var(--blue); }
.punch--rain { --pc: #3d5a80; grid-column: 1 / -1; min-height: 60px; font-size: 15px; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 10px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--paper-2); }
.tl { position: relative; padding: 8px 0; display: flex; gap: 10px; align-items: baseline; }
.tl::before { content: ""; position: absolute; left: -20px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--tc, var(--ink)); }
.tl b { font-family: var(--f-en); font-size: 20px; letter-spacing: .04em; width: 56px; flex: none; }
.tl span { font-size: 13.5px; }
.tl small { font-size: 11.5px; color: var(--muted); margin-left: auto; }

/* ---------- 表 ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--white); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.tbl th { text-align: left; font-weight: 700; font-size: 11.5px; letter-spacing: .1em; color: var(--muted); padding: 11px 14px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { font-size: 16px; }

/* ---------- セグメント・タブ ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; border-radius: 16px; background: var(--paper-2); }
.seg > a { display: grid; }
.seg button { width: 100%; white-space: nowrap; min-height: 42px; border-radius: 12px; font-weight: 700; font-size: 13.5px; letter-spacing: .06em; color: var(--muted); transition: all .2s; }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- 写真グリッド ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 720px) { .ph-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; } }
@media (min-width: 1100px) { .ph-grid { grid-template-columns: repeat(6, 1fr); } }
.ph { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--paper-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.ph:hover img { transform: scale(1.04); }
.ph__lbl { position: absolute; left: 5px; bottom: 5px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(17,19,23,.72); color: #fff; letter-spacing: .04em; backdrop-filter: blur(4px); }
.ph__star { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(17,19,23,.6); color: #ffc46b; }
.ph__star svg.i { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.ph__new { position: absolute; left: 5px; top: 5px; font-family: var(--f-en); font-size: 11px; letter-spacing: .12em; padding: 0 6px; border-radius: 5px; background: var(--orange); color: #fff; }
.ph__pend { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(17,19,23,.45); color: #fff; font-size: 11px; font-weight: 700; }
.ph.sel::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--orange); border-radius: 6px; }
.daygrp { margin-top: 18px; }
.daygrp h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; margin: 0 2px 8px; display: flex; gap: 10px; align-items: baseline; }
.daygrp h3 small { color: var(--muted); font-weight: 500; }

/* ---------- ボトムシート ---------- */
.scrim { position: fixed; inset: 0; z-index: 300; background: rgba(17,19,23,.48); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 310; max-height: 92dvh; overflow: auto;
  background: var(--paper); border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  transform: translateY(105%); transition: transform .42s var(--ease); box-shadow: var(--shadow-3);
}
.sheet.on { transform: none; }
.sheet__grab { width: 44px; height: 5px; border-radius: 3px; background: var(--paper-3); margin: 0 auto 12px; }
.sheet__title { font-size: 18px; font-weight: 700; letter-spacing: .06em; margin-bottom: 4px; }
.sheet__sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); border-radius: 26px; transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .35s var(--ease), opacity .25s; padding-bottom: 22px; }
  .sheet.on { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grab { display: none; }
}

/* ---------- 入力 ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--white);
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(238,106,31,.14); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--paper-3); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .25s var(--ease-spring); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- トースト ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 12px); z-index: 950; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 440px); padding: 12px 18px 12px 14px; border-radius: 16px;
  background: var(--ink); color: var(--white); font-weight: 700; font-size: 14px; letter-spacing: .04em; box-shadow: var(--shadow-3);
  animation: toastIn .45s var(--ease-spring) both;
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast svg.i { color: #8ff0bb; }
.toast--warn svg.i { color: #ffd98a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- カメラ ---------- */
.cam { position: fixed; inset: 0; z-index: 400; background: #000; color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.cam__top { position: relative; z-index: 3; padding: calc(var(--safe-t) + 8px) 12px 10px; background: linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,.35)); }
.cam__bar { display: flex; align-items: center; gap: 8px; }
.cam__bar .iconbtn { color: #fff; background: rgba(255,255,255,.1); }
.cam__site { flex: 1; min-width: 0; }
.cam__site b { display: block; font-size: 14px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam__site span { font-size: 11px; opacity: .7; letter-spacing: .1em; }
.cam .chips--scroll { margin: 10px -12px 0; padding: 0 12px 2px; }
.cam .chip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); color: #fff; min-height: 38px; backdrop-filter: blur(6px); }
.cam .chip.on { background: var(--orange); border-color: var(--orange); }
.cam .chip--done::after { background: #6fdc9f; }
.cam__shots { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -12px 0; padding: 0 12px; }
.cam__shots::-webkit-scrollbar { display: none; }
.shot { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 10px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); border: 1.5px dashed rgba(255,255,255,.28); color: rgba(255,255,255,.85); }
.shot i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.5); font-style: normal; font-size: 10px; }
.shot.done { border-style: solid; border-color: rgba(111,220,159,.5); color: #b9f5d2; }
.shot.done i { background: #2c8a5a; border-color: #2c8a5a; }
.shot.on { border-style: solid; border-color: var(--orange); background: rgba(238,106,31,.22); color: #fff; }
.cam__view { position: relative; overflow: hidden; background: #0b0c0e; }
.cam__view video, .cam__view .cam__still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam__ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; mix-blend-mode: screen; pointer-events: none; transition: opacity .2s; }
.cam__ghostlbl { position: absolute; left: 12px; top: 12px; z-index: 2; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: rgba(238,106,31,.85); letter-spacing: .06em; }
.cam__grid { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.cam__level { position: absolute; left: 50%; top: 50%; width: 120px; height: 2px; margin-left: -60px; background: rgba(255,255,255,.7); z-index: 2; transition: transform .1s linear, background .2s; border-radius: 2px; }
.cam__level.ok { background: #6fdc9f; box-shadow: 0 0 10px #6fdc9f; }
.cam__empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 1; }
.cam__empty p { font-size: 13px; opacity: .8; margin: 10px 0 18px; line-height: 1.7; }
.board {
  position: absolute; z-index: 3; left: 12px; bottom: 12px; width: 52%; max-width: 250px; touch-action: none; cursor: grab;
  background: #1e4d36; border: 3px solid #c9b48a; border-radius: 4px; color: #fff; font-size: 9.5px; line-height: 1.3;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.board table { width: 100%; border-collapse: collapse; }
.board th, .board td { border: 1px solid rgba(255,255,255,.55); padding: 2px 5px; text-align: left; font-weight: 500; vertical-align: top; }
.board th { width: 30%; white-space: nowrap; font-weight: 700; }
.board td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.cam__tools { position: absolute; right: 10px; top: 10px; z-index: 4; display: grid; gap: 22px; }
.tool { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); position: relative; }
.tool.on { background: rgba(238,106,31,.9); border-color: transparent; }
.tool small { position: absolute; bottom: -15px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.ghostRange { position: absolute; left: 12px; top: 44px; z-index: 4; width: 150px; accent-color: var(--orange); }
.cam__bottom { position: relative; z-index: 3; padding: 14px 18px calc(18px + var(--safe-b)); background: linear-gradient(0deg, rgba(0,0,0,.9), rgba(0,0,0,.55)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.shutter { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; border: 5px solid rgba(255,255,255,.92); transition: transform .12s; }
.shutter i { width: 64px; height: 64px; border-radius: 50%; background: #fff; transition: transform .12s, background .2s; }
.shutter:active i { transform: scale(.86); background: var(--orange); }
.tray { justify-self: start; display: flex; align-items: center; gap: 10px; }
.tray__thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; border: 2px solid #fff; background: #222; position: relative; }
.tray__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tray__n { position: absolute; right: -6px; top: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--orange); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; border: 2px solid #000; }
.cam__send { justify-self: end; }
.cam__send .btn { min-height: 52px; border-radius: 26px; padding: 0 18px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 5; pointer-events: none; }
.flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.cam__hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); white-space: nowrap; }

/* 送信の進捗 */
.send { position: fixed; inset: 0; z-index: 450; display: grid; place-items: center; background: rgba(17,19,23,.82); backdrop-filter: blur(8px); color: #fff; }
.send__box { width: min(340px, 86vw); text-align: center; }
.send__ring { width: 96px; height: 96px; margin: 0 auto 18px; }
.send__ring circle { fill: none; stroke-width: 6; }
.send__ring .bg { stroke: rgba(255,255,255,.12); }
.send__ring .fg { stroke: var(--orange); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .35s var(--ease); }
.send__ring .ok { stroke: #6fdc9f; stroke-width: 6; stroke-dasharray: 60; stroke-dashoffset: 60; }
.send.done .send__ring .ok { animation: check .45s var(--ease) forwards; }
@keyframes check { to { stroke-dashoffset: 0; } }
.send__list { text-align: left; margin-top: 16px; display: grid; gap: 6px; font-size: 12.5px; }
.send__list div { display: flex; gap: 8px; align-items: center; opacity: .35; transition: opacity .3s; }
.send__list div.on { opacity: 1; }
.send__list svg.i { width: 16px; height: 16px; color: #6fdc9f; }
.send__fn { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; background: rgba(255,255,255,.08); padding: 6px 10px; border-radius: 8px; margin-top: 10px; word-break: break-all; }

/* ---------- 写真ビューア・比較 ---------- */
.viewer { position: fixed; inset: 0; z-index: 420; background: rgba(10,11,13,.97); color: #fff; display: grid; grid-template-rows: auto 1fr auto; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.viewer__top { padding: calc(var(--safe-t) + 8px) 10px 8px; display: flex; align-items: center; gap: 8px; }
.viewer__top .iconbtn { color: #fff; }
.viewer__img { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 8px; }
.viewer__img img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; }
.viewer__meta { padding: 12px 16px calc(16px + var(--safe-b)); background: rgba(255,255,255,.04); border-top: 1px solid rgba(255,255,255,.08); }
.viewer__meta .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.viewer__meta .tag { background: rgba(255,255,255,.1); color: #fff; }
.viewer__meta .fn { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; opacity: .65; margin-top: 8px; word-break: break-all; }
.viewer__acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.viewer__acts .btn { min-height: 44px; font-size: 13px; background: rgba(255,255,255,.1); color: #fff; }
.viewer__acts .btn.on { background: var(--orange); }
@media (min-width: 1100px) { .viewer { grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr; } .viewer__top { grid-column: 1 / -1; } .viewer__meta { border-top: 0; border-left: 1px solid rgba(255,255,255,.08); } }

.ba { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; background: #222; user-select: none; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__after { clip-path: inset(0 0 0 var(--x, 50%)); }
.ba__bar { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(0,0,0,.4); }
.ba__knob { position: absolute; top: 50%; left: var(--x, 50%); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.ba__lbl { position: absolute; top: 12px; font-family: var(--f-en); font-size: 14px; letter-spacing: .2em; padding: 2px 10px; border-radius: 6px; background: rgba(17,19,23,.7); color: #fff; }
.ba__lbl--b { left: 12px; }
.ba__lbl--a { right: 12px; background: var(--orange); }

/* ---------- 発信の下書き ---------- */
.ai {
  position: relative; border-radius: var(--r); padding: 18px; color: var(--white); overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #1a1d23, #111317 60%); box-shadow: var(--shadow-2);
}
.ai::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(238,106,31,.35), transparent 30%, rgba(215,38,46,.25), transparent 60%); animation: spin 8s linear infinite; opacity: .7; }
.ai::after { content: ""; position: absolute; inset: 1px; border-radius: calc(var(--r) - 1px); background: linear-gradient(135deg, #1d2027, #121418 70%); z-index: -1; }
@keyframes spin { to { transform: rotate(1turn); } }
.ai h2 { font-size: 17px; letter-spacing: .06em; }
.ai p { font-size: 12.5px; color: rgba(255,253,248,.7); margin-top: 4px; }
.flow { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.flow span { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: rgba(255,253,248,.08); letter-spacing: .04em; }
.flow svg.i { width: 14px; height: 14px; opacity: .5; }
.dtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.dtabs::-webkit-scrollbar { display: none; }
.dtab { flex: none; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--white); border: 1.5px solid var(--line-2); font-weight: 700; font-size: 13.5px; }
.dtab.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.dtab .ok { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.draft { background: var(--white); border-radius: var(--r); border: 1px solid var(--line); padding: 18px; box-shadow: var(--shadow-1); }
.draft__media { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 14px; padding: 0 18px; }
.draft__media::-webkit-scrollbar { display: none; }
.draft__media figure { margin: 0; flex: none; width: 92px; position: relative; }
.draft__media img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; }
.draft__media figcaption { font-size: 10.5px; color: var(--muted); margin-top: 3px; text-align: center; line-height: 1.3; }
.draft__media .n { position: absolute; left: 5px; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.draft__text { white-space: pre-wrap; font-size: 14px; line-height: 1.85; min-height: 120px; }
.draft__text h3 { font-size: 16.5px; line-height: 1.55; margin-bottom: 10px; font-family: var(--f-mincho); font-weight: 800; letter-spacing: .04em; }
.draft__text .h { display: block; font-weight: 700; margin: 12px 0 2px; color: var(--ink); }
.draft__text .ht { color: var(--blue); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--orange); vertical-align: text-bottom; margin-left: 1px; animation: blink .8s infinite; }
.draft__meta { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.draft__meta .btn { margin-left: auto; }
.shimmer { height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, var(--paper-2), var(--paper), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- ダッシュボード ---------- */
.dash { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1100px) { .dash { grid-template-columns: repeat(12, 1fr); } .dash > .w4 { grid-column: span 4; } .dash > .w6 { grid-column: span 6; } .dash > .w8 { grid-column: span 8; } .dash > .w12 { grid-column: span 12; } .dash > .w3 { grid-column: span 3; } }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--white); border-radius: var(--r); border: 1px solid var(--line); padding: 14px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.kpi small { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi b { display: block; font-family: var(--f-en); font-size: 40px; line-height: 1.05; margin-top: 6px; letter-spacing: .02em; }
.kpi b small { display: inline; font-size: 16px; color: var(--muted); letter-spacing: .04em; font-family: var(--f-gothic); }
.kpi--alert b { color: var(--red); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, transparent); }
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--f-gothic); font-size: 10px; fill: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.prog { height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--red)); transition: width .8s var(--ease); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--red-soft); color: #7e1117; font-size: 13px; line-height: 1.6; }
.alert svg.i { width: 20px; height: 20px; margin-top: 1px; color: var(--red); }
.alert b { display: block; }
.alert--info { background: var(--blue-soft); color: #173f57; }
.alert--info svg.i { color: var(--blue); }
.alert--ok { background: var(--green-soft); color: #164d31; }
.alert--ok svg.i { color: var(--green); }

/* ---------- 現場詳細 ---------- */
.sitehero { position: relative; margin: 0 -16px; aspect-ratio: 16 / 10; max-height: 340px; width: calc(100% + 32px); background: var(--ink) center / cover; color: #fff; display: flex; align-items: flex-end; overflow: hidden; }
.sitehero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,19,23,.15), rgba(17,19,23,.85)); }
.sitehero__in { position: relative; z-index: 1; padding: 0 18px 18px; width: 100%; }
.sitehero__in h2 { font-size: 22px; letter-spacing: .06em; line-height: 1.35; margin-top: 6px; }
.sitehero__in p { font-size: 12.5px; opacity: .85; }
@media (min-width: 1100px) { .sitehero { margin: 0; width: 100%; border-radius: var(--r-lg); } }
.stepsList .li { min-height: 56px; }
.stepnum { font-family: var(--f-en); font-size: 20px; width: 30px; text-align: center; color: var(--muted-2); }
.stepnum.done { color: var(--green); }
.stepnum.now { color: var(--orange); }
.qrbox { display: grid; justify-items: center; gap: 10px; padding: 18px; background: var(--white); border-radius: var(--r); border: 1px solid var(--line); }
.qrbox canvas, .qrbox img, .qrbox svg { width: 200px; height: 200px; image-rendering: pixelated; }
.qrsticker { width: 100%; max-width: 320px; border-radius: 18px; overflow: hidden; border: 2px solid var(--ink); background: var(--white); }
.qrsticker__head { background: var(--ink); color: var(--white); padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.qrsticker__head b { font-size: 13px; letter-spacing: .14em; }
.qrsticker__body { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 14px; align-items: center; }
.qrsticker__body svg { width: 110px; height: 110px; }
.qrsticker__body b { display: block; font-size: 15px; line-height: 1.4; }
.qrsticker__body small { font-size: 11px; color: var(--muted); display: block; }
.qrsticker__foot { background: var(--orange); color: #fff; padding: 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-align: center; }

/* ---------- 工事アルバム（お客様向け） ---------- */
.alb { background: var(--white); min-height: 100dvh; color: var(--text); }
.alb__hero { position: relative; height: 78dvh; min-height: 460px; max-height: 760px; color: #fff; overflow: hidden; }
.alb__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kb 18s ease-out both; }
@keyframes kb { from { transform: scale(1.12); } to { transform: scale(1); } }
.alb__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,19,23,.35) 0%, rgba(17,19,23,.05) 35%, rgba(17,19,23,.82) 100%); }
.alb__brand { position: absolute; left: 20px; right: 20px; top: calc(var(--safe-t) + 18px); z-index: 1; display: flex; align-items: center; gap: 10px; }
.alb__brand b { font-size: 14px; letter-spacing: .2em; }
.alb__heroin { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 22px 34px; max-width: 760px; margin: 0 auto; }
.alb__heroin h1 { font-family: var(--f-mincho); font-weight: 800; font-size: clamp(28px, 7vw, 46px); line-height: 1.35; letter-spacing: .06em; margin-top: 10px; }
.alb__heroin p { font-size: 13.5px; opacity: .88; margin-top: 10px; line-height: 1.8; }
.alb__sec { padding: 56px 22px; max-width: 760px; margin: 0 auto; }
.alb__sec--paper { background: var(--paper); max-width: none; }
.alb__sec--paper > * { max-width: 716px; margin-left: auto; margin-right: auto; }
.alb__sec--ink { background: var(--ink); color: var(--white); max-width: none; }
.alb__sec--ink > * { max-width: 716px; margin-left: auto; margin-right: auto; }
.alb h2 { font-family: var(--f-mincho); font-weight: 800; font-size: clamp(22px, 5.4vw, 30px); line-height: 1.5; letter-spacing: .06em; margin: 10px 0 14px; }
.alb .lead { font-size: 14.5px; line-height: 2; color: var(--muted); }
.alb__sec--ink .lead { color: rgba(255,253,248,.72); }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.spec dt, .spec dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec dt { color: var(--muted); padding-right: 22px; font-size: 12.5px; letter-spacing: .1em; white-space: nowrap; }
.coats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.coats3 figure { margin: 0; }
.coats3 .im { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #222; position: relative; }
.coats3 img { width: 100%; height: 100%; object-fit: cover; }
.coats3 .im span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.coats3 figcaption { font-size: 11.5px; line-height: 1.6; color: rgba(255,253,248,.65); margin-top: 8px; }
.coats3 .bar { height: 4px; border-radius: 2px; margin-bottom: 8px; }
.atl { position: relative; margin-top: 28px; }
.atl__item { position: relative; padding-left: 34px; padding-bottom: 34px; }
.atl__item::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: -6px; width: 2px; background: var(--paper-2); }
.atl__item:last-child::before { display: none; }
.atl__dot { position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 4px solid var(--c, var(--ink)); }
.atl__date { font-family: var(--f-en); font-size: 14px; letter-spacing: .14em; color: var(--muted); }
.atl__item h3 { font-size: 17px; letter-spacing: .08em; margin: 2px 0 4px; }
.atl__item p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.atl__ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 12px; }
.atl__ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.atl__ph img:first-child:nth-last-child(1) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.review { text-align: center; }
.stars { display: inline-flex; gap: 6px; margin: 16px 0 8px; }
.stars button { width: 44px; height: 44px; color: var(--paper-3); transition: transform .2s var(--ease-spring), color .2s; }
.stars button.on { color: #f5a623; transform: scale(1.08); }
.stars svg { width: 44px; height: 44px; fill: currentColor; }
.alb__foot { padding: 40px 22px calc(40px + var(--safe-b)); background: var(--ink); color: rgba(255,253,248,.72); font-size: 12.5px; line-height: 1.9; text-align: center; }
.alb__foot b { display: block; color: var(--white); font-size: 16px; letter-spacing: .2em; margin: 10px 0 6px; }
.alb__demo { position: fixed; left: 12px; bottom: calc(12px + var(--safe-b)); z-index: 70; display: flex; gap: 8px; }
.alb__demo .btn { min-height: 44px; font-size: 12.5px; box-shadow: var(--shadow-2); }

/* ---------- 汎用アニメーション ---------- */
.rise { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .1s; } .d3 { animation-delay: .15s; } .d4 { animation-delay: .2s; } .d5 { animation-delay: .25s; } .d6 { animation-delay: .3s; }
.countup { display: inline-block; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg.i { width: 40px; height: 40px; opacity: .4; margin: 0 auto 10px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-en); font-size: 12px; letter-spacing: .2em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.demo-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.demo-badge.live i { background: var(--green); animation: pulse 1.8s infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .tabbar, .side, .topbar, .toasts, .swipe { display: none !important; }
  body::after { display: none; }
}

/* ---------- ログイン ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); background-image: radial-gradient(60% 40% at 10% 0%, rgba(238, 106, 31, .28), transparent 60%), radial-gradient(50% 40% at 100% 100%, rgba(215, 38, 46, .22), transparent 60%); }
.login__box { width: 100%; max-width: 440px; background: var(--white); color: var(--text); border-radius: 22px; padding: 26px 22px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.login__box h1 { font-size: 20px; letter-spacing: .06em; margin: 18px 0 6px; }
.login__brand { display: flex; align-items: center; gap: 12px; }
.login__brand b { display: block; font-size: 17px; letter-spacing: .08em; }
.login__brand span { display: block; font-family: var(--f-en); font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.login .list { margin-top: 12px; }
.login .li { min-height: 60px; }

/* ---------- 見積もり ---------- */
.qt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qt th, .qt td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.qt th { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--paper); }
.qt .qt__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qt td small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.qt tfoot td { border-bottom: 0; padding: 6px 10px; color: var(--muted); }
.qt tfoot .qt__grand td { font-weight: 700; color: var(--text); font-size: 15px; border-top: 2px solid var(--ink); padding-top: 10px; }
.qt__wrap { overflow-x: auto; padding: 0 18px; }
.qt__in { width: 100%; min-width: 120px; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13.5px; background: var(--white); color: var(--text); }
.qt__in:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
.qt__in--note { margin-top: 4px; font-size: 12px; min-width: 120px; }
.qt__in--n { min-width: 72px; width: 96px; text-align: right; }
.qt__in--u { min-width: 64px; width: 72px; }
.qt__amt { font-weight: 700; }
.qtotal__big { font-size: 34px; font-weight: 700; letter-spacing: .02em; margin: 4px 0 8px; }
.qtotal__rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: 13px; }
.qtotal__rows dt { color: var(--muted); }
.qtotal__rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.qedit .seg button { font-size: 12px; padding: 0 6px; }
/* お客様が見る見積書（印刷対応） */
.qdoc { background: var(--paper); min-height: 100dvh; padding: 24px 12px 90px; color: var(--text); }
.qdoc__paper { max-width: 760px; margin: 0 auto; background: var(--white); border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow-2); }
.qdoc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.qdoc__head h1 { font-size: 26px; letter-spacing: .3em; margin: 4px 0 0; }
.qdoc__meta { display: grid; gap: 4px; font-size: 12.5px; text-align: right; }
.qdoc__meta span { color: var(--muted); margin-right: 10px; }
.qdoc__to { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.qdoc__cust { font-size: 20px; border-bottom: 2px solid var(--ink); padding: 0 8px 6px 2px; min-width: 240px; }
.qdoc__cust b { font-size: 22px; }
.qdoc__cust small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.qdoc__co { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.qdoc__co b { display: block; font-size: 14px; }
.qdoc__co small { display: block; color: var(--muted); }
.qdoc__lead { margin: 22px 0 10px; font-size: 13.5px; }
.qdoc__subject { display: flex; gap: 12px; font-size: 14px; margin-bottom: 8px; }
.qdoc__subject span { color: var(--muted); }
.qdoc__total { display: flex; justify-content: space-between; align-items: baseline; background: var(--paper); border-radius: 12px; padding: 12px 16px; margin: 10px 0 18px; }
.qdoc__total span { font-size: 13px; color: var(--muted); }
.qdoc__total b { font-size: 28px; }
.qt--doc th { background: transparent; border-bottom: 2px solid var(--ink); }
.qdoc__memo { margin-top: 20px; font-size: 13px; }
.qdoc__memo span { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .08em; margin-bottom: 4px; }
.qdoc__memo p { white-space: pre-wrap; margin: 0; line-height: 1.8; }
.qdoc__accept { margin-top: 26px; text-align: center; }
.qdoc__foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); text-align: center; }
.qdoc__bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; justify-content: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(243, 239, 231, .92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
@media print {
  body.bare { background: #fff; }
  .qdoc { background: #fff; padding: 0; }
  .qdoc__paper { box-shadow: none; border-radius: 0; max-width: none; padding: 0; }
  .qdoc__bar, .qdoc__accept, .toasts, .boot { display: none !important; }
}

/* ---------- 見積書・請求書（御社の請求書の体裁） ---------- */
.qdoc__title { display: inline-block; background: var(--ink); color: #fff; font-size: 15px; letter-spacing: .3em; padding: 14px 24px 14px 30px; }
.qdoc__meta { display: grid; gap: 6px; font-size: 12.5px; }
.qdoc__meta > div { border-bottom: 1px solid var(--ink); padding: 0 4px 3px; min-width: 230px; }
.qdoc__meta span { color: var(--muted); margin-right: 6px; }
.qdoc__to { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.qdoc__cust { font-size: 20px; border-bottom: 2px solid var(--ink); padding: 0 8px 6px 2px; min-width: 300px; flex: 1 1 300px; max-width: 460px; display: flex; justify-content: space-between; align-items: baseline; }
.qdoc__cust b { font-size: 22px; }
.qdoc__sama { font-size: 14px; }
.qdoc__co { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; line-height: 1.6; position: relative; }
.qdoc__co b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.qdoc__co small { display: block; font-size: 11px; }
.qdoc__stamp { width: 64px; height: 64px; margin: -6px 0 0 -8px; opacity: .9; mix-blend-mode: multiply; }
.qdoc__lead { margin: 18px 0 8px; font-size: 12.5px; }
.qdoc__terms { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; margin: 0 0 14px; font-size: 12.5px; max-width: 460px; }
.qdoc__terms dt { color: var(--text); padding: 5px 0 4px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.qdoc__terms dd { margin: 0; padding: 5px 0 4px; border-bottom: 1px solid var(--line-2); }
.qdoc__total { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--ink); margin: 6px 0 20px; min-width: 60%; }
.qdoc__total > span { background: var(--ink); color: #fff; font-size: 12px; padding: 14px 14px; letter-spacing: .08em; white-space: nowrap; }
.qdoc__total > b { font-size: 26px; padding: 6px 22px; flex: 1; text-align: center; }
.qdoc__total > small { font-size: 12px; padding-right: 16px; color: var(--muted); }
.qt--doc th { background: transparent; border-bottom: 1px solid var(--ink); text-align: center; color: var(--text); }
.qt--doc th:first-child { text-align: center; }
.qt--doc td { border-bottom: 1px dotted var(--line-2); font-size: 12.5px; padding: 7px 8px; }
.qt--doc tr.qt__head td { font-weight: 700; border-bottom: 1px solid var(--line-2); }
.qt--doc tr.qt__blank td { height: 14px; }
.qt__neg { color: var(--red) !important; }
.qedit tr.qt__head td { background: var(--paper); }
.qdoc__sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 22px; flex-wrap: wrap; }
.qdoc__taxes { font-size: 11.5px; flex: 1 1 320px; }
.qdoc__taxes > div { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; border-bottom: 1px solid var(--line-2); padding: 4px 0; }
.qdoc__taxes b { text-align: right; font-weight: 500; }
.qdoc__taxes p { margin: 8px 0 0; }
.qdoc__totals { display: grid; grid-template-columns: auto auto; gap: 0 20px; margin: 0; font-size: 12.5px; min-width: 230px; }
.qdoc__totals dt { padding: 5px 4px; border-bottom: 1px solid var(--line-2); }
.qdoc__totals dd { margin: 0; padding: 5px 4px; border-bottom: 1px solid var(--line-2); text-align: right; font-variant-numeric: tabular-nums; }
.qdoc__totals .qdoc__grand { font-weight: 700; font-size: 14px; border-bottom: 2px solid var(--ink); }
.qdoc__memo { margin-top: 24px; font-size: 12.5px; }
.qdoc__memo span { display: block; border-bottom: 1px solid var(--ink); padding: 0 4px 3px; margin-bottom: 8px; }
.qdoc__memo p { white-space: pre-wrap; margin: 0; line-height: 1.8; padding: 0 4px; }
.qt__seg button { font-size: 11px; padding: 0 4px; }

/* ---------- 完了報告書 ---------- */
.rp__row { display: grid; grid-template-columns: 34px 72px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rp__n { font-family: var(--f-en); font-size: 14px; color: var(--muted); }
.rp__thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }
.rp__btns { display: flex; gap: 2px; }
.rp__btns .iconbtn { width: 32px; height: 32px; }
.rp__btns [data-d="-1"] svg { transform: rotate(180deg); }
.ph.on { outline: 3px solid var(--green); outline-offset: -3px; }
.rd { background: var(--paper); min-height: 100dvh; padding: 24px 12px 90px; color: #1f2733; }
.rd__page { max-width: 820px; margin: 0 auto 24px; background: #fff; box-shadow: var(--shadow-2); padding: 0 0 28px; border-radius: 12px; overflow: hidden; position: relative; min-height: 1000px; }
.rd__band { height: 12px; background: #2c3e50; }
.rd__top { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 40px 0; }
.rd__top h1 { font-size: 22px; letter-spacing: .1em; margin: 0; font-family: var(--f-jp, inherit); }
.rd__top span { font-size: 12px; color: #6b7280; }
.rd__sub { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 40px 12px; border-bottom: 1px solid #d1d5db; margin: 0 0 18px; }
.rd__sub b { font-size: 15px; }
.rd__sub span { font-size: 12px; color: #6b7280; }
.rd__h2 { font-size: 15px; margin: 18px 40px 10px; padding-left: 10px; border-left: 4px solid #2c3e50; }
.rd__tbl { width: calc(100% - 80px); margin: 0 40px; border-collapse: collapse; font-size: 12.5px; }
.rd__tbl th { width: 110px; text-align: left; background: #f3f4f6; padding: 8px 10px; border: 1px solid #e5e7eb; font-weight: 700; }
.rd__tbl td { padding: 8px 10px; border: 1px solid #e5e7eb; line-height: 1.7; }
.rd__check { margin: 14px 40px 0; background: #f3f4f6; border-radius: 8px; padding: 12px 16px; font-size: 12.5px; line-height: 1.8; }
.rd__check b { display: block; margin-bottom: 4px; }
.rd__check p { margin: 0; }
.rd__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 40px; }
.rd__grid--1 { grid-template-columns: 1fr; }
.rd__fig { margin: 0; border: 1px solid #e5e7eb; background: #fafafa; display: flex; flex-direction: column; }
.rd__fig img { width: 100%; height: 300px; object-fit: contain; background: #fafafa; padding: 10px; box-sizing: border-box; }
.rd__grid--1 .rd__fig img { height: 360px; }
.rd__fig figcaption { background: #eef1f5; font-size: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: baseline; }
.rd__fig figcaption b { font-family: var(--f-en); color: #4b5563; }
.rd__foot { position: absolute; right: 40px; bottom: 12px; font-size: 12px; color: #6b7280; }
@media print {
  .rd { background: #fff; padding: 0; }
  .rd__page { box-shadow: none; border-radius: 0; margin: 0; min-height: auto; page-break-after: always; max-width: none; }
  .rd__page:last-of-type { page-break-after: auto; }
  .rd__foot { position: static; text-align: right; margin: 12px 40px 0; }
  @page { size: A4; margin: 10mm; }
}
