/* 会場MAP（/map）2026-10-25 — 外部フォント・外部CSSなし（題・番号・屋号はサイト内のサブセット書体） */
@font-face {
  font-family: "ZenMaruSub";
  src: url("/assets/map/fonts/ZenMaruGothic-Black.sub.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "ZenMaruSub";
  src: url("/assets/map/fonts/ZenMaruGothic-Bold.sub.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
:root {
  --bg-base: #FAF6EF;
  --ink: #1B1B1B;
  --gray: #4A4A4A;
  --accent: #E83228;
  --accent-pale: #FBE9E4;
  --green: #2F4632;
  --line: #EAE3D8;
  --kA: #4AA349;
  --kB: #FEF009;
  --kC: #CE5828;
  --kG: #BFE3F7;
  --head: "ZenMaruSub", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #E9E3D7;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overflow: hidden;
}
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }

.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}

/* ---------- 上部 ---------- */
.mh { flex: none; padding: 0 16px; background: var(--bg-base); }
.mh-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 51px; }
.mh-title { margin: 0 0 5px; font-family: var(--head); font-size: 28px; font-weight: 900; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.numbox { display: flex; flex-direction: column; align-items: flex-end; gap: 0; cursor: text; }
.numbox-label { font-family: var(--head); font-size: 11px; font-weight: 700; line-height: 11px; color: var(--gray); white-space: nowrap; padding-right: 2px; }
.numbox-field {
  display: flex; align-items: center; width: 92px; height: 40px; padding: 0 8px 0 9px;
  border: 1.5px solid var(--ink); border-radius: 12px; background: #fff;
}
.numbox-no { flex: none; font-family: var(--head); font-size: 12px; font-weight: 700; color: var(--gray); }
.numbox input {
  flex: 1 1 auto; min-width: 0; width: 100%; height: 36px; border: 0; padding: 0 0 0 4px; background: transparent;
  font-family: var(--head); font-size: 20px; font-weight: 900; text-align: center; outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.numbox-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,50,40,.18); }
.numbox-field.ng { border-color: var(--accent); background: var(--accent-pale); animation: shake .36s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.mh-sub { margin: 0; font-size: 13px; font-weight: 700; color: var(--gray); line-height: 17px; height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-sub.after { color: var(--ink); }

.chips {
  display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
  margin: 0 -16px; padding: 0 16px; height: 44px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; touch-action: pan-x;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; font-family: var(--head); font-size: 14px; font-weight: 900; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.news {
  flex: none; display: block; margin: 4px 16px 0; padding: 8px 12px; border-radius: 10px;
  background: var(--accent-pale); color: var(--ink); font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 4px solid var(--accent);
}
a.news[href] { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 地図 ---------- */
.mapwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 2px 0 0; }
/* 帯は地図の上に重ねる（高さ 36px）。全体表示の地図は帯の内側に収まる */
.band {
  position: absolute; left: 8px; right: 8px; z-index: 3; height: 36px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.94); border-radius: 8px; pointer-events: none;
  font-family: var(--head); font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.band-n { top: 4px; }
.band-s { bottom: 4px; }
.stage {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  background: var(--bg-base);
}
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#map text { font-family: var(--head); }
.it { cursor: pointer; }
.it.dim, .team.dim { opacity: .25; }
.it.sel .tent-shape, .it.sel .kc-body { stroke: var(--accent); stroke-width: 3; }

.labels, .badges { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.labels.off { visibility: hidden; }
.lbl {
  position: absolute; left: 0; top: 0;
  padding: 3px 6px; border-radius: 6px; background: #fff; color: var(--ink);
  border: 1px solid rgba(27,27,27,.18);
  font-family: var(--head); font-size: 11px; font-weight: 700; line-height: 14px; white-space: pre;
  will-change: transform;
}
.lbl.dim { opacity: .25; }
.lbl.hide { display: none; }
/* 番号の丸: 直径 22px・文字 12px 900・白縁 2px（倍率によらず一定） */
.bdg { position: absolute; left: 0; top: 0; width: 22px; height: 22px; will-change: transform; }
.bdg-in {
  display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(27,27,27,.35);
  font-family: var(--head); font-size: 12px; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.bdg-in.k-A, .bdg-in.k-C { color: #fff; }
.bdg.dim { opacity: .25; }
/* 全体表示（1.6 倍未満）: 直径 16px・文字 10px。屋根の左肩に乗せて写真を見せる */
.badges.sm .bdg, .badges.sm .bdg-in { width: 16px; height: 16px; }
.badges.sm .bdg-in { font-size: 10px; border-width: 1.5px; letter-spacing: -.04em; }
.bdg.sel .bdg-in { box-shadow: 0 0 0 2px var(--accent); }

.fit {
  position: absolute; z-index: 4; right: 10px; bottom: 48px; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--ink); background: #fff; font-family: var(--head); font-size: 13px; font-weight: 900;
  box-shadow: 2px 3px 0 rgba(27,27,27,.18);
}

/* ---------- 下部 ---------- */
.mf { flex: none; padding: 2px 16px calc(6px + env(safe-area-inset-bottom)); background: var(--bg-base); }
.legend {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; width: 100%; min-height: 44px;
  padding: 2px 0; border: 0; background: none; text-align: left;
}
.lg-row { display: flex; flex-wrap: wrap; gap: 0 12px; font-family: var(--head); font-size: 13px; font-weight: 700; line-height: 18px; }
.lg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(27,27,27,.35); }
.k-A { background: var(--kA); } .k-B { background: var(--kB); } .k-C { background: var(--kC); } .k-G { background: var(--kG); }
.lg-note { font-size: 12px; font-weight: 600; line-height: 16px; color: var(--gray); }
.kubun-note { margin: 2px 0 4px; padding: 8px 10px; background: #fff; border-radius: 8px; font-size: 14px; line-height: 1.6; }
.trash { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 4px; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--gray); }
.trash .flyer { flex: none; display: inline-block; padding: 14px 0 14px 12px; margin: -14px 0; color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.listbtn {
  display: block; width: 100%; height: 44px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-family: var(--head); font-size: 16px; font-weight: 900;
}

/* ---------- 店の札（ボトムシート） ---------- */
.scrim { position: fixed; inset: 0; background: rgba(27,27,27,.35); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px;
  height: 92vh; height: 92dvh; z-index: 21; background: #fff; color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.18);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; visibility: hidden;
}
.sheet.open { visibility: visible; transform: translateY(calc(92dvh - 62dvh)); }
.sheet.open.full { transform: translateY(0); }
.sheet.drag { transition: none; }
.sheet-grip { flex: none; height: 28px; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.sheet-grip span { width: 44px; height: 5px; border-radius: 3px; background: #C9C2B6; }
.sheet-x {
  position: absolute; right: 8px; top: 6px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); font-size: 26px; line-height: 44px; font-weight: 700; z-index: 2;
}
.sheet-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 40px; overscroll-behavior: contain; }
.sh-photo { position: relative; margin: 0 -16px; height: 220px; background: #F1ECE2; }
.sh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-head { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.sh-head .no { flex: none; }
.no {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--head); font-size: 20px; font-weight: 900; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(27,27,27,.3);
}
.no.k-A, .no.k-C { color: #fff; } .no.k-B, .no.k-G { color: var(--ink); }
.sh-name { margin: 0; font-family: var(--head); font-size: 24px; font-weight: 900; line-height: 1.25; word-break: normal; overflow-wrap: anywhere; } /* 英単語は丸ごと次の行へ・長すぎる時だけ途中で折る */
.sh-sells { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--gray); }
.sh-sec { margin: 20px 0 6px; font-family: var(--head); font-size: 15px; font-weight: 900; border-left: 4px solid var(--accent); padding-left: 8px; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu .mrow { display: flex; gap: 10px; align-items: baseline; }
.menu .mname { flex: 1 1 auto; font-family: var(--head); font-size: 15px; font-weight: 700; }
.menu .mprice { flex: none; font-family: var(--head); font-size: 15px; font-weight: 900; text-align: right; white-space: nowrap; }
.menu .mdesc { display: block; font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story {
  margin: 0; font-family: var(--mincho); font-size: 15px; line-height: 1.85; white-space: pre-line;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.more { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--head); font-size: 14px; font-weight: 700; color: var(--ink); text-underline-offset: 3px; }
.kchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 18px; padding: 6px 14px;
  border-radius: 999px; border: 2px solid var(--ink); background: #fff; font-family: var(--head); font-size: 14px; font-weight: 700; text-align: left;
}
.kchip .dot { flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px;
  border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font-family: var(--head); font-size: 15px; font-weight: 900; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sh-pending { margin: 16px 0 0; font-size: 15px; font-weight: 700; color: var(--gray); }
.sh-fixed { margin: 24px 0 0; padding: 12px; border-radius: 10px; background: var(--bg-base); font-size: 14px; font-weight: 800; line-height: 1.6; }

/* ---------- 店の一覧 ---------- */
.list { position: fixed; inset: 0; z-index: 30; background: var(--bg-base); display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.list-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 2px solid var(--ink); }
.list-head h2 { margin: 0; font-family: var(--head); font-size: 20px; font-weight: 900; }
.list-x { width: 44px; height: 44px; border: 0; background: none; font-size: 28px; font-weight: 700; }
.list-rows { list-style: none; margin: 0; padding: 0 0 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 68px; padding: 8px 16px;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left;
}
.row .no { flex: none; width: 40px; height: 40px; font-size: 17px; } /* flex: none が無いと長い店名の行で丸が横につぶれる（10/25 実機で発見） */
.row-ph { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #E7E2D8; }
.row-ph.soon { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #4A4A4A; }
.row-tx { flex: 1 1 auto; min-width: 0; }
.row-name { display: inline; font-family: var(--head); font-size: 15px; font-weight: 900; line-height: 1.35; word-break: normal; overflow-wrap: anywhere; }
.row-sub { display: block; font-size: 12px; font-weight: 700; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-cat { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 11px; font-weight: 800; line-height: 16px; padding: 1px 7px; border-radius: 999px; background: #fff; border: 1px solid var(--line); white-space: nowrap; } /* 店名のあとに置く＝店名の列を広く取る（10/25 実機・46番が3行になった） */

@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  .numbox input.ng { animation: none; }
}
