:root {
  color-scheme: light;
  --ink: #30242a;
  --ink-soft: #62565b;
  --aubergine: #281b24;
  --aubergine-2: #392630;
  --wine: #8d3f55;
  --rose: #cf8d9d;
  --cream: #f6f1eb;
  --paper: #fffdf9;
  --line: #e5dcd6;
  --gold: #c9a076;
  --alert: #8d3144;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: var(--cream); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--wine); }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.masthead { background: var(--aubergine); color: #fff; border-bottom: 1px solid #ffffff24; }
.mast-inner { max-width: 1200px; margin: auto; min-height: 68px; padding: 13px 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; color: #f7d7dc; font: italic 2rem/1 Georgia, "Times New Roman", serif; letter-spacing: -.05em; }
.brand-mark { font: normal 1.1rem/1 Georgia, serif; color: var(--gold); }
.header-meta { display: flex; align-items: center; gap: 10px; color: #e6cdd2; font-size: .7rem; font-weight: 800; letter-spacing: .22em; white-space: nowrap; }
.live-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px #c9a07620; }

.shell { max-width: 1200px; margin: 0 auto; padding: 24px 26px 74px; }
.intro { position: relative; overflow: hidden; min-height: 188px; display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 28px 34px; border-radius: 20px; color: #fffaf5; background: radial-gradient(circle at 88% 4%, #754454 0, transparent 32%), linear-gradient(116deg, #281b24 0%, #412936 75%, #533341 100%); box-shadow: 0 14px 36px #321e2a18; }
.intro::after { content: "✦"; position: absolute; right: 23%; top: -73px; color: #e8c5b010; font: 16rem/1 Georgia, serif; pointer-events: none; }
.intro-main, .intro-aside { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 8px; color: #e9b8be; font-size: .68rem; letter-spacing: .23em; font-weight: 850; }
h1 { margin: 0; font: 500 clamp(2.8rem, 5vw, 4.4rem)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.intro-sub { margin: 10px 0 0; color: #ebdce0; font-size: .94rem; }
.intro-aside { display: flex; align-items: end; gap: 11px; padding-bottom: 4px; color: #e6d5d6; font-size: .74rem; letter-spacing: .08em; line-height: 1.25; text-transform: uppercase; white-space: nowrap; }
.aside-number { color: #f1c2c9; font: 500 3.15rem/.8 Georgia, serif; letter-spacing: -.08em; }
.safety-note { display: flex; align-items: center; gap: 12px; margin: 15px 0 0; padding: 12px 15px; border: 1px solid #e5d0ca; border-radius: 12px; background: #fff7f1; color: #674853; font-size: .85rem; }
.safety-note strong { color: var(--alert); }
.safety-mark { flex: none; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #bd6b7b; border-radius: 50%; color: var(--alert); font-size: .75rem; font-weight: 900; }

.main-tabs { display: flex; gap: 25px; margin: 23px 0 22px; border-bottom: 1px solid var(--line); }
.main-tabs .tab { min-height: 48px; padding: 0 6px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #96868c; font-size: .72rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.main-tabs .tab strong { margin-left: 6px; color: #6a5a60; font-size: .94rem; font-weight: 800; letter-spacing: 0; }
.main-tabs .tab span { margin-left: 3px; color: #a18c93; font-size: .7rem; }
.main-tabs .tab.active { border-bottom-color: var(--wine); color: var(--wine); }
.main-tabs .tab.active strong { color: var(--aubergine); }
.mobile-tabs { display: none; }

.toolbar { display: flex; align-items: center; gap: 18px; }
.search-wrap { display: flex; align-items: center; gap: 7px; flex: 0 0 360px; min-width: 0; height: 52px; padding: 0 15px; border: 1px solid #d6c9c6; border-radius: 12px; background: var(--paper); box-shadow: 0 2px 7px #36232d08; }
.search-wrap:focus-within { border-color: var(--wine); box-shadow: 0 0 0 3px #8d3f5522; }
.search-icon { color: var(--wine); font-size: 1.8rem; line-height: 1; transform: translateY(-2px); }
.search-wrap input { width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .96rem; }
.search-wrap input::placeholder { color: #8e8385; }
.category-scroll { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.categories { display: flex; gap: 7px; width: max-content; }
.chip { min-height: 38px; padding: 8px 15px; border: 1px solid #dcd1ce; border-radius: 999px; background: #fdfaf6; color: #6d5b61; font-size: .79rem; font-weight: 750; white-space: nowrap; }
.chip.active { border-color: var(--aubergine); background: var(--aubergine); color: white; }
.result-count { margin: 20px 0 12px; color: #897b7e; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 18px #321e2a0a; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px #321e2a18; }
.card-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.card-photo { position: relative; height: 195px; overflow: hidden; background: #dcc9c5; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #281b2444); pointer-events: none; }
.photo-label { position: absolute; z-index: 1; left: 12px; bottom: 12px; padding: 5px 8px; border: 1px solid #ffffff5b; border-radius: 5px; background: #2f202bdc; color: #fff9f5; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #78525d; font: italic 3.5rem Georgia, serif; }
.card-content { min-height: 169px; padding: 17px 18px 11px; }
.card-group { display: block; margin-bottom: 6px; color: var(--wine); font-size: .67rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.card-title { margin: 0; color: var(--aubergine); font: 500 1.55rem/1.05 Georgia, serif; letter-spacing: -.03em; overflow-wrap: anywhere; }
.card-pron { display: block; margin-top: 8px; color: #82747b; font-size: .81rem; }
.card-pron strong { color: #66545d; font-weight: 750; }
.card-key { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 11px 0 0; color: #61565a; font-size: .84rem; line-height: 1.38; }
.card-footer { min-height: 53px; padding: 10px 12px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eee7e1; }
.card-allergens { min-width: 0; color: var(--alert); font-size: .74rem; font-weight: 800; line-height: 1.25; }
.listen-small { flex: none; min-height: 34px; padding: 5px 10px; border: 1px solid #e4c2c8; border-radius: 999px; background: #fbeff0; color: #7c3348; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.empty { padding: 42px 18px; border: 1px dashed #d9c9c6; border-radius: 14px; background: var(--paper); color: var(--ink-soft); text-align: center; }

.floor-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; color: var(--ink-soft); font-size: .9rem; }
.floor-intro p { margin: 0; }
.floor-intro span { font-size: .77rem; color: #8c7c81; }
.floor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.floor-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 18px #321e2a0a; }
.floor-label { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; margin-bottom: 12px; }
.floor-number { grid-column: 1 / -1; color: var(--wine); font-size: .68rem; font-weight: 850; letter-spacing: .17em; }
.floor-label h2 { margin: 0; font: 500 1.55rem/1.1 Georgia, serif; }
.floor-label a { font-size: .8rem; font-weight: 800; white-space: nowrap; }
.floor-card img { width: 100%; height: auto; border: 1px solid #ece6df; border-radius: 8px; background: #fff; }
.site-footer { max-width: 1200px; margin: 0 auto; padding: 23px 26px 36px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: #8d7d82; font-size: .75rem; }
.site-footer span:first-child { color: var(--aubergine); font-weight: 850; letter-spacing: .15em; white-space: nowrap; }

/* The detail view keeps every source field readable on a phone. */
dialog { width: min(780px, calc(100vw - 24px)); max-height: min(92dvh, 940px); padding: 0; overflow: auto; border: 0; border-radius: 18px; background: var(--cream); color: var(--ink); box-shadow: 0 28px 90px #140c14aa; }
dialog::backdrop { background: #170f19bd; }
.dialog-header { position: sticky; top: 0; z-index: 5; min-height: 55px; padding: 9px 17px; display: flex; align-items: center; justify-content: space-between; background: var(--aubergine); color: #fff; }
.dialog-kicker { color: #e9b8be; font-size: .69rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.icon-button { min-height: 36px; padding: 5px 11px; border: 1px solid #ffffff60; border-radius: 999px; background: #ffffff12; color: white; font-size: .78rem; font-weight: 800; }
.dialog-inner { padding: 22px 24px 30px; }
.dialog-top { display: grid; grid-template-columns: 245px 1fr; align-items: start; gap: 23px; }
.dialog-photo { position: relative; height: 235px; overflow: hidden; border-radius: 12px; background: #decaca; }
.dialog-photo img { width: 100%; height: 100%; object-fit: cover; }
.dialog-photo .photo-label { left: 9px; bottom: 9px; }
.dialog-title { margin: 1px 0 10px; color: var(--aubergine); font: 500 clamp(2rem, 4vw, 2.9rem)/1.05 Georgia, serif; letter-spacing: -.045em; }
.pron-line { margin: 0 0 13px; color: #77686e; font-size: .93rem; }
.pron-line strong { color: var(--aubergine); }
.speak-button { min-height: 43px; padding: 9px 15px; border: 0; border-radius: 9px; background: var(--aubergine); color: white; font-size: .86rem; font-weight: 800; }
.audio-note { margin-top: 8px; color: #918288; font-size: .74rem; }
.credit { margin: 12px 0 0; color: #85777c; font-size: .74rem; }
.credit a { color: inherit; }
.allergen-box { margin-top: 21px; padding: 14px 16px; border: 1px solid #e8c8cb; border-left: 4px solid var(--alert); border-radius: 9px; background: #fff6f4; }
.allergen-box small { display: block; color: var(--alert); font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.allergen-box p { margin: 4px 0 0; color: #712d40; font-weight: 800; }
.alert-box { margin: 13px 0 0; padding: 13px 15px; border: 1px solid #e7bfbe; border-radius: 9px; background: #fff5f1; color: #654751; font-size: .85rem; }
.alert-box strong { display: block; margin-bottom: 4px; color: var(--alert); }
.detail-section { margin-top: 24px; }
.detail-section h3 { margin: 0 0 10px; color: var(--aubergine); font: 500 1.48rem/1.1 Georgia, serif; }
.ingredient-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.ingredient-tags span { padding: 7px 10px; border: 1px solid #e5d9d5; border-radius: 8px; background: var(--paper); font-size: .83rem; }
.recipe-lines { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: .89rem; line-height: 1.58; white-space: pre-line; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.fact { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.fact small { display: block; color: #907d82; font-size: .69rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.fact span { display: block; margin-top: 4px; font-size: .88rem; }
.diet-line { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: .87rem; }
.source-details { margin-top: 25px; padding-top: 14px; border-top: 1px solid var(--line); }
.source-details summary { min-height: 44px; display: flex; align-items: center; color: var(--wine); font-size: .88rem; font-weight: 850; cursor: pointer; }
.source-details p { margin: 2px 0 10px; color: var(--ink-soft); font-size: .8rem; }
.source-details a { display: inline-block; margin-bottom: 12px; font-size: .84rem; font-weight: 800; }
.source-details img { width: 100%; border: 1px solid var(--line); background: #fff; }

@media (max-width: 990px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { display: block; }
  .search-wrap { width: 100%; }
  .category-scroll { margin-top: 13px; }
}
@media (max-width: 650px) {
  .mast-inner { min-height: 56px; padding: 10px 16px; }
  .brand { font-size: 1.67rem; }
  .header-meta { gap: 6px; font-size: .54rem; letter-spacing: .11em; }
  .live-dot { width: 5px; height: 5px; }
  .shell { padding: 12px 13px calc(96px + env(safe-area-inset-bottom)); }
  .intro { min-height: 151px; padding: 20px 19px; border-radius: 15px; }
  .intro::after { right: -12px; top: -22px; font-size: 11rem; }
  .eyebrow { margin-bottom: 7px; font-size: .59rem; }
  h1 { font-size: 2.72rem; }
  .intro-sub { max-width: 220px; margin-top: 8px; font-size: .78rem; line-height: 1.3; }
  .intro-aside { display: none; }
  .safety-note { gap: 9px; margin-top: 9px; padding: 9px 11px; font-size: .74rem; line-height: 1.35; }
  .safety-mark { width: 21px; height: 21px; }
  .main-tabs { display: none; }
  .mobile-tabs { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; height: calc(65px + env(safe-area-inset-bottom)); padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px solid #e9dcd6; background: #fffdfaf5; box-shadow: 0 -6px 22px #26141e17; backdrop-filter: blur(14px); }
  .mobile-tabs .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 10px; background: transparent; color: #86777e; font-size: .69rem; }
  .mobile-tabs .tab.active { background: #f4e7e7; color: var(--wine); }
  .mobile-tabs .nav-symbol { font-size: 1.22rem; line-height: 1; }
  .mobile-tabs .tab strong { font-weight: 800; }
  .toolbar { margin-top: 14px; }
  .search-wrap { height: 50px; }
  .category-scroll { margin: 11px -13px 0; padding: 0 13px; }
  .chip { min-height: 37px; padding: 7px 13px; }
  .result-count { margin: 15px 0 9px; font-size: .7rem; }
  .cards { display: block; }
  .card { margin-bottom: 11px; border-radius: 14px; }
  .card-button { display: grid; grid-template-columns: 128px minmax(0, 1fr); min-height: 140px; }
  .card-photo { height: 100%; min-height: 140px; }
  .photo-label { left: 6px; bottom: 7px; padding: 4px 5px; font-size: .53rem; letter-spacing: 0; }
  .card-content { min-height: 0; padding: 13px 13px 8px; }
  .card-group { margin-bottom: 5px; font-size: .6rem; letter-spacing: .13em; }
  .card-title { font-size: 1.34rem; line-height: 1.05; }
  .card-pron { margin-top: 7px; font-size: .75rem; }
  .card-key { margin-top: 8px; font-size: .76rem; line-height: 1.3; -webkit-line-clamp: 2; }
  .card-footer { min-height: 43px; padding: 6px 9px 6px 12px; }
  .card-allergens { font-size: .7rem; }
  .listen-small { min-height: 31px; padding: 4px 9px; font-size: .69rem; }
  .floor-intro { display: block; margin: 15px 2px 13px; font-size: .83rem; }
  .floor-intro span { display: block; margin-top: 3px; }
  .floor-grid { display: block; }
  .floor-card { margin-bottom: 12px; padding: 12px; }
  .floor-label h2 { font-size: 1.36rem; }
  .floor-label a { font-size: .75rem; }
  .site-footer { display: block; padding: 18px 14px calc(90px + env(safe-area-inset-bottom)); font-size: .7rem; }
  .site-footer span { display: block; margin-top: 5px; }
  dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .dialog-header { min-height: 51px; padding: 8px 14px; }
  .dialog-inner { padding: 13px 15px 38px; }
  .dialog-top { display: block; }
  .dialog-photo { height: 174px; margin-bottom: 15px; }
  .dialog-title { margin-bottom: 7px; font-size: 2.25rem; }
  .pron-line { margin-bottom: 10px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 365px) {
  .header-meta { font-size: .48rem; }
  .card-button { grid-template-columns: 104px minmax(0, 1fr); min-height: 137px; }
  .card-photo { min-height: 137px; }
  .card-content { padding: 11px 10px 7px; }
  .card-title { font-size: 1.2rem; }
  .card-key { font-size: .72rem; }
  .card-footer { align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
