:root {
  --wood: #2a2118;
  --alu: #c9cacd;
  --alu2: #9ea0a5;
  --ink: #f5f5f7;
  --muted: #c8c8cc;
  --mint: #3ee05a;
  --blue: #0b6fd6;
  --screen: #050505;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #16110d;
  font-size: 16px;
}
a { color: inherit; }
button, input { font: inherit; }
img, video { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid #64d2ff; outline-offset: 2px; }
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: #fff;
  color: #111;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.skip:focus { left: 8px; }

.world {
  min-height: 100vh;
  padding: 20px 14px 48px;
  background:
    linear-gradient(180deg, rgba(20,10,8,.38), rgba(12,8,6,.7)),
    url("assets/mac-shop.jpg") center 22% / cover no-repeat,
    #1a1510;
}

.brandbar {
  width: min(1100px, 100%);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brandbar a.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f3efe6;
  font-weight: 700;
  letter-spacing: .02em;
}
.brandbar img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  padding: 3px;
  background: linear-gradient(160deg, #f4f5f7 0%, #b4b6bb 48%, #8a8c91 100%);
  box-shadow: 0 10px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.8);
  transform: rotate(-7deg);
  transition: transform .2s ease;
}
.brandbar a.mark:hover img { transform: rotate(0) scale(1.06); }
.ticket {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #f3efe6;
  padding: 7px 10px;
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", "IBM Plex Mono", monospace;
  font-size: 11px;
}
.ticket a { color: #d7e7ff; }
.ticket button {
  border: 0;
  background: #f5f5f7;
  color: #111;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 44px;
  cursor: pointer;
}

.mbp {
  width: min(1180px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 40px 50px rgba(0,0,0,.5));
}
.mbp-lid {
  background: linear-gradient(180deg, #dddfe3 0%, #c4c6cb 42%, #9b9da3 100%);
  border-radius: 22px 22px 8px 8px;
  padding: 12px 13px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px #8d8f94;
}
.mbp-chin {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mbp-cam {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a3a3a, #111);
  box-shadow: 0 0 0 2px #7c7e83;
}
.mbp-chin b {
  position: absolute;
  right: 8px;
  font-size: 12px;
  letter-spacing: .18em;
  color: #3a3c41;
  font-weight: 700;
}
.mbp-screen {
  background: var(--screen);
  color: #f5f5f7;
  min-height: 640px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px #111;
}
.mbp-screen a { color: #7ab8ff; }
.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wallpaper video, .wallpaper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,8,.2), rgba(5,5,8,.72));
}
.os {
  position: relative;
  z-index: 1;
  min-height: 640px;
  display: flex;
  flex-direction: column;
}
.menubar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 7px 12px;
  background: rgba(28,28,30,.72);
  backdrop-filter: blur(16px);
  font-size: 13px;
}
.menubar .apple {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  padding: 1px;
  background: linear-gradient(160deg, #eee, #9a9ca1);
  box-shadow: 0 1px 0 rgba(255,255,255,.3);
  transform: rotate(-8deg);
}
.menubar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.menubar a {
  text-decoration: none;
  color: #f5f5f7;
  min-height: 44px;
  padding: 10px 6px;
  display: inline-flex;
  align-items: center;
}
.menubar a[aria-current="page"] { color: #64d2ff; }
.menubar .ca { margin-left: auto; font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; }
.desk {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  padding: 18px;
}
.window, .card, .hero-copy {
  background: rgba(28,28,30,.82);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(14px);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -6px -6px 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,.05);
  border-radius: 10px 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3a3f48; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }
.vid-win { padding: 8px; }
.vid-win video {
  width: 100%;
  border-radius: 8px;
  display: block;
  background: #000;
  max-height: 420px;
  object-fit: contain;
}

.stamp {
  display: inline-block;
  border: 1px solid #ff9f0a;
  color: #ff9f0a;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 3px 7px;
  font-size: 11px;
  border-radius: 6px;
}
.kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(32px, 5vw, 54px);
  line-height: .95;
  margin: 10px 0 12px;
  font-weight: 700;
}
.lead, .answer, p { line-height: 1.55; }
.answer {
  background: rgba(10,132,255,.12);
  border-left: 3px solid var(--blue);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.facts li { background: rgba(255,255,255,.04); padding: 10px; border-radius: 8px; }
.facts b { display: block; font-size: 20px; }

.buy-win h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: .06em; }
.buy-win label { display: block; font-size: 11px; color: var(--muted); margin: 12px 0 6px; }
.buy-win input {
  width: 100%;
  background: #0b0b0d;
  border: 1px solid #333;
  color: var(--mint);
  padding: 11px;
  border-radius: 8px;
}
.btn, .connect-button, .buy-open {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: #f5f5f7;
  color: #111;
  font-weight: 700;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 980px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.connect-button.ghost, .btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.cta { width: 100%; margin-top: 14px; background: var(--blue); color: #fff; }
.sale-status { min-height: 18px; font-size: 12px; margin-top: 8px; }
.sale-status.err { color: #ff6961; }
.sale-status.ok { color: var(--mint); }

.icons { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.icon { width: 76px; text-align: center; text-decoration: none; color: #fff; font-size: 12px; }
.icon i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  background: #2c2c2e;
  border-radius: 12px;
}

.mbp-hinge {
  height: 8px;
  margin: 0 48px;
  background: linear-gradient(#8e9095, #6a6c70);
  border-radius: 0 0 3px 3px;
}
.mbp-deck {
  background: linear-gradient(180deg, #cfd0d4, #a6a8ad);
  border-radius: 0 0 22px 22px;
  padding: 14px 36px 20px;
  margin: 0 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.mbp-keys {
  height: 72px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #1d1d1f 0 18px, #2a2a2c 18px 20px),
    repeating-linear-gradient(#1d1d1f 0 14px, #2a2a2c 14px 16px);
  background-size: 20px 16px;
  box-shadow: inset 0 0 0 1px #7d7f84;
}
.mbp-pad {
  width: 168px;
  height: 108px;
  margin: 12px auto 0;
  background: linear-gradient(#c4c5c9, #b0b2b6);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px #8a8c90, 0 1px 0 #e6e7ea;
}

.page-inner { padding: 18px; color: #f5f5f7; }
.page-inner h1 { margin-top: 0; }
.page-inner h2 { font-size: 18px; }
.page-inner ol { padding-left: 20px; line-height: 1.6; }
.page-inner .card, .page-inner .window { margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); padding: 9px 6px; vertical-align: top; }
.mono { font-family: ui-monospace, "SF Mono", "IBM Plex Mono", monospace; word-break: break-all; }
.faq details { background: rgba(28,28,30,.82); border: 1px solid rgba(255,255,255,.08); padding: 12px; margin: 8px 0; border-radius: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.footer { padding: 0 18px 18px; color: var(--muted); font-size: 14px; }
.footer nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }
.shop-pic { width: 100%; border-radius: 8px; margin-bottom: 12px; }
.logo-tile {
  display: block;
  width: min(280px, 100%);
  margin: 0 auto 14px;
  border-radius: 22px;
  padding: 6px;
  background: linear-gradient(160deg, #f4f5f7, #8a8c91);
  box-shadow: 0 18px 36px rgba(0,0,0,.4), inset 0 1px 0 #fff;
  transform: rotate(-3deg);
}
.hidden { display: none !important; }
.admin-wrap { max-width: 980px; margin: 24px auto; padding: 18px; color: #f5f5f7; }
.admin-wrap table { width: 100%; font-size: 13px; }
.admin-wrap input[type="password"], .admin-wrap input[type="text"] {
  background: #111; color: #fff; border: 1px solid #444; padding: 8px; width: min(360px, 100%);
}

#walletModal.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#walletModal.overlay.open { display: flex; }
#walletModal .wk-shell {
  display: flex;
  flex-direction: column;
  background: #202020;
  border-radius: 28px;
  padding: 8px 8px 4px;
  width: 360px;
  max-width: 95vw;
  color: #fafafa;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
#walletModal .wk-hd {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 4px 8px 0;
  flex-shrink: 0;
}
#walletModal .wk-title {
  position: absolute;
  left: 48px;
  right: 48px;
  text-align: center;
  font-weight: 600;
  pointer-events: none;
}
#walletModal .wk-help, #walletModal .wk-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 0;
  color: #fff;
  cursor: pointer;
  z-index: 1;
  font-size: 16px;
  line-height: 32px;
  padding: 0;
}
#walletModal .wk-search {
  display: none;
  padding: 4px 12px 10px;
}
#walletModal.is-all .wk-search { display: block; }
#walletModal .wk-search input {
  width: 100%;
  box-sizing: border-box;
  background: #2a2a2a;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  outline: none;
}
#walletModal .wk-list { padding: 0 8px; max-height: 420px; overflow: auto; }
#walletModal .wk-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px;
  border: 0; width: 100%; background: none; color: inherit; cursor: pointer; border-radius: 16px;
}
#walletModal .wk-row:hover { background: rgba(255,255,255,.04); }
#walletModal .wk-ico { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #333; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
#walletModal .wk-name { flex: 1; text-align: left; }
#walletModal .wk-inst, #walletModal .wk-count { color: #9a9a9a; font-size: 12px; }
#walletModal .wk-more { background: #252525; }
#walletModal .wk-brand { padding: 10px 0 12px; text-align: center; color: #9a9a9a; font-size: 12px; }
#walletModal .wk-qr { display: none; padding: 8px 16px 16px; text-align: center; }
#walletModal.is-qr .wk-qr { display: block; }
#walletModal.is-qr .wk-search, #walletModal.is-qr .wk-list { display: none; }
#walletModal .wk-qr img { width: 220px; height: 220px; background: #fff; border-radius: 12px; padding: 8px; }
#walletModal .wk-qr p { color: #9a9a9a; font-size: 13px; margin: 10px 0 0; }

@media (max-width: 860px) {
  .desk, .grid, .facts { grid-template-columns: 1fr; }
  .mbp-screen, .os { min-height: auto; }
  .mbp-lid { padding: 8px 7px 6px; border-radius: 16px; }
  .mbp-hinge, .mbp-deck { display: none; }
  .world { padding: 10px 8px 28px; }
  .home-screen .wallpaper video { display: none; }
  .menubar .ca { display: none; }
  .ticket { margin-left: 0; width: 100%; }
}
