body {
  --ink: #22241f;
  --muted: #5d5a50;
  --line: #e8e0d2;
  --warm: #f5f0e6;
  --paper: #fffefa;
  --gold: #d39b42;
  --link: #704b19;
  margin: 0;
  padding: clamp(10px, 4vw, 38px);
  background: #f8f6f1;
  font: 15px/1.5 system-ui, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.shell {
  width: min(100%, 560px);
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  background: var(--warm);
  color: var(--ink);
  color-scheme: light;
  container-type: inline-size;
  box-shadow: 0 6px 24px rgb(63 45 20 / .05);
}
.shell:has(.history-panel) { width: min(100%, 690px); }
.brand {
  padding: 9px clamp(16px,4vw,26px);
  border-bottom: 1px solid #e7d6b9;
  background: var(--paper);
}
.brand-home {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font: 800 clamp(26px, 6vw, 31px)/1 Arial, sans-serif;
  letter-spacing: -.045em;
}
.brand b, .brand svg { color: #a76304; }
.brand svg { width: 1em; height: 1em; flex: none; }
main { padding: clamp(12px,4vw,24px); }
.panel {
  padding: clamp(17px,4vw,26px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.panel + .panel { margin-top: 14px; }
h1 { margin: 0 0 8px; color: var(--ink); font: 500 clamp(32px,7vw,42px)/1.05 Georgia, serif; letter-spacing: -.045em; }
h2 { margin: 0 0 6px; color: var(--ink); font: 680 18px/1.25 system-ui, sans-serif; letter-spacing: -.02em; }
p { margin: 0 0 15px; }
.intro { margin-bottom: 18px; }
.intro p { max-width: 32ch; margin-bottom: 0; }
.muted { color: var(--muted); }
.email-value { overflow-wrap: anywhere; }
label { display: block; margin-bottom: 5px; font-weight: 650; }
input[type="email"],
.primary,
.secondary {
  min-height: 46px;
  border-radius: 7px;
  font: inherit;
}
input[type="email"] { width: 100%; padding: 10px 12px; border: 1px solid #a49b8b; background: white; color: var(--ink); font-size: 16px; }
.primary,
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; font-weight: 650; }
.primary { width: 100%; margin-top: 10px; border: 1px solid #22241f; background: #22241f; color: #fffaf1; }
.primary:hover { background: #393c33; }
.primary svg { width: 16px; height: 16px; color: #edbb64; }
.secondary { border: 1px solid #d9bf8e; background: #fff7e5; color: #503711; text-align: left; }
.secondary svg { flex: none; width: 16px; height: 16px; }
.text-action {
  min-height: 44px;
  margin: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: .16em;
  font: inherit;
}
.status-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 0 13px;
  border: 1px solid #ead9b5;
  border-radius: 50%;
  background: #faf1de;
  color: #79511b;
}
.status-icon svg { width: 20px; height: 20px; }
.lookup { display: grid; grid-template-columns: 23px 1fr; gap: 12px; align-items: center; }
.lookup h2 { margin: 0; }
.spinner { width: 23px; height: 23px; border: 2px solid #e9d6af; border-top-color: #8b5b15; border-right-color: #8b5b15; border-radius: 50%; animation: ds-koeb-spin .8s linear infinite; }
.progress-track { grid-column: 1/-1; height: 4px; border-radius: 4px; background: #efe1c4 linear-gradient(90deg,#be8d33,#d9a950) no-repeat left/35% 100%; animation: ds-koeb-progress 1.2s ease-in-out infinite alternate; }
.result-title { margin: 0 0 15px; padding: 2px 1px 0; }
.history-title-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.history-title-bar .result-title { margin: 0; }
.history-logout {
  min-height: 44px;
  flex: none;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--link);
  font: 600 14px/1.4 system-ui,sans-serif;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.order-panel { position: relative; border-color: #38382f; background: #292a23; color: #fff9ed; }
.order-panel h2 { color: inherit; }
.order-panel .muted { color: #ede4d5; }
.order-head { display: flex; gap: 11px; align-items: flex-start; justify-content: space-between; }
.order-head svg { width: 23px; height: 23px; flex: none; color: #e8ba71; }
.order-meta { margin: 0 0 12px; color: #e1d7c6; font-size: 13px; }
.order-state { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 4px 9px; border-radius: 20px; background: #464236; color: #fff1d4; font-size: 13px; font-weight: 650; }
.order-state::before,
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.order-state::before { color: #e7b76b; }
.order-panel .secondary { border-color: #edc480; background: #f7d291; color: #2f2112; }
.order-panel .secondary:hover { background: #ffe0a8; }
.order-action { display: block; }
.order-action p { margin-bottom: 0; }
.history-head { margin-bottom: 4px; }
.history-head h2 { margin: 0; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 11px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 13px; font-weight: 650; color: var(--muted); }
th:first-child, td:first-child { width: 89px; padding-right: 7px; }
td:first-child { white-space: nowrap; color: var(--muted); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
td:last-child { overflow-wrap: anywhere; }
.history-item { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 12px; align-items: start; }
.history-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #e9e4da;
  border-radius: 6px;
  background: #f9f6ef;
  color: #857352;
}
.history-photo svg { width: 19px; height: 19px; }
.history-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: white; }
.history-product { min-width: 0; }
.item-link { color: var(--ink); text-decoration: none; font-weight: 650; }
.item-link:hover, .item-link:focus-visible { text-decoration: underline; text-underline-offset: .15em; }
.stock { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.history-buy {
  display: block;
  min-height: 44px;
  margin-top: 7px;
  padding: 5px 11px;
  border: 1px solid #d7c5a8;
  border-radius: 6px;
  background: #fbf4e7;
  color: #513916;
  font: 650 13px/1.25 system-ui,sans-serif;
}
.history-buy:hover { border-color: #a9824f; background: #f6e9d2; }
.history-buy[aria-disabled="true"] { cursor: wait; opacity: .7; }
.history-buy-result { margin-top: 4px; font-size: 13px; color: var(--muted); }
.history-buy-result:empty { margin-top: 0; }
.history-buy-result[data-state="success"] { color: #245a3a; font-weight: 650; }
.history-buy-result[data-state="warning"] { color: #793f25; }
.history-buy-result a { display: inline-flex; align-items: center; min-height: 34px; color: inherit; text-underline-offset: .16em; }
@media (max-width: 450px) {
  .history-panel { padding-inline: 12px; }
  .history-panel th:first-child, .history-panel td:first-child { width: 72px; }
  .history-panel td:first-child { font-size: 11px; }
  .history-item { grid-template-columns: 39px minmax(0,1fr); gap: 8px; }
  .history-product { font-size: 14px; line-height: 1.4; }
}
:focus-visible { outline: 2px solid #77501a; outline-offset: 3px; }
.result-title[tabindex="-1"]:focus { outline: none; }
@keyframes ds-koeb-spin { to { transform: rotate(360deg); } }
@keyframes ds-koeb-progress { to { background-position: right; } }
@media (prefers-reduced-motion: reduce) {
  .spinner, .progress-track { animation: none; }
}
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .65; }
a.secondary { text-decoration: none; }
.feedback { color: var(--link); margin: 12px 0 0; }

