/* =========================================================
   MAOMAO Seat Timer (Spring Festival GIRA-GIRA)
   - RED x GOLD is PRIORITY 🧧✨
   - PC: 12 cols (C1,C2,BOX1,BOX2 top / C3-8 bottom)
   - Mobile: 2 cols C1-8 first, BOX1-2 big bottom
   ========================================================= */

/* ===== Theme ===== */
:root{
  /* background (warm paper + gold haze) */
  --bg1:#fff1e6;
  --bg2:#ffe2c6;
  --bg3:#fff2a8;

  --paper:#ffffff;

  /* text */
  --ink:#2a0f12;
  --muted:#6a2b2f;

  /* Spring Festival palette (RED x GOLD) */
  --red:#e60012;          /* lantern red */
  --red2:#ff0033;         /* neon red */
  --rose:#ff4d6d;         /* cute flare */
  --gold:#f6c343;         /* gold */
  --gold2:#ffe7a3;        /* gold shine */
  --jade:#18b07b;         /* tiny accent */
  --jade2:#7ff0d0;

  --accent: var(--red);

  /* ★ stronger reds */
  --accent-10: rgba(230, 0, 18, .12);
  --accent-14: rgba(230, 0, 18, .18);
  --accent-20: rgba(230, 0, 18, .28);
  --accent-35: rgba(230, 0, 18, .48);
  --accent-55: rgba(230, 0, 18, .72);

  /* radius */
  --r:14px;
  --r2:18px;

  /* shadows (red-ish, richer) */
  --shadow:
    0 6px 0 rgba(110,0,20,.10),
    0 16px 26px rgba(110,0,20,.16);

  /* zone */
  --zoneR:18px;
  --zoneB:2px;
  --zonePad:12px;

  /* card */
  --cardR:18px;
  --cardB:2px;
  --cardLine: rgba(230,0,18,.18);

  /* seat bars (C also gets red+gold vibe) */
  --seatbarC:
    linear-gradient(90deg,
      rgba(230,0,18,.18),
      rgba(255,255,255,.82),
      rgba(246,195,67,.38)
    );
  --seatbarBox:
    linear-gradient(90deg,
      var(--red),
      var(--red2),
      var(--gold)
    );

  /* card heads */
  --cardHeadNormal:
    linear-gradient(90deg,
    #fff7c7 0%,
    #ffd35c 28%,
    #ffb300 55%,
    #ffe59a 100%
  );
  --cardHeadSoon:
    linear-gradient(90deg,
      var(--gold),
      var(--rose),
      var(--jade2)
    );
  --cardHeadOver:
    linear-gradient(90deg,
    #b3001f 0%,
    #ff0033 35%,
    #ff2a5b 65%,
    #ffd35c 100%
  );

  /* card width (PC) */
  --cardW: clamp(150px, 12vw, 190px);
}

/* ===== Reset / Base ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--ink);
  font-family:"Meiryo","Yu Gothic UI",system-ui,-apple-system,"Segoe UI",sans-serif;
  overflow-x:hidden;
  background:transparent;
}

/* 背景：春節ライト（赤を主役に） */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(980px 560px at 18% 16%, rgba(230,0,18,.30), transparent 60%),
    radial-gradient(980px 560px at 86% 18%, rgba(230,0,18,.24), transparent 62%),
    radial-gradient(920px 520px at 84% 26%, rgba(246,195,67,.26), transparent 62%),
    radial-gradient(900px 650px at 50% 92%, rgba(246,195,67,.18), transparent 66%),
    repeating-linear-gradient(45deg,
      rgba(42,15,18,.020) 0px,
      rgba(42,15,18,.020) 2px,
      transparent 2px,
      transparent 10px
    ),
    linear-gradient(180deg, var(--bg1), var(--bg2) 55%, var(--bg3));
}

/* ===== App ===== */
.app{
  max-width:1150px;
  margin:0 auto;
  padding:14px 14px 28px;
}

/* ===== Header ===== */
header{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:10px;
  border-radius:var(--r2);
  background: linear-gradient(180deg, #ffffff, rgba(255,231,163,.55));
  border:2px solid var(--accent-55);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.22) inset,
    var(--shadow);
}

.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:280px;
  max-width:560px;
}

.header-status{
  display:flex;
  flex-direction:column;
  gap:4px;
  align-items:flex-start;
}
.header-status .hs-date{
  font-size:20px;
  font-weight:1000;
  letter-spacing:.02em;
  line-height:1.1;
  white-space:nowrap;
}
.header-status .hs-stats{
  font-size:14px;
  font-weight:900;
  color:var(--muted);
  white-space:nowrap;
}
.header-status .hs-stats b{ color:var(--ink); font-weight:1000; }
.header-status .hs-sep{ color: rgba(42,15,18,.40); margin:0 8px; }

.controls{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* ===== Buttons ===== */
.btn{
  appearance:none;
  border:2px solid var(--accent-55);
  border-radius:999px;
  padding:8px 12px;
  font-weight:1000;
  font-size:13px;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
  background:
    linear-gradient(180deg, #ffffff, rgba(255,231,163,.50));
  color:var(--ink);
  box-shadow:
    0 2px 0 rgba(0,0,0,.06),
    0 0 0 2px rgba(246,195,67,.18) inset;
}
.btn:active{ transform: translateY(1px); }

.btn.primary{
  border-color: rgba(246,195,67,.90);
  background: linear-gradient(180deg, #fff, #ffe7a3);
  color:#3a2500;
}
.btn.ghost{
  background: linear-gradient(180deg, #ffffff, rgba(255,230,230,.55));
  border-color: rgba(230,0,18,.46);
}

.field{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:2px solid rgba(246,195,67,.55);
  background: linear-gradient(180deg, #ffffff, rgba(255,231,163,.45));
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.field input[type="date"]{
  background: transparent;
  border:none;
  outline:none;
  color:var(--ink);
  font-weight:1000;
  font-size:13px;
}

/* ===== Layout ===== */
.grid{ display:grid; gap:12px; margin-top:12px; }

/* ===== Floor ===== */
.floor{
  border-radius:var(--r2);
  padding:12px;
  background: linear-gradient(180deg, #ffffff, rgba(255,231,163,.24));
  border:2px solid var(--accent-55);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.18) inset,
    var(--shadow);
}

/* =========================================================
   Seat Grid (PC/Tablet)
   ========================================================= */
.seat-grid{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 260px 260px;
}

/* ===== Zone ===== */
.zone{
  position:relative;
  border-radius:var(--zoneR);
  border: var(--zoneB) solid rgba(230,0,18,.30);
  overflow:hidden;
  padding:0;
  background: var(--paper);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.18) inset,
    var(--shadow);
}

/* タイトル帯 */
.zone::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:40px;
  background: var(--seatbarC);
  border-bottom:2px solid rgba(246,195,67,.40);
}

/* 右上ドット */
.zone::after{
  content:"● ● ●";
  position:absolute;
  top:10px;
  right:12px;
  font-size:12px;
  letter-spacing:3px;
  color: rgba(42,15,18,.52);
  opacity:.9;
}

/* タイトル */
.zone .zone-title{
  position:absolute;
  top:8px;
  left:12px;
  margin:0;
  padding:0;
  font-size:20px;
  font-weight:1000;
  letter-spacing:.03em;
  color: rgba(42,15,18,.95);
}

/* 中身 */
.zone .drop{
  padding: var(--zonePad);
  padding-top: calc(var(--zonePad) + 40px);
  min-height:120px;
}

/* ===== Seat placement (PC/Tablet) ===== */
.zone[data-seat="C1"]{  grid-column: 1 / span 2;  grid-row: 1; }
.zone[data-seat="C2"]{  grid-column: 3 / span 2;  grid-row: 1; }

.zone[data-seat="BOX1"]{ grid-column: 5 / span 4;  grid-row: 1; }
.zone[data-seat="BOX2"]{ grid-column: 9 / span 4;  grid-row: 1; }

.zone[data-seat="C3"]{  grid-column: 1 / span 2;  grid-row: 2; }
.zone[data-seat="C4"]{  grid-column: 3 / span 2;  grid-row: 2; }
.zone[data-seat="C5"]{  grid-column: 5 / span 2;  grid-row: 2; }
.zone[data-seat="C6"]{  grid-column: 7 / span 2;  grid-row: 2; }
.zone[data-seat="C7"]{  grid-column: 9 / span 2;  grid-row: 2; }
.zone[data-seat="C8"]{  grid-column: 11 / span 2; grid-row: 2; }

/* BOXは赤金ギラギラ */
.zone.box{
  border-color: rgba(230,0,18,.55);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.30) inset,
    0 14px 26px rgba(230,0,18,.18);
}
.zone.box::before{
  background: var(--seatbarBox);
  border-bottom-color: rgba(246,195,67,.65);
}

/* Counters（赤基調 + 金の縁） */
.zone.counter{
  border-color: rgba(230,0,18,.32);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.22) inset,
    var(--shadow);
}

/* Cの飾り */
.zone[data-seat="C1"]{ --seatemoji:"🐾"; }
.zone[data-seat="C2"]{ --seatemoji:"🐾"; }
.zone[data-seat="C3"]{ --seatemoji:"🐾"; }
.zone[data-seat="C4"]{ --seatemoji:"🐾"; }
.zone[data-seat="C5"]{ --seatemoji:"🐾"; }
.zone[data-seat="C6"]{ --seatemoji:"🐾"; }
.zone[data-seat="C7"]{ --seatemoji:"🐾"; }
.zone[data-seat="C8"]{ --seatemoji:"🐾"; }

.zone.counter .zone-title::after{
  content: " " var(--seatemoji, "");
  font-size:18px;
  vertical-align:-1px;
  margin-left:6px;
}

/* ===== Counter drop (PC) ===== */
.zone.counter .drop{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:center;
  gap:12px;
}

/* ===== BOX drop (PC) ===== */
.zone.box .drop{
  display:grid;
  grid-template-columns: repeat(2, var(--cardW));
  gap:12px;
  justify-content:center;
  justify-items:center;
  align-content:start;
  column-gap: 30px; /* ★2枚の間隔 */
}

/* ===== Guest Card ===== */
.guest-card{
  border-radius: var(--cardR);
  background:#fff;
  color:var(--ink);
  border: var(--cardB) solid rgba(246,195,67,.38);
  box-shadow:
    0 8px 0 rgba(110,0,20,.10),
    0 18px 26px rgba(110,0,20,.14);
  cursor:pointer;
  overflow:hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  width: var(--cardW);
  max-width: var(--cardW);
}

/* ヘッダー帯 */
.guest-card .card-head{
  height:26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 10px;
  background: var(--cardHeadNormal);
  border-bottom: 1px solid rgba(246,195,67,.40);
  color: rgba(42,15,18,.60);
  font-weight:900;
  font-size:12px;
}
.guest-card .card-dots{ letter-spacing:3px; }
.guest-card .card-x{ font-size:14px; line-height:1; opacity:.75; }

.guest-card.is-soon .card-head{ background: var(--cardHeadSoon); }
.guest-card.is-over .card-head{ background: var(--cardHeadOver); }

/* body */
.guest-card .card-body{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  text-align:center;
}

/* Counter text */
.guest-card.is-counter .gc-name{ font-size:26px; }
.guest-card.is-counter .gc-rem { font-size:24px; }
.guest-card.is-counter .gc-time,
.guest-card.is-counter .gc-meta{ font-size:13px; }

/* Non-BOX text */
.gc-name{
  font-weight:1000;
  font-size:26px;
  line-height:1.05;
  letter-spacing:.02em;
}
.gc-rem{
  font-weight:1000;
  font-size:24px;
  line-height:1.05;
}
.gc-time,.gc-meta{
  font-weight:1000;
  font-size:13px;
  color: rgba(42,15,18,.78);
}

/* BOX text */
.guest-card.is-box .card-body{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  text-align:center;
  height:auto;
}
.guest-card.is-box .box-no{  font-size:26px; font-weight:1000; line-height:1.05; }
.guest-card.is-box .box-rem{ font-size:24px; font-weight:1000; line-height:1.05; }
.guest-card.is-box .box-time,
.guest-card.is-box .box-meta{
  font-size:13px;
  font-weight:1000;
  color: rgba(42,15,18,.78);
  text-align:center;
}

/* ===== Stamp ===== */
.seat-stamp{
  width: fit-content;
  padding:6px 10px;
  border-radius:999px;
  border:2px solid rgba(246,195,67,.55);
  background:
    linear-gradient(180deg, #ffffff, rgba(255,231,163,.50));
  color:var(--ink);
  font-weight:1000;
  font-size:12px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 2px 0 rgba(0,0,0,.05);
}
.seat-stamp small{
  font-weight:1000;
  color: rgba(42,15,18,.62);
  font-size:11px;
}

/* ===== Panel / Archive ===== */
.panel{
  border-radius:var(--r2);
  padding:12px;
  background: linear-gradient(180deg, #ffffff, rgba(255,231,163,.20));
  border:2px solid var(--accent-55);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.18) inset,
    var(--shadow);
  overflow:hidden;
}

.panel-head{
  display:flex;
  gap:10px;
  align-items:flex-end;
  justify-content:space-between;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.panel-head .ttl{
  font-weight:1000;
  font-size:16px;
  letter-spacing:.02em;
}

.search{
  border-radius:999px;
  border:2px solid rgba(246,195,67,.55);
  background:#fff;
  padding:8px 12px;
  color:var(--ink);
  outline:none;
  min-width:220px;
  font-weight:1000;
  font-size:13px;
}

.table-wrap{
  background:#fff;
  overflow-x:hidden;
  overflow-y:auto;
  max-height:46vh;
  border-radius:16px;
}

table{
  width:100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing:0;
  border-radius:16px;
  overflow:hidden;
  border:2px solid rgba(246,195,67,.55);
  background:#fff;
}

thead th{
  position: sticky;
  top:0;
  z-index:3;
  background: linear-gradient(180deg, #ffe7a3, #f6c343);
  color: rgba(42,15,18,.95);
  font-size:13px;
  font-weight:1000;
  padding:10px;
  white-space:nowrap;
  border-bottom:2px solid rgba(230,0,18,.22);
  overflow:hidden;
  text-overflow:ellipsis;
  border-right:1px solid rgba(230,0,18,.14);
}
thead th:last-child{ border-right:none; }

tbody td{
  font-size:13px;
  padding:10px;
  color: rgba(42,15,18,.95);
  border-bottom:1px solid rgba(230,0,18,.12);
  white-space:nowrap;
  line-height:1.25;
  vertical-align: middle;
  overflow:hidden;
  text-overflow:ellipsis;
  border-right:1px solid rgba(230,0,18,.10);
}
tbody td:last-child{ border-right:none; }
tbody tr:hover td{ background: rgba(255,231,163,.22); }

.td-muted{ color: rgba(42,15,18,.58); }
.td-strong{ font-weight:1000; }
.td-wrap{ white-space: normal; overflow: visible; text-overflow: clip; }

tbody tr.row-stay td{ background: rgba(233,255,247,.98); }
tbody tr.row-done td{ background: rgba(255,241,243,.98); }

/* 列幅（全10列） */
thead th:nth-child(1),  tbody td:nth-child(1){  width:56px; text-align:center; }
thead th:nth-child(2),  tbody td:nth-child(2){  width:62px; text-align:center; }
thead th:nth-child(3),  tbody td:nth-child(3){  width:72px; text-align:center; }
thead th:nth-child(4),  tbody td:nth-child(4){  width:72px; text-align:center; }
thead th:nth-child(6),  tbody td:nth-child(6){  width:52px; text-align:center; }
thead th:nth-child(7),  tbody td:nth-child(7){  width:64px; text-align:center; }
thead th:nth-child(8),  tbody td:nth-child(8){  width:64px; text-align:center; }
thead th:nth-child(10), tbody td:nth-child(10){ width:74px; text-align:center; }

/* お客様名 */
tbody td:nth-child(5){
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
tbody td:nth-child(5) .td-muted{
  display:block;
  margin-top:4px;
  font-size:11px;
  opacity:.75;
}

/* 延長は折り返しOK */
tbody td:nth-child(9){
  white-space: normal;
  word-break: break-word;
  font-size:12px;
  line-height:1.2;
  overflow: visible;
  text-overflow: clip;
}

/* ===== Modal ===== */
dialog{
  width: min(520px, calc(100% - 22px));
  border:none;
  padding:0;
  border-radius:14px;
  background:transparent;
  box-shadow: var(--shadow);
}
dialog::backdrop{ background: rgba(42,15,18,.40); }

.modal{
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  border:2px solid var(--accent-55);
  box-shadow:
    0 0 0 2px rgba(246,195,67,.18) inset,
    var(--shadow);
}

.mhead{
  background: var(--cardHeadSoon);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.mttl{
  font-size:18px;
  font-weight:1000;
  color: rgba(42,15,18,.95);
}
.closeX{
  border:2px solid rgba(42,15,18,.20);
  background:#fff;
  color: rgba(42,15,18,.95);
  border-radius:10px;
  padding:2px 10px;
  font-weight:1000;
  cursor:pointer;
}

/* Modal content blocks */
.extbar{
  background: rgba(255,231,163,.22);
  padding:12px 14px 10px;
  margin:0;
}
.extbtns{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap: wrap;
  margin-bottom:10px;
}
.extbtn{
  border-radius:12px;
  border:2px solid rgba(246,195,67,.55);
  background: linear-gradient(180deg,#ffffff, rgba(255,231,163,.50));
  color: rgba(42,15,18,.92);
  padding:10px 14px;
  font-weight:1000;
  font-size:15px;
  cursor:pointer;
}
.extbtn[data-min="30"]{ border-color: rgba(246,195,67,.70); }
.extbtn[data-min="60"]{
  border-color: rgba(230,0,18,.40);
  background: linear-gradient(180deg,#ffffff, rgba(255,225,230,.55));
}
.extbtn[data-act="close"]{
  border-color: rgba(230,0,18,.86) !important;
  background: linear-gradient(180deg,#fff1f3, rgba(255,0,51,.22)) !important;
}

.metrics{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}
.metric{
  min-width:120px;
  text-align:center;
  padding:8px 10px;
  border-radius:12px;
  border:2px solid rgba(246,195,67,.55);
  background:#fff;
  font-weight:1000;
}

.form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px 12px;
  padding:10px 14px 12px;
  background:#ffffff;
}
.form .full{ grid-column: 1 / -1; }

.fg{ display:flex; flex-direction:column; gap:6px; }
.fg label{
  color: rgba(42,15,18,.82);
  font-weight:1000;
  font-size:12px;
}
.fg input,.fg select{
  border-radius:12px;
  border:2px solid rgba(246,195,67,.45);
  background:#fff;
  color:var(--ink);
  padding:9px 10px;
  font-weight:1000;
  outline:none;
}

.typebar,.seatpick{ display:flex; gap:8px; flex-wrap:wrap; }
.typebtn,.seatchip{
  border-radius:12px;
  border:2px solid rgba(246,195,67,.45);
  background:#fff;
  color:var(--ink);
  padding:7px 10px;
  font-weight:1000;
  cursor:pointer;
}
.typebtn.on{
  background: rgba(255,231,163,.70);
  border-color: rgba(246,195,67,.75);
}
.seatchip.on{
  background: rgba(255,225,230,.55);
  border-color: rgba(230,0,18,.45);
}

.mfoot{
  padding:10px 14px 14px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  background: rgba(255,231,163,.22);
  border-top:2px solid rgba(230,0,18,.12);
}
.mfoot .btn{
  border-radius:12px;
  padding:8px 12px;
}

/* =========================================================
   Smartphone（縦）
   - 2列：Cを先に並べて、BOXは下で大きく
   - ★カードは伸ばさず中央
   ========================================================= */
@media (max-width: 560px){
  :root{
    --r:12px;
    --r2:16px;
    --zoneR:16px;

    --zonePad:6px;
    --cardR:16px;

    --shadow:
      0 4px 0 rgba(110,0,20,.08),
      0 12px 18px rgba(110,0,20,.14);

    --barH: 32px;
    --push: 12px;

    --mCardH: 115px;
    --mGap:   10px;
    --mRowH:  180px;
    --mHeadH: 15px;

    --mCardW: clamp(150px, 35vw, 210px);
  }

  .app{ max-width:560px; padding:10px 10px 18px; }

  header{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .brand{ min-width:0; max-width:none; }
  .header-status .hs-date{ font-size:15px; }
  .header-status .hs-stats{ font-size:11px; }

  .controls{ gap:6px; }
  .btn{ padding:6px 9px; font-size:11px; }
  .field{ padding:4px 8px; }
  .field input[type="date"]{ font-size:11px; }

  .floor{ padding:10px; }

  .seat-grid{
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, var(--mRowH));
    grid-auto-rows: var(--mRowH);
    gap: var(--mGap);
  }

  /* C1-8 を先に2列で */
  .zone[data-seat="C1"]{ grid-column:1; grid-row:1; }
  .zone[data-seat="C2"]{ grid-column:2; grid-row:1; }
  .zone[data-seat="C3"]{ grid-column:1; grid-row:2; }
  .zone[data-seat="C4"]{ grid-column:2; grid-row:2; }
  .zone[data-seat="C5"]{ grid-column:1; grid-row:3; }
  .zone[data-seat="C6"]{ grid-column:2; grid-row:3; }
  .zone[data-seat="C7"]{ grid-column:1; grid-row:4; }
  .zone[data-seat="C8"]{ grid-column:2; grid-row:4; }

  /* BOXは下で大きく（2段分） */
  .zone[data-seat="BOX1"]{ grid-column:1 / -1; grid-row:5; }
  .zone[data-seat="BOX2"]{ grid-column:1 / -1; grid-row:6; }

  .seat-grid .zone::before{ height: var(--barH); }
  .seat-grid .zone .zone-title{
    font-size:15px;
    top:6px;
    left:10px;
  }
  .seat-grid .zone::after{
    top:8px;
    right:10px;
    font-size:11px;
  }

  /* drop：スマホは “grid + 中央配置” */
  .seat-grid .zone .drop{
    height:100%;
    display:grid;
    grid-auto-rows: var(--mCardH);
    gap: var(--mGap);
    align-content:start;

    justify-items:center;
    padding: 0 var(--zonePad) var(--zonePad);
    padding-top: calc(var(--barH) + var(--push));
  }

  /* BOX：スマホでは2列（中央寄せ） */
  .seat-grid .zone.box .drop{
    display:grid !important;
    grid-template-columns: repeat(2, var(--mCardW)) !important;
    justify-content: center !important;
    justify-items: center !important;
    align-content: start !important;
    column-gap: 30px !important;   /* ★2枚の間隔 */
    row-gap: var(--mGap) !important;
  }

  /* スマホ：ヘッダー帯なし */
  .seat-grid .guest-card .card-head{ display:none; }
  .seat-grid .guest-card .card-body{ display: contents; }

  /* スマホカード：中央に置ける */
  .seat-grid .zone .drop .guest-card{
    width: var(--mCardW);
    max-width: var(--mCardW);
    height: var(--mCardH);

    border-radius: var(--cardR);
    overflow:hidden;
    border: var(--cardB) solid rgba(246,195,67,.45);
    box-shadow:
      0 3px 3px rgba(110,0,20,.10),
      inset 0 1px 0 rgba(255,255,255,.70);

    display:grid;
    grid-template-rows:auto auto;
    justify-items:center;
    row-gap:4px;

    padding:10px 12px;
    text-align:center;

    background:
      var(--cardHeadNormal) top / 100% var(--mHeadH) no-repeat,
      linear-gradient(#ffffff,#ffffff);
  }

  .seat-grid .zone .drop .guest-card.is-soon{
    background:
      var(--cardHeadSoon) top / 100% var(--mHeadH) no-repeat,
      linear-gradient(#ffffff,#ffffff);
  }
  .seat-grid .zone .drop .guest-card.is-over{
    background:
      var(--cardHeadOver) top / 100% var(--mHeadH) no-repeat,
      linear-gradient(#ffffff,#ffffff);
  }

  .seat-grid .guest-card .gc-name,
  .seat-grid .guest-card .box-no{
    font-size:20px;
    font-weight:1000;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .seat-grid .guest-card .gc-rem,
  .seat-grid .guest-card .box-rem{
    font-size:22px;
    font-weight:1000;
  }

  .seat-grid .guest-card .gc-time,
  .seat-grid .guest-card .box-time{
    font-size:11px;
    font-weight:900;
    opacity:.92;
    white-space:nowrap;
  }

  .seat-grid .guest-card .gc-meta,
  .seat-grid .guest-card .box-meta{
    display:none;
  }

  /* Archive (mobile cards) */
  /* Archive (mobile cards) */
  .panel{ padding:10px; }
  .panel-head .ttl{ font-size:14px; }

  .search{
    min-width:140px;
    padding:6px 10px;
    font-size:11px;
  }

  .table-wrap{
    max-height:none;
    overflow: visible;
    border-radius:14px;
    padding:10px 12px 12px;
    background: transparent;
  }

  table{
    width:100%;
    border:none;
    background: transparent;
    border-collapse: separate;
    border-spacing:0;
  }

  thead{ display:none; }

  tbody td{
    padding:0;
    border:none;
    background: transparent;
    white-space: normal;
  }

tbody tr.mrow{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "noL noV cumL cumV seatL seatV"
    "nameL nameL nameV nameV nameV nameV"
    "inL  inV  inV  outL outV outV"
    "extL extL extV extV extV extV";
  width:100%;

  /* ★金縁 */
  border: 3px solid rgba(255,211,92,.90);
  border-radius:16px;
  overflow:hidden;

  /* ★ここが原因：赤下地をやめて“白/うす金”へ */
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,249,235,.92));

  /* ★金の縁取り感 */
  box-shadow:
    0 10px 18px rgba(50,20,30,.10),
    0 0 0 2px rgba(255,211,92,.35);

  margin: 0 0 15px;
  cursor:pointer;
}


  tbody tr.mrow td{
    min-width:0;
    width:100%;
    padding:10px 8px;
    font-size:12px;
    font-weight:1000;
    line-height:1.15;
    border-right:1px solid rgba(255,42,91,.10);
    border-bottom:1.5px solid rgba(255,42,91,.14);
    color: rgba(42,27,34,.92);
  }

  tbody tr.mrow .m-lbl{
    background: rgba(255,242,201,.92);
  }
  tbody tr.row-stay .m-val{ background: rgba(233,255,247,.98); }
  tbody tr.row-done .m-val{ background: rgba(255,241,243,.98); }

  .m-no-lbl{grid-area:noL;}     .m-no-val{grid-area:noV;}
  .m-cum-lbl{grid-area:cumL;}   .m-cum-val{grid-area:cumV;}
  .m-seat-lbl{grid-area:seatL;} .m-seat-val{grid-area:seatV;}
  .m-name-lbl{grid-area:nameL;} .m-name-val{grid-area:nameV;}
  .m-in-lbl{grid-area:inL;}     .m-in-val{grid-area:inV;}
  .m-out-lbl{grid-area:outL;}   .m-out-val{grid-area:outV;}
  .m-ext-lbl{grid-area:extL;}   .m-ext-val{grid-area:extV;}

  .m-seat-val, .m-name-val, .m-out-val, .m-ext-val{ border-right:none; }
  .m-ext-lbl, .m-ext-val{ border-bottom:none; }

  .m-no-val,.m-cum-val,.m-seat-val{ text-align:center; }
  .m-in-val,.m-out-val{ font-size:14px; text-align:center; }
  .m-ext-val{
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* ★FIX2: スマホのCだけ“確実にど真ん中” */
@media (max-width: 560px){
  .seat-grid .zone.counter .drop{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .seat-grid .zone.counter .drop > .guest-card{
    width: var(--mCardW) !important;
    max-width: 100% !important;
  }
}

/* Dialog（スマホ） */
@media (max-width: 560px){
  dialog#dlg{
    position: fixed;
    inset: 10px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
  }
  dialog#dlg *{
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }
}
