@font-face {
  font-family: "Noto Sans Thai Local";
  src: url("../fonts/NotoSansThai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai Local";
  src: url("../fonts/NotoSansThai-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --mi-bg: oklch(0.972 0.012 217);
  --mi-bg-strong: oklch(0.94 0.02 218);
  --mi-surface: oklch(0.995 0.004 220);
  --mi-surface-soft: oklch(0.962 0.018 214);
  --mi-ink: oklch(0.19 0.038 248);
  --mi-ink-soft: oklch(0.36 0.038 244);
  --mi-muted: oklch(0.49 0.036 238);
  --mi-line: oklch(0.84 0.033 222);
  --mi-line-strong: oklch(0.76 0.045 222);
  --mi-teal: oklch(0.49 0.119 219);
  --mi-teal-strong: oklch(0.39 0.121 223);
  --mi-cyan: oklch(0.69 0.123 211);
  --mi-amber: oklch(0.74 0.158 72);
  --mi-rose: oklch(0.58 0.19 21);
  --mi-emerald: oklch(0.62 0.14 157);
  --mi-indigo: oklch(0.53 0.14 274);
  --mi-slate: oklch(0.32 0.043 248);
  --mi-white: oklch(1 0 0);
  --mi-shadow-tight: 0 4px 8px oklch(0.2 0.04 245 / 0.1);
  --mi-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --mi-topbar-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mi-body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(to right, oklch(0.84 0.03 220 / 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.84 0.03 220 / 0.22) 1px, transparent 1px),
    linear-gradient(160deg, var(--mi-bg) 0%, var(--mi-white) 45%, var(--mi-bg-strong) 100%);
  background-size: 68px 68px, 68px 68px, auto;
  color: var(--mi-ink);
  font-family: "Noto Sans Thai Local", "Sarabun", system-ui, sans-serif;
  line-height: 1.6;
}

body.mi-body::selection {
  background: oklch(0.78 0.12 211 / 0.38);
}

body.mi-login-body {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 28px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

input::placeholder {
  color: oklch(0.37 0.036 238);
  opacity: 1;
}

:focus-visible {
  outline: 3px solid oklch(0.69 0.123 211 / 0.7);
  outline-offset: 3px;
}

.mi-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mi-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mi-page {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.mi-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--mi-topbar-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 calc(50% - 50vw);
  padding: 12px max(28px, calc((100vw - 1440px) / 2 + 28px));
  border-bottom: 1px solid oklch(0.84 0.033 222 / 0.84);
  background: oklch(0.995 0.004 220 / 0.9);
  backdrop-filter: blur(18px);
}

.mi-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.mi-brand__logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.mi-brand__copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.mi-brand__title {
  overflow: hidden;
  color: var(--mi-ink);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mi-brand__subtitle {
  overflow: hidden;
  color: var(--mi-muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mi-nav-pills {
  justify-self: center;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: var(--mi-surface);
}

.mi-nav-pills__link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--mi-ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms var(--mi-ease-out);
}

.mi-nav-pills__link:hover,
.mi-nav-pills__link.is-active {
  background: oklch(0.92 0.05 213);
  color: var(--mi-teal-strong);
}

.mi-nav-pills__link:hover {
  transform: translateY(-1px);
}

.mi-topbar__actions,
.mi-action-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mi-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--mi-line);
  border-radius: 7px;
  padding: 0 16px;
  background: var(--mi-surface);
  color: var(--mi-teal-strong);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: transform 180ms var(--mi-ease-out), color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.mi-button:hover {
  transform: translateY(-2px);
  border-color: var(--mi-cyan);
  background: oklch(0.95 0.037 214);
}

.mi-button--primary {
  border-color: var(--mi-teal-strong);
  background: var(--mi-teal-strong);
  color: var(--mi-white);
}

.mi-button--primary:hover {
  border-color: var(--mi-teal);
  background: var(--mi-teal);
}

.mi-button--compact {
  min-height: 40px;
  padding-inline: 13px;
}

.mi-section-label {
  display: block;
  margin: 0 0 10px;
  color: var(--mi-teal-strong);
  font-size: 0.98rem;
  font-weight: 700;
}

.mi-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid oklch(0.84 0.08 157);
  border-radius: 999px;
  background: oklch(0.95 0.04 157);
  color: oklch(0.32 0.11 157);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.mi-chip__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mi-emerald);
}

.mi-message-stack {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.mi-message {
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--mi-surface);
  color: var(--mi-ink);
  font-weight: 700;
}

.mi-message.success {
  border-color: oklch(0.78 0.08 157);
  background: oklch(0.95 0.045 157);
  color: oklch(0.32 0.11 157);
}

.mi-message.error,
.mi-message--error {
  border-color: oklch(0.81 0.08 24);
  background: oklch(0.96 0.04 24);
  color: oklch(0.42 0.15 24);
}

.shop-hero {
  min-height: calc(100svh - var(--mi-topbar-height));
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  align-items: center;
  gap: 42px;
  padding: 38px 0 54px;
}

.shop-hero h1,
.login-title {
  margin: 0;
  color: var(--mi-ink);
  letter-spacing: 0;
  text-wrap: balance;
}

.shop-hero h1 {
  max-width: 760px;
  font-size: 4.25rem;
  line-height: 1.05;
}

.shop-hero__lede {
  max-width: 65ch;
  margin: 20px 0 0;
  color: var(--mi-ink-soft);
  font-size: 1.12rem;
  text-wrap: pretty;
}

.shop-hero .mi-action-row {
  margin-top: 28px;
}

.shop-hero__logo {
  display: block;
  width: min(360px, 100%);
  max-height: 132px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 16px;
}

.shop-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.shop-summary__item {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--mi-line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--mi-surface);
  color: var(--mi-ink-soft);
  font-weight: 700;
  white-space: nowrap;
}

.shop-summary__item .mi-icon {
  color: var(--mi-teal-strong);
}

.shop-stage {
  position: relative;
  min-height: 650px;
  display: grid;
  align-content: center;
  gap: 18px;
  isolation: isolate;
}

.shop-stage::before,
.login-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.shop-stage::before {
  inset: 6% 4%;
  border: 1px solid oklch(0.79 0.05 222 / 0.6);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 46%, oklch(0.68 0.12 211 / 0.12) 46% 54%, transparent 54%),
    linear-gradient(180deg, oklch(0.995 0.004 220 / 0.78), oklch(0.93 0.026 220 / 0.7));
  transform: skewY(-2deg);
}

.shop-stage__ribbon {
  width: min(520px, 92%);
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: var(--mi-surface);
  box-shadow: var(--mi-shadow-tight);
  color: var(--mi-ink-soft);
  font-size: 0.94rem;
}

.shop-stage__ribbon strong {
  color: var(--mi-teal-strong);
}

.shop-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 18px;
}

.shop-orbit-tile,
.shop-feature-card,
.request-panel,
.product-card,
.login-panel,
.login-massive-tile {
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: var(--mi-surface);
  box-shadow: var(--mi-shadow-tight);
}

.shop-orbit-tile {
  --tile-color: var(--mi-teal);
  --tile-soft: oklch(0.94 0.05 218);
  position: relative;
  min-height: 214px;
  display: grid;
  align-content: end;
  justify-items: start;
  overflow: hidden;
  padding: 20px;
  background:
    linear-gradient(135deg, var(--tile-soft), var(--mi-surface) 54%),
    var(--mi-surface);
  color: var(--mi-ink);
  text-align: left;
  transform-style: preserve-3d;
  transition: transform 220ms var(--mi-ease-out), border-color 220ms ease, background-color 220ms ease;
}

.shop-orbit-tile:hover,
.shop-orbit-tile.is-active {
  transform: translateY(-4px);
  border-color: var(--tile-color);
}

.shop-orbit-tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--tile-color);
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 250ms var(--mi-ease-out);
}

.shop-orbit-tile:hover::after,
.shop-orbit-tile.is-active::after {
  transform: scaleX(1);
}

.shop-orbit-tile__icon {
  position: absolute;
  right: -18px;
  top: -10px;
  width: 174px;
  height: 174px;
  fill: none;
  stroke: var(--tile-color);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.24;
  transform: translateZ(24px);
  transition: opacity 220ms ease, transform 220ms var(--mi-ease-out);
}

.shop-orbit-tile:hover .shop-orbit-tile__icon,
.shop-orbit-tile.is-active .shop-orbit-tile__icon {
  opacity: 0.38;
  transform: translate3d(-6px, 8px, 34px) rotate(-3deg);
}

.shop-orbit-tile__label,
.massive-link-label {
  position: relative;
  z-index: 1;
  color: color-mix(in oklch, var(--tile-color) 70%, var(--mi-ink));
  font-size: 0.96rem;
  font-weight: 700;
}

.shop-orbit-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  color: var(--mi-ink);
  font-size: 1.42rem;
  line-height: 1.22;
}

.shop-orbit-tile small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--mi-ink-soft);
  font-size: 0.92rem;
}

.tile-cyan {
  --tile-color: var(--mi-teal);
  --tile-soft: oklch(0.94 0.045 214);
}

.tile-amber {
  --tile-color: var(--mi-amber);
  --tile-soft: oklch(0.96 0.055 82);
}

.tile-indigo {
  --tile-color: var(--mi-indigo);
  --tile-soft: oklch(0.95 0.04 276);
}

.tile-emerald {
  --tile-color: var(--mi-emerald);
  --tile-soft: oklch(0.95 0.05 157);
}

.tile-rose {
  --tile-color: var(--mi-rose);
  --tile-soft: oklch(0.95 0.035 24);
}

.shop-feature-card {
  position: relative;
  width: min(560px, 96%);
  justify-self: start;
  display: grid;
  grid-template-columns: minmax(160px, 0.72fr) minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 16px;
}

.shop-feature-card__ghost {
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 190px;
  height: 190px;
  fill: none;
  stroke: oklch(0.49 0.119 219 / 0.16);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.shop-feature-card__media {
  position: relative;
  aspect-ratio: 1 / 0.82;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, oklch(0.94 0.045 214), oklch(0.96 0.055 82)),
    var(--mi-surface-soft);
}

.shop-feature-card__media img,
.product-media img,
.mini-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-feature-card__empty,
.product-placeholder,
.mini-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  color: var(--mi-ink-soft);
  font-weight: 700;
  text-align: center;
}

.shop-feature-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 8px;
}

.shop-feature-card__body span {
  color: var(--mi-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.shop-feature-card__body h2 {
  margin: 0;
  color: var(--mi-ink);
  font-size: 1.18rem;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.shop-feature-card__price {
  color: var(--mi-teal-strong);
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1;
}

.mini-strip {
  width: min(560px, 96%);
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-item {
  min-height: 88px;
  overflow: hidden;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: var(--mi-surface);
}

.mini-placeholder {
  background: linear-gradient(135deg, oklch(0.94 0.045 214), oklch(0.95 0.04 276));
}

.request-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 0.85fr) minmax(300px, 1.15fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 20px;
  padding: 16px;
}

.request-panel__icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: oklch(0.95 0.04 157);
  color: oklch(0.32 0.11 157);
}

.request-panel__icon .mi-icon {
  width: 46px;
  height: 46px;
  stroke-width: 3.6;
}

.request-panel h2 {
  margin: 0 0 5px;
  color: var(--mi-ink);
  font-size: 1.12rem;
  line-height: 1.25;
}

.request-panel p {
  margin: 0;
  color: var(--mi-ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.request-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.mi-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--mi-white);
  color: var(--mi-ink);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mi-input:focus {
  border-color: var(--mi-cyan);
  box-shadow: 0 0 0 4px oklch(0.69 0.123 211 / 0.18);
}

.shop-controls {
  position: sticky;
  top: calc(var(--mi-topbar-height) + 10px);
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: oklch(0.995 0.004 220 / 0.9);
  backdrop-filter: blur(16px);
}

.search-box {
  position: relative;
  min-width: 0;
}

.search-box .mi-input {
  padding-left: 44px;
}

.search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 19px;
  height: 19px;
  color: var(--mi-teal-strong);
  transform: translateY(-50%);
  pointer-events: none;
}

.deal-filters,
.category-rail {
  display: inline-flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-button,
.category-button {
  min-height: 40px;
  border: 1px solid var(--mi-line);
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--mi-surface);
  color: var(--mi-ink-soft);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--mi-ease-out);
}

.filter-button:hover,
.category-button:hover {
  border-color: var(--mi-cyan);
  transform: translateY(-1px);
}

.filter-button.is-active {
  border-color: var(--mi-teal-strong);
  background: var(--mi-teal-strong);
  color: var(--mi-white);
}

.category-button.is-active {
  border-color: var(--mi-ink);
  background: var(--mi-ink);
  color: var(--mi-white);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
}

.section-title {
  margin: 0;
  color: var(--mi-ink);
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

.result-count {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--mi-line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--mi-surface);
  color: var(--mi-ink-soft);
  font-weight: 700;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  overflow: hidden;
  transition: transform 190ms var(--mi-ease-out), border-color 190ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--mi-cyan);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 0.84;
  overflow: hidden;
  background:
    linear-gradient(135deg, oklch(0.94 0.045 214), oklch(0.95 0.04 276)),
    var(--mi-surface-soft);
}

.product-media img {
  transition: transform 320ms var(--mi-ease-out);
}

.product-card:hover .product-media img {
  transform: scale(1.045);
}

.product-placeholder .mi-icon {
  width: 92px;
  height: 92px;
  color: oklch(0.49 0.119 219 / 0.35);
  stroke-width: 2.9;
}

.product-placeholder {
  gap: 8px;
  align-content: center;
}

.product-badge,
.hot-tag {
  position: absolute;
  max-width: calc(100% - 20px);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  overflow: hidden;
  background: oklch(0.995 0.004 220 / 0.94);
  color: var(--mi-teal-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-badge {
  left: 10px;
  top: 10px;
}

.hot-tag {
  right: 10px;
  bottom: 10px;
  background: oklch(0.19 0.038 248 / 0.86);
  color: var(--mi-white);
}

.product-content {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 14px;
}

.product-name {
  min-height: 48px;
  margin: 0;
  color: var(--mi-ink);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--mi-teal-strong);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.save-copy {
  color: oklch(0.32 0.11 157);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

.price-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.price-pill {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: oklch(0.95 0.018 214);
  color: var(--mi-ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.price-pill.good {
  background: oklch(0.94 0.052 157);
  color: oklch(0.32 0.11 157);
}

.promo-copy {
  color: oklch(0.32 0.11 157);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.price-chart {
  width: 100%;
  height: 64px;
  border: 1px solid var(--mi-line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--mi-white), oklch(0.98 0.006 220));
}

.empty,
.no-results {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed var(--mi-line-strong);
  border-radius: 8px;
  background: oklch(0.995 0.004 220 / 0.76);
  color: var(--mi-ink-soft);
  font-weight: 700;
  text-align: center;
  padding: 28px;
}

.hidden-by-filter {
  display: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 0.78fr);
  gap: 26px;
  align-items: center;
  margin: 0 auto;
}

.login-shell::before {
  inset: 8% 34% 8% -4%;
  border: 1px solid oklch(0.79 0.05 222 / 0.62);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 46%, oklch(0.68 0.12 211 / 0.12) 46% 54%, transparent 54%),
    linear-gradient(180deg, oklch(0.995 0.004 220 / 0.72), oklch(0.93 0.026 220 / 0.64));
  transform: skewY(-2deg);
}

.login-context {
  min-width: 0;
}

.login-logo {
  display: block;
  width: min(340px, 100%);
  max-height: 138px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 18px;
}

.login-title {
  max-width: 620px;
  font-size: 3.35rem;
  line-height: 1.08;
}

.login-lede {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--mi-ink-soft);
  font-size: 1.08rem;
  text-wrap: pretty;
}

.login-massive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.login-massive-tile {
  --tile-color: var(--mi-teal);
  --tile-soft: oklch(0.94 0.045 214);
  position: relative;
  min-height: 164px;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: 16px;
  background:
    linear-gradient(135deg, var(--tile-soft), var(--mi-surface) 58%),
    var(--mi-surface);
}

.login-massive-tile .mi-icon {
  position: absolute;
  right: -12px;
  top: -10px;
  width: 112px;
  height: 112px;
  stroke: var(--tile-color);
  stroke-width: 3.1;
  opacity: 0.26;
}

.login-massive-tile span {
  position: relative;
  z-index: 1;
  color: color-mix(in oklch, var(--tile-color) 68%, var(--mi-ink));
  font-weight: 700;
}

.login-massive-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 4px;
  color: var(--mi-ink);
  font-size: 1rem;
  line-height: 1.24;
}

.login-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.login-panel__header {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.login-panel__header h2 {
  margin: 0;
  color: var(--mi-ink);
  font-size: 1.72rem;
  line-height: 1.18;
}

.login-panel__header p {
  margin: 0;
  color: var(--mi-ink-soft);
  font-weight: 700;
}

.login-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.login-panel .mi-message {
  margin-bottom: 16px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field label {
  color: var(--mi-ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap .mi-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--mi-teal-strong);
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-wrap .mi-input {
  min-height: 50px;
  padding-left: 44px;
}

.login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
}

.login-note {
  margin: 2px 0 0;
  color: var(--mi-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1120px) {
  .mi-topbar {
    grid-template-columns: 1fr auto;
  }

  .mi-nav-pills {
    grid-column: 1 / -1;
    justify-self: stretch;
    overflow-x: auto;
  }

  .mi-nav-pills__link {
    flex: 1 0 auto;
  }

  .shop-hero,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .shop-stage {
    min-height: 540px;
  }

  .shop-hero h1 {
    font-size: 3.25rem;
  }

  .login-title {
    font-size: 2.72rem;
  }

  .login-panel {
    max-width: 560px;
  }
}

@media (max-width: 920px) {
  .request-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .request-form {
    grid-column: 1 / -1;
  }

  .shop-controls {
    top: 0;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --mi-topbar-height: 66px;
  }

  html {
    scroll-padding-top: calc(var(--mi-topbar-height) + 12px);
    scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  body.mi-body {
    background-size: 52px 52px, 52px 52px, auto;
  }

  body.mi-login-body {
    align-items: start;
    padding: 18px 14px;
  }

  .mi-page {
    width: min(100% - 28px, 1440px);
    padding-bottom: 34px;
  }

  .mi-topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
    min-height: var(--mi-topbar-height);
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    gap: 10px;
  }

  .mi-brand__logo {
    width: 38px;
    height: 38px;
  }

  .mi-brand__subtitle,
  .mi-chip,
  .mi-nav-pills .mi-icon {
    display: none;
  }

  .mi-nav-pills {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border-color: var(--mi-line-strong);
    background: oklch(0.995 0.004 220 / 0.96);
    box-shadow: var(--mi-shadow-tight);
    backdrop-filter: blur(18px);
    overflow: visible;
  }

  .mi-nav-pills__link {
    min-height: 52px;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  .shop-massive {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .shop-hero {
    min-height: auto;
    gap: 28px;
    padding: 20px 0 34px;
  }

  .shop-hero__logo,
  .login-logo {
    width: min(280px, 100%);
    max-height: 112px;
  }

  .shop-hero h1,
  .login-title {
    font-size: 2.08rem;
    line-height: 1.12;
  }

  .shop-hero__lede,
  .login-lede {
    font-size: 1rem;
  }

  .mi-action-row,
  .mi-action-row .mi-button,
  .request-form,
  .request-form .mi-button {
    width: 100%;
  }

  .shop-stage {
    min-height: auto;
  }

  .shop-stage::before {
    inset: 0;
  }

  .shop-stage__ribbon {
    width: 100%;
    justify-self: stretch;
    flex-wrap: wrap;
    font-size: 0.88rem;
  }

  .shop-stage-grid,
  .login-massive-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shop-orbit-tile {
    min-height: 138px;
    padding: 16px;
  }

  .shop-orbit-tile__icon {
    right: -12px;
    top: -12px;
    width: 120px;
    height: 120px;
    stroke-width: 3.5;
  }

  .shop-feature-card {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .mini-strip {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-item:nth-child(3) {
    display: none;
  }

  .request-panel {
    grid-template-columns: 1fr;
  }

  .request-panel__icon {
    width: 58px;
    height: 58px;
  }

  .request-panel__icon .mi-icon {
    width: 36px;
    height: 36px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title {
    font-size: 1.58rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .product-content {
    padding: 12px;
  }

  .login-shell::before {
    inset: 8% -4% 20% -4%;
  }

  .login-panel {
    padding: 18px;
  }
}

@media (max-width: 430px) {
  .mi-brand__title {
    max-width: 142px;
  }

  .mi-topbar__actions .mi-button:not(.mi-button--primary) {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .save-copy {
    text-align: left;
  }
}

@media (hover: none) {
  .mi-nav-pills__link:hover,
  .mi-button:hover,
  .shop-orbit-tile:hover,
  .product-card:hover,
  .filter-button:hover,
  .category-button:hover {
    transform: none;
  }

  .shop-orbit-tile:active,
  .product-card:active,
  .mi-button:active {
    transform: scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
