@font-face {
  font-family: "NEXON Lv.1 Gothic";
  src: url("/assets/fonts/nexon-lv1-gothic-regular.otf") format("opentype");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "NEXON Lv.1 Gothic";
  src: url("/assets/fonts/nexon-lv1-gothic-bold.otf") format("opentype");
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f6f6;
  --surface: #fff;
  --ink: #252525;
  --muted: #626262;
  --line: #dfdfdf;
  --accent: #4a4a4a;
  --primary: #2e2e2e;
  --focus: #5b5b5b;
  --gold: #f7d481;
  --gold-pale: #ffe8a9;
  --display: "NEXON Lv.1 Gothic", system-ui, sans-serif;
  --header-bg: #fff;
  --utility-bg: #f3f3f3;
  --header-control: #efefef;
  --soft-surface: #f3f3f3;
  --wrap: 1520px;
  --main-banner-ratio: 1744 / 320;
  font-family: var(--display);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button[disabled] { opacity: .54; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(100%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 20; top: .5rem; left: .5rem; background: white; padding: 1rem; }
.wrap { width: min(var(--wrap), calc(100% - 80px)); margin-inline: auto; }
main:focus { outline: none; }

.header { position: relative; z-index: 3; color: var(--ink); background: var(--header-bg); border-bottom: 1px solid var(--line); }
.utility { border-bottom: 1px solid var(--line); background: var(--utility-bg); color: var(--muted); }
.utility-inner, .utility-actions { display: flex; align-items: center; gap: 10px; }
.utility-inner { justify-content: space-between; min-height: 34px; font-size: .8rem; }
.service-state { font-weight: 650; }
.utility-admin { color: var(--accent); font-weight: 750; white-space: nowrap; }
.utility-admin:hover, .font-credit:hover { text-decoration: underline; }
body[data-portal-mode="live"] .service-state { color: #186a5a; }
.theme-toggle { display: grid; place-items: center; width: 31px; height: 29px; padding: 0; border-radius: 7px; border: 1px solid var(--line); color: var(--ink); background: var(--header-bg); font-size: 1.15rem; line-height: 1; }
.theme-toggle:hover { border-color: #808080; }
.header-inner { width: min(var(--wrap), calc(100% - 80px)); min-height: 70px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: clamp(12px, 2.8vw, 42px); }
.wordmark { flex: none; display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 1.63rem; letter-spacing: .085em; line-height: .83; }
.wordmark-small { display: block; margin-top: 6px; font-size: .58rem; letter-spacing: .25em; }
.brandmark { display: block; width: 46px; height: 46px; flex: none; object-fit: contain; }
.font-credit { color: var(--muted); font-size: .8rem; }
.global-nav { display: flex; align-self: stretch; align-items: stretch; justify-content: center; gap: clamp(14px, 2.3vw, 36px); }
.nav-group { position: relative; display: flex; }
.nav-primary { position: relative; display: block; border: 0; background: transparent; padding: 17px 4px; font-weight: 750; white-space: nowrap; }
.nav-primary::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: #7d7d7d; transform: scaleX(0); transition: transform .17s ease; }
.nav-primary:hover, .nav-primary[aria-expanded=true], .nav-group.current .nav-primary { color: #505050; }
.nav-primary:hover::after, .nav-primary[aria-expanded=true]::after, .nav-group.current .nav-primary::after { transform: scaleX(1); }
.nav-sub { padding: 5px; border-radius: 8px; background: var(--header-control); }
.nav-sub a { display: block; padding: 10px 12px; font-size: .93rem; border-radius: 6px; }
.nav-sub a:hover, .nav-sub a[aria-current=page] { background: var(--header-bg); color: var(--ink); }
.mega-menu {
  position: absolute;
  inset: 100% 0 auto;
  color: #f7f7f7;
  background: linear-gradient(115deg, #2b2b2b, #3c3c3c 64%, #303030);
  filter: drop-shadow(0 10px 14px #2424243d);
  border-bottom: 1px solid #767676;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  pointer-events: none;
  transition: clip-path .24s cubic-bezier(.22,.78,.29,1), visibility 0s .24s;
}
.mega-open .mega-menu {
  clip-path: inset(0 -24px -30px);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.mega-inner { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; padding-block: 17px 22px; }
.mega-column { min-width: 0; padding: 9px 10px 10px; border-top: 2px solid transparent; border-radius: 6px; }
.mega-column.active { border-top-color: #edc582; background: #95959524; }
.mega-column p { color: #f8dda5; font-size: .93rem; font-weight: 800; margin: 0 0 6px; }
.mega-column a { display: block; padding: 7px 6px; border-radius: 5px; font-size: .9rem; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.mega-column a:hover, .mega-column a[aria-current=page] { background: #99999944; }
.header-actions { flex: none; display: flex; align-items: center; gap: clamp(4px, 1.1vw, 11px); }
.text-button, .header-shop, .header-mail, .header-logout { min-height: 37px; font-weight: 750; font-size: .86rem; border-radius: 7px; padding: 7px 11px; white-space: nowrap; }
.text-button { border: 1px solid #cccccc; color: var(--ink); background: var(--header-control); }
.header-logout { border: 1px solid var(--line); color: var(--ink); background: var(--header-bg); }
.text-button:hover, .header-mail:hover, .header-logout:hover { border-color: var(--accent); }
.header-shop { display: none; color: var(--ink); background: var(--header-control); border: 1px solid var(--line); }
.header-mail { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--header-bg); }
#mail-count { border-radius: 99px; padding: 1px 4px; min-width: 17px; text-align: center; background: var(--gold); color: #282828; font-size: .72rem; }
.menu-toggle { display: none; background: transparent; border: none; min-width: 35px; min-height: 43px; font-size: 1.4rem; }

.hero, .hero + .main-grid { width: min(1744px, 91.5%); margin-inline: auto; }
.hero { position: relative; margin-top: 22px; }
.hero-frame, .pia-hero-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: var(--main-banner-min-height, 96px);
  aspect-ratio: var(--main-banner-ratio);
  overflow: hidden;
  border-radius: clamp(10px, 1.5vw, 25px);
  background: var(--soft-surface);
}
.hero-frame { touch-action: pan-y pinch-zoom; }
.hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 47%;
}
.hero-image[src^="/api/pia/media/"] {
  object-fit: fill;
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 43px; padding: 9px 15px; background: var(--surface); color: var(--ink); border: 1px solid #cecece; border-radius: 7px; font-weight: 750; text-align: center; transition: background .17s ease, border-color .17s ease, transform .17s ease; }
.button:hover { border-color: #7f7f7f; }
.button.gold { color: #282828; background: linear-gradient(120deg,#edc477,#ffe4a2 53%,#e8b967); border-color: #e8c37e; }
.button.gold:hover { background: #ffe6a9; border-color: #ffe6a9; }
.button.green { color: #fff; background: var(--primary); border-color: var(--primary); }
.button.green:hover { background: #404040; }
.button.soft { color: var(--primary); background: #ededed; border-color: #dbdbdb; }
.button.soft:hover { background: #e1e1e1; }
.hero-controls {
  position: absolute;
  inset-inline-start: clamp(12px, 2.4vw, 44px);
  inset-block-end: clamp(12px, 1.7vw, 32px);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 1;
}
.banner-pager {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbdbdb;
  border-radius: 999px;
  background: #fff;
  color: #494949;
  font-size: .78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.banner-pager [aria-hidden="true"] { min-width: 40px; padding: 0 3px; text-align: center; }
.banner-pager button, .banner-pause {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #5d5d5d;
  font-size: 1.08rem;
  line-height: 1;
  transition: background-color .15s, color .15s;
}
.banner-pause { border: 1px solid #dbdbdb; font-size: .72rem; }
@media (hover: hover) {
  .banner-pager button:hover, .banner-pause:hover { background: #767676; color: #fff; }
}

.main-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,315px) minmax(0,1fr); grid-template-areas: "news launch update"; align-items: start; gap: clamp(13px,2vw,28px); margin-top: 40px; }
.news-panel, .update-panel, .account-panel { min-width: 0; border-radius: 11px; }
.news-panel, .update-panel { background: var(--surface); border: 1px solid var(--line); padding: 19px 20px 17px; }
.news-panel { grid-area: news; }
.update-panel { grid-area: update; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2, .account-panel h2, .features h2, .data-panel h2 { font: 800 1.36rem/1.4 var(--display); letter-spacing: -.04em; margin: 0; }
.section-head a { color: var(--accent); font-size: .89rem; font-weight: 750; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 9px; }
.tabs button { background: transparent; border: 0; border-radius: 6px; padding: 8px 10px; font-size: .89rem; color: var(--muted); font-weight: 750; }
.tabs button[aria-pressed=true] { background: var(--header-control); color: var(--accent); }
.news-list { padding: 0; margin: 0; list-style: none; }
.news-list li { border-top: 1px solid var(--line); }
.news-list a { min-height: 47px; width: 100%; text-align: left; padding: 9px 0; display: grid; grid-template-columns: minmax(54px,auto) minmax(0,1fr); align-items: start; gap: 9px; }
.news-list a:hover .news-title { text-decoration: underline; text-underline-offset: 3px; }
.news-kind { align-self: start; padding: 4px 6px; background: var(--header-control); color: var(--accent); border-radius: 5px; font-size: .77rem; font-weight: 800; text-align: center; }
.news-copy { min-width: 0; }
.news-title { display: block; font-size: .94rem; font-weight: 750; line-height: 1.5; }
.news-description { display: block; margin-top: 3px; color: var(--muted); font-size: .84rem; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-story { position: relative; overflow: hidden; margin-top: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft-surface); }
.update-story img { display: block; width: 100%; height: 133px; object-fit: cover; object-position: 50% 48%; }
.update-story > div { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 9px; }
.update-story strong { font-size: .93rem; }
.update-story a { display: inline-flex; align-items: center; min-height: 33px; padding: 5px 9px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: .86rem; font-weight: 750; }
.update-story a:hover { border-color: var(--accent); }

.account-panel { grid-area: launch; position: relative; z-index: 1; padding: 17px 17px 17px; color: #fff9f1; background: radial-gradient(ellipse at 50% 0%,#5f5f5f 0%,transparent 72%), linear-gradient(150deg,#3c3c3c,#282828 83%); border: 1px solid #787878; box-shadow: 0 12px 23px #2d2d2d20; }
.launch-head {
  --start-size: clamp(166px, 13.4vw, 194px);
  --start-text-size: clamp(1.65rem, 2.35vw, 2.11rem);
  position: relative;
  width: var(--start-size);
  margin: -115px auto 16px;
  padding-bottom: 14px;
}
.hero + .main-grid .launch-head { margin-top: -24px; }
.game-start {
  position: relative;
  isolation: isolate;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px 0 29px;
  border: 1px solid #e9ae4e;
  border-radius: 50%;
  color: #2b2b2b;
  background:
    repeating-conic-gradient(from 11deg, #fff5cb65 0deg 1deg, transparent 1deg 3deg),
    linear-gradient(155deg, #fff4ba, #eab451 39%, #a46626 80%, #f7c76b);
  box-shadow: 0 0 0 3px #fff4cf, 0 0 0 7px #ecc97142, 0 11px 21px #21212163;
  transition: transform .18s ease, box-shadow .24s ease;
  touch-action: manipulation;
}
.game-start::before, .game-start::after {
  position: absolute;
  inset: 7%;
  z-index: -1;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.game-start::before {
  border: 1px solid #a8662c89;
  background:
    radial-gradient(ellipse at 38% 17%, #fff6cf 1%, #ffe7a1 27%, transparent 70%),
    radial-gradient(circle at 64% 80%, #e99e37, #fac35e 55%, #ffe6a4);
  box-shadow: inset 0 0 0 3px #fff0b8a3, inset 0 0 16px #9b5c3040;
}
.game-start::after {
  background: linear-gradient(112deg, transparent 36%, #fff9e296 51%, transparent 64%) 115% 0 / 235% 100% no-repeat;
  transition: background-position .53s ease;
}
.game-start:hover, .game-start:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 3px #fff7df, 0 0 0 8px #f7d68a67, 0 13px 23px #21212170;
}
.game-start:hover::after, .game-start:focus-visible::after { background-position: -40% 0; }
.game-start:focus-visible { outline-offset: 8px; }
.game-start:active { transform: translateY(1px); }
.start-crystal {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff1be;
  font-size: 1.14rem;
  text-shadow: 0 1px 5px #f6cf8a;
}
.start-crystal::before {
  position: absolute;
  inset: 2px;
  z-index: -1;
  transform: rotate(45deg);
  border: 1px solid #454545;
  border-radius: 4px;
  background: conic-gradient(from 45deg, #3c3c3c, #6e6e6e, #414141, #929292, #3c3c3c);
  box-shadow: 0 2px 3px #66382a54;
  content: "";
}
.start-label {
  font: 800 var(--start-text-size)/.94 var(--display);
  letter-spacing: .045em;
  text-align: center;
  text-shadow: 0 1px 0 #fff1bf;
}
.start-label span { display: block; }
.launch-download {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: inline-grid;
  place-items: center;
  width: max-content;
  min-height: 36px;
  padding: 5px 13px;
  transform: translateX(-50%);
  border: 1px solid #f4ce87;
  border-radius: 999px;
  background: linear-gradient(#555555, #333333);
  box-shadow: 0 3px 8px #25252565;
  color: #fff1cb;
  font-size: .83rem;
  font-weight: 750;
  text-underline-offset: 3px;
}
.launch-download:hover, .launch-download:focus-visible { background: #525252; text-decoration: underline; }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.account-heading h2 { font-size: 1.17rem; }
.platform-chip { color: #ffdda0; border: 1px solid #f6d18565; padding: 3px 6px; border-radius: 5px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.account-current { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; padding: 11px 9px; margin-top: 11px; background: #24242491; border: 1px solid #a4a4a447; border-radius: 8px; }
.account-avatar { color: #fde1a4; background: #595959; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; font-size: 1.3rem; overflow: hidden; }
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-current strong { display: block; font-size: .94rem; overflow-wrap: anywhere; word-break: keep-all; }
.account-current p { margin: 3px 0 0; color: #e2e2e2; font-size: .82rem; line-height: 1.4; word-break: keep-all; }
.panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 6px; margin-top: 12px; }
.panel-actions a, .panel-actions button { border: 1px solid #b6b6b65a; background: #4d4d4d8a; padding: 6px 8px; border-radius: 6px; color: #f6f6f6; font-weight: 650; font-size: .84rem; }
.panel-actions a:hover, .panel-actions button:hover { border-color: #edcc83; }

.features { padding: 25px 0 40px; }
.features h2 { margin-bottom: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.feature-grid a { min-height: 131px; position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: end; padding: 17px; color: white; background: #2a2a2a; overflow: hidden; border-radius: 8px; }
.feature-grid a::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(0deg,#202020f7 0%,#29292930 100%),var(--card-image); background-size: cover; background-position: center; transition: transform .25s ease; }
.feature-grid a:hover::before { transform: scale(1.045); }
.feature-grid span { color: #ffe0a2; margin-bottom: 4px; font-size: .82rem; font-weight: 700; }
.feature-grid strong { font-size: 1.1rem; }

.site-footer { color: #c1c1c1; background: #191919; border-top: 1px solid #313131; padding: 22px 0; }
.footer-inner { display: flex; align-items: center; gap: 17px; }
.footer-copy p { margin: 3px 0 0; font-size: .86rem; }
.platforms { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: .87rem; font-weight: 700; }
.platforms a[aria-current=page] { text-decoration: underline; text-underline-offset: 4px; }
.page { min-height: 64vh; padding: 37px 0 54px; }
.crumbs { margin: 0 0 10px; color: var(--muted); font-size: .89rem; }
.page h1 { font: 800 clamp(2.03rem, 4.5vw, 3.4rem)/1.2 var(--display); letter-spacing: -.066em; margin: 0; }
.page-summary { color: var(--muted); margin: 13px 0 16px; line-height: 1.7; word-break: keep-all; }
.page-tabbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 19px; }
.page-tabbar a { display: flex; align-items: center; min-height: 41px; padding: 6px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; font-weight: 750; }
.page-tabbar a[aria-current=page] { color: white; background: var(--primary); border-color: var(--primary); }
.page-box { padding: clamp(17px,4vw,30px); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.page-box h2 { margin: 0 0 9px; font-size: 1.15rem; }
.page-box p { margin: 7px 0 14px; color: var(--muted); line-height: 1.65; }
.page-box img { max-width: 100%; max-height: 340px; display: block; margin: 19px auto 0; object-fit: contain; border-radius: 8px; }
.page-box .news-list li:first-child { border-top: 0; }
details { padding: 12px 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .87rem; color: var(--muted); }
.notice, .preview-note { padding: 12px 14px; border-radius: 7px; background: #ececec; color: #494949; font-size: .9rem; line-height: 1.6; }
.loading-copy, .empty-state { padding: 22px; margin: 0; border-radius: 8px; background: #f9f9f9; color: var(--muted); line-height: 1.65; word-break: keep-all; }
.entry-card { padding: 34px 27px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.entry-card h2 { font: 800 1.55rem/1.35 var(--display); margin: 10px 0 7px; }
.entry-card p { color: var(--muted); margin: 8px 0 17px; line-height: 1.7; }
.entry-mark { display: grid; place-items: center; width: 50px; height: 50px; margin: auto; color: #ffe4ac; background: #393939; border-radius: 10px; font-size: 1.7rem; }

.profile-band, .shop-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; border-radius: 10px; padding: 23px 26px; color: #f9f9f9; position: relative; isolation: isolate; overflow: hidden; background: #282828; }
.profile-band::before, .shop-banner::before { content: ""; position: absolute; z-index: -1; inset: 0; background:
  linear-gradient(105deg,#202020ed,#2d2d2dd9 52%,#3f3f3f75),
  url("/assets/fountain.webp") center 55% / cover; }
.profile-band h2, .shop-banner h2 { margin: 2px 0 0; font: 800 clamp(1.5rem,3vw,2.1rem)/1.35 var(--display); }
.profile-band .small-label { margin: 0; color: var(--gold-pale); font-weight: 750; font-size: .87rem; }
.profile-avatar { width: 66px; height: 66px; display: grid; place-items: center; overflow: hidden; background: #4d4d4d; border: 1px solid #828282; color: var(--gold-pale); border-radius: 11px; font-size: 2.2rem; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.profile-layout { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: 17px; margin-top: 16px; }
.data-panel { min-width: 0; padding: 22px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.data-panel h2 { margin-bottom: 9px; }
.coord-world { color: var(--muted); margin: 3px 0 13px; }
.coords { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.coords div { min-width: 0; padding: 9px 8px; background: #ececec; border-radius: 7px; text-align: center; overflow-wrap: anywhere; }
.coords span, .coords strong { display: block; }
.coords span { color: #545454; font-weight: 800; font-size: .8rem; }
.coords strong { font-variant-numeric: tabular-nums; margin-top: 4px; font-size: clamp(.97rem,1.8vw,1.27rem); }
.muted-label { color: var(--muted); margin: 12px 0 0; font-size: .87rem; }
.balance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.balance-card { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #e4e4e4; background: #f9f9f9; border-radius: 7px; }
.balance-card div { min-width: 0; }
.balance-card span { color: var(--muted); font-size: .84rem; }
.balance-card strong { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance-card .coin { flex: none; display: grid; place-items: center; min-width: 30px; min-height: 30px; border-radius: 10px; background: #f9e6b8; color: #77512e; }
.balance-card .coin-1 { background: #dadada; color: #525252; }
.balance-card .coin-2 { background: #ffd8e5; color: #a2375d; }
.balance-card .coin-3 { background: #d7eee8; color: #2a745f; }
.shop-banner { justify-content: space-between; }
.shop-banner p { color: #e7e7e7; margin: 7px 0 0; word-break: keep-all; }
.wallet-strip { display: flex; gap: 7px; flex-wrap: wrap; }
.wallet-strip span { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 9px; font-size: .85rem; border: 1px solid #adadad86; border-radius: 6px; background: #2a2a2ad6; }
.wallet-strip strong { color: var(--gold-pale); }
.catalog-tools, .mailbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 15px 0; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.category-tabs button { min-height: 40px; background: var(--surface); color: var(--primary); border: 1px solid var(--line); border-radius: 7px; padding: 7px 12px; font-weight: 750; }
.category-tabs button[aria-pressed=true] { color: #fff; background: var(--primary); border-color: var(--primary); }
#shop-search { display: flex; max-width: 100%; gap: 6px; align-items: stretch; }
#shop-search input { min-width: 0; padding: 7px 9px; width: 183px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
.product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.product-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 23px #31313148; border-color: #949494; }
.product-stage { position: relative; isolation: isolate; min-height: 158px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 42%,#c0c0c0 0%,#949494 27%,#494949 75%); }
.product-stage::after { content: ""; position: absolute; inset: 10px; z-index: -1; border: 1px solid #e2e2e267; border-radius: 7px; transform-origin: center; transition: opacity .18s ease; }
.product-stage::before { content: ""; position: absolute; width: 80px; height: 80px; z-index: -1; border-radius: 99px; outline: 1px solid #eeeeee55; box-shadow: 0 0 32px #ffe3bc69; background: #d9d9d938; }
.product-card:hover .product-stage::after { opacity: .45; }
.product-stage img { width: min(111px,76%); height: min(111px,75%); object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 4px #21212172); transition: transform .22s ease; }
.product-card:hover .product-stage img { transform: scale(1.08); }
.item-emblem { color: var(--gold-pale); font-size: 3.2rem; filter: drop-shadow(0 5px 9px #212121); }
.product-rarity { position: absolute; top: 14px; left: 14px; color: #fff4dc; background: #2a2a2acb; padding: 4px 7px; border-radius: 5px; font-size: .77rem; font-weight: 800; }
.product-copy { padding: 12px; display: flex; flex-direction: column; align-items: flex-start; min-height: 128px; gap: 5px; }
.product-copy h3 { font-size: 1rem; margin: 0; word-break: keep-all; }
.product-copy strong { color: #555555; font-size: .88rem; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.product-copy .button { margin-top: auto; min-height: 36px; font-size: .86rem; padding: 4px 9px; }
.pagination { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; color: var(--muted); }
.server-copy, .note-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.receipt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.receipt span { color: var(--muted); font-size: .9rem; }
.checkout-pending { background: #f5e8cf; padding: 10px 12px; border-radius: 7px; }
.checkout-pending button { min-height: 35px; }
.item-detail { display: grid; grid-template-columns: minmax(110px, 44%) 1fr; gap: 12px; margin: 14px 0; }
.item-detail .product-stage { border-radius: 8px; }
.item-detail p, .item-detail ul { color: var(--muted); margin: 3px 0 8px; line-height: 1.65; overflow-wrap: anywhere; }
.mailbox-panel { padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.mailbox-panel .mailbox-controls { margin: 0 0 14px; }
.mail-list { padding: 0; margin: 0; list-style: none; }
.mail-row { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 11px 3px; display: grid; align-items: center; grid-template-columns: 13px minmax(0, 1fr) auto; gap: 9px; width: 100%; text-align: left; min-height: 58px; }
.mail-row:hover { background: #f4f4f4; }
.mail-marker { width: 7px; height: 7px; border-radius: 50%; margin: auto; background: #c7c7c7; }
.mail-marker.unread { background: #6c6c6c; }
.mail-subject { min-width: 0; }
.mail-subject strong, .mail-subject span { display: block; overflow-wrap: anywhere; }
.mail-subject span, .mail-row time, .note-meta { color: var(--muted); font-size: .84rem; }
.mail-row time { white-space: nowrap; }

dialog { border: 1px solid #b6b6b6; border-radius: 11px; width: min(485px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 26px 90px #18181868; }
dialog::backdrop { background: #161616c4; backdrop-filter: blur(2px); }
dialog[open] { animation: appear .18s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.dialog-inner { padding: 22px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 13px; }
.dialog-head h2 { font: 800 1.48rem/1.4 var(--display); margin: 0; overflow-wrap: anywhere; }
.dialog-close { flex: none; background: #ececec; border: 0; border-radius: 7px; width: 34px; height: 34px; font-size: 1.35rem; line-height: 1; }
.dialog-inner > p { color: var(--muted); line-height: 1.65; }
.dialog-inner li { color: var(--ink); line-height: 1.65; padding-block: 3px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.slot-list { display: grid; gap: 7px; margin: 15px 0; }
.slot { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 54px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; text-align: left; }
.slot[aria-pressed=true] { border-color: #777777; background: #eaeaea; }
.slot strong, .slot span { display: block; }
.slot span { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.dialog-inner input, .dialog-inner select, .dialog-inner textarea { max-width: 100%; min-height: 40px; padding: 6px 8px; border-radius: 6px; border: 1px solid #c1c1c1; background: #fff; color: var(--ink); }
#preview-form input, #preview-form textarea { display: block; width: 100%; }
#chat-form { display: flex; flex-wrap: wrap; gap: 7px; }
#chat-form input { flex: 1; min-width: min(100%,140px); }
.feature-form { display: grid; gap: 7px; margin-top: 13px; }
.feature-form label { font-size: .91rem; font-weight: 750; margin-top: 2px; }
.feature-form textarea { resize: vertical; }
.feature-form .button { justify-self: start; }
.field-status { font-size: .88rem; color: #78523b; margin: 0; min-height: 0; }
.field-status:empty { display: none; }
.toast { position: fixed; inset: auto auto 16px 50%; text-align: center; transform: translateX(-50%); z-index: 4; padding: 10px 15px; border-radius: 8px; color: white; background: var(--primary); box-shadow: 0 8px 30px #2d2d2d68; width: max-content; max-width: calc(100% - 28px); }
.toast:empty { display: none; }
.article-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.site-guide-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.admin-panel { max-width: 850px; }
.admin-panel h2 { font-size: 1.1rem; }
.admin-controls { display: grid; min-inline-size: 0; padding: 0; margin: 0; border: 0; gap: 13px; }
.admin-controls > :is(h2, p), .admin-tabs { margin: 0; }
.admin-field { display: grid; min-width: 0; gap: 5px; font-weight: 700; }
.admin-field :is(input, select, textarea) { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; background: var(--surface); color: var(--ink); }
.admin-field textarea { resize: vertical; }
.admin-check { display: flex; align-items: center; gap: 9px; }
.admin-check input { width: auto; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.admin-media { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.admin-media img { width: 76px; height: 55px; object-fit: contain; border-radius: 7px; border: 1px solid var(--line); background: var(--soft-surface); }
.admin-operator { align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.admin-operator .button { margin-left: auto; }
.admin-status:not(:empty) { margin: 0 0 12px; }

:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #191919;
  --surface: #262626;
  --ink: #f0f0f0;
  --muted: #c3c3c3;
  --line: #454545;
  --accent: #cbcbcb;
  --primary: #494949;
  --focus: #d2d2d2;
  --header-bg: #262626;
  --utility-bg: #1c1c1c;
  --header-control: #363636;
  --soft-surface: #292929;
}
:root[data-theme="night"] .text-button { border-color: var(--line); }
:root[data-theme="night"] .nav-primary:hover, :root[data-theme="night"] .nav-primary[aria-expanded=true],
:root[data-theme="night"] .nav-group.current .nav-primary { color: var(--accent); }
:root[data-theme="night"] body[data-portal-mode="live"] .service-state { color: #b7e5db; }
:root[data-theme="night"] :is(.loading-copy,.empty-state,.balance-card,.coords div,.dialog-close) { background: var(--soft-surface); color: var(--ink); }
:root[data-theme="night"] :is(.notice,.preview-note,.button.soft,.slot[aria-pressed=true]) { background: var(--header-control); color: var(--ink); border-color: var(--line); }
:root[data-theme="night"] .dialog-inner :is(input,select,textarea) { background: var(--soft-surface); border-color: var(--line); }
:root[data-theme="night"] :is(.coords span,.product-copy strong,.field-status) { color: var(--accent); }
:root[data-theme="night"] :is(.mail-row:hover,.checkout-pending) { background: var(--header-control); color: var(--ink); }

@media (max-width: 1100px) {
  .header-inner, .wrap { width: calc(100% - 48px); }
  .global-nav { gap: 12px; }
  .main-grid { grid-template-columns: minmax(0,1fr) minmax(227px,260px) minmax(0,1fr); gap: 13px; }
  .news-panel, .update-panel { padding: 17px 15px 15px; }
  .section-head h2 { font-size: 1.17rem; }
}

@media (max-width: 940px) {
  .header-inner { min-height: 61px; width: calc(100% - 30px); }
  .wrap { width: calc(100% - 30px); }
  .global-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 8px 15px 14px; background: var(--header-bg); border-bottom: 1px solid var(--line); max-height: 74vh; overflow: auto; }
  .global-nav.open, .nav-group { display: block; }
  .nav-primary { text-align: left; width: 100%; padding: 9px 5px; min-height: 42px; }
  .nav-primary::after { display: none; }
  .nav-sub a { min-height: 42px; }
  .menu-toggle, .header-shop { display: inline-block; }
  .main-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-areas: "launch launch" "news update"; align-items: start; margin-top: 23px; gap: 13px; }
  .account-panel { width: min(390px,100%); justify-self: center; }
  .launch-head { margin-top: -54px; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .hero, .hero + .main-grid { width: calc(100% - 30px); }
  .hero { margin-top: 10px; }
  .main-grid { grid-template-columns: 1fr; grid-template-areas: "launch" "news" "update"; }
  .account-panel { width: 100%; }
  .launch-head {
    --start-size: clamp(134px, 39vw, 158px);
    --start-text-size: clamp(1.43rem, 4.6vw, 1.72rem);
    margin-top: -50px;
  }
  .launch-download { min-height: 44px; }
  .features { padding: 21px 0 25px; }
  .feature-grid { grid-template-columns: 1fr; gap: 9px; }
  .feature-grid a { min-height: 106px; }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .platforms { margin: 0; }
  .page { padding-top: 22px; }
  .profile-layout { grid-template-columns: 1fr; gap: 12px; }
  .profile-band, .shop-banner { padding: 16px; }
  .profile-actions { margin-left: 0; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .product-stage { min-height: 123px; }
  .product-copy { padding: 9px; }
  .data-panel, .mailbox-panel { padding: 14px; }
  .mail-row { grid-template-columns: 11px minmax(0,1fr); gap: 5px 7px; }
  .mail-row time { grid-column: 2; }
}
.mobile-view { --wrap: 650px; }
.mobile-view .header-inner, .mobile-view .wrap { width: min(650px,calc(100% - 30px)); }
.mobile-view .header-inner { min-height: 61px; }
.mobile-view .global-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: 74vh; overflow: auto; background: var(--header-bg); border-bottom: 1px solid var(--line); padding: 8px max(15px,calc((100% - 650px) / 2)) 14px; }
.mobile-view .global-nav.open, .mobile-view .nav-group, .mobile-view .menu-toggle, .mobile-view .header-shop { display: block; }
.mobile-view .nav-primary { width: 100%; text-align: left; padding: 9px 5px; min-height: 42px; }
.mobile-view .nav-primary::after { display: none; }
.mobile-view .nav-sub a { min-height: 42px; }
.mobile-view .main-grid, .mobile-view .profile-layout { grid-template-columns: 1fr; }
.mobile-view .main-grid { grid-template-areas: "launch" "news" "update"; margin-top: 22px; }
.mobile-view .account-panel { width: 100%; }
.mobile-view .launch-head {
  --start-size: clamp(134px, 39vw, 158px);
  --start-text-size: clamp(1.43rem, 4.6vw, 1.72rem);
  margin-top: -50px;
}
.mobile-view .launch-download { min-height: 44px; }
.mobile-view .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 370px) {
  .header-inner, .wrap, .mobile-view .header-inner, .mobile-view .wrap { width: calc(100% - 20px); }
  .header-inner { gap: 7px; }
  .header-actions { gap: 3px; }
  .header-inner .wordmark { gap: 4px; }
  .header-inner .brandmark { width: 34px; height: 34px; }
  .text-button, .header-shop, .header-mail { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
