/* Fonts loaded via <link> in app/layout.jsx (BIZ UDPGothic, Anton, Noto Sans JP) */

  /* ---------- Reset & base ---------- */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  :root {
    --bg-space: url('/assets/bg-1.jpg');
  }
  html { background: #0a1024; }
  body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
      linear-gradient(rgba(8,16,38,0.28) 0%, rgba(8,16,38,0.36) 45%, rgba(8,16,38,0.52) 100%),
      var(--bg-space) center center / cover no-repeat;
  }
  body {
    font-family: "BIZ UDPGothic", "BIZ UDGothic", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
                 "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
    color: #1a1a1a;
    background: transparent;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overscroll-behavior-y: contain;
  }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  input, select { font: inherit; }
  input[type="number"] { -moz-appearance: textfield; }
  input[type="number"]::-webkit-outer-spin-button,
  input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

  /* ---------- App shell ---------- */
  #app { min-height: 100vh; display: flex; flex-direction: column; }
  .topbar {
    background: #fff;
    border-bottom: 1px solid #e7e5e4;
    padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 50;
  }
  .topbar h1 { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
  .topbar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
  }
  .topbar .spacer { flex: 1; }
  .topbar .user-chip {
    font-size: 12px; color: #57534e;
    background: #f5f5f4; border-radius: 999px;
    padding: 4px 10px;
  }
  .topbar .icon-btn {
    width: 36px; height: 36px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #57534e; transition: background .15s;
  }
  .topbar .icon-btn:hover { background: #f5f5f4; }
  .topbar .icon-btn svg { width: 20px; height: 20px; }
  .topbar.brand-hachiban { border-bottom-color: #d61518; box-shadow: 0 1px 0 #d61518; }
  .topbar.brand-komeda { border-bottom-color: #6b4423; box-shadow: 0 1px 0 #6b4423; }

  main { flex: 1; padding: 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
  @media (min-width: 900px) { main { padding: 24px; } }

  /* ---------- Brand accents ---------- */
  .brand-hachiban-color { color: #d61518; }
  .brand-komeda-color { color: #6b4423; }
  .brand-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
  .brand-tag.hachiban { background: #fee2e2; color: #b91c1c; }
  .brand-tag.komeda { background: #f5ecd9; color: #6b4423; }
  .brand-tag.hyonchan { background: #fef3c7; color: #92400e; }

  /* ---------- Common ---------- */
  .card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e7e5e4;
    padding: 16px;
    margin-bottom: 12px;
  }
  .stack > * + * { margin-top: 12px; }
  .row { display: flex; gap: 12px; align-items: center; }
  .row.between { justify-content: space-between; }
  .grow { flex: 1; }
  .muted { color: #78716c; font-size: 13px; }
  .small { font-size: 13px; }
  .strong { font-weight: 700; }
  .num { font-variant-numeric: tabular-nums; }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background .15s, opacity .15s, transform .05s;
    white-space: nowrap;
  }
  .btn:active { transform: scale(0.98); }
  .btn-primary { background: #1c1917; color: #fff; }
  .btn-primary:hover { background: #292524; }
  .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
  .btn-secondary { background: #f5f5f4; color: #1c1917; border: 1px solid #e7e5e4; }
  .btn-secondary:hover { background: #e7e5e4; }
  /* 白枠ボタン（Excel入出力などの補助操作用） */
  .btn-outline { background: #fff; color: #1c1917; border: 1px solid #cbd5e1; }
  .btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
  .btn-danger { background: #fee2e2; color: #b91c1c; }
  .btn-danger:hover { background: #fecaca; }
  .btn-brand-hachiban { background: #d61518; color: #fff; }
  .btn-brand-hachiban:hover { background: #b91c1c; }
  .btn-brand-komeda { background: #6b4423; color: #fff; }
  .btn-brand-komeda:hover { background: #543419; }
  .btn-block { width: 100%; }
  .btn-sm { padding: 6px 10px; font-size: 13px; }
  .btn-lg { padding: 14px 20px; font-size: 16px; }

  .input, .select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
  }
  .input:focus, .select:focus {
    outline: none;
    border-color: #1c1917;
    box-shadow: 0 0 0 3px #1c191720;
  }
  label.field {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #44403c;
    margin-bottom: 6px;
  }

  .badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
  }
  .badge.done { background: #dcfce7; color: #15803d; }
  .badge.pending { background: #fef3c7; color: #a16207; }
  .badge.empty { background: #f5f5f4; color: #78716c; }
  .badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; display: inline-block;
  }

  /* ---------- Login (premium look) ---------- */
  .login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: transparent;
  }
  .login-wrapper::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
      radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 28px 28px;
    pointer-events: none;
  }
  .login-shell {
    position: relative; z-index: 2;
    width: 100%; max-width: 440px;
    animation: fadeUp .6s ease-out;
  }
  @keyframes fadeUp {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .login-brand-row {
    display: flex; justify-content: center; align-items: stretch; gap: 12px;
    margin-bottom: 20px;
    animation: fadeUp .8s ease-out;
    flex-wrap: wrap;
  }
  .login-brand-logo {
    background: #fff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    transition: transform .3s;
    padding: 8px 12px;
    height: 60px;
    box-sizing: border-box;
  }
  .login-brand-logo.hachiban { min-width: 160px; }
  .login-brand-logo.komeda { width: 60px; }
  .login-brand-logo:hover { transform: translateY(-2px) scale(1.05); }
  .login-brand-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    display: block;
  }
  .login-product-icon {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    animation: fadeUp .7s ease-out;
  }
  .login-product-icon img {
    width: 104px; height: 104px;
    border-radius: 24px;
    object-fit: contain;
    filter: drop-shadow(0 16px 36px rgba(34, 197, 94, 0.30))
            drop-shadow(0 4px 12px rgba(0,0,0,0.45));
    animation: productFloat 5s ease-in-out infinite;
  }
  @keyframes productFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  @media (max-width: 420px) {
    .login-product-icon img { width: 88px; height: 88px; }
  }
  .login-company-row {
    text-align: center;
    margin-bottom: 20px;
  }
  .login-company-mark {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 14px 22px;
    margin-bottom: 12px;
    box-shadow:
      0 12px 36px rgba(34, 197, 94, 0.35),
      0 2px 8px rgba(0,0,0,0.3);
    max-width: 280px;
  }
  .login-company-mark img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    display: block;
  }
  /* 完成版ロゴ（緑ネオン Tanakan）— ログイン画面 */
  .login-wordmark {
    width: 100%;
    text-align: center;
    margin-bottom: 14px;
  }
  .login-wordmark img {
    width: 78%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 0 18px rgba(34,197,94,0.45));
  }
  @media (max-width: 420px) {
    .login-wordmark img { width: 86%; max-width: 260px; }
  }
  /* 青みがかった白ネオンの袋文字（ログイン画面のみ） */
  .login-company-neon {
    display: inline-block;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 46px;
    font-weight: 900;
    letter-spacing: 0.10em;
    line-height: 1;
    margin-bottom: 12px;
    color: #f2f9ff;
    -webkit-text-stroke: 1.3px rgba(165, 214, 255, 0.95);
    text-shadow:
      0 0 4px rgba(220, 240, 255, 0.95),
      0 0 11px rgba(120, 190, 255, 0.90),
      0 0 24px rgba(70, 150, 255, 0.75),
      0 0 46px rgba(40, 120, 255, 0.55);
    animation: neonPulse 3.2s ease-in-out infinite;
  }
  @keyframes neonPulse {
    0%, 100% {
      text-shadow:
        0 0 4px rgba(220, 240, 255, 0.95),
        0 0 11px rgba(120, 190, 255, 0.90),
        0 0 24px rgba(70, 150, 255, 0.75),
        0 0 46px rgba(40, 120, 255, 0.55);
    }
    50% {
      text-shadow:
        0 0 5px rgba(225, 243, 255, 1.00),
        0 0 14px rgba(130, 200, 255, 0.95),
        0 0 30px rgba(80, 160, 255, 0.85),
        0 0 58px rgba(45, 130, 255, 0.65);
    }
  }
  @media (max-width: 420px) {
    .login-company-neon { font-size: 36px; letter-spacing: 0.08em; }
  }
  .login-company-jp {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    margin-top: 4px;
  }
  .login-subtitle {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.10em;
    margin-top: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  }
  .login-version {
    color: #4ade80;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-top: 5px;
  }
  .login-credit {
    color: rgba(255,255,255,0.45);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    margin-top: 3px;
  }
  .login-divider {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.3);
    font-size: 11px; letter-spacing: 0.2em;
    margin: 14px 0;
  }
  .login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  }
  .login-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 28px 26px;
    box-shadow:
      0 30px 60px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .login-card label.field { color: rgba(255,255,255,0.7); font-weight: 500; }
  .login-card .input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    transition: all .2s;
  }
  .login-card .input::placeholder { color: rgba(255,255,255,0.35); }
  .login-card .input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  }
  .login-card .btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 30px rgba(21, 128, 61, 0.4);
  }
  .login-card .btn-primary:hover {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  }
  .login-card .demo-hint {
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.65);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 11px;
    margin-top: 16px;
    line-height: 1.6;
  }
  .login-card .demo-hint code {
    background: rgba(255,255,255,0.1);
    color: #4ade80;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10.5px;
  }
  .login-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    letter-spacing: 0.15em;
  }
  /* KOESA マーク（AIヒューマン＋K、さりげなく） */
  .login-koesa {
    display: flex;
    justify-content: center;
    margin-top: 18px;
  }
  .login-koesa img {
    width: 46px;
    height: 46px;
    opacity: 0.5;
    transition: opacity .3s ease;
  }
  .login-koesa img:hover { opacity: 0.85; }

  /* ---------- Dashboard ---------- */
  .month-strip {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 12px; padding: 8px;
    border: 1px solid #e7e5e4;
    margin-bottom: 16px;
  }
  .month-strip .month-label {
    flex: 1; text-align: center;
    font-weight: 700;
    font-size: 15px;
  }
  .month-strip button {
    width: 36px; height: 36px; border-radius: 8px;
    background: #f5f5f4;
  }
  .month-strip button:hover { background: #e7e5e4; }

  .totals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  @media (min-width: 700px) {
    .totals-grid { grid-template-columns: repeat(4, 1fr); }
  }
  .stat-card {
    background: #fff; border: 1px solid #e7e5e4; border-radius: 12px;
    padding: 14px 16px;
  }
  .stat-card .label { font-size: 12px; color: #78716c; margin-bottom: 4px; }
  .stat-card .value { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
  .stat-card.accent-hachiban { border-top: 3px solid #d61518; }
  .stat-card.accent-komeda { border-top: 3px solid #6b4423; }
  .stat-card.accent-hyonchan { border-top: 3px solid #92400e; }

  .section-title {
    font-size: 14px; font-weight: 700; color: #eafff6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    margin: 20px 0 8px;
    display: flex; align-items: center; gap: 8px;
  }
  .section-title .count {
    font-size: 12px; color: rgba(255,255,255,0.7); font-weight: 500;
  }

  .store-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color .15s, background .15s;
    cursor: pointer;
  }
  .store-row:hover { border-color: #a8a29e; background: #fafaf9; }
  .store-row .name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
  .store-row .meta { font-size: 12px; color: #78716c; display: flex; gap: 8px; align-items: center; }
  .store-row .amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
  .store-row .amount.zero { color: #a8a29e; font-weight: 500; }

  /* ---------- Inventory entry ---------- */
  .inv-header {
    background: #fff; border-radius: 12px; padding: 14px 16px;
    border: 1px solid #e7e5e4;
    margin-bottom: 12px;
    display: flex; flex-direction: column; gap: 6px;
  }
  .inv-header .store-name { font-size: 17px; font-weight: 700; }
  .inv-header .progress-bar {
    height: 6px; background: #f5f5f4; border-radius: 999px; overflow: hidden;
    margin-top: 6px;
  }
  .inv-header .progress-fill {
    height: 100%; background: #16a34a; transition: width .3s;
  }

  .cat-tabs {
    display: flex; gap: 6px; overflow-x: auto;
    padding: 4px 0 12px;
    margin: 0 -4px;
    scrollbar-width: none;
  }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e7e5e4;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: #57534e;
    transition: all .15s;
  }
  .cat-tab:hover { border-color: #a8a29e; }
  .cat-tab.active {
    background: #1c1917; color: #fff; border-color: #1c1917;
  }
  .cat-tab .cnt {
    font-size: 11px; opacity: 0.7; margin-left: 4px;
  }

  .item-search {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
  }
  .item-search input {
    border: none; outline: none; flex: 1; font-size: 14px;
    background: transparent;
  }
  .item-search svg { width: 16px; height: 16px; color: #a8a29e; }

  .item-list { background: #fff; border-radius: 12px; border: 1px solid #e7e5e4; overflow: hidden; }
  .item-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f4;
    align-items: center;
  }
  .item-row:last-child { border-bottom: none; }
  .item-row .info { min-width: 0; }
  .item-row .info .name {
    font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .item-row .info .meta {
    font-size: 11px; color: #78716c;
    display: flex; gap: 6px; align-items: center; margin-top: 2px;
  }
  .item-row .info .meta .unit-pill {
    background: #f5f5f4; padding: 1px 6px; border-radius: 4px; font-weight: 500;
  }
  .item-row .qty-cell {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 2px;
  }
  .item-row .qty-stepper {
    display: flex; align-items: stretch; gap: 5px;
  }
  .item-row .qty-step {
    flex: 0 0 auto; width: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #d6d3d1; border-radius: 8px;
    background: #f5f5f4; color: #44403c;
    transition: background .15s, border-color .15s, transform .05s;
    -webkit-tap-highlight-color: transparent;
  }
  .item-row .qty-step:hover { background: #e7e5e4; }
  .item-row .qty-step:active { transform: scale(0.92); background: #d6d3d1; }
  .item-row .qty-step:disabled { opacity: .4; cursor: not-allowed; }
  .item-row .qty-step svg { display: block; }
  .item-row input.qty {
    width: 72px; padding: 10px 8px;
    text-align: right;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    background: #fff;
  }
  .item-row input.qty:focus {
    border-color: #1c1917;
    outline: none;
    box-shadow: 0 0 0 3px #1c191720;
  }
  .item-row input.qty.has-value {
    border-color: #16a34a;
    background: #f0fdf4;
  }
  .item-row .amount-mini {
    font-size: 11px; color: #57534e;
    font-variant-numeric: tabular-nums;
  }
  .item-row.seasonal {
    background: linear-gradient(to right, #fef3c7, transparent 20%);
  }
  .item-row .season-pill {
    font-size: 10px;
    background: #fef3c7; color: #a16207;
    padding: 1px 6px; border-radius: 999px;
    font-weight: 600;
  }

  .empty-cat {
    padding: 24px;
    text-align: center;
    color: #a8a29e;
    font-size: 14px;
  }

  /* ---------- Sticky save bar ---------- */
  .save-bar {
    position: sticky; bottom: 0;
    background: #fff;
    border-top: 1px solid #e7e5e4;
    margin: 16px -16px -16px;
    padding: 12px 16px;
    display: grid; grid-template-columns: 1fr auto; gap: 12px;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }
  .save-bar .total-label { font-size: 12px; color: #78716c; }
  .save-bar .total-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

  /* ---------- Admin ---------- */
  .admin-tabs {
    display: flex; gap: 4px;
    background: #f5f5f4;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
    width: fit-content;
  }
  .admin-tab {
    padding: 8px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    color: #57534e;
    transition: all .15s;
  }
  .admin-tab.active {
    background: #fff;
    color: #1c1917;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  }

  .admin-table {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    overflow: hidden;
  }
  .admin-table .header {
    display: grid;
    grid-template-columns: 80px 1fr 70px 70px 110px 100px;
    gap: 8px;
    padding: 10px 14px;
    background: #fafaf9;
    border-bottom: 1px solid #e7e5e4;
    font-size: 11px; font-weight: 700; color: #57534e;
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .admin-row {
    display: grid;
    grid-template-columns: 80px 1fr 70px 70px 110px 100px;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid #f5f5f4;
    align-items: center;
    font-size: 13px;
  }
  .admin-row:last-child { border-bottom: none; }
  .admin-row input { padding: 6px 8px; font-size: 13px; }
  .admin-row .actions { display: flex; gap: 4px; justify-content: flex-end; }
  .admin-row.is-seasonal { background: #fffbeb; }
  @media (max-width: 700px) {
    .admin-table .header { display: none; }
    .admin-row {
      grid-template-columns: 1fr;
      gap: 6px;
      padding: 12px;
      border-bottom: 1px solid #e7e5e4;
    }
    .admin-row > * { width: 100%; }
    .admin-row .actions { justify-content: flex-end; padding-top: 4px; }
  }

  .modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    z-index: 100;
    animation: fadeIn .15s;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .modal {
    background: #fff;
    border-radius: 14px;
    width: 100%; max-width: 460px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal h2 { font-size: 17px; margin-bottom: 16px; }
  .modal .field-group { margin-bottom: 12px; }
  .modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

  .toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: #1c1917; color: #fff;
    padding: 10px 18px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 200;
    animation: toastIn .2s;
  }
  @keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
  .toast.success { background: #15803d; }
  .toast.error { background: #b91c1c; }

  .loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; color: #78716c;
  }
  .loading::after {
    content: ''; width: 24px; height: 24px;
    border: 3px solid #e7e5e4; border-top-color: #1c1917;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* Filters above admin item list */
  .admin-filters {
    display: flex; gap: 8px; margin-bottom: 12px;
    flex-wrap: wrap;
  }
  .admin-filters select, .admin-filters input {
    flex: 1; min-width: 140px;
  }

  /* Dashboard read-only review note */
  .info-banner {
    background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
    border-radius: 10px; padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex; align-items: flex-start; gap: 8px;
  }
  .info-banner svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }

  /* Help text */
  .help { font-size: 12px; color: #78716c; }
  .text-right { text-align: right; }

  .checkbox-row {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 0;
  }
  .checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px;
  }

  hr.divider { border: none; height: 1px; background: #e7e5e4; margin: 12px 0; }

  /* ---------- High-value alert ---------- */
  .item-row.high-value {
    background: #fef2f2;
  }
  .item-row.high-value .name { color: #b91c1c; }
  .item-row.high-value .amount-mini {
    color: #b91c1c; font-weight: 700;
  }
  .item-row.high-value input.qty {
    border-color: #fca5a5;
  }
  .item-row.high-value .alert-icon {
    color: #dc2626; font-size: 13px; font-weight: 700; margin-left: 4px;
  }
  .high-value-banner {
    background: #fef2f2; border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 10px; padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex; align-items: flex-start; gap: 8px;
  }
  .high-value-banner svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }
  .high-value-banner strong { font-weight: 700; }

  /* ---------- Ranking ---------- */
  .ranking-section { margin-top: 24px; }
  .ranking-grid {
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
  }
  @media (min-width: 700px) {
    .ranking-grid { grid-template-columns: 1fr 1fr 1fr; }
    .ranking-grid-4 { grid-template-columns: 1fr 1fr; }
  }
  @media (min-width: 1000px) {
    .ranking-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
  }
  .ranking-card {
    background: #fff; border: 1px solid #e7e5e4; border-radius: 12px;
    padding: 14px;
  }
  .ranking-card h3 {
    font-size: 13px; font-weight: 700; color: #44403c;
    margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 1px solid #f5f5f4;
  }
  .ranking-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px; align-items: center;
    padding: 6px 0;
    font-size: 13px;
  }
  .ranking-row + .ranking-row { border-top: 1px dashed #f5f5f4; }
  .ranking-row .rank-badge {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    background: #f5f5f4; color: #57534e;
  }
  .ranking-row .rank-badge.gold { background: #fef3c7; color: #b45309; }
  .ranking-row .rank-badge.silver { background: #e5e7eb; color: #374151; }
  .ranking-row .rank-badge.bronze { background: #fde6d3; color: #92400e; }
  .ranking-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ranking-row .amount { font-variant-numeric: tabular-nums; font-weight: 600; }
  .ranking-row.empty .name { color: #a8a29e; font-weight: 400; }
  .ranking-row.empty .amount { color: #a8a29e; }
  .ranking-empty {
    text-align: center; color: #a8a29e; padding: 16px 0; font-size: 13px;
  }

  /* ---------- Input person fields ---------- */
  .person-fields {
    background: #fff; border: 1px solid #e7e5e4;
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 12px;
  }
  .person-fields .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  @media (min-width: 600px) {
    .person-fields .row { grid-template-columns: 1fr 1fr; }
  }
  .person-fields label.field { margin-bottom: 4px; }
  .person-fields .help-line {
    font-size: 11px; color: #78716c;
    margin-top: 8px;
  }
  .person-fields .person-warn {
    color: #b91c1c; font-weight: 600;
    margin-top: 6px;
    font-size: 12px;
  }

  /* ---------- Note button & area ---------- */
  .item-row {
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 12px 14px;
  }
  .item-row .info-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .item-row .note-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; color: #57534e;
    background: transparent;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-start;
    border: 1px solid #e7e5e4;
    transition: all .15s;
  }
  .item-row .note-toggle:hover { background: #f5f5f4; }
  .item-row .note-toggle.has-note {
    background: #fef3c7; border-color: #fde047; color: #92400e;
  }
  .item-row .note-area {
    display: none;
    margin-top: 6px;
  }
  .item-row .note-area.open { display: block; }
  .item-row .note-area textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    font-size: 12px;
    resize: vertical;
    min-height: 40px;
    font-family: inherit;
  }
  .item-row .note-area textarea:focus {
    outline: none; border-color: #1c1917;
    box-shadow: 0 0 0 2px #1c191720;
  }
  .item-row .supplier-line {
    font-size: 11px; color: #57534e;
  }

  /* ---------- Totals split (food / supplies) ---------- */
  .save-bar {
    grid-template-columns: 1fr auto;
  }
  .save-bar .totals-split {
    display: flex; gap: 16px;
    font-size: 11px; color: #57534e;
    margin-top: 2px;
  }
  .save-bar .totals-split span b {
    color: #1c1917;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .stat-card .sub-amounts {
    display: flex; gap: 8px;
    font-size: 11px; color: #78716c;
    margin-top: 4px;
  }
  .stat-card .sub-amounts span b {
    color: #44403c;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  /* ---------- Approval & signature ---------- */
  .approval-section {
    margin-top: 28px;
  }
  .approval-card {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 14px;
    padding: 18px;
  }
  .approval-card.hachiban-accent { border-top: 4px solid #d61518; }
  .approval-card.komeda-accent { border-top: 4px solid #6b4423; }
  .approval-card.hyonchan-accent { border-top: 4px solid #92400e; }
  .approval-card h3 {
    font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
  }
  .approval-card .status-line {
    font-size: 12px; color: #57534e;
    margin-bottom: 12px;
  }
  .approval-card .status-line .pending-count { color: #b45309; font-weight: 600; }
  .approval-card .totals-line {
    background: #fafaf9;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .approval-card .totals-line span b {
    font-variant-numeric: tabular-nums;
    color: #1c1917; font-weight: 700;
  }
  .approval-card .approved-stamp {
    display: flex; align-items: center; gap: 10px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .approval-card .approved-stamp .stamp-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #16a34a;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
  }
  .approval-card .approved-stamp .stamp-icon svg { width: 20px; height: 20px; }
  .approval-card .approved-stamp .stamp-text {
    flex: 1;
    font-size: 12px;
    color: #14532d;
  }
  .approval-card .approved-stamp .stamp-text strong { font-size: 14px; }
  .approval-card .signature-preview {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    margin-top: 8px;
  }
  .approval-card .signature-preview img {
    max-height: 60px;
  }

.ninin-seal { display:inline-block; vertical-align:middle; }
  .card-sign.signed { display:flex; flex-direction:column; align-items:center; gap:2px; }
  .confirm-sig { text-align:center; margin-top:6px; }

  /* 接続・保存バナー */
  .conn-banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:9px 16px;
    font-size:13px; font-weight:700; line-height:1.5; }
  .conn-banner.offline { background:#7f1d1d; color:#fff; }
  .conn-banner.warn { background:#b45309; color:#fff; }
  .conn-diag-btn { background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.55); color:#fff;
    border-radius:8px; padding:4px 12px; font-size:12px; font-weight:700; cursor:pointer; }
  .conn-diag-btn:hover { background:rgba(255,255,255,.30); }

  .sign-pad-wrap {
    background: #f5f5f4;
    border: 1px dashed #a8a29e;
    border-radius: 10px;
    padding: 8px;
  }
  .sign-pad {
    background: #fff;
    border-radius: 6px;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    display: block;
  }
  .sign-pad-toolbar {
    display: flex; gap: 8px; justify-content: space-between; align-items: center;
    margin-top: 8px;
    font-size: 11px; color: #57534e;
  }

  .approval-card .name-row {
    display: grid; grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  /* Dashboard: approval status summary */
  .approval-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  @media (max-width: 600px) {
    .approval-summary { grid-template-columns: 1fr; }
  }
  .approval-summary-card {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
  }
  .approval-summary-card.approved { background: #f0fdf4; border-color: #86efac; }
  .approval-summary-card.pending { background: #fffbeb; border-color: #fde047; }
  .approval-summary-card.notready { background: #f5f5f4; border-color: #d6d3d1; }
  .approval-summary-card .badge-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .approval-summary-card.approved .badge-icon { background: #16a34a; color: #fff; }
  .approval-summary-card.pending .badge-icon { background: #f59e0b; color: #fff; }
  .approval-summary-card.notready .badge-icon { background: #a8a29e; color: #fff; }
  .approval-summary-card .badge-icon svg { width: 18px; height: 18px; }
  .approval-summary-card .info { flex: 1; min-width: 0; }
  .approval-summary-card .info .label { font-size: 11px; color: #78716c; }
  .approval-summary-card .info .value { font-size: 14px; font-weight: 700; }
  .approval-summary-card .info .meta { font-size: 11px; color: #57534e; }

  /* ---------- Print ---------- */
  .print-area { display: none; }
  @media print {
    body { background: #fff; }
    #app { display: none !important; }
    .print-area {
      display: block !important;
      color: #000;
      font-size: 10pt;
      font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
    }
    @page { size: A4; margin: 12mm; }
    .p-header { margin-bottom: 10pt; border-bottom: 1.5pt solid #000; padding-bottom: 6pt; }
    .p-header h1 { font-size: 16pt; margin: 2pt 0 2pt; }
    .p-brand-pill {
      display: inline-block; padding: 1pt 8pt; font-size: 9pt; font-weight: 600;
      border: 0.5pt solid #888;
    }
    .p-brand-pill.hachiban { background: #fee2e2; }
    .p-brand-pill.komeda { background: #f5ecd9; }
    .p-meta {
      font-size: 9pt; color: #333;
      display: flex; gap: 18pt; flex-wrap: wrap;
      margin-top: 4pt;
    }
    .p-cat-section { margin-bottom: 8pt; }
    .p-cat-title {
      font-size: 11pt; font-weight: 700;
      background: #ddd; padding: 3pt 6pt;
      border: 0.5pt solid #000;
      border-bottom: none;
    }
    .p-table {
      width: 100%; border-collapse: collapse;
      page-break-inside: auto;
    }
    .p-table thead { display: table-header-group; }
    .p-table tfoot { display: table-footer-group; }
    .p-table tr { page-break-inside: avoid; }
    .p-table th, .p-table td {
      border: 0.5pt solid #888;
      padding: 2pt 5pt;
      font-size: 9pt;
      line-height: 1.3;
    }
    .p-table th {
      background: #f0f0f0; font-weight: 600; text-align: center;
    }
    .p-table td.col-no { text-align: center; width: 8%; }
    .p-table td.col-name { width: 38%; }
    .p-table td.col-unit { text-align: center; width: 8%; }
    .p-table td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
    .p-subtotal td {
      font-weight: 700; background: #f8f8f8;
    }
    .p-table tr.p-high-value td {
      color: #b91c1c;
      background: #fef2f2;
    }
    .p-table tr.p-high-value td.col-num:last-child {
      font-weight: 700;
    }
    .p-grand {
      margin-top: 14pt;
      border-top: 1.5pt solid #000;
      border-bottom: 1.5pt double #000;
      padding: 8pt 6pt;
      display: flex; justify-content: space-between; align-items: center;
      font-weight: 700;
    }
    .p-grand .label { font-size: 12pt; }
    .p-grand .value { font-size: 16pt; }
    .p-footnote {
      margin-top: 12pt;
      font-size: 8pt; color: #666;
      display: flex; justify-content: space-between;
    }
    .p-page-break { page-break-before: always; }
  }

  /* === 追加スタイル: 締切バナー / 保存ステータス / ロック === */
  .deadline-banner {
    background: #fffbeb; color: #92400e; border-bottom: 1px solid #fcd34d;
    padding: 8px 16px; font-size: 13px; font-weight: 600; text-align: center;
  }
  .deadline-banner.locked { background: #fef2f2; color: #991b1b; border-bottom-color: #fca5a5; }
  .deadline-banner.countdown { background: #fef2f2; color: #b91c1c; border-bottom: 1px solid #fca5a5; }
  .deadline-banner .deadline-countdown { font-weight: 800; font-variant-numeric: tabular-nums; }
  .deadline-banner .deadline-note { font-weight: 500; font-size: 12px; opacity: .85; }
  .deadline-banner.approval-countdown { background: #fef2f2; color: #b91c1c; border-bottom: 1px solid #fca5a5; }
  .deadline-banner.approval-locked { background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fca5a5; }
  .save-status { font-size: 12px; margin-top: 4px; min-height: 16px; color: #78716c; }
  .save-status.saving { color: #b45309; }
  .save-status.saved { color: #15803d; font-weight: 600; }
  .save-status.error { color: #b91c1c; font-weight: 600; }
  .info-banner.locked { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
  .deadline-card { border-top: 4px solid #f59e0b; margin-bottom: 16px; }
  .deadline-status { font-size: 13px; color: #15803d; font-weight: 600; }
  .deadline-status.locked { color: #b91c1c; }
  @media print { .deadline-banner, .save-status { display: none !important; } }

  /* === Phase A: アラート状況 === */
  .alert-section { margin-top: 24px; }
  .alert-section .section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .alert-ranking-card {
    background: #fff; border: 1px solid #fee2e2; border-radius: 12px;
    padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); margin-bottom: 14px;
  }
  .alert-ranking-card h3 { font-size: 14px; margin: 0 0 10px; color: #991b1b; }
  .alert-rank-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; }
  .alert-rank-row + .alert-rank-row { border-top: 1px dashed #fee2e2; }
  .alert-rank-badge { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #f3f4f6; color: #374151; }
  .alert-rank-badge.alert-rank-1 { background: #fecaca; color: #991b1b; }
  .alert-rank-badge.alert-rank-2 { background: #fed7aa; color: #9a3412; }
  .alert-rank-badge.alert-rank-3 { background: #fde68a; color: #92400e; }
  .alert-rank-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .alert-rank-row .alert-count { font-weight: 700; color: #b91c1c; font-size: 13px; }
  .alert-rank-row .amount { font-variant-numeric: tabular-nums; color: #444; font-size: 13px; }
  .alert-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
  .alert-store-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; }
  .alert-store-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .alert-store-head .alert-store-meta { margin-left: auto; font-size: 12px; color: #b91c1c; font-weight: 600; }
  .alert-items-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
  .alert-items-table th, .alert-items-table td { padding: 4px 6px; border-bottom: 1px solid #f1f1f1; text-align: left; }
  .alert-items-table th { color: #888; font-weight: 600; }
  .alert-items-table .num { text-align: right; font-variant-numeric: tabular-nums; }
  .alert-items-table .strong { font-weight: 700; color: #b91c1c; }
  .alert-items-table .muted { color: #aaa; font-size: 11px; }
  .alert-comment-block { margin-top: 8px; }
  .alert-comment-block.mgr { border-top: 1px dashed #eee; padding-top: 8px; }
  .alert-comment-label { display: block; font-size: 11px; color: #6b7280; font-weight: 600; margin-bottom: 4px; }
  .alert-comment { width: 100%; resize: vertical; box-sizing: border-box; }
  .alert-comment-name { width: 100%; margin-top: 4px; box-sizing: border-box; }
  .alert-comment:disabled, .alert-comment-name:disabled { background: #f9fafb; color: #9ca3af; }
  @media print {
    .p-table td.num, .p-alert-rank td.num, .p-alert-rank th.num { text-align: right; font-variant-numeric: tabular-nums; }
    .p-alert-rank { width: 100%; border-collapse: collapse; margin-bottom: 10pt; }
    .p-alert-rank th, .p-alert-rank td { border: 0.5pt solid #888; padding: 3pt 6pt; font-size: 9pt; }
    .p-alert-rank th { background: #f0f0f0; font-weight: 600; }
    .p-alert-store { margin-bottom: 10pt; page-break-inside: avoid; }
    .p-alert-store-head { font-weight: 700; font-size: 10.5pt; background: #fef2f2; padding: 3pt 6pt; border: 0.5pt solid #888; }
    .p-alert-comments { font-size: 9pt; margin-top: 3pt; padding: 4pt 6pt; border: 0.5pt dashed #999; }
    .p-alert-comments div { margin: 2pt 0; }
  }

  /* === Phase C-2: 店舗確認・署名 === */
  .store-confirm-block { margin-top: 14px; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 12px; background: #fafafa; }
  .store-confirm-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; color: #374151; }
  .confirm-missing { color: #b91c1c; font-size: 12px; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
  .confirm-next { color: #2563eb; font-size: 12px; margin-top: 6px; }
  .confirm-pending { color: #92400e; font-size: 13px; }
  .confirm-done { color: #15803d; font-weight: 600; font-size: 13px; }
  .confirm-sig { display: block; max-height: 60px; margin-top: 6px; border-bottom: 1px solid #d1d5db; }
  .card-sign { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
  .card-sign.signed img { max-height: 38px; max-width: 150px; }
  .card-sign-by { font-size: 10px; color: #15803d; font-weight: 600; }
  .card-sign.pad { padding: 4px; border: 1px dashed #93c5fd; border-radius: 8px; background: #f8fafc; }
  .store-sign-pad { width: 220px; height: 70px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; touch-action: none; }
  .card-sign-tools { display: flex; gap: 4px; margin-top: 4px; }
  .card-sign.waiting { font-size: 11px; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 4px 8px; }
  .approve-status-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
  .approve-status-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; background: #fff; border: 1px solid #eee; border-radius: 8px; }
  .approve-status-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .approve-status-row .by { font-size: 11px; color: #15803d; }
  .soumu-block { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 10px; }
  .soumu-ready { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }

  /* === Phase E: 本社確認完了 === */
  .soumu-confirmed-banner {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, #16a34a, #15803d); color: #fff;
    border-radius: 16px; padding: 20px 24px; margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(21,128,61,.3);
  }
  .soumu-confirmed-banner .big-check {
    width: 56px; height: 56px; min-width: 56px; border-radius: 50%;
    background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 800;
  }
  .soumu-confirmed-banner .sc-text .title { font-size: 24px; font-weight: 800; letter-spacing: .04em; }
  .soumu-confirmed-banner .sc-text .sub { font-size: 13px; opacity: .92; margin-top: 2px; }
  .soumu-confirmed-banner .btn { margin-left: auto; background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
  .soumu-confirm-ready {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: #f0fdf4; color: #15803d; border: 1.5px solid #86efac;
    border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; font-weight: 600;
  }
  .soumu-confirm-ready .btn { margin-left: auto; }


  /* === 食材ロス記録 === */
  .floss-entry-btn { display:flex; align-items:center; gap:14px; width:100%; margin:0 0 12px; padding:12px 18px;
    border:none; border-radius:16px; cursor:pointer; text-align:left;
    background:linear-gradient(135deg,#0f766e 0%,#10b981 100%); color:#fff;
    box-shadow:0 2px 10px rgba(16,185,129,.25); transition:filter .15s,box-shadow .15s; }
  .floss-entry-btn:hover { filter:brightness(1.04); box-shadow:0 4px 16px rgba(16,185,129,.32); }
  .floss-entry-btn .ic { font-size:30px; flex:0 0 auto; line-height:1; }
  .floss-entry-btn .lbl { flex:1; font-size:15px; line-height:1.25; }
  .floss-entry-btn .lbl b { font-size:19px; font-weight:800; letter-spacing:.5px; display:block; }
  .floss-entry-btn .chev { font-size:24px; font-weight:700; opacity:.9; }
  @media (max-width:480px){ .floss-entry-btn .lbl{font-size:13px;} .floss-entry-btn .lbl b{font-size:16px;} }

  /* === v9.11.0 セクション仕切り / 業態選択 / 新着バッジ / 器物破損 === */
  .entry-stack { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-bottom:6px; align-items:stretch; }
  .entry-stack > button { margin:0 !important; width:100%; height:100%; min-height:88px; }
  @media (max-width:480px){ .entry-stack{ grid-template-columns:1fr; } }
  .dash-section { border:1px solid #e2e8f0; border-radius:16px; padding:16px 14px 8px; margin:0 0 16px; background:#fafafa; }
  .dash-section > legend { font-size:14px; font-weight:800; color:#334155; padding:3px 14px; background:#fff; border:1px solid #e2e8f0; border-radius:999px; margin-left:4px; }
  .brand-pick { display:flex; gap:10px; flex-wrap:wrap; }
  .brand-pick-btn { flex:1 1 120px; min-height:62px; font-size:18px; font-weight:800; letter-spacing:.5px;
    border:2px solid #cbd5e1; border-radius:14px; background:#fff; color:#334155; cursor:pointer;
    display:flex; align-items:center; justify-content:center; gap:6px; transition:transform .08s, box-shadow .15s, background .15s; }
  .brand-pick-btn:hover { box-shadow:0 3px 12px rgba(0,0,0,.10); }
  .brand-pick-btn:active { transform:scale(.97); }
  .brand-pick-btn.active { background:linear-gradient(135deg,#1e3a8a,#0ea5e9); color:#fff; border-color:#1e3a8a; box-shadow:0 4px 14px rgba(14,165,233,.35); }
  .entry-badge { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 7px;
    border-radius:999px; background:#ef4444; color:#fff; font-size:13px; font-weight:800; line-height:1; margin-left:8px; box-shadow:0 1px 4px rgba(239,68,68,.45); }
  .kbreak-entry-btn { display:flex; align-items:center; gap:14px; width:100%; margin:0 0 12px; padding:12px 18px;
    border:none; border-radius:16px; cursor:pointer; text-align:left;
    background:linear-gradient(135deg,#b45309 0%,#f59e0b 100%); color:#fff;
    box-shadow:0 2px 10px rgba(245,158,11,.25); transition:filter .15s,box-shadow .15s; }
  .kbreak-entry-btn:hover { filter:brightness(1.04); box-shadow:0 4px 16px rgba(245,158,11,.32); }
  .kbreak-entry-btn .ic { font-size:30px; flex:0 0 auto; line-height:1; }
  .kbreak-entry-btn .lbl { flex:1; font-size:15px; line-height:1.25; }
  .kbreak-entry-btn .lbl b { font-size:19px; font-weight:800; letter-spacing:.5px; display:block; }
  .kbreak-entry-btn .chev { font-size:24px; opacity:.85; }
  .kb-period { background:#fff7ed !important; color:#9a3412 !important; border-color:#fdba74 !important; }
  .ai-promo { position:relative; display:flex; align-items:center; gap:18px; border-radius:16px; padding:18px 20px; margin:18px 0;
    background:linear-gradient(110deg,#0b1220 0%,#142a4d 46%,#0e3a5c 100%); border:1px solid #1e3a5f; overflow:hidden;
    box-shadow:0 8px 28px rgba(8,20,40,.42); }
  .ai-promo-figure { position:relative; flex:0 0 auto; display:flex; flex-direction:column; align-items:center; gap:6px; }
  .ai-promo-name { display:flex; flex-direction:column; align-items:center; line-height:1.05; font-weight:800; letter-spacing:.06em; color:#e0f2fe; font-size:14px; }
  .ai-promo-name small { font-size:10px; font-weight:600; color:#7dd3fc; letter-spacing:.12em; }
  .ai-promo::before { content:""; position:absolute; inset:0; pointer-events:none;
    background:radial-gradient(130px 90px at 10% 55%, rgba(56,189,248,.30), transparent 70%),
               radial-gradient(170px 110px at 92% 0%, rgba(139,92,246,.24), transparent 70%); }
  .ai-promo::after { content:""; position:absolute; inset:0; pointer-events:none; opacity:.45;
    background:repeating-linear-gradient(90deg, rgba(56,189,248,.06) 0 2px, transparent 2px 7px); }
  .ai-promo-otha { position:relative; flex:0 0 auto; width:84px; height:84px; border-radius:50%; object-fit:cover; background:#0a1424;
    border:2px solid rgba(56,189,248,.7); box-shadow:0 0 0 3px rgba(56,189,248,.14), 0 0 16px rgba(56,189,248,.55); }
  .ai-promo-main { position:relative; flex:1; min-width:160px; }
  .ai-promo-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .ai-promo-head b { font-size:15px; letter-spacing:.02em; color:#fff; }
  .ai-promo-tag { font-size:10px; font-weight:800; color:#7dd3fc; background:rgba(56,189,248,.12); border:1px solid rgba(56,189,248,.4); border-radius:999px; padding:2px 9px; }
  .ai-promo-body { font-size:12px; color:#bcd6ee; line-height:1.6; margin-top:4px; }
  .ai-promo-body b { color:#a5f3fc; }
  .ai-promo-actions { position:relative; flex:0 0 auto; display:flex; flex-direction:column; gap:6px; }
  .ai-promo-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; font-weight:700; font-size:12px; border-radius:9px; padding:7px 14px; white-space:nowrap; }
  .ai-promo-btn.mail { background:rgba(255,255,255,.08); color:#e0f2fe; border:1px solid rgba(125,211,252,.4); }
  .ai-promo-btn.up { background:linear-gradient(135deg,#38bdf8,#6d28d9); color:#fff; border:none; box-shadow:0 2px 10px rgba(56,189,248,.4); }
  @media (max-width:640px){ .ai-promo{flex-wrap:wrap;} .ai-promo-actions{flex-direction:row;width:100%;} .ai-promo-btn{flex:1;} }
  .ai-promo-btn:active { transform:scale(.97); }
  /* === FevaCOIN === */
  .coin-entry-btn { display:flex; align-items:center; gap:14px; width:100%; margin:0 0 12px; padding:12px 18px;
    border:none; border-radius:16px; cursor:pointer; text-align:left;
    background:linear-gradient(135deg,#b45309 0%,#fbbf24 60%,#f59e0b 100%); color:#3b2706;
    box-shadow:0 2px 10px rgba(251,191,36,.30); transition:filter .15s,box-shadow .15s; }
  .coin-entry-btn:hover { filter:brightness(1.05); box-shadow:0 4px 16px rgba(251,191,36,.4); }
  .coin-entry-btn .ic { font-size:30px; flex:0 0 auto; line-height:1; }
  .fevacoin-ic { display:inline-block; vertical-align:-0.2em; border-radius:50%; object-fit:contain;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,.25)); }

  /* Fevascale Stock Bulletin Board（掲示板） */
  .bb-section { }
  .bb-note { font-size:12px; color:#64748b; margin-bottom:8px; }
  .bb-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
  .bb-tab { background:#fff; border:1px solid #cbd5e1; border-radius:999px; padding:5px 14px;
    font-size:13px; font-weight:700; color:#475569; cursor:pointer; }
  .bb-tab.active { background:#0f766e; border-color:#0f766e; color:#fff; }
  .bb-form { display:flex; gap:8px; align-items:flex-end; margin-bottom:10px; flex-wrap:wrap; }
  .bb-form textarea { flex:1; min-width:220px; border:1px solid #cbd5e1; border-radius:10px;
    padding:9px 12px; font-size:14px; font-family:inherit; resize:vertical; }
  .bb-form textarea:focus { outline:none; border-color:#0f766e; }
  .bb-list { display:flex; flex-direction:column; gap:8px; max-height:340px; overflow-y:auto; }
  .bb-post { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:8px 12px; }
  .bb-post-head { display:flex; align-items:center; gap:8px; font-size:12px; margin-bottom:3px; }
  .bb-chip { background:#e0f2fe; color:#075985; border-radius:6px; padding:1px 8px; font-weight:700; }
  .bb-chip.all { background:#f1f5f9; color:#475569; }
  .bb-author { font-weight:700; color:#1e293b; }
  .bb-time { color:#94a3b8; }
  .bb-del { margin-left:auto; background:none; border:none; color:#94a3b8; cursor:pointer; font-size:13px; }
  .bb-del:hover { color:#dc2626; }
  .bb-body { font-size:14px; color:#1e293b; white-space:pre-wrap; line-height:1.5; }
  .bb-empty { font-size:13px; color:#94a3b8; padding:8px 2px; }
  .coin-entry-btn .lbl { flex:1; font-size:15px; line-height:1.25; }
  .coin-entry-btn .lbl b { font-size:19px; font-weight:800; letter-spacing:.5px; display:block; color:#3b2706; }
  .coin-entry-btn .chev { font-size:24px; opacity:.7; }
  .coin-badge { display:inline-flex; align-items:center; gap:2px; font-size:12px; font-weight:800; color:#92400e;
    background:#fef3c7; border:1px solid #fcd34d; border-radius:999px; padding:1px 8px; margin-left:6px; vertical-align:middle; }
  .coin-period { background:#fffbeb !important; color:#92400e !important; border-color:#fcd34d !important; }
  .coin-cats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
  @media (max-width:760px){ .coin-cats{ grid-template-columns:1fr; } }
  .coin-cat h4 { margin:0 0 6px; font-size:13px; color:#334155; }
  .coin-trophy-row { display:flex; gap:12px; flex-wrap:wrap; margin:0 0 14px; }
  .coin-trophy { flex:1 1 280px; display:flex; align-items:center; gap:14px; background:#fff; border:1px solid #fcd34d; border-radius:14px; padding:14px 16px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
  .coin-trophy.gold { background:linear-gradient(135deg,#fffbeb,#fef3c7); }
  .coin-trophy .ct-ic { font-size:34px; }
  .coin-trophy .ct-lbl { font-size:12px; color:#92400e; font-weight:700; }
  .coin-trophy .ct-name { font-size:18px; font-weight:800; color:#1e293b; }
  .coin-trophy .ct-sub { font-size:12px; color:#64748b; }
  .fl-wrap { max-width:980px; margin:0 auto; }
  /* 濃紺背景に直接乗るページ見出しは太字白（黒文字だと見えないため） */
  .fl-page-head h1 { color:#fff !important; font-weight:800; font-size:22px;
    text-shadow:0 1px 6px rgba(0,0,0,.5); }
  .fl-page-head { margin-bottom:12px; }
  .fl-card { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:16px; margin:0 0 14px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
  .fl-card h3 { margin:0 0 12px; font-size:16px; }
  .fl-period { display:inline-block; background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; border-radius:999px; padding:3px 12px; font-size:13px; font-weight:700; }
  .fl-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px 14px; }
  @media (max-width:640px){ .fl-grid{ grid-template-columns:1fr; } }
  .fl-field { display:flex; flex-direction:column; gap:4px; }
  .fl-field.full { grid-column:1 / -1; }
  .fl-field label { font-size:12px; color:#475569; font-weight:600; }
  .fl-field input, .fl-field select, .fl-field textarea {
    border:1px solid #cbd5e1; border-radius:9px; padding:9px 11px; font-size:14px; font-family:inherit; background:#fff; }
  .fl-field input:focus, .fl-field select:focus, .fl-field textarea:focus { outline:none; border-color:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.15); }
  .fl-field .hint { font-size:11px; color:#94a3b8; }
  .fl-voice-row { display:flex; gap:10px; align-items:center; margin:4px 0 14px; flex-wrap:wrap; }
  .fl-voice-btn { display:inline-flex; align-items:center; gap:8px; border:none; border-radius:999px; cursor:pointer;
    background:#0f766e; color:#fff; padding:9px 16px; font-size:14px; font-weight:700; }
  .fl-voice-btn:hover { filter:brightness(1.08); }
  .fl-voice-btn .dot { width:9px; height:9px; border-radius:50%; background:#fca5a5; }
  .fl-voice-btn.rec .dot { background:#ef4444; animation:flpulse 1s infinite; }
  @keyframes flpulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }
  .fl-voice-hint { font-size:12px; color:#64748b; }
  .fl-actions { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
  .fl-btn-add { background:#10b981; color:#fff; border:none; border-radius:10px; padding:11px 22px; font-size:15px; font-weight:700; cursor:pointer; }
  .fl-btn-add:hover { filter:brightness(1.06); }
  .fl-btn-clear { background:#fff; color:#1c1917; border:1px solid #cbd5e1; border-radius:10px; padding:11px 18px; font-size:14px; cursor:pointer; }
  .fl-btn-clear:hover { background:#f8fafc; border-color:#94a3b8; }
  .fl-table { width:100%; border-collapse:collapse; font-size:13px; }
  .fl-table th, .fl-table td { border-bottom:1px solid #eef2f7; padding:8px 6px; text-align:left; }
  .fl-table th { color:#64748b; font-weight:700; font-size:12px; background:#f8fafc; }
  .fl-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
  .fl-del { background:none; border:none; color:#ef4444; cursor:pointer; font-size:13px; }
  .fl-empty { color:#94a3b8; text-align:center; padding:18px; }
  .fl-sum { font-weight:800; }
  .fl-ai-box { background:#f8fafc; border:1px dashed #cbd5e1; border-radius:12px; padding:14px; }
  .fl-ai-box .row { display:flex; align-items:center; gap:10px; margin:6px 0; flex-wrap:wrap; }
  .fl-ai-box input[type=text]{ flex:1; min-width:200px; border:1px solid #cbd5e1; border-radius:8px; padding:8px 10px; font-size:13px; }
  .fl-switch { position:relative; display:inline-block; width:46px; height:26px; }
  .fl-switch input { opacity:0; width:0; height:0; }
  .fl-switch .sl { position:absolute; cursor:pointer; inset:0; background:#cbd5e1; border-radius:999px; transition:.2s; }
  .fl-switch .sl:before { content:""; position:absolute; height:20px; width:20px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:.2s; }
  .fl-switch input:checked + .sl { background:#10b981; }
  .fl-switch input:checked + .sl:before { transform:translateX(20px); }

  /* 押印・ロスランキング */
  .seal-section { margin-top:10px; }
  .seal-row { display:flex; gap:16px; flex-wrap:wrap; margin:8px 0; }
  .seal-box { width:152px; min-height:152px; border:2px solid #cbd5e1; border-radius:12px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:6px; padding:10px; background:#fff; }
  .seal-box.stamped { border-color:#fca5a5; background:#fff7f7; }
  .seal-role { font-size:13px; font-weight:700; color:#475569; }
  .seal-img { width:88px; height:88px; object-fit:contain; }
  .seal-img.ghost { opacity:.16; }
  .seal-meta { font-size:11px; color:#64748b; text-align:center; }
  .seal-stamp-btn { background:none; border:1px dashed #cbd5e1; border-radius:10px; cursor:pointer; display:flex;
    flex-direction:column; align-items:center; gap:4px; padding:8px 10px; color:#94a3b8; font-size:12px; }
  .seal-stamp-btn:hover { border-color:#10b981; color:#0f766e; }
  .seal-undo { background:none; border:none; color:#94a3b8; font-size:11px; cursor:pointer; text-decoration:underline; }
  .seal-empty-note { font-size:12px; color:#94a3b8; }
  /* 停止中（非表示）ユーザーの行 */
  .admin-row.suspended { opacity: .55; background: #f8fafc; }
  .user-suspended-badge { flex:none; font-size:10px; font-weight:700; color:#b45309; background:#fef3c7;
    border:1px solid #fcd34d; border-radius:6px; padding:1px 5px; white-space:nowrap; }
  .seal-seal { width:72px; height:72px; display:flex; align-items:center; justify-content:center; }
  .seal-seal.ghost { opacity:.18; }
  .seal-name-input { width:120px; border:1px solid #cbd5e1; border-radius:8px; padding:5px 8px; font-size:13px;
    text-align:center; color:#1e293b; }
  .seal-name-input:focus { outline:none; border-color:#10b981; }
  .seal-stamp-btn2 { background:#c0341d; border:none; border-radius:10px; cursor:pointer; color:#fff;
    padding:7px 12px; font-size:12px; font-weight:700; }
  .seal-stamp-btn2:hover { background:#a12a16; }
  .seal-assign { margin-top:8px; font-size:12px; color:#475569; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
  .seal-assign select { border:1px solid #cbd5e1; border-radius:6px; padding:4px 6px; font-size:12px; }
  /* === Phase F: 店舗間 売買伝票 === */
  .slip-page-head { margin-bottom: 14px; }
  .slip-page-head .co { font-size: 12px; color: #cfe2fb; text-shadow:0 1px 3px rgba(0,0,0,.7); }
  .slip-page-head h2 { font-size: 20px; margin: 2px 0; color:#eafff6; text-shadow:0 1px 3px rgba(0,0,0,.7); }
  .slip-page-head .period { font-size: 13px; font-weight: 700; color: #fcd34d; text-shadow:0 1px 3px rgba(0,0,0,.7); }
  main > h2 { color:#eafff6; text-shadow:0 1px 3px rgba(0,0,0,.7); }
  .slip-line-row { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1.2fr) 78px 104px; gap: 8px; margin-bottom: 6px; }
  @media (max-width:560px){ .slip-line-row { grid-template-columns: 1fr 1fr; } }
  .slip-line-row .input.locked { background:#f8fafc; color:#475569; }
  .slip-lines td.qty, .slip-print-table td.qty { color:#64748b; white-space:nowrap; text-align:right; }
  .coin-tools { display:flex; gap:8px; margin-left:auto; flex-wrap:wrap; }
  .coin-rk-table tbody tr.rk1 { background:linear-gradient(90deg,#fffbeb,#fef3c7); }
  .coin-rk-table tbody tr.rk2 { background:linear-gradient(90deg,#f8fafc,#eef2f7); }
  .coin-rk-table tbody tr.rk3 { background:linear-gradient(90deg,#fff7ed,#ffedd5); }
  .coin-rk-table td.coin-rk-pos { font-weight:800; white-space:nowrap; }
  .slip-card { background: #fff; border: 1px solid #e7e5e4; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
  .slip-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
  .slip-route { font-weight: 700; }
  .slip-route .arr { color: #b45309; margin: 0 2px; }
  .slip-dt { margin-left: auto; font-size: 12px; color: #78716c; }
  .slip-lines { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
  .slip-lines td { padding: 3px 6px; border-bottom: 1px solid #f5f5f4; }
  .slip-lines td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .slip-lines tr.tot td { font-weight: 700; border-top: 1px solid #d6d3d1; border-bottom: none; }
  .slip-sig-line { font-size: 12px; color: #57534e; margin: 6px 0; }
  .slip-actions { display: flex; gap: 6px; justify-content: flex-end; }
  .slip-reason { font-size: 12px; color: #7c2d12; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px; padding: 3px 8px; margin: 2px 0 6px; }
  .slip-exchange-btn { display: flex; align-items: center; gap: 14px; width: 100%; margin: 4px 0 12px; padding: 10px 18px; border: none; border-radius: 16px;
    background: linear-gradient(135deg,#eaf3ff 0%,#dbeafe 55%,#bfdbfe 100%); box-shadow: 0 2px 10px rgba(37,99,235,.18); cursor: pointer; color: #1e3a8a; text-align: left; }
  .slip-exchange-btn:hover { filter: brightness(1.03); box-shadow: 0 4px 16px rgba(37,99,235,.28); }
  .slip-exchange-btn img { height: 54px; width: auto; flex: 0 0 auto; }
  .slip-exchange-btn .lbl { flex: 1; font-size: 15px; line-height: 1.25; }
  .slip-exchange-btn .lbl b { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
  .slip-exchange-btn .chev { font-size: 24px; color: #2563eb; font-weight: 700; }
  @media (max-width: 480px) { .slip-exchange-btn .lbl { font-size: 13px; } .slip-exchange-btn .lbl b { font-size: 16px; } .slip-exchange-btn img { height: 44px; } }
  @media print {
    .slips-print-page { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 4mm; height: 277mm; page-break-after: always; }
    .slips-print-page:last-child { page-break-after: auto; }
    .slip-print-box { position: relative; border: 1pt solid #000; border-radius: 4pt; padding: 5pt 7pt; display: flex; flex-direction: column; overflow: hidden;
      background-image: url('/assets/bg-2.png'); background-repeat: no-repeat; background-position: center 58%; background-size: 72% auto;
      -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .slip-print-box > * { position: relative; }
    .slip-print-reason { font-size: 8pt; color: #7c2d12; margin: 2pt 0 0; }
    .slip-print-head .co { font-size: 8pt; color: #444; }
    .slip-print-head .ttl { font-size: 13pt; font-weight: 800; }
    .slip-print-head .meta { font-size: 8.5pt; color: #333; }
    .slip-print-route { font-size: 11pt; font-weight: 700; margin: 4pt 0; border-bottom: 0.5pt solid #888; padding-bottom: 2pt; }
    .slip-print-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
    .slip-print-table td { border: 0.5pt solid #aaa; padding: 1.5pt 4pt; }
    .slip-print-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
    .slip-print-table tr.tot td { font-weight: 700; background: #f0f0f0; }
    .slip-print-sigs { display: flex; gap: 6pt; margin-top: auto; }
    .slip-print-sigs .sig { flex: 1; border: 0.5pt dashed #999; border-radius: 3pt; padding: 2pt 4pt; min-height: 38pt; }
    .slip-print-sigs .sig .lbl { font-size: 8pt; color: #333; }
    .slip-print-sigs .sig img { max-height: 30pt; max-width: 100%; }
    .slip-print-hq { font-size: 8pt; color: #15803d; margin-top: 3pt; }
  }

  .lx-wrap{ position:relative; min-height:100vh; width:100%; display:flex; align-items:flex-start; justify-content:center;
    padding:42px 16px 30px; overflow-x:hidden; overflow-y:auto; box-sizing:border-box;
    color:#eaf4ff; font-family:"BIZ UDPGothic","Hiragino Kaku Gothic ProN","Noto Sans JP",system-ui,sans-serif;
    background:radial-gradient(1200px 800px at 50% 18%,rgba(54,184,255,.16),transparent 60%),
      radial-gradient(1000px 700px at 80% 90%,rgba(150,90,255,.14),transparent 60%),
      linear-gradient(160deg,#040814 0%,#0a1530 45%,#0d2147 100%); }
  .lx-net{ position:absolute; inset:0; z-index:0; display:block; }
  .lx-faces{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
  .lx-icons{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
  .lx-ai-face{ position:absolute; opacity:0; will-change:transform,opacity;
    filter:drop-shadow(0 0 26px rgba(140,185,255,.8)) drop-shadow(0 0 10px rgba(185,140,255,.6)) saturate(1.55) brightness(1.32);
    transition:opacity 2.1s ease; }
  .lx-klogo{ position:absolute; opacity:.17; will-change:transform; filter:drop-shadow(0 0 12px rgba(120,170,255,.35)); }
  .lx-chip{ position:absolute; display:flex; align-items:center; justify-content:center; border-radius:50%;
    background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.16),rgba(120,170,230,.06));
    border:1px solid rgba(150,200,255,.30); box-shadow:0 0 14px rgba(70,150,255,.18),inset 0 0 10px rgba(120,180,255,.10);
    backdrop-filter:blur(1px); will-change:transform; }
  .lx-chip svg{ width:54%; height:54%; stroke:rgba(225,240,255,.92); fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 4px rgba(90,170,255,.5)); }
  .lx-shell{ position:relative; z-index:1; width:100%; max-width:462px; text-align:center; animation:lxRise .7s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes lxRise{ from{opacity:0;transform:translateY(18px);} to{opacity:1;transform:none;} }
  .lx-logo-box{ width:196px; height:auto; margin:4px auto 14px; position:relative; animation:lxFloat 9s ease-in-out infinite; }
  .lx-logo-box img{ width:100%; height:auto; display:block; object-fit:contain; filter:drop-shadow(0 8px 14px rgba(0,0,0,.42)); }
  @keyframes lxFloat{ 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-13px) rotate(-1deg)} }
  .lx-company{ font-size:22px; font-weight:800; letter-spacing:.04em; margin:4px 0 6px; }
  .lx-tagline{ font-size:16.5px; font-weight:700; color:#cfe2fb; line-height:1.5; letter-spacing:.02em; margin-bottom:12px; text-shadow:0 0 16px rgba(54,184,255,.25); }
  .lx-tagline .lx-lead{ display:block; font-size:15.5px; font-weight:700; color:#cfe2fb; margin-bottom:1px; }
  .lx-product{ font-family:'Anton','Noto Sans JP',sans-serif; font-weight:900; font-size:34px; letter-spacing:.04em; line-height:1.1; text-transform:uppercase;
    background:linear-gradient(92deg,#ffe7a8 0%,#f3c25a 38%,#c8902f 72%,#a6701c 100%);
    -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:0 0 22px rgba(243,194,90,.30); margin-bottom:5px; }
  .lx-product .lx-jp{ font-size:30px; }
  .lx-product-logo{ margin:0 auto 10px; max-width:290px; }
  .lx-product-logo img{ width:100%; display:block; filter:drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
  .lx-meta{ font-size:10.5px; letter-spacing:.04em; margin-bottom:11px; color:#eec766; text-shadow:0 0 10px rgba(243,194,90,.5),0 0 4px rgba(255,220,120,.35); }
  .lx-meta b{ color:#ffe7a8; font-weight:700; text-shadow:0 0 12px rgba(255,215,110,.6); }
  .lx-divider{ display:flex; align-items:center; gap:12px; color:#f3c25a; font-size:12px; font-weight:700; letter-spacing:.34em; margin:4px 0 11px; }
  .lx-divider::before,.lx-divider::after{ content:""; flex:1; height:1px; background:linear-gradient(90deg,transparent,rgba(243,194,90,.5),transparent); }
  .lx-card{ background:rgba(10,20,42,.62); border:1.5px solid rgba(243,194,90,.55); border-radius:18px; padding:20px 20px 20px;
    box-shadow:0 24px 60px rgba(0,0,0,.45),0 0 24px rgba(243,194,90,.28),inset 0 0 18px rgba(243,194,90,.06),inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter:blur(10px); text-align:left; }
  .lx-field{ display:block; font-size:14.5px; color:#f3c25a; font-weight:600; margin:0 0 7px 2px; letter-spacing:.03em; text-shadow:0 0 8px rgba(243,194,90,.35); }
  .lx-input{ width:100%; padding:12px 14px; border-radius:11px; background:rgba(6,14,30,.7); color:#eaf4ff; font-size:15px;
    border:1px solid rgba(243,194,90,.55); outline:none; transition:border-color .18s,box-shadow .18s; margin-bottom:14px; box-sizing:border-box;
    box-shadow:0 0 6px rgba(243,194,90,.25), inset 0 0 5px rgba(243,194,90,.08); }
  .lx-input::placeholder{ color:#5e739a; }
  .lx-pw-wrap{ position:relative; }
  .lx-pw-toggle{ position:absolute; right:8px; top:9px; width:30px; height:30px; border:none; background:transparent; cursor:pointer; font-size:17px; line-height:1; padding:0; opacity:.85; }
  .lx-pw-toggle:hover{ opacity:1; }
  .lx-input:focus{ border-color:#f3c25a; box-shadow:0 0 0 3px rgba(243,194,90,.18); }
  .lx-btn{ width:100%; padding:15px; border:none; border-radius:11px; cursor:pointer; font-size:17.5px; font-weight:800; letter-spacing:.06em; color:#2c1a02; margin-top:4px;
    background:linear-gradient(92deg,#ffe7a8,#f3c25a 45%,#c8902f); box-shadow:0 10px 26px rgba(243,194,90,.34),0 0 18px rgba(255,215,110,.45),inset 0 1px 0 rgba(255,255,255,.5); transition:transform .12s,box-shadow .18s,filter .18s; }
  .lx-btn:hover{ filter:brightness(1.06); box-shadow:0 12px 34px rgba(243,194,90,.5),0 0 26px rgba(255,215,110,.6); }
  .lx-btn:active{ transform:translateY(1px); }
  .lx-hint{ margin-top:16px; padding:13px 14px; border-radius:11px; font-size:12.5px; line-height:1.7; color:#cdbf94; background:rgba(20,40,75,.45); border:1px solid rgba(243,194,90,.45); box-shadow:0 0 12px rgba(243,194,90,.16),inset 0 0 10px rgba(243,194,90,.05); }
  .lx-hint b{ color:#f3c25a; display:inline-block; margin-bottom:3px; }
  .lx-city{ margin:22px auto 6px; max-width:132px; perspective:900px; }
  .lx-coin{ position:relative; width:100%; transform-style:preserve-3d; }
  .lx-coin-face{ width:100%; display:block; backface-visibility:hidden; filter:drop-shadow(0 14px 18px rgba(0,0,0,.55)); }
  .lx-coin-back{ position:absolute; top:0; left:0; transform:rotateY(180deg); }
  @keyframes lxSpinY{ from{transform:rotateY(0deg)} to{transform:rotateY(360deg)} }
  .lx-copy{ font-size:12.5px; letter-spacing:.05em; margin-top:-2px; padding-bottom:4px; color:#e0bd66; text-shadow:0 0 8px rgba(243,194,90,.4); }
  @media(max-width:400px){ .lx-logo-box{width:170px;height:auto;} .lx-shell{max-width:350px;} .lx-city{max-width:112px;} .lx-product{font-size:30px;} .lx-product-logo{max-width:240px;} }

/* 処理中オーバーレイ */
#busy-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 99999; display: none; align-items: center; justify-content: center; }
#busy-overlay .busy-box { background: #fff; border-radius: 14px; padding: 20px 28px; font-weight: 700; font-size: 15px; color: #1e293b; box-shadow: 0 10px 40px rgba(0,0,0,.35); display: flex; align-items: center; gap: 14px; max-width: 90vw; }
#busy-overlay .busy-spin { width: 26px; height: 26px; border: 3.5px solid #e2e8f0; border-top-color: #0f766e; border-radius: 50%; animation: busyspin .8s linear infinite; flex: none; }
@keyframes busyspin { to { transform: rotate(360deg); } }

/* ヒョンチャンプルコギのブランドカラー（トップバー等） */
.topbar.brand-hyonchan { border-bottom-color: #b45309; box-shadow: 0 1px 0 #b45309; }
.brand-hyonchan-color { color: #b45309; }
.btn-brand-hyonchan { background: #b45309; color: #fff; }
.btn-brand-hyonchan:hover { background: #92400e; }
