:root {
  --cream: #f8eedb;
  --paper: #fffaf0;
  --ink: #2e1d14;
  --brown: #7a3f25;
  --rust: #b94d2f;
  --gold: #e6a84a;
  --green: #47704b;
  --line: rgba(70, 39, 22, .14);
  --shadow: 0 16px 50px rgba(75, 41, 21, .13);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { margin: 0; color: var(--ink); font-family: "DM Sans", sans-serif; background: radial-gradient(circle at 15% 0%, #fff9e9 0, transparent 32rem), var(--cream); }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.brand-bar { height: 92px; padding: 14px clamp(18px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,250,240,.88); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); transform: rotate(-3deg); }
.brand-mark svg { width: 43px; fill: var(--brown); stroke: var(--brown); stroke-width: 3; stroke-linecap: round; }
.brand-mark .seed { fill: none; stroke: var(--paper); }
.brand strong { display: block; font: 800 clamp(20px, 2.5vw, 28px)/1 "Fraunces", serif; }
.brand small { display: block; margin-top: 3px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brown); }
.source-pill, .source-tag { padding: 8px 13px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.progress-shell { height: 5px; background: rgba(122,63,37,.12); position: sticky; top: 92px; z-index: 11; }
.progress { height: 100%; background: var(--rust); transition: width .35s ease; }
.builder { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: clamp(36px, 6vw, 76px) 0 140px; }
.step { animation: rise .35s ease both; }
.step-count, .eyebrow { margin: 0 0 8px; color: var(--rust); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.step h1, .manage-header h1, .login-card h1 { margin: 0; font: 800 clamp(38px, 6vw, 70px)/.98 "Fraunces", serif; letter-spacing: -.035em; }
.step-note { margin: 14px 0 34px; color: #745d4d; font-size: clamp(16px, 2vw, 20px); }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.option { border: 2px solid transparent; border-radius: 22px; padding: 8px 8px 17px; background: var(--paper); box-shadow: 0 7px 25px rgba(75,41,21,.08); cursor: pointer; text-align: left; transition: transform .18s, border-color .18s, box-shadow .18s; }
.option:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.option.selected { border-color: var(--rust); box-shadow: 0 9px 30px rgba(185,77,47,.18); }
.photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: #e9d9bf; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo.contain { background: #fff; }
.photo.contain img { object-fit: contain; padding: 10px; }
.none-photo { display: grid; place-items: center; background: #eadbc5; }
.none-photo b { display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid var(--brown); border-radius: 50%; color: var(--brown); font: 700 34px "Fraunces", serif; }
.choice-symbol { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 16px; background: #eadbc5; color: var(--brown); font: 800 70px "Fraunces", serif; }
.choice-symbol i { position: absolute; top: 10px; right: 10px; display: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--rust); color: white; font: normal 700 16px "DM Sans", sans-serif; }
.selected .choice-symbol i { display: grid; }
.option:hover img { transform: scale(1.035); }
.photo i { position: absolute; top: 10px; right: 10px; display: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--rust); color: white; font-style: normal; box-shadow: 0 4px 12px #5228; }
.selected .photo i { display: grid; }
.option > strong { display: block; padding: 14px 9px 0; font-size: 17px; }
.group-title { margin: 34px 0 13px; font: 700 21px "Fraunces", serif; }
.group-title:first-of-type { margin-top: 0; }
.actions { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 14px; padding: 17px max(18px, calc((100vw - 1100px) / 2)); background: rgba(255,250,240,.9); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.primary, .secondary { min-height: 54px; padding: 0 28px; border-radius: 16px; border: 0; font-weight: 800; cursor: pointer; }
.primary { background: var(--rust); color: white; box-shadow: 0 8px 22px rgba(185,77,47,.24); }
.secondary { background: transparent; border: 1px solid var(--line); }
button:disabled { opacity: .36; cursor: not-allowed; }
.name-wrap { max-width: 700px; margin-top: 52px; }
.name-wrap input { width: 100%; border: 0; border-bottom: 3px solid var(--brown); padding: 12px 4px; background: transparent; outline: none; font: 800 clamp(40px, 7vw, 76px) "Fraunces", serif; color: var(--ink); }
.name-wrap input::placeholder { color: #bba995; }
.name-wrap span { display: block; margin-top: 15px; color: #806b5b; }
.review { overflow: hidden; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.review button { width: 100%; padding: 17px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 130px 1fr auto; gap: 20px; text-align: left; cursor: pointer; }
.review button:last-child { border: 0; }
.review span { color: #806b5b; }
.review em { color: var(--rust); font-style: normal; font-weight: 700; }
.tip-note { padding: 18px; border-radius: 16px; text-align: center; background: #f0dcae; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 100px; z-index: 30; transform: translate(-50%, 30px); padding: 13px 19px; border-radius: 99px; background: var(--ink); color: white; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.thanks { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; background: var(--cream); text-align: center; animation: fade .25s both; }
.thanks-mark { width: 100px; height: 100px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 55px; }
.thanks h1 { margin: 28px 0 6px; font: 800 clamp(52px, 9vw, 90px) "Fraunces", serif; }
.thanks p { color: #745d4d; font-size: 18px; }
.thanks .primary { margin-top: 18px; }
.thanks.ready { background: #e6f0df; }
.thanks.ready .thanks-mark { animation: pulseReady 1.1s ease both; }
.thanks.farewell { background: var(--cream); }
.thanks.farewell .thanks-mark { background: var(--rust); }

.manage-page { min-height: 100vh; background: #2d1c13; color: var(--paper); padding: max(22px, env(safe-area-inset-top)) 18px max(32px, env(safe-area-inset-bottom)); }
.login-card { width: min(420px, 100%); margin: 12vh auto 0; padding: 34px; border-radius: 28px; color: var(--ink); background: var(--paper); }
.mini-bun { font-size: 45px; }
.login-card h1 { font-size: 42px; }
.login-card form { margin-top: 30px; }
.login-card label { display: block; margin-bottom: 7px; font-weight: 700; }
.login-card input { width: 100%; padding: 15px; border: 2px solid #d8c6ae; border-radius: 14px; background: white; font-size: 28px; letter-spacing: .35em; text-align: center; }
.login-card .primary { width: 100%; margin-top: 12px; }
.error { color: #a52d20; min-height: 20px; text-align: center; }
#dashboard { width: min(680px, 100%); margin: 0 auto; }
.manage-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 2px 26px; }
.manage-header h1 { color: var(--paper); font-size: clamp(42px, 12vw, 68px); }
.live { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #cdbcae; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #6ac174; box-shadow: 0 0 0 5px #6ac17422; animation: pulse 1.8s infinite; }
.queue-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; color: #cdbcae; }
.queue-meta strong { color: var(--gold); font: 800 30px "Fraunces", serif; }
.orders { display: grid; gap: 16px; }
.order-card { overflow: hidden; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 12px 35px #140a0780; animation: rise .3s both; }
.order-card > header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 20px 13px; border-bottom: 1px solid var(--line); }
.order-card h2 { margin: 2px 0 0; font: 800 30px "Fraunces", serif; }
.order-number { color: var(--rust); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.source-tag { background: #ead4a5; color: var(--brown); }
.order-card ul { list-style: none; margin: 0; padding: 10px 20px; }
.order-card li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.order-card li:last-child { border: 0; }
.order-card li span { color: #846d5b; }
.order-card footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 19px; }
.order-card time { color: #846d5b; font-weight: 700; }
.done { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 17px; background: var(--green); color: white; font-weight: 800; }
.done i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: white; color: var(--green); font-style: normal; }
.order-card.leaving { animation: leave .28s both; }
.empty { padding: 58px 20px; border: 1px dashed #806452; border-radius: 24px; text-align: center; color: #cdbcae; }
.empty span { font-size: 45px; }
.empty h2 { margin: 12px 0 5px; color: var(--paper); font: 700 26px "Fraunces", serif; }
.empty p { margin: 0; }
.tip-page { min-height: 100vh; padding: clamp(22px, 5vw, 54px) 18px; background: radial-gradient(circle at 50% 0%, #fff8e8 0, transparent 34rem), var(--cream); }
.standalone-tip { width: min(590px, 100%); margin: 0 auto; }
.standalone-tip > .brand { width: fit-content; margin: 0 auto 28px; }
.standalone-tip .tip-card { position: relative; padding: clamp(26px, 6vw, 48px); border: 1px solid var(--line); border-radius: 32px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.standalone-tip h1 { margin: 0 0 24px; font: 800 clamp(38px, 8vw, 60px)/1 "Fraunces", serif; letter-spacing: -.035em; }
.tip-qr { display: block; width: min(330px, 86%); height: auto; margin: 0 auto 18px; border-radius: 18px; image-rendering: crisp-edges; }
.tip-number { width: fit-content; margin: 0 auto 18px; padding: 11px 18px; border-radius: 999px; background: #ead4a5; color: var(--brown); font-size: clamp(22px, 6vw, 30px); font-weight: 800; letter-spacing: .025em; user-select: all; }
.tip-copy { margin: 0 auto; color: #745d4d; font-size: 16px; line-height: 1.55; }
.tip-request { margin: 22px 0; padding: 18px; border-left: 4px solid var(--rust); border-radius: 4px 15px 15px 4px; background: #f3e3c5; text-align: left; font: 700 17px/1.45 "Fraunces", serif; }
.standalone-tip .primary { width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes leave { to { opacity: 0; transform: scale(.96) translateX(30px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px #6ac17400; } }
@keyframes pulseReady { 50% { transform: scale(1.12); box-shadow: 0 0 0 24px #47704b20; } }
@media (max-width: 620px) {
  .brand-bar { height: 76px; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-mark svg { width: 35px; }
  .brand small { display: none; }
  .progress-shell { top: 76px; }
  .builder { padding-top: 30px; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .option { border-radius: 17px; padding: 6px 6px 13px; }
  .photo { border-radius: 12px; }
  .option > strong { padding: 10px 6px 0; font-size: 14px; }
  .review button { grid-template-columns: 80px 1fr; gap: 8px; }
  .review em { display: none; }
  .actions { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .primary, .secondary { min-height: 50px; }
}
