html {
    background: #008080;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #008080;
    color: #000;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
}

html,
body,
body * {
    cursor: url("/assets/cursors/cherries.png") 16 3, auto !important;
}

.ns-desktop {
    min-height: 100vh;
    padding: 28px 12px 36px;
}

.ns-window {
    max-width: 920px;
    margin: 0 auto;
    background: #c0c0c0;
    border: 2px solid #dfdfdf;
    border-right-color: #404040;
    border-bottom-color: #404040;
    box-shadow: 1px 1px 0 #000;
}

.ns-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #000080;
    color: #fff;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    font-weight: bold;
    padding: 3px 4px 3px 6px;
}

.ns-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ns-title img {
    image-rendering: pixelated;
    flex: 0 0 auto;
}

.ns-traffic {
    display: flex;
    gap: 2px;
    font-weight: normal;
}

.ns-traffic span {
    display: inline-block;
    width: 16px;
    height: 14px;
    line-height: 12px;
    text-align: center;
    background: #c0c0c0;
    color: #000;
    border: 1px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    font-size: 11px;
}

.ns-min > span {
    position: relative;
    top: -3px;
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    line-height: 12px;
}

.ns-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px 4px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
}

.ns-menu a {
    color: #000;
    text-decoration: none;
    padding: 2px 12px;
}

.ns-menu a:hover,
.ns-menu a.active,
.ns-menu a:focus-visible {
    background: #000080;
    color: #fff;
}

.ns-menu-fill {
    flex: 1;
}

.ns-who {
    padding-right: 8px;
    color: #000080;
}

.ns-location {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 12px;
}

.ns-location-field {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 2px solid #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
    padding: 1px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ns-page {
    background: #fff;
    margin: 4px 8px 8px;
    border: 2px solid #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
    padding: 14px 14px 18px;
    min-height: 420px;
}

.ns-page h1 {
    font-family: "Times New Roman", Times, serif;
    font-size: 34px;
    font-weight: bold;
    margin: 0 0 4px;
    line-height: 1.1;
}

.logo-lockup {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.logo-lockup img {
    display: block;
    width: 180px;
    max-width: 58%;
    height: auto;
    margin: 0;
}

.logo-lockup .new {
    vertical-align: baseline;
}

.ns-page h2 {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 16px;
    margin: 16px 0 8px;
}

.ns-page a {
    color: #0000ee;
}

.ns-page a:visited {
    color: #551a8b;
}

.tagline {
    margin: 0 0 8px;
    font-size: 18px;
}

.fine,
.file-note {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 12px;
    color: #222;
}

.file-note code {
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
}

.signoff {
    margin: 18px 0 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(11px, 3.4vw, 14px);
    text-align: center;
    white-space: nowrap;
    color: #000;
}

.new {
    color: #ff0000;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    font-weight: bold;
    vertical-align: super;
}

.blink {
    animation: blink 1.1s step-start infinite;
}

@keyframes blink {
    50% { visibility: hidden; }
}

.ticker {
    overflow: hidden;
    background: #000080;
    color: #ffff00;
    margin: 8px 0 12px;
}

.ticker p {
    display: inline-block;
    margin: 0;
    padding: 3px 8px;
    white-space: nowrap;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    animation: ticker 22s linear infinite;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.tally {
    font-family: Tahoma, Verdana, sans-serif;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    display: inline-block;
    padding: 4px 8px;
    margin: 0 0 8px;
}

.banner {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    background: #ffffe1;
    border: 2px solid #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
    padding: 8px 10px;
    margin: 0 0 12px;
}

.banner.error { background: #ffd0d0; }
.banner.ok { background: #d8ffd0; }

.game-card {
    display: block;
    background: #fff;
    border: 2px solid #808080;
    margin: 0 0 14px;
    padding: 0;
}

.game-title {
    background: #1a1a1a;
    color: #fff;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 12px;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #6b6b6b;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
    padding: 10px 12px 0;
}

.game-net {
    text-align: right;
}

.game-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 12px;
}

.pick-btn {
    appearance: none;
    width: 100%;
    background: #fff;
    color: #000;
    border: 3px solid transparent;
    padding: 8px 6px 6px;
    text-align: center;
}

.pick-btn:hover:not(:disabled) {
    border-color: #000080;
}

.pick-btn:focus-visible {
    outline: 2px dotted #000;
    outline-offset: 2px;
}

.pick-btn.is-picked {
    background: #ffff99;
    border-color: #000080;
    box-shadow: inset 0 0 0 2px #000080;
}

.pick-btn:disabled {
    background: #f3f3f3;
    color: #555;
}

.game-card[data-locked="1"] {
    opacity: 0.72;
}

.pick-frame {
    width: min(200px, 100%);
    height: 246px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pick-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
}

.pick-ph {
    width: 176px;
    height: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #dedede, #dedede 3px, #efefef 3px, #efefef 6px);
    border: 1px dashed #777;
}

.pick-letter {
    font-family: "Times New Roman", Times, serif;
    font-size: 32px;
    line-height: 1;
}

.pick-file {
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    color: #444;
    margin-top: 4px;
    line-height: 1.15;
    padding: 0 4px;
}

.team-name {
    font-family: Verdana, Geneva, sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #222;
}

.team-record {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    color: #555;
    margin-top: 2px;
}

.pick-stamp {
    display: none;
    margin-top: 4px;
    color: #000080;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.is-picked .pick-stamp {
    display: block;
}

.pick-vs {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 16px;
    color: #222;
    padding: 0 12px;
    white-space: nowrap;
}

.catalog-item {
    height: 100%;
    background: #fff;
    border: 2px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    box-shadow: inset 1px 1px 0 #808080;
    padding: 12px;
    text-align: center;
}

.catalog-item img {
    display: block;
    margin: 0 auto 8px;
    background: #efefef;
    border: 1px solid #808080;
}

.catalog-item h2 {
    margin: 0 0 4px;
}

.price {
    font-family: Tahoma, Verdana, sans-serif;
    font-weight: bold;
    margin: 0 0 6px;
}

.cart-add,
.stack-form label {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
}

.stack-form {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.stack-form label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    border: 2px solid #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
    background: #fff;
    padding: 3px 5px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    border-radius: 0;
    color: #000;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
    width: 100%;
}

button,
.btn-win {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 13px;
    background: #c0c0c0;
    color: #000;
    border: 2px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    border-radius: 0;
    padding: 3px 14px;
    box-shadow: none;
}

.btn-win:active,
button:active {
    border-color: #404040;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

.pick-btn {
    font-family: Verdana, Geneva, sans-serif;
}

.sheet {
    width: 100%;
    border-collapse: collapse;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 14px;
    margin: 8px 0 16px;
}

.sheet th,
.sheet td {
    border: 1px solid #808080;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
}

.sheet th {
    background: #000080;
    color: #fff;
    font-weight: normal;
}

.pick-list {
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 14px;
}

.ns-status {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 4px 4px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 12px;
}

.ns-status span {
    border: 1px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
    padding: 1px 6px;
    background: #c0c0c0;
}

.hit-counter {
    font-family: "Courier New", Courier, monospace;
    background: #000 !important;
    color: #39ff14;
    letter-spacing: 1px;
    border-color: #404040 !important;
}

hr {
    border: 0;
    height: 2px;
    margin: 8px 0 12px;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #fff;
}

@media (max-width: 640px) {
    .ns-desktop { padding: 8px; }
    .game-body { grid-template-columns: 1fr; }
    .pick-vs { padding: 2px 0; }
    .game-meta { flex-direction: column; gap: 2px; }
    .game-net { text-align: left; }
    .ns-status { flex-wrap: wrap; }
    .ns-page h1 { font-size: 28px; }
    .ticker { overflow: hidden; }
    .ticker p {
        display: block;
        white-space: normal;
        animation: none;
    }
}

.dialup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #008080;
}

html.skip-dial .dialup {
    display: none;
}

.dialup-window {
    width: min(360px, 100%);
    background: #c0c0c0;
    border: 2px solid #dfdfdf;
    border-right-color: #404040;
    border-bottom-color: #404040;
    box-shadow: 1px 1px 0 #000;
    font-family: Tahoma, Verdana, sans-serif;
    color: #000;
}

.dialup-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000080;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 3px 4px 3px 6px;
}

.dialup-x {
    width: 16px;
    height: 14px;
    line-height: 12px;
    text-align: center;
    background: #c0c0c0;
    color: #000;
    border: 1px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    font-weight: normal;
    font-size: 11px;
}

.dialup-body {
    padding: 16px 14px 12px;
}

.dialup-body p {
    margin: 0 0 10px;
    font-size: 14px;
}

.dialup-fine {
    margin-bottom: 0 !important;
    font-size: 11px !important;
    color: #222;
}

.dialup-meter {
    height: 18px;
    margin: 0 0 10px;
    background: #fff;
    border: 2px solid #808080;
    border-right-color: #fff;
    border-bottom-color: #fff;
}

.dialup-meter span {
    display: block;
    height: 100%;
    width: 0;
    background: #000080;
    animation: dialup-fill 3s linear forwards;
}

@keyframes dialup-fill {
    to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .blink { animation: none; }
    .ticker p {
        animation: none;
        padding-left: 8px;
    }
    .dialup { display: none !important; }
}
