/* 色はブランド資料 v1.0 の色番号で固定する。白地を基本にするので暗い配色は持たない */
:root {
  color-scheme: light;
  --teal: #008f91;
  --teal-deep: #00777a; /* 白文字をのせるティール（5.36:1）。#008F91 は白文字に使わない */
  --coral: #f66b5d;
  --yellow: #ffc928;
  --navy: #14243b;
  --bg: #ffffff;
  --bg-sub: #f5f7fa;
  --panel: #ffffff;
  --ink: var(--navy);
  --muted: #4f5b6b;
  --line: #d9dee6;
  --link: var(--teal-deep);
  --gain: var(--teal-deep);
  --loss: #b5391f;
  --empty: var(--bg-sub);
  --teal-tint: #d9f0f0;
  --coral-tint: #fde4e1;
  --yellow-tint: #fff1c2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
a { color: var(--link); text-decoration: underline; }
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; margin: 0 0 16px; }
h1 small { font-size: .875rem; font-weight: 400; color: var(--muted); margin-left: 8px; }
h2 { font-size: 1.125rem; font-weight: 700; margin: 0 0 16px; }
code { font-size: .9em; }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.bar nav { font-size: .875rem; display: flex; align-items: center; gap: 16px; }
.bar nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.bar nav a.on { color: var(--teal-deep); font-weight: 700; box-shadow: 0 2px 0 var(--teal-deep); }
.bar nav a.pill { background: var(--coral); color: var(--navy); font-weight: 700; padding: 8px 16px; border-radius: 8px; white-space: nowrap; }
.brand { display: block; flex: none; color: var(--ink); text-decoration: none; }
.logo { display: block; width: 216px; aspect-ratio: 916 / 108; }
main { margin: 0 auto; padding: 16px; }
main.wide { max-width: 1040px; }
main.narrow { max-width: 760px; }
section { margin: 0 0 32px; }
.flash { background: var(--bg-sub); border-left: 4px solid var(--teal); border-radius: 8px; padding: 8px 16px; margin: 0 0 16px; }
.note { color: var(--muted); font-size: .875rem; margin: 8px 0; }
.inline { display: inline; }

.home-hero { background: var(--bg-sub); border-radius: 12px; padding: 16px 24px; margin-bottom: 16px; }
.home-hero h1 { margin: 0; font-size: 2.5rem; }
.home-hero p { margin: 8px 0 0; color: var(--muted); }

.round-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.round-line p { margin: 0; }
.round-line strong { font-variant-numeric: tabular-nums; }

.grid-wrap { container-type: inline-size; }
.grid {
  --axis: 1.5rem;
  --gap: 3px;
  display: grid;
  gap: var(--gap);
  grid-template-columns: var(--axis) repeat(10, 1fr);
  /* 大きい広告で段がすべて覆われても高さが崩れないよう、段の高さは横幅から決める */
  grid-template-rows: auto repeat(10, calc((100cqw - var(--axis) - 10 * var(--gap)) / 10));
}
.axis { display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile {
  position: relative;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
}
.tile:hover, .tile:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.tile.multi { font-size: 1.125rem; font-weight: 700; }
.tile.multi.has-image .t { font-size: .85rem; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.has-image .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(20, 36, 59, .82); color: #fff; font-size: .68rem; }
/* 画像のない広告の地色。4色を同じ面積にしないよう、ロゴに近い比率で割り振る */
.c0, .c6 { background: var(--teal-deep); color: #fff; }
.c3 { background: var(--teal-tint); color: var(--navy); }
.c1 { background: var(--coral); color: var(--navy); }
.c4 { background: var(--coral-tint); color: var(--navy); }
.c2 { background: var(--yellow); color: var(--navy); }
.c7 { background: var(--yellow-tint); color: var(--navy); }
.c5 { background: var(--navy); color: #fff; }
.tile.empty { background: var(--empty); color: var(--muted); font-weight: 400; }
/* 広告であることを必ず見せる */
.tile.pr::after { content: "PR"; position: absolute; top: 2px; left: 2px; padding: 0 3px; font-size: .55rem; line-height: 1.5; font-weight: 700; background: #fff; color: var(--navy); border-radius: 2px; }
.foot { color: var(--muted); font-size: .875rem; margin-top: 24px; }
.foot p { margin: 4px 0; }

form.stack { display: grid; gap: 14px; }
form.stack label { display: grid; gap: 4px; font-size: .9rem; }
form.row { display: flex; flex-wrap: wrap; gap: 8px; }
form.row select, form.row input { flex: 1 1 200px; min-width: 0; }
input, select {
  width: 100%; min-width: 0; padding: 9px 10px; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
button {
  padding: 8px 16px; font: inherit; font-weight: 700; color: var(--navy); background: var(--coral);
  border: 1px solid var(--coral); border-radius: 8px; cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.pick-info { margin: 0; font-weight: 700; }
.pick-info.bad { color: var(--loss); }
form.limit { display: flex; gap: 6px; min-width: 190px; }
form.limit button { padding: 4px 10px; font-size: .85rem; white-space: nowrap; }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 400; }
button.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 400; text-decoration: underline; }

.balance, .stats { display: grid; gap: 12px; margin-bottom: 24px; }
.balance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.balance > div, .stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 2px; align-content: start; }
.label { font-size: .82rem; color: var(--muted); }
.sub { font-size: .8rem; color: var(--muted); }
.big { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.big small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tab { padding: 4px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--panel); text-decoration: none; font-size: .875rem; }
.tab.on { background: var(--teal-deep); color: #fff; border-color: var(--teal-deep); font-weight: 700; }

.picker { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; border: 0; padding: 0; margin: 0; }
.picker legend { padding: 0; margin-bottom: 6px; font-size: .9rem; }
form.stack label.pick { display: block; gap: 0; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.pick span { display: block; text-align: center; padding: 7px 0; font-size: .78rem; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; }
.pick input:checked + span { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; font-weight: 700; }
.pick input:focus-visible + span { outline: 2px solid var(--navy); }
.pick input:disabled + span { background: var(--line); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.r { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions button { padding: 4px 10px; font-size: .85rem; white-space: nowrap; }
td.actions { min-width: max-content; flex-wrap: nowrap; }
.ad-cell { display: flex; gap: 8px; align-items: center; }
.ad-cell img { width: 56px; height: 56px; object-fit: cover; }
.url { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }

textarea { width: 100%; padding: 9px 10px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.after { margin-top: 24px; }
.bar nav a.pill { margin: 0; }

/* サービス画面 */
.genre-tabs { margin-bottom: 12px; }
.tile.free::after { content: "無料掲載"; position: absolute; top: 2px; left: 2px; padding: 0 3px; font-size: .55rem; font-weight: 600; background: rgba(255, 255, 255, .85); color: #333; border-radius: 2px; }
.tile.sample::after { content: "見本"; position: absolute; top: 2px; left: 2px; padding: 0 3px; font-size: .55rem; line-height: 1.5; font-weight: 700; background: #fff; color: var(--navy); border-radius: 2px; }
.soon { text-align: center; padding: 64px 16px; }
.shop { display: grid; gap: 14px; }
.crumb { margin: 0; font-size: .85rem; }
.shop-hero { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; font-size: 1.6rem; font-weight: 700; text-align: center; padding: 16px; }
.shop-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.image-note { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; font-size: .72rem; background: rgba(0, 0, 0, .65); color: #fff; border-radius: 3px; }
.shop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.shop-head h1 { margin: 2px 0 0; }
.kicker { display: inline-block; padding: 0 8px; font-size: .75rem; font-weight: 700; background: var(--yellow); color: var(--navy); border-radius: 4px; }
.shop-desc { margin: 0; }
.fav { display: inline-flex; align-items: center; gap: 6px; flex: none; background: transparent; color: var(--ink); border-color: var(--line); font-weight: 600; font-size: .85rem; }
.fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav[aria-pressed="true"] svg { fill: var(--loss); stroke: var(--loss); }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.action { flex: 1 1 120px; text-align: center; padding: 8px 16px; font-weight: 700; color: var(--navy); background: var(--coral); border-radius: 8px; text-decoration: none; }
.shop-info { margin: 0; border-top: 1px solid var(--line); }
.shop-info div { display: grid; grid-template-columns: 6em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shop-info dt { color: var(--muted); font-size: .85rem; }
.shop-info dd { margin: 0; overflow-wrap: anywhere; }
.search-form { margin-bottom: 12px; }
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-list a { display: grid; gap: 2px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.shop-list span { color: var(--muted); font-size: .85rem; }
.bottom-nav { display: none; }

/* マスとカードの切り替え */
.view-switch { display: inline-flex; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.view-switch a { padding: 4px 24px; font-size: .875rem; font-weight: 500; color: var(--ink); text-decoration: none; background: var(--panel); }
.view-switch a.on { background: var(--teal-deep); color: #fff; font-weight: 700; }

/* カード表示。JavaScript が動かないときは .ready が付かず、カードが縦に並ぶ */
.swipe-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 auto 16px; max-width: 420px; }
.card-visual { position: relative; min-height: 220px; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; }
.card-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.card-text { font-size: 1.75rem; font-weight: 700; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.card-label { position: absolute; top: 12px; left: 12px; padding: 2px 12px; font-size: .875rem; font-weight: 700; background: var(--yellow); color: var(--navy); border-radius: 4px; }
.card-label.free { background: #fff; }
.card-body { flex: none; padding: 16px; }
.card-body h2 { margin: 0; font-size: 1.125rem; }
.card-meta { margin: 0; font-size: .875rem; color: var(--muted); }
.card-desc { margin: 8px 0 0; font-size: .875rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-more { display: block; margin-top: 12px; padding: 8px 16px; text-align: center; font-weight: 700; color: var(--navy); border: 1px solid var(--navy); border-radius: 8px; text-decoration: none; }
.stamp { display: none; }

.deck.ready { position: relative; max-width: 420px; height: clamp(380px, calc(100dvh - 330px), 560px); margin: 0 auto; touch-action: pan-y; }
.deck.ready[hidden] { display: none; }
.deck.ready .swipe-card { display: none; position: absolute; inset: 0; margin: 0; max-width: none; cursor: grab; user-select: none; -webkit-user-select: none; transition: transform .22s ease; box-shadow: 0 1px 3px rgba(20, 36, 59, .12); }
.deck.ready .swipe-card.is-top { display: flex; z-index: 2; }
.deck.ready .swipe-card.is-next { display: flex; z-index: 1; transform: scale(.96) translateY(8px); }
.deck.ready .swipe-card.dragging { transition: none; cursor: grabbing; }
.deck.ready .stamp { display: block; position: absolute; top: 48px; padding: 4px 16px; font-size: 1.5rem; font-weight: 700; background: #fff; border: 3px solid; border-radius: 8px; opacity: 0; pointer-events: none; }
.deck.ready .stamp.like { left: 16px; color: var(--teal-deep); border-color: var(--teal-deep); transform: rotate(-10deg); opacity: var(--like, 0); }
.deck.ready .stamp.later { right: 16px; color: var(--navy); border-color: var(--navy); transform: rotate(10deg); opacity: var(--later, 0); }
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 420px; margin: 16px auto 0; }
.deck-actions[hidden], .deck-undo[hidden], .deck-done[hidden] { display: none; }
.deck-actions button { padding: 12px 16px; font-size: 1.125rem; }
.deck-actions button.ghost { border-color: var(--navy); font-weight: 700; }
.deck-undo { margin: 8px 0 0; text-align: center; font-size: .875rem; }
.deck-undo button:disabled { color: var(--muted); text-decoration: none; }
.deck-done { max-width: 420px; margin: 0 auto; padding: 32px 24px; text-align: center; background: var(--bg-sub); border-radius: 12px; }
.deck-done-links { display: flex; justify-content: center; gap: 24px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .deck.ready .swipe-card { transition: none; }
}

/* 管理画面 */
main.admin-main { max-width: 1280px; padding: 0; }
.admin { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; border-right: 1px solid var(--line); }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.side a.on { background: var(--teal-deep); color: #fff; font-weight: 700; }
.badge { min-width: 20px; padding: 0 6px; font-size: .72rem; line-height: 20px; text-align: center; color: #fff; background: var(--loss); border-radius: 999px; }
.admin-body { padding: 20px 24px 48px; min-width: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.check { display: flex !important; align-items: center; gap: 8px; }
.check input { width: auto; }
.rights { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; }
.rights legend { padding: 0 4px; font-size: .9rem; }
.rights .note { margin: 0; }
.tag { display: inline-block; padding: 0 8px; font-size: .75rem; border: 1px solid var(--line); border-radius: 999px; }
.tag.up { background: var(--yellow); border-color: var(--yellow); color: var(--navy); font-weight: 700; }
.tag.down { color: var(--loss); border-color: var(--loss); }
.proposal { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 12px; padding: 16px; }
.proposal strong { font-size: 1.2rem; }
.offer { margin-bottom: 16px; }
.offer h3 { margin: 0 0 8px; font-size: 1.125rem; }
.offer p { margin: 8px 0; }
.offer table strong, .offer-terms strong { font-size: 1rem; }
.offer-terms th { white-space: normal; width: 40%; }
.offer-actions { justify-content: flex-start; }
.offer-actions button { padding: 8px 16px; font-size: 1rem; }
.offer details { border: 0; padding: 0; }
.offer .picker { margin-top: 8px; }
td.actions form { display: inline; }
@media print {
  .bar, .side, .no-print, .flash { display: none !important; }
  .admin { display: block; }
}

/* LP */
main.lp { max-width: none; padding: 0; overflow: hidden; }
.lp-band { background: var(--bg-sub); margin-bottom: 64px; }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 56px 24px 64px; }
.lp-tagline { margin: 0 0 8px; font-weight: 700; color: var(--teal-deep); }
.lp-copy h1 { margin: 0 0 16px; font-size: 2.5rem; line-height: 1.3; font-weight: 700; }
.lead { margin: 0 0 16px; }
.price-line { margin: 0 0 24px; font-size: 1.375rem; }
.price-line span { font-size: .875rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-block; padding: 12px 24px; font-weight: 700; color: var(--navy); background: var(--coral); border: 1px solid var(--coral); border-radius: 8px; text-decoration: none; }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--navy); }
.lp-device { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.lp-grid { display: grid; grid-template-columns: repeat(10, 1fr); grid-auto-rows: 1fr; grid-auto-flow: dense; gap: 3px; aspect-ratio: 10 / 6; }
.lp-grid span { display: flex; align-items: center; justify-content: center; border-radius: 3px; font-size: .78rem; font-weight: 700; }
.lp-grid .b22 { grid-column: span 2; grid-row: span 2; }
.lp-grid .b21 { grid-column: span 2; }
.lp-features, .lp-section, .lp-cta { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-bottom: 64px; }
.lp-features h2 { font-size: 1.1rem; margin: 6px 0; }
.lp-features p { margin: 0; color: var(--muted); }
.num { display: inline-block; padding: 0 8px; font-weight: 700; font-size: .875rem; color: var(--navy); background: var(--yellow); border-radius: 4px; }
.lp-section { margin-bottom: 64px; }
.lp-section > h2 { font-size: 1.75rem; font-weight: 700; margin: 0 0 24px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.plan.main { border: 2px solid var(--teal-deep); }
.plan h3 { margin: 0; font-size: 1rem; }
.plan p { margin: 8px 0 0; font-size: .875rem; }
.plan .amount { font-size: 2.25rem; font-weight: 700; line-height: 1.25; }
.amount small { font-size: .8rem; font-weight: 500; }
.ladder, .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.ladder li, .steps li { display: grid; gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { counter-increment: step; content: counter(step); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-weight: 700; color: #fff; background: var(--teal-deep); border-radius: 50%; }
.ladder span, .steps span { color: var(--muted); font-size: .875rem; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }
.lp-cta { text-align: center; padding-top: 48px; padding-bottom: 72px; }
.lp-cta h2 { font-size: 1.75rem; font-weight: 700; margin: 0 0 16px; }

/* 特定商取引法の表記、利用規約、広告掲載基準、プライバシーポリシー */
.legal h1 { font-size: 1.75rem; margin: 0 0 20px; }
.legal h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.legal h3 { font-size: 1rem; margin: 16px 0 6px; }
.legal p, .legal li { line-height: 1.8; }
.legal ol, .legal ul { padding-left: 1.5em; margin: 8px 0; }
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th, .legal-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.legal-table th { width: 30%; font-weight: 700; background: var(--bg-sub); }
.legal-draft { padding: 12px 16px; background: var(--yellow-tint); border: 1px solid var(--yellow); border-radius: 8px; font-weight: 700; }
mark.todo { background: var(--yellow-tint); color: var(--navy); font-weight: 700; padding: 0 2px; }
.legal-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 24px; margin-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; }
main.lp .legal-foot { margin-top: 0; }
@media (max-width: 560px) {
  .legal-table th, .legal-table td { display: block; width: 100%; box-sizing: border-box; }
  .legal-table th { border-bottom: 0; padding-bottom: 6px; }
}

@media (max-width: 820px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .lp-features, .plans, .ladder, .steps, .two-col { grid-template-columns: 1fr; }
  .admin { display: block; }
  .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side a { flex: none; }
  .admin-body { padding: 16px; }
}

@media (max-width: 760px) {
  /* 列が多い表は、ページではなく表の中だけ横にスクロールさせる */
  table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  /* スマホでも10×10のまま、スクロールせず全マスを見せる。写真が主役なので文言は隠す */
  .grid { --axis: 0px; --gap: 2px; }
  .axis { visibility: hidden; height: 0; overflow: hidden; }
  .tile { font-size: .5rem; line-height: 1.2; padding: 1px; border-radius: 2px; }
  .tile.has-image .t { display: none; }
  .tile.multi { font-size: .68rem; }
  .tile.multi.has-image .t { display: block; font-size: .6rem; }
  .logo { width: 180px; } /* ブランド資料の横組みの最小サイズ */
  .bar nav { gap: 8px; }
  .bar nav a.pill { padding: 4px 8px; font-size: .75rem; }
  .wide-only { display: none; }
  .tile.free::after { display: none; }
  .tile.sample::after { top: 1px; left: 1px; padding: 0 2px; font-size: .4rem; }
  .tile.pr { padding-top: 9px; }
  .tile.pr::after { top: 1px; left: 1px; padding: 0 2px; font-size: .4rem; }
  .home-hero { padding: 8px 16px; }
  .home-hero h1 { font-size: 1.5rem; }
  .home-hero p { display: none; }
  .lp-copy h1 { font-size: 1.75rem; }
  body.has-bottom { padding-bottom: 66px; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: grid; justify-items: center; gap: 1px; padding: 7px 0 6px; font-size: .68rem; color: var(--muted); text-decoration: none; }
  .bottom-nav a.on { color: var(--ink); font-weight: 700; }
  .bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .balance { grid-template-columns: 1fr; }
  /* カードと「いいな」のボタンが下のメニューに隠れないよう、1画面に収める */
  .deck.ready { height: clamp(300px, calc(100dvh - 420px), 560px); }
  .deck.ready .card-visual { min-height: 0; }
  .deck.ready .card-desc { -webkit-line-clamp: 1; }
  .deck.ready .card-body { padding: 8px 16px 12px; }
  .deck.ready .card-more { margin-top: 8px; padding: 4px 16px; }
  .deck-actions { margin-top: 12px; }
  .deck-actions button { padding: 8px 16px; font-size: 1rem; }
  .genre-tabs, .view-switch { margin-bottom: 8px; }
  .round-line { font-size: .875rem; }
}

/* 紹介リンク。楽天の規約で画像の大きさを変えられないので、拡大縮小も切り抜きもしない */
.aff-visual { background: #fff; }
.aff-link { text-align: center; }
.aff-link img, .aff-visual .aff-link img { position: static; display: inline-block; width: auto; height: auto; max-width: none; object-fit: fill; }
.shop-aff { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }

/* ジャンルが増えたので、スマホでは折り返さず横に送る（カードを下へ押さない） */
@media (max-width: 640px) {
  .genre-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .genre-tabs .tab { flex: 0 0 auto; white-space: nowrap; }
}
