/* 食在南得 — 從資料長出來的內容：今日一味、一日行程、菜色牆、手帳便條、營業時間圖、關於頁
 * 動態原則：不自己亂動。只有「使用者按了什麼」才有動畫（換一組、展開），
 * 開場動畫只有首頁的拍立得（寫在 views.css）。
 */

/* ── 今日一味：一張貼在手帳上的拍立得 ── */
.spotlight {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center;
}
@media (max-width: 760px) { .spotlight { grid-template-columns: 1fr; gap: 20px; } }
.spot-photo {
  position: relative; display: block; padding: 12px 12px 44px; background: #fff;
  box-shadow: var(--shadow-l); border-radius: 3px; transform: rotate(-2deg);
  transition: transform var(--t) var(--ease);
}
.spot-photo:hover { transform: rotate(0deg); }
.spot-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.spot-photo::before { /* 紙膠帶 */
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; z-index: 1;
  translate: -50% 0; rotate: 2deg; background: color-mix(in srgb, var(--yolk) 60%, transparent);
}
.spot-caption {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font-family: var(--font-hand); font-size: var(--fs-1); color: var(--ink-2);
}
.spot-date {
  position: absolute; right: -10px; top: -14px; z-index: 2; display: grid; place-items: center; align-content: center;
  width: 76px; height: 76px; border-radius: 50%; color: var(--red);
  border: 2px solid var(--red); background: color-mix(in srgb, #fff 85%, transparent);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--red);
  font-family: var(--font-hand); font-size: var(--fs-xs); line-height: 1.15; rotate: 12deg;
  font-variant-numeric: tabular-nums;
}
.spot-date b { font-size: var(--fs-1); }
.spot-body { display: grid; gap: 14px; align-content: center; min-width: 0; }
.spot-body h2 { font-size: var(--fs-2); color: var(--ink-2); font-weight: 400; }
.spot-body h3 { font-size: var(--fs-4); line-height: 1.2; overflow-wrap: anywhere; }
.spot-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.spot-district { color: var(--ink-3); font-size: var(--fs-s); }
.spot-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── 店家小檔案（今日一味、店家頁共用） ── */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fact { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); min-width: 0; }

.fact small { font-size: var(--fs-xs); color: var(--ink-3); }
.fact b { font-size: 15px; font-variant-numeric: tabular-nums; }
.fact .fact-sub { color: var(--scallion); font-weight: 500; }

/* ── 一日吃貨行程（真的有先後順序，所以用時間軸） ── */
.plan-line { list-style: none; padding: 0; margin: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.plan-line::before { content: ""; position: absolute; left: 6%; right: 6%; top: 27px; border-top: 3px dashed var(--line); }
.plan-stop { position: relative; display: grid; gap: 10px; justify-items: center; align-content: start; min-width: 0; }
.plan-time {
  display: grid; justify-items: center; align-content: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--cat, var(--line)); line-height: 1.15;
}

.plan-time b { font-size: 11px; font-variant-numeric: tabular-nums; }
.plan-time small { display: none; }
.plan-card { width: 100%; min-width: 0; display: grid; gap: 8px; }
.plan-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.plan-card b { font-size: 15px; display: block; line-height: 1.35; overflow-wrap: anywhere; }
.plan-card:hover b { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.plan-card small { color: var(--ink-3); font-size: var(--fs-xs); }
.plan-card.none { place-items: center; min-height: 140px; text-align: center; color: var(--ink-3); font-size: 13px; border: 2px dashed var(--line); border-radius: 12px; padding: 8px; }
/* 按「換一組」時像發牌一樣重新放上去 */
.plan-line.shuffle .plan-card { animation: deal .45s var(--ease-bounce) both; }
.plan-line.shuffle .plan-stop:nth-child(2) .plan-card { animation-delay: .05s; }
.plan-line.shuffle .plan-stop:nth-child(3) .plan-card { animation-delay: .1s; }
.plan-line.shuffle .plan-stop:nth-child(4) .plan-card { animation-delay: .15s; }
.plan-line.shuffle .plan-stop:nth-child(5) .plan-card { animation-delay: .2s; }
@keyframes deal { from { opacity: 0; transform: translateY(14px) rotate(-3deg) scale(.95); } }
@media (max-width: 860px) {
  .plan-line { grid-template-columns: 1fr; gap: 12px; }
  .plan-line::before { left: 27px; right: auto; top: 20px; bottom: 20px; border-top: 0; border-left: 3px dashed var(--line); }
  .plan-stop { grid-template-columns: 56px minmax(0, 1fr); justify-items: stretch; align-items: center; gap: 12px; }
  .plan-time small { display: block; font-size: 10px; color: var(--ink-3); }
  .plan-time span { display: none; }
  .plan-card { grid-template-columns: 76px minmax(0, 1fr); align-items: center; }
  .plan-card img { aspect-ratio: 1; }
  .plan-card.none { min-height: 64px; }
}

/* ── 按菜色找 ── */
.dish-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 18px 12px; }
.dish-tile { display: grid; justify-items: center; gap: 4px; text-align: center; }
.dish-photo { display: block; width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: var(--shadow-s); outline: 1px solid var(--line); }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-tile b { font-family: var(--font-hand); font-size: 17px; }
.dish-tile:hover b { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dish-tile small { color: var(--ink-3); font-size: var(--fs-xs); margin-top: -4px; font-variant-numeric: tabular-nums; }

/* ── 手帳便條：數字寫成一段話，像夾在手帳裡的紙條 ── */
.note-wrap { margin-top: 64px; }
.note {
  position: relative; max-width: 720px; margin: 0 auto; padding: 32px 36px 28px;
  background: #fff; box-shadow: var(--shadow); border-radius: 3px; rotate: -.6deg;
  background-image: repeating-linear-gradient(transparent 0 35px, var(--grid) 35px 36px);
  background-position: 0 22px;
}
.note::before { /* 紙膠帶 */
  content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 26px; translate: -50% 0; rotate: -2deg;
  background: color-mix(in srgb, var(--red) 25%, transparent);
}
.note h2 { font-size: var(--fs-2); margin-bottom: 8px; }
.note p {
  margin: 0; font-family: var(--font-hand); font-size: var(--fs-1); line-height: 36px; color: var(--ink);
  max-width: none; font-variant-numeric: tabular-nums;
}
.note p b { color: var(--red); font-size: 1.15em; padding: 0 .1em; }
.note .more { display: inline-block; margin-top: 16px; }
@media (max-width: 560px) { .note { padding: 26px 20px 22px; } .note p { font-size: 17px; } }

/* ── 店家頁：一週營業時間圖 ── */
.week-chart { display: grid; gap: 6px; margin-top: 4px; }
.wc-axis, .wc-row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.wc-axis { position: relative; height: 16px; }
.wc-axis i {
  position: absolute; left: calc(54px + (100% - 54px) * var(--n) / 100); transform: translateX(-50%);
  font-style: normal; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.wc-row b { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wc-row.today b { color: var(--red-deep); font-weight: 700; }
.wc-track {
  position: relative; height: 22px; border-radius: 6px; background-color: var(--paper-2);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%);
}
.wc-row.today .wc-track { box-shadow: 0 0 0 2px var(--yolk); }
.wc-seg { position: absolute; top: 3px; bottom: 3px; left: var(--l); width: var(--w); border-radius: 4px; background: var(--scallion); opacity: .85; }
.wc-seg.carry { opacity: .5; }
.wc-track em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--ink-3); }
.wc-now { position: absolute; top: -4px; bottom: -4px; left: var(--x); width: 2px; background: var(--red); border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.hours-text { margin-top: 12px; }
.hours-text summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.hours-text summary:hover { color: var(--ink); }
.hours-text table { margin-top: 8px; }

/* ── 關於頁 ── */
.about-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.about-hero .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.about-hero img { width: 220px; height: auto; border-radius: 3px; background: #fff; padding: 10px; box-shadow: var(--shadow-l); transform: rotate(-4deg); }
.about-hero h1 { font-size: var(--fs-4); margin-bottom: 12px; }
.about-hero p { color: var(--ink-2); margin: 0; }
@media (max-width: 700px) {
  .about-hero .wrap { grid-template-columns: 1fr; gap: 20px; justify-items: center; text-align: center; }
  .about-hero img { width: 150px; }
}
.timeline { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 44px; top: 10px; bottom: 10px; border-left: 3px dashed var(--line); }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: start; position: relative; }
.tl-year {
  justify-self: center; position: relative; padding: 6px 12px; border-radius: 999px; background: var(--red); color: #fff;
  font-family: var(--font-hand); font-weight: 700; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.timeline li.next .tl-year { background: var(--ink); font-size: 14px; }
.tl-card { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.tl-card h3 { font-size: var(--fs-1); margin-bottom: 6px; }
.tl-card p { margin: 0 0 8px; color: var(--ink-2); }
.tl-card code { background: var(--paper-2); padding: 0 5px; border-radius: 4px; font-size: 14px; }
.tl-card small { color: var(--ink-3); font-size: var(--fs-xs); }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tl-chips span { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); }
.muted { color: var(--ink-3); }
@media (max-width: 560px) { .timeline::before { left: 34px; } .timeline li { grid-template-columns: 70px 1fr; gap: 10px; } }

.credits dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 14px; }
.credits dl div { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line); }
.credits dt { font-size: var(--fs-xs); color: var(--ink-3); }
.credits dd { margin: 2px 0 0; font-weight: 700; }

/* ── 專欄：舞伴卡（舊時舞會上，依序寫下每一支舞的小卡） ── */
.dance-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 28px 48px;
  padding: 40px 44px 36px; background: var(--paper); border-radius: 4px;
  border: 1.5px solid var(--red); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px color-mix(in srgb, var(--red) 55%, transparent), var(--shadow-l);
}
.dance-card::before { /* 紙膠帶 */
  content: ""; position: absolute; top: -13px; left: 40px; width: 120px; height: 26px;
  rotate: -3deg; background: color-mix(in srgb, var(--yolk) 60%, transparent);
}
.dance-stamp {
  position: absolute; right: 22px; top: -20px; display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: 50%; rotate: 10deg; font-family: var(--font-hand); font-weight: 700; font-size: 17px; color: var(--red);
  border: 2px solid var(--red); background: var(--paper); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--red);
}
.dance-head { display: grid; align-content: start; justify-items: start; gap: 12px; }
.dance-head h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-3); line-height: 1.2; }
.dance-head .h-ico { width: 30px; height: 30px; color: var(--red); --icon-fill: var(--yolk-tint); }
.dance-desc { margin: 0; font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.dance-count { margin: 0 0 6px; font-size: var(--fs-s); color: var(--ink-3); }
.dance-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 36px; counter-reset: dance; }
.dance-list li { break-inside: avoid; counter-increment: dance; border-bottom: 1px solid var(--grid); }
.dance-list a { display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; }
.dance-list a::before {
  content: "第 " counter(dance) " 支"; flex: none; width: 4.2em; white-space: nowrap;
  font-family: var(--font-hand); font-size: 14px; color: var(--red); font-variant-numeric: tabular-nums;
}
.dance-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dance-dish { margin-left: auto; flex: none; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-3); }
.dance-list a::after { /* 店名到菜色之間的點線 */
  content: ""; order: 1; flex: 1 1 12px; min-width: 12px; border-bottom: 2px dotted var(--line); translate: 0 -4px;
}
.dance-dish { order: 2; }
.dance-dish em { font-style: normal; color: var(--yolk-deep); font-weight: 700; }
.dance-list a:hover .dance-name, .dance-list a:focus-visible .dance-name { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .dance-card { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .dance-card { padding: 34px 18px 24px; }
  .dance-list { columns: 1; }
  .dance-stamp { width: 54px; height: 54px; font-size: 15px; right: 12px; }
}

/* 專欄頁：每一間標上第幾支舞 */
.dance-no { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; font-family: var(--font-hand); font-size: 15px; color: var(--red); }
.dance-no small { font-family: var(--font-body); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.column-pill {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 2px 10px; border-radius: 999px;
  border: 1.5px solid var(--red); color: var(--red-deep); font-size: 13px; font-weight: 700; background: var(--red-tint);
}
.column-pill .ico { width: 14px; height: 14px; }
