/* Digital Tamers portal. Game art from the client, flat panels with a cut corner like the in-game windows. */
@font-face { font-family: "Oxanium"; src: url(/fonts/oxanium.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
    --ink: #05080d;
    --panel: #0b1118;
    --panel-2: #101923;
    --line: #1c2937;
    --line-2: #2a3b4e;
    --text: #e9eff6;
    --muted: #8d9db0;
    --dim: #5f7085;
    --cyan: #2bd9ff;
    --cyan-ink: #03222b;
    --amber: #ffb547;
    --red: #ff6464;
    --green: #39d98a;
    --discord: #5865f2;
    --cut: 14px;
    --display: "Oxanium", "Segoe UI", sans-serif;
    --body: "Barlow", "Segoe UI", system-ui, sans-serif;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ink); color: var(--text); font: 16px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0 0 .5em; line-height: 1.1; letter-spacing: .01em; }
p { margin: 0 0 1em; }
code { font-family: Consolas, monospace; font-size: .9em; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- header ---------- */
.top { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: var(--ink); }
.top-inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--cyan); font-weight: 700; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--text); text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top-right .who { color: var(--muted); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.status i { width: 8px; height: 8px; background: var(--dim); transform: rotate(45deg); }
.status.up i { background: var(--green); }
.status.down i { background: var(--red); }
.page-home .top { position: absolute; left: 0; right: 0; background: linear-gradient(180deg, rgba(5, 8, 13, .92) 0%, rgba(5, 8, 13, .6) 70%, rgba(5, 8, 13, 0) 100%); border-bottom: 0; padding-bottom: 18px; }
.page-home .nav a, .page-home .top-right a, .page-home .top-right .who, .page-home .top-right button.link { color: #e9eff6; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.page-home .nav a:hover { color: var(--cyan); }
.inline { display: inline; margin: 0; }

/* ---------- buttons ---------- */
.btn { --c: var(--cyan); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1px solid var(--c); background: var(--c); color: var(--cyan-ink); font: 600 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
       clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn.line { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.line:hover { border-color: var(--text); filter: none; }
.btn.discord { --c: var(--discord); color: #fff; }
.btn.amber { --c: var(--amber); color: #2a1a00; }
.btn.sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn svg { width: 18px; height: 18px; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: 500 16px var(--body); cursor: pointer; }
button.link:hover { color: var(--text); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- home ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; background: #0d1a10 url(/img/bg/hero.webp) 12% 0 / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background:
    linear-gradient(0deg, var(--ink) 0%, rgba(5, 8, 13, .82) 22%, rgba(5, 8, 13, .25) 55%, rgba(5, 8, 13, .1) 100%),
    linear-gradient(90deg, rgba(5, 8, 13, .65) 0%, rgba(5, 8, 13, 0) 60%); }
.hero-inner { position: relative; width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px 56px; }
.hero-mark { width: 64px; height: 64px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 8vw, 96px); text-transform: uppercase; letter-spacing: .02em; margin: 0; line-height: .95; }
.hero h1 span { display: block; color: var(--cyan); font-size: .42em; letter-spacing: .32em; font-weight: 500; margin-top: 10px; }
.hero .tag { color: #e3ebf3; font-size: 19px; margin: 18px 0 28px; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.hero h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.hero-bar, .hero-bar a { color: #c9d6e3; }
.hero-bar { margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: 10px 36px; color: var(--muted); font-size: 15px; }
.hero-bar strong { color: var(--text); font-weight: 600; }
.hero-bar a { color: var(--muted); }
.hero-bar a:hover { color: var(--text); }

/* ---------- layout ---------- */
.wrap { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 36px 20px 56px; }
.foot { border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot-inner { max-width: 1160px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.page-home .foot { display: none; }

/* panel: flat, 1px frame, cut top-right corner */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 24px 26px; margin-bottom: 18px;
         clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.panel > h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- auth pages ---------- */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); min-height: calc(100vh - 65px); }
.auth-art { position: relative; background: #101826 var(--art, url(/img/bg/digital.webp)) center / cover no-repeat; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 8, 13, .15), rgba(5, 8, 13, .55) 85%, var(--ink)); }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 34px; text-transform: uppercase; letter-spacing: .03em; }
.auth-box .sub { color: var(--muted); margin-bottom: 26px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.after { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
.form .hint { color: var(--dim); font-weight: 400; font-size: 13px; }
.form .lbl { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
input, select { width: 100%; height: 46px; padding: 0 14px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 16px var(--body); border-radius: 0; }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: -1px; border-color: transparent; }
input::placeholder { color: var(--dim); }
.form .check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; color: var(--muted); font-size: 15px; }
.form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cyan); flex: none; }
.form > .btn:not(.wide) { align-self: flex-start; }
.inline-form { flex-direction: row; align-items: stretch; }
.inline-form > :first-child { flex: 1; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-left: 3px solid var(--red); background: rgba(255, 100, 100, .08); padding: 12px 16px; margin: 0 0 18px; color: #ffd9d9; }
ul.alert { padding-left: 36px; }
.alert.ok { border-left-color: var(--green); background: rgba(57, 217, 138, .08); color: #d6ffe9; }

.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-left: 3px solid var(--amber); background: rgba(255, 181, 71, .08); padding: 10px 16px; margin: 0 0 18px; color: #ffe7c2; }

.confirm-box { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; border: 1px solid var(--cyan); background: rgba(43, 217, 255, .06); padding: 18px 22px; margin: 0 0 18px; }
.confirm-box h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 4px; }
.confirm-box p { margin: 0; }
.code-form { display: flex; gap: 10px; grid-row: span 2; }
.code-form input { width: 160px; text-align: center; font: 700 24px var(--display); letter-spacing: .3em; }
@media (max-width: 640px) { .confirm-box { grid-template-columns: 1fr; } .code-form { grid-row: auto; } }

/* ---------- dashboard ---------- */
.banner { position: relative; background: #101826 var(--art, url(/img/bg/yokohama.webp)) center 40% / cover no-repeat; border-bottom: 1px solid var(--line); }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink) 0%, rgba(5, 8, 13, .55) 60%, rgba(5, 8, 13, .3) 100%); }
.banner-inner { position: relative; max-width: 1160px; margin: 0 auto; padding: 72px 20px 0; display: flex; align-items: flex-end; gap: 20px; }
.banner h1 { font-size: 40px; margin: 0; }
.banner .meta { color: #b9c6d4; font-size: 15px; margin: 6px 0 0; }
.tabs { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; gap: 28px; position: relative; }
.tabs-wrap { border-bottom: 1px solid var(--line); margin-top: 26px; }
.tabs a { padding: 12px 0 14px; color: var(--muted); font: 600 14px var(--display); text-transform: uppercase; letter-spacing: .12em; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--cyan); }
.tabs a:hover { color: var(--text); text-decoration: none; }
.grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.hex { --s: 64px; width: var(--s); height: calc(var(--s) * 1.1547); flex: none; background: var(--line-2); display: grid; place-items: center;
       clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex > span { width: calc(var(--s) - 4px); height: calc((var(--s) - 4px) * 1.1547); background: #0f1822; display: grid; place-items: center; overflow: hidden;
              clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex img { width: 100%; height: auto; image-rendering: auto; }
.hex.big { --s: 96px; }
.noimg { font: 700 22px var(--display); color: var(--dim); }
.hex.cyan { background: var(--cyan); }

.tamers { display: grid; gap: 12px; }
.tamer { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); }
.tamer .who { display: flex; align-items: center; }
.tamer .who .hex + .hex { margin-left: -14px; margin-top: 26px; --s: 44px; }
.tamer h3 { font-size: 20px; margin: 0 0 2px; }
.tamer .info { color: var(--muted); font-size: 15px; }
.tamer .info b { color: var(--text); font-weight: 600; }
.lv { font: 700 13px var(--display); color: var(--cyan-ink); background: var(--cyan); padding: 2px 7px; margin-right: 8px; letter-spacing: .04em; }
.state { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.state i { width: 7px; height: 7px; background: var(--dim); transform: rotate(45deg); }
.state.live i { background: var(--green); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; display: grid; place-items: center; font: 700 15px var(--display); color: var(--cyan); border: 1px solid var(--line-2); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px; border-left: 1px solid var(--line); }
.steps h3 { font-size: 18px; margin: 4px 0 4px; }
.steps p { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; width: 38%; padding-right: 16px; }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }

/* ---------- rankings / digimon ---------- */
.tabs.plain { padding: 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; max-width: none; }
.panel.flush { padding: 0; }
.pad { padding: 20px 24px; }
table.rank { width: 100%; border-collapse: collapse; }
.rank th { text-align: left; font: 600 12px var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.rank td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rank tr:last-child td { border-bottom: 0; }
.rank tbody tr:hover { background: var(--panel-2); }
.rank .pos { width: 52px; font: 700 16px var(--display); color: var(--dim); }
.rank .top .pos { color: var(--amber); }
.rank .top1 .pos { font-size: 20px; }
.num { font-variant-numeric: tabular-nums; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.mini { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.mini img { width: 30px; height: 30px; }
.search { max-width: 320px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { background: transparent; border: 1px solid var(--line-2); color: var(--muted); padding: 6px 14px; font: 500 14px var(--body); cursor: pointer; }
.chip.on, .chip:hover { border-color: var(--cyan); color: var(--text); }
.dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dex-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 10px 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.dex-card:hover { border-color: var(--cyan); text-decoration: none; }
.dex-card .hex { --s: 58px; }
.dex-card[hidden] { display: none; }
.crumbs { color: var(--dim); font-size: 14px; margin-bottom: 10px; }
.dex-head { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.dex-head h1 { font-size: 38px; margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags .tag { border: 1px solid var(--line-2); padding: 3px 10px; font-size: 13px; color: var(--muted); }
.evo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evo li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--panel-2); border: 1px solid var(--line); }
.evo-form { display: flex; align-items: center; gap: 12px; color: var(--text); }
.evo-form:hover { text-decoration: none; }
.evo-form:hover strong { color: var(--cyan); }
.evo-form .hex { --s: 44px; }
.evo-form > span:last-child { display: flex; flex-direction: column; }
.evo-next { text-align: right; }

/* ---------- patch notes ---------- */
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.notes-head h1 { font-size: 34px; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.notes { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.notes-index { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); padding-left: 14px; }
.notes-index a { color: var(--muted); font-size: 15px; padding: 3px 0; }
.notes-index a span { color: var(--dim); font-variant-numeric: tabular-nums; margin-right: 6px; }
.notes-index a:hover { color: var(--text); text-decoration: none; }
.notes-month { font: 600 12px var(--display); text-transform: uppercase; letter-spacing: .14em; color: var(--cyan); margin: 12px 0 4px; }
.notes-month:first-child { margin-top: 0; }
.note header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; }
.note time { font: 600 13px var(--display); color: var(--cyan); letter-spacing: .08em; }
.note h2 { font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0; flex: 1; }
.note-tools { font-size: 14px; color: var(--dim); }
.md { color: #c9d6e3; }
.md h1, .md h2, .md h3 { font-family: var(--display); color: var(--text); text-transform: none; letter-spacing: 0; margin: 1.2em 0 .5em; }
.md h2 { font-size: 19px; } .md h3 { font-size: 17px; }
.md > :first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 1em; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--cyan); }
.md img { display: block; max-width: min(100%, 470px); height: auto; margin: 6px 0 18px; border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.md table { border-collapse: collapse; margin: 0 0 1em; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md blockquote { border-left: 3px solid var(--line-2); margin: 0 0 1em; padding: 2px 14px; color: var(--muted); }
textarea { width: 100%; padding: 12px 14px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 15px/1.5 Consolas, monospace; border-radius: 0; resize: vertical; }
textarea:focus { outline: 2px solid var(--cyan); outline-offset: -1px; border-color: transparent; }

@media (max-width: 900px) {
    .notes { grid-template-columns: 1fr; }
    .hide-s { display: none; }
    .notes-index { position: static; }
    .auth { grid-template-columns: 1fr; min-height: 0; }
    .auth-art { height: 180px; }
    .auth-art::after { background: linear-gradient(0deg, var(--ink), rgba(5, 8, 13, .2)); }
    .auth-side { padding: 28px 20px 48px; }
    .grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .top-inner { height: 58px; gap: 14px; }
    .brand span { display: none; }
    .nav { display: none; }
    .top-right { gap: 12px; }
    .top-right .status, .top-right .who { display: none; }
    .hero-inner { padding-bottom: 36px; }
    .hero .tag { font-size: 16px; }
    .hero-bar { gap: 6px 20px; font-size: 14px; }
    .banner-inner { padding-top: 48px; }
    .banner h1 { font-size: 30px; }
    .banner .hex.big { --s: 72px; }
    .tamer { grid-template-columns: auto 1fr; }
    .tamer .state { grid-column: 2; }
    .inline-form { flex-direction: column; }
    .inline-form > :first-child { flex: none; }
    .panel { padding: 20px; }
}
