@font-face {
  font-family: Geist;
  src: url('/geist.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Geist, Arial, sans-serif;
  color: #f5f5f7;
  background: #141414;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.site-header { border-bottom: 1px solid #29292e; }
.header-inner { width: min(920px, calc(100% - 40px)); height: 68px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 650; }
.brand img { width: 22px; height: 22px; }
.site-header nav { display: flex; gap: 30px; align-items: center; }
.site-header nav a, .site-header nav button { padding: 0; border: 0; background: none; color: #c7c7cc; font-size: 13px; }
.site-header nav a:hover, .site-header nav button:hover, footer a:hover { color: #c2beff; }

.hero { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.hero-logo { width: 42px; height: 42px; margin-bottom: 14px; animation: fade-in .5s ease-out both; }
.hero h1 { margin: 0; font-size: clamp(38px, 6vw, 54px); font-weight: 650; letter-spacing: -2.5px; animation: fade-in .5s .05s ease-out both; }
.hero p { margin: 10px 0 25px; color: #aaaab1; font-size: 14px; animation: fade-in .5s .1s ease-out both; }
.hero p span { color: #76767e; padding: 0 4px; }
.hero-actions { display: flex; gap: 10px; animation: fade-in .5s .15s ease-out both; }
.hero-actions .button { width: 160px; }
.button { min-height: 39px; min-width: 120px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 17px; border: 1px solid #41414a; background: transparent; color: #f5f5f7; font-size: 13px; font-weight: 600; transition: border-color .18s, background .18s; }
.button:hover { border-color: #bcb6ff; background: #242424; }
.button-primary { border-color: #bcb6ff; background: #bcb6ff; color: #17151d; }
.button-primary:hover { background: #d1cdff; color: #17151d; }

.section { width: min(920px, calc(100% - 40px)); margin: auto; padding: 36px 0 50px; border-top: 1px solid #29292e; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 25px; font-weight: 600; letter-spacing: -.7px; }
.section-heading p { margin: 0; color: #898990; font-size: 13px; }
.products .section-heading { display: block; margin-bottom: 26px; text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-item { position: relative; min-height: 240px; padding: 27px 14px 13px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #313138; background: #1b1b1b; text-align: center; transition: border-color .2s, transform .2s; }
.product-item::before { content: ''; position: absolute; top: -1px; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, transparent, #aaa3ff, transparent); }
.product-item:hover { border-color: #625d79; transform: translateY(-3px); }
.product-item h3 { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
.product-header p { margin: 0; color: #a4a4ad; font-size: 14px; }
.product-status { display: block; padding: 10px; background: #aaa3ff; color: #17151d; font-size: 13px; font-weight: 650; }
.payment-note { margin: 20px 0 0; color: #898990; font-size: 12px; text-align: center; }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.media-grid figure { margin: 0; }
.media-grid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #1b1b1b; }
.media-grid figcaption { margin-top: 7px; color: #909098; font-size: 12px; }
.media-grid figcaption a:hover { color: #c2beff; }

footer { margin-top: 15px; border-top: 1px solid #29292e; color: #85858d; font-size: 12px; }
footer > div { width: min(920px, calc(100% - 40px)); min-height: 75px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 24px; }

.terms-page { min-height: 100vh; display: flex; flex-direction: column; }
.terms-main { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 90px; flex: 1; }
.terms-intro { margin-bottom: 45px; text-align: center; animation: fade-in .4s ease-out both; }
.terms-intro h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 38px); font-weight: 600; letter-spacing: -1.3px; }
.terms-intro p { margin: 0; color: #898990; font-size: 13px; }
.terms-content section { padding: 23px 0; border-top: 1px solid #303035; }
.terms-content h2 { margin: 0 0 11px; font-size: 18px; font-weight: 600; }
.terms-content p { margin: 0; color: #b3b3ba; font-size: 14px; line-height: 1.7; }
.terms-content a { color: #c2beff; text-decoration: underline; text-underline-offset: 3px; }
.terms-content a:hover { color: #e0ddff; }
.terms-page footer { margin-top: 0; }

dialog { width: min(400px, calc(100% - 28px)); padding: 28px; border: 1px solid #41414a; background: #202020; color: #f5f5f7; }
dialog[open] { animation: dialog-in .24s ease-out both; }
dialog::backdrop { background: #0d0d0dd9; animation: backdrop-in .24s ease-out both; }
.dialog-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; color: #aaaab1; font-size: 26px; }
.dialog-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; font-size: 16px; font-weight: 650; }
.dialog-brand img { width: 22px; height: 22px; }
dialog h2 { margin: 0 0 20px; font-size: 26px; font-weight: 600; }
dialog label { display: block; margin: 14px 0 6px; font-size: 13px; }
dialog input { width: 100%; padding: 10px; border: 1px solid #41414a; outline: none; background: #151515; color: white; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; transform: translateY(-50%); fill: #85858f; pointer-events: none; }
.input-wrap input { padding-left: 39px; }
.terms-note { margin: 10px 0 0; color: #a0a0a7; font-size: 11px; line-height: 1.5; }
.terms-note a { color: #c2beff; text-decoration: underline; text-underline-offset: 2px; }
dialog input:focus { border-color: #bcb6ff; }
.form-message { min-height: 17px; margin: 10px 0 0; color: #ffaaa7; font-size: 12px; }
.submit-button { width: 100%; margin-top: 10px; }
.submit-button:disabled { opacity: .6; cursor: wait; }
.dialog-switch { margin: 18px 0 0; color: #a0a0a7; text-align: center; font-size: 12px; }
.dialog-switch button { border: 0; background: none; color: #c2beff; font-weight: 600; }

.account-page { min-height: 100vh; display: flex; flex-direction: column; }
.account-page footer { margin-top: auto; }
.dash { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 60px; flex: 1; }
.profile { display: flex; align-items: center; gap: 20px; padding: 22px; border: 1px solid #313138; background: #1b1b1b; animation: fade-in .4s ease-out both; }
.avatar { width: 72px; height: 72px; flex: none; display: grid; place-items: center; background: #2a2833; color: #c2beff; font-size: 30px; font-weight: 650; overflow: hidden; }
.avatar canvas { width: 100%; height: 100%; image-rendering: pixelated; animation: fade-in .4s ease-out both; }
.avatar.has-skin span { display: none; }
.profile-info h1 { margin: 0 0 10px; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.profile-info dl { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.profile-info dt { color: #898990; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.profile-info dd { margin: 2px 0 0; font-size: 14px; }
.profile-info .uid { text-align: center; }
.tabs { display: flex; gap: 6px; margin: 26px 0 18px; border-bottom: 1px solid #29292e; animation: fade-in .4s .05s ease-out both; }
.tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: #898990; font-size: 13px; font-weight: 600; transition: color .18s, border-color .18s; }
.tab:hover { color: #f5f5f7; }
.tab.active { border-bottom-color: #bcb6ff; color: #f5f5f7; }
.panel { animation: fade-in .3s ease-out both; }
.panel[hidden] { display: none; }
.card { padding: 22px; border: 1px solid #313138; background: #1b1b1b; text-align: center; transition: border-color .2s; }
.card:hover { border-color: #625d79; }
.card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.card.empty { padding: 48px 22px; }
.card.empty p { max-width: 360px; margin: 0 auto 18px; color: #aaaab1; font-size: 14px; line-height: 1.5; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button:disabled:hover { border-color: #41414a; background: transparent; }
.cosmetic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.preview { display: block; width: 160px; height: auto; max-width: 100%; margin: 0 auto 14px; image-rendering: pixelated; background: #151515; border: 1px solid #29292e; transition: opacity .25s; }
.card.unset .preview { opacity: .3; }
.model-switch { display: inline-flex; margin-bottom: 14px; border: 1px solid #41414a; }
.model-switch button { padding: 6px 16px; border: 0; background: none; color: #aaaab1; font-size: 12px; transition: background .18s, color .18s; }
.model-switch button.active { background: #bcb6ff; color: #17151d; font-weight: 650; }
.button-row { display: flex; justify-content: center; gap: 9px; }
.button-row .button { min-width: 0; }
.hint { margin: 12px 0 0; color: #898990; font-size: 12px; }
.hint.center { text-align: center; }
.form-message.ok { color: #a8e6b8; }
#cos-message { text-align: center; margin-top: 14px; }
.hint a { color: #c2beff; }
.muted { color: #898990; font-size: 13px; }
.product-list { display: grid; gap: 10px; }
.product-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 16px 18px; border: 1px solid #313138; background: #1b1b1b; animation: fade-in .35s ease-out both; transition: border-color .2s, transform .2s; }
.product-row:hover { border-color: #625d79; transform: translateX(3px); }
.product-row.owned { border-left: 2px solid #bcb6ff; }
.product-row h3 { margin: 0 0 3px; font-size: 16px; font-weight: 600; }
.pill { padding: 4px 10px; border: 1px solid #41414a; color: #aaaab1; font-size: 11px; font-weight: 600; white-space: nowrap; }
.pill.active { border-color: #4f8a5f; color: #a8e6b8; }
.pill.active::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #a8e6b8; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
.pill.expired { border-color: #7a3f3d; color: #ffaaa7; }
.loader-card { padding: 34px 22px; }
.loader-logo { width: 38px; height: 38px; margin: 0 auto 12px; }
.loader-card h2 { margin-bottom: 4px; }
.loader-card .muted { margin: 0 0 18px; }
.button.disabled { opacity: .45; pointer-events: none; }
.steps { width: fit-content; margin: 22px auto 0; padding: 18px 0 0 18px; border-top: 1px solid #29292e; color: #aaaab1; font-size: 13px; line-height: 1.9; text-align: left; }

@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .header-inner { height: 60px; }
  .site-header nav { gap: 17px; }
  .hero { min-height: 340px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 8px; }
  .media-grid { grid-template-columns: 1fr; gap: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-item { min-height: 205px; padding: 22px 9px 9px; }
  .product-item h3 { font-size: 18px; }
  .product-header p { font-size: 12px; }
  footer > div { gap: 12px; }
  .footer-links { gap: 14px; }
  .terms-main { padding: 45px 0 65px; }
  .cosmetic-grid { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 1fr auto; }
  .product-row .pill:nth-of-type(1) { display: none; }
  .tabs { overflow-x: auto; }
}

@media (max-width: 380px) {
  .brand span { display: none; }
  .hero-actions { flex-direction: column; width: min(220px, 100%); }
  .hero-actions .button { width: 100%; }
}

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