:root {
  --ink: #1d2d24;
  --moss: #315f3e;
  --fern: #6f9871;
  --paper: #fbf8f0;
  --cream: #f0eadc;
  --clay: #bd684b;
  --sun: #e2ae50;
  --line: #d9d0bf;
  --muted: #677168;
  --shadow: 0 22px 52px rgba(40, 52, 39, .12);
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Georgia, serif;
  --sans: Avenir Next, Gill Sans, Trebuchet MS, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.eyebrow { margin: 0 0 .65rem; color: var(--moss); font-size: .71rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.6; }
.lede { font-family: var(--serif); font-size: 1.18rem; line-height: 1.55; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 2.85rem; padding: .75rem 1.05rem; border: 1px solid transparent; border-radius: 0; font-weight: 700; letter-spacing: .01em; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(36, 50, 39, .15); }
.button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.button--primary { color: #fff; background: var(--moss); }
.button--dark { color: #fff; background: var(--ink); }
.button--outline { color: var(--ink); background: transparent; border-color: var(--ink); }
.button--large { min-height: 3.4rem; padding: 1rem 1.4rem; }
.text-button { padding: .3rem; border: 0; color: var(--moss); background: none; font-weight: 700; }
.notice { margin: 1.1rem 0; padding: .8rem .9rem; border-left: 3px solid var(--sun); background: #fff9e8; line-height: 1.45; }
.notice--error { border-color: #a93d2b; background: #fff0eb; color: #712718; }
.notice--soft { border-color: var(--fern); }
.feedback { min-height: 1.2rem; margin-top: 1rem; color: var(--moss); line-height: 1.45; }
.feedback[data-state="error"] { color: #9b3525; }
.feedback[data-state="success"] { color: var(--moss); }

.login-shell { display: grid; min-height: 100vh; padding: clamp(1.5rem, 6vw, 6rem); place-content: center; background: radial-gradient(circle at 14% 18%, rgba(226, 174, 80, .2), transparent 22rem), linear-gradient(130deg, #f8f2e4 0%, #fffdfa 60%, #edf4e9 100%); }
.login-shell::before { position: fixed; inset: 0; z-index: -1; opacity: .3; background-image: radial-gradient(rgba(49, 95, 62, .32) .6px, transparent .6px); background-size: 7px 7px; content: ''; pointer-events: none; }
.login-card { width: min(100%, 31rem); padding: clamp(2rem, 6vw, 4rem); border: 1px solid var(--line); background: rgba(255, 253, 248, .86); box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 4.9rem); font-weight: 400; letter-spacing: -.06em; }
.stack-form { display: grid; gap: .65rem; margin-top: 1.8rem; }
.stack-form label, .lookup-form label, .review-label { font-size: .88rem; font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]), textarea { width: 100%; border: 1px solid #bdb5a5; border-radius: 0; background: #fffefa; color: var(--ink); padding: .78rem .85rem; }
textarea { resize: vertical; }
.login-footnote { margin: 1.5rem auto 0; color: var(--muted); font-size: .82rem; text-align: center; }

.desk-header { display: flex; align-items: center; justify-content: space-between; min-height: 4.6rem; padding: 0 clamp(1.25rem, 4vw, 4.4rem); border-bottom: 1px solid rgba(217, 208, 191, .85); background: rgba(251, 248, 240, .92); }
.brand { display: inline-flex; align-items: baseline; gap: .45rem; color: var(--ink); font-family: var(--serif); font-size: 1.22rem; font-weight: 700; text-decoration: none; }
.brand em { color: var(--moss); font-family: var(--sans); font-size: .65rem; font-style: normal; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { color: var(--clay); font-family: var(--sans); font-size: 1.4rem; }
.desk-shell { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; padding: clamp(3.2rem, 7vw, 7rem) 0 5rem; }
.desk-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-bottom: 3.3rem; }
.desk-intro h1 { max-width: 14ch; margin: 0; font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 5.3rem); font-weight: 400; letter-spacing: -.065em; line-height: .96; }
.desk-intro h1 i, .review-hero h1 i, .thank-you-shell h1 i { color: var(--clay); font-weight: 400; }
.mode-chip { display: inline-flex; align-items: center; gap: .55rem; margin-top: .4rem; padding: .55rem .75rem; border: 1px solid var(--line); background: #f7f0e2; color: #735b37; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mode-chip--ready { border-color: #8bb08c; background: #edf6e9; color: var(--moss); }
.mode-dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.operator-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
.panel { position: relative; padding: clamp(1.5rem, 4vw, 2.75rem); border: 1px solid var(--line); background: #fffdf8; box-shadow: 0 12px 35px rgba(45, 58, 44, .06); }
.panel--invite { background: var(--ink); color: #f9f4e8; }
.panel--invite .eyebrow, .panel--invite .muted { color: #b9d6b7; }
.panel--invite .button--primary { background: var(--sun); color: var(--ink); }
.panel-number { position: absolute; top: 1.25rem; right: 1.4rem; color: rgba(49, 95, 62, .2); font-family: var(--serif); font-size: 3rem; line-height: 1; }
.panel--invite .panel-number { color: rgba(255, 255, 255, .13); }
.panel h2, .moderation-head h2 { max-width: 16ch; margin: 0 0 .75rem; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; line-height: 1.05; }
.lookup-form { margin-top: 1.5rem; }
.input-with-action { display: flex; gap: .65rem; margin-top: .5rem; }
.input-with-action input { min-width: 0; }
.field-hint { margin: .6rem 0 0; color: var(--muted); font-size: .82rem; }
.field-hint--light { color: #c6d9c2; }
.order-result { display: grid; gap: .8rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.order-summary { display: flex; justify-content: space-between; gap: 1rem; }
.order-summary strong { font-family: var(--serif); font-size: 1.25rem; }
.order-meta { color: var(--muted); font-size: .84rem; text-align: right; }
.product-picker { display: grid; gap: .65rem; margin: 1.3rem 0; }
.product-choice { display: flex; gap: .8rem; align-items: center; padding: .75rem; border: 1px solid rgba(255, 255, 255, .25); }
.product-choice input { width: 1rem; height: 1rem; accent-color: var(--sun); }
.product-choice img, .product-choice .small-placeholder { width: 2.8rem; height: 2.8rem; object-fit: cover; background: #e9dfc8; color: var(--moss); display: grid; place-items: center; }
.product-choice strong { display: block; }
.product-choice small { color: #c6d9c2; }
.confirmation { display: flex; align-items: flex-start; gap: .6rem; margin: 1.2rem 0; color: #e2ebdf; font-size: .88rem; line-height: 1.4; }
.confirmation input { width: 1.1rem; height: 1.1rem; margin-top: .12rem; accent-color: var(--sun); }
.moderation-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-top: clamp(4rem, 9vw, 8rem); }
.moderation-head h2 { max-width: none; }
.review-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.review-tile { display: grid; gap: .7rem; min-height: 13rem; padding: 1.25rem; border: 1px solid var(--line); background: #fffdf8; }
.review-tile h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.review-stars { color: var(--sun); letter-spacing: .08em; }
.review-copy { margin: 0; color: #455149; line-height: 1.5; white-space: pre-wrap; }
.review-foot { display: flex; justify-content: space-between; gap: .7rem; margin-top: auto; color: var(--muted); font-size: .76rem; }
.photo-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-links a { color: var(--moss); font-size: .8rem; font-weight: 700; }
.empty-state { grid-column: 1 / -1; margin: 0; padding: 2.4rem; border: 1px dashed var(--line); color: var(--muted); text-align: center; }

.review-shell { min-height: 100vh; padding-bottom: 5rem; background: radial-gradient(circle at 88% 8%, rgba(226, 174, 80, .22), transparent 25rem), var(--paper); }
.review-header { display: flex; align-items: center; justify-content: space-between; width: min(100% - 2.5rem, 1040px); margin: 0 auto; padding: 1.4rem 0; border-bottom: 1px solid rgba(217, 208, 191, .8); color: var(--muted); font-size: .8rem; }
.brand--review { font-size: 1rem; }
.review-hero { width: min(100% - 2.5rem, 820px); margin: clamp(3.5rem, 9vw, 8rem) auto clamp(2.6rem, 5vw, 4rem); text-align: center; }
.review-hero h1, .thank-you-shell h1 { margin: 0; font-family: var(--serif); font-size: clamp(3.1rem, 8vw, 6.4rem); font-weight: 400; letter-spacing: -.07em; line-height: .92; }
.review-hero > p:last-child { max-width: 52ch; margin: 1.6rem auto 0; color: #526056; font-family: var(--serif); font-size: 1.16rem; line-height: 1.55; }
.review-form { width: min(100% - 2.5rem, 760px); margin: 0 auto; }
.review-card { margin: 1rem 0; padding: clamp(1.25rem, 4vw, 2.1rem); border: 1px solid var(--line); background: #fffefa; box-shadow: 0 13px 32px rgba(52, 60, 44, .05); }
.review-product { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.review-product img, .product-placeholder { width: 4.3rem; height: 4.3rem; flex: 0 0 auto; object-fit: cover; background: #efe5ce; color: var(--moss); display: grid; place-items: center; font-size: 1.7rem; }
.product-title { margin: 0; font-family: var(--serif); font-size: 1.52rem; line-height: 1.1; }
.product-variant { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; }
.star-fieldset { margin: 0 0 1.15rem; padding: 0; border: 0; }
.star-fieldset legend { margin-bottom: .45rem; font-size: .88rem; font-weight: 700; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; }
.stars input { position: absolute; opacity: 0; }
.stars label { color: #ddd5c4; font-size: 2rem; line-height: 1; cursor: pointer; transition: color 120ms ease, transform 120ms ease; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--sun); }
.stars label:hover { transform: scale(1.13); }
.review-label { display: block; margin-bottom: .45rem; }
.review-label span { color: var(--muted); font-weight: 400; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-picker { display: inline-flex; align-items: center; gap: .35rem; margin-top: .85rem; color: var(--moss); font-size: .85rem; font-weight: 700; cursor: pointer; }
.photo-picker span { font-size: 1.3rem; }
.review-submit { margin-top: 1.8rem; padding: 1.3rem 0; text-align: center; }
.review-submit .muted { max-width: 52ch; margin: 0 auto 1rem; font-size: .86rem; }
.thank-you-shell { display: grid; min-height: 100vh; padding: clamp(2rem, 8vw, 7rem) 1.25rem; place-content: center; background: radial-gradient(circle at 10% 20%, rgba(226, 174, 80, .25), transparent 20rem), linear-gradient(140deg, #f9f4e8, #fffdfa 60%, #e7f0e3); text-align: center; }
.thank-you-shell > p { max-width: 48ch; margin: 1.5rem auto; color: #506056; font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; }
.thanks-star { margin: .7rem auto; color: var(--clay); font-size: 3rem; }
.reward-code { display: grid; gap: .35rem; width: min(100%, 24rem); margin: 2rem auto; padding: 1.5rem; border: 1px dashed var(--moss); background: rgba(255, 254, 250, .78); }
.reward-code span { color: var(--moss); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.reward-code strong { font-family: var(--serif); font-size: 1.8rem; letter-spacing: .08em; }
.reward-code small { color: var(--muted); }

@media (max-width: 760px) {
  .desk-intro, .moderation-head { align-items: flex-start; flex-direction: column; }
  .operator-grid { grid-template-columns: 1fr; }
  .input-with-action { align-items: stretch; flex-direction: column; }
  .mode-chip { margin-top: 0; }
  .review-header { align-items: flex-start; gap: .8rem; flex-direction: column; }
  .review-hero h1, .thank-you-shell h1 { letter-spacing: -.055em; }
}
