@font-face {
  font-family: "Minecraft";
  src: url("/assets/minecraft.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Minecraft";
  src: url("/assets/minecraft-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: #141920;
  --raised: #1c232e;
  --line: #272d38;
  --text: #f4f4ef;
  --muted: #a3a9b5;
  --accent: #ffb637;
  --accent-hover: #ffd16b;
  --danger: #ff9b9b;
  --green: #9cdb9f;
  font-family: "Minecraft", system-ui, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  isolation: isolate;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.45;
}
.world-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, #11131b55 0%, #0d101590 42%, #0d1015d9 100%),
    url("/assets/realm-background.webp") center center / cover no-repeat;
}
.site-header, .store-wrap, .site-footer { position: relative; z-index: 1; }
.category-header h2, .store-nav { text-shadow: 2px 3px #080a0ccc; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, a, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
::selection { background: var(--accent); color: #211706; }
[hidden] { display: none !important; }
.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;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--accent);
  color: #211706;
}
.skip-link:focus { top: 12px; }

.nav-wrap { max-width: 960px; padding: 16px 20px 0; margin: auto; }
.nav-actions { display: flex; justify-content: flex-end; gap: 10px; }
.player-button, .cart-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px 15px;
  font-weight: 600;
  font-size: 1.0625rem;
}
.player-button { background: var(--accent); color: #2b1b08; }
.player-button:hover { background: var(--accent-hover); }
.cart-button { border: 1px solid #313844; background: #191e26; color: #dce0e6; }
.cart-button:hover { background: #252c36; }
.cart-count { color: var(--accent); }
.store-hero {
  padding: 0 20px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.realm-logo {
  position: relative;
  display: block;
  width: min(290px, 75%);
  margin: -24px 0 15px;
}
.realm-emblem {
  width: 100%;
  height: auto;
}
.server-address {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  border: 1px solid #625033;
  border-radius: 999px;
  padding: 7px 17px;
  background: #151a1ddd;
  color: #e8eae3;
  font-size: 1rem;
  line-height: 1.3;
}
.server-address span { min-width: 0; overflow-wrap: anywhere; }
.server-address svg { color: #c4a46f; }
.server-address:hover { border-color: var(--accent); }
.store-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 30px;
  margin-top: 19px;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: #9fa7b5;
}
.store-nav a:hover, .store-nav .active { color: var(--accent-hover); }
.store-nav .active { text-shadow: 2px 2px #3d2b17; }

.store-wrap { max-width: 988px; padding: 20px 24px 76px; margin: auto; }
.category-section + .category-section { margin-top: 54px; }
.category-header { margin-bottom: 28px; text-align: center; }
.category-header h2 { text-transform: uppercase; font-size: 2.2rem; font-weight: 700; overflow-wrap: anywhere; }
.category-description {
  max-width: 700px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--muted);
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}
.category-description p + p { margin-top: 8px; }
.category-description strong { color: #d2d9ce; font-weight: 500; }
.category-description a { text-decoration: underline; text-underline-offset: 3px; }
.product-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.product-card {
  flex: 0 1 calc((100% - 40px) / 3);
  min-width: min(100%, 15rem);
  padding: 29px 26px 21px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgb(20 25 32 / 70%);
  border-color: rgb(143 151 162 / 18%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card:focus-within { border-color: #8a6939; }
.product-card:hover { border-color: #665033; }
.product-visual {
  width: 100%;
  height: 151px;
  margin: 0 0 21px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
}
.product-visual img { width: 140px; height: 140px; object-fit: contain; transition: transform .15s ease; }
.product-visual:hover img { transform: translateY(-4px); }
.product-card h3 {
  width: 100%;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.title-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; }
.title-button:hover { color: var(--accent); }
.product-caption { color: var(--muted); font-size: 1rem; margin: -8px 0 15px; }
.price-button, .primary-button {
  border: 0;
  border-radius: 8px;
  padding: 8px 18px;
  background: var(--accent);
  color: #2b1b08;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
}
.price-button { width: 10.625rem; max-width: 100%; margin-top: auto; }
.price-button:not(:disabled):hover, .primary-button:not(:disabled):hover { background: var(--accent-hover); }
.price-button:disabled { opacity: 1; }
.primary-button:disabled { background: #403426; color: #d1bb95; }
.small-note { margin: 27px auto 0; text-align: center; color: #999fa9; font-size: .9375rem; }
.store-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; color: #8c949f; font-size: .9375rem; margin-top: 10px; }

.site-footer { padding: 40px 24px; border-top: 1px solid #232831; background: #0d1015e8; text-align: center; color: #9ca4b2; }
.footer-brand { font-size: 1.5rem; color: #efc784; text-transform: uppercase; margin-bottom: 6px; overflow-wrap: anywhere; }
.footer-disclaimer { font-size: 1.0625rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 20px; font-size: 1rem; text-transform: uppercase; }
.footer-links a:hover { color: var(--text); }
.footer-legal { max-width: 690px; margin: 23px auto 0; color: #8b929c; font-size: .9375rem; }

.notice { border: 1px solid #6c5832; border-radius: 9px; background: #282219; color: #f4d39a; padding: 16px 20px; margin-bottom: 28px; }
.notice.success { border-color: #496147; background: #1c2b20; color: #b3e1b4; }
.loading-state, .empty-state, .error-state {
  padding: 65px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(20 25 32 / 70%);
  border-color: rgb(143 151 162 / 18%);
  text-align: center;
  color: var(--muted);
}
.empty-state h2, .error-state h2 { color: var(--text); margin-bottom: 14px; font-size: 1.5rem; }
.error-state p { margin-bottom: 20px; }
.loader { display: inline-block; width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.loading-state p { margin-top: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

body.dialog-open { overflow: hidden; }
dialog { padding: 0; background: var(--surface); color: var(--text); border: 1px solid #39404c; }
dialog::backdrop { background: #05080bd4; }
.store-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 32px; border-radius: 12px; }
.close-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 5px; background: #242b35; color: #c4cbd5; font-size: 1.75rem; line-height: 1; }
.close-button:hover { background: #343d49; color: var(--text); }
.store-dialog > .close-button { position: absolute; top: 12px; right: 12px; }
.dialog-icon { width: 48px; height: 48px; margin: 0 0 21px; object-fit: contain; }
.store-dialog h2 { margin-bottom: 15px; font-size: 1.875rem; font-weight: 500; }
.store-dialog > p:not(.form-error) { color: var(--muted); }
.player-dialog form { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
input { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #404955; border-radius: 6px; background: #0f141b; color: var(--text); }
input::placeholder { color: #919aa6; }
.form-error { color: var(--danger); font-size: 1rem; }
.primary-button { width: 100%; margin-top: 6px; }
.dialog-footnote { text-align: center; margin-top: 18px; font-size: .9375rem; }
.muted { font-size: 1rem; color: var(--muted); }
.product-dialog { width: min(590px, calc(100% - 32px)); }
.detail-visual { display: grid; place-items: center; height: 165px; margin-bottom: 20px; }
.detail-visual img { width: 165px; height: 165px; object-fit: contain; }
.product-description { color: #b5bdc9; overflow-wrap: anywhere; }
.product-description p { margin: 12px 0; }
.product-description a { color: var(--accent); text-decoration: underline; }
.product-description ul, .product-description ol { padding-left: 24px; }
.product-description h2, .product-description h3, .product-description h4 { margin: 18px 0 10px; font-size: 1.25rem; }
.detail-price { margin-top: 20px; color: var(--accent); font-size: 1.5rem; font-weight: 600; }
.quantity-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 20px 0 12px; }
.quantity-row input { width: 90px; padding: 7px 10px; }
.detail-payment-note { text-align: center; color: var(--muted); font-size: .9375rem; margin-top: 13px; }
.preview-note { color: #dfc293; font-size: 1rem; margin-top: 18px; }

.cart-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(470px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border-width: 0 0 0 1px; overflow: auto; }
.cart-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.cart-header h2 { font-size: 1.875rem; font-weight: 500; }
.cart-header h2 span { margin-left: 6px; color: var(--muted); font-size: 1.125rem; }
.cart-content { padding: 24px 25px; }
.cart-empty { padding: 60px 12px; text-align: center; color: var(--muted); }
.cart-empty svg { margin: 0 auto 24px; color: #7a8798; }
.cart-empty h3 { font-size: 1.5rem; color: var(--text); margin-bottom: 12px; font-weight: 500; }
.cart-empty .primary-button { margin-top: 24px; }
.cart-player { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #10161e; margin-bottom: 18px; font-size: 1rem; }
.cart-player strong { color: var(--accent); }
.text-button { padding: 4px; border: 0; background: none; color: var(--accent); font-size: 1rem; }
.cart-item { display: grid; grid-template-columns: 65px minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 65px; height: 65px; object-fit: contain; grid-row: span 2; }
.cart-item > div { min-width: 0; overflow-wrap: anywhere; }
.cart-item h3 { font-size: 1.125rem; line-height: 1.35; font-weight: 500; }
.cart-item-price { grid-column: 2; margin-top: 9px; color: #d9e0e7; font-size: 1.125rem; }
.quantity-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.quantity-controls button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #414d5e; border-radius: 4px; background: #222d3c; line-height: 1; }
.quantity-controls button:disabled { color: #6e7989; }
.quantity-controls span { min-width: 12px; text-align: center; font-size: 1rem; }
.quantity-controls .remove-item { width: auto; padding: 0; border: 0; background: none; color: #b2bac5; font-size: .9375rem; }
.promotion-section { margin-top: 23px; }
.promotion-section summary { color: #c5cfdb; cursor: pointer; }
.promotion-section form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.promotion-section input { font-size: 1rem; padding: 9px 12px; }
.secondary-button { padding: 8px 14px; border: 1px solid #465269; border-radius: 6px; background: #253043; color: #dde5f1; font-size: 1rem; }
.secondary-button:hover { background: #303e52; }
.applied-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; color: var(--green); font-size: 1rem; }
.cart-totals { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 16px; }
.total-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); }
.total-row.grand-total { margin-top: 18px; color: var(--text); font-size: 1.5rem; font-weight: 600; }
.checkout-button { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 24px; }
.checkout-note { margin-top: 13px; text-align: center; color: var(--muted); font-size: .9375rem; }
.cart-error { margin-top: 15px; padding: 12px; border: 1px solid #78454c; border-radius: 6px; background: #3a2027; color: #ffbdc4; }
.auth-link { display: block; text-align: center; margin-top: 14px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 11px 18px; border: 1px solid #586550; border-radius: 7px; background: #212a21; text-align: center; font-size: 1rem; z-index: 20; }
.no-script { padding: 24px; background: #292416; color: #f2d3a0; text-align: center; }

@media (max-width: 760px) {
  .nav-wrap { padding: 13px 16px 0; }
  .player-button, .cart-button { min-height: 36px; padding: 5px 11px; font-size: 1rem; }
  .cart-label { display: none; }
  .store-hero { padding: 8px 16px 32px; }
  .realm-logo { width: min(240px, 75%); margin: 0 0 20px; }
  .server-address { font-size: 1rem; gap: 12px; padding: 7px 14px; }
  .store-nav { margin-top: 17px; gap: 12px 26px; font-size: 1rem; }
  .store-wrap { padding: 6px 16px 42px; }
  .category-header h2 { font-size: 2rem; }
  .category-description { font-size: 1rem; margin-bottom: 23px; }
  .product-grid { gap: 12px; }
  .product-card { flex-basis: calc((100% - 12px) / 2); min-width: min(100%, 8.5rem); padding: 20px 12px 18px; border-radius: 12px; }
  .product-visual { height: 118px; margin-bottom: 16px; }
  .product-visual img { width: 118px; height: 118px; }
  .product-card h3 { font-size: 1.125rem; margin-bottom: 14px; }
  .price-button { width: 9.0625rem; font-size: 1rem; padding: 7px 12px; }
  .site-footer { padding: 32px 20px; }
  .footer-links { gap: 9px 18px; font-size: .9375rem; }
  .store-dialog { padding: 28px 23px; }
  .cart-header { padding: 22px 20px; }
  .cart-content { padding: 20px; }
}
@media (max-width: 360px) {
  .product-card { padding: 18px 9px 16px; }
  .product-visual { height: 104px; }
  .product-visual img { width: 104px; height: 104px; }
  .product-card h3 { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 760px) {
  .world-background { background-position: center, 52% center; }
}

.player-head { width: 24px; height: 24px; image-rendering: pixelated; flex-shrink: 0; border-radius: 3px; }
.edition-picker { display: flex; gap: 8px; padding: 0; margin: 0 0 18px; border: 0; }
.edition-picker label { position: relative; flex: 1; margin: 0; cursor: pointer; }
.edition-picker input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }
.edition-picker span { display: block; padding: 12px 6px; border: 1px solid #3a424b; border-radius: 6px; text-align: center; font-size: .9375rem; background: #1b2129; color: #aeb5bf; }
.edition-picker input:checked + span { background: #ffb6371f; border-color: var(--accent); color: var(--accent); }
.edition-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.username-field { display: flex; align-items: center; border: 1px solid #3a424b; border-radius: 6px; background: #0d1117; }
.username-field:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.username-field input:focus-visible { outline: none; }
.username-field input { min-width: 0; width: 100%; border: 0; background: transparent; margin: 0; }
.edition-help { margin: 7px 0 14px; font-size: .8125rem; color: #b3bbc6; }

.bedrock-support p { margin: 4px 0 20px; color: #c3cad3; line-height: 1.65; }
.bedrock-support .primary-button { display: block; text-align: center; }

.store-details { display: grid; grid-template-columns: minmax(0, 1fr) 180px; margin-top: 34px; border: 1px solid rgb(143 151 162 / 18%); border-radius: 12px; background: rgb(20 25 32 / 70%); overflow: hidden; }
.credit-info { margin: 0; padding: 26px 28px; color: #c5cad2; font-size: 1rem; line-height: 1.7; }
.credit-info h2 { margin-bottom: 16px; color: var(--accent); font-size: 1.25rem; font-weight: 400; }
.credit-info p + p { margin-top: 14px; }
.monthly-supporter { width: 100%; margin: 0; padding: 18px 12px; text-align: center; }
.monthly-supporter[hidden] { display: none; }
.monthly-supporter img { display: block; margin: 14px auto 12px; width: 48px; height: 48px; image-rendering: pixelated; border-radius: 4px; }
.monthly-supporter h2 { color: var(--accent); font-size: .9375rem; line-height: 1.5; font-weight: 400; margin: 0; }
#supporter-name { color: #f4f4ef; font-size: 1.125rem; overflow-wrap: anywhere; }
.supporter-thanks { color: #9fa7b3; font-size: .8125rem; margin-top: 8px; line-height: 1.5; }
/* Community cards share the information panel without moving the catalog. */
.store-sidebar { min-width: 0; border-left: 1px solid rgb(239 177 60 / 20%); display: flex; flex-direction: column; }
.store-sidebar .monthly-supporter { border-top: 1px solid rgb(239 177 60 / 20%); flex: 1; }
.community-card { padding: 18px 12px; text-align: center; }
.community-row { display: block; }
.community-label { display: block; color: var(--accent); font-size: .9375rem; line-height: 1.5; margin-bottom: 10px; }
.community-count { color: #9fa7b3; font-size: 1.125rem; }
.community-count.is-online { color: #a7cf8a; }
.community-count.is-online::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; }
@media (max-width: 600px) {
  .store-details { grid-template-columns: minmax(0, 1fr); }
  .store-sidebar { border-left: 0; border-top: 1px solid rgb(239 177 60 / 20%); flex-direction: row; align-items: stretch; }
  .store-sidebar > aside { flex: 1; min-width: 0; }
  .store-sidebar .monthly-supporter { border-top: 0; border-left: 1px solid rgb(239 177 60 / 20%); }
  .community-card { display: grid; place-items: center; }
}
.credit-info strong { color: #f4f4ef; font-weight: 400; }
@media (max-width: 760px) { .credit-info { padding: 20px; font-size: .9375rem; } }
