/* VENUS WEB（運営会社＝受注側の客の WEB）の見た目。
   - 地は生成り、文字・線・主なボタンは墨、朱は「未充足の印」と「締めが近い」の一点だけ（利用者の指示 2026-12-04・LIFElive #1939）。
     色の値は RhetoricISM の tokens.json（culture：墨 #141414・白 #FAFAFA・生成り #F4F2EE・朱（白地用）#C8321E）と semantic の値だけを使う。
   - ダークモードは作らない。端末の設定（prefers-color-scheme）では切り替えず、入力欄・スクロールの棒も明るいまま（color-scheme: light）。
   - 書体は端末のものだけ（外部の書体を読まない）。Windows は Yu Gothic UI／Meiryo。
   - 重いアニメーション・背景のぼかし・大きな画像を使わない（LIFElive #1931）。動きは押した操作に答える短い色の変化だけ。
   - 幅で3段階に組み替える（〜599 スマホ／600〜1023 タブレット・PC の拡大表示／1024〜 PC）。 */
:root {
  color-scheme: light;
  --v-ink: #141414;
  --v-paper: #F4F2EE;
  --v-white: #FAFAFA;
  --v-vermilion: #C8321E;
  --v-muted: #5A5A5A;
  --v-line: #E2DFD9;
  --v-line-strong: #8C877F; /* 入力欄・枠の線（生成り・白に対して 3:1 以上） */
  --v-veil: rgba(20, 20, 20, .45);
  --v-s-xs: 4px; --v-s-s: 8px; --v-s-m: 16px; --v-s-l: 24px; --v-s-xl: 40px;
  --v-r-s: 4px; --v-r-m: 8px;
  --v-touch: 44px;
  --v-font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo UI", "Meiryo", system-ui, sans-serif;
  --v-side: 232px;
  --p-icon-stroke: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--v-paper); color: var(--v-ink);
  font-family: var(--v-font); font-size: 1rem; line-height: 1.65;
  font-feature-settings: "palt" 0;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--v-ink); outline-offset: 2px; }
.v-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.v-hidden:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip: auto; z-index: 9; padding: 8px 16px; background: var(--v-ink); color: var(--v-white); border-radius: var(--v-r-m); }
.v-num { font-variant-numeric: tabular-nums; }
svg.p-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: var(--p-icon-stroke); stroke-linecap: round; stroke-linejoin: round; }

/* ---- 起動・ログイン ---- */
.v-boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.v-boot-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--v-ink); }
.v-sign {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--v-s-l) var(--v-s-m);
}
.v-sign-card { width: 100%; max-width: 420px; }
.v-sign-title { font-size: 2rem; font-weight: 700; letter-spacing: .06em; line-height: 1.2; margin: 0 0 var(--v-s-s); }
.v-sign-lead { color: var(--v-muted); margin: 0 0 var(--v-s-xl); }
.v-sign .v-btn { width: 100%; }
.v-sign .v-by { margin-top: var(--v-s-xl); }

/* ---- 名前・署名 ---- */
.v-word { font-weight: 700; letter-spacing: .06em; font-size: 1.125rem; line-height: 1.2; margin: 0; }
.v-by { font-size: .75rem; color: var(--v-muted); letter-spacing: .02em; }
.v-by b { font-weight: 600; color: var(--v-ink); }
.v-dot { color: var(--v-vermilion); }

/* ---- 枠組み ---- */
.v-shell { min-height: 100vh; min-height: 100dvh; }
.v-top { display: flex; align-items: center; gap: var(--v-s-m); padding: 0 var(--v-s-m); min-height: 56px; border-bottom: 1px solid var(--v-line); background: var(--v-paper); }
.v-top .v-co { color: var(--v-muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v-nav { display: flex; }
.v-nav a {
  display: flex; align-items: center; gap: var(--v-s-s); min-height: var(--v-touch); padding: 0 var(--v-s-m);
  text-decoration: none; color: var(--v-ink); border-radius: var(--v-r-m); position: relative; white-space: nowrap;
}
.v-nav a:hover { background: rgba(20, 20, 20, .05); }
.v-nav a[aria-current="page"] { background: var(--v-ink); color: var(--v-white); }
.v-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--v-vermilion); color: var(--v-white); font-size: .75rem; line-height: 20px; text-align: center; font-weight: 700; }
.v-main { padding: var(--v-s-l) var(--v-s-m) var(--v-s-xl); max-width: 920px; }
.v-foot { padding: var(--v-s-m); }

/* PC（1024〜）：左に縦の目次、右に中身 */
@media (min-width: 1024px) {
  .v-shell { display: grid; grid-template-columns: var(--v-side) minmax(0, 1fr); }
  .v-side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; border-right: 1px solid var(--v-line); padding: var(--v-s-l) var(--v-s-m); overflow-y: auto; }
  .v-side .v-co { color: var(--v-muted); font-size: .875rem; margin: var(--v-s-xs) 0 var(--v-s-l); overflow-wrap: anywhere; }
  .v-nav { flex-direction: column; gap: 2px; }
  .v-nav .v-badge { margin-left: auto; }
  .v-side .v-by { margin-top: auto; padding-top: var(--v-s-l); }
  .v-top, .v-tabs, .v-foot { display: none; }
  .v-main { padding: var(--v-s-xl) var(--v-s-xl) var(--v-s-xl); }
}
/* タブレット・PC の拡大表示（600〜1023）：上に名前、その下に横の目次 */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .v-side { display: none; }
  .v-tabs { position: sticky; top: 0; z-index: 2; background: var(--v-paper); border-bottom: 1px solid var(--v-line); padding: var(--v-s-xs) var(--v-s-s); overflow-x: auto; }
  .v-tabs .v-nav { gap: 2px; }
  .v-main { padding: var(--v-s-l); }
}
/* スマホ（〜599）：下に目次（指の届く所） */
@media (max-width: 599.98px) {
  .v-side { display: none; }
  .v-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--v-paper); border-top: 1px solid var(--v-line);
    padding: 0 0 env(safe-area-inset-bottom);
  }
  .v-tabs .v-nav { justify-content: space-around; }
  .v-tabs .v-nav a { flex: 1 1 0; flex-direction: column; gap: 0; padding: 6px 2px; min-height: 56px; justify-content: center; font-size: .6875rem; border-radius: 0; }
  .v-tabs .v-nav a[aria-current="page"] { background: transparent; color: var(--v-ink); font-weight: 700; box-shadow: inset 0 2px 0 var(--v-ink); }
  .v-tabs .v-badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  .v-main { padding: var(--v-s-m) var(--v-s-m) calc(88px + env(safe-area-inset-bottom)); }
  .v-foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---- 見出し・文 ---- */
.v-h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin: 0 0 var(--v-s-l); }
.v-h2 { font-size: 1rem; font-weight: 700; margin: var(--v-s-xl) 0 var(--v-s-s); display: flex; align-items: baseline; gap: var(--v-s-s); }
.v-head + .v-h2, .v-head + .v-banner + .v-h2 { margin-top: 0; }
.v-h2 .v-count { color: var(--v-muted); font-weight: 400; font-size: .875rem; }
.v-note { color: var(--v-muted); font-size: .875rem; margin: var(--v-s-xs) 0 0; }
.v-head { display: flex; align-items: center; justify-content: space-between; gap: var(--v-s-m); flex-wrap: wrap; margin-bottom: var(--v-s-l); }
.v-head .v-h1 { margin: 0; }

/* ---- ボタン ---- */
.v-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--v-s-s);
  min-height: var(--v-touch); padding: 0 var(--v-s-l); border-radius: var(--v-r-m);
  border: 1px solid var(--v-ink); background: var(--v-ink); color: var(--v-white);
  font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .12s, color .12s;
}
.v-btn:hover { box-shadow: inset 0 0 0 100px rgba(250, 250, 250, .12); }
.v-btn.quiet { background: transparent; color: var(--v-ink); border-color: var(--v-line-strong); font-weight: 600; }
.v-btn.quiet:hover { background: rgba(20, 20, 20, .05); }
.v-btn.warn { background: transparent; color: var(--v-vermilion); border-color: var(--v-vermilion); }
.v-btn.warn:hover { background: rgba(200, 50, 30, .06); }
.v-btn[disabled] { opacity: .45; cursor: default; }
.v-btn.small { min-height: 36px; padding: 0 var(--v-s-m); font-size: .875rem; }
.v-actions { display: flex; flex-wrap: wrap; gap: var(--v-s-s); margin-top: var(--v-s-l); }
@media (max-width: 599.98px) { .v-actions .v-btn { flex: 1 1 100%; } }

/* ---- 発注の票（カード） ---- */
.v-slips { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--v-s-s); }
.v-slip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v-s-xs) var(--v-s-m); align-items: center;
  background: var(--v-white); border: 1px solid var(--v-line); border-radius: var(--v-r-m);
  padding: var(--v-s-m); text-decoration: none; color: inherit;
}
a.v-slip:hover { border-color: var(--v-line-strong); }
.v-slip-when { font-weight: 700; display: flex; flex-wrap: wrap; gap: 0 var(--v-s-s); align-items: baseline; }
.v-slip-when .v-time { font-weight: 400; color: var(--v-muted); font-size: .875rem; }
.v-slip-where { overflow-wrap: anywhere; }
.v-slip-meta { color: var(--v-muted); font-size: .875rem; display: flex; flex-wrap: wrap; gap: 0 var(--v-s-m); }
.v-slip-meta .soon { color: var(--v-vermilion); font-weight: 700; }
.v-slip-fill { grid-row: 1 / span 3; grid-column: 2; text-align: right; display: grid; justify-items: end; gap: var(--v-s-xs); }
.v-slip.cancelled { opacity: .7; }
.v-slip.cancelled .v-slip-where { text-decoration: line-through; }
@media (max-width: 599.98px) {
  .v-slip { grid-template-columns: minmax(0, 1fr); }
  .v-slip-fill { grid-row: auto; grid-column: 1; justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; justify-content: start; gap: var(--v-s-s); }
}

/* n／m と人数の枠（この画面の主役。そろった人数だけ墨で塗る） */
.v-fill { font-size: 1.5rem; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.v-fill small { font-size: .875rem; font-weight: 400; color: var(--v-muted); margin-left: 2px; }
.v-slots { display: flex; flex-wrap: wrap; gap: 3px; max-width: 168px; justify-content: flex-end; }
.v-slot { width: 11px; height: 11px; border: 1.5px solid var(--v-ink); border-radius: 2px; }
.v-slot.on { background: var(--v-ink); }
.v-slots .v-more { font-size: .75rem; color: var(--v-muted); line-height: 11px; }
@media (max-width: 599.98px) { .v-slots { justify-content: flex-start; } }

/* 状態の印。未充足だけ朱の丸印 */
.v-state { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--v-s-s); border-radius: 12px; font-size: .75rem; font-weight: 700; border: 1px solid var(--v-line-strong); color: var(--v-ink); white-space: nowrap; }
.v-state.filled { background: var(--v-ink); border-color: var(--v-ink); color: var(--v-white); }
.v-state.cancelled { color: var(--v-muted); }
.v-seal {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--v-vermilion); color: var(--v-vermilion); font-weight: 700; font-size: .75rem; letter-spacing: .04em; line-height: 1.1; text-align: center;
}
.v-seal.small { width: 40px; height: 40px; font-size: .6875rem; border-width: 1.5px; }

/* ---- 詳細 ---- */
.v-sheet { background: var(--v-white); border: 1px solid var(--v-line); border-radius: var(--v-r-m); padding: var(--v-s-l); }
.v-big { display: flex; align-items: center; gap: var(--v-s-l); flex-wrap: wrap; margin-bottom: var(--v-s-l); }
.v-big .v-fill { font-size: 3rem; }
.v-big .v-slots { max-width: 320px; justify-content: flex-start; }
.v-big .v-slot { width: 16px; height: 16px; }
.v-dl { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: var(--v-s-s) var(--v-s-m); margin: 0; }
.v-dl dt { color: var(--v-muted); }
.v-dl dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 599.98px) { .v-dl { grid-template-columns: minmax(0, 1fr); gap: 0; } .v-dl dd { margin-bottom: var(--v-s-s); } .v-sheet { padding: var(--v-s-m); } }
.v-back { display: inline-flex; align-items: center; min-height: var(--v-touch); margin-bottom: var(--v-s-s); text-decoration: none; color: var(--v-muted); }
.v-back:hover { color: var(--v-ink); }

/* ---- 入力 ---- */
.v-form { display: grid; gap: var(--v-s-l); max-width: 640px; }
.v-field { display: grid; gap: var(--v-s-xs); min-width: 0; }
.v-field > label, .v-field > .v-label { font-weight: 700; }
.v-field .v-req { color: var(--v-muted); font-weight: 400; font-size: .8125rem; margin-left: var(--v-s-xs); }
.v-input, .v-select, .v-textarea {
  width: 100%; min-height: var(--v-touch); padding: 8px 12px; border: 1px solid var(--v-line-strong); border-radius: var(--v-r-m);
  background: var(--v-white); color: var(--v-ink);
}
.v-textarea { min-height: 112px; resize: vertical; }
.v-input[aria-invalid="true"], .v-select[aria-invalid="true"], .v-textarea[aria-invalid="true"] { border-color: var(--v-vermilion); border-width: 2px; }
.v-error { color: var(--v-vermilion); font-size: .875rem; margin: 0; }
.v-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v-s-m); }
@media (max-width: 359.98px) { .v-row { grid-template-columns: minmax(0, 1fr); } }
.v-picks { list-style: none; margin: var(--v-s-xs) 0 0; padding: 0; border: 1px solid var(--v-line); border-radius: var(--v-r-m); background: var(--v-white); max-height: 264px; overflow-y: auto; }
.v-picks button { display: block; width: 100%; text-align: left; min-height: var(--v-touch); padding: var(--v-s-s) 12px; border: 0; border-bottom: 1px solid var(--v-line); background: transparent; cursor: pointer; }
.v-picks li:last-child button { border-bottom: 0; }
.v-picks button:hover { background: rgba(20, 20, 20, .04); }
.v-picks small { display: block; color: var(--v-muted); font-size: .8125rem; }
.v-picked { display: flex; align-items: center; justify-content: space-between; gap: var(--v-s-s); padding: var(--v-s-s) 12px; border: 1px solid var(--v-ink); border-radius: var(--v-r-m); background: var(--v-white); }
.v-counter { color: var(--v-muted); font-size: .8125rem; text-align: right; margin: 0; }

/* ---- お知らせ・空 ---- */
.v-banner { border: 1px solid var(--v-line-strong); background: var(--v-white); border-radius: var(--v-r-m); padding: 12px var(--v-s-m); margin: 0 0 var(--v-s-m); }
.v-banner.alert { border-color: var(--v-vermilion); }
.v-banner.alert strong { color: var(--v-vermilion); }
.v-empty { padding: var(--v-s-l) var(--v-s-m); border: 1px dashed var(--v-line-strong); border-radius: var(--v-r-m); color: var(--v-muted); }
.v-empty p { margin: 0 0 var(--v-s-s); }
.v-loading { color: var(--v-muted); }
.v-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--v-line); }
.v-list > li { border-bottom: 1px solid var(--v-line); }
.v-list .v-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px var(--v-s-xs); min-height: var(--v-touch); text-decoration: none; color: inherit; }
a.v-item:hover { background: rgba(20, 20, 20, .03); }
.v-item-body { min-width: 0; flex: 1; }
.v-item-title { font-weight: 700; }
.v-item-sub { color: var(--v-muted); font-size: .875rem; overflow-wrap: anywhere; }
.v-mark { width: 8px; height: 8px; border-radius: 50%; margin-top: 9px; flex: none; background: transparent; border: 1.5px solid var(--v-line-strong); }
.v-mark.unread { background: var(--v-ink); border-color: var(--v-ink); }
.v-mark.unread.alert { background: var(--v-vermilion); border-color: var(--v-vermilion); }
.v-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--v-s-l) + env(safe-area-inset-bottom)); z-index: 5;
  background: var(--v-ink); color: var(--v-white); padding: 12px var(--v-s-l); border-radius: var(--v-r-m); max-width: calc(100% - 32px);
}
@media (max-width: 599.98px) { .v-toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* ---- 確認の窓（ぼかしは使わない） ---- */
.v-dialog { border: 1px solid var(--v-line-strong); border-radius: var(--v-r-m); padding: var(--v-s-l); max-width: min(440px, calc(100% - 32px)); background: var(--v-white); color: var(--v-ink); }
.v-dialog::backdrop { background: var(--v-veil); }
.v-dialog h2 { margin: 0 0 var(--v-s-s); font-size: 1.125rem; }
.v-dialog p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .v-btn { transition: none; } }
