/* =========================================================
   PhotoSelling — モバイルファーストの共通スタイル
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --ink: #17171a;
  --ink-2: #55534e;
  --ink-3: #8a877f;
  --line: #e2dfd8;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --accent-soft: #e3eef6;
  --buy: #d4572a;
  --buy-ink: #ffffff;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --success: #17703f;
  --success-soft: #e5f4ea;
  --warn-soft: #fff4dc;
  --series-1: #2a78d6;
  --bo: #20232b; /* バックオフィスのヘッダー */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 4px 16px rgba(20, 20, 30, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121214;
    --surface: #1b1b1f;
    --surface-2: #26262b;
    --ink: #f1f0ec;
    --ink-2: #c3c1b9;
    --ink-3: #8d8b84;
    --line: #34343a;
    --accent: #5aa2d6;
    --accent-ink: #0d1b26;
    --accent-soft: #1d3040;
    --buy: #e8703f;
    --buy-ink: #1a0d06;
    --danger: #f2796d;
    --danger-soft: #3a1c1a;
    --success: #5cc98a;
    --success-soft: #16301f;
    --warn-soft: #3a3020;
    --series-1: #3987e5;
    --bo: #0b0c10;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- レイアウト ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 20px 0 96px; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--ink); text-decoration: none; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: .8rem; }
.brand small { font-weight: 600; color: var(--ink-3); font-size: .75rem; }
.header-spacer { flex: 1; }
.nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav a, .nav button {
  color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .9rem;
  white-space: nowrap; background: none; border: 0; font: inherit; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 700; background: var(--surface-2); }
.subnav { border-bottom: 1px solid var(--line); background: var(--surface); }
.subnav .nav { padding: 4px 0; }
.area-backoffice .site-header { background: var(--bo); border-color: #000; }
.area-backoffice .site-header .brand, .area-backoffice .site-header .nav a, .area-backoffice .site-header .nav button { color: #e9e8e4; }
.area-backoffice .site-header .nav a.active, .area-backoffice .site-header .nav a:hover, .area-backoffice .site-header .nav button:hover { background: #343844; color: #fff; }
.area-backoffice .brand-mark { background: #f1c453; color: #1b1b1b; }
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--ink-3); font-size: .8rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- カード・パネル ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title h2 { margin: 0; }
.card-title .right { margin-left: auto; }
.narrow { max-width: 460px; margin: 0 auto; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .05s, background .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-buy { background: var(--buy); border-color: var(--buy); color: var(--buy-ink); }
.btn-buy:hover { background: color-mix(in srgb, var(--buy) 88%, #000); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.inline-form { display: inline; }

/* ---------- フォーム ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .hint { color: var(--ink-3); font-size: .8rem; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; /* iOS のズーム防止 */
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; }
.price-input { position: relative; }
.price-input::before { content: "¥"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.price-input input { padding-left: 28px; }

/* ---------- メッセージ ---------- */
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info { background: var(--accent-soft); color: var(--ink); }
.alert-warn { background: var(--warn-soft); color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge-on { background: var(--success-soft); color: var(--success); }
.badge-off { background: var(--surface-2); color: var(--ink-3); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- KPI タイル ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(var(--kpi-cols, 5), 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .label { color: var(--ink-2); font-size: .8rem; font-weight: 600; margin: 0; }
.kpi .value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi .sub { color: var(--ink-3); font-size: .78rem; }

/* ---------- テーブル（スマホではカード表示） ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th { font-size: .78rem; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
table.data th.num, table.data td.num { text-align: right; }
table.data tr.is-selected td { background: var(--accent-soft); }
table.data a { font-weight: 600; }
.thumb-sm { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
@media (max-width: 719px) {
  table.data.responsive thead { display: none; }
  table.data.responsive, table.data.responsive tbody, table.data.responsive tr, table.data.responsive td { display: block; width: 100%; }
  table.data.responsive tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); }
  table.data.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.data.responsive td::before { content: attr(data-label); color: var(--ink-2); font-size: .8rem; font-weight: 600; text-align: left; }
  table.data.responsive td.cell-main { display: flex; justify-content: flex-start; gap: 10px; text-align: left; font-size: .95rem; padding-bottom: 6px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
  table.data.responsive td.cell-main::before { content: none; }
}

/* ---------- フィルター ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; flex: 1 1 200px; }
.filters .field.compact { flex: 0 1 150px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.segmented a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 日別棒グラフ（単一系列 × 2 の小さなグラフ） ---------- */
.mini-charts { display: grid; gap: 16px; }
@media (min-width: 720px) { .mini-charts { grid-template-columns: 1fr 1fr; } }
.bar-chart { position: relative; }
.bar-chart h3 { font-size: .88rem; color: var(--ink-2); margin-bottom: 8px; }
.bar-chart .plot { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); }
.bar-chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.bar-chart .bar { width: 100%; background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 0; }
.bar-chart .col:hover .bar, .bar-chart .col:focus .bar { filter: brightness(1.15); }
.bar-chart .col:hover::after, .bar-chart .col:focus::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-size: .75rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; pointer-events: none;
}
.bar-chart .col:first-child:hover::after { left: 0; transform: none; }
.bar-chart .col:last-child:hover::after { left: auto; right: 0; transform: none; }
.bar-chart .axis { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .72rem; margin-top: 4px; }
.bar-chart .peak { position: absolute; right: 0; top: 0; font-size: .75rem; color: var(--ink-3); }

/* ---------- ギャラリー（購入者） ---------- */
.event-hero { margin-bottom: 16px; }
.event-hero .meta { color: var(--ink-2); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.event-hero .desc { white-space: pre-wrap; margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.photo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.photo-card .ph { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in; display: block; width: 100%; overflow: hidden; }
.photo-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.photo-card .info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.photo-card .name { font-size: .78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card .row { display: flex; align-items: center; gap: 6px; justify-content: space-between; margin-top: auto; }
.photo-card .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.photo-card .tag { position: absolute; top: 6px; left: 6px; z-index: 1; }
.cart-toggle.in-cart { background: var(--success-soft); border-color: transparent; color: var(--success); }

.cart-fab {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  width: min(560px, calc(100% - 32px)); font-weight: 600;
}
.cart-fab .count { background: var(--buy); color: var(--buy-ink); border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: .85rem; padding: 0 6px; }
.cart-fab .go { margin-left: auto; background: var(--buy); color: var(--buy-ink); border-radius: 999px; padding: 8px 16px; }
.cart-link { position: relative; }
.cart-link .count { position: absolute; top: 0; right: -2px; background: var(--buy); color: var(--buy-ink); border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }

/* ---------- ライトボックス ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: #0b0b0d; display: flex; flex-direction: column; color: #f2f2f2; }
.lightbox[hidden] { display: none; }
.lightbox .lb-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.lightbox .lb-title { font-size: .85rem; color: #c9c9c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lightbox .lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; touch-action: pan-y; }
.lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.6rem; z-index: 1; cursor: pointer; border-radius: 8px; }
.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }
.lightbox .lb-bottom { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .1); }
.lightbox .lb-price { font-size: 1.2rem; font-weight: 700; }
.lightbox .lb-bottom .btn { margin-left: auto; }
.lightbox .btn-ghost { color: #eee; }
.lightbox .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.lightbox .cart-toggle.in-cart { background: #1f3d2a; color: #8fe0ad; }

/* ---------- カート ---------- */
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.cart-item .body { flex: 1; min-width: 0; }
.cart-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .ev { font-size: .8rem; color: var(--ink-2); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 0; font-size: 1.1rem; }
.cart-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

/* ---------- カメラマン：アップロード ---------- */
.dropzone {
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius); background: var(--accent-soft);
  padding: 28px 16px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone.dragover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: var(--accent); }
.dropzone .big { font-size: 1.05rem; font-weight: 700; }
.dropzone .icon { font-size: 2rem; line-height: 1; margin-bottom: 6px; }
.upload-summary { margin-top: 12px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 220px; overflow: auto; font-size: .82rem; }
.upload-list li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.upload-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list .st-ok { color: var(--success); }
.upload-list .st-err { color: var(--danger); }

/* ---------- カメラマン：写真管理 ---------- */
.manage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .manage-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .manage-grid { grid-template-columns: repeat(5, 1fr); } }
.m-card { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.m-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.m-card .sel { position: absolute; top: 6px; left: 6px; z-index: 2; width: 26px; height: 26px; accent-color: var(--accent); }
.m-card img { aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; background: var(--surface-2); cursor: pointer; }
.m-card .m-body { padding: 6px 8px 8px; font-size: .78rem; }
.m-card .m-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.m-card .m-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 2px; }
.m-card .m-price { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.m-card .m-stats { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-card .m-del { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 1rem; }
.m-card .m-del:hover { background: var(--danger); }

.bulk-bar {
  position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; margin-top: 16px;
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.bulk-bar .count { font-weight: 700; margin-right: 4px; }
.bulk-bar .price-input { flex: 1 1 120px; max-width: 180px; }
.bulk-bar .price-input input { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.bulk-bar .btn { min-height: 38px; }
.bulk-bar .btn:not(.btn-primary):not(.btn-danger-solid) { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }

.share-box { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .share-box { grid-template-columns: 1fr auto; } }
.url-row { display: flex; gap: 8px; }
.url-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.qr { width: 140px; height: 140px; border-radius: 8px; background: #fff; padding: 4px; }

.event-list { display: grid; gap: 12px; }
@media (min-width: 720px) { .event-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .event-list { grid-template-columns: repeat(3, 1fr); } }
.event-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.event-card:hover { border-color: var(--accent); }
.event-card .ec-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin-top: auto; }
.event-card .ec-stats b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.event-card .ec-stats span { font-size: .72rem; color: var(--ink-3); }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty .icon { font-size: 2.2rem; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 80; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.toast.error { background: var(--danger); color: #fff; }

.hero-home { padding: 32px 0 8px; }
.hero-home h1 { font-size: 1.8rem; }
.feature-list { display: grid; gap: 12px; }
@media (min-width: 720px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- スマホ幅の微調整 ---------- */
.event-list .card + .card { margin-top: 0; }
@media (max-width: 719px) {
  .kpis .kpi:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (max-width: 520px) {
  .area-studio .brand-text, .area-backoffice .brand-text { display: none; }
  .nav a, .nav button { padding: 8px 8px; font-size: .86rem; }
  h1 { font-size: 1.3rem; }
}
@media (max-width: 600px) {
  .bulk-bar { display: grid; grid-template-columns: auto 1fr; gap: 6px; padding: 8px; }
  .bulk-bar .price-input { max-width: none; }
  .bulk-bar .btn { white-space: normal; line-height: 1.2; font-size: .78rem; padding: 0 6px; min-height: 36px; }
  .bulk-bar .btn-group { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
}
.bulk-bar .btn-group { display: contents; }
@media (max-width: 600px) { .bulk-bar .btn-group { display: grid; } }
.rank-inline { display: none; color: var(--ink-3); font-size: .8rem; font-weight: 700; }
@media (max-width: 719px) {
  table.data.responsive.compact tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  table.data.responsive.compact td.cell-main { grid-column: 1 / -1; align-items: center; }
  table.data.responsive.compact td { padding: 2px 0; font-size: .85rem; }
  table.data.responsive.compact td::before { font-size: .75rem; }
  table.data.responsive.compact td.rank-cell { display: none; }
  .rank-inline { display: inline; }
}
