:root {
    color-scheme: light;
    --ink:#35231e; --wine:#652737; --wine-dark:#401722; --rose:#efddd7;
    --cream:#f8f2e9; --white:#fffdf8; --muted:#715e54; --gold:#ad794b; --line:#eadbc9;
    font-family:"Segoe UI",Tahoma,Arial,sans-serif;
}
*,*::before,*::after { box-sizing:border-box; }
body { margin:0;background:linear-gradient(180deg,#fcf8f0 0,var(--cream) 500px);color:var(--ink);line-height:1.65; }
[hidden] { display:none!important; }
a { color:inherit;text-decoration:none; }
button,input,textarea,select { font:inherit; }
button:enabled { cursor:pointer; }
button:disabled { cursor:default;opacity:.5; }
:focus-visible { outline:3px solid #9f6145;outline-offset:3px; }
.gift-shell { width:min(1260px,calc(100% - 72px));margin-inline:auto; }
.gift-header { border-bottom:1px solid var(--line); }
.masthead { min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:20px; }
.gift-brand { display:flex;align-items:center;gap:12px;font-weight:700;color:var(--wine); }
.gift-brand img { object-fit:contain; }
.masthead nav { display:flex;gap:26px;font-size:.93rem;color:var(--muted); }
.masthead nav [aria-current] { color:var(--wine);font-weight:700;border-bottom:1px solid var(--gold); }
.gift-hero {
    margin-top:25px;min-height:400px;display:grid;grid-template-columns:.86fr 1.14fr;
    background:radial-gradient(ellipse at 86% 10%,#743043,#411923 75%);
    border:1px solid #541f2d;border-radius:24px;overflow:hidden;box-shadow:0 18px 44px #48292121;
}
.hero-copy { align-self:center;padding:clamp(28px,4.5vw,68px);color:#fff7ec; }
.gift-kicker { color:#854d36;font-size:.87rem;font-weight:700;margin:0 0 12px; }
.hero-copy .gift-kicker { color:#e4b782;display:flex;align-items:center;gap:10px; }
.hero-copy .gift-kicker::before { content:"";width:25px;height:1px;background:currentColor; }
.gift-hero h1 { color:#fff9ee;font-size:clamp(2.65rem,5vw,4.7rem);line-height:1.16;margin:0;text-wrap:balance; }
.gift-hero h1 em { color:#f1c48e;font-style:normal; }
.hero-copy > p:not(.gift-kicker) { color:#f1ded1;font-size:clamp(1rem,1.55vw,1.16rem);max-width:34ch;margin:16px 0 24px; }
.gift-hero-visual { position:relative;min-width:0; }
.gift-hero-photo { position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:52% 55%; }
.gift-button {
    min-height:48px;padding:10px 19px;border:1px solid transparent;border-radius:9px;
    display:inline-flex;align-items:center;justify-content:center;gap:18px;
    color:#fff9ee;background:var(--wine);font-weight:700;transition:background .18s,border-color .18s;
}
.gift-button:hover:not(:disabled) { background:var(--wine-dark); }
.hero-copy .gift-button { background:#f3d3a9;color:#49232a; }
.hero-copy .gift-button:hover { background:#ffe4c3; }
.gift-button.outline { background:transparent;color:var(--wine);border-color:var(--line); }
.gift-button.outline:hover { background:#f2e6dd; }
.gift-heading { margin:39px 0 19px;scroll-margin-top:18px; }
.gift-heading h2,.gift-success h2 { margin:0;color:var(--wine);font-size:clamp(1.75rem,3.1vw,2.6rem);line-height:1.3; }
.gift-heading p { color:var(--muted);margin:8px 0 0; }
.gift-layout { display:grid;grid-template-columns:minmax(0,1fr) minmax(285px,.52fr);align-items:start;gap:23px; }
.gift-form { min-width:0;display:grid;gap:16px; }
.gift-panel,.preview-panel { background:var(--white);border:1px solid var(--line);border-radius:19px; }
.gift-panel { padding:clamp(16px,3vw,28px); }
.panel-heading,.preview-header { display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:16px; }
.panel-heading h3,.preview-header h3 { font-size:1.3rem;margin:0;color:var(--wine); }
.box-options { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:9px; }
.box-option { position:relative;display:block;min-width:0;background:#fffcf6;border:1px solid var(--line);border-radius:11px;cursor:pointer;padding:12px;transition:background .18s; }
.box-option:has(input:checked) { background:#f7ebe7;border-color:#b77e7d; }
.box-option:has(input:focus-visible),.ribbon-options label:has(input:focus-visible) { outline:3px solid var(--gold);outline-offset:2px; }
.box-option > input,.ribbon-options input { position:absolute;opacity:0;inline-size:1px;block-size:1px; }
.box-choice { display:flex;align-items:center;gap:10px; }
.box-choice strong,.box-choice small,.box-description,.portion-name strong,.portion-name small { display:block;overflow-wrap:anywhere; }
.box-choice small,.box-description,.portion-name small,.field-note,.message-counter,.preview-header span,.order-note { color:var(--muted);font-size:.82rem; }
.size-picker { border:0;padding:0;margin:16px 0 0;min-width:0; }
.size-picker legend { padding:0;margin-bottom:8px;font-weight:700;color:var(--wine); }
.size-options { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:8px; }
.size-option strong,.size-option small { display:block;overflow-wrap:anywhere; }
.size-option small { color:var(--muted);font-size:.81rem; }
.packaging-options { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:8px; }
.box-choices { border:0;padding:0;margin:16px 0 0;min-width:0; }
.box-choices > legend { padding:0;margin-bottom:8px;font-weight:700;color:var(--wine); }
.packaging-suggestion { display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px;padding:10px 12px;border-radius:9px;background:#f4ebe1; }
.packaging-suggestion p { margin:0;flex:1 1 160px;overflow-wrap:anywhere;font-size:.88rem;color:var(--wine); }
.packaging-suggestion button { min-height:44px;padding:5px 12px;font-size:.85rem; }
.box-photo { display:block;width:100%;object-fit:contain;background:#f6ede1;border-radius:8px; }
.box-photo { height:104px;margin-bottom:10px; }
.box-description { margin-top:8px; }
.box-swatch { width:36px;height:40px;flex:none;border-radius:5px;box-shadow:0 4px 0 #36172740;position:relative;background:var(--box-color);border:1px solid #35182126; }
.box-swatch::after { content:"";position:absolute;inset:0 14px;background:#d7b576; }
[data-tone="berry"] { --box-color:#692f39;--box-shadow:#461d27; }
[data-tone="ivory"] { --box-color:#e3cdb1;--box-shadow:#aa8a6e; }
[data-tone="olive"] { --box-color:#556048;--box-shadow:#363e2e; }
[data-ribbon="gold"] { --ribbon:#d7b571; }
[data-ribbon="rose"] { --ribbon:#cc9d9d; }
[data-ribbon="forest"] { --ribbon:#758675; }
[data-ribbon="cream"] { --ribbon:#efdfbf; }
.field-title { margin:19px 0 8px;font-weight:650;font-size:.9rem; }
.ribbon-options { display:flex;flex-wrap:wrap;gap:8px; }
.ribbon-options label { cursor:pointer;border:1px solid var(--line);border-radius:30px;font-size:.83rem;position:relative; }
.ribbon-options label:has(input:checked) { border-color:#aa7772;background:#f5e8e3; }
.ribbon-options span { padding:6px 10px;display:flex;align-items:center;gap:7px; }
.ribbon-options i { display:block;width:14px;height:14px;border-radius:50%;background:var(--ribbon);border:1px solid #5d33252c; }
.slot-counter { color:var(--wine);background:#f4e7e2;padding:4px 9px;border-radius:30px;font-size:.82rem;white-space:nowrap; }
.portion-hint { color:var(--muted);font-size:.9rem;margin:-5px 0 15px; }
.portion-list { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));gap:13px; }
.portion-list:has(.portion-row:only-child) { grid-template-columns:1fr; }
.portion-row { min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#fffaf3;border:1px solid var(--line);border-radius:14px;transition:border-color .18s,box-shadow .18s; }
.portion-row.is-selected { border-color:#ab6a72;box-shadow:0 0 0 1px #ab6a7222; }
.portion-photo { display:block;width:100%;height:auto;aspect-ratio:1.46;max-height:175px;object-fit:contain;background:radial-gradient(ellipse,#fff4e3,#efe1cf); }
.portion-placeholder { display:grid;place-items:center;color:#864936;font:700 clamp(2.2rem,5vw,3.6rem) Georgia,Tahoma,serif; }
.portion-card-content { display:flex;flex:1;flex-direction:column;gap:12px;justify-content:space-between;min-width:0;padding:12px; }
.portion-name strong { font-weight:750; }
.portion-name small { color:#6d3f30; }
.portion-actions { display:flex;align-items:center;gap:5px;white-space:nowrap; }
.portion-actions button { width:36px;min-height:36px;border-radius:8px;background:#faf2eb;border:1px solid #e7d7ca;color:var(--wine);font-size:1.25rem;line-height:1; }
.portion-actions [data-add] { border-color:var(--wine);background:var(--wine);color:#fffdf8; }
.portion-actions [data-add]:hover:enabled { background:var(--wine-dark); }
.portion-actions button:hover:enabled { background:var(--rose); }
.portion-actions input { width:2.8rem;min-width:0;min-height:36px;padding:0 2px;text-align:center;font:inherit;font-size:16px;font-variant-numeric:tabular-nums;color:var(--ink);background:#fffcf6;border:1px solid #e7d7ca;border-radius:8px; }
.design-status { color:var(--wine);margin:9px 0 0;font-size:.86rem; }
.design-status:empty { display:none; }
.gift-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px; }
.gift-fields label { display:block;font-weight:650;font-size:.87rem;min-width:0; }
.gift-fields .wide { grid-column:1/-1; }
.gift-fields :is(input,select,textarea) { display:block;width:100%;min-width:0;margin-top:6px;border:1px solid #dccdbf;border-radius:8px;background:#fffcf7;color:var(--ink);font-size:16px;padding:9px 11px;line-height:1.5; }
.gift-fields textarea { resize:vertical; }
.message-counter { display:block;text-align:end;font-weight:400; }
.gift-fields .gift-trap { display:none; }
.gift-price-breakdown { margin:16px 0 0;padding-top:10px;border-top:1px solid var(--line);color:var(--muted); }
.gift-price-breakdown > div { display:flex;justify-content:space-between;align-items:baseline;gap:10px; }
.gift-price-breakdown dd { margin:0;text-align:end;overflow-wrap:anywhere; }
.gift-price-breakdown .request-total,.gift-price-breakdown .preview-total { margin-top:4px;color:var(--wine);font-weight:700; }
.request-total output,.preview-total output { font-size:1.23rem; }
.order-note { margin:8px 0 14px; }
.send-request { width:100%; }
.gift-error,.gift-notice { padding:11px 13px;color:#742326;background:#f9e8e3;border-radius:8px; }
.preview-column { position:sticky;top:18px;min-width:0; }
.preview-panel { padding:20px;box-shadow:0 10px 40px #62362312; }
.mobile-preview-bar { display:none; }
.mobile-preview-dialog { width:min(480px,calc(100% - 22px));max-height:88dvh;overflow:auto;padding:0;background:var(--white);border:1px solid var(--line);border-radius:17px; }
.mobile-preview-dialog::backdrop { background:#39221c88; }
.mobile-preview-dialog .preview-panel { border:0;box-shadow:none; }
.mobile-preview-close { display:block;margin:9px auto 0 10px;width:38px;height:38px;border-radius:9px;border:1px solid var(--line);background:var(--cream);color:var(--wine);font-size:1.4rem; }
.preview-stage {
    min-height:185px;display:grid;place-items:center;padding:14px;
    overflow:hidden;border-radius:13px;background:radial-gradient(ellipse at 54% 26%,#fbefdc,#ecd9c1);
}
.preview-box-photo { display:block;width:100%;height:clamp(180px,18vw,238px);object-fit:contain;filter:drop-shadow(0 5px 9px #46243128); }
.gift-tray {
    --columns:2;display:grid;grid-template-columns:repeat(var(--columns),minmax(0,1fr));gap:7px;width:min(92%,294px);
    background:var(--box-color);padding:8px;border-radius:10px;border:1px solid #30101638;
    box-shadow:0 4px 0 var(--box-shadow),0 9px 15px #4e281c26;
}
.gift-tray[data-columns="1"] { --columns:1;width:min(70%,216px); }
.tray-cell { position:relative;display:grid;place-items:center;min-width:0;aspect-ratio:1.7;overflow:hidden;color:#75462e;background:#eed8b9;border-radius:4px;box-shadow:inset 0 0 0 1px #8e5b333f;padding:5px 5px 23px;text-align:center;overflow-wrap:anywhere; }
.tray-cell.filled { background:radial-gradient(ellipse at 35% 20%,#e6b276,#b5703f);color:#3f271d;font-weight:700; }
.tray-cell img { position:absolute;inset:0;width:100%;height:100%;object-fit:contain; }
.tray-empty { padding:5px; }
.tray-quantity { position:absolute;inset:auto auto 6px 6px;padding:2px 8px;border-radius:16px;color:var(--wine);background:var(--white);font-size:.82rem; }
.preview-card { margin-top:8px;padding:10px 13px;background:#fff7ea;border:1px solid #e3d2b7;border-radius:8px;overflow-wrap:anywhere; }
.preview-card span { display:block;color:#8e542f;font-size:.75rem; }
.preview-card strong { display:block;color:var(--wine);font-size:.85rem; }
.preview-card p { margin:2px 0 0;font-size:.77rem;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.preview-details { padding:13px 0 0; }
.preview-packaging { display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 10px; }
.preview-packaging strong { color:var(--wine);overflow-wrap:anywhere; }
#preview-ribbon { font-size:.79rem;color:var(--muted);display:inline-flex;align-items:center;gap:6px; }
#preview-ribbon::before { content:"";width:11px;height:11px;border-radius:50%;background:var(--ribbon);border:1px solid #52342838; }
.preview-details ul { margin:7px 0 0;padding:0;list-style:none;color:var(--muted);font-size:.9rem;overflow-wrap:anywhere; }
.preview-details li { display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid #f0e5d7; }
.preview-details li b { flex:none;color:var(--wine); }
.gift-success { max-width:620px;margin:36px auto;text-align:center;padding:35px; }
.success-actions { display:flex;flex-wrap:wrap;justify-content:center;gap:9px; }
.reference-label { color:var(--wine); }
.reference-label strong { display:block;font-size:1.25rem; }
.gift-footer { margin-top:38px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:15px;padding:22px 0;color:var(--muted);font-size:.88rem; }
@media(max-width:960px) {
    .gift-shell { width:calc(100% - 40px); }
    .gift-hero { min-height:335px; }
    .gift-layout { gap:14px; }
    .preview-stage { padding-inline:10px; }
}
@media(min-width:721px) {
    .portion-row:only-child { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);align-items:center; }
    .portion-row:only-child .portion-card-content { padding:18px; }
}
@media(max-width:720px) {
    .gift-shell { width:calc(100% - 28px); }
    .masthead { min-height:66px; }
    .gift-brand { gap:6px;font-size:.9rem; }
    .gift-brand img { width:44px;height:38px; }
    .masthead nav { gap:13px;font-size:.82rem; }
    .gift-hero { margin-top:14px;grid-template-columns:1fr;border-radius:16px; }
    .hero-copy { padding:24px; }
    .hero-copy > p:not(.gift-kicker) { margin:10px 0 16px;max-width:none; }
    .gift-hero-visual { height:clamp(165px,48vw,295px); }
    .gift-heading { margin:29px 0 14px; }
    .gift-layout { display:flex;flex-direction:column; }
    .preview-column { display:none; }
    .gift-form { width:100%;gap:12px; }
    .portion-list { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
    .portion-card-content { padding:8px;gap:8px; }
    .portion-row:only-child { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center; }
    .preview-stage { min-height:153px; }
    .preview-panel { padding:13px; }
    .mobile-preview-bar { display:flex;position:fixed;z-index:2;inset:auto 0 0;justify-content:space-between;align-items:center;gap:8px;padding:8px 15px max(8px,env(safe-area-inset-bottom));background:var(--white);border-top:1px solid var(--line);box-shadow:0 -5px 24px #542b201b; }
    .mobile-preview-bar div { display:grid;line-height:1.35; }
    .mobile-preview-bar output { color:var(--wine);font-weight:750; }
    .mobile-preview-bar span { color:var(--muted);font-size:.8rem; }
    .mobile-preview-bar .gift-button { min-height:44px;padding:8px 11px; }
    body:has(.mobile-preview-bar:not([hidden])) .gift-footer { padding-bottom:88px; }
}
@media(max-width:370px) {
    .gift-brand span { display:none; }
    .gift-fields { grid-template-columns:1fr; }
    .portion-actions { gap:3px; }
    .portion-actions button { width:31px; }
    .portion-actions input { width:2.5rem; }
}
@media(pointer:coarse) {
    .portion-actions :is(button,input) { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after { transition:none!important;scroll-behavior:auto!important; }
}
