@font-face { font-family: "OTCV8 Inventory"; src: url("assets/fonts/otcv8-inventory.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "OTCV8 Retro"; src: url("assets/fonts/otcv8-retro.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "OTCV8 Retro"; src: url("assets/fonts/otcv8-retro-bold.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
:root {
    color-scheme: dark;
    background-color: #101318;
    scrollbar-gutter: stable;
    --text: #dfdfdf;
    --muted: #b5b5b5;
    --line: #151c23;
    --link: #d4c5a1;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: #101318 center / cover fixed;
    background-image: url("assets/nova-castle-background-v3.png");
    color: var(--text);
    font: 14px/16px "OTCV8 Retro", Verdana, Arial, sans-serif;
}
main { width: min(100%, 720px); margin: 0 auto; padding: 18px 16px; }
header { text-align: center; margin-bottom: 14px; }
.eyebrow { color: #c8c8c8; font-size: 14px; letter-spacing: .08em; text-shadow: 1px 1px #000; }
.brand-logo { display: block; width: 100%; max-width: 540px; height: auto; margin: 4px auto; }
header p { margin: 4px 0 0; }
.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; }
strong, b { font-weight: 400; }
h2, h3 { font-size: 14px; font-weight: 400; margin: 0 0 10px; }
p { color: var(--muted); margin: 0 0 12px; overflow-wrap: anywhere; }
a { color: var(--link); text-decoration: none; }
a:hover { color: #fff2d5; text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
    outline: 1px dotted #f0ddae;
    outline-offset: 2px;
}
.account-panel {
    border: 5px solid #292929;
    border-image: url("assets/ui/window_headless.png") 5 / 5px repeat;
    background: #303944 url("assets/ui/panel-texture.png") repeat;
    padding: 12px;
    box-shadow: 2px 3px 6px #0008;
}
body:has(#register-form) .account-panel, body:has(#recover-number) .account-panel, body:has(#account-created) .account-panel { max-width: 370px; margin-inline: auto; }
.card {
    position: relative;
    min-width: 0;
    border-style: solid;
    border-width: 20px 4px 4px;
    border-color: #333;
    border-image: url("assets/ui/miniwindow.png") 20 4 4 fill / 20px 4px 4px repeat;
    padding: 10px;
    margin: 0 0 12px;
}
.card > h2:first-child {
    position: absolute;
    top: -19px;
    left: 6px;
    right: 6px;
    margin: 0;
    font-size: 14px;
    line-height: 16px;
    font-weight: normal;
    text-shadow: 1px 1px #000;
    color: #afafaf;
}
.account-panel > .card:last-child, body:has(#register-form) .account-panel > .card { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.account-characters { align-items: start; margin-bottom: 12px; }
.account-characters > .card { margin-bottom: 0; }
.account-settings > details:last-child { border-bottom: 0; }
.account-settings details form { max-width: 440px; margin: 0 0 12px; }
.account-settings details > p { padding-left: 0; }
label { display: block; margin: 9px 0 4px; font-size: 14px; }
input, select, button { font: 14px/14px "OTCV8 Retro", Verdana, Arial, sans-serif; max-width: 100%; border-radius: 0; }
input:not([type="radio"]), select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 20px;
    margin: 0;
    padding: 1px 4px;
    color: #fff;
    color-scheme: dark;
    background-color: #101318;
    scrollbar-gutter: stable;
    border: 1px solid #202932;
    border-image: url("assets/ui/textedit.png") 1 fill / 1px repeat;
    background: #29323b;
    box-shadow: none;
}
input::placeholder { color: #9aa2aa; }
input::selection { background: #ccc; color: #272727; }
/* Retro Button: transparent background and the client's exact bevel colors. */
button {
    display: block;
    width: 100%;
    min-height: 20px;
    margin: 12px 0 0;
    padding: 0 4px;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0;
    border: 1px solid;
    border-color: #65717b #151c23 #151c23 #65717b;
    background: transparent;
    color: #dfdfdf;
    font-weight: 400;
    font-synthesis: none;
    text-shadow: none;
    cursor: pointer;
}
button:hover:not(:disabled) { background: #a6bdd810; }
button:active:not(:disabled) { background: #00000025; border-color: #151c23 #65717b #65717b #151c23; }
button:disabled { color: #aaa; opacity: .8; cursor: not-allowed; }
.secondary { color: #dfdfdf; }
.danger { color: #a61f24; }
.small { width: auto; margin: 0; min-height: 20px; padding-inline: 4px; }
.name-field { display: grid; grid-template-columns: minmax(0, 1fr) 98px; align-items: stretch; gap: 6px; min-width: 0; }
.name-field input { width: 100%; min-width: 0; }
.name-field button { width: 100%; min-width: 0; margin: 0; padding-inline: 4px; white-space: nowrap; }
.radio-group { min-width: 0; margin: 10px 0 0; padding: 0; border: 0; }
.radio-group legend { margin-bottom: 4px; padding: 0; font-size: 14px; }
.radio-options { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.radio-options label { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; margin: 0; cursor: pointer; }
.radio-options input[type="radio"] { appearance: none; flex: 0 0 12px; width: 12px; height: 12px; margin: 0; padding: 0; border: 0; background: url("assets/ui/choice-off.png") center / 12px 12px no-repeat; cursor: pointer; }
.radio-options input[type="radio"]:checked { background-image: url("assets/ui/choice-on.png"); }
.divider { height: 2px; margin: 14px 0; border: 1px solid #333; border-image: url("assets/ui/separator_horizontal.png") 1 fill / 1px repeat; }
.hint { color: var(--muted); font-size: 14px; margin: 5px 0 0; }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.account-bar h2 { min-width: 0; margin: 0; font-size: 14px; font-weight: normal; }
.account-bar h2 strong { color: #f0deb2; white-space: nowrap; }
.account-bar form { flex-shrink: 0; }
.notice { color: #eadcb9; padding: 9px; margin-bottom: 12px; border: 1px solid #333; border-image: url("assets/ui/panel_flat.png") 1 fill / 1px repeat; }
dl { margin: 0; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0 0 10px; }
code { font: 15px "Courier New", monospace; overflow-wrap: anywhere; user-select: all; color: #f0deb2; }
.characters { list-style: none; margin: 0; padding: 0; }
.characters li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #444; overflow-wrap: anywhere; }
.characters li:first-child { padding-top: 0; }
.characters li:last-child { padding-bottom: 0; border: 0; }
.characters li > strong, .characters li > span { grid-column: 1; }
.characters li > strong { font-size: 14px; font-weight: normal; }
.characters span { display: block; color: #c3c3c3; font-size: 14px; }
.delete-character { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
footer { margin-top: 14px; color: #c1c1c1; text-align: center; font-size: 14px; text-shadow: 1px 1px #000; }
.confirmation-dialog {
    position: fixed;
    width: min(400px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow: visible;
    padding: 12px;
    color: var(--text);
    border-style: solid;
    border-width: 27px 6px 6px;
    border-image: url("assets/ui/window.png") 27 6 6 fill / 27px 6px 6px repeat;
    background: #303944;
    box-shadow: 3px 4px 12px #0008;
}
.confirmation-dialog > h2 { position: absolute; top: -27px; left: 6px; right: 6px; height: 16px; padding-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; font-size: 14px; font-weight: normal; line-height: 14px; margin: 0; text-shadow: 1px 1px #000; }
.confirmation-dialog p { color: #dfdfdf; }
.confirmation-dialog::backdrop { background: #0009; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dialog-actions button { width: auto; margin: 0; }
.back-link { display: inline-block; margin-bottom: 12px; font-size: 14px; }
.character-summary { display: grid; grid-template-columns: 80px 112px; align-items: start; justify-content: center; column-gap: 24px; row-gap: 12px; margin-bottom: 16px; }
.profile-identity { min-width: 0; grid-column: 1 / -1; text-align: center; }
.profile-identity h3 { margin-bottom: 12px; }
.profile-identity h3, .inventory-soul, .inventory-cap { font: inherit; color: var(--text); }
.profile-identity p { margin: 0 0 12px; }
.character-status { font-size: 14px; vertical-align: middle; }
.profile-equipment h3, .outfit-preview h3 { margin: 0 0 6px; font-size: 14px; font-weight: normal; text-align: center; color: var(--text); }
.outfit-preview { text-align: center; }
.outfit-preview canvas, .outfit-static { display: block; width: 64px; height: 64px; margin-inline: auto; object-fit: contain; image-rendering: pixelated; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid span { display: block; color: var(--muted); font-size: 14px; }
.stat-grid strong { display: block; font-size: 14px; font-weight: normal; overflow-wrap: anywhere; }
progress { display: block; width: 100%; height: 9px; accent-color: #818b72; border: 1px solid #222; border-radius: 0; background: #333; }
progress::-webkit-progress-bar { background: #333; }
progress::-webkit-progress-value { background: #818b72; box-shadow: inset 0 1px #a3ac97; }
progress::-moz-progress-bar { background: #818b72; box-shadow: inset 0 1px #a3ac97; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.skill-row { margin-bottom: 10px; }
.skill-row label { display: flex; justify-content: space-between; margin: 0 0 3px; }
.panel-footnote { padding-top: 8px; margin: 0; border-top: 1px solid #333; color: var(--muted); font-size: 14px; }
.item-sprite { display: block; width: auto; height: auto; max-width: none; flex: none; transform: none; image-rendering: pixelated; }
.inventory-slots { position: relative; width: 112px; height: 161px; margin: 0; }
.inventory-slot { position: absolute; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; overflow: hidden; background-size: 34px 34px; image-rendering: pixelated; }
.inventory-slot.occupied { background-image: url("assets/slots/item.png"); }
.slot-1 { left: 39px; top: 0; background-image: url("assets/slots/head.png"); }
.slot-2 { left: 0; top: 13px; background-image: url("assets/slots/neck.png"); }
.slot-3 { left: 78px; top: 13px; background-image: url("assets/slots/back.png"); }
.slot-4 { left: 39px; top: 37px; background-image: url("assets/slots/body.png"); }
.slot-5 { left: 78px; top: 50px; background-image: url("assets/slots/right-hand.png"); }
.slot-6 { left: 0; top: 50px; background-image: url("assets/slots/left-hand.png"); }
.slot-7 { left: 39px; top: 74px; background-image: url("assets/slots/legs.png"); }
.slot-8 { left: 39px; top: 111px; background-image: url("assets/slots/feet.png"); }
.slot-9 { left: 0; top: 87px; background-image: url("assets/slots/finger.png"); }
.slot-10 { left: 78px; top: 87px; background-image: url("assets/slots/ammo.png"); }
.inventory-soul, .inventory-cap { position: absolute; top: 125px; width: 36px; height: 36px; padding: 0; border: 2px solid #333; border-image: url("assets/slots/soulcap.png") 2 fill / 2px stretch; text-align: center; image-rendering: pixelated; }
.inventory-soul { left: -1px; }
.inventory-cap { right: -1px; }
.inventory-soul strong, .inventory-cap strong { color: inherit; font: inherit; }
@media (max-width: 640px) {
    main { padding: 12px 10px; }
    .account-panel { padding: 8px; }
    .grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .account-characters { gap: 12px; }
    body { background-attachment: scroll; }
}
@media (max-width: 450px) {
    .skills-grid { grid-template-columns: minmax(0, 1fr); }
    .dialog-actions { flex-wrap: wrap; }
}
@media (forced-colors: active) {
    .account-panel, .card, button, input, .confirmation-dialog { border-image: none; }
    .radio-options input[type="radio"] { appearance: auto; }
}


.recovery-link { margin: 9px 0 0; text-align: center; }

.radio-options label:hover { color: #fff; }

.skill-row strong { font-weight: 400; }

/* Side navigation uses the same miniwindow frames as the account cards. */
.site-main { width: min(100%, 720px); }
.site-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.site-layout > .account-panel { width: 100%; min-width: 0; }
.account-decoration { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin: 0 auto 16px; padding: 4px 2px; text-align: center; }
.account-decoration-sprite { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; flex: 0 0 64px; }
.account-decoration-sprite img { display: block; width: auto; height: auto; max-width: none; image-rendering: pixelated; }
.account-decoration p { margin: 0; }
.account-decoration .account-decoration-name { color: var(--link); margin-bottom: 4px; }
.account-decoration-caption { color: var(--text); }
.site-sidebar { min-width: 0; }
.site-main.is-guest { width: min(100%, 720px); }
.is-guest .site-layout { grid-template-columns: minmax(0, 1fr); }
.is-guest .site-layout > .account-panel:not(.community-panel) { max-width: 370px; margin-inline: auto; }
.site-navigation .navigation-group:last-child { margin-bottom: 0; }
.site-sidebar .navigation-group.style-panel { margin: 12px 0 0; }
.style-panel select { width: 100%; }
.is-guest .account-panel > .style-panel { margin-top: 12px; }
.navigation-drawer > summary { display: none; }
.navigation-group.card { padding: 6px 4px; margin: 0 0 12px; }
.site-navigation a { display: block; padding: 5px 6px; color: var(--text); line-height: 16px; }
.site-navigation a:hover { color: #fff2d5; background: #a6bdd810; text-decoration: none; }
.site-navigation a[aria-current="page"] { color: #f0ddae; background: #0003; box-shadow: inset 2px 0 #b8a57f; }
@media (min-width: 1120px) {
    .is-authenticated .site-sidebar { position: absolute; top: 0; right: calc(100% + 16px); width: 180px; }
    .navigation-drawer:not([open]) > .site-navigation { display: block; }
}
@media (max-width: 1119px) {
    .site-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .navigation-drawer > summary { display: list-item; cursor: pointer; padding: 7px 10px; color: var(--text); border: 1px solid var(--line); background: #303944 url("assets/ui/panel-texture.png") repeat; }
    .navigation-drawer[open] > summary { margin-bottom: 10px; }
    .site-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .navigation-group.card { margin: 0; }
    .site-sidebar .navigation-group.style-panel { margin-top: 6px; }
    .site-navigation a { padding: 5px 2px; overflow-wrap: anywhere; }
}
.community-panel .card { margin-bottom: 0; }
.empty-state { padding: 18px 8px; margin: 8px 0 12px; text-align: center; background: #0002; border: 1px solid var(--line); }
.server-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; margin: 12px 0 0; }
.server-facts dt, .server-facts dd { margin: 0; overflow-wrap: anywhere; }
.server-facts dt { color: var(--muted); }
.listing-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.listing-row .hint { margin: 4px 0 0; }
.public-search { display: flex; align-items: stretch; gap: 8px; }
.public-search input { flex: 1; min-width: 0; margin: 0; }
.public-search button { flex: 0 0 auto; }

.table-scroll { max-width: 100%; overflow-x: auto; margin-top: 12px; }
.community-table { width: 100%; border-collapse: collapse; text-align: left; }
.community-table th { color: var(--muted); font-weight: 400; }
.community-table th, .community-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.community-table td:first-child { overflow-wrap: anywhere; }
.public-search select { flex: 1; min-width: 0; margin: 0; }
.community-panel .hint { margin-top: 12px; }

.account-identity { min-width: 0; }
.account-status { margin: 4px 0 0; color: #fff; }
/* Match game_autoloot AutoLootButton on/off text colors. */
.account-status .is-premium { color: #00aa00; }
.account-status .is-free { color: #a61f24; }

.death-table td { vertical-align: top; }
.death-table td:first-child { width: 38%; }

.profile-section-title { margin: 14px 0 8px; }
.profile-information { width: 100%; border-collapse: collapse; text-align: left; }
.profile-information th, .profile-information td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.profile-information th { width: 32%; color: var(--muted); font-weight: 400; }
.profile-information tr:nth-child(odd) { background: #0002; }
.status-online { color: #00aa00; }
.status-offline { color: #a61f24; }

.house-filters { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.house-filters > div { flex: 1; min-width: 130px; }
.house-filters select { width: 100%; margin-bottom: 0; }
.house-filters button { flex: 0 0 auto; }

.server-guide { border-bottom: 1px solid var(--line); }
.server-guide summary { padding: 9px 0; cursor: pointer; color: var(--link); }
.server-guide p { padding: 0 4px 8px; line-height: 1.5; margin: 0; }

/* Keep ranking columns stationary when switching experience, magic and skills. */
.highscores-table { table-layout: fixed; min-width: 460px; }
.highscores-table .rank-column { width: 10%; }
.highscores-table .name-column { width: 44%; }
.highscores-table .level-column { width: 16%; }
.highscores-table .score-column { width: 30%; }
.highscores-table th, .highscores-table td { text-align: right; overflow-wrap: anywhere; }
.highscores-table th:nth-child(2), .highscores-table td:nth-child(2) { text-align: left; }

.game-rules > section { padding: 10px 0; border-bottom: 1px solid #151c2380; }
.game-rules h3 { color: var(--link); margin: 0 0 7px; }
.game-rules ol { list-style: none; padding: 0; margin: 0; }
.game-rules li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; margin: 0 0 7px; line-height: 18px; color: #ccc; }
.game-rules .rule-letter { color: var(--muted); text-align: left; }
.game-rules li:last-child { margin-bottom: 0; }

.guild-dashboard-list { padding-left: 18px; margin: 8px 0 14px; }
.guild-dashboard-list li { margin-bottom: 6px; }
.guild-action-form { padding: 6px 0 12px; }
.guild-invite-actions .guild-action-form { display: inline-block; padding: 0; margin: 2px 4px 2px 0; }
.guild-invite-actions button { margin: 0; }

/* Service offers use plain shop tiles inside the shared page frame. */
.services-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-product { display: flex; flex-direction: column; min-width: 0; padding: 12px; border: 1px solid var(--line); background: #00000018; }
.service-product-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.service-product-heading > div:last-child { min-width: 0; }
.service-product-heading h3 { margin: 0 0 6px; color: var(--text); }
.service-product .service-price { margin: 0; color: var(--link); }
.service-product > p { margin-bottom: 12px; }
.service-product form { margin-top: auto; }
.service-product-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; }
.service-product-icon img { display: block; width: 64px; height: 64px; max-width: none; image-rendering: pixelated; }
.service-keyring { position: relative; width: 64px; height: 64px; }
.service-keyring img { position: absolute; top: 0; left: 0; }
.service-keyring img:nth-child(2) { top: 0; left: 8px; }
.service-keyring img:nth-child(3) { top: 0; left: 16px; }
.service-balance { margin-bottom: 10px; color: var(--text); }
.service-balance strong { color: var(--link); }
@media (max-width: 640px) {
    .services-products { grid-template-columns: minmax(0, 1fr); }
}

/* Featured browser-play entrance, using the same client font as other buttons. */
.play-now-form { margin: 0 0 18px; }
.play-now-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 84px;
    font-size: 14px;
    line-height: 18px;
    margin: 0;
    padding: 10px 16px;
}
.play-now-button img { flex: 0 0 32px; width: 32px; height: 32px; object-fit: contain; image-rendering: auto; }
.play-now-button span { font: inherit; }
.site-sidebar .play-now-form { margin-bottom: 12px; }
.site-sidebar .play-now-button { min-height: 64px; gap: 10px; padding: 8px; }
.site-sidebar .play-now-button img { flex-basis: 32px; width: 32px; height: 32px; }

.play-now-form [data-client-popup-note] { margin: 8px 0 0; }
