@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --paper-deep: #e9e5da;
  --ink: #222520;
  --muted: #77796f;
  --line: #dbd7ca;
  --tomato: #ef6546;
  --tomato-dark: #d84d32;
  --lemon: #f5d45f;
  --mint: #cde8d4;
  --violet: #7257c8;
  --white: #fffdf7;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#d8d3c6 0.8px, transparent 0.8px);
  background-size: 18px 18px;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 31px; height: 31px; display: flex; align-items: end; gap: 3px; padding: 6px; background: var(--tomato); border-radius: 50% 50% 48% 42%; transform: rotate(-9deg); }
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: var(--white); transform: rotate(9deg); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand-name { font-size: 15px; font-weight: 850; letter-spacing: 0.04em; }
.brand-en { margin-left: 3px; padding-left: 13px; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.16em; }
.page-nav { display: flex; align-items: center; gap: 7px; }
.page-nav a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 13px; border: 1px solid transparent; border-radius: 3px; color: #686b61; font-size: 11px; font-weight: 800; text-decoration: none; }
.page-nav a:hover { border-color: var(--line); color: var(--ink); }
.page-nav a.is-active { border-color: var(--ink); background: var(--ink); color: var(--white); }
.header-link { font-size: 12px; font-weight: 750; text-decoration: none; }
.header-link span { margin-left: 5px; color: var(--tomato); }

.intro {
  min-height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 41px 58px 35px 45px;
  overflow: hidden;
}

.intro-copy { position: relative; z-index: 1; }
.eyebrow, .card-kicker, .note-top { margin: 0; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: 0.18em; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tomato); box-shadow: 0 0 0 4px #ef654620; }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 17px 0 13px; font-size: clamp(40px, 5.2vw, 61px); line-height: 1.12; letter-spacing: -0.055em; font-weight: 900; }
.intro h1 em { color: var(--tomato); font-style: normal; }
.intro-text { margin-bottom: 0; color: #696b62; font-size: 13px; line-height: 1.8; }
.intro-note { width: 158px; height: 150px; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; background: var(--lemon); transform: rotate(5deg); box-shadow: 4px 7px 0 #d9bd50; }
.intro-note::before, .intro-note::after { position: absolute; width: 12px; height: 12px; content: ""; border-radius: 50%; background: var(--paper); }
.intro-note::before { top: -6px; left: calc(50% - 6px); }
.intro-note::after { bottom: -6px; left: calc(50% - 6px); }
.note-top { color: #6e5920; font-size: 8px; }
.note-main { font-size: 20px; font-weight: 900; line-height: 1.28; letter-spacing: -0.04em; }
.note-arrow { align-self: flex-end; font-size: 21px; line-height: 1; }
.intro-spark { position: absolute; color: var(--violet); font-size: 23px; }
.spark-one { top: 48px; right: 28%; transform: rotate(12deg); }
.spark-two { bottom: 37px; right: 8%; color: var(--tomato); font-size: 15px; }

.draw-layout { max-width: 850px; margin: 0 auto; }
.restaurant-page { max-width: 1040px; margin: 0 auto 26px; }
.draw-card, .list-card { min-width: 0; border: 1px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.draw-card { display: flex; flex-direction: column; padding: 24px 27px 16px; background: var(--white); }
.draw-card-head, .list-card-head { display: flex; justify-content: space-between; align-items: center; }
.draw-card-head h2, .list-card-head h2, .recent-heading h2 { margin: 5px 0 0; font-size: 20px; font-weight: 900; letter-spacing: -0.035em; }
.round-label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #d8d5ca; border-radius: 99px; color: #64665d; font-size: 10px; font-weight: 750; }
.round-label span { width: 6px; height: 6px; border-radius: 50%; background: #78b885; }

.filter-panel { margin-top: 18px; padding: 15px 17px 13px; border: 1px solid #e5e0d4; background: #f8f6ef; }
.filter-heading { margin: 0; color: #55594f; font-size: 11px; font-weight: 850; }
.filter-panel .category-tabs { margin: 9px 0 12px; }
.filter-selects { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 12px; }
.subcategory-filter, .filter-selects .location-filter { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 5px; margin: 0; }
.subcategory-filter[hidden] { display: none; }
.subcategory-filter label { color: #4f6254; font-size: 10px; font-weight: 800; }
.subcategory-filter select { width: 100%; min-width: 0; height: 39px; padding: 0 9px; border: 1px solid #a9c7b1; border-radius: 3px; background: #f7fbf7; color: #334339; font-size: 11px; }
.subcategory-filter select:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.draw-stage { min-height: 256px; position: relative; display: grid; place-items: center; margin-top: 20px; overflow: hidden; background: #f2eee4; border: 1px dashed #d5cfc0; }
.draw-stage::before { position: absolute; inset: 0; content: ""; opacity: 0.48; background-image: linear-gradient(45deg, transparent 48%, #ddd7c8 49%, #ddd7c8 51%, transparent 52%); background-size: 16px 16px; mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent); }
.result-copy { position: relative; z-index: 1; max-width: calc(100% - 120px); text-align: center; }
.result-label { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
.result-name { max-width: 440px; margin: 0; font-size: clamp(32px, 4.5vw, 48px); font-weight: 950; letter-spacing: -0.07em; line-height: 1.15; overflow-wrap: anywhere; }
.result-category { margin: 11px 0 0; color: #707268; font-size: 11px; font-weight: 700; }
.result-location { margin: 8px 0 0; color: #4d6152; font-size: 11px; font-weight: 800; }
.result-hours { max-width: 470px; margin: 4px auto 0; color: #77796f; font-size: 9px; line-height: 1.55; }
.meal-stamp { width: 57px; height: 57px; position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid var(--tomato); border-radius: 50%; color: var(--tomato-dark); transform: rotate(-12deg); }
.meal-stamp span { font-size: 8px; font-weight: 700; }
.meal-stamp b { font-size: 13px; letter-spacing: -0.08em; }
.stage-decoration { position: absolute; z-index: 1; color: var(--violet); }
.stage-decoration-left { top: 28px; right: 27px; font-size: 23px; }
.stage-decoration-right { right: 62px; bottom: 28px; color: var(--tomato); font-size: 15px; }
.stage-floor { width: 205px; height: 19px; position: absolute; bottom: 19px; left: 50%; border-radius: 50%; background: #ded9cc; filter: blur(5px); transform: translateX(-50%); }
.draw-stage.is-drawing .result-name { animation: shuffle 0.14s linear infinite alternate; }
.draw-stage.has-result { background: #fbf0cb; border-color: #d7b53d; }
.draw-stage.has-result::before { opacity: 0.23; }
.draw-stage.has-result .result-name { color: var(--tomato-dark); }
@keyframes shuffle { from { transform: translateY(-3px) rotate(-1deg); } to { transform: translateY(3px) rotate(1deg); } }

.draw-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 0 15px; }
.draw-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 19px; border: 0; border-radius: 4px; background: var(--tomato); color: #fffdf7; box-shadow: 3px 3px 0 var(--tomato-dark); cursor: pointer; font-size: 13px; font-weight: 850; transition: transform 130ms ease, background 130ms ease, box-shadow 130ms ease; }
.draw-button:hover:not(:disabled) { background: var(--tomato-dark); transform: translate(2px, 2px); box-shadow: 1px 1px 0 #a83a25; }
.draw-button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.draw-button:focus-visible, .add-button:focus-visible, .category-tab:focus-visible, .reset-button:focus-visible, .remove-choice:focus-visible, .add-form input:focus-visible, .add-form select:focus-visible, .location-option:focus-visible, .clear-location-filter:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.draw-button:disabled { cursor: not-allowed; opacity: 0.52; }
.button-dice { color: var(--lemon); font-size: 18px; }
.button-arrow { margin-left: 8px; font-size: 18px; }
.draw-hint { margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.draw-card-foot { min-height: 27px; display: flex; align-items: center; gap: 7px; padding-top: 10px; border-top: 1px solid #e8e4d9; color: #77796f; font-size: 10px; }
.foot-star { color: var(--violet); font-size: 13px; }
.foot-note { margin-left: auto; font-size: 8px; font-weight: 850; letter-spacing: 0.13em; }

.list-card { display: flex; flex-direction: column; padding: 24px 22px 15px; background: var(--mint); }
.list-card-head h2 { font-size: 19px; }
.list-count { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--mint); font-size: 12px; font-weight: 850; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 17px 0 11px; }
.category-tab { padding: 6px 9px; border: 1px solid #a9c7b1; border-radius: 3px; background: transparent; cursor: pointer; color: #4f6254; font-size: 10px; font-weight: 750; transition: background 120ms ease, color 120ms ease; }
.category-tab:hover { background: #dff0e3; }
.category-tab.is-active { border-color: var(--ink); background: var(--ink); color: #fffdf7; }
.location-filter { min-width: 0; margin: 0 0 10px; }
.location-filter-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: #4f6254; font-size: 10px; font-weight: 800; }
.location-filter-heading > span:first-child { margin-right: auto; }
.location-filter-hint { color: #758578; font-size: 8px; font-weight: 600; }
.location-filter-heading #location-filter-count { color: #66786a; font-size: 9px; font-weight: 600; white-space: nowrap; }
.clear-location-filter { min-height: 25px; padding: 2px 7px; border: 1px solid #a9c7b1; border-radius: 3px; background: #f7fbf7; color: #4f6254; cursor: pointer; font-size: 9px; }
.clear-location-filter:disabled { cursor: default; opacity: 0.45; }
.location-options { display: grid; gap: 5px; min-width: 0; }
.location-option-group { min-width: 0; }
.location-option-group > p { margin: 0 0 2px; color: #758578; font-size: 8px; font-weight: 700; }
.location-option-row { display: flex; gap: 5px; min-width: 0; overflow-x: auto; padding: 1px 1px 4px; scrollbar-color: #8cb297 transparent; scrollbar-width: thin; }
.location-option { min-height: 28px; flex: 0 0 auto; padding: 4px 7px; border: 1px solid #a9c7b1; border-radius: 3px; background: #f7fbf7; color: #4f6254; cursor: pointer; font-size: 9px; font-weight: 700; white-space: nowrap; }
.location-option:hover { background: #e3f0e6; }
.location-option.is-active { border-color: var(--ink); background: var(--ink); color: #fffdf7; }
.choice-list-wrap { min-height: 198px; max-height: 198px; overflow-y: auto; scrollbar-color: #8cb297 transparent; scrollbar-width: thin; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.choice-item { min-width: 0; min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) 21px; align-items: center; gap: 4px; padding: 5px 5px 5px 8px; border: 1px solid #b4d0bc; background: #e6f1e8; }
.choice-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.choice-name { min-width: 0; overflow: hidden; color: #334339; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.choice-tag { color: #53705b; font-size: 8px; font-weight: 850; }
.choice-detail { min-width: 0; overflow: hidden; color: #66786a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.remove-choice { width: 21px; height: 21px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: #6f8875; cursor: pointer; font-size: 15px; line-height: 1; }
.remove-choice:hover { background: #d5e7d9; color: #a93928; }
.empty-list { grid-column: 1 / -1; padding: 18px 7px; color: #66786a; font-size: 11px; line-height: 1.7; }
.list-message { min-height: 17px; margin: 4px 0 5px; color: #4d6d55; font-size: 10px; }
.restaurant-page .list-card { padding: 25px 27px 17px; }
.list-filter-panel { margin-top: 16px; border-color: #b5d0bd; background: #d8eddd; }
.list-filter-panel .category-tab { min-height: 34px; }
.list-results-heading { display: flex; justify-content: space-between; gap: 12px; padding: 13px 1px 9px; color: #59705e; font-size: 10px; font-weight: 750; }
.restaurant-page .choice-list-wrap { min-height: 300px; max-height: min(66vh, 680px); }
.restaurant-page .choice-list { gap: 8px; }
.restaurant-page .choice-item { min-height: 68px; padding: 9px 9px 9px 11px; background: #edf6ef; }
.restaurant-page .choice-name { font-size: 12px; }
.restaurant-page .choice-tag { font-size: 9px; }
.restaurant-page .choice-detail { font-size: 9px; }
.restaurant-page .remove-choice { width: 28px; height: 28px; border: 1px solid #bfd5c5; background: #f7fbf7; }
.restaurant-page .list-message { min-height: 18px; }
.restaurant-page .add-form { margin-top: 8px; }
.restaurant-page .choice-list-wrap:focus-within { outline: 2px solid #a9c7b1; outline-offset: 2px; }
.add-form { display: flex; gap: 6px; margin-top: auto; }
.add-form input, .add-form select { min-width: 0; height: 38px; border: 1px solid #abc6b1; border-radius: 3px; background: #f7fbf7; color: var(--ink); font-size: 10px; }
.add-form input { flex: 1; padding: 0 9px; }
.add-form input::placeholder { color: #89948b; }
.add-form select { width: 70px; padding: 0 4px; }
.add-button { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: white; cursor: pointer; font-size: 21px; line-height: 1; }
.add-button:hover { background: var(--tomato-dark); border-color: var(--tomato-dark); }
.list-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #b5d0bd; }
.list-local { color: #59705e; font-size: 9px; }
.reset-button { padding: 3px 0; border: 0; background: transparent; color: #59705e; cursor: pointer; font-size: 9px; text-decoration: underline; text-underline-offset: 2px; }
.reset-button:hover { color: var(--tomato-dark); }
.sr-only { width: 1px; height: 1px; position: absolute; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.recent-section { min-height: 143px; position: relative; display: grid; grid-template-columns: 185px 1fr; align-items: start; gap: 26px; margin-top: 36px; padding: 22px 26px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.recent-heading h2 { font-size: 18px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 4px 100px 4px 0; list-style: none; }
.recent-item { min-width: 120px; padding: 9px 12px; border: 1px solid var(--line); background: #faf8f1; }
.recent-index { display: block; margin-bottom: 4px; color: var(--tomato); font-size: 8px; font-weight: 900; letter-spacing: 0.12em; }
.recent-name { display: block; overflow: hidden; font-size: 11px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.recent-empty { padding: 8px 0; color: var(--muted); font-size: 11px; }
.recent-doodle { position: absolute; top: 16px; right: 22px; color: var(--violet); font-size: 13px; font-weight: 900; line-height: 1.18; letter-spacing: -0.06em; transform: rotate(7deg); }
.site-footer { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #73756b; font-size: 9px; }
.site-footer span:first-child { color: var(--ink); font-size: 11px; font-weight: 850; }

@media (max-width: 800px) {
  .page-shell { width: min(100% - 36px, 620px); }
  .site-header { height: 52px; }
  .intro { min-height: 188px; padding: 22px 16px; }
  .intro-note { width: 125px; height: 125px; padding: 14px; }
  .note-main { font-size: 17px; }
  .spark-one { right: 26%; }
  .list-card { min-height: 0; }
  .choice-list-wrap { min-height: 132px; max-height: 132px; }
  .recent-section { grid-template-columns: 135px 1fr; gap: 15px; margin-top: 20px; padding: 16px; }
  .recent-list { padding-right: 0; }
  .recent-doodle { display: none; }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 24px); }
  .site-header { height: 52px; }
  .brand { gap: 8px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 13px; }
  .brand-en { display: none; }
  .site-header { height: 48px; }
  .page-nav { gap: 3px; }
  .page-nav a { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .intro { min-height: 124px; padding: 10px 4px; }
  .intro-copy { max-width: calc(100% - 74px); }
  .eyebrow { font-size: 8px; }
  .intro h1 { margin: 7px 0 5px; font-size: clamp(27px, 8vw, 34px); }
  .intro-text { max-width: 225px; font-size: 10px; line-height: 1.45; }
  .desktop-break { display: none; }
  .intro-note { width: 68px; height: 70px; position: absolute; right: 3px; bottom: 12px; padding: 8px; }
  .note-top { font-size: 6px; }
  .note-main { font-size: 13px; }
  .note-arrow { font-size: 16px; }
  .intro-spark { display: none; }
  .draw-card { padding: 12px 11px 9px; }
  .draw-card-head h2, .list-card-head h2 { font-size: 18px; }
  .card-kicker { font-size: 8px; }
  .round-label { padding: 6px 8px; font-size: 9px; }
  .filter-panel { margin-top: 10px; padding: 10px; }
  .filter-panel .category-tabs { margin: 7px 0 9px; }
  .filter-heading { font-size: 10px; }
  .filter-selects { grid-template-columns: 1fr; gap: 7px; }
  .subcategory-filter, .filter-selects .location-filter { gap: 4px; }
  .subcategory-filter select { height: 36px; font-size: 10px; }
  .location-option { min-height: 36px; }
  .draw-stage { min-height: 142px; margin-top: 9px; }
  .meal-stamp { width: 42px; height: 42px; top: 10px; left: 10px; }
  .meal-stamp b { font-size: 11px; }
  .result-copy { max-width: calc(100% - 52px); }
  .result-name { font-size: clamp(30px, 9vw, 42px); }
  .stage-decoration-left { top: 12px; right: 12px; }
  .draw-actions { align-items: flex-start; flex-direction: column; gap: 4px; padding: 7px 0 6px; }
  .draw-button { width: 100%; min-height: 44px; }
  .draw-hint { width: 100%; text-align: center; }
  .foot-note { font-size: 7px; }
  .restaurant-page { margin-bottom: 16px; }
  .restaurant-page .list-card { min-height: 0; padding: 13px 11px 10px; }
  .restaurant-page .list-filter-panel { margin-top: 10px; }
  .category-tabs { gap: 4px; margin: 8px 0 7px; }
  .category-tab { min-height: 36px; padding: 5px 7px; font-size: 9px; }
  .list-results-heading { padding: 10px 1px 7px; font-size: 9px; }
  .restaurant-page .choice-list-wrap { min-height: 260px; max-height: 58vh; }
  .restaurant-page .choice-list { grid-template-columns: 1fr; gap: 6px; }
  .restaurant-page .choice-item { min-height: 62px; }
  .add-form input, .add-form select { height: 40px; }
  .add-button { width: 40px; height: 40px; }
  .list-card-foot { align-items: flex-start; margin-top: 8px; padding-top: 8px; }
  .list-local, .reset-button { font-size: 8px; }
  .recent-section { min-height: 0; grid-template-columns: 1fr; gap: 7px; margin-top: 16px; padding: 12px 4px; }
  .recent-heading h2 { font-size: 16px; }
  .recent-list { gap: 6px; }
  .recent-item { min-width: 105px; flex: 1; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 10px 2px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
