/* Phin Sớm (quan-cafe 4.0): a street-corner phin café. Chalkboard green in a wooden frame, hand-written menu with dotted
   price leaders, taped polaroids, a paper order ticket. Fonts: Patrick Hand (chalk) + Be Vietnam Pro (text). */
:root {
  --board: #1f3d35;
  --board-deep: #183029;
  --chalk: #f2eee2;
  --chalk-dim: rgba(242, 238, 226, 0.68);
  --wood: #6e4b2e;
  --paper: #f5ecda;
  --ink: #2b2620;
  --orange: #de6a2a;
  --orange-deep: #b9521a;
  --k-font: 'Be Vietnam Pro', system-ui, sans-serif;
  --k-font-display: 'Patrick Hand', 'Be Vietnam Pro', sans-serif;
  --k-accent: #de6a2a;
  --k-accent-ink: #ffffff;
  --k-paper: #fbf6ea;
  --k-ink: #2b2620;
  --k-radius: 10px;
}

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.55), transparent 40%),
    repeating-linear-gradient(0deg, rgba(110, 75, 46, 0.035) 0 2px, transparent 2px 28px), var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--k-font);
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

/* Sign */
.sign {
  padding: 22px 16px 14px;
  text-align: center;
}
.sign-since {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6a58;
}
.sign-name {
  display: inline-block;
  margin: 2px 0 8px;
  font:
    400 52px/1 'Patrick Hand',
    cursive;
  color: var(--board);
  text-decoration: none;
  transform: rotate(-2deg);
}
.sign-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-weight: 600;
  font-size: 15px;
}
.sign-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
}
.sign-nav a:hover {
  border-color: var(--orange);
}
.sign-cart b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
}

/* Chalkboard */
.board {
  position: relative;
  margin: 0 12px;
  padding: 26px 18px 22px;
  border: 10px solid var(--wood);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.07), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, 0.05), transparent 50%), var(--board);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 10px 24px rgba(60, 40, 20, 0.25);
  color: var(--chalk);
}
.chalk-label {
  margin: 0;
  font:
    400 20px/1 'Patrick Hand',
    cursive;
  color: #f5b47e;
}
.chalk-title {
  margin: 6px 0 10px;
  font:
    400 40px/1.08 'Patrick Hand',
    cursive;
}
.chalk-sub {
  margin: 26px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--chalk-dim);
  font:
    400 26px/1.2 'Patrick Hand',
    cursive;
  color: #f5d37e;
}
.hero-lead {
  margin: 0 0 16px;
  color: var(--chalk-dim);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: 700 15px/1.2 var(--k-font);
  text-decoration: none;
  cursor: pointer;
}
.btn-orange {
  background: var(--orange);
  color: #fff;
}
.btn-orange:hover {
  background: var(--orange-deep);
}
.btn-ghost {
  border-color: var(--chalk-dim);
  background: transparent;
  color: var(--chalk);
}
.btn-line {
  border-color: var(--board);
  background: transparent;
  color: var(--board);
}
.btn-block {
  width: 100%;
}

/* Menu lines with dotted price leaders */
.lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: start;
  padding: 10px 0;
}
.line + .line {
  border-top: 1px dotted rgba(242, 238, 226, 0.2);
}
.line-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font:
    400 23px/1.2 'Patrick Hand',
    cursive;
  text-decoration: none;
}
.line-name span {
  flex: 0 1 auto;
  min-width: 0;
}
.line-name i {
  flex: 1 1 20px;
  min-width: 20px;
  border-bottom: 2px dotted var(--chalk-dim);
  transform: translateY(-5px);
}
.line-name b {
  flex: none;
  font-weight: 400;
  color: #f5d37e;
}
.line-short {
  grid-column: 1;
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--chalk-dim);
}
.line-add {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--chalk-dim);
  border-radius: 50%;
  background: transparent;
  color: var(--chalk);
  font: 400 24px/1 var(--k-font);
  cursor: pointer;
}
.line-add:hover {
  border-color: var(--orange);
  background: var(--orange);
}

/* Polaroids */
.polaroids {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
  margin: 34px 16px 10px;
}
.pola {
  position: relative;
  margin: 0;
  padding: 8px 8px 12px;
  background: #fffdf7;
  box-shadow: 0 8px 18px rgba(60, 40, 20, 0.2);
}
.pola::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 20px;
  background: rgba(240, 214, 150, 0.75);
  transform: translateX(-50%) rotate(-3deg);
}
.pola img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.pola figcaption {
  margin-top: 8px;
  font:
    400 19px/1.2 'Patrick Hand',
    cursive;
  text-align: center;
}
.pola-a {
  grid-column: 1 / -1;
  transform: rotate(-1.5deg);
}
.pola-b {
  transform: rotate(2deg);
}
.pola-c {
  transform: rotate(-2deg);
}

/* Paper notes */
.note,
.visit {
  margin: 30px 16px;
}
.note-title {
  margin: 0 0 10px;
  font:
    400 32px/1.15 'Patrick Hand',
    cursive;
  color: var(--board);
}
.note p {
  margin: 0 0 12px;
}
.note-more {
  font-weight: 700;
  color: var(--orange-deep);
}
.visit {
  display: grid;
  gap: 16px;
}
.visit-card {
  padding: 18px;
  border: 2px dashed rgba(110, 75, 46, 0.4);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.7);
}
.visit-address {
  margin: 0 0 10px;
  font-weight: 600;
}
.visit-hours {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.visit-hours li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(43, 38, 32, 0.25);
}
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.visit-map {
  min-height: 260px;
  overflow: hidden;
  border: 8px solid #fffdf7;
  box-shadow: 0 8px 18px rgba(60, 40, 20, 0.18);
}

/* Menu page */
.board-menu {
  margin-top: 6px;
}
.menu-cols {
  display: grid;
  gap: 4px 40px;
}
.menu-group .chalk-sub {
  margin-top: 22px;
}
.menu-foot {
  margin: 18px 16px 30px;
  text-align: center;
}
.menu-foot a {
  font-weight: 700;
  color: var(--orange-deep);
}

/* Detail */
.detail-wrap,
.order-wrap {
  padding: 0 16px 30px;
}
.back {
  display: inline-block;
  margin: 4px 0 16px;
  font-weight: 600;
  text-decoration: none;
}
.detail {
  display: grid;
  gap: 22px;
}
.pola-detail {
  transform: rotate(-1deg);
}
.detail-cat {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
}
.detail-name {
  margin: 2px 0 6px;
  font:
    400 42px/1.05 'Patrick Hand',
    cursive;
  color: var(--board);
}
.detail-price {
  margin: 0 0 12px;
  font-size: 18px;
}
.detail-price b {
  font-size: 24px;
  color: var(--orange-deep);
}
.detail-desc {
  margin: 0 0 14px;
}
.detail-attrs {
  margin: 0 0 16px;
}
.detail-attrs div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(43, 38, 32, 0.25);
}
.detail-attrs dt {
  color: #7a6a58;
}
.detail-attrs dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.detail-options {
  margin-bottom: 14px;
}
.detail-next {
  display: block;
  margin-top: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--orange-deep);
}
.board-small {
  margin: 0;
  padding-top: 8px;
}
.board-small .line-name {
  font-size: 21px;
}

/* Order ticket */
.order-wrap {
  display: grid;
  gap: 24px;
}
.ticket {
  position: relative;
  padding: 18px 16px 20px;
  background: #fffdf7;
  box-shadow: 0 6px 14px rgba(60, 40, 20, 0.14);
}
/* Torn bottom edge of the paper ticket. */
.ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 9px;
  background: radial-gradient(circle at 7px 0, #fffdf7 7px, transparent 7.5px) 0 0 / 14px 9px repeat-x;
}
.ticket-head {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(43, 38, 32, 0.3);
  font:
    400 24px/1.2 'Patrick Hand',
    cursive;
  text-align: center;
}
.ticket-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 1px dotted rgba(43, 38, 32, 0.25);
}
.tline-main {
  display: grid;
  min-width: 0;
}
.tline-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.tline-main small {
  color: #7a6a58;
}
.tline-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tline-qty button {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tline-total {
  grid-column: 2;
  text-align: right;
}
.tline-remove {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: #9c4a1d;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.ticket-empty {
  padding: 14px 0;
  text-align: center;
}
.ticket-empty a {
  font-weight: 700;
  color: var(--orange-deep);
}
.ticket-total {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 6px;
  font:
    400 26px/1 'Patrick Hand',
    cursive;
}
.order-hint {
  margin: 0 0 16px;
  color: #6c5d4c;
}

/* Footer */
.foot {
  margin-top: 30px;
  padding: 28px 16px 10px;
  background: var(--board-deep);
  color: var(--chalk);
}
.foot-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.foot-name {
  margin: 0 0 6px;
  font:
    400 34px/1 'Patrick Hand',
    cursive;
}
.foot p {
  margin: 0 0 8px;
}
.foot-hours {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  color: var(--chalk-dim);
}
.link-chalk {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #f5d37e;
  font: 700 15px/1.4 var(--k-font);
  text-decoration: underline;
  cursor: pointer;
}
.foot ~ .k-credit,
body > .k-credit {
  background: var(--board-deep);
  color: var(--chalk);
}

@media (min-width: 760px) {
  .sign-name {
    font-size: 72px;
  }
  .board {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 48px 34px;
  }
  .chalk-title {
    font-size: 58px;
  }
  .hero .lines {
    columns: 2;
    column-gap: 48px;
  }
  .hero .line {
    break-inside: avoid;
  }
  .polaroids,
  .note,
  .visit {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
  }
  .polaroids {
    grid-template-columns: 1.3fr 1fr 1fr;
    margin-top: 44px;
  }
  .pola-a {
    grid-column: auto;
  }
  .note {
    max-width: 720px;
    text-align: center;
  }
  .visit {
    grid-template-columns: 1fr 1.3fr;
  }
  .menu-cols {
    grid-template-columns: 1fr 1fr;
  }
  .detail-wrap,
  .order-wrap {
    max-width: 1080px;
    margin: 0 auto;
  }
  .detail {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .board-small {
    grid-column: 1 / -1;
  }
  .order-wrap {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}
