:root {
  color-scheme: dark;
  --midnight: #0c121c;
  --surface: rgba(24, 32, 44, .76);
  --surface-strong: #18212d;
  --surface-soft: rgba(231, 239, 252, .065);
  --ink: #f5f0e5;
  --muted: #b6b8bc;
  --gold: #d4ac62;
  --gold-light: #f0d39a;
  --gold-ink: #221d15;
  --line: rgba(226, 234, 246, .15);
  --glass-edge: rgba(255, 255, 255, .22);
  --shadow: 0 14px 38px rgba(0, 0, 0, .28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--midnight);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(10, 10, 14, .52) 0%, rgba(10, 10, 14, .68) 55%, rgba(10, 10, 14, .82) 100%),
    url("images/vino-cellar-bg.png") center center / cover no-repeat;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 110%, rgba(83, 101, 127, .12), transparent 48%);
}
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, .button:focus-visible, input:focus-visible, textarea:focus-visible, .file-button:focus-within {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
.shell {
  max-width: 780px;
  margin: auto;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(105px + env(safe-area-inset-bottom));
}
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin: 4px 0 25px; }
.eyebrow { margin: 0 0 8px; color: var(--gold-light); font-size: 10px; font-weight: 800; letter-spacing: .23em; }
.topbar h1, .dialog-head h2, .detail-copy h2, .empty-state h2 {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
}
.topbar h1 { font-size: clamp(38px, 8vw, 52px); line-height: 1.02; text-shadow: 0 2px 24px rgba(212,172,98,.18); }
.subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.mini-action, .filter, .button-soft, .icon-button, .detail-close {
  border: 1px solid var(--glass-edge);
  background: linear-gradient(145deg, rgba(242, 246, 255, .13), rgba(207, 218, 235, .045));
  color: var(--ink);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 5px 16px rgba(0, 0, 0, .14);
}
.mini-action { border-radius: 99px; padding: 8px 11px; font-size: 11px; font-weight: 700; }
.glass-mark {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; overflow: hidden;
  display: grid; place-items: center; background: rgba(242, 246, 255, .1); color: var(--gold);
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px rgba(0, 0, 0, .25);
}
.glass-mark img { width: 100%; height: 100%; object-fit: cover; }
.toolbar { display: grid; gap: 14px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(231, 239, 252, .065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 10px 28px rgba(0, 0, 0, .14);
  color: var(--muted); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.search:focus-within { border-color: rgba(212, 172, 98, .7); box-shadow: 0 0 0 3px rgba(212, 172, 98, .12); }
.search span { font-size: 25px; line-height: 1; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search input::placeholder { color: #a6aab1; }
.filters { display: flex; gap: 8px; overflow: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { border-radius: 999px; padding: 10px 15px; white-space: nowrap; font-size: 13px; }
.filter span { margin-left: 4px; font-size: 11px; opacity: .78; }
.filter.active { border-color: rgba(255, 255, 255, .45); background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--gold-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 7px 20px rgba(212,172,98,.2); }
.wine-list { display: grid; gap: 12px; margin-top: 19px; }
.wine-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; text-align: left; color: inherit;
  border: 1px solid var(--line); border-radius: 19px;
  background: linear-gradient(145deg, rgba(238, 244, 255, .105), rgba(181, 198, 220, .035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(135%); backdrop-filter: blur(22px) saturate(135%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.wine-card:active { transform: scale(.988); }
.wine-thumb { flex: 0 0 66px; height: 82px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: rgba(212, 172, 98, .12); color: var(--gold-light); font-size: 25px; }
.wine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wine-info { min-width: 0; flex: 1; }
.wine-title { margin: 0 0 5px; font: 500 19px/1.2 "Bodoni 72", "Didot", "Palatino Linotype", Georgia, serif; overflow-wrap: anywhere; }
.wine-vintage { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { padding: 4px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; background: rgba(223,232,247,.08); color: #e9d2a1; font-size: 10px; font-weight: 600; }
.stars { display: flex; gap: 2px; margin-top: 6px; color: var(--gold-light); font-size: 12px; letter-spacing: 1px; }
.chevron { padding-right: 5px; color: #aeb8c4; font-size: 18px; }
.empty-state { display: none; padding: 30px 16px 30px; text-align: center; }
.empty-state.show { display: block; }
.empty-glass {
  width: 64px; height: 64px; margin: auto auto 10px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(240,211,154,.2), rgba(212,172,98,.055) 66%);
  border: 1px solid rgba(240,211,154,.28); color: var(--gold-light); font-size: 36px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 12px 30px rgba(0,0,0,.2);
}
.empty-state h2 { font-size: 24px; }
.empty-state p { color: var(--muted); font-size: 14px; }
.add-button {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(690px, calc(100% - 42px)); min-height: 56px; z-index: 2;
  border: 1px solid rgba(255, 255, 255, .58); border-radius: 999px;
  background: linear-gradient(135deg, rgba(244, 218, 164, .97), rgba(194, 148, 68, .94)); color: #211b13;
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), inset 0 -1px 0 rgba(88,61,20,.2), 0 12px 34px rgba(212,172,98,.28), 0 4px 12px rgba(0,0,0,.28);
  font-size: 15px; font-weight: 750; letter-spacing: .01em; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.add-button span { margin-right: 5px; font-size: 20px; vertical-align: -1px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 18px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 700; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.button-primary {
  border-color: rgba(255,255,255,.55); background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--gold-ink);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 7px 20px rgba(212,172,98,.19);
}
.button-soft { border-radius: 999px; padding: 11px 17px; font-size: 13px; font-weight: 700; }
.button:active, .mini-action:active, .filter:active, .icon-button:active, .detail-close:active { transform: scale(.97); }
.icon-button { width: 40px; height: 40px; border-radius: 50%; font-size: 25px; line-height: 1; }
.wine-dialog, .detail-dialog {
  position: fixed; inset: auto 0 0; width: 100%; max-width: 640px; max-height: min(92dvh, 900px); margin: 0; padding: 0; overflow: auto;
  border: 1px solid rgba(255,255,255,.16); border-bottom: 0; border-radius: 27px 27px 0 0;
  background: rgba(17, 24, 34, .88); color: var(--ink); box-shadow: 0 -18px 70px rgba(0,0,0,.56);
  -webkit-backdrop-filter: blur(28px) saturate(145%); backdrop-filter: blur(28px) saturate(145%);
}
.wine-dialog[open], .detail-dialog[open] { animation: rise .22s ease-out; }
.wine-dialog::backdrop, .detail-dialog::backdrop { background: rgba(2, 5, 10, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@keyframes rise { from { transform: translateY(22px); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
.wine-dialog form { padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.dialog-head h2 { font-size: 27px; }
.photo-card { margin-bottom: 22px; padding: 13px; border: 1px solid var(--line); border-radius: 19px; background: rgba(231,239,252,.045); }
.photo-preview { height: 170px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(3,8,15,.32); }
.photo-preview img { width: 100%; height: 100%; object-fit: contain; }
.photo-placeholder { color: var(--muted); text-align: center; font-size: 13px; }
.photo-placeholder span { color: var(--gold-light); font-size: 28px; }
.photo-placeholder p { margin: 5px 0; }
.photo-actions { display: flex; gap: 9px; margin-top: 11px; }
.file-button { position: relative; flex: 1; overflow: hidden; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ocr-status { margin: 9px 3px 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.wine-dialog fieldset { margin: 20px 0; padding: 0; border: 0; }
.wine-dialog legend { margin-bottom: 13px; color: var(--gold-light); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.field { display: grid; gap: 7px; margin: 12px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: rgba(231,239,252,.055); color: var(--ink); font-size: 16px; font-weight: 400; }
.field input::placeholder, .field textarea::placeholder { color: #9fa7b2; }
.field input:focus, .field textarea:focus { border-color: rgba(240,211,154,.72); box-shadow: 0 0 0 3px rgba(212,172,98,.12); }
.field textarea { resize: vertical; }
.check-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 44px; color: var(--ink); font-size: 14px; }
.check-row input { position: absolute; right: 0; z-index: 1; width: 48px; height: 28px; opacity: 0; cursor: pointer; }
.toggle { position: relative; width: 46px; height: 27px; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; background: rgba(218,228,242,.14); transition: .18s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #e7eaf0; box-shadow: 0 1px 5px rgba(0,0,0,.4); transition: .18s; }
.check-row input:checked + .toggle { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.check-row input:checked + .toggle::after { transform: translateX(19px); background: #fff8e8; }
.rating-area { margin-top: 12px; }
.hidden { display: none; }
.field-caption { margin: 10px 0 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.star-picker { display: flex; gap: 8px; margin: 5px 0 14px; }
.star-button { padding: 4px; border: 0; background: transparent; color: #737b88; font-size: 29px; }
.star-button.selected { color: var(--gold-light); text-shadow: 0 0 14px rgba(212,172,98,.32); }
.form-footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-dialog { border-radius: 27px 27px 0 0; }
.detail-top { position: relative; min-height: 210px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, rgba(212,172,98,.16), transparent 65%), #101722; }
.detail-top img { max-width: 100%; max-height: 290px; object-fit: contain; }
.detail-top .placeholder { color: var(--gold-light); font-size: 46px; }
.detail-close { position: absolute; top: 15px; right: 15px; width: 40px; height: 40px; border-radius: 50%; font-size: 23px; }
.detail-copy { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
.detail-copy .eyebrow { margin-bottom: 8px; }
.detail-copy h2 { font-size: 29px; line-height: 1.15; }
.detail-vintage { margin: 8px 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.history-box, .note-box { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: rgba(231,239,252,.05); }
.history-box h3, .note-box h3 { margin: 0 0 13px; color: var(--gold-light); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.history-row .check { margin-left: auto; color: var(--gold-light); font-size: 17px; }
.history-row .off { color: #848c97; }
.detail-actions { display: flex; gap: 9px; }
.detail-actions .button { flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 5; transform: translate(-50%,12px); opacity: 0; pointer-events: none; padding: 11px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; background: rgba(30,39,52,.94); color: var(--ink); box-shadow: var(--shadow); font-size: 13px; transition: .2s; white-space: nowrap; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.toast.show { transform: translate(-50%,0); opacity: 1; }
@media (hover: hover) {
  .mini-action:hover, .filter:not(.active):hover, .button-soft:hover, .icon-button:hover, .detail-close:hover { border-color: rgba(255,255,255,.42); background-color: rgba(244,248,255,.14); }
  .button-primary:hover, .add-button:hover { filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 14px 38px rgba(212,172,98,.3); }
  .wine-card:hover { transform: translateY(-2px); border-color: rgba(240,211,154,.32); }
}
@supports not ((backdrop-filter: blur(1px))) {
  .mini-action, .filter, .button-soft, .icon-button, .detail-close, .search, .wine-card, .add-button { background-color: #1b2532; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 700px) {
  .shell { padding-top: 45px; }
  .wine-dialog, .detail-dialog { position: fixed; inset: 50% auto auto 50%; width: min(640px, calc(100% - 40px)); max-height: 86dvh; border: 1px solid rgba(255,255,255,.18); border-radius: 27px; transform: translate(-50%,-50%); }
  .wine-dialog[open], .detail-dialog[open] { animation: none; }
  .wine-dialog form { padding-bottom: 26px; }
  .detail-dialog { max-width: 560px; }
}
.flavor-section { margin: 14px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(231,239,252,.035); }
.flavor-hint { margin: -3px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.flavor-controls { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.flavor-controls .field { min-width: 0; margin: 5px 0; }
.field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #1b2532; color: var(--ink); font-size: 14px; font-weight: 400; }
.field select:focus { border-color: rgba(240,211,154,.72); box-shadow: 0 0 0 3px rgba(212,172,98,.12); }
.field select:disabled { opacity: .5; }
.flavor-add { min-height: 46px; margin-bottom: 5px; }
.flavor-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.flavor-section .flavor-chips:empty { display: none; }
.flavor-section .flavor-chips:not(:empty) { margin-top: 10px; }
.flavor-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 10px; border: 1px solid rgba(240,211,154,.22); border-radius: 999px; background: rgba(212,172,98,.09); color: #f0d9aa; font-size: 11px; line-height: 1.25; }
.flavor-remove { width: 21px; height: 21px; margin: -2px -4px -2px 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: var(--ink); font-size: 16px; line-height: 1; }
.flavor-box .flavor-chips { margin: 0; }
@media (max-width: 480px) { .flavor-controls { grid-template-columns: 1fr 1fr; } .flavor-add { grid-column: 1 / -1; width: 100%; } }
.topbar h1, .dialog-head h2, .detail-copy h2, .empty-state h2 { font-family: "Bodoni 72", "Didot", "Palatino Linotype", Georgia, serif; font-weight: 500; letter-spacing: -.025em; }
.eyebrow { font-size: 11px; letter-spacing: .27em; text-shadow: 0 1px 12px rgba(212,172,98,.28); }
.subtitle { font: italic 15px/1.45 "Palatino Linotype", Georgia, serif; color: #e0d2b7; }
.wine-card { background: linear-gradient(145deg, rgba(79, 48, 39, .42), rgba(21, 19, 25, .62)); border-color: rgba(226, 192, 139, .2); }
.photo-card, .history-box, .note-box { background: rgba(89, 55, 42, .12); }
.wine-dialog, .detail-dialog { background: rgba(27, 20, 24, .9); }
#empty-add { display: none !important; }

:root {
  --wine: #7d2e3d;
  --wine-deep: #481a29;
  --wine-glass: rgba(82, 29, 43, .72);
  --ink: #fff5e8;
  --muted: #d4bca8;
  --line: rgba(223, 183, 142, .28);
  --glass-edge: rgba(246, 213, 177, .34);
}
body { background: radial-gradient(ellipse at 8% 4%, rgba(111, 32, 50, .28), transparent 43%), linear-gradient(180deg, rgba(18, 7, 12, .38), rgba(12, 8, 12, .68) 70%, rgba(12, 8, 12, .8)), url("images/vino-cellar-bg.png") center / cover fixed; }
.topbar h1, .dialog-head h2, .detail-copy h2, .empty-state h2 { color: #fff1da; font-weight: 600; text-shadow: 0 3px 28px rgba(120, 38, 57, .4), 0 1px 8px rgba(226, 172, 116, .18); }
.topbar h1 { font-size: clamp(42px, 9vw, 58px); letter-spacing: -.035em; }
.subtitle { color: #efd7bc; }
.eyebrow, .wine-dialog legend, .history-box h3, .note-box h3 { color: #efbd9f; }
.search, .photo-card, .history-box, .note-box, .flavor-section { border-color: rgba(225, 176, 139, .27); background: linear-gradient(135deg, rgba(97, 37, 52, .43), rgba(24, 14, 20, .64)); box-shadow: inset 0 1px 0 rgba(255, 226, 192, .11), 0 12px 32px rgba(12, 5, 9, .25); }
.wine-card { position: relative; border: 1px solid rgba(225, 176, 139, .28); border-left: 3px solid rgba(157, 62, 75, .9); background: linear-gradient(135deg, rgba(107, 39, 54, .56), rgba(26, 15, 21, .72)); box-shadow: inset 0 1px 0 rgba(255, 226, 192, .13), 0 16px 38px rgba(8, 3, 6, .34); }
.wine-title { color: #fff0da; font-size: 21px; font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,.28); }
.wine-vintage { color: #e1c0a3; }
.wine-thumb { background: linear-gradient(145deg, rgba(128, 43, 59, .62), rgba(39, 17, 27, .78)); border: 1px solid rgba(229, 183, 144, .3); }
.pill { border-color: rgba(232, 185, 147, .24); background: rgba(116, 38, 57, .45); color: #f8d8b8; }
.filter { border-color: rgba(236, 202, 169, .28); background: linear-gradient(145deg, rgba(93, 43, 54, .48), rgba(25, 17, 23, .68)); }
.filter.active { border-color: rgba(255, 215, 174, .74); background: linear-gradient(135deg, #9b4650, #5b2033); color: #fff0dc; box-shadow: inset 0 1px 0 rgba(255,235,211,.42), 0 8px 24px rgba(108,31,48,.38); }
.add-button, .button-primary { border-color: rgba(240, 197, 155, .72); background: linear-gradient(135deg, #9e4650 0%, #722b3c 48%, #4d1c2d 100%); color: #fff2df; box-shadow: inset 0 1px 0 rgba(255,236,211,.4), inset 0 -1px 0 rgba(36,6,16,.28), 0 12px 34px rgba(96,25,43,.4), 0 4px 12px rgba(0,0,0,.3); }
.add-button { font-size: 16px; font-weight: 750; letter-spacing: .025em; }
.button-soft, .mini-action, .icon-button, .detail-close { border-color: rgba(229, 187, 151, .3); background: linear-gradient(145deg, rgba(91, 46, 58, .55), rgba(28, 18, 25, .72)); }
.field, .check-row { color: #ecd4bd; }
.field { font-size: 11px; letter-spacing: .055em; text-transform: uppercase; }
.field input, .field textarea, .field select { border-color: rgba(223, 183, 142, .25); background: linear-gradient(135deg, rgba(77, 39, 48, .4), rgba(22, 16, 22, .7)); color: #fff4e7; }
.field input::placeholder, .field textarea::placeholder { color: #c5aa97; }
.empty-glass { background: radial-gradient(circle at 35% 25%, rgba(238,190,143,.32), rgba(117,37,58,.22) 68%); border-color: rgba(239,190,151,.43); color: #f2c49e; box-shadow: inset 0 1px 0 rgba(255,236,211,.24), 0 12px 34px rgba(104,31,50,.32); }
.wine-dialog, .detail-dialog { border-color: rgba(235, 190, 150, .24); background: rgba(30, 17, 23, .91); }
@media (hover: hover) { .wine-card:hover { border-color: rgba(245, 202, 164, .5); background: linear-gradient(135deg, rgba(124, 44, 60, .67), rgba(32, 17, 24, .76)); } .button-primary:hover, .add-button:hover { filter: brightness(1.12); box-shadow: inset 0 1px 0 rgba(255,236,211,.52), 0 15px 42px rgba(128,35,55,.52); } }
:root {
  --display-face: "Baskerville", "Bodoni 72", "Palatino Linotype", Georgia, serif;
  --ui-face: "Avenir Next", "Segoe UI", -apple-system, sans-serif;
}
body { font-family: var(--ui-face); }
.topbar h1, .dialog-head h2, .detail-copy h2, .empty-state h2, .wine-title, .field-caption { font-family: var(--display-face); }
.topbar h1 { font-size: clamp(46px, 9vw, 64px); line-height: .94; font-weight: 500; letter-spacing: -.055em; background: linear-gradient(115deg, #fff5e5 0%, #edc99b 48%, #fff0d8 100%); color: transparent; -webkit-background-clip: text; background-clip: text; text-shadow: none; }
.topbar .eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; font-family: "Copperplate", "Avenir Next", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .32em; }
.topbar .eyebrow::after { content: ""; display: block; width: 38px; height: 1px; background: linear-gradient(90deg, #e5b982, rgba(229,185,130,0)); }
.subtitle { margin-top: 13px; font-family: var(--display-face); font-size: 18px; line-height: 1.4; font-style: italic; letter-spacing: .01em; }
.dialog-head h2 { font-size: 36px; line-height: 1; letter-spacing: -.04em; }
.detail-copy h2 { font-size: 42px; line-height: 1.03; letter-spacing: -.045em; }
.empty-state h2 { margin: 0 auto 8px; font-size: 31px; line-height: 1.02; letter-spacing: -.035em; }
.wine-title { font-size: 24px; line-height: 1.08; font-weight: 600; letter-spacing: -.025em; }
.field-caption { margin: 13px 0 8px; color: #f1d3ae; font-size: 18px; line-height: 1.1; font-weight: 600; letter-spacing: -.01em; }
.field, .check-row { font-family: var(--ui-face); }
.field { font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.wine-dialog legend { font-family: var(--ui-face); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.wine-vintage { font-size: 10px; letter-spacing: .17em; }
.pill { padding: 5px 9px; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.button, .mini-action, .filter { font-family: var(--ui-face); letter-spacing: .04em; }
.note-box h3, .history-box h3 { font-family: var(--ui-face); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.cellar-links { display: flex; justify-content: flex-end; gap: 9px; margin: 14px 0 4px; }
.cellar-links .mini-action { min-height: 39px; padding: 9px 14px; }
.feature-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: 640px; max-height: min(92dvh, 900px); margin: 0; padding: 0; overflow: auto; border: 1px solid rgba(235,190,150,.24); border-bottom: 0; border-radius: 27px 27px 0 0; background: rgba(30,17,23,.95); color: var(--ink); box-shadow: 0 -18px 70px rgba(0,0,0,.56); -webkit-backdrop-filter: blur(28px) saturate(145%); backdrop-filter: blur(28px) saturate(145%); }
.feature-dialog[open] { animation: rise .22s ease-out; }
.feature-dialog::backdrop { background: rgba(2,5,10,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.feature-dialog form, .plans-content { padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); }
.feature-dialog .dialog-head { gap: 12px; }
.feature-dialog .dialog-head h2 { max-width: 430px; font-size: clamp(29px, 7vw, 39px); }
.feature-intro { margin: -4px 0 20px; color: #e6cfb7; font-family: var(--display-face); font-size: 17px; line-height: 1.45; }
.privacy-note { margin: 12px 2px; color: #c5aa97; font-size: 11px; line-height: 1.55; }
.plan-list { display: grid; gap: 10px; }
.plan-card { padding: 15px 16px; border: 1px solid rgba(223,183,142,.23); border-radius: 17px; background: linear-gradient(135deg, rgba(97,37,52,.4), rgba(24,14,20,.62)); box-shadow: inset 0 1px 0 rgba(255,226,192,.08); }
.plan-featured { border-color: rgba(239,190,151,.47); background: linear-gradient(135deg, rgba(111,39,57,.6), rgba(40,20,29,.78)); }
.plan-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan-heading h3 { margin: 0; color: #fff0da; font: 600 22px/1.1 var(--display-face); letter-spacing: -.02em; }
.plan-heading p { margin: 0; color: #e6c49f; text-align: right; white-space: nowrap; }
.plan-heading strong { color: #fff0da; font-size: 18px; }
.plan-heading span { margin-left: 5px; color: #d4bca8; font-size: 10px; }
.plan-card > p { margin: 9px 0 12px; color: #ead7c5; font-size: 13px; line-height: 1.45; }
.plan-tag { display: inline-flex; padding: 5px 9px; border: 1px solid rgba(232,185,147,.2); border-radius: 99px; background: rgba(116,38,57,.28); color: #f4d2b0; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
@media (min-width: 700px) { .feature-dialog { position: fixed; inset: 50% auto auto 50%; width: min(620px, calc(100% - 40px)); max-height: 86dvh; border: 1px solid rgba(235,190,150,.24); border-radius: 27px; transform: translate(-50%,-50%); } .feature-dialog[open] { animation: none; } }
@media (max-width: 480px) { .cellar-links { justify-content: flex-start; } .cellar-links .mini-action { flex: 1; } }
/* Keep native dropdown menus legible over the wine-dark interface. */
.field select { color-scheme: dark; }
.field select option { background-color: #28171f; color: #fff2e3; }
.field select option:checked { background-color: #7d2e3d; color: #fff8ed; }
.field select option:disabled { color: #a99285; }
/* iOS-inspired Liquid Glass surfaces: translucent depth, soft reflections, luminous edges. */
.search, .wine-card, .photo-card, .history-box, .note-box, .flavor-section, .plan-card {
  border-color: rgba(255, 233, 213, .25);
  background-image:
    radial-gradient(ellipse at 14% -18%, rgba(255,255,255,.19), transparent 45%),
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.025) 43%, rgba(114,35,55,.22));
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(23,5,13,.22), 0 18px 44px rgba(5,2,5,.28);
}
.wine-card { border-left-color: rgba(190, 92, 105, .92); }
.wine-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,.10), transparent 30%, transparent 72%, rgba(239,190,151,.045));
}
.wine-card > * { position: relative; z-index: 1; }
.history-box, .note-box, .flavor-section, .photo-card, .plan-card {
  background-color: rgba(34, 17, 25, .43);
}
.mini-action, .filter, .button-soft, .icon-button, .detail-close {
  border-color: rgba(255,235,218,.31);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.16), transparent 56%), linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.018) 55%, rgba(112,37,55,.21));
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  backdrop-filter: blur(24px) saturate(185%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(20,5,12,.24), 0 10px 26px rgba(6,2,6,.23);
}
.filter.active { background-image: radial-gradient(ellipse at 18% 0%, rgba(255,245,234,.26), transparent 60%), linear-gradient(135deg, rgba(174,77,91,.88), rgba(79,27,45,.92)); }
.add-button, .button-primary {
  border-color: rgba(255,230,208,.68);
  background-image: radial-gradient(ellipse at 20% -15%, rgba(255,255,255,.26), transparent 54%), linear-gradient(135deg, rgba(158,70,80,.93), rgba(111,39,58,.94) 48%, rgba(67,24,41,.96));
  -webkit-backdrop-filter: blur(25px) saturate(190%);
  backdrop-filter: blur(25px) saturate(190%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(32,6,17,.3), 0 13px 38px rgba(73,17,34,.42), 0 0 24px rgba(201,110,115,.10);
}
.wine-dialog, .detail-dialog, .feature-dialog {
  border-color: rgba(255,236,219,.29);
  background: linear-gradient(145deg, rgba(84,51,60,.69), rgba(32,18,25,.83) 48%, rgba(26,13,21,.89));
  -webkit-backdrop-filter: blur(34px) saturate(175%);
  backdrop-filter: blur(34px) saturate(175%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.19), 0 -20px 70px rgba(0,0,0,.48);
}
@media (hover: hover) {
  .wine-card:hover, .mini-action:hover, .filter:not(.active):hover, .button-soft:hover { border-color: rgba(255,239,224,.48); filter: brightness(1.08); }
}.annual-price { display: inline-block; margin-top: 3px; }.account-content { padding: 22px; }
.account-notice { margin-top: 17px; padding: 22px; border: 1px solid rgba(255,233,213,.25); border-radius: 21px; background: radial-gradient(ellipse at 14% -18%, rgba(255,255,255,.16), transparent 45%), linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 48%, rgba(114,35,55,.2)); -webkit-backdrop-filter: blur(25px) saturate(165%); backdrop-filter: blur(25px) saturate(165%); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 15px 38px rgba(7,2,6,.22); }
.account-mark { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border: 1px solid rgba(239,190,151,.36); border-radius: 17px; background: linear-gradient(145deg, rgba(173,77,91,.45), rgba(65,24,40,.6)); color: #f4d2b0; font: 32px/1 var(--display-face); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 22px rgba(50,10,25,.25); }
.account-notice h3 { margin: 0 0 9px; color: #fff0da; font: 600 23px/1.15 var(--display-face); letter-spacing: -.02em; }
.account-notice > p:not(.eyebrow) { margin: 8px 0; color: #ead7c5; font-size: 13px; line-height: 1.55; }
.account-notice .privacy-note { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid rgba(223,183,142,.18); color: #c5aa97 !important; font-size: 11px !important; }
.account-form { margin-top: 18px; }
.account-form .field { display: block; margin: 13px 0; }
.account-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 19px; }
.text-action { border: 0; padding: 10px 0; background: transparent; color: #f0c49e; font: 600 12px var(--ui-face); text-align: left; }
.text-action:hover { color: #fff0da; text-decoration: underline; }
.account-error { color: #ffb5a9 !important; }
#account-email { overflow-wrap: anywhere; }
#account-signed-in .button { margin-top: 10px; }
@media (max-width: 420px) { .account-content { padding: 18px; } .account-notice { padding: 18px; } .account-actions { align-items: stretch; flex-direction: column-reverse; } .account-actions .button { width: 100%; } }
#account-sync-button { width: 100%; margin: 9px 0 0; }
#account-signed-in .privacy-note { margin-bottom: 0; }
