@font-face { font-family: "DM Sans"; font-weight: 400; src: url(assets/fonts/dm-sans-400.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; src: url(assets/fonts/dm-sans-500.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; src: url(assets/fonts/dm-sans-600.woff2) format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: #fff; overflow: hidden; }
body { font-family: "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
p, h1 { margin: 0; }

/* ---------- Review shell (outside the machine frame) ---------- */

.shell { display: flex; height: 100vh; }
.shell.panel-hidden .panel-ui { display: none; }

.panel-ui {
  width: 340px; flex-shrink: 0; overflow-y: auto;
  padding: 28px 24px; display: flex; flex-direction: column; gap: 24px;
  background: #0c0c0c; border-right: 1px solid #222; font-size: 14px;
}
.ui-eyebrow { color: #8a8a8a; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ui-title { font-size: 22px; font-weight: 600; margin-top: 4px; }
.ui-sub { color: #a0a0a0; margin-top: 8px; line-height: 1.45; }

.ui-options { display: flex; flex-direction: column; gap: 6px; }
.ui-opt {
  text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #222; background: #121212; transition: border-color .15s, background .15s;
}
.ui-opt:hover { border-color: #3a3a3a; }
.ui-opt.is-active { border-color: #fff; background: #1b1b1b; }
.ui-opt-name { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 15px; }
.ui-opt-key { color: #777; font-weight: 500; font-size: 12px; min-width: 14px; }
.ui-opt-desc { display: block; color: #9a9a9a; margin-top: 4px; line-height: 1.4; font-size: 13px; }

.ui-group { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid #1e1e1e; }
.ui-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ui-label { color: #cfcfcf; }
.ui-check { cursor: pointer; }
.ui-check input { width: 18px; height: 18px; accent-color: #fff; }

.stepper { display: flex; align-items: center; border: 1px solid #333; border-radius: 999px; overflow: hidden; }
.stepper button { width: 34px; height: 30px; font-size: 18px; color: #ddd; }
.stepper button:hover { background: #1f1f1f; }
.stepper output { min-width: 26px; text-align: center; font-weight: 600; }

.ui-btn { padding: 11px 14px; border-radius: 10px; border: 1px solid #fff; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.ui-btn:hover { background: #1b1b1b; }
.ui-hint { color: #8a8a8a; line-height: 1.9; font-size: 13px; }
kbd { font: 600 11px/1 "DM Sans", sans-serif; padding: 3px 6px; border-radius: 5px; border: 1px solid #3a3a3a; background: #161616; color: #ddd; }

/* ---------- 9:16 stage ---------- */

.stage-area { position: relative; flex: 1; min-width: 0; background: #000; overflow: hidden; }
.stage-area:fullscreen { width: 100vw; height: 100vh; }
.stage {
  position: absolute; left: 50%; top: 50%;
  width: 1080px; height: 1920px;
  transform: translate(-50%, -50%) scale(var(--s, .4));
  transform-origin: center center;
}

/* ---------- Machine screen (design px at 1080 x 1920) ---------- */

.screen {
  position: relative; width: 1080px; height: 1920px; overflow: hidden;
  background: #121212; color: #fff;
  user-select: none; -webkit-user-select: none;
}

.banner { position: absolute; inset: 0 0 auto 0; height: 408px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-active { opacity: 1; }
.slide > img { width: 100%; height: 100%; object-fit: cover; }
.offer-btn {
  position: absolute; right: 3%; bottom: 18%;
  display: inline-flex; align-items: center; height: 75px; padding: 0 8px 0 24px;
  border-radius: 600px; border: 2px solid #fff; background: #fff; color: #000;
  font-size: 24px; font-weight: 600; white-space: nowrap;
}
.offer-btn img { width: 56px; height: 43px; margin-left: 4px; }

.content {
  position: absolute; top: 352px; left: 0; width: 1080px; height: 1568px;
  border: 3px solid #383838; border-bottom: 0; border-radius: 56px 56px 0 0;
  background: #121212; overflow-x: hidden; overflow-y: auto; padding-bottom: 64px;
  z-index: 2; scrollbar-width: none; overscroll-behavior: contain;
}
.content::-webkit-scrollbar { display: none; }

.topnav {
  position: sticky; top: 0; z-index: 10; height: 192px; padding: 48px 0;
  background: rgba(18, 18, 18, .7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.tabs {
  display: flex; align-items: center; width: 629px; height: 96px; margin-inline: auto;
  border: 2px solid #383838; border-radius: 600px;
}
.tab {
  flex: 1; height: calc(100% + 4px); margin: -2px 0; border-radius: 600px;
  border: 2px solid transparent; font-size: 32px; font-weight: 500; color: #BABABA;
}
.tab.is-active { border-color: #fff; background: #1B1B1B; color: #fff; }
.basket {
  position: absolute; right: 0; top: 48px; width: 136px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #383838; border-right: 0; border-radius: 600px 0 0 600px; background: #121212;
}

.list { display: flex; flex-direction: column; align-items: center; gap: 56px; padding: 0 0 176px; }

.local {
  position: relative; width: 888px; height: 132px; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; padding: 0 56px;
  border-radius: 9999px; background: url(assets/banners/hair-salons-bg.jpg) center / cover no-repeat;
  box-shadow: 0 24px 40px rgba(0, 0, 0, .6);
}
.local::before {
  content: ""; position: absolute; inset: 0 20% 0 0; pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}
.local-row { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.local-name { display: flex; align-items: center; gap: 12px; font-size: 32px; }
.local-name img { width: 33px; height: 33px; }
.local-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 63px; padding: 0 20px;
  border-radius: 600px; background: #fff; color: #000; font-size: 24px; font-weight: 500;
}
.local-btn svg { width: 24px; height: 24px; }

/* Section card (shared) */
.sec-wrap { width: 100%; padding-inline: 96px; }
.card {
  position: relative; width: 100%; overflow: hidden;
  border-radius: 40px; padding: 32px 40px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, .6);
}
.card-inner { display: flex; flex-direction: column; gap: 40px; width: 100%; }
.card-head { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.card-head > img { width: 32px; height: 32px; flex-shrink: 0; }
.card-title {
  font-size: 32px; font-weight: 500; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-meta { margin-left: auto; flex-shrink: 0; color: #BABABA; font-size: 24px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card-meta svg { width: 24px; height: 24px; }

/* Baseline: today's 3-column grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; justify-items: center; align-items: start; }
.gtile { width: 269px; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.gtile-img { width: 100%; height: 172px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 10.5px 8.7px rgba(0, 0, 0, .6)); }
.gtile-img img { width: 100%; height: 100%; object-fit: contain; }
.gtile-label { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 16px; max-width: 100%; }
.gtile-label img { width: 21px; height: 21px; flex-shrink: 0; }
.gtile-label span {
  font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.72px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Horizontal rail (all options).
   Tile width = (visible width - 4 gaps) / 4.5, so exactly 4 tiles plus half of the 5th show.
   Visible width = rail content box (100%) + right padding, because the rail is clipped at its right edge. */
.rail {
  --pad-l: 40px; --pad-r: 40px; --gap: 16px;
  display: flex; gap: var(--gap); align-items: flex-start;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad-l) var(--pad-r);
  overscroll-behavior-x: contain; scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.tile {
  flex: 0 0 calc((100% + var(--pad-r) - 4 * var(--gap)) / 4.5);
  min-width: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
}
.tile-img { width: 100%; aspect-ratio: 1.5625; filter: drop-shadow(0 8px 7px rgba(0, 0, 0, .6)); }
.tile-img img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.tile-label {
  margin-top: 18px; width: 100%; padding: 0 4px; text-align: center;
  font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.72px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* A · Card rail */
.v-a .rail { margin-inline: -40px; }

/* B · Edge bleed */
.v-b .sec-wrap { padding-right: 0; }
.v-b .card { border-radius: 40px 0 0 40px; padding: 32px 0 32px 40px; }
.v-b .rail { --gap: 20px; margin-left: -40px; }

/* C · Tile chips */
.v-c .card { padding: 28px 32px; }
.v-c .card-inner { gap: 24px; }
.v-c .rail { --pad-l: 32px; --pad-r: 32px; --gap: 14px; margin-inline: -32px; align-items: stretch; }
.v-c .tile {
  justify-content: flex-start; padding: 14px 10px 16px; border-radius: 28px;
  background: rgba(255, 255, 255, .07); border: 2px solid rgba(255, 255, 255, .08);
}
.v-c .tile-label { margin-top: 12px; }

/* D · Open rails */
.v-d .sec-wrap { padding-inline: 0; }
.v-d .card { background: none !important; box-shadow: none; border-radius: 0; padding: 0; overflow: visible; }
.v-d .card-inner { gap: 24px; }
.v-d .card-head { padding-inline: 96px; }
.v-d .rail { --pad-l: 96px; --pad-r: 96px; --gap: 24px; padding-bottom: 8px; }
.v-d .tile-img {
  padding: 14px; border-radius: 32px; background: var(--sec-bg);
  border: 2px solid rgba(255, 255, 255, .08); box-shadow: 0 16px 28px rgba(0, 0, 0, .5);
  filter: none;
}
.v-d .tile-img img { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)); }
.v-d .tile-label { margin-top: 14px; }

/* E · Tabbed sections */
.v-e .card { padding: 32px 40px; transition: background .3s; }
.v-e .card-inner { gap: 32px; }
.sec-tabs { display: flex; gap: 12px; }
.sec-tab {
  display: inline-flex; align-items: center; gap: 10px; height: 64px; padding: 0 24px 0 18px;
  border-radius: 600px; border: 2px solid rgba(255, 255, 255, .2);
  font-size: 24px; font-weight: 500; color: #d6d6d6; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.sec-tab img { width: 28px; height: 28px; }
.sec-tab.is-active { background: #fff; color: #121212; border-color: #fff; }
.sec-tab.is-active img { filter: invert(1); }
.v-e .rail { margin-inline: -40px; }
.v-e .rail.is-entering .tile { animation: fadeIn .4s ease both; }
.v-e .rail.is-entering .tile:nth-child(2) { animation-delay: .03s; }
.v-e .rail.is-entering .tile:nth-child(3) { animation-delay: .06s; }
.v-e .rail.is-entering .tile:nth-child(4) { animation-delay: .09s; }
.v-e .rail.is-entering .tile:nth-child(n+5) { animation-delay: .12s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Footer chrome */
.footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 32px 0;
  background: rgba(18, 18, 18, .7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.a11y {
  width: 104px; height: 104px; border-radius: 9999px; border: 2px solid #383838;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px);
}
.a11y img { width: 70%; height: 70%; object-fit: contain; }
.help {
  position: absolute; left: 24px; bottom: 32px; z-index: 21;
  display: inline-flex; align-items: center; gap: 4px; padding: 24px 40px 24px 24px;
  border-radius: 600px; background: #121212; outline: 2px solid #383838; outline-offset: -2px;
  color: #BABABA; font-size: 32px; font-weight: 500; line-height: 41.6px;
}

.fold-line {
  display: none; position: absolute; left: 0; right: 0; top: 1752px; z-index: 30; pointer-events: none;
  border-top: 4px dashed #ff3d8b;
}
.fold-line span {
  position: absolute; right: 24px; bottom: 10px; padding: 6px 14px; border-radius: 8px;
  background: #ff3d8b; color: #fff; font-size: 22px; font-weight: 600;
}
.screen.show-fold .fold-line { display: block; }

.toast {
  position: absolute; left: 50%; top: 40px; z-index: 40; transform: translate(-50%, -20px);
  padding: 18px 32px; border-radius: 600px; background: rgba(0, 0, 0, .85); border: 2px solid #444;
  font-size: 30px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
