:root {
  --bg: #0c141a;
  --bg-soft: #111d25;
  --panel: #16242d;
  --panel-light: #1d303a;
  --line: #34505a;
  --text: #f1eadc;
  --muted: #a8b7b8;
  --gold: #d6ad63;
  --gold-light: #f0cf87;
  --teal: #65b9b2;
  --danger: #e79a82;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); }
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: #fff2ce; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code { background: #0a1217; color: #b9dfd8; padding: .18em .42em; border-radius: 4px; overflow-wrap: anywhere; }
main { min-height: 65vh; }
.site-header { min-height: 74px; padding: 10px clamp(18px, 4vw, 64px); display: flex; align-items: center; gap: 26px; background: rgba(9, 17, 22, .96); border-bottom: 1px solid #263d46; position: relative; z-index: 20; }
.brand img { width: 234px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a { color: var(--muted); padding: 9px 11px; border-radius: 5px; font-size: 14px; }
.main-nav a.active, .main-nav a:hover { color: var(--gold-light); background: #1a2a31; }
.account { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.account a { white-space: nowrap; }
.inline-form { display: inline; }
.text-button { padding: 0; border: 0; background: none; color: var(--muted); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); padding: 7px 10px; border-radius: 5px; }
.section { width: min(1180px, calc(100% - 40px)); margin: 64px auto; }
.hero { min-height: 650px; position: relative; display: flex; align-items: center; background: url('/assets/ships.jpg') center 48% / cover no-repeat; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 15, 20, .96) 0%, rgba(8, 15, 20, .8) 38%, rgba(8, 15, 20, .15) 78%), linear-gradient(0deg, var(--bg) 0%, transparent 32%); }
.hero-content { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 90px 0 110px; max-width: 1180px; }
.hero-content h1 { margin: 5px 0 16px; font: 700 clamp(58px, 9vw, 112px)/.98 var(--serif); letter-spacing: -.05em; color: #f4dfac; text-shadow: 0 4px 30px #000; }
.hero-lead { max-width: 650px; color: #e1dfd4; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; }
.hero-actions { display: flex; gap: 12px; margin: 32px 0 26px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 21px; border: 1px solid var(--gold); border-radius: 4px; font-weight: 650; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--gold); color: #162028; }
.button.primary:hover { background: var(--gold-light); color: #111; }
.button.secondary { background: #315b5d; color: #f1f5e9; border-color: #568786; }
.button.ghost { background: rgba(14, 24, 30, .65); color: var(--text); border-color: #64736f; }
.hero-status { display: flex; align-items: center; gap: 9px; color: #d6ded9; font-size: 13px; flex-wrap: wrap; }
.divider { height: 14px; width: 1px; background: #74817c; margin: 0 7px; }
.status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #7c8989; box-shadow: 0 0 10px currentColor; }
.status-dot.online { background: #76c79d; color: #76c79d; }
.status-dot.offline { background: #b67b70; color: #b67b70; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-grid article { border-top: 1px solid var(--line); padding-top: 23px; }
.feature-grid h2 { font: 26px/1.2 var(--serif); color: #e6d5af; }
.feature-grid p, .split-banner p, .cta-panel p { color: var(--muted); }
.feature-number { color: var(--teal); font: 13px var(--serif); }
.split-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split-banner h2, .cta-panel h2 { font: 36px/1.2 var(--serif); color: #e6d5af; }
.split-banner img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border: 1px solid #3c4e50; box-shadow: 0 20px 60px #050a0c; }
.cta-panel { padding: 32px 36px; display: flex; align-items: center; justify-content: space-between; gap: 28px; background: linear-gradient(110deg, #1b3138, #17242b); border: 1px solid #3c5a60; }
.cta-panel h2 { margin: 0 0 10px; }
.page-header { padding: 76px max(20px, calc((100% - 1180px)/2)) 52px; background: radial-gradient(circle at 75% 10%, #27434b 0, transparent 45%), #101d25; border-bottom: 1px solid #29414a; }
.page-header h1 { font: 700 clamp(40px, 6vw, 64px)/1.08 var(--serif); color: #ead6aa; margin: 10px 0 16px; }
.page-header p { max-width: 750px; color: var(--muted); font-size: 18px; }
.steps { max-width: 900px; }
.steps article { display: grid; grid-template-columns: 58px 1fr; gap: 24px; padding: 27px 0; border-bottom: 1px solid #2b4047; }
.steps article > span { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-light); border-radius: 50%; font: 22px var(--serif); }
.steps h2 { margin: 0 0 8px; font: 26px var(--serif); color: #e5d4b1; }
.steps p { color: var(--muted); }
.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.address-grid div { background: var(--panel); border: 1px solid var(--line); padding: 16px; }
.address-grid small { display: block; color: var(--muted); margin-bottom: 8px; }
.address-grid code { font-size: 17px; }
.wiki-group { margin-bottom: 45px; }
.wiki-group > h2 { font: 30px var(--serif); color: #dfcda8; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card { background: var(--panel); border: 1px solid #2a424c; padding: 23px; transition: border-color .15s, transform .15s; }
.info-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.info-card h3 { color: var(--text); font: 22px/1.25 var(--serif); margin: 0 0 10px; }
.info-card p { color: var(--muted); font-size: 14px; }
.info-card span { color: var(--teal); font-size: 13px; }
.article-layout { display: grid; grid-template-columns: 180px minmax(0, 760px); gap: 50px; justify-content: center; }
.article-layout aside { display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.article-layout aside span { color: var(--muted); }
.article { max-width: 820px; }
.article h1 { font: 700 clamp(38px, 5vw, 58px)/1.12 var(--serif); color: #ead6aa; margin: 8px 0 14px; }
.article h2 { font: 29px/1.25 var(--serif); color: #e1cfa9; margin: 38px 0 12px; }
.article h3 { font: 23px/1.25 var(--serif); color: #e1cfa9; margin-top: 28px; }
.article p, .article li { color: #c5ceca; }
.article .lead, .lead { color: var(--muted); font-size: 18px; }
.article code { font-size: .9em; }
.article a { text-decoration: underline; text-underline-offset: 3px; }
.numbered { padding-left: 5px; }
.news-list { max-width: 850px; display: grid; gap: 18px; }
.news-list article { padding: 25px 28px; background: var(--panel); border-left: 3px solid var(--gold); }
.news-list h2 { font: 25px var(--serif); color: #e1cfa9; }
.news-list p { color: #c5ceca; white-space: pre-wrap; }
.news-meta { color: var(--teal); font-size: 12px; margin-bottom: 15px; }
.server-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.server-card { background: var(--panel); border: 1px solid var(--line); padding: 28px; }
.server-card h2 { font: 29px var(--serif); color: #e1cfa9; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.server-card code { display: inline-block; margin: 7px 0 16px; }
.online-number { font: 42px var(--serif); color: var(--gold-light); }
.server-card p, .note { color: var(--muted); }
.note { font-size: 14px; }
.empty-state { padding: 36px; text-align: center; border: 1px dashed #486069; background: rgba(21, 36, 45, .65); }
.empty-state h3 { font: 26px var(--serif); color: #e3d1aa; }
.empty-state p { color: var(--muted); max-width: 650px; margin: 8px auto; }
.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.player-card { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid #2b434c; padding: 18px; }
.player-card h3 { color: var(--text); margin: 0; font: 21px var(--serif); }
.player-card p { color: var(--muted); margin: 3px 0; font-size: 13px; }
.player-card span { color: var(--teal); font-size: 12px; }
.avatar-placeholder { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(140deg, #4b7776, #2a3d46); color: #f4dfac; font: 27px var(--serif); border: 1px solid #69918b; }
.avatar-placeholder.large { width: 96px; height: 96px; font-size: 48px; margin-top: -100px; border: 4px solid var(--bg); }
.profile-cover { height: 250px; background: linear-gradient(120deg, #25464e, #181e29); background-size: cover; background-position: center; }
.profile-public { position: relative; padding-top: 10px; }
.profile-public h1 { font: 48px var(--serif); color: #e7d3a9; margin: 15px 0 5px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0; }
.stats-row > div { background: var(--panel); border: 1px solid var(--line); padding: 16px; }
.stats-row small { color: var(--muted); display: block; }
.stats-row strong { font: 22px var(--serif); color: var(--gold-light); }
.heroic-title { display: inline-block; color: var(--gold-light); border: 1px solid var(--gold); padding: 8px 16px; margin-bottom: 20px; font: 20px var(--serif); }
.bio { margin-top: 28px; }
.muted { color: var(--muted); }
.shop-hero { padding: 70px max(20px, calc((100% - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 35px; background: linear-gradient(105deg, rgba(12, 20, 26, .96), rgba(17, 33, 40, .75)), url('/assets/ships.jpg') center 62%/cover; }
.shop-hero h1, .funding-hero h1 { font: 700 clamp(42px, 6vw, 68px)/1.08 var(--serif); color: #ead6aa; margin: 10px 0 14px; }
.shop-hero p { max-width: 660px; color: #c6ceca; font-size: 18px; }
.shop-notice { max-width: 310px; background: rgba(13, 23, 28, .93); border: 1px solid var(--gold); padding: 22px; }
.shop-notice strong { display: block; color: var(--gold-light); font: 24px var(--serif); margin-bottom: 8px; }
.shop-notice span { color: var(--muted); font-size: 14px; }
.shop-nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: center; gap: 4px; padding: 12px 16px; background: rgba(10, 18, 23, .97); border-bottom: 1px solid #2b4149; overflow-x: auto; }
.shop-nav a { padding: 7px 12px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.shop-category { margin-bottom: 52px; scroll-margin-top: 60px; }
.category-title { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #31474f; padding-bottom: 12px; }
.category-title h2 { font: 34px var(--serif); color: #e3d0a7; margin: 0; }
.category-title span { color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid #2d454f; padding: 22px; min-height: 260px; }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tag { color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.price { color: var(--gold-light); font: 26px var(--serif); white-space: nowrap; }
.product-card h3 { font: 24px/1.2 var(--serif); color: #e5d3af; margin: 18px 0 8px; }
.product-card p { color: var(--muted); font-size: 14px; flex: 1; }
.product-card .warning { color: var(--danger); border-left: 2px solid var(--danger); padding-left: 10px; }
.sold-out { width: 100%; margin-top: 16px; padding: 10px 14px; border: 1px solid #4b5d62; background: #24343a; color: #91a1a3; border-radius: 3px; cursor: not-allowed; }
.funding-hero { padding: 76px max(20px, calc((100% - 1180px)/2)) 56px; background: radial-gradient(circle at 75% 10%, #2c5055 0, transparent 44%), #101e25; }
.funding-hero > p { max-width: 790px; color: var(--muted); font-size: 18px; }
.funding-meter { max-width: 850px; margin-top: 38px; }
.meter-track { height: 16px; background: #24353b; border: 1px solid #486169; }
.meter-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.meter-label { display: flex; justify-content: space-between; margin-top: 12px; color: var(--gold-light); }
.meter-label strong { font: 27px var(--serif); }
.meter-label span { font: 27px var(--serif); }
.meter-goal { color: var(--muted); }
.parts-table { border: 1px solid var(--line); }
.parts-head, .parts-row { display: grid; grid-template-columns: 1fr 1.3fr .8fr 1.7fr; gap: 15px; padding: 15px 18px; align-items: center; }
.parts-head { background: #20353d; color: var(--teal); font-size: 12px; text-transform: uppercase; }
.parts-row { border-top: 1px solid #2c424a; }
.parts-row strong { color: #e5d2ad; }
.parts-row span { color: var(--muted); font-size: 14px; }
.login-panel { max-width: 650px; text-align: center; }
.site-footer { padding: 36px max(20px, calc((100% - 1180px)/2)); border-top: 1px solid #293f47; background: #091116; color: var(--muted); font-size: 12px; }
.site-footer > div:first-child { display: flex; gap: 18px; align-items: center; }
.site-footer strong { color: var(--gold); font: 20px var(--serif); letter-spacing: .08em; }
.footer-links { display: flex; gap: 18px; margin: 15px 0; flex-wrap: wrap; }
.site-footer p { max-width: 900px; }
@media (max-width: 1050px) {
  .site-header { gap: 14px; }
  .brand img { width: 190px; }
  .main-nav a { padding: 8px 7px; font-size: 12px; }
  .account { font-size: 12px; }
  .product-grid, .card-grid, .player-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; padding: 10px 16px; }
  .brand img { width: 205px; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0; }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 15px; padding: 10px; }
  .account { margin-left: auto; }
  .hero { min-height: 590px; background-position: 62% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(8,15,20,.96), rgba(8,15,20,.62)), linear-gradient(0deg, var(--bg), transparent 45%); }
  .hero-content h1 { font-size: 62px; }
  .feature-grid, .split-banner, .server-grid { grid-template-columns: 1fr; }
  .split-banner { gap: 25px; }
  .cta-panel { align-items: flex-start; flex-direction: column; padding: 25px; }
  .section { margin: 42px auto; }
  .page-header { padding-top: 48px; }
  .card-grid, .product-grid, .player-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: 15px; }
  .article-layout aside { flex-direction: row; }
  .address-grid { grid-template-columns: 1fr; }
  .shop-hero { flex-direction: column; align-items: flex-start; padding-top: 48px; }
  .shop-notice { max-width: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .parts-head { display: none; }
  .parts-row { grid-template-columns: 1fr 1fr; }
  .parts-row span:last-child { grid-column: 1 / -1; }
  .category-title { align-items: flex-start; flex-direction: column; }
  .site-footer > div:first-child { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 430px) {
  .brand img { width: 174px; }
  .account-link { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
  .hero-content h1 { font-size: 52px; }
  .stats-row { grid-template-columns: 1fr; }
  .steps article { grid-template-columns: 42px 1fr; gap: 14px; }
  .steps article > span { width: 38px; height: 38px; }
}

.profile-avatar-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--gold); }
.profile-avatar-wrap h2 { margin: 0; font: 28px var(--serif); color: #e4d1a9; }
.profile-avatar-wrap p { margin: 3px 0; color: var(--muted); }
.profile-edit { max-width: 900px; }
.edit-form { display: grid; gap: 18px; margin-top: 26px; }
.edit-form label, .admin-product label { display: grid; gap: 7px; color: #d9cfb7; font-size: 14px; }
.edit-form small { color: var(--muted); }
.edit-form input, .edit-form textarea, .admin-product input, .admin-product textarea { width: 100%; border: 1px solid #3a535d; background: #0d181e; color: var(--text); padding: 11px 12px; border-radius: 3px; }
.edit-form input:focus, .edit-form textarea:focus, .admin-product input:focus, .admin-product textarea:focus { outline: 1px solid var(--gold); }
.edit-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.notice-success { padding: 12px 15px; color: #b9e0c5; background: #1c3d32; border: 1px solid #3b6b55; margin-bottom: 18px; }
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.admin-grid h2 { font: 28px var(--serif); color: #e2cfa9; }
.admin-products { display: grid; gap: 18px; }
.admin-product { display: grid; gap: 13px; padding: 20px; background: var(--panel); border: 1px solid var(--line); }
.admin-product-title { display: flex; justify-content: space-between; gap: 15px; color: var(--teal); }
.check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; }
.check input { width: auto !important; }
.admin-wiki-list { display: grid; gap: 14px; }
.admin-wiki-list article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px; background: var(--panel); border: 1px solid #2d454f; }
.admin-wiki-list article h2 { margin: 4px 0; font: 24px var(--serif); color: #e4d1ab; }
.admin-wiki-list article p { color: var(--muted); margin: 4px 0; }
.admin-wiki-list article span { color: var(--teal); font-size: 12px; }
.admin-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.danger { color: var(--danger); }
.wiki-editor { font: 14px/1.55 ui-monospace, Consolas, monospace; min-height: 460px; }
@media (max-width: 760px) {
  .admin-grid, .form-row { grid-template-columns: 1fr; }
  .admin-wiki-list article { align-items: flex-start; flex-direction: column; }
  .admin-actions { flex-wrap: wrap; }
}
