:root {
  color-scheme: light;
  --paper: #f8f4ed;
  --surface: #fffcf6;
  --ink: #29221f;
  --muted: #695d55;
  --line: #e6dacf;
  --wine: #61283d;
  --wine-dark: #461b2b;
  --rose: #f4e5e8;
  --serif: "Baskervville", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--wine); }
:focus-visible { outline: 3px solid #b36379; outline-offset: 4px; }
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #f4e5e8, var(--paper) 65%); }
.login-card { width: min(100%, 440px); padding: clamp(24px, 6vw, 42px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 48px #61283d0c; }
.login-card .brand { margin-bottom: 42px; }
.login-card h1 { font-size: clamp(40px, 9vw, 52px); }
.login-card form { margin-top: 28px; }
.login-card input { font-size: 16px; }
.login-card .button { width: 100%; margin-top: 18px; }
.login-note { color: var(--muted); font-size: 12px; margin: 18px 0 0; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 23px/1 var(--serif); }
.brand-icon { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); }
.brand-icon span, .bag-placeholder { display: block; width: 15px; height: 21px; border: 1.5px solid currentColor; color: #f9e3d4; border-radius: 56%; transform: rotate(34deg); position: relative; }
.brand-icon span::after, .bag-placeholder::after { content: ""; position: absolute; inset: 1px 42%; border-right: 1.5px solid currentColor; border-radius: 50%; transform: rotate(12deg); }
.machine { margin-left: auto; font-size: 13px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 8px 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; white-space: nowrap; }
.primary { background: var(--wine); color: white; }
.primary:hover { background: var(--wine-dark); }
.secondary { background: var(--surface); border-color: #d9c6bc; color: var(--ink); }
.secondary:hover { background: #f2e9df; }
.masthead { padding: 32px 0 23px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--wine); font-size: 11px; font-weight: 750; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; margin: 0 5px 1px 0; border-radius: 50%; background: #a75466; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.06; letter-spacing: -.035em; }
h1 { font-size: clamp(50px, 7.3vw, 76px); }
.intro { margin: 11px 0 0; color: var(--muted); font-size: 16px; }
.totals { display: flex; gap: 26px; flex-shrink: 0; padding: 0 0 4px; }
.totals div { display: grid; padding-left: 18px; border-left: 1px solid #d9c5b9; }
.totals strong { font: 33px/1 var(--serif); color: var(--wine); }
.totals span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.feature { display: grid; grid-template-columns: 40% 1fr; min-height: 405px; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; background: var(--surface); }
.feature-photo { display: grid; place-items: center; position: relative; isolation: isolate; min-height: 310px; overflow: hidden; background: radial-gradient(ellipse at 55% 27%, #8f5368, #512437 76%); }
.feature-photo::before, .feature-photo::after { content: ""; width: min(80%, 357px); aspect-ratio: 1; position: absolute; z-index: -1; border: 1px solid #f9d5ca42; border-radius: 50%; }
.feature-photo::after { width: min(70%, 310px); }
.feature-photo img { display: block; width: min(69%, 300px); max-height: 335px; object-fit: contain; border-radius: 9px; box-shadow: 0 21px 42px #2e0f2840; }
.feature-photo .bundled-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; }
.bag-placeholder { width: 58px; height: 83px; }
.bag-placeholder::after { border-width: 2px; }
.feature-info { padding: clamp(25px, 4.5vw, 49px); }
.feature-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.feature-title h2 { font-size: clamp(39px, 5.5vw, 65px); overflow-wrap: anywhere; }
.dial { display: grid; justify-items: center; align-content: center; flex: 0 0 92px; min-height: 83px; padding: 8px; border: 1px solid #e7cfd5; border-radius: 11px; background: var(--rose); color: var(--wine-dark); }
.dial span { font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.dial strong { font: 43px/.98 var(--serif); }
.dial-unavailable strong { margin-top: 5px; font: 700 14px/1.15 var(--sans); text-align: center; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; }
.tags li { padding: 4px 10px; border-radius: 999px; background: #f1e7db; color: #553f33; font-size: 12px; font-weight: 600; }
.description { margin: 15px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 13px 25px; margin: 19px 0 0; }
.facts div { max-width: 100%; }
.facts dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 550; font-size: 13px; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.source { font-size: 13px; font-weight: 650; padding: 7px 3px; text-underline-offset: 3px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 13px; }
.section-top h2 { font-size: 35px; }
.section-top .eyebrow { margin-bottom: 4px; }
.reviews { margin-top: 35px; }
.collection { padding-top: 17px; border-top: 1px solid var(--line); }
.back-to-collection { display: inline-block; margin: 0 0 14px; font-weight: 650; text-decoration: none; }
.back-to-collection:hover { text-decoration: underline; }
.reviews { border-bottom: 1px solid var(--line); padding-bottom: 26px; }
#review-summary { color: var(--muted); font-size: 13px; }
.empty, .review { margin: 0; padding: 15px 18px; border: 1px dashed #decfc1; border-radius: 10px; color: var(--muted); background: #fcf8f0; }
.review { border-style: solid; margin-top: 8px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; }
.review-head strong { color: var(--wine); letter-spacing: .08em; }
.review-head span, .review-head time { font-size: 13px; }
.review-author { color: var(--ink); font-weight: 700; }
.review p { margin: 8px 0 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.search { position: relative; display: flex; align-items: center; width: min(36%, 262px); }
.search span { position: absolute; left: 13px; width: 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search span::after { content: ""; height: 6px; width: 1.5px; position: absolute; top: 8px; left: 10px; background: var(--muted); transform: rotate(-45deg); }
.search input { padding-left: 34px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid > .empty { grid-column: 1 / -1; }
.coffee-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.coffee-card:hover { border-color: #b78391; box-shadow: 0 5px 16px #61283d14; }
.coffee-card:hover h3 { color: var(--wine); }
.card-photo { display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 30%, #926174, #583047 75%); }
.card-photo::before { content: ""; position: absolute; width: 61%; aspect-ratio: 1; border: 1px solid #f9d5ca42; border-radius: 50%; z-index: -1; }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card-photo img:not(.is-loaded), .feature-photo img:not(.is-loaded) { position: absolute; visibility: hidden; }
.card-photo .bundled-photo { object-fit: cover; }
.card-photo .bag-placeholder { width: 39px; height: 56px; }
.styled-bag {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--bag-color), black 39%), color-mix(in srgb, var(--bag-color), white 50%)) top / 100% 66.67% no-repeat,
    var(--bag-color);
}
.styled-bag::before, .styled-bag::after { content: none; }
.feature-photo.styled-bag img, .card-photo.styled-bag img {
  position: absolute;
  inset: 7% 9% auto;
  width: 82%;
  height: 86%;
  max-height: none;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(-10px 13px 8px #22162553);
}
.card-body { display: flex; flex: 1; flex-direction: column; padding: clamp(12px, 2vw, 20px); }
.card-roaster { margin: 0 0 5px; color: var(--wine); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.card-body h3 { margin-bottom: 12px; font-size: clamp(22px, 3vw, 34px); overflow-wrap: anywhere; }
.card-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; font-size: 12px; }
.card-grind { padding: 3px 7px; border-radius: 5px; background: var(--rose); color: var(--wine-dark); font-weight: 700; }
.card-roast { color: var(--muted); }
.card-rating { margin-left: auto; color: var(--wine); font-weight: 700; }
main.wrap { padding-bottom: 32px; }
#notice { margin: 0 0 14px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
dialog { width: min(620px, calc(100% - 28px)); max-height: min(90vh, 820px); border: 1px solid var(--line); border-radius: 16px; padding: 23px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #311c28a8; }
#review-dialog { max-width: 500px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.dialog-head h2 { font-size: 34px; }
.close { border: 0; border-radius: 6px; width: 36px; height: 36px; font-size: 24px; color: var(--wine); background: var(--rose); }
.import-box { padding: 12px; background: #f3e9df; border-radius: 8px; margin-bottom: 16px; }
.import-row { display: flex; gap: 8px; align-items: center; }
.import-replace { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.import-replace input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--wine); }
form label, legend { font-size: 13px; font-weight: 650; }
form small { color: var(--muted); font-weight: 450; }
input, select, textarea { color: var(--ink); background: #fffdfa; border: 1px solid #d9c9be; border-radius: 7px; display: block; width: 100%; min-height: 42px; padding: 8px 10px; }
textarea { resize: vertical; }
form input, form select, form textarea { margin-top: 4px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 13px; }
.wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 16px; }
.danger { margin-right: auto; color: #982f39; border-color: #edc6c8; background: #fff7f7; }
.form-error { color: #8c2430; margin: 8px 0 0; }
.reviewing { color: var(--muted); margin: 0 0 14px; }
#review-form > label { display: block; margin-top: 12px; }
.reviewer-field { margin-bottom: 12px; }
.rating-input { border: 0; margin: 0; padding: 0; }
.rating-options { margin-top: 5px; display: flex; gap: 6px; }
.rating-options label { position: relative; }
.rating-options input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.rating-options span { display: block; border: 1px solid #d9c9be; border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.rating-options input:checked + span { background: var(--wine); color: white; border-color: var(--wine); }
.rating-options input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 34px); }
  .topbar-inner { min-height: 65px; justify-content: space-between; }
  .machine { display: none; }
  .masthead { padding-top: 30px; align-items: start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .feature { grid-template-columns: 1fr; }
  .feature-photo { min-height: 280px; }
  .feature-photo::before { width: 250px; }
  .feature-photo::after { width: 218px; }
  .feature-photo img { width: min(56%, 220px); max-height: 244px; }
  .feature-photo .bundled-photo { position: static; width: min(76%, 248px); height: auto; border-radius: 8px; }
  .feature-info { padding: 22px; }
}
@media (max-width: 440px) {
  .masthead { flex-direction: column; gap: 16px; }
  .totals { gap: 16px; }
  .totals div { padding-left: 10px; }
  .totals strong { font-size: 25px; }
  .section-top h2 { font-size: 29px; }
  .search { width: min(42%, 160px); }
  .grid { gap: 9px; }
  .card-facts { gap: 4px 7px; }
  .fields { grid-template-columns: 1fr; }
  .import-row { align-items: stretch; flex-direction: column; }
}
