:root{
  color-scheme: only light;
  --blue:#4A90D9; --blue-deep:#3574B5; --blue-pale:#EAF3FB;
  --bg:#EFF1F2; --card:#FFFFFF; --text:#2B3238; --sub:#848B91; --line:#E6E9EA;
  --red:#D96560; --green:#4C9C6E; --yellow:#E2C158; --orange:#E8975A; --purple:#8C6FBE;
  --pink:#D9718F; --teal:#3F9C93; --brown:#A98554;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html{ background:var(--bg); color-scheme: only light; }
input, select, textarea{ color-scheme: only light; }
body{ margin:0; font-family:"Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, BlinkMacSystemFont, "Yu Gothic", sans-serif; font-weight:400; background:var(--bg); color:var(--text); }
.app{ min-height:100vh; }
.screen{ display:none; min-height:100vh; flex-direction:column; }
.screen.active{ display:flex; }

.topbar{ background:#fff; border-bottom:1px solid var(--line); padding:12px 22px; display:flex; align-items:center; }
.topbar .back{ color:var(--blue); font-size:13.5px; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:4px; width:110px; flex:0 0 auto; }
.topbar .title{ flex:1; text-align:center; font-size:15.5px; font-weight:600; color:var(--blue-deep); }
.topbar .right-info{ width:180px; flex:0 0 auto; text-align:right; font-size:12px; color:var(--sub); }

.home-top{ background:#fff; border-bottom:1px solid var(--line); padding:14px 24px; display:flex; align-items:center; justify-content:space-between; }
.home-top .links{ display:flex; gap:20px; font-size:13px; color:var(--blue); font-weight:600; cursor:pointer; }
.home-top .links .bell{ position:relative; color:var(--sub); }
.home-top .links .bell .dot{ position:absolute; top:-3px; right:-6px; width:7px; height:7px; border-radius:50%; background:var(--red); }
.home-top .title{ font-size:15px; font-weight:600; color:var(--blue-deep); }
.home-top .acct{ text-align:right; font-size:11.5px; color:var(--sub); }
.home-top .acct b{ display:block; font-size:13px; color:var(--text); }

.call-panel{ background:#FFF6E5; border-bottom:1px solid #F0DFA8; display:none; }
.call-panel.show{ display:block; }
.call-row{ display:flex; align-items:center; justify-content:space-between; padding:9px 24px; font-size:12.5px; border-bottom:1px solid #F0DFA8; }
.call-row button{ background:var(--blue); color:#fff; border:none; padding:5px 10px; border-radius:6px; font-size:11px; font-family:inherit; cursor:pointer; }

.home-body{ padding:26px; flex:1; }
.tile-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; max-width:920px; margin:0 auto; }
.tile{
  background:var(--card); border:1px solid var(--line); border-radius:10px; padding:26px 18px; text-align:center;
  cursor:pointer; transition:box-shadow .15s, transform .15s;
}
.tile:hover{ box-shadow:0 6px 18px rgba(0,0,0,.06); transform:translateY(-1px); }
.tile .ttl{ font-size:14.5px; font-weight:600; margin-bottom:6px; color:var(--blue-deep); }
.tile .desc{ font-size:11.5px; color:var(--sub); line-height:1.6; }
.tile.empty{ visibility:hidden; cursor:default; }
.tile.empty:hover{ box-shadow:none; transform:none; }

.btn-flat{ background:none; border:1px solid var(--line); color:var(--text); padding:11px 18px; border-radius:6px; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.btn-primary{ background:var(--blue); color:#fff; border:none; padding:12px 26px; border-radius:6px; font-family:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }

.page-wrap{ max-width:1040px; margin:0 auto; padding:24px 24px 60px; flex:1; width:100%; }
.card{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px 20px; }
.product-tabs{ display:flex; gap:22px; margin-bottom:16px; border-bottom:1px solid var(--line); }
.product-tab{ background:none; border:none; font-family:inherit; font-size:13.5px; font-weight:700; color:var(--sub); padding:0 0 10px; cursor:pointer; border-bottom:3px solid transparent; }
.product-tab.active{ color:var(--blue); border-bottom-color:var(--blue); }
.cat-manage-row{ display:flex; align-items:center; gap:10px; padding:11px 4px; border-bottom:1px solid var(--line); }
.cat-manage-row .swatch{ width:12px; height:12px; border-radius:50%; flex:0 0 auto; }
.cat-manage-row .lbl{ flex:1; font-size:13.5px; font-weight:600; }
.cat-manage-row .cnt{ font-size:11.5px; color:var(--sub); }
.cat-manage-row .order-btns{ display:flex; gap:4px; }
.cat-manage-row .order-btns button{ width:26px; height:26px; border-radius:6px; border:1px solid var(--line); background:#fff; cursor:pointer; font-size:13px; color:var(--sub); }
.cat-manage-row .order-btns button:disabled{ opacity:.3; cursor:not-allowed; }
.cat-add-row{ display:flex; gap:8px; margin-top:16px; }
.cat-add-row input{ flex:1; border:1px solid var(--line); border-radius:6px; padding:9px 12px; font-family:inherit; font-size:13px; }
.cat-add-row button{ background:var(--blue); color:#fff; border:none; padding:9px 18px; border-radius:6px; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; }
.section-gap{ margin-bottom:20px; }
.card h2{ font-size:14.5px; margin:0 0 14px; font-weight:600; color:var(--blue-deep); }
.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.stat-card .lbl{ font-size:12px; color:var(--sub); margin-bottom:8px; }
.stat-card .val{ font-size:22px; font-weight:600; color:var(--blue-deep); }
.stat-card .sub{ font-size:11.5px; color:var(--sub); margin-top:5px; }
.bar-chart{ display:flex; align-items:flex-end; gap:6px; height:140px; padding-top:10px; overflow-x:auto; }
.bar-chart .col{ flex:0 0 26px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.bar-chart .bar{ width:100%; max-width:24px; background:var(--blue); border-radius:3px 3px 0 0; }
.bar-chart .col.dim .bar{ background:#BEDBF5; }
.bar-chart .x-lbl{ font-size:10px; color:var(--sub); margin-top:6px; white-space:nowrap; }
.rank-list{ list-style:none; margin:0; padding:0; }
.rank-list li{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px; }
.rank-list li:last-child{ border-bottom:none; }
.rank-list .rk{ width:20px; height:20px; border-radius:50%; background:var(--bg); color:var(--sub); font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.rank-list .nm{ flex:1; }
.rank-list .qty{ font-weight:600; }
table.tx-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
table.tx-table th{ text-align:left; color:var(--sub); font-weight:600; padding:8px 10px; border-bottom:1px solid var(--line); font-size:11.5px; }
table.tx-table td{ padding:9px 10px; border-bottom:1px solid var(--line); }

.cat-block{ margin-bottom:14px; }
.cat-block-head{ padding:10px 4px; display:flex; align-items:center; gap:8px; }
.cat-block-head .cnt{ font-size:11.5px; color:var(--sub); font-weight:400; }
.cat-name-input{ font-size:14px; font-weight:600; color:var(--blue-deep); border:1px solid var(--line); background:#fff; border-radius:6px; padding:5px 9px; font-family:inherit; min-width:80px; flex:0 1 auto; }
.cat-name-input:focus{ border-color:var(--blue); outline:none; }
.group-block-head{ padding:8px 4px 4px 12px; font-size:11.5px; font-weight:700; color:var(--sub); }
.cat-time-row{ display:flex; align-items:center; gap:8px; padding:0 4px 10px; }
.cat-time-lbl{ font-size:11.5px; color:var(--sub); margin-right:4px; }
.cat-time-row input[type="time"]{ border:1px solid var(--line); border-radius:6px; padding:4px 6px; font-family:inherit; font-size:12px; background:#fff; }
.cat-time-row input[type="time"]:disabled{ opacity:.5; background:var(--bg); }
.cat-time-sep{ font-size:11.5px; color:var(--sub); }
.item-edit-row{ display:flex; align-items:center; gap:12px; padding:9px 6px; border-bottom:1px solid var(--line); }
.photo-box{ width:48px; height:48px; border-radius:8px; background:var(--bg); border:1px dashed #C9CDD1; display:flex; align-items:center; justify-content:center; font-size:9.5px; color:var(--sub); text-align:center; cursor:pointer; flex:0 0 auto; overflow:hidden; background-size:cover; background-position:center; }
.field-name{ flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.field-name-top{ display:flex; align-items:center; gap:6px; }
.field-name input{ border:1px solid var(--line); background:#fff; font-size:13px; padding:6px 8px; border-radius:6px; font-family:inherit; }
.field-name input:focus{ border-color:var(--blue); outline:none; }
.field-name .name-input{ width:100%; font-weight:600; }
.field-name .note-input{ width:100%; font-size:11.5px; color:var(--sub); font-weight:400; padding:5px 8px; }
.field-name .style-badge{ font-size:10px; color:var(--blue-deep); white-space:nowrap; flex:0 0 auto; }
.field-price{ width:96px; flex:0 0 auto; display:flex; align-items:center; gap:2px; }
.field-price span{ color:var(--sub); font-size:12px; }
.field-price input{ width:74px; border:1px solid var(--line); border-radius:6px; padding:6px 8px; font-family:inherit; font-size:13px; }
.field-stock{ width:90px; flex:0 0 auto; display:flex; align-items:center; gap:6px; }
.field-stock span{ color:var(--sub); font-size:11.5px; }
.field-stock input{ width:56px; border:1px solid var(--line); border-radius:6px; padding:6px 6px; font-family:inherit; font-size:12.5px; text-align:center; }
.soldout-toggle{ width:70px; flex:0 0 auto; display:flex; align-items:center; gap:6px; }
.soldout-toggle .soldout-label{ font-size:11px; color:var(--sub); }
.del-btn{ background:none; border:none; color:var(--sub); font-size:15px; cursor:pointer; padding:6px; flex:0 0 auto; }
.del-btn:hover{ color:var(--red); }
.add-item-btn, .add-table-btn, .add-staff-btn{ margin:8px 6px 4px; background:none; border:1px dashed #C9CDD1; color:var(--sub); font-family:inherit; font-size:12.5px; padding:8px 14px; border-radius:6px; cursor:pointer; width:100%; text-align:center; }
.add-item-btn:hover, .add-table-btn:hover, .add-staff-btn:hover{ border-color:var(--blue); color:var(--blue-deep); }

.table-edit-row, .staff-edit-row{ display:flex; align-items:center; gap:12px; padding:10px 6px; border-bottom:1px solid var(--line); }
.table-edit-row input.tname, .staff-edit-row input.sname{ flex:1; border:1px solid var(--line); border-radius:6px; padding:8px 10px; font-family:inherit; font-size:13px; font-weight:600; }
.seats-field{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--sub); }
.seats-field input{ width:50px; border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-family:inherit; font-size:13px; text-align:center; }
.staff-edit-row select{ border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-family:inherit; font-size:12.5px; color:var(--sub); }

.save-bar{ display:flex; justify-content:flex-end; margin-top:16px; }
.save-bar button{ background:var(--blue); color:#fff; border:none; padding:11px 26px; border-radius:8px; font-family:inherit; font-weight:600; font-size:13px; cursor:pointer; }

.toggle-row{ display:flex; justify-content:space-between; align-items:center; padding:12px 4px; border-bottom:1px solid var(--line); }
.receipt-method-chip{ border:1px solid var(--line); background:#fff; color:var(--sub); font-family:inherit; font-size:12px; font-weight:600; padding:8px 14px; border-radius:16px; cursor:pointer; }
.receipt-method-chip.active{ background:var(--blue); border-color:var(--blue); color:#fff; }
.receipt-method-row{ display:flex; flex-direction:column; gap:8px; }
.receipt-method-row .receipt-method-chip{ border-radius:8px; text-align:left; padding:12px 14px; }
.range-toggle-row{ display:flex; gap:8px; margin:14px 0 0; }
.range-toggle-btn{ border:1px solid var(--line); background:#fff; color:var(--sub); font-family:inherit; font-size:12.5px; font-weight:600; padding:8px 16px; border-radius:16px; cursor:pointer; }
.range-toggle-btn.active{ background:var(--blue); border-color:var(--blue); color:#fff; }
.tnumber-input{ border:1px solid var(--line); border-radius:6px; padding:8px 10px; font-family:inherit; font-size:13px; width:180px; }
.toggle-row .lbl{ font-size:13px; }
.toggle-row .lbl .sub2{ display:block; font-size:11px; color:var(--sub); margin-top:2px; }
.switch{ width:42px; height:24px; border-radius:14px; background:#D8DCDF; position:relative; cursor:pointer; flex:0 0 auto; }
.switch.on{ background:var(--blue); }
.switch .knob{ width:18px; height:18px; border-radius:50%; background:#fff; position:absolute; top:3px; left:3px; transition:left .15s; }
.switch.on .knob{ left:21px; }

.faq-item{ margin-bottom:14px; }
.faq-item .q{ font-size:13.5px; font-weight:600; margin-bottom:4px; }
.faq-item .a{ font-size:12.5px; color:var(--sub); line-height:1.7; }

/* ---------------- 広告動画 ---------------- */
.advideo-preview{ background:var(--bg); border:1px dashed var(--line); border-radius:10px; min-height:220px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.advideo-empty{ color:var(--sub); font-size:12.5px; }
.advideo-preview video{ width:100%; max-height:320px; display:block; }
.advideo-meta{ font-size:11.5px; color:var(--sub); margin-top:10px; }

.toast{
  position:fixed; top:20px; left:50%; transform:translateX(-50%) translateY(-10px);
  background:#1D2429; color:#fff; padding:11px 24px; border-radius:8px; font-size:13px; font-weight:600;
  opacity:0; pointer-events:none; transition:all .25s; z-index:400; box-shadow:0 8px 20px rgba(0,0,0,.2);
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
input[type=file]{ display:none; }

/* ---- 端末管理 / QRコード / アカウント ---- */
.dev-note{ font-size:12px; color:var(--sub); line-height:1.8; margin-bottom:12px; }
.dev-note.warn{ color:#B5482F; }
.dev-form{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.dev-form select, .dev-form input{ border:1px solid var(--line); border-radius:6px; padding:9px 12px; font-family:inherit; font-size:13px; }
.dev-form input[type=text]{ flex:1; min-width:140px; }
.dev-usage{ font-size:12px; color:var(--sub); margin-top:10px; }
.dev-row{ display:flex; align-items:center; gap:10px; padding:11px 2px; border-bottom:1px solid var(--line); font-size:13px; flex-wrap:wrap; }
.dev-row .nm{ font-weight:600; min-width:110px; }
.dev-row .meta{ flex:1; color:var(--sub); font-size:11.5px; min-width:140px; }
.dev-row .tag{ font-size:10.5px; font-weight:700; border-radius:10px; padding:3px 9px; }
.dev-row .tag.on{ background:#E5F3EA; color:#2E9E5B; }
.dev-row .tag.wait{ background:#FFF3DC; color:#B5791F; }
.dev-row button{ font-size:11.5px; }
.act-url{ font-family:ui-monospace,Menlo,monospace; font-size:12px; background:var(--bg); border-radius:6px; padding:10px 12px; word-break:break-all; margin-bottom:12px; }
.act-row{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.act-qr{ background:#fff; padding:8px; border:1px solid var(--line); border-radius:8px; }
.qr-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; }
.qr-card{ background:#fff; border:1px solid var(--line); border-radius:10px; padding:14px; text-align:center; break-inside:avoid; }
.qr-card .nm{ font-size:15px; font-weight:700; margin-bottom:8px; }
.qr-card .qr{ display:inline-block; }
.qr-card .url{ font-size:9.5px; color:var(--sub); word-break:break-all; margin:8px 0; }
@media print{ .topbar, .dev-note, .qr-card button{ display:none !important; } .qr-grid{ grid-template-columns:repeat(3,1fr); } }
