/* A proofing desk, set like an editorial page: warm paper, ink-black type, one vermilion (朱) for the seal,
   blue only for 承認. Big mincho headlines, hairlines instead of boxes, soft white cards on paper.
   The proof lies on the desk with crop marks (トンボ); a decision is a date stamp (データ印) pressed on it. */
:root {
  --bg: #f3f0e8;            /* warm paper desk */
  --desk: var(--bg);
  --paper: #faf8f3;
  --surface: #ffffff;
  --sunk: #e9e5db;
  --ink: #121212;
  --ink-2: #3b3a36;
  --muted: #827d72;
  --line: #ddd8cc;
  --line-strong: #c2bcad;
  --accent: #1d4dff;
  --accent-ink: #ffffff;
  --accent-soft: #e4e9ff;
  --shu: #e63a12;           /* 朱: seal, pins */
  --shu-soft: #fde5dc;
  --yamabuki: #a86a00;      /* 修正依頼 */
  --yamabuki-soft: #f7ead0;
  --pending: #77736a;       /* 確認待ち */
  --pending-soft: #e8e4da;
  --approved: #1d4dff;      /* 承認済 */
  --approved-soft: #e4e9ff;
  --warn: #c8280f;
  --done: #a39e92;
  --shadow-paper: 0 1px 2px rgba(18, 18, 18, .04), 0 12px 32px -12px rgba(18, 18, 18, .14);
  --shadow-pop: 0 2px 6px rgba(18, 18, 18, .06), 0 30px 70px -20px rgba(18, 18, 18, .3);
  --r-s: 8px;
  --r: 14px;
  --r-l: 22px;
  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-latin: "Instrument Serif", "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --paper: #151513;
    --surface: #1c1c1a;
    --sunk: #242321;
    --ink: #f3f0e8;
    --ink-2: #cfcbc1;
    --muted: #8f8a7f;
    --line: #2c2b27;
    --line-strong: #45433d;
    --accent: #7c95ff;
    --accent-ink: #0e0e0d;
    --accent-soft: #1c2347;
    --shu: #ff6240;
    --shu-soft: #3a1a12;
    --yamabuki: #f0b440;
    --yamabuki-soft: #33270f;
    --pending: #a7a297;
    --pending-soft: #262522;
    --approved: #7c95ff;
    --approved-soft: #1c2347;
    --warn: #ff7b66;
    --done: #6f6b62;
    --shadow-paper: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -12px rgba(0, 0, 0, .6);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 70px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--shu); color: #fff; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: normal; letter-spacing: 0; }
.boot { padding: 40px; color: var(--muted); }
.eyebrow { margin: 0; font: 500 11px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fine { margin: 0; font-size: 12px; color: var(--muted); }
.redink { color: var(--shu); font-weight: 700; }
.late { color: var(--warn) !important; }
#app { height: 100%; }
.auth-head { display: grid; gap: 6px; }
.err { color: var(--warn); font-size: 13px; min-height: 1em; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: .02em; white-space: nowrap; text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { box-shadow: 0 10px 22px -12px var(--ink); }
.btn.approve { background: var(--approved); border-color: var(--approved); color: #fff; }
.btn.approve:hover { box-shadow: 0 12px 26px -10px var(--approved); }
.btn.revise { background: transparent; border-color: var(--yamabuki); color: var(--yamabuki); }
.btn.revise:hover { background: var(--yamabuki-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--sunk); transform: none; }
.btn.danger { color: var(--warn); }
.btn.danger-solid { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.undo { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.sm { min-height: 32px; padding: 0 13px; font-size: 12px; }
.btn.lg { min-height: 50px; padding: 0 26px; font-size: 14px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 11.5px; cursor: pointer; }
.linkbtn.danger { color: var(--warn); }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--ink-2); font-weight: 700; letter-spacing: .04em; }
.field > span b { color: var(--shu); font-weight: 700; margin-left: 2px; }
input[type=text], input[type=url], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }

/* ---------- front page (TOP) ---------- */
.lp { min-height: 100%; overflow-x: clip; }
.lp > :not(.lp-marquee) { width: min(1280px, 100%); margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }
.lp .nw { display: inline-block; }
.lp h2, .lp p, .lp li { word-break: auto-phrase; }
.lp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.lp-bar .brand rt { font: 500 9px/1 var(--font-body); letter-spacing: .1em; color: var(--muted); }
.lp-link { border: 0; border-bottom: 1px solid var(--ink); background: none; cursor: pointer; font-weight: 700; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 0; }
.lp-link span { transition: transform .25s var(--ease); }
.lp-link:hover span { transform: translateY(3px); }
.lp-kicker, .lp-eyebrow em, .lp-tag, .lp-demo-hint em { font: italic 400 21px/1 var(--font-latin); letter-spacing: 0; color: var(--shu); }
.lp-kicker { margin: 0; }

/* hero: the headline rises line by line; the proof on the right can really be stamped */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(28px, 6vh, 72px) clamp(56px, 10vh, 112px); min-height: calc(100svh - 84px); }
.lp-eyebrow { margin: 0 0 clamp(20px, 3vh, 32px); display: flex; align-items: baseline; gap: 14px; font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.lp-hero h1 { margin: 0; font: 800 clamp(38px, 5.6vw, 84px)/1.2 var(--font-display); letter-spacing: .01em; }
.lp-hero h1 .ln { display: block; overflow: hidden; padding-block: .05em .1em; white-space: nowrap; }
.lp-hero h1 .ln > span { display: inline-block; transform: translateY(115%); transition: transform 1s cubic-bezier(.2, .85, .15, 1); }
.lp-hero h1 .ln:nth-child(2) > span { transition-delay: .12s; }
.lp.ready .lp-hero h1 .ln > span { transform: none; }
.lp-hero h1 b { position: relative; font-weight: 800; }
.lp-hero h1 b::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .13em; background: var(--shu); z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .9s .75s var(--ease); }
.lp.ready .lp-hero h1 b::after { transform: none; }
.lp-eyebrow, .lp-lead, .lp-name, .lp-demo { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.lp.ready .lp-eyebrow, .lp.ready .lp-lead, .lp.ready .lp-name, .lp.ready .lp-demo { opacity: 1; transform: none; }
.lp-lead { transition-delay: .35s; margin: clamp(22px, 4vh, 36px) 0 0; max-width: 540px; font-size: clamp(15px, 1.25vw, 17px); line-height: 2.05; color: var(--ink-2); }
.lp-name { transition-delay: .5s; margin: 28px 0 0; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.lp-name b { flex: none; width: 46px; height: 46px; border: 1.5px solid var(--shu); border-radius: 50%; display: grid; place-items: center; color: var(--shu); font: 800 15px/1 var(--font-display); transform: rotate(-10deg); }

.lp-demo { transition-delay: .45s; display: grid; gap: 14px; }
.lp-demo-hint { margin: 0; justify-self: end; display: flex; gap: 10px; align-items: baseline; font-size: 12px; font-weight: 700; color: var(--muted); padding-right: 22px; }
.lp-demo-hint em { color: var(--ink); font-size: 19px; }
.lp-sheet { position: relative; margin: 6px 22px 10px; padding: 14px; background: var(--surface); box-shadow: var(--shadow-pop); transform: rotate(-2deg); transition: transform .6s var(--ease); }
.lp-demo:hover .lp-sheet { transform: rotate(-.6deg); }
.lp-ad { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #171310; color: #fff; display: grid; align-content: end; gap: 6px; padding: 9%; }
.lp-ad::before { content: ""; position: absolute; width: 92%; aspect-ratio: 1; right: -30%; top: -24%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8559, #e63a12 58%, #9e2108); }
.lp-ad > * { position: relative; }
.lp-ad-tag { position: absolute; left: 9%; top: 8%; font: 500 10.5px/1 var(--font-mono); letter-spacing: .22em; border: 1px solid rgba(255, 255, 255, .6); padding: 5px 9px; border-radius: 999px; }
.lp-ad-copy { font: italic 400 clamp(44px, 5vw, 66px)/.92 var(--font-latin); }
.lp-ad-sub { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; margin-top: 6px; }
.lp-ad-cta { justify-self: start; margin-top: 8px; background: #fff; color: #171310; font-size: 12px; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.lp-pin { position: absolute; z-index: 2; width: 26px; height: 26px; margin-top: -26px; border-radius: 50% 50% 50% 0; background: var(--shu); color: #fff; border: 2px solid #fff; font: 700 12px/22px var(--font-mono); text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); transform: scale(0); transform-origin: 0 100%; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), background-color .3s; }
.lp-note { position: absolute; z-index: 2; background: var(--ink); color: var(--bg); font-size: 11.5px; font-weight: 500; line-height: 1.4; padding: 6px 11px; border-radius: 9px; white-space: nowrap; box-shadow: var(--shadow-paper); opacity: 0; transform: translateY(6px); transition: opacity .35s .15s, transform .35s .15s var(--ease); }
.lp-pin.p1 { left: 67%; top: 56%; } .lp-note.n1 { left: 50%; top: 41%; }
.lp-pin.p2 { left: 57%; top: 76%; } .lp-note.n2 { right: -4%; top: 66%; }
.lp-demo.s1 .p1, .lp-demo.s2 .p2 { transform: scale(1); }
.lp-demo.s1 .n1, .lp-demo.s2 .n2 { opacity: 1; transform: none; }
.lp-demo.stamped .lp-pin { background: var(--done); }
.lp-demo.stamped .lp-note { opacity: 0; transition-delay: 0s; }
.lp-stamp { position: absolute; z-index: 3; right: 7%; top: 9%; width: 44%; aspect-ratio: 1; border: 4px solid var(--approved); border-radius: 50%; background: color-mix(in srgb, #fff 92%, transparent); color: var(--approved); display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; justify-items: center; text-align: center; opacity: 0; transform: rotate(-11deg); pointer-events: none; }
:root .lp-stamp { --approved: #1d4dff; }
.lp-stamp b { width: 100%; font: 800 clamp(22px, 2.6vw, 34px)/1.25 var(--font-display); letter-spacing: .16em; text-indent: .16em; border-block: 2px solid var(--approved); }
.lp-stamp span { font: 500 12px/1 var(--font-mono); }
.lp-stamp span:first-child { align-self: end; padding-bottom: 5px; }
.lp-stamp span:last-child { align-self: start; padding-top: 6px; font: 700 12px/1 var(--font-body); }
.lp-demo.stamped .lp-stamp { animation: stampIn .6s var(--ease) both; }
.lp-demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 22px; }
.lp-demo-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--pending); transition: color .3s; }
.lp-demo-state i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lp-demo.stamped .lp-demo-state { color: var(--approved); }
#lpOk { position: relative; min-height: 52px; padding: 0 28px; font-size: 15px; box-shadow: 0 12px 26px -12px var(--approved); }
.lp-demo:not(.stamped) #lpOk::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--approved); animation: ring 1.8s ease-out infinite; pointer-events: none; }
.lp-demo.stamped #lpOk { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }

/* running band */
.lp-marquee { background: var(--ink); color: var(--bg); overflow: hidden; }
.lp-marquee > div { display: flex; align-items: center; gap: 36px; width: max-content; padding: 22px 36px 22px 0; font: 800 clamp(18px, 2.1vw, 27px)/1 var(--font-display); letter-spacing: .08em; white-space: nowrap; animation: marquee 38s linear infinite; }
.lp-marquee i { font-style: normal; color: var(--shu); font-size: .8em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections: a sticky headline on the left, the content on the right */
.lp-sec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding-block: clamp(72px, 13vh, 150px); }
.lp-sec + .lp-sec { border-top: 1px solid var(--line-strong); }
.lp-sec-head { position: sticky; top: 40px; display: grid; gap: 18px; }
.lp-sec-head h2 { margin: 0; font: 800 clamp(28px, 3.7vw, 54px)/1.32 var(--font-display); letter-spacing: .02em; }
.rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.lp-steps .rv:nth-child(2), .lp-vs .rv:nth-child(2), .lp-safe-grid .rv:nth-child(2) { transition-delay: .1s; }
.lp-steps .rv:nth-child(3), .lp-safe-grid .rv:nth-child(3) { transition-delay: .2s; }

.lp-steps { list-style: none; margin: 0; padding: 0; }
.lp-steps li { display: grid; grid-template-columns: clamp(84px, 11vw, 168px) minmax(0, 1fr); gap: 24px; align-items: start; padding-block: clamp(26px, 4vh, 40px); border-top: 1px solid var(--ink); }
.lp-steps li:last-child { border-bottom: 1px solid var(--ink); }
.lp-num { font: 400 clamp(64px, 8vw, 124px)/.82 var(--font-latin); letter-spacing: -.02em; transition: color .3s; }
.lp-steps li:hover .lp-num { color: var(--shu); }
.lp-steps b { display: block; margin-bottom: 10px; font: 800 clamp(21px, 2.2vw, 30px)/1.35 var(--font-display); letter-spacing: .02em; }
.lp-steps p { margin: 0; max-width: 460px; font-size: 15px; line-height: 1.95; color: var(--ink-2); }

.lp-compare { grid-template-columns: 1fr; gap: clamp(32px, 5vh, 56px); }
.lp-compare .lp-sec-head { position: static; }
.lp-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lp-card { border-radius: 28px; padding: clamp(24px, 3vw, 44px); display: grid; gap: 26px; align-content: start; }
.lp-card header { display: flex; align-items: baseline; gap: 14px; }
.lp-card header b { font: 800 clamp(19px, 2vw, 24px)/1.3 var(--font-display); letter-spacing: .02em; }
.lp-before { background: var(--sunk); }
.lp-before .lp-tag { color: var(--muted); }
.lp-after { background: var(--ink); color: var(--bg); }
.lp-mock { display: grid; gap: 9px; min-height: 196px; align-content: center; }
.lp-chat .b { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.lp-chat .b span { font-size: 12.5px; line-height: 1.5; padding: 8px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-paper); }
.lp-chat .b i { flex: none; width: 36px; height: 36px; border-radius: 8px; background: repeating-linear-gradient(45deg, var(--line) 0 4px, var(--line-strong) 4px 8px); }
.lp-chat .b.r { justify-self: end; }
.lp-chat .b.r span { border-radius: 16px 16px 4px 16px; background: var(--line); box-shadow: none; }
.lp-chat .b:nth-child(1) { transform: rotate(-1.5deg); }
.lp-chat .b:nth-child(2) { transform: rotate(1.2deg) translateX(-6px); }
.lp-chat .b:nth-child(3) { transform: rotate(-.8deg) translateX(10px); }
.lp-chat .b:nth-child(4) { transform: rotate(1.6deg); }
.lp-rows > div { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 9%, transparent); font-size: 12.5px; }
.lp-rows .t { width: 38px; height: 38px; border-radius: 8px; background: linear-gradient(135deg, #ff8559, #e63a12); }
.lp-rows > div:nth-child(2) .t { background: linear-gradient(135deg, #7c95ff, #1d4dff); }
.lp-rows > div:nth-child(3) .t { background: linear-gradient(135deg, #f0d28a, #c98a12); }
.lp-rows b { font: 500 12px/1.3 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-rows .pill { font-style: normal; }
.lp-list { list-style: none; margin: 0; padding: 0; }
.lp-list li { position: relative; padding: 14px 0 14px 34px; font-size: 14.5px; line-height: 1.7; border-top: 1px solid var(--line-strong); color: var(--ink-2); }
.lp-list b { color: var(--ink); }
.lp-after .lp-list li { border-color: color-mix(in srgb, var(--bg) 18%, transparent); color: color-mix(in srgb, var(--bg) 72%, transparent); }
.lp-after .lp-list b { color: var(--bg); }
.lp-x, .lp-ok { position: absolute; left: 0; top: 15px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.lp-x { color: var(--muted); border: 1px solid var(--line-strong); }
.lp-ok { background: #1d4dff; color: #fff; }

.lp-safe-grid > div { display: grid; grid-template-columns: clamp(48px, 6vw, 84px) minmax(0, 1fr); gap: 16px; padding-block: clamp(22px, 3.5vh, 34px); border-top: 1px solid var(--line-strong); }
.lp-safe-grid > div:last-child { border-bottom: 1px solid var(--line-strong); }
.lp-roman { font: italic 400 clamp(26px, 3vw, 40px)/1 var(--font-latin); color: var(--shu); }
.lp-safe-grid b { display: block; margin-bottom: 8px; font: 800 clamp(18px, 1.8vw, 23px)/1.4 var(--font-display); }
.lp-safe-grid p { margin: 0; max-width: 480px; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); }

/* for people considering the service */
.lp-cta { padding-block: clamp(72px, 13vh, 150px); border-top: 1px solid var(--line-strong); text-align: center; }
.lp-cta > div { display: grid; justify-items: center; gap: 22px; }
.lp-cta h2 { margin: 0; font: 800 clamp(30px, 4.6vw, 68px)/1.28 var(--font-display); letter-spacing: .02em; }
.lp-cta p:not(.lp-kicker) { margin: 0; max-width: 520px; font-size: 15px; line-height: 2; color: var(--ink-2); }
.lp-cta .btn { margin-top: 10px; min-height: 60px; padding: 0 36px; font-size: 16px; gap: 12px; }
.lp-cta .btn span { transition: transform .25s var(--ease); }
.lp-cta .btn:hover span { transform: translateX(5px); }
.hp { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }

/* media side: one dark slab at the bottom */
.lp-media { padding-block: 0 clamp(40px, 7vh, 88px); }
.lp-start { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: end; padding: clamp(28px, 4.5vw, 64px); border-radius: 32px; background: var(--ink); color: var(--bg); scroll-margin: 24px; }
.lp-start h2 { margin: 8px 0 4px; font: 800 clamp(24px, 2.8vw, 40px)/1.3 var(--font-display); letter-spacing: .02em; }
.lp-start .auth-head p:last-child { margin: 0; font-size: 13.5px; line-height: 1.8; color: color-mix(in srgb, var(--bg) 62%, transparent); }
.lp-start-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.lp-start .field > span { color: color-mix(in srgb, var(--bg) 62%, transparent); }
.lp-start input[type=text] { min-height: 50px; padding-inline: 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 38%, transparent); border-radius: 0; background: transparent; color: var(--bg); font-size: 17px; font-weight: 700; }
.lp-start input[type=text]:focus { border-color: var(--bg); box-shadow: none; }
.lp-start input::placeholder { color: color-mix(in srgb, var(--bg) 40%, transparent); opacity: 1; font-weight: 400; }
.lp-start .btn { min-height: 52px; padding: 0 26px; background: var(--bg); border-color: var(--bg); color: var(--ink); }
.lp-start .err { grid-column: 1 / -1; color: #ff9a85; }
.lp-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-block: 8px 26px; overflow: hidden; font-size: 12px; color: var(--muted); }
.lp-foot p { margin: 0 0 6px; }
.lp-foot-mark { font: 800 clamp(96px, 20vw, 300px)/.78 var(--font-display); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--line-strong); margin-bottom: -.1em; user-select: none; }

/* ---------- shell ---------- */
.shell { height: 100%; display: grid; grid-template-rows: auto 1fr; }
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding-block: 14px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  background: var(--bg); border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.brand { font: 800 18px/1 var(--font-display); letter-spacing: .06em; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand i { width: 32px; height: 32px; border-radius: 50%; background: var(--shu); color: #fff; display: grid; place-items: center; font: 800 16px/1 var(--font-display); font-style: normal; transform: rotate(-10deg); }
.tally { display: flex; gap: 24px; align-items: baseline; padding-left: 24px; border-left: 1px solid var(--line-strong); }
.tally .t { display: flex; align-items: baseline; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tally .t b { font: 400 32px/1 var(--font-latin); color: var(--ink); }
.tally .t.pending b { color: var(--ink); }
.tally .t.revise b { color: var(--yamabuki); }
.tally .t.approved b { color: var(--approved); }
.tally .t em { font-style: normal; color: var(--warn); font-weight: 700; margin-left: 4px; }
.topbar .sp { flex: 1; }
.scope { display: flex; align-items: baseline; gap: 6px 8px; flex-wrap: wrap; min-width: 0; padding-left: 24px; border-left: 1px solid var(--line-strong); }
.scope .mono { font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.scope b { font-size: 14px; margin-right: 8px; }

.main { min-height: 0; display: grid; grid-template-columns: minmax(340px, 410px) 1fr; }

/* ---------- ledger (list) ---------- */
.ledger { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.ledger > .list { flex: 1; min-height: 0; }
.ledger-tools { padding: 12px 20px 8px; }
.ledger-tools input { border-radius: 999px; padding-inline: 18px; min-height: 42px; }
.ktabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 18px 20px 0; padding: 4px; border-radius: 999px; background: var(--sunk); }
.ktab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); transition: background-color .2s, color .2s; }
.ktab b { font-size: 11px; font-weight: 500; color: var(--muted); }
.ktab em { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--ink-2); }
.ktab:hover { color: var(--ink); }
.ktab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.ktab[aria-selected="true"] b { color: inherit; opacity: .65; }
.proj-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 18px 20px 0; }
.proj-bar select { min-width: 0; min-height: 40px; padding: 0 34px 0 16px; border-radius: 999px; font-weight: 700; }
.share:empty { display: none; }
.share { margin: 12px 20px 0; padding: 12px 14px 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-paper); }
.share-text { display: grid; min-width: 0; line-height: 1.4; }
.share-text b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-text span { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 6px; padding: 4px 14px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 9px 6px 11px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; transition: color .2s; }
.tab:hover { color: var(--ink); }
.tab b { font: 500 12px/1 var(--font-mono); margin-left: 5px; }
.tab[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.list { overflow-y: auto; min-height: 0; }
.row-wrap { position: relative; }
.row-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start;
  width: 100%; text-align: left; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer; position: relative; transition: background-color .2s;
}
.row-item:hover { background: var(--paper); }
.row-item .thumb { transition: transform .35s var(--ease); }
.row-item:hover .thumb { transform: scale(1.04) rotate(-1.5deg); }
.row-item[aria-current=true] { background: var(--surface); }
.row-item[aria-current=true]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink); }
.row-item.approved { box-shadow: inset 3px 0 0 var(--approved); }
.row-del { position: absolute; right: 16px; bottom: 14px; min-height: 26px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--warn); font-size: 11.5px; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s; }
.row-wrap:hover .row-del, .row-del:focus-visible { opacity: 1; }
.row-del:hover { background: var(--shu-soft); border-color: var(--warn); }
@media (hover: none) { .row-del { opacity: 1; } }
.row-confirm { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 95%, transparent); border-left: 3px solid var(--warn); animation: fadeIn .15s var(--ease); }
.row-confirm > span { flex: 1; min-width: 0; display: grid; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.row-confirm > span small { font-weight: 400; color: var(--muted); font-size: 11px; }
.thumb {
  width: 64px; height: 64px; border-radius: 10px; background: var(--sunk);
  display: grid; place-items: center; font: 500 10px/1 var(--font-mono); letter-spacing: .08em; color: var(--muted); overflow: hidden; flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.vid { position: relative; background: #121212; }
.thumb.vid video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb.vid::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%); border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent rgba(255, 255, 255, .92); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.thumb.lp { background: var(--shu-soft); color: var(--shu); font: 700 11px/1 var(--font-mono); letter-spacing: .08em; }
.kchip { font-style: normal; font: 700 10px/1 var(--font-body); padding: 3px 6px; margin-right: 6px; border-radius: 4px; background: var(--ink); color: var(--bg); vertical-align: 1px; }
.ri-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.ri-top { display: flex; align-items: center; gap: 8px; }
.ri-title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ri-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-times { font-size: 12px; color: var(--ink-2); display: grid; gap: 0; }
.ri-times .late { font-weight: 700; }
.sla { display: block; height: 2px; background: var(--line); margin-top: 7px; border-radius: 2px; overflow: hidden; }
.sla i { display: block; height: 100%; background: var(--ink); }
.sla.late i { background: var(--warn); }
.empty { padding: 56px 28px; color: var(--muted); text-align: center; display: grid; gap: 18px; justify-items: center; }
.empty p { margin: 0; line-height: 1.9; }
.empty b { color: var(--ink); font: 800 18px/1.5 var(--font-display); }
.empty-art { position: relative; width: 120px; height: 96px; }
.empty-art span { position: absolute; width: 70px; height: 86px; background: var(--surface); box-shadow: var(--shadow-paper); }
.empty-art span:nth-child(1) { left: 6px; top: 8px; transform: rotate(-8deg); }
.empty-art span:nth-child(2) { left: 26px; top: 2px; transform: rotate(3deg); }
.empty-art span:nth-child(3) { left: 44px; top: 6px; transform: rotate(10deg); }
.empty-art span:nth-child(3)::after { content: "校"; position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--shu); color: #fff; display: grid; place-items: center; font: 800 14px/1 var(--font-display); transform: rotate(-14deg); }

/* ---------- status pill & stamp ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: .04em; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pending { color: var(--pending); background: var(--pending-soft); }
.pill.revise { color: var(--yamabuki); background: var(--yamabuki-soft); }
.pill.approved { color: var(--approved); background: var(--approved-soft); }

/* データ印: date on top, verdict in the band, name below */
.stamp {
  --c: var(--pending);
  width: 104px; height: 104px; border: 2.5px solid var(--c); border-radius: 50%;
  display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; justify-items: center;
  color: var(--c); transform: rotate(-11deg); flex: none; text-align: center; overflow: hidden; position: relative;
}
.stamp b { font: 800 21px/1.2 var(--font-display); letter-spacing: .14em; text-indent: .14em; padding: 3px 0 2px; border-block: 1.5px solid var(--c); width: 100%; }
.stamp .s-date { font-size: 11px; align-self: end; padding-bottom: 3px; }
.stamp .s-who { font: 700 11px/1 var(--font-body); align-self: start; padding-top: 5px; max-width: 70%; overflow: hidden; white-space: nowrap; }
.stamp.approved { --c: var(--approved); }
.stamp.revise { --c: var(--yamabuki); }
.stamp.pending { border-style: dashed; opacity: .6; }
.stamp.pending b { letter-spacing: .3em; text-indent: .3em; }
.stamp-slot.slam .stamp { animation: stampIn .6s var(--ease) both; }
@keyframes stampIn {
  0% { transform: rotate(-26deg) scale(2.1); opacity: 0; }
  55% { transform: rotate(-9deg) scale(.93); opacity: 1; }
  100% { transform: rotate(-11deg) scale(1); opacity: 1; }
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes ring { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.18, 1.5); } }
@keyframes pinRing { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.4); } }
@keyframes pinIn { from { transform: scale(0); } }

/* ---------- upload desk ---------- */
.desk { min-height: 100%; display: grid; align-content: center; gap: 20px; width: min(820px, 100%); margin: 0 auto; padding: 48px 40px 72px; animation: fadeUp .5s var(--ease); }
.desk-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.desk-head .eyebrow { flex-basis: 100%; }
.desk-head h2 { margin: 0; font: 800 clamp(28px, 3.4vw, 46px)/1.25 var(--font-display); letter-spacing: .02em; }
.desk-kind { margin-left: auto; }
.desk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.desk-fields input { min-height: 54px; font-size: 17px; font-weight: 700; border-radius: 16px; padding-inline: 18px; }
.desk-state { margin: -8px 0 0; font-size: 12px; color: var(--muted); }
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 20px 16px; text-align: center; color: var(--muted);
  font-size: 13px; cursor: pointer; background: var(--paper); display: grid; gap: 4px; justify-items: center; transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}
.drop b { color: var(--ink); }
.drop small { font-size: 11px; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--surface); }
.drop input { display: none; }
.drop-icon { width: 30px; height: 36px; border: 1.5px solid var(--ink); border-radius: 3px; position: relative; margin-bottom: 6px; background: var(--surface); transition: transform .35s var(--ease); }
.drop-icon::after { content: "+"; position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--shu); color: #fff; font: 700 13px/18px var(--font-mono); }
.drop:hover .drop-icon { transform: translateY(-4px) rotate(-4deg); }
.desk-drop { min-height: 340px; align-content: center; gap: 10px; padding: 40px 24px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-paper); }
.desk-drop b { font: 800 clamp(19px, 2.2vw, 25px)/1.4 var(--font-display); letter-spacing: .03em; }
.desk-drop > span:not(.drop-icon) { font-size: 13.5px; }
.desk-drop .drop-icon { width: 46px; height: 58px; margin-bottom: 14px; }
.desk-drop .drop-icon::after { width: 22px; height: 22px; font: 700 15px/22px var(--font-mono); right: -11px; bottom: -11px; }
.desk-drop:hover, .desk-drop.over { border-color: var(--shu); }
.desk-drop.over { background: var(--shu-soft); transform: scale(1.01); }
.desk-article { display: grid; gap: 16px; padding: 28px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-paper); }
.desk-article .actions { display: flex; justify-content: flex-end; }
.desk-prog { display: grid; gap: 6px; }
.desk-prog .progress { height: 38px; }
.desk-prog .progress span { font-size: 12px; font-weight: 500; color: var(--ink); }
.desk-prog-note { margin: 0; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { position: relative; height: 28px; background: var(--sunk); border-radius: 999px; overflow: hidden; display: grid; place-items: center; }
.progress i { position: absolute; inset: 0; background: color-mix(in srgb, var(--shu) 22%, var(--surface)); transform-origin: left; transform: scaleX(0); transition: transform .2s linear; }
.progress span { position: relative; font-size: 11px; letter-spacing: .06em; color: var(--ink-2); }
.dz-wrap { display: grid; gap: 8px; }
.picks { display: grid; gap: 6px; max-height: min(46vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.picks:empty { display: none; }
.picks-tally { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.pick { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 12px; padding: 5px; border-radius: 12px; background: var(--paper); animation: pop .2s var(--ease); }
.pick .thumb { width: 44px; height: 44px; border-radius: 8px; }
.pick .spec { min-width: 0; display: grid; }
.pick .spec span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .spec b { font: 500 12px/1.4 var(--font-mono); }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; transition: background-color .2s, border-color .2s, color .2s; }
.seg button:hover { border-color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.dropall { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--ink) 55%, transparent); backdrop-filter: blur(6px); animation: fadeIn .15s var(--ease); pointer-events: none; }
.dropall-sheet { display: grid; justify-items: center; gap: 10px; text-align: center; width: min(580px, 100%); padding: 56px 28px; background: var(--surface); color: var(--ink); border: 2px dashed var(--shu); border-radius: 32px; box-shadow: var(--shadow-pop); animation: fadeUp .25s var(--ease); }
.dropall-sheet b { font: 800 clamp(22px, 3vw, 30px)/1.35 var(--font-display); letter-spacing: .03em; }
.dropall-sheet > span:last-child { font-size: 13px; color: var(--muted); }
.dropall-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 8px; border-radius: 50%; background: var(--shu); color: #fff; font: 800 30px/1 var(--font-display); transform: rotate(-8deg); }

/* ---------- detail ---------- */
.detail { min-height: 0; overflow-y: auto; }
.detail-inner { max-width: 1360px; padding: 32px 40px 88px; display: grid; gap: 26px; animation: fadeUp .45s var(--ease); }
.tombo { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.tombo::before, .tombo::after { content: ""; position: absolute; background: var(--ink); opacity: .45; }
.tombo::before { width: 18px; height: 1px; }
.tombo::after { width: 1px; height: 18px; }
.tombo.tl { left: -24px; top: -24px; } .tombo.tl::before { top: 24px; left: 0; } .tombo.tl::after { left: 24px; top: 0; }
.tombo.tr { right: -24px; top: -24px; } .tombo.tr::before { top: 24px; right: 0; } .tombo.tr::after { right: 24px; top: 0; }
.tombo.bl { left: -24px; bottom: -24px; } .tombo.bl::before { bottom: 24px; left: 0; } .tombo.bl::after { left: 24px; bottom: 0; }
.tombo.br { right: -24px; bottom: -24px; } .tombo.br::before { bottom: 24px; right: 0; } .tombo.br::after { right: 24px; bottom: 0; }

.d-head { display: flex; gap: 24px; align-items: center; }
.d-head .back { flex: none; align-self: flex-start; background: transparent; }
.on-sp { display: none; }
.d-title { flex: 1; min-width: 0; display: grid; gap: 8px; }
.d-title h2 { margin: 0; font: 800 clamp(24px, 3vw, 42px)/1.28 var(--font-display); letter-spacing: .02em; text-wrap: balance; overflow-wrap: anywhere; }
.stamp-slot { padding: 4px 8px 4px 0; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line-strong); }
.fact { padding: 16px 22px; display: grid; gap: 4px; min-width: 0; border-left: 1px solid var(--line); align-content: start; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt { font: 500 10.5px/1.3 var(--font-mono); color: var(--muted); letter-spacing: .12em; }
.fact dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; font-size: 14px; }
.fact dd small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.fact .big { font: 400 38px/1 var(--font-latin); color: var(--shu); }

/* the verdict: OK on the left, "please fix" on the right */
.decide { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 14px; }
.dec-col { display: grid; gap: 12px; align-content: start; padding: 22px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-paper); transition: background-color .4s, color .4s; }
.dec-ok { align-content: center; }
.dec-h { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.btn.approve.big { min-height: 64px; width: 100%; padding: 0 20px; font-size: 17px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 14px 28px -14px var(--approved); }
.decide.approved .dec-ok { background: var(--approved); color: #fff; }
.decide.approved .dec-ok .dec-h { display: none; }
.decide-done { display: grid; gap: 4px; font: 800 26px/1.3 var(--font-display); letter-spacing: .04em; color: #fff; }
.decide-done small { font: 500 12px/1.5 var(--font-body); letter-spacing: 0; opacity: .85; }
.decide.approved .btn.undo { border-color: rgba(255, 255, 255, .5); color: #fff; }
.decide.approved .btn.undo:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.decide.revise .dec-fix { background: var(--yamabuki-soft); }
.dec-fix textarea { min-height: 76px; }
.dec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dec-row .whoami { margin-left: auto; }
.dec-fix .pinnote { margin: -4px 0 0; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.pin-set { color: var(--shu); margin-right: 6px; }
.whoami { margin: 0; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.whoami b { color: var(--ink-2); }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.proof { display: grid; gap: 14px; min-width: 0; }
.vers { display: flex; gap: 6px; flex-wrap: wrap; align-items: stretch; }
.ver { border: 1px solid var(--line-strong); background: transparent; border-radius: var(--r); padding: 6px 14px; cursor: pointer; display: grid; text-align: left; line-height: 1.35; transition: border-color .2s; }
.ver:hover { border-color: var(--ink); }
.ver b { font: 500 13px/1.3 var(--font-mono); }
.ver small { color: var(--muted); font-size: 11px; }
.ver[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.ver[aria-pressed=true] small { color: inherit; opacity: .7; }
.vnote { font-size: 13px; background: var(--surface); border-radius: var(--r); padding: 12px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vnote a { word-break: break-all; }
.filestrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.fchip { flex: none; display: grid; grid-template-columns: 42px auto auto; gap: 10px; align-items: center; padding: 6px 14px 6px 6px; border: 1px solid transparent; border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; max-width: 280px; transition: border-color .2s; }
.fchip:hover { border-color: var(--line-strong); }
.fchip[aria-pressed=true] { border-color: var(--ink); }
.fchip .thumb { width: 42px; height: 42px; border-radius: 8px; }
.fchip .spec { display: grid; gap: 1px; min-width: 0; }
.fchip .spec b { font: 500 12px/1.3 var(--font-mono); }
.fchip .spec small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.fchip-n { background: var(--shu); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.specbar { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 12px; color: var(--muted); align-items: baseline; }
.specbar b { color: var(--ink); font: 500 12.5px/1 var(--font-mono); margin-left: 5px; }
.specbar a { margin-left: auto; color: var(--ink); }

.stage { position: relative; border-radius: var(--r-l); max-height: 82vh; overflow: auto; text-align: center; padding: 52px 44px; background: var(--sunk); }
.sheet { display: inline-block; max-width: 100%; vertical-align: top; }
.imgwrap { position: relative; display: inline-block; max-width: 100%; vertical-align: top; background: var(--surface); }
.imgwrap img { display: block; max-width: 100%; height: auto; box-shadow: var(--shadow-pop); user-select: none; }
.stage.pinnable .imgwrap { cursor: crosshair; }
/* teardrop whose sharp bottom-left corner sits exactly on the marked point */
.pin {
  position: absolute; width: 28px; height: 28px; margin: -28px 0 0 0; border-radius: 50% 50% 50% 0;
  background: var(--shu); color: #fff; border: 2px solid #fff; font: 700 12px/24px var(--font-mono); text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35); cursor: pointer; padding: 0;
  transform-origin: 0 100%; transition: transform .2s var(--ease);
  animation: pinIn .35s cubic-bezier(.3, 1.6, .5, 1) both;
}
.pin:hover, .pin.hl { transform: scale(1.22); z-index: 3; }
.pin[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 30px; bottom: 22px; width: max-content; max-width: 260px;
  background: var(--ink); color: var(--bg); font: 500 12px/1.55 var(--font-body); text-align: left; white-space: normal;
  padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow-pop); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s var(--ease);
}
.pin[data-tip]:hover::after, .pin[data-tip]:focus-visible::after { opacity: 1; transform: none; }
.pin.done { background: var(--done); }
.pin.new { background: var(--ink); color: var(--bg); border-color: var(--surface); }
.pin.new::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--ink); animation: pinRing 1.2s ease-out infinite; }

/* before/after wipe between two versions */
.cmp { position: relative; display: inline-block; max-width: 100%; vertical-align: top; user-select: none; --pos: 50%; }
.cmp-after { display: block; max-width: 100%; height: auto; box-shadow: var(--shadow-pop); }
.cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background: var(--surface); }
.cmp-before img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--shu); pointer-events: none; }
.cmp-handle::before { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--shu); color: #fff; display: grid; place-items: center; font: 700 14px/1 var(--font-mono); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.cmp-handle span { position: absolute; top: 10px; background: var(--ink); color: var(--bg); font-size: 11px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.cmp-handle span:first-child { right: 10px; }
.cmp-handle span:last-child { left: 10px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp:focus-within .cmp-handle::before { outline: 3px solid var(--accent); outline-offset: 2px; }
.vidwrap { position: relative; display: inline-block; max-width: 100%; vertical-align: top; background: #000; box-shadow: var(--shadow-pop); }
.vidwrap video { display: block; max-width: 100%; max-height: 72vh; }
.lpcard { display: grid; gap: 16px; justify-items: start; padding: 36px 32px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-paper); text-align: left; max-width: 640px; margin: 0 auto; }
.lpcard-url { font-size: 13px; word-break: break-all; color: var(--accent); }
.pdfbox { padding: 48px 20px; display: grid; gap: 12px; justify-items: center; background: var(--surface); border-radius: var(--r-l); }
.pdfbox p { margin: 0; color: var(--muted); }

.side { display: grid; gap: 14px; position: sticky; top: 0; }
.panel { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-paper); overflow: hidden; }
.panel h3 { margin: 0; padding: 16px 20px; font: 800 15px/1.3 var(--font-display); letter-spacing: .05em; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel h3 small { font: 500 11px/1 var(--font-mono); color: var(--muted); }
.clist { max-height: 46vh; overflow-y: auto; }
.cm { padding: 14px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; transition: background-color .25s; }
.cm:last-child { border-bottom: 0; }
.cm.hl { background: var(--shu-soft); }
.cm.done .cm-body { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--done); }
.cm-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.cm-head .no { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--shu); color: #fff; font: 700 11px/22px var(--font-mono); text-align: center; flex: none; border: 0; padding: 0; cursor: pointer; }
.cm-head .no.gen { border-radius: 6px; background: var(--ink-2); font: 700 10px/22px var(--font-body); cursor: default; }
.cm.done .no { background: var(--done); }
.cm-head .name { color: var(--ink); font-weight: 700; font-size: 12.5px; }
.cm-head .role { font-size: 9.5px; letter-spacing: .08em; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }
.cm-head .sp, .cm-foot .sp { flex: 1; }
.cm-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-foot { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.cm-foot label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--muted); }
.cm-foot input { accent-color: var(--ink); }
.cm-del { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--warn); }
.btn.cm-delbtn { min-height: 28px; padding: 0 11px; font-size: 12px; color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: transparent; }
.btn.cm-delbtn:hover { background: var(--shu-soft); border-color: var(--warn); }
.pinnote { font-size: 12px; color: var(--muted); }
.nocm { padding: 18px 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }

.timeline { list-style: none; margin: 0; padding: 12px 20px 16px; display: grid; }
.timeline li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 7px 0; font-size: 13px; position: relative; }
.timeline li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--muted); position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: -8px; width: 1px; background: var(--line); }
.timeline li.approve::before { background: var(--approved); }
.timeline li.revise::before { background: var(--yamabuki); }
.timeline li.submit::before, .timeline li.resubmit::before { background: var(--ink); }
.timeline .when { color: var(--muted); font-size: 11.5px; }
.timeline .note { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: 12px; margin-top: 2px; }

.resub summary { cursor: pointer; padding: 16px 20px; font: 800 15px/1.3 var(--font-display); letter-spacing: .05em; list-style: none; display: flex; justify-content: space-between; }
.resub summary::-webkit-details-marker { display: none; }
.resub summary::after { content: "＋"; color: var(--muted); font-family: var(--font-body); }
.resub[open] summary { border-bottom: 1px solid var(--line); }
.resub[open] summary::after { content: "−"; }
.resub form { padding: 16px 20px 20px; display: grid; gap: 12px; }
.dangerzone { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* ---------- dialogs ---------- */
dialog { border: 0; border-radius: 28px; padding: 0; width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
dialog[open] { animation: fadeUp .3s var(--ease); }
dialog:has(.wide) { width: min(840px, calc(100vw - 32px)); }
dialog::backdrop { background: color-mix(in srgb, #121212 50%, transparent); backdrop-filter: blur(6px); }
.dlg { display: grid; gap: 18px; padding: 34px; }
.dlg-head { display: grid; gap: 6px; }
.dlg h2 { margin: 0; font: 800 28px/1.3 var(--font-display); letter-spacing: .03em; }
.dlg h3 { margin: 0; font: 800 16px/1.3 var(--font-display); }
.dlg .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.dlg .actions { display: flex; justify-content: flex-end; gap: 8px; }
.ptable { display: grid; gap: 18px; max-height: min(52vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.pasp h4 { margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; font: 800 17px/1.3 var(--font-display); letter-spacing: .04em; }
.pasp h4 small { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.prow-main { display: grid; min-width: 0; line-height: 1.4; }
.prow-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-main small { font-size: 11px; color: var(--muted); }
.prow-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.prow-warn { font-size: 12px; color: var(--warn); max-width: 340px; }
.pform { display: grid; gap: 12px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }

#toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 13px 22px; border-radius: 999px; font-size: 13px; font-weight: 700; z-index: 100; box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); animation: fadeUp .3s var(--ease); }
#toast.bad { background: var(--warn); color: #fff; border-radius: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .lp-marquee > div { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .work { grid-template-columns: 1fr; }
  .side { position: static; }
  .clist { max-height: none; }
}
@media (max-width: 1080px) {
  .tally { gap: 16px; padding-left: 16px; }
}
@media (max-width: 860px) {
  .main { grid-template-columns: 1fr; }
  .ledger { border-right: 0; }
  .main.has-detail .ledger { display: none; }
  .main:not(.has-detail) .detail { display: none; }
  .d-head { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .d-head .back { display: inline-flex; flex-basis: 100%; justify-content: flex-start; padding-left: 0; border-color: transparent; }
  .detail-inner { padding: 14px max(18px, env(safe-area-inset-right, 0px)) 72px max(18px, env(safe-area-inset-left, 0px)); gap: 18px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 14px 16px; }
  .fact:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .decide { grid-template-columns: 1fr; }
  .dec-col { padding: 18px; }
  .dec-row > .btn { flex: 1; justify-content: center; }
  .stamp { width: 78px; height: 78px; }
  .stamp b { font-size: 16px; }
  .stamp .s-date, .stamp .s-who { font-size: 9.5px; }
  .stage { max-height: none; padding: 36px 30px; }
  .tally { display: none; }
  .dlg { padding: 24px; }
  .dlg .grid2 { grid-template-columns: 1fr; }
  /* phones: one page that scrolls with the finger — no small boxes scrolling inside boxes */
  .shell { height: auto; min-height: 100%; display: block; }
  .topbar { position: sticky; top: 0; z-index: 30; flex-wrap: wrap; gap: 6px 10px; padding-block: 11px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .topbar .sp { display: none; }
  .main { display: flex; flex-direction: column; min-height: 0; }
  .ledger { display: block; }
  .list, .detail, .clist, .picks { overflow: visible; max-height: none; min-height: 0; }
  .side { position: static; }
  /* phones are for checking, not uploading: no upload desk or resubmit form */
  .resub, .dropall { display: none !important; }
  .on-pc { display: none; }
  .on-sp { display: inline; }
  .scope { order: 3; flex: 1 0 100%; flex-wrap: nowrap; padding-left: 0; border-left: 0; overflow: hidden; white-space: nowrap; }
  .scope b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ktabs, .proj-bar { margin-inline: 18px; }
  .proj-bar { padding-inline: 0; margin-top: 0; }
  .ledger-tools { padding-inline: 18px; }
  .row-item { padding-inline: 18px; }
  .prow { grid-template-columns: 1fr; }
  .prow-act { justify-content: flex-start; }

  .lp-bar { padding-block: 16px; }
  .lp-hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-block: 20px 64px; }
  .lp-hero h1 { font-size: min(9.4vw, 56px); }
  .lp-demo { width: min(400px, 100%); justify-self: center; }
  .lp-sec { grid-template-columns: 1fr; gap: 28px; padding-block: 64px; }
  .lp-sec-head { position: static; }
  .lp-vs { grid-template-columns: 1fr; }
  .lp-card { border-radius: 24px; }
  .lp-start { grid-template-columns: 1fr; border-radius: 24px; }
  .lp-start-row { grid-template-columns: 1fr; }
}
