/* GameCabi theme — inspired by the official PSO2 NGS site: navy header, sky-blue page, white cards, electric-blue accents. */
:root {
  --brand: #354fed; --brand-dark: #2437b8; --navy: #0c274b; --navy-2: #1c3351; --bg: #f2f5fb; --bg-2: #e7ecf5; --card: #ffffff;
  --line: #c3cbd8; --line-2: #d3dcea; --text: #1c3351; --text-2: #4a5b7a; --muted: #707db3; --accent: #ed0128; --ok: #1f9d55; --warn: #d98a00;
  --shadow: 0 2px 10px rgba(12, 39, 75, .08); --radius: 6px; --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --tag-campaign: #e0417c; --tag-information: #354fed; --tag-maintenance: #e58a13; --tag-update: #1f9d55; --tag-event: #8a3ffc; --tag-media: #0aa4c7;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e1626; --bg-2: #131d31; --card: #17233a; --line: #2a3a5c; --line-2: #22304d; --text: #e6ecf7; --text-2: #b6c2dc; --muted: #8b9ccc; --navy: #0a1424; --navy-2: #12213b;
  --shadow: 0 2px 12px rgba(0, 0, 0, .4); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; } .between { justify-content: space-between; }

/* header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .5px; font-size: 18px; }
.logo:hover { text-decoration: none; }
.logo .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), #6d89d5); display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.logo .game { font-weight: 500; opacity: .75; font-size: 12px; display: block; letter-spacing: 0; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { color: #dfe6f5; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; } .nav a.active { background: var(--brand); color: #fff; }
.top .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 0 10px; height: 34px; }
.search input { background: none; border: 0; color: #fff; width: 190px; outline: none; } .search input::placeholder { color: #b6c2dc; }
.iconbtn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 20px; height: 34px; padding: 0 12px; font-weight: 600; font-size: 13px; }
.iconbtn:hover { background: rgba(255,255,255,.22); }
.burger { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 8px 16px 14px; border-top: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: flex; } .burger { display: inline-flex; } .search input { width: 120px; } .logo .game { display: none; }
}

/* page banner */
.banner { background: linear-gradient(180deg, #dbe6fb 0%, var(--bg) 100%); padding: 34px 0 18px; }
[data-theme="dark"] .banner { background: linear-gradient(180deg, #17264a 0%, var(--bg) 100%); }
.pageTitle { margin: 0; font-size: 34px; font-weight: 300; color: var(--brand); letter-spacing: .5px; display: flex; align-items: center; gap: 16px; }
.pageTitle::before, .pageTitle::after { content: ""; width: 3px; height: 30px; background: var(--brand); display: inline-block; }
.pageTitle::after { display: none; } .pageTitle.center { justify-content: center; } .pageTitle.center::after { display: inline-block; }
.subtitle { color: var(--text-2); margin: 6px 0 0; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; padding: 18px 0 60px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } .side { order: 2; } }
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card h2, .card h3 { margin: 0 0 12px; font-weight: 700; }
.card h2 { font-size: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); display: flex; align-items: center; gap: 10px; }
.card h2 .more { margin-left: auto; font-size: 13px; font-weight: 600; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); } .crumbs span::before { content: "›"; margin: 0 2px 0 0; }
.sidebtn { display: block; text-align: center; padding: 12px; border-radius: var(--radius); color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 10px; box-shadow: var(--shadow); border: 2px solid rgba(255,255,255,.35); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.sidebtn small { display: block; font-weight: 600; font-size: 12px; opacity: .9; }
.sidebtn:hover { text-decoration: none; filter: brightness(1.08); }
.sb-blue { background: linear-gradient(135deg, #3e5bf0, #2437b8); } .sb-pink { background: linear-gradient(135deg, #e0417c, #b32460); } .sb-green { background: linear-gradient(135deg, #2bb673, #1a7f4f); }
.sb-teal { background: linear-gradient(135deg, #21a2c9, #146e8a); } .sb-purple { background: linear-gradient(135deg, #8a5cf6, #5b32c9); } .sb-navy { background: linear-gradient(135deg, #34507f, #0c274b); }

/* item grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--text); transition: transform .12s, box-shadow .12s; position: relative; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile .img { aspect-ratio: 1; background: linear-gradient(90deg, var(--bg-2), var(--card), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; display: grid; place-items: center; overflow: hidden; }
.tile .img.loaded { animation: none; background: var(--bg-2); }
.tile .img img { width: 100%; height: 100%; object-fit: contain; }
.tile .body { padding: 8px 10px 10px; font-size: 13px; line-height: 1.35; }
.tile .name { font-weight: 600; display: block; }
.tile .meta { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line-2); white-space: nowrap; }
.badge.new { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge.ok { background: #e6f6ec; color: var(--ok); border-color: #b9e4c9; } .badge.no { background: #fdecec; color: #b91c1c; border-color: #f5c2c2; }
[data-theme="dark"] .badge.ok { background: #14301f; } [data-theme="dark"] .badge.no { background: #3a1616; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 3px; background: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.tag.campaign { background: var(--tag-campaign); } .tag.information { background: var(--tag-information); } .tag.maintenance { background: var(--tag-maintenance); }
.tag.update { background: var(--tag-update); } .tag.event { background: var(--tag-event); } .tag.media { background: var(--tag-media); }
.corner { position: absolute; top: 6px; left: 6px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .when { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 82px; padding-top: 2px; }
.list .ttl { flex: 1; } .list .ttl a { color: var(--text); font-weight: 600; } .list .ttl a:hover { color: var(--brand); }
.list .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip.on, .chip:hover { border-color: var(--brand); color: var(--brand); } .chip.on { background: var(--brand); color: #fff; }
select.ctl, input.ctl, textarea.ctl { border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; background: var(--card); min-height: 36px; }
.btn { border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: var(--radius); padding: 8px 16px; font-weight: 700; }
.btn:hover { background: var(--brand-dark); } .btn.ghost { background: transparent; color: var(--brand); } .btn.danger { background: var(--accent); border-color: var(--accent); }
.btn.sm { padding: 4px 10px; font-size: 13px; } .btn:disabled { opacity: .5; cursor: default; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--card), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 60px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: center; background: linear-gradient(135deg, var(--navy) 0%, #1f3a7a 60%, #354fed 100%); color: #fff; border-radius: 10px; padding: 26px 28px; margin-bottom: 18px; box-shadow: var(--shadow); }
.hero h2 { margin: 0 0 6px; font-size: 28px; font-weight: 800; } .hero p { margin: 0 0 14px; opacity: .9; }
.hero .banner-img { border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.08); aspect-ratio: 16/9; display: grid; place-items: center; }
.hero .banner-img img { width: 100%; height: 100%; object-fit: cover; }
.hero .btn { background: #fff; color: var(--brand); border-color: #fff; } .hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .pageTitle { font-size: 26px; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--bg-2); border-radius: var(--radius); padding: 10px 12px; } .stat b { display: block; font-size: 22px; color: var(--brand); } .stat span { color: var(--muted); font-size: 12px; }

/* detail */
.detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
.detail .figure { background: var(--bg-2); border-radius: var(--radius); display: grid; place-items: center; min-height: 240px; overflow: hidden; }
.detail .figure img { width: 100%; height: auto; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; } .tbl tr:hover td { background: var(--bg-2); }
.scroll { overflow-x: auto; }
.article { line-height: 1.7; } .article img { max-width: 100%; } .article iframe { max-width: 100%; } .article h2, .article h3, .article h4 { color: var(--brand); margin: 18px 0 8px; }
.article ul { padding-left: 20px; } .article .attentionMark { color: var(--muted); font-size: 13px; } .article .btnWrap a { display: inline-block; margin: 8px 8px 0 0; padding: 8px 14px; background: var(--brand); color: #fff; border-radius: var(--radius); font-weight: 700; }

/* toast + modal */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 20px; box-shadow: var(--shadow); z-index: 60; font-weight: 600; }
.toast.err { background: var(--accent); }
.overlay { position: fixed; inset: 0; background: rgba(5, 12, 30, .72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.overlay img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.modal { background: var(--card); border-radius: 10px; padding: 22px; width: min(460px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.modal h3 { margin-top: 0; } .field { display: grid; gap: 4px; margin-bottom: 12px; } .field label { font-size: 13px; color: var(--muted); font-weight: 600; }

footer { border-top: 1px solid var(--line-2); padding: 22px 0 40px; color: var(--muted); font-size: 12px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
