@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
  color-scheme: light;
  --ink: #211c1b; --muted: #756b67; --paper: #f6f1e9; --surface: #fffdf8;
  --line: #d9cec2; --accent: #9b3d52; --accent-soft: #ead4d8; --gold: #b37a37;
  --shadow: 0 18px 50px #35211814; --radius: 6px; --gutter: clamp(20px, 5vw, 72px);
}
[data-theme="dark"] { color-scheme: dark; --ink:#f5eee4; --muted:#b9aca5; --paper:#191615; --surface:#24201e; --line:#443b37; --accent:#db8296; --accent-soft:#4a2931; --gold:#d5a461; --shadow:0 18px 50px #0005; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; min-width:320px; background:var(--paper); color:var(--ink); font-family:"DM Sans",sans-serif; }
button,input,select,textarea { font:inherit; }
button,select { cursor:pointer; }
button, input, select, textarea { color:inherit; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent); outline-offset:2px; }
svg { width:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.page-shell { width:min(1180px,calc(100% - var(--gutter)*2)); margin-inline:auto; }
.topbar { height:78px; padding:0 var(--gutter); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; letter-spacing:.13em; }
.brand-mark { width:37px; height:37px; display:grid; place-items:center; background:var(--ink); color:var(--paper); border-radius:50% 50% 48% 52%/58% 58% 42% 42%; font:italic 600 20px "Playfair Display",serif; }
.brand b,.brand small { display:block; }.brand b{font-size:13px}.brand small{font-size:8px;color:var(--muted);margin-top:3px}
.icon-button { width:44px;height:44px;border:1px solid var(--line);background:transparent;border-radius:50%;display:grid;place-items:center; }
.hero { min-height:390px; display:flex; justify-content:space-between; align-items:end; padding-block:70px; gap:40px; }
.eyebrow { margin:0 0 14px; font-size:11px; font-weight:600; letter-spacing:.19em; color:var(--accent); }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { font-family:"Playfair Display",serif; }
h1 { margin-bottom:22px; font-size:clamp(48px,7vw,86px); line-height:.94; letter-spacing:-.045em; font-weight:600; }
h1 i { color:var(--accent); }.hero-copy>p:last-child{max-width:510px;margin:0;color:var(--muted);font-size:16px;line-height:1.7}
.primary,.secondary { min-height:48px; border-radius:var(--radius); padding:0 20px; display:inline-flex; align-items:center; justify-content:center; gap:10px; font-weight:600; }
.primary { border:1px solid var(--accent); background:var(--accent); color:white; }.primary:hover{filter:brightness(.94)}
.secondary { background:transparent; border:1px solid var(--ink); }.hero-action{flex:none}
.summary { display:grid; grid-template-columns:repeat(3,1fr); border:1px solid var(--line); background:var(--surface); box-shadow:var(--shadow); }
.summary article { padding:25px 30px; border-right:1px solid var(--line); position:relative; }.summary article:last-child{border-right:0}
.summary span { font:600 34px "Playfair Display",serif; }.summary p{margin:3px 0 0;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.wish-stat:after { content:""; position:absolute; width:7px;height:7px;background:var(--accent);border-radius:50%;right:24px;top:24px; }
.workspace { padding-block:78px; }.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:26px}.section-heading h2{font-size:38px;margin:0}.section-heading>p{color:var(--muted);font-size:13px;margin:0}
.storage-alert{margin-bottom:24px;padding:13px 16px;border:1px solid var(--accent);border-left-width:4px;background:var(--accent-soft);color:var(--ink);display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;line-height:1.5}.storage-alert[hidden]{display:none}.storage-alert .text-button{flex:none}
.loading-state{min-height:160px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:13px}.loading-state[hidden]{display:none}.spinner{width:22px;height:22px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}
.filters { display:grid;grid-template-columns:minmax(220px,1fr) 180px 180px auto;gap:10px;margin-bottom:26px; }
.filters input,.filters select,.form-grid input,.form-grid select,textarea { width:100%;height:48px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:0 14px; }
.search-field { position:relative; }.search-field svg{position:absolute;left:14px;top:14px;color:var(--muted)}.search-field input{padding-left:44px}
.text-button { min-height:44px;border:0;background:transparent;color:var(--accent);font-weight:600;padding:0 12px; }
.collection-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px; }
.sample-card { min-width:0;display:flex;flex-direction:column;min-height:315px;padding:25px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);transition:transform .2s,box-shadow .2s; }
.sample-card:hover { transform:translateY(-3px);box-shadow:var(--shadow); }.card-top{display:flex;align-items:start;justify-content:space-between;gap:14px}.card-top>div{min-width:0}
.family { color:var(--accent);font-size:10px;font-weight:600;letter-spacing:.14em;text-transform:uppercase; }.sample-card h3{font-size:24px;margin:7px 0 3px;overflow-wrap:anywhere}.house{color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.card-menu{display:flex;gap:2px}.card-menu button{width:36px;height:36px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;border-radius:50%}.card-menu button:hover{background:var(--paper);color:var(--ink)}
.stars { color:var(--gold);letter-spacing:2px;margin:20px 0 15px;font-size:16px; }.stars .off{color:var(--line)}
.note { color:var(--muted);line-height:1.6;font-size:14px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere; }
.card-foot { margin-top:auto;padding-top:19px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px; }.status{font-size:11px;font-weight:600;padding:7px 10px;border-radius:99px;background:var(--paper)}.status-want-full-bottle{background:var(--accent-soft);color:var(--accent)}.card-foot time{font-size:11px;color:var(--muted)}
.empty-state { border:1px dashed var(--line);padding:70px 20px;text-align:center;background:color-mix(in srgb,var(--surface) 50%,transparent); }.empty-state h3{font-size:28px;margin:20px 0 8px}.empty-state p{color:var(--muted);max-width:430px;margin:0 auto 24px;line-height:1.6}
.empty-bottle { margin:auto;width:46px;height:64px;border:2px solid var(--line);border-radius:8px 8px 16px 16px;position:relative}.empty-bottle span{position:absolute;width:20px;height:12px;border:2px solid var(--line);border-bottom:0;left:11px;top:-14px}
dialog { width:min(680px,calc(100% - 30px));max-height:calc(100dvh - 30px);padding:0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 25px 90px #0006; }dialog::backdrop{background:#1c1513b8;backdrop-filter:blur(3px)}dialog form{padding:30px}.dialog-head{display:flex;align-items:start;justify-content:space-between;margin-bottom:26px}.dialog-head h2{font-size:33px;margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 14px}.form-grid label,form>label{display:block;font-size:12px;font-weight:600}.form-grid input,.form-grid select,textarea{margin-top:7px}.form-grid input:invalid:not(:placeholder-shown),textarea:invalid:not(:placeholder-shown){border-color:var(--accent)}
fieldset { border:0;padding:0;margin:22px 0; }legend{font-size:12px;font-weight:600;margin-bottom:8px}.rating-input{display:flex;align-items:center;gap:3px}.rating-input input{position:absolute;opacity:0;pointer-events:none}.rating-input label{font-size:28px;color:var(--line);cursor:pointer;line-height:1}.rating-input:has(input[value="1"]:checked) label:nth-of-type(-n+1),.rating-input:has(input[value="2"]:checked) label:nth-of-type(-n+2),.rating-input:has(input[value="3"]:checked) label:nth-of-type(-n+3),.rating-input:has(input[value="4"]:checked) label:nth-of-type(-n+4),.rating-input:has(input[value="5"]:checked) label:nth-of-type(-n+5),.rating-input label:hover,.rating-input label:has(~ label:hover){color:var(--gold)}.rating-input input:focus-visible+label{outline:2px solid var(--accent)}.rating-input span{margin-left:10px;color:var(--muted);font-size:12px}
textarea{height:auto;resize:vertical;padding:12px 14px;line-height:1.5}.field-hint{display:block;text-align:right;color:var(--muted);font-weight:400;margin-top:4px}.field-hint b{font-weight:400}.form-error{min-height:18px;color:var(--accent);font-size:12px;margin:8px 0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}.toast{position:fixed;z-index:20;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:var(--paper);padding:12px 18px;border-radius:99px;font-size:13px;transition:.25s}.toast.show{transform:translate(-50%,0);opacity:1}
@media(max-width:850px){.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filters{grid-template-columns:1fr 1fr}.search-field{grid-column:1/-1}.hero{align-items:start;flex-direction:column}.hero-action{align-self:start}.summary article{padding:22px}.workspace{padding-block:56px}}
@media(max-width:580px){.topbar{height:66px}.brand small{display:none}.hero{min-height:0;padding-block:50px}.hero h1{font-size:49px}.summary{grid-template-columns:1fr}.summary article{border-right:0;border-bottom:1px solid var(--line);display:flex;align-items:baseline;gap:12px;padding:16px 20px}.summary article:last-child{border-bottom:0}.summary span{font-size:27px}.collection-grid{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.search-field{grid-column:auto}.section-heading h2{font-size:32px}.sample-card{min-height:285px}.form-grid{grid-template-columns:1fr;gap:14px}dialog form{padding:22px}.dialog-head{margin-bottom:20px}.dialog-actions .primary{flex:1}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}.spinner{animation:none}}
