@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lilita-one-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
}

:root {
  --cream: #F6EFE3;
  --paper: #FFFCF7;
  --ink: #1C140E;
  --muted: #6E5646;
  --line: #E4D3C0;
  --red: #D62828;
  --placeholder: #B3A292;
  --font-display: 'Lilita One', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; }
button, input { font: inherit; color: inherit; }

.icon { width: 18px; height: 18px; flex: none; }

.label { font-weight: 700; font-size: 14px; }
.muted { color: var(--muted); }

.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--ink); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.button .icon { width: 16px; height: 16px; }

.errorlist { margin: 0; padding: 0; list-style: none; color: var(--red); font-size: 13px; font-weight: 700; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.only-desktop { display: none; }

.notice {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 14px;
  background: var(--paper);
  font-weight: 700;
}

/* Order page */

.order-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 24px 32px;
}

.logo { width: 188px; height: auto; }
.product { width: 260px; text-align: center; }

.order, .order-column, .details { width: 100%; }
.order-column { display: flex; flex-direction: column; gap: 22px; }

.heading { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 37px; }
.subtitle { font-size: 14px; }

.order-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }

.field-quantity { gap: 10px; }
.field-quantity > .label { text-align: center; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.step[hidden] { display: none; }
.step-plus { border-color: var(--red); background: var(--red); color: #fff; }
.count { display: flex; flex-direction: column; align-items: center; }
.count-input {
  width: 2.2ch;
  min-width: 39px;
  height: 41px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 36px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.count-input::-webkit-inner-spin-button,
.count-input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.count-input:focus { outline: none; }
.unit { font-size: 12px; line-height: 16px; }

.field-heat { gap: 10px; }
.heat-header { display: flex; justify-content: space-between; align-items: center; }
.heat-value { color: var(--red); font-weight: 700; font-size: 13px; }
.heat-row, .heat-legend { display: flex; justify-content: space-between; align-items: center; }
.heat-legend { font-size: 12px; line-height: 16px; }
.heat-option { position: relative; cursor: pointer; }
.heat-option input { position: absolute; opacity: 0; pointer-events: none; }
.face {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
}
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.face::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--cream);
  border-radius: 50%;
}
.badge {
  position: relative;
  padding: 1px 7px;
  border-radius: 12px;
  background: rgb(28 20 14 / 0.8);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 21px;
}
.heat-option input:checked + .face::after { border-color: var(--red); }
.heat-option input:checked + .face .badge { background: var(--red); }
.heat-option input:focus-visible + .face { outline: 2px solid var(--ink); outline-offset: 2px; }

.submit { height: 54px; border-radius: 16px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.details { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.note { display: flex; flex-direction: column; gap: 6px; }
.note:last-child { gap: 10px; }
.note-body { font-size: 13px; line-height: 1.45; }
.tips { display: flex; flex-direction: column; gap: 10px; }
.tips li { position: relative; padding-left: 16px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.tips .tip-strong { color: var(--ink); font-weight: 700; }

/* Panel */

.panel-body { background: var(--paper); }
.panel { display: flex; flex-direction: column; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
  padding: 0 20px;
  background: var(--cream);
}
.panel-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.panel-logo { width: auto; height: 44px; }
.panel-title { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 30px; }
.panel-actions { display: flex; align-items: center; gap: 16px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.panel-main { display: flex; flex-direction: column; gap: 22px; padding: 20px 20px 28px; }

.section-title { font-weight: 700; font-size: 14px; }

.summary-header { display: flex; justify-content: space-between; align-items: center; }
.summary-inline-total { color: var(--red); font-weight: 700; font-size: 13px; }
.summary-table, .summary-table > ul { display: flex; flex-direction: column; gap: 22px; }
.columns {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid var(--line);
}
.summary-level { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.summary-face { width: 36px; height: 36px; border-radius: 50%; }
.summary-qty { font-family: var(--font-display); font-size: 22px; }

.add-button-wide { height: 48px; }

.orders-list { display: flex; flex-direction: column; gap: 22px; }
.orders > .section-title { margin-bottom: 22px; }
.order-row {
  display: grid;
  grid-template-columns: 1fr 36px;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.order-row > span, .order-row > time { grid-column: 1; }
.o-name { font-weight: 700; font-size: 15px; }
.o-meta { font-size: 13px; }
.o-phone { color: var(--muted); font-size: 13px; }
.o-date { color: var(--muted); font-size: 12px; }
.o-delete { grid-column: 2; grid-row: 1 / span 4; }
.delete-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--red);
  cursor: pointer;
}
.delete-button .icon { width: 16px; height: 16px; }
.orders-empty { padding: 12px 0; }

.add-card { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 460px; margin: 0 auto; }
.cancel-link { align-self: center; font-weight: 700; }

.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 400px;
  margin: 0 auto;
  padding: 48px 24px;
}
.login-logo { width: 120px; height: auto; }
.login-form { display: flex; flex-direction: column; gap: 20px; width: 100%; }

/* Desktop. The min-height keeps short laptop screens on the stacked layout,
   where the page can scroll, instead of clipping a fixed 100vh screen. */
@media (min-width: 1024px) and (min-height: 720px) {
  body { height: 100vh; overflow: hidden; }

  .only-desktop { display: block; }
  .only-phone { display: none; }

  .order-body { background: var(--paper); }
  .order-page {
    display: grid;
    grid-template-columns: 620fr 820fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 0;
    max-width: none;
    height: 100%;
    padding: 0;
  }
  .brand, .details { background: var(--cream); padding-left: 48px; padding-right: 48px; }
  .brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 40px;
    padding-bottom: 16px;
  }
  .logo { width: 232px; }
  .details { grid-column: 1; grid-row: 2; padding-top: 8px; padding-bottom: 40px; }

  .order {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 56px;
    background: var(--paper);
  }
  .order-column { width: 460px; gap: 18px; }
  .heading { gap: 18px; text-align: left; }
  .subtitle { font-size: 15px; }
  .field-quantity > .label { text-align: left; }
  .heat-row { justify-content: center; gap: 10px; }
  .heat-legend { align-self: center; width: 330px; }

  .panel { height: 100%; }
  .panel-header { flex: none; padding: 0 40px; }
  .panel-title { font-size: 28px; line-height: 32px; }
  .add-button { display: inline-flex; height: 44px; padding: 0 16px; border-radius: 12px; }

  .panel-main { flex: 1; min-height: 0; gap: 28px; padding: 32px 48px 40px; }
  .section-title { font-size: 16px; }

  .summary { display: flex; justify-content: space-between; align-items: center; flex: none; }
  .summary-table { width: 560px; }
  .summary-table, .summary-table > ul { gap: 0; }
  .columns { padding-top: 14px; }
  .summary-row { height: 48px; }
  .summary-face { width: 32px; height: 32px; }
  .summary-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .summary-total-number { font-family: var(--font-display); font-size: 64px; line-height: 73px; }

  .orders { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .orders > .section-title { margin-bottom: 4px; }
  .orders-head, .order-row {
    display: grid;
    grid-template-columns: 1fr 110px 160px 200px 160px 36px;
    column-gap: 40px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .orders-head { flex: none; height: 36px; color: var(--muted); font-weight: 700; font-size: 12px; }
  .num { text-align: right; }
  .orders-list { flex: 1; min-height: 0; overflow-y: auto; gap: 0; }
  .order-row { flex: none; height: 52px; padding: 0; font-size: 15px; }
  .order-row > span, .order-row > time { grid-column: auto; }
  .o-name { font-weight: 400; }
  .o-phone, .o-date { color: var(--ink); font-size: 15px; }
  .o-delete { grid-column: auto; grid-row: auto; }
  .delete-button { background: transparent; }
}
