:root {
  color-scheme: light;
  --page: #f5f6f8;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-2: #4a5568;
  --ink-3: #5b6675;
  --line: #e5e8ee;
  --brand: #c2410c;
  --brand-hover: #9a3412;
  --brand-soft: #fdeee8;
  --teal: #0f766e;
  --yes-bg: #e6f6ef;
  --yes-ink: #11663f;
  --limited-bg: #fff5dd;
  --limited-ink: #8a5a00;
  --no-bg: #fbecec;
  --no-ink: #9b2c2c;
  --tbc-bg: #edf1f7;
  --tbc-ink: #46557a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 6px 20px rgba(20, 33, 61, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 140% at 100% 0%, #ffd9c7 0%, rgba(255, 217, 199, 0) 55%),
    linear-gradient(180deg, #fff7f2 0%, var(--page) 100%);
  padding: 28px 0 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand);
}
.brand::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.lede { margin: 0; max-width: 60ch; color: var(--ink-2); font-size: 16px; }
.br-wide { display: none; }
@media (min-width: 700px) { .br-wide { display: inline; } }

/* ---------- Filters ---------- */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-top: 4px;
}
.filter-row { display: flex; flex-direction: column; gap: 8px; }
.filter-label, .select > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip input:checked + span::before { content: "✓"; margin-right: 6px; font-size: 13px; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.select { display: flex; flex-direction: column; gap: 6px; }
select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a5568' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink);
  font-size: 15px;
  appearance: none;
  -webkit-appearance: none;
}
select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 560px) {
  .selects { grid-template-columns: 1fr 1fr; }
  .selects .select:last-child { grid-column: 1 / -1; }
}

/* ---------- Results ---------- */
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}
.summary { margin: 0; font-size: 14px; color: var(--ink-2); }
.summary strong { color: var(--ink); }
.clear {
  flex: none;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .results { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Card ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media { position: relative; aspect-ratio: 16 / 9; margin: 0; background: var(--tbc-bg); }
/* Single column on phones: a slimmer placeholder keeps more content on screen.
   In multi-column grids every card keeps 16:9 so rows line up. */
@media (max-width: 699px) {
  .media.no-photo { aspect-ratio: 5 / 2; }
}
.media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 10px 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .62) 100%);
  font-size: 11px; line-height: 1.3; color: #fff; text-align: right;
}
.media figcaption a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.photo-label {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.stat.stale .sub { color: var(--limited-ink); font-weight: 600; }

.skip {
  position: absolute; left: 12px; top: -48px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--ink); color: #fff; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* Placeholder when no licensed photo is available */
.ph {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 14px 16px;
  color: #fff;
  overflow: hidden;
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  pointer-events: none;
}
.ph-icon { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; opacity: .9; }
.ph-area { position: relative; z-index: 1; font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.ph-time { position: relative; z-index: 1; font-size: 13px; opacity: .9; margin-top: 2px; }
.ph.shinjuku { background: linear-gradient(135deg, #3b1d6e 0%, #b0306e 100%); }
.ph.shibuya { background: linear-gradient(135deg, #ef6c2f 0%, #c3376a 100%); }
.ph.tsukiji { background: linear-gradient(135deg, #0b5f7a 0%, #2aa39a 100%); }
.ph.asakusa { background: linear-gradient(135deg, #b2352a 0%, #e98b3a 100%); }
.ph.default { background: linear-gradient(135deg, #2d3a5a 0%, #5b6b8f 100%); }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; flex: 1; }
.operator { margin: 0; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.card h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }

/* Key stats: price · length · kids */
.stats {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stat { padding: 10px 12px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.stat dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; line-height: 1.25; }
.stat .sub { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.stat .ok { color: var(--yes-ink); }
.stat .bad { color: var(--no-ink); }
.stat .tbc-text { color: var(--tbc-ink); font-size: 14px; }

/* Feature pills (confirmed or limited only) */
.features { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pill { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.yes { background: var(--yes-bg); color: var(--yes-ink); }
.pill.limited { background: var(--limited-bg); color: var(--limited-ink); }
.pill.neutral { background: var(--page); color: var(--ink-2); }

.card-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.book {
  display: block;
  text-align: center;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background .15s;
}
.book:hover { background: var(--brand-hover); }
.book:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Details */
details { border-top: 1px solid var(--line); margin: 0 -16px -16px; }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  margin: -4px 4px 0 0;
  transform: rotate(45deg);
  transition: transform .2s;
}
details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.details-body { padding: 0 16px 16px; }

.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); }
.facts .sub { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.status { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.status.yes { background: var(--yes-bg); color: var(--yes-ink); }
.status.limited { background: var(--limited-bg); color: var(--limited-ink); }
.status.no { background: var(--no-bg); color: var(--no-ink); }
.tbc, .status.unknown { display: inline-block; background: var(--tbc-bg); color: var(--tbc-ink); font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 6px; }
.diet-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); padding: 10px 12px; background: var(--page); border-radius: 10px; }
.source { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); }
.source a { color: var(--teal); }

.empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Notes / footer ---------- */
.notes {
  margin: 32px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-2);
}
.notes h2 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.notes ul { margin: 0; padding-left: 18px; }
.notes li { margin-bottom: 6px; }
.disclosure { margin: 12px 0 0; padding: 10px 12px; background: var(--brand-soft); border-radius: 10px; color: var(--ink); }
.site-footer { padding: 8px 0 40px; font-size: 13px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Footer links & simple content pages ---------- */
.footer-links a, .page a { color: var(--teal); }
.page { max-width: 720px; padding-top: 28px; padding-bottom: 40px; }
.page h1 { font-size: clamp(26px, 6vw, 34px); }
.page h2 { font-size: 18px; margin: 28px 0 8px; }
.page p, .page li { color: var(--ink-2); }
.page .back { display: inline-block; margin-bottom: 18px; font-weight: 600; text-decoration: none; }
.credits { width: 100%; border-collapse: collapse; font-size: 14px; }
.credits th, .credits td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits th { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 560px) {
  .credits thead { display: none; }
  .credits tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .credits td { display: block; border: 0; padding: 2px 0; }
}
