.page-breadcrumb {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 700;
}

.page-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.page-breadcrumb a:hover { color: #667085; }

:root {
  --bg: #ffffff;
  --ink: #0f0f0f;
  --muted: #777777;
  --line: #ededed;
  --blue: #2673F0;
  --blue-hover: #155BD1;
  --blue-light: #EEF5FF;
  --blue-dark: #174EA6;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
}

button,
a {
  font: inherit;
}

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

.center-stage,
.home-stage,
.lp-stage,
.shop-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #ffffff;
}

.center-stage {
  gap: 18px;
  align-content: center;
}

.home-stage {
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.home-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  place-items: center;
  justify-content: center;
}

.home-menu-item {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-menu-item[aria-disabled="true"] {
  cursor: default;
}

.home-account-icon {
  position: fixed;
  z-index: 20;
  top: 20px;
  right: 20px;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 48px;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
}

.home-account-glyph {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  transition: background 160ms ease, transform 160ms ease;
}

.home-account-glyph img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.home-account-icon:hover .home-account-glyph {
  background: var(--blue-hover);
}

.home-account-icon:active .home-account-glyph {
  transform: scale(.96);
}

.home-account-icon:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .home-account-icon {
    top: 16px;
    right: 16px;
  }


  .home-account-glyph {
    width: 44px;
    height: 44px;
  }

}

.home-menu-more {
  position: relative;
}

.home-menu-more summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.home-menu-more summary::-webkit-details-marker {
  display: none;
}

.home-submenu {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 80px;
  transform: translateX(-50%);
}

.home-submenu-item {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.intro-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #ffffff;
}

.intro-panel {
  display: grid;
  gap: 18px;
  width: min(100%, 560px);
}

.intro-panel h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.intro-panel p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.intro-home-link {
  width: fit-content;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  height: 52px;
}

.home-dot {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #a6a6a6;
  padding: 0;
  cursor: default;
}

.home-dot.is-active {
  background: #ff3038;
  cursor: pointer;
}

.home-dot.is-active:active {
  transform: translateY(1px);
}

.home-dot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.can-stage {
  position: relative;
  width: min(92vw, 520px);
  height: min(82vh, 620px);
  min-height: 420px;
  cursor: grab;
}

.can-stage:active {
  cursor: grabbing;
}

#soupCanCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.can-menu {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 12px;
  width: min(46vw, 170px);
  padding: 14px;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 140ms ease, transform 140ms ease;
}

.can-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.can-menu:empty {
  display: none;
}

.can-menu a {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.assign-button,
.plain-button {
  min-width: 160px;
  min-height: 54px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.assign-button:active,
.plain-button:active {
  transform: translateY(1px);
}

.route-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.route-links a:hover {
  color: var(--ink);
}

.lp-player {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: min(88vw, 420px);
}

.album-button {
  width: min(72vw, 360px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: #ffffff;
  cursor: pointer;
}

.album-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-title {
  min-height: 20px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.player-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.player-meta {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 100%;
}

.spotify-controls {
  display: grid;
  gap: 16px;
  width: 100%;
}

.time-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.time-row span:last-child {
  text-align: right;
}

.progress {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.icon-button,
.play-button {
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.icon-button {
  width: 44px;
  height: 44px;
}

.play-button {
  min-width: 86px;
  height: 48px;
  padding: 0 18px;
}

.icon-button:active,
.play-button:active {
  transform: translateY(1px);
}

.shop-panel {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.shop-title {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.shop-stage {
  align-items: start;
  justify-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 24px;
}

.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px;
  width: min(100%, 980px);
}

.shop-product {
  display: grid;
  gap: 10px;
  width: min(50vw, 220px);
}

.shop-product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  background: #808080;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.shop-product-info {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.shop-product-stock {
  color: var(--muted);
  font-size: 13px;
}

.shop-add-button {
  min-height: 34px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.cart-panel {
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  width: 100%;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 0;
  padding: 14px;
  background: #ffffff;
}

.cart-head,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.cart-head {
  justify-content: space-between;
  text-align: left;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.cart-empty {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cart-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  transition: transform 160ms ease, opacity 160ms ease;
  touch-action: pan-y;
}

.cart-item img {
  width: 46px;
  height: 46px;
  background: #808080;
  object-fit: cover;
}

.cart-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-item-main strong,
.cart-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.cart-item-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cart-item.is-dragging {
  position: relative;
  z-index: 2;
  opacity: 0.86;
  transition: none;
}

.cart-item.is-removing {
  opacity: 0.45;
}

.checkout-button {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.checkout-button[aria-disabled="true"] {
  cursor: default;
  filter: grayscale(1);
  opacity: 0.36;
}

.cart-payment {
  display: grid;
  justify-items: end;
  gap: 10px;
  border-top: 0;
  padding-top: 12px;
}

.cart-account-copy {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.36;
}

.cart-address-button {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.36;
}

.cart-payment .payment-links {
  justify-content: flex-end;
  margin-top: 0;
}

.cart-account-copy img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.cart-address-button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.cart-payment .payment-link {
  filter: grayscale(1);
  opacity: 0.36;
  pointer-events: none;
}

.cart-payment.is-active .cart-account-copy {
  border-color: var(--ink);
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.cart-payment.is-active .cart-address-button {
  border-color: var(--ink);
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.cart-payment.is-active .payment-link {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}

.checkout-stage {
  min-height: 100vh;
  padding: 18px;
  background: #ffffff;
}

.checkout-panel {
  display: grid;
  gap: 18px;
  width: min(100%, 520px);
}

.checkout-order,
.checkout-status,
.checkout-paybox {
  display: grid;
  gap: 12px;
}

.checkout-order h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.checkout-order label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.checkout-order input {
  min-height: 42px;
  border: 1px solid var(--ink);
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.checkout-items {
  display: grid;
  gap: 8px;
}

.checkout-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 8px;
}

.checkout-item img {
  width: 54px;
  height: 54px;
  background: #808080;
  object-fit: cover;
}

.checkout-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.checkout-item strong,
.checkout-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-item span,
.checkout-empty,
.checkout-status span,
.checkout-status small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.checkout-total {
  justify-self: end;
  font-size: 22px;
}

.checkout-submit {
  min-height: 44px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.checkout-submit:disabled {
  cursor: default;
  opacity: 0.45;
}

.checkout-status {
  border: 1px solid var(--ink);
  padding: 12px;
}

.checkout-status strong {
  font-size: 22px;
  line-height: 1;
}

.account-copy-button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
  min-width: min(100%, 240px);
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
}

.account-copy-button span {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.account-copy-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-copy-button strong {
  font-size: 18px;
  letter-spacing: 0;
}

.account-copy-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.payment-links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.payment-link {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  overflow: hidden;
}

.payment-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.copy-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.click-stage,
.game-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #ffffff;
  color: var(--ink);
  cursor: default;
  touch-action: manipulation;
  user-select: none;
}

.coupon-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #ffffff;
  color: var(--ink);
}

.coupon-home {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.coupon-home:hover {
  color: var(--ink);
}

.coupon-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 420px);
}

.coupon-head {
  display: grid;
  gap: 5px;
}

.coupon-head span,
.coupon-stats span,
.coupon-prize span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.coupon-head strong {
  font-size: 26px;
  line-height: 1.1;
}

.coupon-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.coupon-stats div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  padding: 9px;
}

.coupon-stats strong {
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.coupon-board {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 0;
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}

.coupon-target {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  will-change: transform;
}

.coupon-board-status {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.coupon-board.is-cleared {
  background: #f7f7f7;
}

.coupon-board.is-failed .coupon-board-status {
  color: #c91f2d;
}

.coupon-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.coupon-actions button,
.coupon-prize button {
  min-height: 42px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.coupon-prize {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 12px;
}

.coupon-prize span,
.coupon-prize strong {
  grid-column: 1;
}

.coupon-prize strong {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1;
}

.coupon-prize button {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 72px;
}

.click-home,
.game-home {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.click-home:hover,
.game-home:hover {
  color: var(--ink);
}

.click-ad,
.game-ad {
  position: fixed;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: min(92vw, 728px);
  height: 90px;
  min-height: 58px;
  max-height: 90px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f7f7;
  color: var(--ink);
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.click-ad-top,
.game-ad-top {
  top: 18px;
}

.click-ad-bottom,
.game-ad-bottom {
  bottom: 18px;
}

.click-ad-fallback,
.game-ad-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
}

.click-ad-fallback span,
.game-ad-fallback span {
  display: grid;
  min-width: 34px;
  min-height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.click-ad-fallback strong,
.game-ad-fallback strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.click-adsense-slot,
.game-adsense-slot {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  max-height: 90px;
}

.tetris-panel {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 12px;
  width: min(92vw, 520px);
  margin: 126px 0;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.98);
  padding: 14px;
}

.tetris-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tetris-head div,
.tetris-stat {
  display: grid;
  gap: 4px;
}

.tetris-head span,
.tetris-stat span,
.tetris-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.tetris-head strong {
  font-size: 20px;
  line-height: 1;
}

.tetris-command,
.tetris-controls button {
  min-height: 38px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.tetris-command:active,
.tetris-controls button:active {
  transform: translateY(1px);
}

.tetris-main {
  display: grid;
  grid-template-columns: 240px minmax(118px, 1fr);
  gap: 12px;
  align-items: start;
}

.tetris-board,
.tetris-next {
  display: block;
  border: 8px solid #2a2d25;
  background: #4d5e50;
  box-shadow:
    inset 8px 9px 14px rgba(0, 0, 0, 0.28),
    inset -4px -4px 8px rgba(255, 255, 255, 0.08),
    0 6px 10px rgba(0, 0, 0, 0.2);
  image-rendering: pixelated;
}

.tetris-board {
  width: 240px;
  height: 480px;
}

.tetris-side {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tetris-stat {
  min-height: 54px;
  border: 1px solid var(--line);
  padding: 8px;
}

.tetris-stat strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tetris-next {
  width: 96px;
  height: 96px;
}

.tetris-status {
  display: grid;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--line);
}

.tetris-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: stretch;
}

.tetris-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, 38px);
  gap: 6px;
}

.tetris-pad-up {
  grid-column: 2;
  grid-row: 1;
}

.tetris-pad-left {
  grid-column: 1;
  grid-row: 2;
}

.tetris-pad-down {
  grid-column: 2;
  grid-row: 2;
}

.tetris-pad-right {
  grid-column: 3;
  grid-row: 2;
}

.tetris-actions {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
}

.click-score-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(92vw, 720px);
}

.click-label,
.click-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.click-score {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(58px, 16vw, 168px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.click-score.is-popping {
  animation: clickPop 140ms ease-out;
}

.loot-panel {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 16px;
  justify-items: center;
  width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
  padding: 22px;
  cursor: default;
  user-select: none;
}

.loot-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.loot-copy span,
.loot-meta span,
.loot-legal {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.loot-copy strong {
  font-size: 18px;
  font-weight: 900;
}

.loot-box-button {
  position: relative;
  display: grid;
  width: 190px;
  height: 178px;
  place-items: center;
  justify-self: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.18));
  transition: transform 160ms ease, filter 160ms ease;
}

.loot-box-button:disabled {
  cursor: wait;
}

.loot-box-button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.22));
}

.loot-box-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loot-box-lid,
.loot-box-body {
  display: block;
  border: 2px solid var(--ink);
  background: #f2c94c;
  opacity: 0;
}

.loot-box-lid {
  position: absolute;
  top: 11px;
  width: 76px;
  height: 18px;
  transform-origin: 16px 100%;
}

.loot-box-body {
  width: 68px;
  height: 42px;
  background: #2f80ed;
}

.loot-box-body::after {
  content: "";
  display: block;
  width: 14px;
  height: 100%;
  margin: 0 auto;
  background: #f2c94c;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.loot-box-button.is-opening .loot-box-lid {
  animation: lootLid 420ms ease-in-out infinite alternate;
}

.loot-box-button.is-opening .loot-box-image {
  animation: lootShake 90ms linear infinite, lootGlow 520ms ease-in-out infinite alternate;
}

.loot-box-button.is-revealed .loot-box-image {
  animation: lootBounce 380ms ease-out;
}

.loot-result {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  padding: 8px;
}

.loot-result.is-final {
  animation: lootReveal 180ms ease-out;
}

.loot-portrait {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line);
  background: #f7f7f7;
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
}

.loot-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loot-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.loot-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 900;
}

.loot-result.is-common {
  border-color: #b7b7b7;
}

.loot-result.is-rare {
  border-color: #2f80ed;
}

.loot-result.is-epic {
  border-color: #9b51e0;
}

.loot-result.is-legendary {
  border-color: #f2994a;
}

.loot-history {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 100%;
  min-height: 28px;
}

.loot-history img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  object-fit: cover;
}

.loot-history img.is-rare {
  border-color: #2f80ed;
}

.loot-history img.is-epic {
  border-color: #9b51e0;
}

.loot-history img.is-legendary {
  border-color: #f2994a;
}

.loot-legal {
  margin: 0;
  line-height: 1.3;
}

@keyframes lootLid {
  to {
    transform: rotate(-16deg) translateY(-5px);
  }
}

@keyframes lootReveal {
  50% {
    transform: scale(1.03);
  }
}

@keyframes lootShake {
  25% {
    transform: translateX(-3px) rotate(-1deg);
  }

  75% {
    transform: translateX(3px) rotate(1deg);
  }
}

@keyframes lootGlow {
  to {
    filter: drop-shadow(0 0 18px rgba(56, 201, 216, 0.78));
  }
}

@keyframes lootBounce {
  35% {
    transform: translateY(-14px) scale(1.08);
  }

  70% {
    transform: translateY(2px) scale(0.98);
  }
}

@keyframes clickPop {
  50% {
    transform: scale(1.04);
  }
}

.admin-stage {
  display: grid;
  min-height: 100vh;
  align-items: start;
  padding: 24px;
  background: #ffffff;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 220px) auto;
  gap: 8px;
}

.admin-login input,
.admin-login button,
.admin-toolbar button,
.admin-toolbar a,
.admin-save {
  min-height: 40px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.admin-login input {
  padding: 0 10px;
}

.admin-login button,
.admin-toolbar button,
.admin-save {
  cursor: pointer;
}

.admin-login { grid-template-columns: minmax(0, 220px) 44px; align-items: center; gap: 12px; }
.admin-login input { min-height: 44px; border: 0; background: transparent; padding: 0 2px; font: inherit; font-size: 18px; outline: 0; }
.admin-login .admin-unlock-icon { display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; border: 0; border-radius: 50%; background: #111; padding: 0; }
.admin-login .admin-unlock-icon img { width: 22px; height: 22px; object-fit: contain; }

.admin-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 760px);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-toolbar button,
.admin-toolbar a {
  display: grid;
  min-width: 92px;
  padding: 0 12px;
  place-items: center;
}

.admin-products {
  display: grid;
  gap: 8px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(0, 92px) 78px 38px;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  padding: 6px;
  border: 1px solid var(--line);
}

.admin-product-image-button {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid transparent;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.admin-product-image-button:hover,
.admin-product-image-button.is-dragging {
  border-color: var(--ink);
}

.admin-product-thumb {
  display: block;
  width: 54px;
  height: 54px;
  background: #808080;
  object-fit: cover;
}

.admin-product-file {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  font-size: 80px;
  opacity: 0.01;
  cursor: pointer;
  z-index: 5;
}

.admin-product-file::-webkit-file-upload-button {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.admin-product-file::file-selector-button {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.admin-product-row input.admin-product-file {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  color: transparent;
  background: transparent;
}

/*
  Keep the real file input over the image square. Some browsers block
  programmatic clicks on hidden file inputs, so this must remain clickable.
*/
.admin-product-file {
  top: 0;
  left: 0;
  z-index: 5;
}

.admin-product-row input {
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 0 8px;
  color: var(--ink);
  font: inherit;
}

.admin-product-remove {
  width: 38px;
  height: 36px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.admin-save {
  width: 120px;
}

.admin-orders {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.admin-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-orders-head strong {
  font-size: 18px;
}

.admin-orders-head button,
.admin-order-actions button {
  min-height: 36px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.admin-order-list {
  display: grid;
  gap: 8px;
}

.admin-order-create {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 88px 58px;
  gap: 6px;
}

.admin-order-create input,
.admin-order-create button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
  font-weight: 800;
}

.admin-order-create button {
  border-color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.admin-order-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 10px;
}

.admin-order-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-order-main span,
.admin-order-main small,
.admin-order-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-order-actions button {
  padding: 0 9px;
}

.admin-order-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.admin-order-meta { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 900; }
.admin-order-status-trigger { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; color: var(--ink); font: inherit; font-weight: 900; cursor: pointer; }
.admin-order-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #9ca3af; }
.admin-order-status-dot[data-status="paid"] { background: #2563eb; }
.admin-order-status-dot[data-status="packing"] { background: #f59e0b; }
.admin-order-status-dot[data-status="shipping"] { background: #7c3aed; }
.admin-order-status-dot[data-status="done"] { background: #16a34a; }
.admin-order-status-dot[data-status="rejected"] { background: #dc2626; }
.admin-order-status-menu { display: grid; max-height: 132px; overflow-y: auto; border-left: 2px solid #e5e7eb; margin: 0 0 4px 4px; padding-left: 12px; scrollbar-width: thin; }
.admin-order-status-menu button { display: flex; min-height: 44px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #e5e7eb; background: transparent; padding: 0 6px; color: var(--ink); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.admin-order-status-menu button:disabled { color: #2563eb; cursor: default; }
.admin-order-decision-actions { gap: 10px; }
.admin-order-actions .admin-order-accept, .admin-order-actions .admin-order-reject { display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; border: 0; border-radius: 50%; padding: 0; color: #fff; }
.admin-order-actions .admin-order-accept { background: #2563eb; }
.admin-order-actions .admin-order-reject { background: #dc2626; }
.admin-order-accept img { width: 21px; height: 21px; object-fit: contain; }
.admin-order-reject span { font-size: 28px; font-weight: 500; line-height: 1; }

.admin-purchase-panel {
  max-width: 840px;
}

.admin-purchase-table-wrap {
  overflow-x: auto;
}

.admin-purchase-table {
  width: 100%;
  border-collapse: collapse;
  color: #111;
  font-size: 15px;
}

.admin-purchase-table th,
.admin-purchase-table td {
  border-bottom: 1px solid #dedede;
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.admin-purchase-table th {
  font-size: 13px;
  font-weight: 700;
  color: #666;
}

.admin-purchase-thumb {
  width: 72px;
  height: 72px;
  border: 1px solid #ddd;
  object-fit: cover;
}

.admin-purchase-image-button {
  display: inline-grid;
  cursor: pointer;
}

.admin-purchase-table input {
  width: 96px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  font: inherit;
}

.admin-purchase-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 2px solid #111;
  padding-top: 16px;
  font-size: 16px;
}

.admin-purchase-summary strong {
  min-width: 140px;
  text-align: right;
  font-size: 22px;
}

.auth-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #ffffff;
}

.auth-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 340px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.auth-tab,
.auth-submit {
  min-height: 42px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.auth-tab.is-active {
  background: var(--ink);
  color: #ffffff;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 0 10px;
  font: inherit;
}

.auth-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.lp-stage-rework {
  align-items: center;
}

.lp-rework-player {
  display: grid;
  justify-items: center;
  gap: 0;
  width: min(88vw, 420px);
}

.lp-cover {
  width: clamp(220px, 30vw, 326px);
  height: clamp(220px, 30vw, 326px);
  display: grid;
  place-items: center;
  background: #ffffff;
}

.lp-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.lp-rework-controls {
  display: grid;
  justify-items: center;
  gap: 0;
  width: clamp(220px, 30vw, 326px);
  margin-top: 26px;
}

.lp-button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  justify-items: center;
  width: min(100%, 82px);
  margin: 0 auto;
}

.lp-red-button {
  width: clamp(18px, 2.2vw, 22px);
  height: clamp(18px, 2.2vw, 22px);
  border: 0;
  border-radius: 999px;
  background: #ff3038;
  cursor: pointer;
}

.lp-red-button:active {
  transform: translateY(1px);
}

.map-page {
  min-height: 100vh;
  padding: 18px;
  background: #ffffff;
}

.map-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: calc(100vh - 36px);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.map-controls {
  display: flex;
  gap: 8px;
}

.map-control-button {
  min-width: 44px;
  height: 40px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

#zoomReset {
  min-width: 72px;
}

.map-viewport {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: grab;
  touch-action: none;
}

.map-viewport:active {
  cursor: grabbing;
}

.map-image {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  width: min(92vw, 1120px);
  transform-origin: 50% 50%;
  translate: -50% -50%;
  user-select: none;
  -webkit-user-drag: none;
}

.map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.legend-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 86px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legend-item img {
  max-width: 56px;
  max-height: 46px;
  object-fit: contain;
}

.editor-page {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  background: #ffffff;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.editor-sidebar h1 {
  margin: 0;
  font-size: 24px;
}

.editor-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.editor-controls {
  display: grid;
  gap: 12px;
}

.editor-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.editor-controls input,
.editor-controls select {
  width: 100%;
}

.block-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.palette-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.palette-button.is-active {
  border-color: var(--ink);
  background: #f5f5f5;
}

.palette-button img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
  justify-self: center;
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.editor-actions button {
  min-height: 40px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

#outputData {
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 10px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.editor-workspace {
  display: grid;
  min-width: 0;
  min-height: 100vh;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: #f7f7f7;
}

.editor-canvas-wrap {
  width: min(100%, 1414px);
  aspect-ratio: 1414 / 826;
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

.editor-canvas {
  position: relative;
  width: 1414px;
  height: 826px;
  transform-origin: top left;
}

.editor-reference,
.placed-layer,
.cursor-preview {
  position: absolute;
  inset: 0;
}

.editor-reference {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.placed-layer {
  pointer-events: none;
}

.placed-block {
  position: absolute;
  object-fit: contain;
  pointer-events: auto;
  cursor: default;
  transform-origin: center;
}

.cursor-preview {
  display: none;
  inset: auto;
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.72;
  pointer-events: none;
  transform-origin: center;
}

.maker-page {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  background: #ffffff;
}

.maker-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.maker-sidebar h1 {
  margin: 0;
  font-size: 24px;
}

.maker-controls {
  display: grid;
  gap: 12px;
}

.maker-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.maker-control-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.maker-option,
.maker-rotation button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.maker-option.is-active {
  border-color: var(--ink);
  background: #f5f5f5;
}

.maker-rotation {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
}

.maker-rotation output {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.maker-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

#apartmentOutput {
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 10px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.maker-workspace {
  display: grid;
  min-width: 0;
  min-height: 100vh;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: #f7f7f7;
}

.maker-board {
  position: relative;
  width: 960px;
  height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(#f0f0f0 1px, transparent 1px),
    linear-gradient(90deg, #f0f0f0 1px, transparent 1px),
    #ffffff;
  background-size: 40px 40px;
}

.maker-layer,
.maker-cursor {
  position: absolute;
  inset: 0;
}

.apartment-block {
  border: 2px solid var(--ink);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d9d9d9;
  transform-origin: center;
}

.maker-cursor {
  display: none;
  inset: auto;
  opacity: 0.55;
  pointer-events: none;
}

.placed-apartment {
  position: absolute;
  padding: 0;
  cursor: pointer;
}

.shop-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  justify-items: stretch;
  min-height: 100vh;
  padding: 20px;
  background: #ffffff;
}

.shop-stage::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.shop-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-right: 20px;
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.shop-header span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.shop-cart-toggle {
  display: none;
  grid-template-columns: 20px auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 900;
}

.shop-cart-toggle img,
.cart-head img,
.checkout-button img,
.shop-icon-command img,
.shop-search img,
.shop-select img,
.cart-qty img,
.cart-close img,
.shop-favorite img {
  width: 18px;
  height: 18px;
}

.shop-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 164px 132px 42px;
  gap: 8px;
}

.shop-search,
.shop-select,
.shop-price-filter {
  display: grid;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.shop-search {
  grid-template-columns: 38px minmax(0, 1fr);
}

.shop-select {
  grid-template-columns: 34px minmax(0, 1fr);
}

.shop-price-filter {
  grid-template-columns: 44px minmax(0, 1fr);
}

.shop-price-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.shop-search img,
.shop-select img {
  justify-self: center;
}

.shop-search input,
.shop-select select,
.shop-price-filter input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.shop-select select {
  appearance: none;
  cursor: pointer;
}

.shop-icon-command {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}

.shop-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
}

.shop-product {
  display: grid;
  gap: 8px;
  width: 50%;
  min-width: 0;
  transition: transform 160ms ease, opacity 160ms ease;
  touch-action: pan-y;
}

.shop-product.is-dragging {
  position: relative;
  z-index: 5;
  transition: none;
}

.shop-product.is-adding {
  opacity: 1;
}

.shop-product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  background: #808080;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-touch-callout: none;
}

.shop-product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.shop-product-media:hover .shop-product-image {
  transform: scale(1.03);
}

.shop-product-drag-image {
  position: fixed;
  z-index: 100;
  border: 1px solid var(--line);
  background: #808080;
  object-fit: cover;
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.shop-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.shop-product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.shop-favorite {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}

.shop-favorite.is-active {
  background: #ffefef;
  border-color: #ff3038;
}

.shop-product-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.shop-product-stock {
  color: #c91f2d;
  font-size: 12px;
}

.shop-add-button {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.shop-add-button:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.shop-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cart-panel {
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  width: 100%;
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 0;
  padding: 14px 14px 14px 20px;
  background: #ffffff;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-head strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.cart-close {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  transition: transform 160ms ease, opacity 160ms ease;
  touch-action: pan-y;
}

.cart-item > img {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  background: #808080;
  object-fit: cover;
}

.cart-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-item-main strong,
.cart-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.cart-item-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.cart-item.is-dragging {
  position: relative;
  z-index: 2;
  opacity: 0.86;
  transition: none;
}

.cart-item.is-removing {
  opacity: 0.45;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-top: 0;
  padding-top: 0;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.checkout-button {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.checkout-button {
  grid-template-columns: 18px auto;
  justify-content: center;
  gap: 8px;
}

.cart-payment {
  display: grid;
  justify-items: start;
  gap: 10px;
  border-top: 0;
  padding-top: 12px;
}

.cart-account-copy {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.36;
}

.cart-payment .payment-links {
  justify-content: flex-start;
  margin-top: 0;
}

.cart-account-copy img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.cart-payment .payment-link {
  filter: grayscale(1);
  opacity: 0.36;
  pointer-events: none;
}

.cart-payment.is-active .cart-account-copy {
  border-color: var(--ink);
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.cart-payment.is-active .payment-link {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}

.shop-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  min-width: 110px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.shop-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lp-stage-upgraded {
  min-height: 100vh;
  padding: 22px;
  background: #ffffff;
}

.lp-deck {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(280px, 420px);
  align-items: center;
  gap: 28px;
  width: min(100%, 920px);
}

.lp-art-wrap {
  display: grid;
  place-items: center;
}

.lp-art-button {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  padding: 0;
  background: #ffffff;
  cursor: pointer;
}

.lp-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-disc-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  pointer-events: none;
}

.is-lp-playing .lp-art {
  animation: lpSpin 8s linear infinite;
}

.lp-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.lp-now {
  display: grid;
  gap: 5px;
}

.lp-now span,
.lp-now strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-now h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.08;
}

.lp-progress-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.lp-progress-row span:last-child {
  text-align: right;
}

.lp-progress,
.lp-volume {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.lp-controls-row {
  display: grid;
  grid-template-columns: repeat(2, 42px) 58px repeat(2, 42px);
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.lp-icon-button,
.lp-play-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.lp-icon-button {
  width: 42px;
  height: 42px;
}

.lp-play-button {
  width: 58px;
  height: 58px;
}

.lp-icon-button img,
.lp-play-button img {
  width: 20px;
  height: 20px;
}

.lp-icon-button.is-active {
  background: #ff3038;
}

.lp-icon-button.is-active img {
  filter: invert(1);
}

.lp-volume-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.lp-track-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-track-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  text-align: left;
}

.lp-track-list button.is-active {
  border-color: var(--ink);
  background: #f7f7f7;
}

.lp-track-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-track-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

@keyframes lpSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .click-home,
  .game-home {
    left: 12px;
    top: 12px;
  }

  .click-ad,
  .game-ad {
    width: calc(100vw - 24px);
    height: 64px;
    min-height: 48px;
    max-height: 64px;
  }

  .click-ad-top,
  .game-ad-top {
    top: 52px;
  }

  .click-ad-bottom,
  .game-ad-bottom {
    bottom: 12px;
  }

  .click-adsense-slot,
  .game-adsense-slot {
    min-height: 48px;
    max-height: 64px;
  }

  .tetris-panel {
    width: calc(100vw - 24px);
    margin: 128px 0 92px;
    padding: 10px;
  }

  .tetris-head strong {
    font-size: 16px;
  }

  .tetris-command {
    min-width: 82px;
  }

  .tetris-main {
    grid-template-columns: minmax(0, 220px) 82px;
    justify-content: center;
    gap: 8px;
  }

  .tetris-board {
    width: min(100%, 220px);
    height: auto;
    aspect-ratio: 1 / 2;
  }

  .tetris-next {
    width: 68px;
    height: 68px;
  }

  .tetris-stat {
    min-height: 40px;
    padding: 5px;
  }

  .tetris-stat strong {
    font-size: 16px;
  }

  .tetris-status,
  .tetris-command,
  .tetris-controls button {
    min-height: 34px;
  }

  .tetris-controls {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 8px;
  }

  .tetris-pad {
    grid-template-rows: repeat(3, 34px);
  }

  .loot-panel {
    width: calc(100vw - 24px);
    max-height: none;
    overflow: visible;
    padding: 14px;
    gap: 10px;
  }

  .loot-box-button {
    width: 122px;
    height: 112px;
  }

  .loot-box-lid {
    top: 6px;
    width: 64px;
    height: 15px;
  }

  .loot-box-body {
    width: 58px;
    height: 34px;
  }

  .loot-result {
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 64px;
  }

  .loot-portrait {
    width: 52px;
    height: 52px;
  }

  .loot-legal {
    display: none;
  }

  .album-button {
    width: min(84vw, 320px);
  }

  .lp-player {
    width: min(88vw, 340px);
  }

  .shop-stage {
    padding: 16px;
    grid-template-columns: 1fr;
    padding-bottom: 210px;
  }

  .shop-list {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .shop-product {
    width: calc((100vw - 32px) / 2);
  }

  .cart-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 20;
    height: 190px;
    max-height: 190px;
    border-width: 0;
    padding: 12px 16px;
  }

  .cart-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .cart-item img {
    width: 38px;
    height: 38px;
  }

  .map-page {
    padding: 10px;
  }

  .map-shell {
    min-height: calc(100vh - 20px);
  }

  .map-viewport {
    min-height: 420px;
  }

  .map-toolbar {
    align-items: flex-start;
  }

  .map-legend {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  }

  .editor-page {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor-workspace {
    min-height: 70vh;
    padding: 10px;
  }

  .maker-page {
    grid-template-columns: 1fr;
  }

  .maker-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .maker-workspace {
    min-height: 70vh;
    padding: 10px;
  }

  .admin-stage {
    padding: 14px;
  }

  .admin-login {
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .admin-product-row {
    grid-template-columns: 44px minmax(0, 1fr) 54px 50px 34px;
  }

  .admin-product-image-button,
  .admin-product-thumb {
    width: 44px;
    height: 44px;
  }

  .admin-product-remove {
    width: 34px;
  }

  .admin-order-create {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shop-stage {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 10px calc(50vw + 10px) 10px 10px;
  }

  .shop-stage::before {
    left: 50%;
  }

  .shop-main {
    padding-right: 0;
  }

  .shop-header h1 {
    font-size: 24px;
  }

  .shop-cart-toggle {
    display: none;
  }

  .shop-controls {
    grid-template-columns: 1fr 1fr 42px;
  }

  .shop-search {
    grid-column: 1 / -1;
  }

  .shop-price-filter {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .shop-list {
    grid-template-columns: minmax(0, 1fr);
    justify-content: start;
    justify-items: start;
    gap: 12px;
  }

  .shop-product {
    width: 100%;
  }

  .shop-product-info {
    display: grid;
    gap: 3px;
  }

  .cart-panel {
    position: fixed;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    width: 50vw;
    height: 100dvh;
    max-height: none;
    border-width: 0;
    padding: 10px;
    transform: none;
    transition: none;
  }

  .cart-panel.is-open {
    transform: none;
  }

  .cart-close {
    display: none;
  }

  .cart-item {
    grid-template-columns: 44px minmax(0, 1fr);
    justify-content: end;
    gap: 5px;
  }

  .cart-item > img {
    width: 44px;
    height: 44px;
  }

  .cart-item-main {
    display: grid;
  }

  .cart-total {
    font-size: 13px;
  }

  .cart-account-copy,
  .payment-link {
    width: 44px;
  }

  .cart-payment .payment-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: start;
    gap: 4px;
    max-width: 100%;
  }

  .cart-account-copy img {
    width: 18px;
    height: 18px;
  }

  .lp-stage-upgraded {
    padding: 14px;
    align-items: start;
  }

  .lp-deck {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
  }

  .lp-art-button {
    width: min(78vw, 340px);
  }

  .lp-now h1 {
    font-size: 24px;
  }

  .lp-track-list {
    max-height: 260px;
  }
}

.mini-console-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #ffffff;
  padding: 24px;
}

.mini-console {
  --mini-console-ink: #111111;
  --mini-console-line: #d8d8d8;
  --mini-console-surface: #f3f3f3;
  --mini-console-face: #ffffff;
  --mini-console-shadow: rgba(0, 0, 0, 0.16);
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 4.8 / 1;
  color: var(--mini-console-ink);
}

.mini-console-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: clamp(2px, 0.55vw, 4px) solid currentColor;
  border-radius: 18% / 48%;
  background: var(--mini-console-surface);
  box-shadow: 0 9px 22px var(--mini-console-shadow);
}

.mini-console-shell::before,
.mini-console-shell::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  width: 5.4%;
  border: clamp(1px, 0.22vw, 2px) solid currentColor;
  border-radius: 999px;
  background: var(--mini-console-face);
  opacity: 0.65;
}

.mini-console-shell::before {
  left: 2.8%;
}

.mini-console-shell::after {
  right: 2.8%;
}

.mini-console-hole {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2.2%;
  aspect-ratio: 1;
  border: clamp(1px, 0.18vw, 2px) solid currentColor;
  border-radius: 50%;
  background: var(--mini-console-face);
  transform: translateY(-50%);
}

.mini-console-hole-left {
  left: 1.4%;
}

.mini-console-hole-right {
  right: 1.4%;
}

.mini-console-screen-frame {
  position: absolute;
  left: 32%;
  top: 17%;
  width: 34%;
  height: 66%;
  border: clamp(2px, 0.46vw, 4px) solid currentColor;
  border-radius: 7% / 12%;
  background: var(--mini-console-face);
  padding: 3.4%;
}

.mini-console-lcd {
  width: 100%;
  height: 100%;
  border: clamp(1px, 0.22vw, 2px) solid currentColor;
  border-radius: 4% / 8%;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(0, 0, 0, 0.05) 48% 52%, transparent 52%),
    #eeeeee;
}

.mini-console-dpad {
  position: absolute;
  left: 15.5%;
  bottom: 20%;
  width: 13%;
  aspect-ratio: 1;
}

.mini-console-dpad-bar {
  position: absolute;
  inset: 36% 4%;
  border: clamp(1px, 0.24vw, 2px) solid currentColor;
  border-radius: 12% / 28%;
  background: var(--mini-console-face);
}

.mini-console-dpad-vertical {
  inset: 4% 36%;
  border-radius: 28% / 12%;
}

.mini-console-small-buttons {
  position: absolute;
  left: 19%;
  top: 20%;
  display: flex;
  gap: 6%;
  width: 16%;
  height: 12%;
}

.mini-console-small-buttons span,
.mini-console-round-buttons span {
  display: block;
  aspect-ratio: 1;
  border: clamp(1px, 0.2vw, 2px) solid currentColor;
  border-radius: 50%;
  background: var(--mini-console-face);
}

.mini-console-small-buttons span {
  flex: 1;
}

.mini-console-round-buttons {
  position: absolute;
  right: 18%;
  bottom: 21%;
  display: flex;
  gap: 12%;
  width: 14%;
  height: 17%;
}

.mini-console-round-buttons span {
  flex: 1;
}

.mini-console-side-buttons {
  position: absolute;
  right: 8.6%;
  top: 23%;
  display: grid;
  gap: 13%;
  width: 7%;
  height: 54%;
}

.mini-console-side-buttons span {
  display: block;
  border: clamp(1px, 0.24vw, 2px) solid currentColor;
  border-radius: 999px;
  background: var(--mini-console-face);
}

@media (max-width: 520px) {
  .mini-console {
    width: min(100%, 360px);
  }
}

.mini-console {
  --mini-console-ink: #191919;
  --mini-console-surface: #e9e9e9;
  --mini-console-face: #f8f8f8;
  --mini-console-dim: #cfcfcf;
  --mini-console-cavity: #9c9c9c;
  width: min(100%, 620px);
  aspect-ratio: 2.14 / 1;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
}

.mini-console-shell {
  border: 0;
  border-radius: 13% / 30%;
  background:
    radial-gradient(90% 125% at 50% 0%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(180deg, #f4f4f4 0%, #e6e6e6 47%, #d7d7d7 100%);
  box-shadow:
    inset 0 5px 7px rgba(255, 255, 255, 0.92),
    inset 0 -9px 14px rgba(0, 0, 0, 0.2),
    inset 8px 0 12px rgba(255, 255, 255, 0.36),
    inset -8px 0 12px rgba(0, 0, 0, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.7);
}

.mini-console-shell::before {
  content: "";
  position: absolute;
  inset: 5.7% 4.8%;
  z-index: 0;
  width: auto;
  border: 0;
  border-radius: 10% / 26%;
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.78),
    inset 0 -4px 7px rgba(0, 0, 0, 0.15);
}

.mini-console-shell::after {
  content: "";
  position: absolute;
  left: 7.8%;
  right: 7.8%;
  top: 7.5%;
  height: 10%;
  z-index: 0;
  width: auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  opacity: 1;
}

.mini-console-body-inset {
  position: absolute;
  inset: 8% 8.4%;
  z-index: 1;
  border-radius: 8% / 24%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.62),
    inset 0 -3px 7px rgba(0, 0, 0, 0.13);
  pointer-events: none;
}

.mini-console-end-recess {
  position: absolute;
  top: 8.5%;
  z-index: 2;
  width: 8.8%;
  height: 83%;
  border-radius: 999px;
  background: var(--mini-console-dim);
  box-shadow:
    inset 3px 3px 5px rgba(0, 0, 0, 0.28),
    inset -3px -3px 5px rgba(255, 255, 255, 0.58);
}

.mini-console-end-recess-left {
  left: 2.1%;
}

.mini-console-end-recess-right {
  right: 2.1%;
}

.mini-console-corner-notch {
  position: absolute;
  z-index: 3;
  width: 9.4%;
  height: 4.8%;
  border-radius: 999px;
  background: var(--mini-console-cavity);
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.32),
    inset -1px -1px 3px rgba(255, 255, 255, 0.34);
}

.mini-console-corner-notch-tl {
  left: 3.5%;
  top: 8.8%;
  transform: rotate(-33deg);
}

.mini-console-corner-notch-tr {
  right: 3.5%;
  top: 8.8%;
  transform: rotate(33deg);
}

.mini-console-corner-notch-bl {
  left: 3.5%;
  bottom: 8.8%;
  transform: rotate(33deg);
}

.mini-console-corner-notch-br {
  right: 3.5%;
  bottom: 8.8%;
  transform: rotate(-33deg);
}

.mini-console-hole {
  z-index: 4;
  width: 3.2%;
  border: 0;
  background: #f2f2f2;
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.26),
    inset -2px -2px 4px rgba(255, 255, 255, 0.76),
    0 1px 1px rgba(255, 255, 255, 0.6);
}

.mini-console-hole-left {
  left: 4.7%;
}

.mini-console-hole-right {
  right: 4.7%;
}

.mini-console-screen-frame {
  left: 33.6%;
  top: 24.4%;
  z-index: 5;
  width: 28.8%;
  height: 50.6%;
  border: 0;
  border-radius: 7% / 10%;
  background: linear-gradient(180deg, #ededed, #d5d5d5);
  padding: 4.2%;
  box-shadow:
    inset 0 4px 5px rgba(255, 255, 255, 0.7),
    inset 0 -6px 7px rgba(0, 0, 0, 0.26),
    0 4px 6px rgba(0, 0, 0, 0.22),
    0 -1px 1px rgba(255, 255, 255, 0.82);
}

.mini-console-lcd {
  border: 0;
  border-radius: 4% / 6%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(135deg, transparent 0 46%, rgba(255, 255, 255, 0.1) 46% 52%, transparent 52%),
    #b8b8b8;
  box-shadow:
    inset 4px 5px 7px rgba(0, 0, 0, 0.34),
    inset -2px -2px 4px rgba(255, 255, 255, 0.28);
}

.mini-console-dpad {
  left: 14.2%;
  bottom: 17.4%;
  z-index: 5;
  width: 17.3%;
}

.mini-console-dpad::after {
  content: "";
  position: absolute;
  inset: 34%;
  z-index: 2;
  border-radius: 50%;
  background: #ececec;
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, 0.8),
    inset -1px -1px 2px rgba(0, 0, 0, 0.18);
}

.mini-console-dpad-bar {
  border: 0;
  background: linear-gradient(180deg, #f8f8f8, #d8d8d8);
  box-shadow:
    0 4px 5px rgba(0, 0, 0, 0.24),
    inset 0 2px 3px rgba(255, 255, 255, 0.82),
    inset 0 -3px 4px rgba(0, 0, 0, 0.22);
}

.mini-console-small-buttons {
  left: 11.8%;
  top: 19.5%;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12%;
  width: 19.6%;
  height: auto;
}

.mini-console-small-buttons span,
.mini-console-round-buttons span {
  border: 0;
  background: linear-gradient(180deg, #fbfbfb, #d8d8d8);
  box-shadow:
    0 3px 4px rgba(0, 0, 0, 0.24),
    inset 0 2px 2px rgba(255, 255, 255, 0.86),
    inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.mini-console-round-buttons {
  right: 16.5%;
  bottom: 20.5%;
  z-index: 5;
  gap: 14%;
  width: 15.5%;
  height: auto;
}

.mini-console-side-buttons {
  right: 9.1%;
  top: 28.3%;
  z-index: 5;
  gap: 13%;
  width: 7.2%;
  height: 42.5%;
}

.mini-console-side-buttons span {
  border: 0;
  background: linear-gradient(180deg, #f8f8f8, #dadada);
  box-shadow:
    0 3px 5px rgba(0, 0, 0, 0.24),
    inset 0 2px 3px rgba(255, 255, 255, 0.82),
    inset 0 -3px 4px rgba(0, 0, 0, 0.22);
}

@media (max-width: 520px) {
  .mini-console {
    width: min(100%, 380px);
  }
}

.game-stage {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(77, 94, 80, 0.12), transparent 36%),
    #f4f4f1;
  padding: 18px;
}

.game-home {
  color: #2a2d25;
}

.game-ad {
  display: none;
}

.tetris-device {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(96vw, 540px);
  margin: 0;
  border: 0;
  border-radius: 34px;
  background: linear-gradient(180deg, #e9e6df, #d2cdc3);
  padding: clamp(14px, 2.4vw, 24px);
  box-shadow:
    inset 0 5px 9px rgba(255, 255, 255, 0.82),
    inset 0 -12px 18px rgba(42, 45, 37, 0.2),
    0 18px 34px rgba(42, 45, 37, 0.22);
}

.tetris-device::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.7),
    inset 0 -3px 7px rgba(42, 45, 37, 0.16);
  pointer-events: none;
}

.tetris-lcd-frame {
  position: relative;
  z-index: 1;
  border-radius: 18px;
  background: #2a2d25;
  padding: clamp(12px, 2vw, 20px);
  box-shadow:
    inset 8px 10px 16px rgba(0, 0, 0, 0.5),
    inset -4px -4px 8px rgba(255, 255, 255, 0.08),
    0 7px 12px rgba(42, 45, 37, 0.24);
}

.tetris-lcd-surface {
  display: grid;
  grid-template-columns: 270px minmax(118px, 130px);
  gap: clamp(12px, 2vw, 18px);
  justify-content: start;
  align-items: stretch;
  min-height: 0;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    #4d5e50;
  padding: clamp(10px, 1.8vw, 16px);
  box-shadow:
    inset 9px 10px 18px rgba(0, 0, 0, 0.32),
    inset -5px -5px 10px rgba(255, 255, 255, 0.06);
}

.tetris-playfield {
  display: grid;
  min-width: 0;
  align-items: center;
  justify-items: start;
}

.tetris-board,
.tetris-next {
  border: 0;
  background: #4d5e50;
  box-shadow:
    inset 7px 8px 13px rgba(0, 0, 0, 0.3),
    inset -4px -4px 8px rgba(255, 255, 255, 0.06);
}

.tetris-board {
  width: min(100%, 270px);
  height: auto;
  aspect-ratio: 1 / 2;
}

.tetris-side {
  display: grid;
  grid-template-rows: auto repeat(3, auto);
  align-content: start;
  gap: 10px;
  color: #2a2d25;
}

.tetris-side-screen,
.tetris-stat,
.tetris-status {
  border: 0;
  background: rgba(42, 45, 37, 0.08);
  box-shadow:
    inset 3px 4px 7px rgba(0, 0, 0, 0.16),
    inset -2px -2px 5px rgba(255, 255, 255, 0.08);
}

.tetris-side-screen {
  display: grid;
  justify-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 10px;
}

.tetris-next {
  width: 84px;
  height: 84px;
}

.tetris-stat {
  min-height: 50px;
  border-radius: 6px;
  padding: 8px 10px;
}

.tetris-stat span,
.tetris-status {
  color: #2a2d25;
  opacity: 0.78;
}

.tetris-stat strong {
  font-size: 21px;
  color: #2a2d25;
}

.tetris-status {
  width: 100%;
  min-height: 30px;
  border-radius: 5px;
}

.tetris-device-controls {
  display: none;
}

.tetris-controls {
  display: grid;
  grid-template-columns: 180px minmax(84px, 116px) 180px;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.tetris-command,
.tetris-controls button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbfbf7, #cfc9bd);
  color: #2a2d25;
  box-shadow:
    0 5px 7px rgba(42, 45, 37, 0.24),
    inset 0 2px 3px rgba(255, 255, 255, 0.86),
    inset 0 -3px 4px rgba(42, 45, 37, 0.22);
}

.tetris-command {
  width: 100%;
  min-height: 52px;
}

.tetris-pad {
  grid-template-rows: repeat(3, 48px);
  gap: 7px;
}

.tetris-pad button {
  border-radius: 12px;
}

.tetris-actions {
  grid-template-rows: repeat(2, 48px);
  gap: 10px;
}

@media (max-width: 720px) {
  .game-stage {
    align-items: start;
    overflow: auto;
    padding: 54px 10px 14px;
  }

  .tetris-device {
    width: 100%;
    border-radius: 24px;
    padding: 12px;
  }

  .tetris-lcd-frame {
    padding: 10px;
  }

  .tetris-lcd-surface {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 8px;
    padding: 8px;
  }

  .tetris-board {
    width: min(100%, 210px);
  }

  .tetris-next {
    width: 58px;
    height: 58px;
  }

  .tetris-side {
    gap: 6px;
  }

  .tetris-side-screen {
    padding: 6px;
  }

  .tetris-stat {
    min-height: 38px;
    padding: 5px;
  }

  .tetris-stat strong {
    font-size: 15px;
  }

  .tetris-status {
    min-height: 24px;
    font-size: 10px;
  }

  .tetris-controls {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 8px;
  }

  .tetris-pad {
    grid-template-rows: repeat(3, 34px);
    gap: 5px;
  }

  .tetris-actions {
    grid-template-rows: repeat(2, 34px);
    gap: 7px;
  }

  .tetris-command,
  .tetris-controls button {
    min-height: 34px;
    font-size: 10px;
  }
}

.shop-stage.shop-products-stage {
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  padding: 20px;
  padding-right: 20px;
}

.shop-stage.shop-products-stage::before {
  display: none;
}

.shop-stage.shop-products-stage .shop-main {
  width: min(100%, 980px);
  padding-right: 0;
}

.shop-stage.shop-products-stage .shop-cart-toggle {
  display: inline-grid;
}

.checkout-cart-stage {
  display: grid;
  min-height: 100vh;
  align-items: start;
  justify-items: center;
  padding: 20px;
  background: #ffffff;
}

.checkout-cart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  width: min(100%, 520px);
  min-height: calc(100vh - 40px);
}

.checkout-cart-panel .cart-head strong {
  min-width: 0;
}

.checkout-back-link {
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.checkout-cart-panel .account-copy-button {
  width: min(100%, 260px);
}

.checkout-cart-panel .cart-payment {
  justify-items: start;
}

.product-shape-board {
  position: relative;
  min-height: 180px;
  border: 1px solid var(--line);
  background: #ffffff;
  overflow: hidden;
}

.product-shape-board[hidden] {
  display: none;
}

.product-shape {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: #f4f4f4;
  color: var(--ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.product-shape:active,
.product-shape.is-dragging {
  cursor: grabbing;
}

.product-shape span {
  padding: 2px;
  overflow: hidden;
  max-width: 100%;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .shop-stage.shop-products-stage {
    padding: 12px;
  }

  .checkout-cart-stage {
    padding: 12px;
  }

  .checkout-cart-panel {
    min-height: calc(100dvh - 24px);
  }

  .product-shape-board {
    min-height: 150px;
  }
}

.shop-cart-panel {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  left: 0;
  width: 100vw;
  height: 100dvh;
  max-height: none;
  padding: 18px 10px;
  border-left: 0;
  background: #efefea;
  box-shadow: none;
  transition: none;
  touch-action: pan-y;
}

.shop-cart-panel[hidden] {
  display: none;
}

.shop-cart-panel.is-full {
  left: 0;
  width: 100vw;
  border-left: 0;
  box-shadow: none;
}

.shop-cart-panel.is-preview {
  cursor: pointer;
  transform: translateX(calc(100vw - 116px));
}

.shop-cart-panel.is-preview .cart-head,
.shop-cart-panel.is-preview .cart-empty,
.shop-cart-panel.is-preview .cart-total,
.shop-cart-panel.is-preview .cart-payment,
.shop-cart-panel.is-preview .product-shape-board {
  display: none;
}

.shop-cart-panel.is-preview .cart-items {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  width: 116px;
  overflow: hidden;
}

.shop-cart-panel.is-preview .cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.shop-cart-panel.is-preview .cart-item > img {
  width: 58px;
  height: 58px;
  border-color: transparent;
  background: #0f0f0f;
}

.shop-cart-panel.is-preview .cart-item-main {
  display: grid;
  justify-items: start;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

.shop-cart-panel.is-preview .cart-item-main strong,
.shop-cart-panel.is-preview .cart-item-main span {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-cart-panel.is-preview .cart-item-main span {
  color: var(--muted);
  font-size: 9px;
}

.shop-cart-panel.is-preview .cart-total {
  justify-content: start;
  font-size: 15px;
}

.shop-cart-panel.is-full .cart-payment {
  display: grid;
}

.shop-cart-panel.is-full .product-shape-board {
  display: block;
}

@media (max-width: 720px) {
  .shop-cart-panel {
    padding: 18px 7px;
  }

.shop-cart-panel.is-full {
  width: 100vw;
}

  .shop-cart-panel.is-preview .cart-item,
  .shop-cart-panel.is-preview .cart-item > img {
    width: 44px;
    height: 44px;
  }
}

.lp-art-button {
  overflow: visible;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.lp-art {
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
}

.lp-disc-ring {
  inset: 50%;
  width: 28%;
  aspect-ratio: 1;
  border: 0;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 0 0 12px #f2f2f2,
    inset 0 0 0 13px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%);
}

.lp-disc-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.lp-balance-row {
  display: grid;
  grid-template-columns: 18px minmax(150px, 220px) 18px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-balance-row span {
  text-align: center;
}

.lp-balance-row span:last-child {
  text-align: center;
}

.lp-balance {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.shop-cart-panel {
  --cart-peek: 116px;
  width: calc(100vw + var(--cart-peek));
}

.shop-cart-panel.is-full {
  width: 100vw;
  touch-action: none;
  transform: translateX(0);
}

.shop-cart-panel.is-preview {
  width: calc(100vw + var(--cart-peek));
  transform: translateX(calc(100vw - var(--cart-peek)));
}

.shop-cart-panel.is-preview .cart-items {
  width: var(--cart-peek);
}

@media (max-width: 720px) {
  .shop-cart-panel {
    --cart-peek: 86px;
  }

  .shop-cart-panel.is-preview,
  .shop-cart-panel.is-full {
    width: calc(100vw + var(--cart-peek));
  }

  .shop-cart-panel.is-full {
    width: 100vw;
  }

  .shop-cart-panel.is-preview {
    transform: translateX(calc(100vw - var(--cart-peek)));
  }

  .shop-cart-panel.is-preview .cart-items {
    width: var(--cart-peek);
  }
}

.shop-stage.shop-products-stage .shop-product {
  display: grid;
  grid-template-columns: 150px minmax(0, 120px);
  align-items: start;
  width: 286px;
}

.shop-stage.shop-products-stage .shop-product-media {
  width: 150px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.cart-item-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
}

.cart-item-price strong:first-child {
  text-align: left;
}

.cart-item-price > span {
  color: var(--muted);
  text-align: center;
}

.cart-item-price strong:last-child {
  text-align: right;
}

.cart-item-quantity button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.cart-item-quantity button:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
}

.cart-item-quantity button:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 1px;
}

.cart-item-quantity button:disabled {
  background: transparent;
  color: var(--muted);
  cursor: default;
  opacity: .6;
}

.cart-item-quantity span {
  min-width: 20px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.shop-cart-panel.is-preview .cart-item {
  grid-template-columns: 58px minmax(0, 1fr);
  width: 100%;
}

.shop-cart-panel.is-preview .cart-item > img {
  width: 58px;
  height: 58px;
}

@media (max-width: 720px) {
  .shop-stage.shop-products-stage .shop-product {
    grid-template-columns: 118px minmax(0, 82px);
    width: 210px;
  }

  .shop-stage.shop-products-stage .shop-product-media {
    width: 118px;
  }

  .shop-cart-panel.is-preview .cart-item {
    grid-template-columns: 44px minmax(0, 1fr);
    width: 100%;
  }

  .shop-cart-panel.is-preview .cart-item > img {
    width: 44px;
    height: 44px;
  }
}

.shop-cart-panel .cart-account-copy {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
}

.shop-cart-panel .cart-address-button {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
}

.shop-cart-panel .cart-payment.is-active .cart-account-copy {
  border-color: var(--ink);
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.shop-cart-panel .cart-payment.is-active .cart-address-button {
  border-color: var(--ink);
  cursor: pointer;
  filter: none;
  opacity: 1;
}

.shop-stage.shop-products-stage .shop-product {
  grid-template-columns: 150px minmax(0, 120px);
  align-items: start;
  width: 286px;
}

.shop-stage.shop-products-stage .shop-product-media {
  width: 150px;
}

.shop-stage.shop-products-stage .shop-product-info {
  display: grid;
  justify-content: start;
  gap: 4px;
  padding-top: 2px;
}

.shop-stage.shop-products-stage .shop-main {
  width: min(100%, 760px);
}

.shop-stage.shop-products-stage .shop-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 150px));
  gap: 20px;
  width: min(100%, 760px);
}

.shop-stage.shop-products-stage .shop-product {
  width: 150px;
}

.shop-cart-panel.is-preview {
  transform: translateX(calc(100vw - 116px));
}

.shop-cart-panel.is-full .cart-item {
  grid-template-columns: 76px minmax(0, 1fr);
  cursor: pointer;
}

.shop-cart-panel.is-full .cart-item > img {
  width: 76px;
  height: 76px;
}

.shop-cart-panel.is-full .cart-item-main strong {
  font-size: 16px;
}

@media (max-width: 720px) {
  .shop-stage.shop-products-stage .shop-list {
    grid-template-columns: repeat(auto-fill, minmax(118px, 118px));
    gap: 18px;
  }

  .shop-stage.shop-products-stage .shop-product {
    grid-template-columns: 118px minmax(0, 82px);
    width: 210px;
  }

  .shop-stage.shop-products-stage .shop-product-media {
    width: 118px;
  }

  .shop-cart-panel.is-preview {
    transform: translateX(calc(100vw - 86px));
    padding: 18px 7px;
  }

  .shop-cart-panel.is-preview .cart-items {
    width: 86px;
  }

  .shop-cart-panel.is-preview .cart-item > img {
    width: 44px;
    height: 44px;
  }

  .shop-cart-panel.is-full .cart-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .shop-cart-panel.is-full .cart-item > img {
    width: 64px;
    height: 64px;
  }
}

.shop-cart-panel.is-preview {
  transform: translateX(calc(100vw - 116px));
}

.shop-cart-panel.is-preview .cart-items {
  width: 116px;
  gap: 16px;
}

.shop-cart-panel.is-preview .cart-item {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
}

.shop-cart-panel.is-preview .cart-item > img {
  width: 58px;
  height: 58px;
}

.shop-cart-panel.is-preview .cart-item-main strong {
  font-size: 11px;
}

.shop-cart-panel.is-preview .cart-item-main span {
  font-size: 9px;
}

@media (max-width: 720px) {
  .shop-cart-panel.is-preview {
    transform: translateX(calc(100vw - 86px));
  }

  .shop-cart-panel.is-preview .cart-items {
    width: min(260px, calc(100vw - 22px));
    gap: 16px;
  }

  .shop-cart-panel.is-preview .cart-item {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 18px;
  }

  .shop-cart-panel.is-preview .cart-item > img {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 720px) {
  .shop-stage.shop-products-stage .shop-list {
    grid-template-columns: repeat(auto-fill, minmax(37.5vw, 37.5vw));
    gap: 20px;
  }

  .shop-stage.shop-products-stage .shop-product {
    grid-template-columns: 37.5vw minmax(0, 82px);
    width: calc(37.5vw + 92px);
  }

  .shop-stage.shop-products-stage .shop-product-media {
    width: 37.5vw;
    aspect-ratio: 1 / 1;
  }

  .shop-stage.shop-products-stage .shop-product-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .shop-cart-panel {
    --cart-peek: 25vw;
  }

  .shop-cart-panel.is-preview {
    transform: translateX(calc(100vw - var(--cart-peek)));
  }

  .shop-cart-panel.is-preview .cart-items {
    width: var(--cart-peek);
  }

  .shop-cart-panel.is-full .cart-item,
  .shop-cart-panel.is-preview .cart-item {
    grid-template-columns: 25vw minmax(0, 1fr) !important;
    gap: 18px !important;
    min-height: 25vw !important;
  }

  .shop-cart-panel.is-preview .cart-items {
    width: var(--cart-peek);
    overflow: visible;
  }

  .shop-cart-panel.is-full .cart-item,
  .shop-cart-panel.is-preview .cart-item {
    grid-template-columns: 25vw minmax(0, 1fr);
    width: 100%;
    height: auto;
    min-height: 25vw;
    align-items: center;
    gap: 18px;
  }

  .shop-cart-panel.is-full .cart-item > img,
  .shop-cart-panel.is-preview .cart-item > img {
    display: block;
    width: 25vw !important;
    height: 25vw !important;
    aspect-ratio: 1 / 1;
    min-width: 25vw;
    flex: 0 0 25vw;
    object-fit: cover;
  }

  .shop-cart-panel.is-full .cart-item-main strong,
  .shop-cart-panel.is-preview .cart-item-main strong {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  .shop-cart-panel.is-full .cart-item-main span,
  .shop-cart-panel.is-preview .cart-item-main span {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }
}

.shop-cart-panel {
  --cart-preview-width: calc(25vw + 25px);
  --cart-media-size: calc(25vw - 20px);
  --cart-preview-inset: calc((var(--cart-preview-width) - var(--cart-media-size)) / 2);
  --cart-peek: var(--cart-media-size);
  --cart-gap: 20px;
  --cart-text-width: 160px;
  align-content: start;
  gap: 0;
  grid-template-rows: auto 1fr;
  padding: var(--cart-gap) 0 0;
}

.shop-cart-panel {
  position: fixed;
}

.shop-cart-panel .cart-head,
.shop-cart-panel .cart-empty,
.shop-cart-panel .cart-total,
.shop-cart-panel .copy-status {
  display: none;
}

.shop-cart-panel.is-preview {
  padding: var(--cart-gap) 0 0;
  transform: translateX(75vw);
}

.shop-cart-panel.is-preview .cart-payment,
.shop-cart-panel.is-full .cart-payment {
  display: grid;
}

.shop-cart-panel .cart-items {
  align-content: start;
  width: calc(var(--cart-peek) + var(--cart-gap) + var(--cart-text-width));
  max-height: calc(100dvh - var(--cart-gap));
  gap: var(--cart-gap);
  overflow: visible;
  transform: translateX(var(--cart-gap));
}

.shop-stage.shop-products-stage .shop-product-info {
  padding-top: 20px;
}

.shop-cart-panel .cart-item {
  display: grid;
  grid-template-columns: var(--cart-peek) var(--cart-text-width) !important;
  align-items: start;
  gap: var(--cart-gap) !important;
  width: calc(var(--cart-peek) + var(--cart-gap) + var(--cart-text-width));
  min-height: var(--cart-peek);
}

.shop-cart-panel .cart-item > img {
  display: block;
  width: var(--cart-peek) !important;
  height: var(--cart-peek) !important;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 0;
  object-fit: cover;
}

.shop-cart-panel .cart-item-main {
  display: grid;
  align-self: start;
  gap: 4px;
  min-width: 0;
  padding: 0;
  width: var(--cart-text-width);
}

.shop-cart-panel .cart-item-main strong,
.shop-cart-panel .cart-item-main span {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-cart-panel .cart-item-main span {
  font-size: 11px !important;
}

.shop-cart-panel .cart-payment {
  justify-items: start;
  gap: var(--cart-gap);
  padding: var(--cart-gap) 0 0 var(--cart-gap);
}

.shop-cart-panel .cart-account-copy,
.shop-cart-panel .cart-address-button,
.shop-cart-panel .payment-link {
  width: var(--cart-peek);
  height: var(--cart-peek);
  margin: 0 var(--cart-gap) var(--cart-gap) 0;
}

.shop-cart-panel .cart-account-copy img {
  width: 42%;
  height: 42%;
}

.shop-cart-panel .cart-address-button img {
  width: 42%;
  height: 42%;
}

.shop-cart-panel .payment-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cart-gap);
  margin: 0;
}

.shop-stage.shop-products-stage {
  --shop-image-gap: 20px;
  --shop-product-image-size: 150px;
  --shop-product-info-width: 120px;
}

.shop-stage.shop-products-stage .shop-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shop-image-gap);
}

.shop-membership-divider {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--blue-dark);
  font-size: 13px;
}

.shop-membership-divider span {
  color: var(--blue);
  font-weight: 800;
  text-align: right;
}
.shop-stage.shop-products-stage .shop-product {
  grid-template-columns: var(--shop-product-image-size) minmax(0, 1fr);
  gap: var(--shop-image-gap);
  width: 100%;
}

.shop-stage.shop-products-stage .shop-product-media {
  border: 0;
  width: var(--shop-product-image-size);
}

.shop-stage.shop-products-stage .shop-product-info {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-content: start;
  gap: 4px;
  height: var(--shop-product-image-size);
  padding-top: 0;
}

.shop-product-name {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  align-self: end;
}
.shop-product-title { display: flex; width: 100%; min-width: 0; align-self: end; align-items: center; gap: 5px; flex-wrap: nowrap; }
.shop-product-title .shop-product-name { min-width: 0; overflow: hidden; align-self: auto; text-overflow: ellipsis; white-space: nowrap; }
.shop-product-name-tag { display: inline-grid; min-width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border-radius: 9px; padding: 0 5px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 900; line-height: 18px; white-space: nowrap; }
.shop-product-name-tag.is-sale { width: 24px; height: 24px; flex-basis: 24px; border-radius: 50%; padding: 0; background: #dc2626; font-size: 9px; line-height: 24px; }
.shop-product-color { position: relative; display: block; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--shop-product-color); box-shadow: 0 2px 5px rgba(17, 24, 39, 0.28); }
.shop-product-color.has-icons img { position: absolute; z-index: var(--icon-layer); top: 50%; left: calc(50% + var(--icon-offset)); display: block; width: 70%; height: 70%; object-fit: contain; transform: translate(-50%, -50%); }

.shop-stage.shop-products-stage .shop-product-price {
  align-self: center;
}
.shop-stage.shop-products-stage .shop-product-price.is-sale { display: flex; align-items: baseline; gap: 5px; color: #dc2626; }
.shop-stage.shop-products-stage .shop-product-price.is-sale del { color: #9aa3af; font-size: .78em; font-weight: 600; }

.shop-stage.shop-products-stage .shop-product-stock {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 7px;
}

.shop-product-stock-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #dc2626;
}

.shop-product-stock-dot.is-membership {
  background: var(--blue);
}

.shop-product-stock-dot.is-out {
  background: #9aa3af;
}

.shop-product-stock.is-membership {
  color: var(--blue);
}

.shop-product-stock.is-out {
  color: #9aa3af;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shop-product-media:disabled {
  cursor: default;
}

.shop-product.is-membership-locked .shop-product-image {
  filter: grayscale(1);
}

.shop-product.is-membership-locked .shop-product-stock {
  color: #9aa3af;
}

.shop-product.is-membership-locked .shop-product-stock-dot {
  background: #9aa3af;
}

.shop-cart-panel {
  --cart-gap: 20px;
}

.shop-cart-panel .cart-item {
  gap: var(--cart-gap) !important;
}

.shop-cart-panel .payment-link {
  border: 0;
}

.shop-cart-panel .cart-items,
.shop-cart-panel .cart-payment,
.shop-cart-panel .payment-links {
  gap: var(--cart-gap);
}

.shop-cart-panel .cart-payment {
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
}

.shop-cart-panel.is-preview .cart-items,
.shop-cart-panel.is-full .cart-items {
  gap: var(--cart-gap);
}

.shop-cart-panel .cart-account-copy,
.shop-cart-panel .cart-address-button,
.shop-cart-panel .payment-link {
  margin: 0;
}

.shop-cart-panel,
.shop-cart-panel.is-preview,
.shop-cart-panel.is-full {
  width: 100vw;
}

@media (max-width: 720px) {
  .shop-stage.shop-products-stage {
    --shop-product-image-size: 37.5vw;
    --shop-product-info-width: calc(62.5vw - var(--shop-image-gap) - 24px);
  }

  .shop-stage.shop-products-stage .shop-list {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--shop-image-gap);
  }

  .shop-membership-divider {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .shop-membership-divider span {
    text-align: left;
  }

  .shop-stage.shop-products-stage .shop-product {
    grid-template-columns: var(--shop-product-image-size) minmax(0, 1fr);
    gap: var(--shop-image-gap);
    width: 100%;
  }

  .shop-stage.shop-products-stage .shop-product-media {
    width: var(--shop-product-image-size);
  }

  .shop-cart-panel.is-full .cart-item,
  .shop-cart-panel.is-preview .cart-item {
    gap: var(--cart-gap) !important;
  }
}

.shop-cart-panel.is-preview {
  transform: translateX(75vw);
}

.shop-cart-panel.is-preview .cart-payment,
.shop-cart-panel.is-full .cart-payment {
  display: grid;
}

.shop-cart-panel.is-preview .cart-items,
.shop-cart-panel.is-full .cart-items {
  align-content: start;
  width: calc(var(--cart-media-size) + var(--cart-gap) + var(--cart-text-width));
  max-height: calc(100dvh - var(--cart-gap));
  gap: var(--cart-gap);
  overflow: visible;
  transform: translateX(var(--cart-preview-inset));
}

.shop-cart-panel.is-preview .cart-item,
.shop-cart-panel.is-full .cart-item {
  display: grid;
  grid-template-columns: var(--cart-media-size) var(--cart-text-width) !important;
  align-items: start;
  gap: var(--cart-gap) !important;
  width: calc(var(--cart-media-size) + var(--cart-gap) + var(--cart-text-width));
  min-height: var(--cart-media-size);
}

.shop-cart-panel.is-preview .cart-item > img,
.shop-cart-panel.is-full .cart-item > img {
  display: block;
  width: var(--cart-media-size) !important;
  height: var(--cart-media-size) !important;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 0;
  cursor: pointer;
  object-fit: cover;
}

.shop-cart-panel.is-preview .cart-item-main,
.shop-cart-panel.is-full .cart-item-main {
  display: grid;
  align-self: start;
  gap: 4px;
  min-width: 0;
  padding: 0;
  padding-top: calc(var(--cart-media-size) / 2);
  width: auto;
}

.shop-cart-panel.is-preview .cart-item-main strong,
.shop-cart-panel.is-preview .cart-item-main span,
.shop-cart-panel.is-full .cart-item-main strong,
.shop-cart-panel.is-full .cart-item-main span {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-cart-panel.is-preview .cart-item-main span,
.shop-cart-panel.is-full .cart-item-main span {
  color: #c91f2d;
  font-size: 11px !important;
}

.shop-cart-panel.is-preview .cart-payment,
.shop-cart-panel.is-full .cart-payment {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  gap: var(--cart-gap);
  padding: 0 var(--cart-gap) var(--cart-gap) 0;
}

.shop-cart-panel.is-preview .cart-total,
.shop-cart-panel.is-full .cart-total {
  position: absolute;
  left: var(--cart-gap);
  bottom: var(--cart-gap);
  display: flex;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.shop-cart-panel.is-preview .payment-links,
.shop-cart-panel.is-full .payment-links {
  display: grid;
  gap: var(--cart-gap);
}

.shop-cart-panel.is-preview .cart-total {
  left: calc(var(--cart-preview-inset) + (var(--cart-media-size) / 2));
  transform: translateX(-50%);
}

.shop-cart-panel.is-full .cart-total {
  transform: none;
}

.shop-cart-panel.is-preview .cart-account-copy,
.shop-cart-panel.is-preview .cart-address-button,
.shop-cart-panel.is-preview .payment-link,
.shop-cart-panel.is-full .cart-account-copy,
.shop-cart-panel.is-full .cart-address-button,
.shop-cart-panel.is-full .payment-link {
  width: var(--cart-media-size);
  height: var(--cart-media-size);
}

.cart-pay-button {
  display: grid;
  min-width: var(--cart-media-size, 64px);
  min-height: var(--cart-media-size, 64px);
  place-items: center;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 900;
}

.cart-pay-button:disabled {
  border-color: var(--line);
  cursor: default;
  filter: grayscale(1);
  opacity: 0.36;
}

/* Shop cart drawer */
.shop-cart-scrim { position: fixed; inset: 0; z-index: 118; background: rgba(11, 35, 72, .42); backdrop-filter: blur(2px); }
.shop-cart-scrim[hidden] { display: none; }
.shop-stage.shop-products-stage .shop-cart-panel {
  position: fixed; inset: 0 0 0 auto; z-index: 120; display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(420px, 92vw); height: 100dvh;
  border: 0; border-left: 1px solid #dbe7fb; border-radius: 24px 0 0 24px;
  background: #fff; padding: 18px; box-shadow: -18px 0 50px rgba(23, 78, 166, .18);
  transform: translateX(105%); transition: transform 280ms cubic-bezier(.22, .8, .3, 1); pointer-events: none;
}
.shop-stage.shop-products-stage .shop-cart-panel.is-open { transform: translateX(0); pointer-events: auto; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-head { display: flex; justify-content: flex-end; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-close { position: static; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: #eef5ff; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-close img { width: 19px; height: 19px; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-items { position: static; display: grid; align-content: start; gap: 10px; overflow-y: auto; padding: 8px 0 96px; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-total { position: static; justify-content: flex-end; padding: 12px 0 86px; color: #174ea6; font-size: 22px; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-payment { display: none; }
.shop-cart-fab {
  position: fixed; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 125;
  display: flex; width: 68px; height: 68px; align-items: center; justify-content: center; gap: 9px; overflow: hidden;
  border: 0; border-radius: 999px; background: #2673f0; color: #fff; padding: 0;
  box-shadow: 0 12px 30px rgba(38, 115, 240, .35); cursor: pointer;
  transition: width 280ms cubic-bezier(.22, .8, .3, 1), background 160ms ease, transform 160ms ease;
}
.shop-cart-fab:hover { background: #155bd1; }
.shop-cart-fab:active { transform: scale(.97); }
.shop-cart-fab.is-checkout { width: min(310px, calc(100vw - 44px)); padding: 0 22px; }
.shop-cart-fab-cart { width: 38px; height: 38px; object-fit: contain; opacity: 1; transition: opacity 280ms ease; }
.shop-cart-fab-product { position: absolute; width: 68px; height: 68px; border-radius: 50%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity 280ms ease; }
.shop-cart-fab.is-product-feedback .shop-cart-fab-cart { opacity: 0; }
.shop-cart-fab.is-product-feedback .shop-cart-fab-product { opacity: 1; }
.shop-cart-fab-card { display: none; width: 30px; height: 27px; object-fit: contain; }
.shop-cart-fab-label, .shop-cart-fab-total { display: none; white-space: nowrap; }
.shop-cart-fab.is-checkout .shop-cart-fab-cart { display: none; }
.shop-cart-fab.is-checkout .shop-cart-fab-card { display: block; }
.shop-cart-fab.is-checkout .shop-cart-fab-label, .shop-cart-fab.is-checkout .shop-cart-fab-total { display: inline; }
.shop-cart-fab-total { margin-left: auto; font-size: 15px; }
@media (max-width: 600px) {
  .shop-stage.shop-products-stage .shop-cart-panel { top: auto; width: 100%; height: min(78dvh, 680px); border-radius: 24px 24px 0 0; transform: translateX(105%); }
  .shop-stage.shop-products-stage .shop-cart-panel.is-open { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .shop-stage.shop-products-stage .shop-cart-panel, .shop-cart-fab { transition-duration: 1ms; } }

/* Cart interaction: bottom sheet + draggable cart control */
.shop-stage.shop-products-stage .shop-cart-panel,
.shop-stage.shop-products-stage .shop-cart-panel.is-open {
  top: auto;
  right: 0;
  bottom: 0;
  left: auto;
  width: var(--cart-panel-width, 136px);
  height: 100dvh;
  max-height: 100dvh;
  border: 1px solid #dbe7fb;
  border-bottom: 0;
  border-radius: 0;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(105%);
  transition: transform 280ms cubic-bezier(.22, .8, .3, 1), width 240ms cubic-bezier(.22, .8, .3, 1);
  container-type: inline-size;
}
.shop-stage.shop-products-stage .shop-cart-panel.is-open { transform: translateX(0); }
.shop-stage.shop-products-stage .shop-cart-panel .cart-head { display: none; }
.shop-cart-fab {
  right: max(34px, env(safe-area-inset-right));
  bottom: max(34px, env(safe-area-inset-bottom));
  width: var(--cart-button-width, 68px);
  touch-action: pan-y;
  user-select: none;
}
.shop-cart-fab-x { display: none; width: 24px; height: 24px; filter: brightness(0) invert(1); }
.shop-cart-fab.is-open-control .shop-cart-fab-cart { display: none; }
.shop-cart-fab.is-open-control .shop-cart-fab-product, .shop-cart-fab.is-checkout .shop-cart-fab-product, .shop-cart-fab.is-payment .shop-cart-fab-product { display: none; }
.shop-cart-fab.is-open-control .shop-cart-fab-x { display: none; }
.shop-cart-fab.is-open-control .shop-cart-fab-card { display: block; }
.shop-cart-fab.is-checkout { width: var(--cart-button-width, min(310px, calc(100vw - 44px))); }
.shop-cart-fab.is-payment .shop-cart-fab-cart,
.shop-cart-fab.is-payment .shop-cart-fab-x,
.shop-cart-fab.is-payment .shop-cart-fab-total { display: none; }
.shop-cart-fab.is-payment .shop-cart-fab-card { display: block; }
.shop-cart-fab-copy { display: none; width: 30px; height: 30px; object-fit: contain; }
.shop-cart-fab-check { display: none; width: 32px; height: 32px; object-fit: contain; }
.shop-cart-fab-spinner { display: none; width: 31px; height: 31px; object-fit: contain; }
.shop-cart-fab.is-payment.is-copy-action .shop-cart-fab-card { display: none; }
.shop-cart-fab.is-payment.is-copy-action .shop-cart-fab-copy { display: block; }
.shop-cart-fab.is-payment.is-confirm-action .shop-cart-fab-card, .shop-cart-fab.is-payment.is-confirm-action .shop-cart-fab-copy { display: none; }
.shop-cart-fab.is-payment.is-confirm-action .shop-cart-fab-check { display: block; }
.shop-cart-fab.is-payment.is-payment-locked .shop-cart-fab-card, .shop-cart-fab.is-payment.is-payment-locked .shop-cart-fab-copy, .shop-cart-fab.is-payment.is-payment-locked .shop-cart-fab-check, .shop-cart-fab.is-payment.is-payment-locked .shop-cart-fab-arrow { display: none; }
.shop-cart-fab.is-payment.is-payment-locked .shop-cart-fab-spinner { display: block; animation: shop-payment-spinner 700ms linear infinite; }
@keyframes shop-payment-spinner { to { transform: rotate(360deg); } }
.shop-cart-fab-arrow { display: none; width: 32px; height: 32px; object-fit: contain; }
.shop-cart-fab.is-payment.is-address-action .shop-cart-fab-card { display: none; }
.shop-cart-fab.is-payment.is-address-action .shop-cart-fab-arrow { display: block; }
.shop-cart-fab.is-payment-locked {
  background: #9aa3af;
  box-shadow: none;
  cursor: default;
  filter: grayscale(1);
}
.shop-cart-fab.is-empty-disabled { background: #9aa3af; box-shadow: none; cursor: default; filter: grayscale(1); }
.shop-payment-apps {
  position: fixed;
  right: max(34px, env(safe-area-inset-right));
  bottom: calc(max(34px, env(safe-area-inset-bottom)) + 102px);
  z-index: 126;
  display: grid;
  gap: 34px;
}
.shop-payment-apps[hidden] { display: none; }
.shop-payment-apps a {
  display: grid;
  width: 68px;
  height: 68px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 78, 166, .2);
}
.shop-payment-apps img { width: 100%; height: 100%; object-fit: cover; }
.payment-address-mode-toggle {
  position: fixed;
  right: max(34px, env(safe-area-inset-right));
  bottom: calc(max(34px, env(safe-area-inset-bottom)) + 102px);
  z-index: 126;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 78, 166, .2);
  animation: payment-address-mode-rise 280ms cubic-bezier(.22, .8, .3, 1) both;
}
.payment-address-mode-toggle[hidden] { display: none; }
.payment-address-mode-toggle img { width: 30px; height: 30px; object-fit: contain; }
.payment-address-mode-toggle.is-selected { background: #111; }
.payment-address-mode-toggle.is-selected img { filter: brightness(0) invert(1); }
@keyframes payment-address-mode-rise {
  from { opacity: 0; transform: translateY(86px); }
  to { opacity: 1; transform: translateY(0); }
}
.payment-account-plain {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 0;
  color: #174ea6;
}
.payment-account-plain span { font-size: 11px; }
.payment-account-plain strong { font-size: 16px; overflow-wrap: anywhere; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-flow-close { display: none; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-address-actions { grid-template-columns: minmax(0, 1fr); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-overlay {
  right: 0;
  left: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel {
  padding-top: max(18px, env(safe-area-inset-top));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.shop-stage.shop-products-stage .shop-cart-panel .payment-checkout-grid,
.shop-stage.shop-products-stage .shop-cart-panel .payment-address-actions,
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-grid {
  grid-template-columns: minmax(0, 1fr);
}
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-body,
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-body * {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.shop-stage.shop-products-stage .shop-cart-panel .cart-items {
  gap: 8px;
  width: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  padding: 10px 0 92px;
  transform: none;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-items::-webkit-scrollbar,
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel::-webkit-scrollbar,
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel,
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-item {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0 0 10px;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-item > img {
  width: 64px !important;
  height: 64px !important;
  justify-self: center;
  border-radius: 10px;
  object-fit: cover;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-item-main {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: center;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-item-main strong,
.shop-stage.shop-products-stage .shop-cart-panel .cart-item-main span {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-stage.shop-products-stage .shop-cart-panel .cart-item-main span { font-size: 10px !important; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-empty { padding: 12px 4px; font-size: 11px; text-align: center; }
.shop-stage.shop-products-stage .shop-cart-panel .cart-total {
  padding: 10px 0 88px;
  font-size: 15px;
  line-height: 1.2;
}

@container (min-width: 220px) {
  .shop-stage.shop-products-stage .shop-cart-panel .cart-item {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: center;
    gap: 10px;
  }
  .shop-stage.shop-products-stage .shop-cart-panel .cart-item > img { width: 72px !important; height: 72px !important; }
  .shop-stage.shop-products-stage .shop-cart-panel .cart-item-main { text-align: left; }
  .shop-stage.shop-products-stage .shop-cart-panel .cart-item-main strong { font-size: 13px !important; }
  .shop-stage.shop-products-stage .shop-cart-panel .cart-item-main span { font-size: 11px !important; }
  .shop-stage.shop-products-stage .shop-cart-panel .cart-total { font-size: 18px; }
}

@media (max-width: 600px) {
  :root { --mobile-cart-side-gap: 20px; }
  .shop-cart-fab { right: max(var(--mobile-cart-side-gap), env(safe-area-inset-right)); }
  .shop-payment-apps { right: max(var(--mobile-cart-side-gap), env(safe-area-inset-right)); }
  .shop-cart-fab.is-checkout {
    width: var(--cart-button-width, calc(100vw - (var(--mobile-cart-side-gap) * 2)));
  }
  .shop-stage.shop-products-stage .shop-cart-panel,
  .shop-stage.shop-products-stage .shop-cart-panel.is-open {
    top: auto;
    right: 0;
    left: auto;
    width: var(--cart-panel-width, 136px);
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateX(105%);
  }
  .shop-stage.shop-products-stage .shop-cart-panel.is-open { transform: translateX(0); }
}

.payment-overlay {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 140;
  display: grid;
  align-items: stretch;
  background: #ffffff;
  width: 50vw;
  min-width: min(100vw, 420px);
  max-width: 100vw;
  padding: 0;
}

.payment-flow-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  width: 100%;
  min-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--ink);
  background: #ffffff;
  padding: 20px;
}

.payment-flow-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.payment-flow-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.payment-flow-body {
  display: grid;
  gap: 12px;
}

.payment-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.payment-step-grid button,
.payment-back-button,
.payment-shipping-toggle,
.payment-unit-submit,
.payment-request-button,
.payment-toss-link,
.overlay-account-copy {
  min-height: 48px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 10px;
  font: inherit;
  font-weight: 900;
}

.payment-toss-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.payment-unit-form {
  display: grid;
  gap: 8px;
}

.payment-unit-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.payment-unit-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
}

.payment-unit-help,
.payment-unit-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.payment-unit-help {
  color: var(--muted);
}

.payment-unit-error {
  color: #d31313;
  font-weight: 900;
}

.payment-unit-submit {
  justify-self: stretch;
}

.payment-request-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.payment-address-form {
  display: grid;
  gap: 10px;
}

.payment-address-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payment-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.payment-purchase-list {
  display: grid;
  gap: 8px;
}

.payment-purchase-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 8px;
}

.payment-purchase-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.payment-purchase-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-purchase-item strong,
.payment-purchase-item span,
.payment-purchase-total {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.payment-purchase-item span {
  color: var(--muted);
}

.payment-purchase-total {
  border: 1px solid var(--ink);
  padding: 10px;
}

.payment-wheel-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 8px;
}

.payment-wheel-column {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.payment-wheel-column > strong {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.payment-wheel-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  padding: 6px;
  scroll-snap-type: y proximity;
}

.payment-wheel-option {
  min-height: 42px;
  border: 1px solid transparent;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  scroll-snap-align: center;
}

.payment-wheel-option.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.payment-unit-field {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  padding: 8px;
}

.payment-unit-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.payment-back-button {
  justify-self: start;
  min-width: 108px;
}

.payment-selected-place {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.payment-shipping-toggle {
  min-width: 48px;
}

.payment-shipping-toggle.is-selected {
  background: var(--ink);
  color: #ffffff;
}

.overlay-account-copy {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 72px;
}

.overlay-account-copy.is-copied {
  border-color: #999999;
  background: #e6e6e6;
  color: #6f6f6f;
}

.overlay-account-copy.is-copied span,
.overlay-account-copy.is-copied small,
.overlay-account-copy.is-copied strong {
  color: #6f6f6f;
}

.overlay-account-copy span,
.overlay-account-copy small {
  color: var(--muted);
  font-size: 12px;
}

.overlay-account-copy strong {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 720px) {
  .payment-overlay {
    width: 100vw;
    min-width: 0;
  }

  .payment-checkout-grid,
  .payment-address-actions {
    grid-template-columns: 1fr;
  }
}

.overlay-payment-links {
  display: flex;
  gap: 10px;
}

.address-stage,
.contact-stage,
.order-info-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #ffffff;
  padding: 16px;
}

.address-panel,
.contact-panel,
.order-info-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  border: 1px solid var(--ink);
  padding: 16px;
}

.address-panel h1,
.contact-panel h1,
.order-info-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.contact-form,
.contact-admin-login,
.contact-list,
.contact-card {
  display: grid;
  gap: 10px;
}

.contact-form textarea,
.contact-admin-login input {
  width: 100%;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  font: inherit;
  font-weight: 900;
  resize: vertical;
}

.contact-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-form-foot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.contact-form button,
.contact-admin-login button {
  min-height: 44px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
}

.contact-card,
.contact-empty {
  border: 1px solid var(--line);
  padding: 10px;
}

.contact-card p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.contact-card time,
.contact-card small,
.contact-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.contact-card [data-delete-contact] { justify-self: end; min-height: 36px; border: 0; border-radius: 10px; background: #fee2e2; color: #b91c1c; padding: 0 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }

.address-place-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.address-place-grid button,
.address-save,
.address-skip,
.order-info-refresh {
  min-height: 48px;
  border: 1px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.address-skip {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0 14px;
  text-decoration: none;
  z-index: 10;
}

.address-form {
  display: grid;
  gap: 10px;
}

.order-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-info-head a {
  color: var(--ink);
  font-weight: 900;
}

.order-info-status {
  border: 1px solid var(--ink);
  padding: 12px;
  font-size: 22px;
  font-weight: 900;
}

.order-info-status[data-status="paid"],
.order-info-status[data-status="packing"],
.order-info-status[data-status="shipping"],
.order-info-status[data-status="done"] {
  background: var(--ink);
  color: #ffffff;
}

.order-info-status[data-status="rejected"],
.order-info-status[data-status="error"] {
  border-color: #d31313;
  color: #d31313;
}

.order-info-meta,
.order-info-items {
  display: grid;
  gap: 8px;
}

.order-info-meta span,
.order-info-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-info-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 8px;
}

.order-info-item img,
.order-info-thumb {
  width: 54px;
  height: 54px;
  background: #808080;
  object-fit: cover;
}

.order-info-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-info-total {
  justify-self: end;
  font-size: 22px;
}

@media (max-width: 520px) {
  .payment-step-grid {
    grid-template-columns: 1fr;
  }

  .payment-flow-panel {
    width: 100%;
  }

  .payment-wheel-grid {
    grid-template-columns: 1fr;
  }

  .payment-wheel-list {
    max-height: 150px;
  }

  .address-place-grid {
    grid-template-columns: 1fr;
  }
}

.lp-file-stage {
  display: grid;
  min-height: 100vh;
  align-items: start;
  justify-items: center;
  padding: 20px;
  background: #ffffff;
}

.lp-file-player {
  display: grid;
  gap: 16px;
  width: min(100%, 720px);
}

.lp-file-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.lp-file-head div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lp-file-head span,
.lp-file-head strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-file-head h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.08;
}

.lp-hidden-input {
  display: none;
}

.lp-file-controls {
  display: grid;
  grid-template-columns: 42px 58px 42px;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.lp-slider-row {
  display: grid;
  grid-template-columns: 42px minmax(150px, 260px);
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-slider-row input {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.lp-eq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-eq-row button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.lp-eq-row button.is-active {
  border-color: var(--ink);
  background: #f7f7f7;
}

.lp-file-list {
  max-height: none;
}

.lp-file-list .lp-empty {
  display: grid;
  gap: 10px;
  min-height: 112px;
  place-items: center;
  border: 1px solid var(--line);
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.lp-file-list.is-drop-ready .lp-empty,
.lp-file-list.is-drop-ready {
  border-color: var(--ink);
}

.lp-track-list.lp-file-list .lp-empty button {
  display: inline-grid;
  grid-template-columns: none;
  width: auto;
  min-height: 32px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.lp-file-list .lp-empty div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lp-track-list.lp-file-list .lp-empty div button {
  min-height: 32px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #ffffff;
  font-size: 12px;
}

.lp-file-list .lp-empty span {
  color: var(--muted);
  font-size: 12px;
}

.lp-source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lp-source-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.lp-source-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lp-file-list .lp-track-row {
  display: block;
}

.lp-file-list .lp-track-row.is-dragging {
  opacity: 0.45;
}

.lp-file-list .lp-track-row button {
  min-height: 46px;
}

.lp-file-list .lp-track-row.is-active button {
  border-color: var(--ink);
  background: #f7f7f7;
}

.lp-file-list .lp-track-row[draggable="true"] button {
  cursor: grab;
}

.lp-file-list .lp-track-row[draggable="true"] button:active {
  cursor: grabbing;
}

.address-map-stage {
  place-items: stretch;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(15, 15, 15, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(15, 15, 15, 0.045) 1px, transparent 1px),
    #ffffff;
  background-size: 32px 32px;
}

.address-map-panel {
  display: grid;
  grid-template-rows: auto minmax(340px, 1fr) auto;
  gap: 12px;
  width: min(100%, 980px);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
}

.address-map-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
}

.address-map-head h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.address-back,
.address-map-controls button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.address-map-controls {
  display: flex;
  gap: 8px;
}

.address-map-controls button {
  cursor: pointer;
}

.apartment-map {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 48, 56, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(255, 48, 56, 0.11) 1px, transparent 1px),
    #f9f9f9;
  background-size: 72px 72px;
  touch-action: none;
  cursor: grab;
}

.apartment-map.is-dragging {
  cursor: grabbing;
}

.apartment-map-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1036px;
  height: 812px;
  transform-origin: 0 0;
}

.apartment-map-block {
  position: absolute;
  border: 2px solid #d8d8d8;
  border-radius: 0;
  background: #ffffff;
}

.apartment-map-block span {
  position: absolute;
  left: 50%;
  top: 50%;
  color: #ff3038;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.apartment-map-tile {
  position: absolute;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  width: 152px;
  min-height: 96px;
  padding: 12px;
  border: 2px solid #d8d8d8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
  z-index: 2;
}

.apartment-map-tile::after {
  content: none;
}

.apartment-map-tile.is-selected {
  border-color: #ff3038;
}

.apartment-map-tile.is-selected::after {
  border-color: #ff3038;
}

.apartment-map-tile img {
  align-self: center;
  justify-self: center;
  max-width: 112px;
  max-height: 42px;
  object-fit: contain;
}

.apartment-map-tile span {
  display: block;
  max-width: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.address-selection {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr minmax(160px, 190px) minmax(150px, 180px);
  align-items: center;
  gap: 10px;
}

.address-selection > strong {
  min-width: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.address-building-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
}

.address-building-option {
  flex: 0 0 auto;
  min-width: 62px;
  height: 38px;
  border: 2px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.address-building-option.is-selected {
  border-color: #ff3038;
  color: #ff3038;
}

.address-map-panel .payment-unit-field {
  margin: 0;
}

.address-map-panel .payment-unit-error {
  grid-column: 1 / -1;
  margin: 0;
}

.address-map-stage .address-skip {
  position: static;
  justify-self: end;
  align-self: end;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .address-map-stage {
    padding: 10px;
  }

  .address-map-panel {
    grid-template-rows: auto minmax(330px, 54vh) auto;
    min-height: calc(100vh - 108px);
  }

  .address-map-head {
    grid-template-columns: 40px 1fr auto;
  }

  .address-back,
  .address-map-controls button {
    width: 40px;
    height: 40px;
  }

  .address-map-head h1 {
    font-size: 19px;
  }

  .address-selection {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .address-selection > strong {
    text-align: center;
  }

  .address-save {
    width: 100%;
  }

  .address-map-stage .address-skip {
    justify-self: stretch;
    text-align: center;
  }
}
/* Policy pages */
.policy-page { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; line-height: 1.7; }
.policy-page h1 { margin-bottom: 32px; }
.policy-page section { margin: 28px 0; }
.policy-page a { color: inherit; text-underline-offset: 3px; }

/* Geckobi account */
.account-page { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; color: #111; }
.account-home { display: inline-block; margin-bottom: 28px; color: inherit; font-weight: 800; text-decoration: none; }
.account-card { margin-bottom: 20px; padding: 24px; border: 1px solid #ddd; border-radius: 18px; background: #fff; }
.account-address-text { padding: 12px 0; }
.account-address-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-page .account-address-display { min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 4px 0; color: #444; text-align: left; line-height: 1.5; }
.account-page .account-address-display:disabled { opacity: 1; cursor: default; }
.account-page .account-address-edit { min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 4px 0; color: var(--blue); box-shadow: none; }
.account-page .account-address-edit:hover { color: var(--blue-hover); }
.account-address-form { display: grid; gap: 10px; margin-top: 12px; }
.account-address-form label { display: grid; gap: 5px; font-weight: 700; }
.account-address-form input { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; }
.account-address-form > div { display: flex; gap: 8px; }
.account-address-form p { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.account-membership-card { position: relative; display: grid; gap: 10px; padding: 12px 0; }
.account-membership-toggle { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; border: 0 !important; background: transparent !important; padding: 0 !important; color: #111 !important; text-align: left; }
.account-membership-title { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; }
.account-membership-title i { width: 9px; height: 9px; border-radius: 50%; background: #b8bec8; }
.account-membership-title i.is-active { background: var(--blue); }
.account-membership-toggle strong { color: #667085; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.account-membership-toggle.is-active strong { color: #2563eb; text-decoration: none; }
.account-page .membership-password-reveal { justify-self: end; min-height: 32px; border: 0; border-radius: 0; background: transparent; padding: 0; color: var(--blue-dark); }
.membership-password-reveal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.membership-password-reveal.is-revealed { font-weight: 900; letter-spacing: .08em; }
.account-membership-form { position: absolute; top: 24px; right: 24px; display: grid; grid-template-columns: 120px auto; gap: 7px; }
.account-membership-form input { min-height: 40px; min-width: 0; border: 1px solid #2563eb; border-radius: 10px; padding: 0 11px; font: inherit; letter-spacing: .15em; text-transform: uppercase; }
.account-membership-form button { min-height: 40px; padding: 0 12px; }
.account-membership-card .account-error { min-height: 18px; margin: 0; }
.account-logout { min-height: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #dc2626 !important; padding: 4px 0 !important; box-shadow: none !important; text-decoration: underline; text-underline-offset: 3px; }
.account-logout:hover { background: transparent !important; color: #b91c1c !important; }
.account-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.account-google-signin { display: grid; min-height: 44px; margin-top: 14px; place-items: center; }
.account-page button, .account-shop-link { min-height: 48px; padding: 12px 18px; border: 1px solid #111; border-radius: 12px; background: #111; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.account-page button:disabled { opacity: .4; cursor: default; }
.account-form { display: grid; gap: 16px; margin-top: 24px; }
.account-form label { display: grid; gap: 7px; font-weight: 700; }
.account-form input,
.account-form select { min-height: 48px; padding: 0 14px; border: 1px solid #aaa; border-radius: 10px; background: #fff; font: inherit; }
.account-password-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-info-list { display: grid; gap: 8px; margin-bottom: 12px; }
.account-nickname { display: block; margin-bottom: 12px; font-size: 20px; }
.account-settings-menu { display: grid; margin-top: 22px; border-top: 1px solid var(--line); }
.account-settings-menu a { display: flex; min-height: 56px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: #111; font-weight: 800; text-decoration: none; }
.account-settings-menu a::after { content: "›"; color: #98a2b3; font-size: 24px; font-weight: 400; }
.account-info-row, .account-address-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.account-info-row button, .account-address-row button { min-height: 36px; border: 0; background: transparent; color: #2563eb; font-weight: 800; cursor: pointer; }
.account-inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.account-inline-form input { min-width: 0; min-height: 42px; border: 1px solid #aaa; border-radius: 10px; padding: 0 12px; font: inherit; }
.payment-password-confirm { display: grid; gap: 6px; grid-column: 1 / -1; font-size: 13px; font-weight: 800; }
.payment-password-confirm input { min-height: 44px; border: 1px solid #ccd0d5; border-radius: 10px; padding: 0 12px; font: inherit; }
.account-error { color: #b00020; }
.recovery-card code { display: block; overflow-wrap: anywhere; margin: 20px 0; padding: 16px; border-radius: 10px; background: #f1f1f1; font-size: 16px; user-select: all; }
.recovery-confirm { display: block; margin: 20px 0; }
.account-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.account-header h1 { margin: 2px 0 0; font-size: 40px; letter-spacing: .12em; }
.account-order { padding: 18px 0; border-bottom: 1px solid #ddd; }
.account-order:last-child { border-bottom: 0; }
.account-order > div { display: flex; justify-content: space-between; gap: 14px; }
.account-order time { color: #666; font-size: 13px; }
.account-shop-link { display: block; text-align: center; text-decoration: none; }
@media (max-width: 560px) { .account-choice-grid { grid-template-columns: 1fr; } .account-membership-form { top: 20px; right: 20px; grid-template-columns: 105px auto; } }

/* Modern address and payment flow */
.shop-stage.shop-products-stage .shop-cart-panel .payment-overlay { background: #f5f7fb; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel { gap: 20px; border: 0; background: #f5f7fb; padding: max(24px, env(safe-area-inset-top)) clamp(18px, 4vw, 32px) calc(112px + env(safe-area-inset-bottom)); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel h2 { position: sticky; top: 0; z-index: 2; margin: -4px 48px 0 0; color: #111827; font-size: clamp(24px, 6vw, 32px); font-weight: 850; letter-spacing: -.04em; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-close { top: max(18px, env(safe-area-inset-top)); right: clamp(18px, 4vw, 32px); display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: #e9edf5; color: #4b5563; font-size: 16px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-flow-body { gap: 16px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; border: 1px solid #e5e9f0; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(31, 41, 55, .06); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-column { gap: 9px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-column > strong { padding: 0 4px; color: #8a94a6; font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-list { gap: 5px; max-height: min(42dvh, 320px); border: 0; border-radius: 14px; background: #f4f6f9; padding: 5px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-option { min-height: 48px; border: 0; border-radius: 10px; background: transparent; color: #4b5563; padding: 8px 10px; font-size: 13px; font-weight: 700; text-align: center; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-option.is-selected { background: #2563eb; color: #fff; box-shadow: 0 6px 14px rgba(37, 99, 235, .25); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-unit-field { gap: 8px; border: 0; border-radius: 14px; background: #f4f6f9; padding: 10px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-unit-field input { width: 100%; min-height: 48px; border: 2px solid transparent; border-radius: 10px; background: #fff; padding: 0 8px; color: #111827; font-size: 17px; font-weight: 800; text-align: center; outline: 0; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-unit-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-unit-help, .shop-stage.shop-products-stage .shop-cart-panel .payment-unit-error { padding: 0 6px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-selected-place { min-height: 64px; border: 1px solid #e5e9f0; border-radius: 16px; background: #fff; padding: 16px 48px 16px 18px; color: #111827; font-size: 14px; line-height: 1.45; box-shadow: 0 8px 24px rgba(31, 41, 55, .05); }
button.payment-selected-place { position: relative; }
button.payment-selected-place::after { content: "수정"; position: absolute; top: 50%; right: 16px; color: #2563eb; font-size: 12px; transform: translateY(-50%); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-address-actions { gap: 10px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-shipping-toggle { min-height: 52px; border: 1px solid #e5e9f0; border-radius: 14px; background: #fff; color: #667085; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-shipping-toggle::before { content: "배송 없이 직접 수령"; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-shipping-toggle.is-selected { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-purchase-list { gap: 10px; padding: 14px; border: 1px solid #e5e9f0; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(31, 41, 55, .06); }
.shop-stage.shop-products-stage .shop-cart-panel .payment-purchase-item { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; border: 0; border-bottom: 1px solid #eef1f5; padding: 6px 0 12px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-purchase-item img { width: 58px; height: 58px; border-radius: 13px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-purchase-total { border: 0; padding: 10px 2px 2px; color: #111827; font-size: 18px; text-align: right; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-account-plain { gap: 8px; border: 1px solid #dbe7ff; border-radius: 18px; background: #eef5ff; padding: 18px; color: #1d4ed8; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-account-plain span { color: #667085; font-size: 12px; font-weight: 700; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-account-plain strong { color: #174ea6; font-size: clamp(18px, 5vw, 24px); letter-spacing: .02em; }
@media (max-width: 390px) { .shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel { padding-right: 14px; padding-left: 14px; } .shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-grid { gap: 6px; padding: 10px; } .shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-option { padding: 6px 4px; font-size: 12px; } }
.shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-column:first-child { width: 100%; min-width: 0; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-apartment-suggestions { display: grid; gap: 4px; max-height: min(36dvh, 280px); overflow-y: auto; border-radius: 12px; background: #f4f6f9; padding: 5px; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-apartment-suggestion { min-height: 46px; border: 0; border-radius: 9px; background: transparent; color: #374151; padding: 8px; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.25; text-align: left; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-apartment-suggestion:active { background: #e5edff; color: #1d4ed8; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-apartment-empty { margin: 0; padding: 14px 8px; color: #8a94a6; font-size: 12px; line-height: 1.4; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-step-selection { min-height: 48px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; color: #1d4ed8; padding: 10px 14px; font: inherit; font-weight: 800; text-align: left; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-overlay { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 600px) { .shop-stage.shop-products-stage .shop-cart-panel .payment-flow-panel { min-height: 100%; padding-bottom: calc(120px + env(safe-area-inset-bottom)); } .shop-stage.shop-products-stage .shop-cart-panel .payment-apartment-suggestions, .shop-stage.shop-products-stage .shop-cart-panel .payment-wheel-list { max-height: min(44dvh, 320px); } }
body:has(.shop-cart-panel.is-address-step) { overflow: hidden; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-overlay, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-flow-panel, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-flow-body, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestions, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-list { scrollbar-width: none; -ms-overflow-style: none; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step::-webkit-scrollbar, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-overlay::-webkit-scrollbar, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-flow-panel::-webkit-scrollbar, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-flow-body::-webkit-scrollbar, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestions::-webkit-scrollbar, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-grid { border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestions, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-list { border: 0; border-radius: 0; background: transparent; padding: 0; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestion, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-option { position: relative; display: block; width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid #e5e7eb; border-radius: 0; background: transparent; color: #374151; padding: 10px 6px 10px 26px; font: inherit; font-weight: 700; text-align: left; box-shadow: none; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestion::before, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-option::before { position: absolute; top: 50%; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; content: ""; transform: translateY(-50%); }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-apartment-suggestion:active, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-wheel-option:active { background: transparent; color: #2563eb; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-step-selection { position: relative; min-height: 44px; border: 0; border-bottom: 1px solid #e5e7eb; border-radius: 0; background: transparent; color: #111827; padding: 10px 6px 10px 26px; box-shadow: none; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-step-selection::before { position: absolute; top: 50%; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; content: ""; transform: translateY(-50%); }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-field, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-field input, .shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-field input:focus { min-height: 44px; border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; outline: 0; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-field input { color: #111827; font-size: 22px; font-weight: 800; text-align: left; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-step .payment-unit-field { position: relative; padding-left: 26px; }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-step .payment-unit-field::before { position: absolute; top: 50%; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; content: ""; transform: translateY(-50%); }
.shop-stage.shop-products-stage .shop-cart-panel.is-address-step .payment-unit-step.is-unit-valid .payment-unit-field::before { background: #2563eb; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-delivery-choice { display: grid; gap: 0; width: 100%; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-delivery-choice button { display: flex; min-height: 56px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #e5e7eb; border-radius: 0; background: transparent; color: #111827; padding: 10px 6px; font: inherit; font-size: 18px; font-weight: 800; text-align: left; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-delivery-choice button span { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #d1d5db; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-delivery-choice button:active span { background: #2563eb; }
.shop-stage.shop-products-stage .shop-cart-panel .payment-input-suffix { color: #111827; font-size: 22px; font-weight: 800; }
.shop-stage.shop-products-stage .shop-cart-panel.is-payment-ready .payment-ready-address, .shop-stage.shop-products-stage .shop-cart-panel.is-payment-ready .payment-purchase-total { min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 8px 2px; box-shadow: none; }

.shop-stage.shop-products-stage .shop-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.shop-stage.shop-products-stage .shop-product {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.shop-stage.shop-products-stage .shop-product-media {
  width: 100%;
  aspect-ratio: 1;
}

.shop-stage.shop-products-stage .shop-product-info {
  display: grid;
  grid-template-rows: auto auto;
  justify-content: stretch;
  gap: 4px;
  height: auto;
  padding-top: 0;
}

.shop-stage.shop-products-stage .shop-product-title,
.shop-stage.shop-products-stage .shop-product-price {
  align-self: auto;
}

.shop-stage.shop-products-stage .shop-cart-panel,
.shop-stage.shop-products-stage .shop-cart-panel.is-open {
  width: 50vw;
}
