/* =========================================================================
   NOCT — Night Operations Compliance Terminal（紙芝居デモ）
   配色: オブシディアン × ゴールド × ネオン・バイオレット/マゼンタ。
   ナイトワークの高級感 × コンプライアンスの厳格さ。全て .noct 配下にスコープ。
   ========================================================================= */

.noct {
  --ink: #05060c;
  --bg-0: #08090f;
  --bg-1: #0d0f18;
  --bg-2: #12141f;
  --surface: #161826;
  --surface-2: #1c1f30;
  --surface-3: #23273c;
  --line: #2a2e45;
  --line-soft: #21243550;
  --text: #ecebf5;
  --muted: #9a9cb8;
  --dim: #6a6d8c;

  --gold: #e9c46a;
  --gold-2: #d4a94a;
  --gold-soft: #e9c46a1a;
  --violet: #a878ff;
  --violet-2: #8b5cf6;
  --violet-soft: #a878ff1a;
  --magenta: #f26aa8;
  --magenta-soft: #f26aa81a;
  --cyan: #5cd0e0;
  --emerald: #34d399;
  --emerald-soft: #34d3991a;
  --amber: #fbbf24;
  --amber-soft: #fbbf241f;
  --red: #f87171;
  --red-soft: #f871711f;
  --blue: #60a5fa;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;
  --shadow-md: 0 12px 34px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85);
  --glow-gold: 0 0 0 1px rgba(233, 196, 106, .3), 0 8px 30px -8px rgba(233, 196, 106, .28);
  --glow-violet: 0 0 0 1px rgba(168, 120, 255, .3), 0 8px 30px -8px rgba(168, 120, 255, .3);

  --font-display: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  /* ネイティブ部品（日付ピッカー・select のリスト・チェックボックス・スクロールバー）を暗色に */
  color-scheme: dark;
  accent-color: var(--gold);

  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 88% -10%, rgba(168, 120, 255, .14), transparent 58%),
    radial-gradient(900px 520px at -6% 6%, rgba(233, 196, 106, .09), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(242, 106, 168, .08), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

.noct *,
.noct *::before,
.noct *::after { box-sizing: border-box; }

.noct .noct-ic { display: inline-block; vertical-align: middle; flex: none; }
.noct a { color: inherit; text-decoration: none; }
.noct .hidden { display: none !important; }
.noct .noct-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- shell / sidebar --------------------------------------------------- */
#noct-nav-toggle { display: none; }

.noct .noct-shell { display: flex; min-height: 100vh; }

.noct .noct-sidebar {
  width: 254px; flex: none; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(20, 22, 34, .92), rgba(11, 12, 20, .96));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; z-index: 20;
}

.noct .noct-brand { display: flex; align-items: center; gap: 11px; padding: 8px 8px 16px; }
.noct .noct-brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--ink);
  background: linear-gradient(140deg, var(--gold), var(--gold-2));
  box-shadow: 0 6px 20px -6px rgba(233, 196, 106, .55);
}
.noct .noct-brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: .18em;
  background: linear-gradient(90deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.noct .noct-brand-sub { font-size: 9.5px; color: var(--dim); font-family: var(--font-mono); letter-spacing: .12em; margin-top: 1px; }

.noct .noct-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.noct .noct-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: var(--muted); font-size: 13.5px; font-weight: 500; position: relative; transition: all .16s ease;
}
.noct .noct-nav a .ic { color: var(--dim); transition: color .16s ease; }
.noct .noct-nav a:hover { background: var(--surface-2); color: var(--text); }
.noct .noct-nav a:hover .ic { color: var(--gold); }
.noct .noct-nav a.active {
  background: linear-gradient(100deg, rgba(233, 196, 106, .14), rgba(168, 120, 255, .1));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(233, 196, 106, .22);
}
.noct .noct-nav a.active .ic { color: var(--gold); }
.noct .noct-nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 3px; background: linear-gradient(var(--gold), var(--violet));
}
.noct .noct-nav a .pill {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  background: var(--violet-soft); color: var(--violet); padding: 1px 7px; border-radius: 999px;
  border: 1px solid rgba(168, 120, 255, .3);
}

.noct .noct-side-foot { margin-top: auto; padding-top: 12px; }
.noct .noct-storechip {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600;
}
.noct .noct-storechip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-soft); animation: noct-pulse 2s infinite; }

/* ---- main / header ----------------------------------------------------- */
.noct .noct-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.noct .noct-header {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 14px;
  padding: 14px 26px; border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 15, .72); backdrop-filter: blur(14px);
}
.noct .noct-menu-toggle { display: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.noct .noct-header-title { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.noct .noct-header-live {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--red); letter-spacing: .1em;
}
.noct .noct-header-live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: noct-live 1.6s infinite; }
.noct .noct-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.noct .noct-header-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--emerald);
  background: var(--emerald-soft); border: 1px solid rgba(52, 211, 153, .28); padding: 5px 11px; border-radius: 999px;
}
.noct .noct-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: linear-gradient(140deg, var(--violet-2), var(--magenta)); color: #fff;
}

.noct .noct-content { padding: 26px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* ---- page head --------------------------------------------------------- */
.noct .noct-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.noct .noct-ph-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.noct .noct-ph-title { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: .02em; }
.noct .noct-ph-sub { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 640px; line-height: 1.6; }
.noct .noct-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 14px; }
.noct .noct-back:hover { color: var(--gold); }

/* ---- grid / cards ------------------------------------------------------ */
.noct .noct-grid { display: grid; gap: 16px; }
.noct .noct-grid.g2 { grid-template-columns: 1fr 1fr; }
.noct .noct-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.noct .noct-grid.g4 { grid-template-columns: repeat(4, 1fr); }
.noct .noct-grid.g23 { grid-template-columns: 1.3fr 1fr; }
.noct .noct-grid.g32 { grid-template-columns: 1fr 1.4fr; }

.noct .noct-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden;
}
.noct .noct-card-pad { padding: 20px; }
.noct .noct-card-glow { box-shadow: var(--shadow-md), var(--glow-gold); }

.noct .noct-sec-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.noct .noct-sec-title .noct-ic { color: var(--gold); }
.noct .noct-sec-sub { color: var(--dim); font-size: 12px; margin-top: 4px; }

/* ---- KPI --------------------------------------------------------------- */
.noct .noct-kpi {
  background: linear-gradient(180deg, var(--surface), var(--bg-1)); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 17px; position: relative; overflow: hidden;
}
.noct .noct-kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent 70%); opacity: .7; }
.noct .noct-kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.noct .noct-kpi-label .noct-ic { color: var(--dim); }
.noct .noct-kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: .01em; }
.noct .noct-kpi-value .u { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.noct .noct-kpi-value.gold { color: var(--gold); }
.noct .noct-kpi-value.violet { color: var(--violet); }
.noct .noct-kpi-value.red { color: var(--red); }
.noct .noct-kpi-delta { font-size: 11px; color: var(--dim); margin-top: 6px; display: flex; align-items: center; gap: 5px; }

/* ---- day flow（起票→会計→勤怠→締め。ダッシュボードの主役）------------- */
.noct .noct-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.noct .noct-flow-step {
  position: relative; padding: 16px 18px 18px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface), var(--bg-1)); border: 1px solid var(--line);
}
.noct .noct-flow-step + .noct-flow-step::before {
  content: ""; position: absolute; left: -13px; top: 30px; width: 14px; height: 1px; background: var(--line);
}
.noct .noct-flow-k { font-size: 11.5px; font-weight: 700; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.noct .noct-flow-v { font-family: var(--font-display); font-size: 21px; font-weight: 800; margin-top: 9px; letter-spacing: .01em; }
.noct .noct-flow-n { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.65; }
.noct .noct-flow-step.is-done .noct-flow-k { color: var(--emerald); }
.noct .noct-flow-step.is-now {
  border-color: rgba(233, 196, 106, .38); box-shadow: var(--glow-gold);
  background: linear-gradient(180deg, var(--gold-soft), var(--bg-1));
}
.noct .noct-flow-step.is-now .noct-flow-k, .noct .noct-flow-step.is-now .noct-flow-v { color: var(--gold); }
.noct .noct-flow-step.is-next { border-style: dashed; }
.noct .noct-flow-step.is-next .noct-flow-v { color: var(--muted); }
@media (max-width: 980px) {
  .noct .noct-flow { grid-template-columns: 1fr 1fr; }
  .noct .noct-flow-step + .noct-flow-step::before { display: none; }
}
@media (max-width: 560px) { .noct .noct-flow { grid-template-columns: 1fr; } }

/* ---- badges ------------------------------------------------------------ */
.noct .noct-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; line-height: 1.7;
}
.noct .b-live { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(52, 211, 153, .3); }
.noct .b-warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(251, 191, 36, .3); }
.noct .b-alert { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, .35); animation: noct-blink 1.3s infinite; }
.noct .b-idle { background: var(--surface-3); color: var(--dim); border-color: var(--line); }
.noct .b-honshi { background: var(--magenta-soft); color: var(--magenta); border-color: rgba(242, 106, 168, .35); }
.noct .b-jonai { background: var(--violet-soft); color: var(--violet); border-color: rgba(168, 120, 255, .35); }
.noct .b-douhan { background: var(--gold-soft); color: var(--gold); border-color: rgba(233, 196, 106, .35); }
.noct .b-help { background: rgba(96, 165, 250, .13); color: var(--blue); border-color: rgba(96, 165, 250, .3); }
.noct .b-itaku { background: var(--gold-soft); color: var(--gold); border-color: rgba(233, 196, 106, .35); }
.noct .b-koyo { background: rgba(96, 165, 250, .13); color: var(--blue); border-color: rgba(96, 165, 250, .3); }
.noct .b-ok { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(52, 211, 153, .3); }

/* ---- table ------------------------------------------------------------- */
.noct .noct-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.noct .noct-table thead th {
  text-align: left; font-size: 10.5px; letter-spacing: .1em; color: var(--dim); font-weight: 700;
  padding: 8px 12px; border-bottom: 1px solid var(--line); text-transform: uppercase;
}
.noct .noct-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.noct .noct-table tbody tr:last-child td { border-bottom: none; }
.noct .noct-table thead th.noct-th-group {
  text-align: center; color: var(--gold); background: var(--gold-soft);
  border-bottom-color: rgba(233, 196, 106, .32);
}
.noct .noct-table tbody td[data-guard] { background: rgba(233, 196, 106, .045); }
.noct .noct-row-link { cursor: pointer; transition: background .14s ease; }
.noct .noct-row-link:hover { background: var(--surface-2); }
.noct .noct-tiny { font-size: 11.5px; }
.noct .noct-muted { color: var(--muted); }
.noct .noct-dim { color: var(--dim); }
.noct .noct-right { text-align: right; }

/* ---- floor map --------------------------------------------------------- */
.noct .noct-floorwrap { display: flex; flex-direction: column; gap: 22px; }
.noct .noct-room-label {
  display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: var(--muted); margin-bottom: 2px;
}
.noct .noct-room-label .noct-ic { color: var(--gold); }
.noct .noct-room-label .rule { flex: 1; height: 1px; background: var(--line); }
.noct .noct-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }

.noct .noct-table-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-1)); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.noct .noct-table-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(233, 196, 106, .3); }
.noct .noct-table-card.is-vip { border-color: rgba(233, 196, 106, .28); }
.noct .noct-table-card.is-vip::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 80px at 90% -10%, rgba(233, 196, 106, .1), transparent); pointer-events: none; }
.noct .noct-table-card.is-alert { border-color: rgba(248, 113, 113, .45); box-shadow: 0 0 0 1px rgba(248, 113, 113, .25), 0 12px 30px -14px rgba(248, 113, 113, .4); }
.noct .noct-table-card.is-idle { opacity: .58; border-style: dashed; cursor: default; }
.noct .noct-table-card.is-idle:hover { transform: none; box-shadow: none; }
.noct .noct-table-card.is-idle.seatable { cursor: pointer; }
.noct .noct-table-card.is-idle.seatable:hover { opacity: 1; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(233, 196, 106, .35); border-style: solid; }

/* フロア間取り図（ドラッグ＆ドロップ） ---------------------------------- */
.noct .noct-floor-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.noct .noct-floor-hint { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.noct .noct-floor-legend { display: inline-flex; gap: 12px; margin-left: auto; }
.noct .noct-floor-legend .lg { font-size: 11px; color: var(--dim); display: inline-flex; align-items: center; gap: 5px; }
.noct .noct-floor-legend .lgdot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.noct .noct-floor-legend .lgdot.live { background: var(--emerald); }
.noct .noct-floor-legend .lgdot.warn { background: var(--amber); }
.noct .noct-floor-legend .lgdot.idle { background: var(--dim); }
.noct .noct-floor-reset { padding: 7px 13px; font-size: 12px; }

.noct .noct-plan {
  position: relative; height: 560px; min-width: 640px; border-radius: var(--r-lg);
  border: 1px solid var(--line); overflow: hidden; touch-action: none;
  background:
    linear-gradient(rgba(255, 255, 255, .015) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .015) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(900px 480px at 82% -10%, rgba(168, 120, 255, .1), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

.noct .noct-zone { position: absolute; border: 1.5px dashed var(--line); border-radius: 16px; background: rgba(255, 255, 255, .012); pointer-events: none; }
.noct .noct-zone.zone-floor { left: 1.5%; top: 5%; width: 61%; height: 90%; }
.noct .noct-zone.zone-vip { left: 65%; top: 5%; width: 33.5%; height: 90%; border-color: rgba(233, 196, 106, .28); background: rgba(233, 196, 106, .03); }
.noct .noct-zone-label { position: absolute; top: 10px; left: 14px; font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; letter-spacing: .06em; }
.noct .zone-vip .noct-zone-label { color: var(--gold); }
.noct .noct-plan-entry { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em; color: var(--dim); }

/* 卓＝丸テーブル（小さめ・実際の間取り図らしく） */
.noct .noct-plan-node {
  position: absolute; width: 90px; height: 90px; z-index: 5; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-align: center; padding: 6px;
  background: radial-gradient(circle at 50% 36%, var(--surface-2), var(--bg-1) 78%);
  border: 2px solid var(--line); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, .04);
  cursor: grab; user-select: none; touch-action: none;
  transition: box-shadow .16s ease, border-color .16s ease, transform .1s ease;
}
.noct .noct-plan-node:hover { border-color: rgba(233, 196, 106, .45); box-shadow: var(--shadow-lg); }
.noct .noct-plan-node.is-vip { width: 106px; height: 106px; border-color: rgba(233, 196, 106, .55); background: radial-gradient(circle at 50% 36%, rgba(233, 196, 106, .13), var(--bg-1) 80%); }
.noct .noct-plan-node.is-idle { border-style: dashed; border-color: var(--line); opacity: .55; background: radial-gradient(circle at 50% 40%, var(--surface), var(--bg-0) 82%); }
.noct .noct-plan-node.is-idle:hover { opacity: 1; }
.noct .noct-plan-node.is-checkout { border-color: rgba(251, 191, 36, .55); }
.noct .noct-plan-node.is-alert { border-color: var(--red); box-shadow: 0 0 0 3px rgba(248, 113, 113, .22), var(--shadow-md); animation: noct-blink 1.3s infinite; }
.noct .noct-plan-node.dragging { z-index: 40; cursor: grabbing; transition: none; transform: scale(1.08); box-shadow: var(--shadow-lg), 0 0 0 2px rgba(233, 196, 106, .5); opacity: 1; }
.noct .noct-plan-node.drop-target { border-style: solid; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(233, 196, 106, .5), var(--shadow-lg); transform: scale(1.05); }
.noct body.noct-dragging, .noct.noct-dragging * { cursor: grabbing !important; }

.noct .np-top { width: 100%; display: flex; align-items: center; justify-content: center; }
.noct .np-name { font-family: var(--font-display); font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; gap: 3px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noct .is-vip .np-name { max-width: 92px; color: var(--gold); }
.noct .np-name .noct-ic { color: var(--gold); width: 11px; height: 11px; }
.noct .np-dot { position: absolute; top: 9px; right: 11px; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.noct .is-vip .np-dot { top: 13px; right: 15px; }
.noct .np-dot.live { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.noct .np-dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.noct .np-dot.idle { background: var(--dim); }
.noct .np-timer { font-family: var(--font-mono); font-size: 17px; font-weight: 700; line-height: 1.1; }
.noct .is-vip .np-timer { font-size: 19px; }
.noct .np-timer span.warn { color: var(--amber); }
.noct .np-timer span.danger { color: var(--red); }
.noct .np-timer.warn { font-size: 11px; color: var(--amber); font-weight: 700; }
.noct .np-idle { color: var(--dim); font-size: 11.5px; font-weight: 700; display: flex; flex-direction: column; gap: 0; line-height: 1.25; }
.noct .np-idle span { font-size: 8.5px; font-weight: 500; color: var(--dim); }
.noct .np-foot { display: flex; align-items: center; justify-content: center; gap: 3px; }
.noct .np-casts { display: flex; }
.noct .np-av { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--ink); background: linear-gradient(140deg, var(--gold), var(--gold-2)); margin-left: -5px; border: 1.5px solid var(--bg-1); }
.noct .np-av:first-child { margin-left: 0; }
.noct .np-av.help { background: linear-gradient(140deg, var(--blue), #3b82f6); color: #fff; }
.noct .np-cap { font-size: 9px; font-weight: 700; color: var(--muted); font-family: var(--font-mono); }

/* 結合グループの枠 */
.noct .noct-plan-group { position: absolute; z-index: 3; min-width: 172px; border: 1.5px solid rgba(233, 196, 106, .5); border-radius: 18px; background: rgba(233, 196, 106, .06); pointer-events: none; box-shadow: inset 0 0 30px rgba(233, 196, 106, .05); }
.noct .npg-label { position: absolute; top: -2px; left: 12px; transform: translateY(-50%); max-width: calc(100% - 74px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.noct .npg-split { position: absolute; top: -2px; right: 10px; transform: translateY(-50%); pointer-events: auto; background: var(--surface-3); border: 1px solid var(--line); color: var(--gold); font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 999px; cursor: pointer; }
.noct .npg-split:hover { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, .4); }

@media (max-width: 720px) {
  .noct .noct-plan { height: 620px; }
}

.noct .noct-tc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.noct .noct-tc-name { font-family: var(--font-display); font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.noct .noct-tc-name .noct-ic { color: var(--gold); }
.noct .noct-tc-guest { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.noct .noct-tc-timer {
  margin-top: 13px; display: flex; align-items: baseline; gap: 8px; font-family: var(--font-mono);
}
.noct .noct-tc-timer .t { font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.noct .noct-tc-timer .t.warn { color: var(--amber); }
.noct .noct-tc-timer .t.danger { color: var(--red); text-shadow: 0 0 18px rgba(248, 113, 113, .5); }
.noct .noct-tc-timer .lab { font-size: 10.5px; color: var(--dim); }
.noct .noct-tc-bar { height: 5px; border-radius: 999px; background: var(--surface-3); margin-top: 9px; overflow: hidden; }
.noct .noct-tc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emerald), var(--cyan)); transition: width 1s linear, background .4s; }
.noct .noct-tc-bar i.warn { background: linear-gradient(90deg, var(--amber), var(--gold)); }
.noct .noct-tc-bar i.danger { background: linear-gradient(90deg, var(--red), var(--magenta)); }
.noct .noct-tc-casts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.noct .noct-castchip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px 3px 3px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
}
.noct .noct-castchip .av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ink); background: linear-gradient(140deg, var(--gold), var(--gold-2)); }
.noct .noct-castchip.help .av { background: linear-gradient(140deg, var(--blue), #3b82f6); color: #fff; }

/* ---- drawer ------------------------------------------------------------ */
.noct .noct-overlay { position: fixed; inset: 0; background: rgba(4, 5, 10, .72); backdrop-filter: blur(4px); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.noct .noct-overlay.show { opacity: 1; pointer-events: auto; }
.noct .noct-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(480px, 94vw); z-index: 51;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.noct .noct-drawer.open { transform: translateX(0); }
.noct .noct-drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.noct .noct-drawer-body { padding: 20px 22px 30px; overflow-y: auto; flex: 1; }
.noct .noct-drawer-close { cursor: pointer; color: var(--dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; }
.noct .noct-drawer-close:hover { color: var(--text); }

/* ---- modal（日付が確定した状態で開く登録ダイアログ）--------------------- */
.noct .noct-modal {
  position: fixed; z-index: 60; left: 50%; top: 50%; width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg-1)); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.noct .noct-modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.noct .noct-modal-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.noct .noct-modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.noct .noct-modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
/* ---- 顧客検索（数百人の顧客マスタから絞り込む）------------------------- */
/* モーダル本文が overflow:auto のため、候補は絶対配置ではなくインラインで積む */
.noct .noct-ac {
  margin-top: 6px; max-height: 216px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); display: none;
}
.noct .noct-ac.show { display: block; }
.noct .noct-ac-row {
  display: flex; align-items: baseline; gap: 8px; width: 100%; cursor: pointer; font: inherit;
  background: none; border: none; border-bottom: 1px solid var(--line-soft); color: var(--text);
  padding: 9px 12px; text-align: left; font-size: 12.5px;
}
.noct .noct-ac-row:last-child { border-bottom: none; }
.noct .noct-ac-row:hover, .noct .noct-ac-row.active { background: var(--surface-2); }
.noct .noct-ac-none { padding: 10px 12px; font-size: 11.5px; color: var(--muted); }

.noct .noct-modal-nav {
  cursor: pointer; font: inherit; font-size: 17px; line-height: 1; color: var(--dim);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  width: 26px; height: 26px; display: grid; place-items: center;
}
.noct .noct-modal-nav:hover { color: var(--gold); border-color: rgba(233, 196, 106, .4); }
.noct .noct-modal.is-readonly .noct-modal-nav { display: none; }
.noct .noct-modal.is-readonly .noct-modal-form, .noct .noct-modal.is-readonly .noct-modal-foot { display: none; }
.noct .noct-modal-exist { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; }
.noct .noct-modal-exist-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; font-size: 12.5px; }
.noct .noct-modal-exist-row .noct-muted { margin-left: auto; }

/* ---- chips（1タップで選ぶ入力）----------------------------------------- */
.noct .noct-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.noct .noct-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 12.5px; font-weight: 600;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.noct .noct-chip.sm { padding: 5px 12px; }
.noct .noct-chip:hover { color: var(--text); border-color: var(--line); background: var(--surface-3); }
.noct .noct-chip.active {
  color: var(--gold); border-color: rgba(233, 196, 106, .45); background: var(--gold-soft);
  box-shadow: 0 0 0 1px rgba(233, 196, 106, .2);
}

/* ---- calendar（予定表。日をクリックで登録モーダル）--------------------- */
.noct .noct-cal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.noct .noct-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); padding: 1px; }
.noct .noct-cal-wd {
  background: var(--bg-2); text-align: center; padding: 7px 0; font-size: 11px; font-weight: 700;
  color: var(--dim); letter-spacing: .08em;
}
.noct .noct-cal-wd.sun { color: var(--magenta); }
.noct .noct-cal-wd.sat { color: var(--cyan); }
.noct .noct-cal-day {
  background: var(--bg-1); border: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
  min-height: 96px; padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 5px;
  transition: background .14s ease, box-shadow .14s ease;
}
.noct .noct-cal-day:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(233, 196, 106, .35); }
.noct .noct-cal-day:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.noct .noct-cal-day.is-out { opacity: .38; }
.noct .noct-cal-day.is-today { box-shadow: inset 0 0 0 1px rgba(233, 196, 106, .55); background: var(--surface); }
.noct .noct-cal-day > [data-day-body] { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.noct .noct-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.noct .noct-cal-add { font-size: 10.5px; font-weight: 700; color: var(--gold); opacity: 0; transition: opacity .14s ease; white-space: nowrap; }
.noct .noct-cal-day:hover .noct-cal-add, .noct .noct-cal-day:focus-visible .noct-cal-add { opacity: 1; }
.noct .noct-cal-day.is-past:hover { box-shadow: none; }
.noct .noct-cal-d { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--muted); }
.noct .noct-cal-d.sun { color: var(--magenta); }
.noct .noct-cal-d.sat { color: var(--cyan); }
.noct .noct-cal-day.is-today .noct-cal-d { color: var(--gold); }
.noct .noct-cal-ev { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.noct .noct-cal-ev .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.noct .noct-cal-ev .dot.honshi { background: var(--magenta); }
.noct .noct-cal-ev .dot.douhan { background: var(--gold); }
.noct .noct-cal-more { font-size: 10.5px; color: var(--dim); }
.noct .noct-cal-sum { margin-top: auto; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--emerald); }
@media (max-width: 720px) {
  .noct .noct-cal-day { min-height: 72px; padding: 6px 6px 8px; }
  .noct .noct-cal-ev span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .noct .noct-modal { transition: opacity .01s linear; transform: translate(-50%, -50%) scale(1); }
}

/* ---- timeline (付け回し) ----------------------------------------------- */
.noct .noct-tl { position: relative; padding-left: 22px; }
.noct .noct-tl::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.noct .noct-tl-item { position: relative; padding: 0 0 16px; }
.noct .noct-tl-item::before { content: ""; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.noct .noct-tl-item.help::before { border-color: var(--blue); }
.noct .noct-tl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.noct .noct-tl-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.noct .noct-tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-family: var(--font-mono); }
.noct .noct-helptimer {
  margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  background: rgba(96, 165, 250, .08); border: 1px solid rgba(96, 165, 250, .25);
}
.noct .noct-helptimer .t { font-family: var(--font-mono); font-size: 19px; font-weight: 700; color: var(--blue); }
.noct .noct-helptimer.over { background: var(--red-soft); border-color: rgba(248, 113, 113, .35); }
.noct .noct-helptimer.over .t { color: var(--red); }
.noct .noct-helptimer .lab { font-size: 11px; color: var(--muted); }

/* ---- def list ---------------------------------------------------------- */
.noct .noct-defs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.noct .noct-def { background: var(--surface); padding: 11px 13px; }
.noct .noct-def-k { font-size: 10.5px; color: var(--dim); font-weight: 600; }
.noct .noct-def-v { font-size: 13.5px; font-weight: 600; margin-top: 3px; }

/* ---- receipt / checkout ------------------------------------------------ */
.noct .noct-receipt { font-family: var(--font-mono); }
.noct .noct-recline { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.noct .noct-recline .lab { color: var(--muted); }
.noct .noct-recline .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.noct .noct-recline.sub .lab { color: var(--text); }
.noct .noct-recline.discount .val { color: var(--red); }
.noct .noct-recline.total { border-bottom: none; padding-top: 14px; margin-top: 4px; border-top: 2px solid var(--gold); }
.noct .noct-recline.total .lab { font-size: 15px; color: var(--gold); font-weight: 700; }
.noct .noct-recline.total .val { font-size: 26px; color: var(--gold); }
.noct .noct-recmini { font-size: 10.5px; color: var(--dim); text-align: right; margin-top: 2px; }

.noct .noct-orderline { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.noct .noct-orderline .nm { display: flex; flex-direction: column; gap: 3px; }
.noct .noct-orderline .split-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--violet); font-weight: 700; }

/* ---- calc controls ----------------------------------------------------- */
.noct .noct-seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.noct .noct-seg button, .noct .noct-seg a {
  border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; font-family: var(--font-body);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .16s;
}
.noct .noct-seg button.active, .noct .noct-seg a.active { background: linear-gradient(140deg, var(--surface-3), var(--surface-2)); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.noct .noct-seg button.active[data-tone="gold"], .noct .noct-seg a.active[data-tone="gold"] { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233, 196, 106, .4); }
.noct .noct-seg button.active[data-tone="violet"], .noct .noct-seg a.active[data-tone="violet"] { color: var(--violet); box-shadow: inset 0 0 0 1px rgba(168, 120, 255, .4); }

.noct .noct-field { display: flex; flex-direction: column; gap: 6px; }
.noct .noct-field label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.noct .noct-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-family: var(--font-mono); font-size: 15px; font-weight: 700; padding: 11px 13px; outline: none; transition: border-color .16s;
}
.noct .noct-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
/* 等幅は数値・日付・選択肢に限る。名前や備考は本文書体で揃える */
.noct input.noct-input { font-family: var(--font-body); font-size: 13.5px; font-weight: 600; }
.noct input.noct-input[inputmode="numeric"], .noct input.noct-input[type="date"] { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.noct select.noct-input { font-family: var(--font-mono); }
.noct select.noct-input {
  appearance: none; cursor: pointer; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.noct input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
.noct .noct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 13px;
  padding: 11px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: all .16s; font-family: var(--font-body);
}
.noct .noct-btn:hover { background: var(--surface-3); }
.noct .noct-btn-gold { background: linear-gradient(140deg, var(--gold), var(--gold-2)); color: var(--ink); border-color: transparent; }
.noct .noct-btn-gold:hover { filter: brightness(1.06); box-shadow: 0 8px 24px -8px rgba(233, 196, 106, .5); }
.noct .noct-btn-violet { background: linear-gradient(140deg, var(--violet-2), var(--violet)); color: #fff; border-color: transparent; }
.noct .noct-btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(248, 113, 113, .35); }
.noct .noct-btn-block { width: 100%; }
.noct .noct-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- guardrail (cast list) --------------------------------------------- */
.noct .noct-guard-col.off { position: relative; }
.noct .noct-guard-off {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); font-style: italic;
}
.noct td.noct-disabled { opacity: .34; }
.noct .noct-strike { position: relative; }
.noct .noct-lockline { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 11px; font-weight: 700; }

/* ---- payslip ----------------------------------------------------------- */
.noct .noct-payslip {
  background: linear-gradient(180deg, #fbfaf6, #f2efe6); color: #1a1a1a; border-radius: var(--r-md);
  padding: 22px; font-family: var(--font-body); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.noct .noct-payslip::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--gold), var(--violet)); }
.noct .noct-payslip h4 { font-family: var(--font-display); font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.noct .noct-payslip .stamp { font-size: 10px; font-weight: 700; color: #b45309; border: 1.5px solid #b45309; border-radius: 6px; padding: 2px 7px; transform: rotate(-4deg); }
.noct .noct-payslip .ps-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #e2ddd0; font-size: 13px; }
.noct .noct-payslip .ps-line .lab { color: #555; }
.noct .noct-payslip .ps-line .val { font-family: var(--font-mono); font-weight: 700; }
.noct .noct-payslip .ps-line.minus .val { color: #b91c1c; }
.noct .noct-payslip .ps-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 12px; border-top: 2px solid #1a1a1a; }
.noct .noct-payslip .ps-total .lab { font-weight: 800; }
.noct .noct-payslip .ps-total .val { font-family: var(--font-mono); font-size: 24px; font-weight: 800; }
.noct .noct-payslip .ps-foot { font-size: 10px; color: #777; margin-top: 14px; line-height: 1.6; }

/* ---- audit ------------------------------------------------------------- */
.noct .noct-logrow { display: grid; grid-template-columns: 78px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.noct .noct-logrow:last-child { border-bottom: none; }
.noct .noct-logrow.info { }
.noct .noct-logrow.warn { background: var(--amber-soft); }
.noct .noct-logrow.alert { background: var(--red-soft); border-left: 3px solid var(--red); }
.noct .noct-logrow .at { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.noct .noct-logrow .act { font-weight: 700; }
.noct .noct-logrow .tgt { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.noct .noct-logrow .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); text-align: right; }
.noct .noct-logrow.new-flash { animation: noct-flashrow 1.8s ease; }

.noct .noct-frozen { position: relative; }
.noct .noct-frozen.locked { pointer-events: none; }
.noct .noct-frozen.locked .noct-defs,
.noct .noct-frozen.locked .noct-table { opacity: .5; filter: grayscale(.5); }
.noct .noct-freeze-banner {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px;
  background: var(--gold-soft); border: 1px solid rgba(233, 196, 106, .35); color: var(--gold); font-weight: 700; font-size: 13px;
}

/* ---- ER schema --------------------------------------------------------- */
.noct .noct-er { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.noct .noct-ertable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.noct .noct-ertable.pk-gold { border-color: rgba(233, 196, 106, .4); }
.noct .noct-erhead { padding: 10px 13px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; background: linear-gradient(100deg, var(--surface-3), var(--surface-2)); display: flex; align-items: center; gap: 7px; }
.noct .noct-erhead .noct-ic { color: var(--gold); }
.noct .noct-ercol { display: flex; justify-content: space-between; gap: 8px; padding: 7px 13px; font-family: var(--font-mono); font-size: 11.5px; border-top: 1px solid var(--line-soft); }
.noct .noct-ercol .k { color: var(--text); }
.noct .noct-ercol .k.pk { color: var(--gold); font-weight: 700; }
.noct .noct-ercol .k.fk { color: var(--violet); }
.noct .noct-ercol .ty { color: var(--dim); }
.noct .noct-code {
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; color: #cdd3e8;
}
.noct .noct-code .kw { color: var(--violet); font-weight: 700; }
.noct .noct-code .fn { color: var(--gold); }
.noct .noct-code .cm { color: var(--dim); font-style: italic; }
.noct .noct-code .st { color: var(--emerald); }

/* ---- win callout ------------------------------------------------------- */
.noct .noct-win {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); margin-top: 14px;
  background: linear-gradient(100deg, rgba(168, 120, 255, .08), rgba(242, 106, 168, .06));
  border: 1px solid rgba(168, 120, 255, .25);
}
.noct .noct-win .noct-ic { color: var(--violet); flex: none; margin-top: 1px; }
.noct .noct-win-t { font-weight: 700; font-size: 12.5px; color: var(--violet); }
.noct .noct-win-b { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }

/* ---- toast ------------------------------------------------------------- */
.noct .noct-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); z-index: 80;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text); padding: 12px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s;
  display: flex; align-items: center; gap: 9px;
}
.noct .noct-toast.show { opacity: 1; transform: translate(-50%, 0); }
.noct .noct-toast .noct-ic { color: var(--emerald); }
.noct .noct-toast.warn { border-color: rgba(251, 191, 36, .4); }
.noct .noct-toast.warn .noct-ic { color: var(--amber); }

/* ---- popover (延長見積) ------------------------------------------------ */
.noct .noct-estimate {
  margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--red-soft); border: 1px solid rgba(248, 113, 113, .3);
}
.noct .noct-estimate-t { font-weight: 700; font-size: 12.5px; color: var(--red); display: flex; align-items: center; gap: 6px; }
.noct .noct-est-opt { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed rgba(248, 113, 113, .2); font-size: 13px; }
.noct .noct-est-opt:last-child { border-bottom: none; }
.noct .noct-est-opt .amt { font-family: var(--font-mono); font-weight: 700; color: var(--gold); }

/* ---- animations -------------------------------------------------------- */
@keyframes noct-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--emerald-soft); } 50% { box-shadow: 0 0 0 5px transparent; } }
@keyframes noct-live { 0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .5); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes noct-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes noct-flashrow { 0% { background: var(--gold-soft); } 100% { } }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
  .noct .noct-grid.g4 { grid-template-columns: 1fr 1fr; }
  .noct .noct-grid.g3 { grid-template-columns: 1fr; }
  .noct .noct-grid.g2, .noct .noct-grid.g23, .noct .noct-grid.g32 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .noct .noct-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .28s; }
  #noct-nav-toggle:checked ~ .noct-shell .noct-sidebar { transform: translateX(0); }
  .noct .noct-menu-toggle { display: block; }
  .noct .noct-content { padding: 18px 14px; }
  .noct .noct-grid.g4 { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
   ハンディ注文入力（黒服・キャスト）／ 客スマホ会計（閲覧専用）
   ========================================================================= */
.noct .noct-phone {
  max-width: 432px; margin: 0 auto; background: linear-gradient(180deg, var(--surface), var(--bg-1));
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.noct .noct-phone.guest { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); }

/* ---- handy ---- */
.noct .nh-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.noct .nh-role { font-size: 11px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.noct .nh-role .noct-ic { color: var(--gold); }
.noct .nh-select { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 600; padding: 9px 11px; font-family: var(--font-body); outline: none; }
.noct .nh-select:focus { border-color: var(--gold); }
.noct .nh-body { padding: 14px 16px; }
.noct .nh-sec { margin-bottom: 16px; }
.noct .nh-sec-t { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.noct .nh-sec-t .noct-ic { color: var(--gold); }
.noct .nh-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.noct .nh-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(233, 196, 106, .3); padding: 8px 11px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.noct .nh-check input { accent-color: var(--gold); }
.noct .nh-sub { font-size: 11px; color: var(--dim); }
.noct .nh-menus { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.noct .nh-menu { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; cursor: pointer; transition: all .14s; font-family: var(--font-body); color: var(--text); }
.noct .nh-menu:hover { border-color: rgba(233, 196, 106, .4); }
.noct .nh-menu.added { border-color: var(--gold); background: var(--gold-soft); transform: scale(.96); }
.noct .nh-menu-nm { font-size: 12px; font-weight: 700; line-height: 1.25; }
.noct .nh-menu-cat { font-size: 10px; color: var(--dim); margin-top: 2px; }
.noct .nh-menu-price { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gold); }
.noct .nh-menu-add { display: inline-block; margin-top: 3px; width: 20px; height: 20px; line-height: 19px; text-align: center; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 13px; }
.noct .nh-lines { display: flex; flex-direction: column; }
.noct .nh-line { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.noct .nh-line-nm { font-size: 12.5px; font-weight: 600; }
.noct .nh-line-sub { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.noct .nh-line-amt { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.noct .nh-empty { font-size: 11.5px; color: var(--dim); padding: 12px 0; text-align: center; }
.noct .nh-cur-total { font-family: var(--font-mono); font-weight: 700; color: var(--gold); font-size: 14px; }
.noct .nh-cart { border-top: 1px solid var(--line); background: var(--bg-2); padding: 14px 16px; }
.noct .nh-cart-head { display: flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.noct .nh-mono { font-family: var(--font-mono); }
.noct .nh-cart-lines { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.noct .nh-cart-line { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.noct .nh-cart-info { flex: 1; min-width: 0; }
.noct .nh-step { display: inline-flex; align-items: center; gap: 8px; }
.noct .nh-step button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; }
.noct .nh-step span { font-family: var(--font-mono); font-weight: 700; min-width: 14px; text-align: center; }
.noct .nh-cart-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.noct .nh-proj { font-family: var(--font-mono); font-size: 20px; font-weight: 800; color: var(--gold); }
.noct .nh-cart-foot .noct-btn { padding: 12px 22px; }
.noct .nh-guestlink { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px; font-size: 12px; font-weight: 600; color: var(--cyan); border-top: 1px solid var(--line); }
.noct .nh-guestlink:hover { background: var(--surface-2); }

/* ---- guest ---- */
.noct .ng-top { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.noct .ng-store { font-size: 11px; color: var(--muted); font-weight: 600; }
.noct .ng-table { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-top: 2px; }
.noct .ng-table span { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.noct .ng-badge { font-size: 10.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.noct .ng-total-card { position: relative; margin: 16px; padding: 20px; border-radius: 18px; background: linear-gradient(160deg, rgba(233, 196, 106, .14), rgba(168, 120, 255, .06)); border: 1px solid rgba(233, 196, 106, .3); text-align: center; }
.noct .ng-total-label { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.noct .ng-live { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--emerald); }
.noct .ng-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); animation: noct-pulse 2s infinite; }
.noct .ng-total { font-family: var(--font-display); font-size: 40px; font-weight: 800; color: var(--gold); margin-top: 8px; letter-spacing: .01em; line-height: 1; }
.noct .ng-count { font-size: 11px; color: var(--muted); margin-top: 6px; }
.noct .ng-count b { color: var(--text); font-family: var(--font-mono); margin: 0 2px; }
.noct .ng-flash { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700; color: var(--emerald); background: var(--emerald-soft); border: 1px solid rgba(52, 211, 153, .3); padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; opacity: 0; transform: translateY(-4px); transition: all .3s; }
.noct .ng-flash.show { opacity: 1; transform: translateY(0); }
.noct .ng-lines-wrap { padding: 0 16px; }
.noct .ng-sec-t { font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: .05em; margin-bottom: 6px; }
.noct .ng-lines { display: flex; flex-direction: column; }
.noct .ng-line { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.noct .ng-line-nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.noct .ng-qty { color: var(--dim); font-family: var(--font-mono); font-size: 11px; }
.noct .ng-split { font-size: 9px; color: var(--violet); font-weight: 700; background: var(--violet-soft); padding: 1px 6px; border-radius: 999px; }
.noct .ng-line-amt { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.noct .ng-empty { padding: 16px 0; text-align: center; color: var(--dim); font-size: 12px; }
.noct .ng-breakdown { margin: 14px 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.noct .ng-bd { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; color: var(--muted); }
.noct .ng-bd .ng-mono { color: var(--text); }
.noct .ng-mono { font-family: var(--font-mono); font-weight: 700; }
.noct .ng-bd.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 15px; }
.noct .ng-bd.total span:first-child { color: var(--gold); font-weight: 700; }
.noct .ng-bd.total .ng-mono { color: var(--gold); font-size: 18px; }
.noct .ng-foot { display: flex; gap: 9px; padding: 14px 16px 20px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.noct .ng-foot .noct-ic { color: var(--emerald); flex: none; margin-top: 1px; }

/* =========================================================================
   バック管理 ／ 本社HQ
   ========================================================================= */
.noct .nb-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 900px) { .noct .nb-presets { grid-template-columns: repeat(2, 1fr); } }

/* 適用条件セル：プリセットの割当と個別上書きの状態 */
.noct .nb-rulecell { display: grid; grid-template-columns: auto auto; gap: 6px; align-items: center; width: max-content; }
.noct .nb-rulesel { width: 132px; padding: 5px 26px 5px 9px; font-size: 12px; font-weight: 600; border-radius: 8px; background-position: calc(100% - 13px), calc(100% - 9px); }
.noct .nb-ruleedit { padding: 5px 10px; font-size: 11.5px; }
.noct .nb-ruleinfo { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 個別上書きの編集フォーム */
.noct .nb-edit { display: flex; flex-direction: column; gap: 2px; }
.noct .nb-edit-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.noct .nb-edit-row:last-child { border-bottom: none; }
.noct .nb-edit-k { font-size: 13px; font-weight: 700; }
.noct .nb-edit-in { display: flex; align-items: center; gap: 7px; flex: none; }
.noct .nb-edit-in .noct-input { width: 108px; text-align: right; padding: 8px 10px; }
.noct .nb-preset { text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; cursor: pointer; transition: all .15s; font-family: var(--font-body); color: var(--text); }
.noct .nb-preset:hover { border-color: rgba(233, 196, 106, .4); }
.noct .nb-preset.active { border-color: var(--gold); background: linear-gradient(160deg, var(--gold-soft), var(--surface-2)); box-shadow: 0 0 0 1px rgba(233, 196, 106, .4); }
.noct .nb-preset-nm { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.noct .nb-preset.active .nb-preset-nm { color: var(--gold); }
.noct .nb-preset-desc { font-size: 10.5px; color: var(--dim); margin-top: 3px; line-height: 1.4; }

.noct .nb-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.noct .nb-rate { background: var(--surface); padding: 11px 13px; }
.noct .nb-rate-k { font-size: 10.5px; color: var(--dim); font-weight: 600; }
.noct .nb-rate-v { font-size: 14px; font-weight: 700; margin-top: 3px; font-family: var(--font-mono); color: var(--gold); }
.noct .nb-rate-d { font-size: 10px; color: var(--muted); margin-top: 2px; }
.noct .nb-sub { font-size: 10px; color: var(--dim); margin-top: 2px; font-family: var(--font-body); }
.noct .nb-total { font-weight: 800; color: var(--gold); font-size: 14px; }

.noct .hq-rank { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--muted); font-family: var(--font-mono); }
.noct .hq-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.noct .hq-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--amber)); }
.noct .hq-master { display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); transition: all .15s; }
.noct .hq-master:hover { border-color: rgba(233, 196, 106, .35); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.noct .hq-master-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }

/* ---- 出勤キャスト待機リスト（卓へD&D配席） ---------------------------- */
.noct .noct-casttray { margin-bottom: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.noct .nct-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.noct .nct-title { font-family: var(--font-display); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.noct .nct-title .noct-ic { color: var(--gold); }
.noct .nct-hint { font-size: 11px; color: var(--dim); }
.noct .nct-seg { margin-left: auto; display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.noct .nct-seg button { border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 11.5px; font-family: var(--font-body); padding: 6px 11px; border-radius: 7px; cursor: pointer; transition: all .14s; }
.noct .nct-seg button.active { background: linear-gradient(140deg, var(--gold), var(--gold-2)); color: var(--ink); }
.noct .nct-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.noct .nct-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 7px 7px; border-radius: 999px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  cursor: grab; user-select: none; touch-action: none; transition: transform .12s, box-shadow .12s, border-color .12s;
}
.noct .nct-chip:hover { border-color: rgba(233, 196, 106, .45); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.noct .nct-chip.dragging { opacity: .35; }
.noct .nct-chip .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink); background: linear-gradient(140deg, var(--gold), var(--gold-2)); flex: none; }
.noct .nct-nm { font-weight: 700; font-size: 13px; line-height: 1.1; }
.noct .nct-meta { font-size: 10px; color: var(--dim); margin-top: 1px; }
.noct .nct-grip { color: var(--dim); }

.noct-cast-ghost {
  position: fixed; z-index: 90; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 7px;
  border-radius: 999px; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 800; font-size: 13px; color: #05060c;
  background: linear-gradient(140deg, #e9c46a, #d4a94a); box-shadow: 0 14px 34px -10px rgba(233, 196, 106, .6);
  pointer-events: none; transform: scale(1.02);
}
.noct-cast-ghost .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(5, 6, 12, .16); color: #05060c; }
.noct-cast-ghost .gt { font-size: 10px; font-weight: 700; background: rgba(5, 6, 12, .18); padding: 2px 7px; border-radius: 999px; }

/* ---- Scene 2 導線：卓上QR ---------------------------------------------- */
.noct .noct-qrblock { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.noct .noct-qr { position: relative; display: block; width: 112px; height: 112px; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .6); border: 3px solid #fff; flex: none; transition: transform .14s; }
.noct .noct-qr:hover { transform: scale(1.04); }
.noct .noct-qr svg { display: block; width: 100%; height: 100%; }
.noct .noct-qr-scan { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(5, 6, 12, .82); color: var(--gold); font-size: 9px; font-weight: 700; text-align: center; padding: 3px 0; display: flex; align-items: center; justify-content: center; gap: 3px; }
.noct .noct-qr-scan .noct-ic { color: var(--gold); }

/* ---- キャスト現在地バッジ・単一席・アバター移動 ------------------------ */
.noct .nct-loc { display: inline-block; margin-top: 2px; font-size: 9.5px; font-weight: 700; color: var(--dim); font-family: var(--font-mono); }
.noct .nct-loc.seated { color: var(--gold); }
.noct .nct-chip.is-seated { border-color: rgba(233, 196, 106, .4); background: linear-gradient(180deg, var(--gold-soft), var(--surface)); }
.noct .nct-chip.is-seated .av { box-shadow: 0 0 0 2px rgba(233, 196, 106, .4); }
.noct .np-av[data-cast] { cursor: grab; }
.noct .np-av[data-cast]:hover { box-shadow: 0 0 0 2px var(--gold); }
.noct .np-av.av-dragging { opacity: .3; }

/* ---- 日次締め（close）：Excel自動化 ------------------------------------ */
.noct .nc-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.noct .nc-rule { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--surface); }
.noct .nc-rule-t { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.noct .nc-rule-b { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.noct .nc-rule-x { font-size: 10px; color: var(--dim); margin-top: 6px; text-decoration: line-through; }
.noct .nc-auto { margin-left: auto; flex: none; font-size: 9px; font-family: var(--font-mono); font-weight: 700; letter-spacing: .1em; color: var(--emerald); background: var(--emerald-soft); border: 1px solid rgba(52, 211, 153, .3); padding: 1px 7px; border-radius: 999px; }
.noct .nc-sheet td { vertical-align: top; }
.noct .nc-okuri { border: 1px solid var(--line); background: var(--surface-3); color: var(--dim); font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 5px 11px; cursor: pointer; font-family: var(--font-mono); white-space: nowrap; transition: all .14s; }
.noct .nc-okuri:hover { border-color: var(--gold); color: var(--gold); }
.noct .nc-okuri.on { background: var(--gold-soft); color: var(--gold); border-color: rgba(233, 196, 106, .45); }
.noct .nc-okuri:disabled { opacity: .45; cursor: not-allowed; }
.noct .nc-rank { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.noct .nc-rank-row { display: grid; grid-template-columns: 24px 72px 1fr 92px; align-items: center; gap: 10px; }
.noct .nc-rank-no { font-family: var(--font-mono); color: var(--dim); font-weight: 700; font-size: 12px; }
.noct .nc-rank-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.noct .nc-rank-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
@media (max-width: 900px) { .noct .nc-rules { grid-template-columns: 1fr; } }

/* ---- 日次締め：Excel互換ビュー（実物シートの紙面風再現） ---------------- */
.noct .nc-paper { margin: 0 18px 18px; overflow-x: auto; background: #f8fafc; border-radius: 10px; border: 1px solid var(--line); color-scheme: light; accent-color: #2563eb; }
.noct .nc-xl { border-collapse: collapse; width: max-content; min-width: 100%; font-family: var(--font-mono); font-size: 11px; color: #1e293b; }
.noct .nc-xl th, .noct .nc-xl td { border: 1px solid #b6c2d4; padding: 4px 8px; white-space: nowrap; background: #fff; }
.noct .nc-xl th { font-size: 10px; font-weight: 700; background: #e2e8f0; font-family: "Zen Kaku Gothic New", sans-serif; }
.noct .nc-xl td.c { text-align: center; }
.noct .nc-xl td.num { text-align: right; }
.noct .nc-xl .frz { position: sticky; left: 0; z-index: 1; background: #f1f5f9; font-family: "Zen Kaku Gothic New", sans-serif; }
.noct .nc-xl tfoot td { font-weight: 700; background: #e2e8f0; }
.noct .nc-paper.blue th.blk { background: #bfdbfe; }
.noct .nc-paper.blue td.blk { background: #eff6ff; }
.noct .nc-paper.blue th.minus, .noct .nc-paper.blue td.minus { background: #fce7f3; color: #be185d; }
.noct .nc-paper.blue th.org, .noct .nc-paper.blue td.org { background: #fed7aa; }
.noct .nc-paper.blue th.tot, .noct .nc-paper.blue td.tot { background: #dcfce7; }
.noct .nc-paper.yellow th { background: #fde68a; }
.noct .nc-paper.yellow td { background: #fefce8; }
.noct .nc-paper.yellow .frz { background: #fef3c7; }
.noct .nc-num { width: 64px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 5px; font-family: var(--font-mono); font-size: 11px; text-align: right; background: #fff; color: #1e293b; }
.noct .nc-num:disabled { opacity: .5; }
.noct .nc-paper .nc-okuri { background: #fff; color: #64748b; border-color: #cbd5e1; }
.noct .nc-paper .nc-okuri.on { background: #fef08a; color: #92400e; border-color: #f59e0b; }

/* ---- ハンディ 2ペインUI（スマホ/PC共通。左=卓一覧・右=注文入力） -------- */
.noct .nh2 { display: grid; grid-template-columns: 330px 1fr; gap: 16px; align-items: start; }
.noct .nh2-tables { display: flex; flex-direction: column; gap: 10px; }
.noct .nh2-tables-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 2px 0; }
.noct .nh2-tables-head .noct-ic { color: var(--gold); }
.noct .nh2-card { text-align: left; background: linear-gradient(180deg, var(--surface), var(--bg-1)); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.noct .nh2-card:hover { border-color: rgba(233, 196, 106, .45); transform: translateY(-1px); }
.noct .nh2-card.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 14px 30px -18px rgba(233, 196, 106, .5); background: linear-gradient(180deg, var(--gold-soft), var(--surface)); }
.noct .nh2-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.noct .nh2-card-table { font-family: var(--font-display); font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.noct .nh2-card-table .noct-ic { color: var(--gold); }
.noct .nh2-card-guest { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.noct .nh2-card-casts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.noct .nh2-chip { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(233, 196, 106, .3); }
.noct .nh2-chip.help { background: var(--surface-3); color: var(--dim); border-color: var(--line); }
.noct .nh2-card-total { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 10.5px; color: var(--dim); }
.noct .nh2-card-total b { font-size: 14px; color: var(--text); }
.noct .nh2-card-sel { display: none; align-items: center; gap: 5px; margin-top: 9px; font-size: 10.5px; font-weight: 800; color: var(--gold); font-family: var(--font-mono); letter-spacing: .06em; }
.noct .nh2-card.active .nh2-card-sel { display: flex; }
.noct .nh2-card.active .nh2-card-total b { color: var(--gold); }
.noct .nh2-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.noct .nh2-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--gold-soft), transparent); }
.noct .nh2-now-label { font-size: 10px; font-family: var(--font-mono); letter-spacing: .18em; color: var(--gold); font-weight: 700; }
.noct .nh2-now { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.2; }
.noct .nh2-now-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.noct .nh2-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; padding: 16px 18px; }
.noct .nh2-body .nh-cart { border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 1080px) { .noct .nh2-body { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .noct .nh2 { grid-template-columns: 1fr; }
  .noct .nh2-tables { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .noct .nh2-tables-head { display: none; }
  .noct .nh2-card { min-width: 210px; flex: none; }
}

/* ---- ハンディ：ページスクロールなし（枠内スクロール） ------------------- */
@media (min-width: 901px) {
  .noct .nh2 { height: calc(100vh - 248px); min-height: 500px; }
  .noct .nh2-tables { height: 100%; overflow-y: auto; padding-right: 3px; }
  .noct .nh2-panel { height: 100%; display: flex; flex-direction: column; }
  .noct .nh2-panel-head { flex: none; }
  .noct .nh2-body { flex: 1; min-height: 0; }
  .noct .nh2-body > div { height: 100%; min-height: 0; overflow-y: auto; padding-right: 4px; }
  .noct .nh2-panel > .nh-guestlink { flex: none; }
}
@media (max-width: 900px) {
  .noct .nh2-body > div { max-height: none; }
}

/* ---- 勤怠管理：時刻編集 -------------------------------------------------- */
.noct .tc-time { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; padding: 6px 8px; width: 96px; }
.noct .tc-time:focus { border-color: var(--gold); outline: none; }
.noct .tc-time { text-align: center; cursor: pointer; }
.noct .tc-time:hover { border-color: rgba(233, 196, 106, .45); }

/* 時刻ピッカー：ネイティブの time ピッカーが配色に合わないため独自に持つ */
.noct .noct-timepick {
  position: fixed; z-index: 70; display: none; gap: 1px; padding: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.noct .noct-timepick.show { display: flex; }
.noct .noct-timepick-col { background: var(--surface); width: 62px; max-height: 232px; overflow-y: auto; }
.noct .noct-timepick-cap {
  position: sticky; top: 0; background: var(--bg-2); color: var(--dim); font-size: 10px; font-weight: 700;
  text-align: center; padding: 5px 0; border-bottom: 1px solid var(--line);
}
.noct .noct-timepick-o {
  display: block; width: 100%; cursor: pointer; font: inherit; font-family: var(--font-mono);
  font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: none;
  padding: 7px 0; text-align: center;
}
.noct .noct-timepick-o:hover { background: var(--surface-2); color: var(--text); }
.noct .noct-timepick-o.active { background: var(--gold-soft); color: var(--gold); }

/* ---- ハンディ：卓の付け回しチップ（タップで担当切替） -------------------- */
.noct .nh2-tablecasts { display: flex; flex-wrap: wrap; gap: 6px; }
.noct .nh2-chip.clickable { cursor: pointer; padding: 5px 12px; font-size: 11px; transition: all .13s; font-family: var(--font-body); }
.noct .nh2-chip.clickable:hover { border-color: var(--gold); }
.noct .nh2-chip.clickable.on { background: linear-gradient(140deg, var(--gold), var(--gold-2)); color: var(--ink); border-color: var(--gold); font-weight: 800; box-shadow: 0 6px 16px -8px rgba(233, 196, 106, .7); }
.noct .nh2-chip.clickable.help.on { background: var(--surface-3); color: var(--text); box-shadow: none; border-color: var(--dim); }

/* ---- ハンディ：メニューカテゴリ・帰属タグ・卓全体チップ ------------------ */
.noct .nh-menu-group { margin-bottom: 14px; }
.noct .nh-menu-group-t { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--gold); font-family: var(--font-mono); margin-bottom: 7px; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.noct .nh-needs { display: inline-block; margin-left: 6px; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--magenta-soft); color: var(--magenta); border: 1px solid rgba(242, 106, 168, .3); }
.noct .nh-needs.table { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
.noct .nh2-chip.table { border-style: dashed; color: var(--muted); background: var(--surface-2); }
.noct .nh2-chip.clickable.table.on { background: var(--surface-3); color: var(--text); border-style: solid; border-color: var(--muted); box-shadow: none; font-weight: 800; }

/* ---- ハンディ：メニュータブ・キャスト選択モーダル ------------------------ */
.noct .nh-menutabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.noct .nh-menutabs button { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 11px; border-radius: 999px; cursor: pointer; font-family: var(--font-body); transition: all .13s; }
.noct .nh-menutabs button:hover { border-color: rgba(233, 196, 106, .45); color: var(--gold); }
.noct .nh-menutabs button.active { background: var(--gold-soft); color: var(--gold); border-color: rgba(233, 196, 106, .5); }
.noct .nh2-picker { position: fixed; inset: 0; z-index: 120; background: rgba(5, 6, 12, .72); backdrop-filter: blur(3px); display: grid; place-items: center; }
.noct .nh2-picker-box { width: min(460px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-md); }
.noct .nh2-picker-t { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.noct .nh2-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 300px; overflow: auto; }
.noct .nh2-pick { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .13s; font-family: var(--font-body); }
.noct .nh2-pick:hover { border-color: var(--gold); background: var(--gold-soft); }
.noct .nh2-pick .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--ink); background: linear-gradient(140deg, var(--gold), var(--gold-2)); flex: none; }

/* ---- ハンディ：卓カードは内容に合わせた高さ（フレックス縮小で見切れない） -- */
.noct .nh2-card { flex: none; }
.noct .nh2-pick.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold); }
.noct .nh2-chip.clickable.on { background: linear-gradient(140deg, var(--gold), var(--gold-2)); color: var(--ink); border-color: var(--gold); font-weight: 800; }

/* ---- ハンディ：卓カードのセット残り時間 ---------------------------------- */
.noct .nh2-card-remain { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; font-size: 10.5px; color: var(--dim); }
.noct .nh2-card-remain b { font-size: 14px; color: var(--text); }
.noct .nh2-card-remain b.warn { color: var(--red); animation: noct-blink 1.3s infinite; }

/* ---- ハンディ：折半比率エディタ ------------------------------------------- */
.noct .nh2-share-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.noct .nh2-share-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; }
.noct .nh2-share-row span { flex: 1; }
.noct .nh2-share-row input { width: 64px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: var(--font-mono); font-size: 13px; font-weight: 700; padding: 6px 8px; text-align: right; }
.noct .nh2-share-row input:focus { border-color: var(--gold); outline: none; }
.noct .nh2-share-row input:disabled { opacity: .4; }
.noct .nh2-share-row b { color: var(--dim); font-size: 11px; }
.noct .nh2-share-total { font-size: 11px; font-family: var(--font-mono); font-weight: 700; margin-top: 4px; }
.noct .nh2-share-total.ok { color: var(--emerald); }
.noct .nh2-share-total.ng { color: var(--red); }
.noct .noct-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- 勤怠管理：備考入力 --------------------------------------------------- */
/* 勤怠管理の対象外（業務委託）の行：編集欄を出さず、記録だけを薄く見せる */
.noct .tc-off { background: repeating-linear-gradient(135deg, transparent, transparent 7px, rgba(233, 196, 106, .035) 7px, rgba(233, 196, 106, .035) 14px); }
.noct .tc-note { width: 140px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: var(--font-body); font-size: 12px; padding: 6px 8px; }
.noct .tc-note:focus { border-color: var(--gold); outline: none; }
.noct .tc-note::placeholder { color: var(--dim); }

/* ---- 勤怠管理：テーブルの折返し防止（キャスト名の縦書き崩れ対策） -------- */
.noct .tc-table th, .noct .tc-table td { white-space: nowrap; vertical-align: middle; }
.noct .tc-table .tc-note { width: 160px; }

/* ---- ハンディ：送信カートの下部固定バー ---------------------------------- */
.noct .nh2-cartbar { border-top: 1px solid var(--line); background: var(--bg-2); padding: 10px 18px 12px; position: sticky; bottom: 0; z-index: 5; }
.noct .nh2-cartbar .nh-cart-lines { max-height: 130px; overflow-y: auto; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.noct .nh2-cartbar-foot { display: flex; align-items: center; gap: 16px; }
@media (min-width: 901px) {
  .noct .nh2-cartbar { flex: none; }
}

/* ---- 勤怠管理：変更ログ（構造化行） --------------------------------------- */
.noct .tc-log-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); }
.noct .tc-log-row.is-new { border-color: rgba(233, 196, 106, .4); background: linear-gradient(180deg, var(--gold-soft), var(--surface-2)); }
.noct .tc-log-time { font-family: var(--font-mono); font-size: 11px; color: var(--dim); padding-top: 3px; flex: none; }
.noct .tc-log-actor { flex: none; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.noct .tc-log-actor.staff { background: rgba(96, 165, 250, .13); color: var(--blue); border-color: rgba(96, 165, 250, .3); }
.noct .tc-log-actor.self { background: var(--magenta-soft); color: var(--magenta); border-color: rgba(242, 106, 168, .3); }
.noct .tc-log-actor.sys { background: var(--violet-soft); color: var(--violet); border-color: rgba(168, 120, 255, .3); }
.noct .tc-log-body { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; min-width: 0; }
.noct .tc-log-body > b { font-weight: 700; font-family: var(--font-display); }
.noct .tc-log-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); }
.noct .tc-log-field { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); color: var(--muted); }
.noct .tc-log-change { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.noct .tc-log-change s { color: var(--dim); text-decoration-color: rgba(248, 113, 113, .6); }
.noct .tc-log-change b { color: var(--gold); font-weight: 700; }
.noct .tc-log-note { font-size: 10.5px; color: var(--dim); }

/* ==== ハンディ：スマホ・タブレット最適化 ==================================== */
/* タブレット横（〜1280px）：左カラムを圧縮して2ペイン維持 */
@media (min-width: 901px) and (max-width: 1280px) {
  .noct .nh2 { grid-template-columns: 270px 1fr; }
}
/* タッチ端末：当たり判定を拡大 */
@media (max-width: 1280px) {
  .noct .nh-menu { padding: 13px 14px; }
  .noct .nh-menutabs button { padding: 9px 14px; font-size: 12px; }
  .noct .nh2-pick { padding: 12px 12px; font-size: 13.5px; }
  .noct .nh2-chip.clickable { padding: 7px 13px; }
}
/* スマホ（〜760px）：アプリ型レイアウト */
@media (max-width: 760px) {
  .noct .nh2-ph { margin-bottom: 10px; }
  .noct .nh2-ph .noct-ph-eyebrow { display: none; }
  .noct .nh2-tables { gap: 8px; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .noct .nh2-card { min-width: 200px; padding: 10px 12px; scroll-snap-align: start; }
  .noct .nh2-card-table { font-size: 15px; }
  .noct .nh2-card-total { margin-top: 7px; }
  /* 入力中の卓ヘッダーを画面上部に固定 */
  .noct .nh2-panel-head { position: sticky; top: 0; z-index: 30; background: var(--surface); padding: 12px 14px; }
  .noct .nh2-now { font-size: 19px; }
  .noct .nh2-body { padding: 12px 14px; gap: 14px; }
  .noct .nh-menus { grid-template-columns: 1fr 1fr; gap: 7px; }
  /* 送信カートを画面下部に固定（セーフエリア対応） */
  .noct .nh2-panel { padding-bottom: 8px; }
  .noct .nh2-cartbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border: 1px solid var(--line); border-bottom: none; border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px -18px rgba(0, 0, 0, .85); padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 60; }
  .noct .nh2-cartbar .nh-cart-lines { max-height: 96px; }
  .noct .nh2-body > div:last-child { margin-bottom: 170px; } /* 固定バーの逃げ */
  /* キャスト選択はボトムシート */
  .noct .nh2-picker { place-items: end center; }
  .noct .nh2-picker-box { width: 100%; max-width: none; border-radius: 18px 18px 0 0; border-bottom: none; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .noct .nh2-picker-grid { max-height: 40vh; }
}

/* ---- ハンディ：延長セット ------------------------------------------------- */
.noct .noct-btn.urgent { border-color: rgba(248, 113, 113, .55); color: var(--red); animation: noct-blink 1.3s infinite; }
.noct .nh2-ext { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 13px 15px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: pointer; transition: all .14s; font-family: var(--font-body); }
.noct .nh2-ext:hover { border-color: var(--gold); background: var(--gold-soft); }
.noct .nh2-ext-t { font-size: 13.5px; font-weight: 700; }
.noct .nh2-ext-s { font-size: 11px; color: var(--dim); margin-top: 2px; font-family: var(--font-mono); }
.noct .nh2-ext b { font-size: 15px; color: var(--gold); }
