@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Source+Serif+Pro:ital,wght@0,400;0,700;1,400&display=swap'); @font-face { font-family: 'bootstrap-icons-sub'; src: url('fonts/bootstrap-sub.woff2') format('woff2'); } @font-face { font-family: 'inter-num'; src: url('fonts/inter-num.woff2') format('woff2'); } html { height: 100vh; } body { color-scheme: dark; color: #eee; background-color: #000; font-family: 'Lato', sans-serif; user-select: none; position: fixed; height: 100%; width: 100%; margin: 0; padding: 0; } #main { background-color: #111; font-size: clamp(1.5vh, 2.5vw, 2vh); height: 100%; margin: 0 auto; display: grid; grid-template-columns: 80vh 1fr; grid-template-rows: min-content min-content minmax(0, 3fr); grid-template-areas: 'titlebar titlebar' 'info visits' 'controls visits'; gap: 2px; } @media not all and (max-aspect-ratio: 8/5) { #main.controls-on-right { grid-template-columns: 1fr 80vh; grid-template-areas: 'titlebar titlebar' 'visits info' 'visits controls'; } } @media (max-aspect-ratio: 8/5) { #main { width: min(80vh, 100vw); grid-template-columns: 1fr; grid-template-rows: min-content min-content minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: 'titlebar' 'info' 'visits' 'controls'; } } .icon { font-family: 'bootstrap-icons-sub'; } /* titlebar */ #titlebar { grid-area: titlebar; background-color: #1a1a1a; font-size: 1.5em; padding: 0.4rem; display: flex; align-items: center; justify-content: left; gap: 0.4rem; } #titlebar div.input.first { margin-left: auto; } #titlebar div.input { background-color: #222; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; } #titlebar label { padding: 0 0.4rem; } #titlebar input { color: #eee; background-color: #3d2466; font-family: inherit; font-size: 1em; text-align: right; width: 4ch; padding: 0 0.4rem; border: 0; } #titlebar div.button { background-color: #3d2466; font-weight: 700; height: 100%; padding: 0em 0.2em; display: flex; align-items: center; } @media (hover: hover) and (pointer: fine) { #titlebar input:hover { background-color: #5c3699; } #titlebar div.button:hover { background-color: #5c3699; } } #titlebar input:focus { color: #fff; background-color: #6e41b8; outline: #7eab1e solid 2px; } #titlebar div.button:active { color: #fff; background-color: #6e41b8; } @media (max-aspect-ratio: 9/20) { #titlebar div.input { display: flex; flex-direction: column; } #titlebar label { padding: 0 0.4rem; } #titlebar .button { font-size: 2em; } } @media (max-aspect-ratio: 8/5) { #titlebar #flip-controls-button { display: none; } } /* controls */ #controls { grid-area: controls; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: minmax(5em, auto); grid-auto-rows: 1fr; gap: 2px; } #controls #prompt { grid-column: 1 / span 3; background-color: #222; display: flex; align-items: center; justify-content: center; } #controls #prompt.active { background-color: #311d52; } #controls #prompt-msg-l, #controls #prompt-input, #controls #prompt-msg-r { font-size: 1.5em; white-space: pre-line; display: grid; align-items: center; } #controls #prompt-msg-l, #prompt-msg-r { flex: 1; color: #ccc; padding: 0 0.4rem; } #controls #prompt-msg-r { text-align: right; } #controls #prompt-input { text-align: center; font-size: 3em; width: 4ch; } #controls .keypad { display: none; } #controls .keypad.visible { display: contents; } #controls #keypad-list.visible { grid-column: 1 / -1; overflow: auto; display: flex; flex-direction: column; } #controls #keypad-list .key { height: 4em; min-height: 2em; margin-top: 2px; padding-left: 0.4rem; justify-content: left; } #controls #keypad-list .key:first-child { margin-top: 0; } #controls #keypad-list:after { flex-grow: 1; content: ''; background-color: #1a1a1a; /* * inner 2px top border. gives us a gap that disappears when the last * key reaches the bottom of the container and this section is not * displayed. */ box-shadow: inset 0 4px 0 -2px #111; } #controls #keypad-dartboard #dartboard-container { grid-column: 1 / -1; background-color: #1a1a1a; min-width: 0; min-height: 0; padding: 0.4rem; display: flex; align-items: center; justify-content: center; } #controls #keypad-dartboard #dartboard { font-family: 'inter-num'; height: 100%; filter: drop-shadow(0 0 0.4rem #111); } #controls .key { color: #ccc; background-color: #282828; font-size: 1.5em; display: flex; align-items: center; justify-content: center; } @media (hover: hover) and (pointer: fine) { #controls .key:hover { background-color: #304010; } } #controls .key:active { color: #fff; background-color: #384810; } #controls .key.active { color: #eee; background-color: #3d2466; } @media (hover: hover) and (pointer: fine) { #controls .key.active:hover { background-color: #5c3699; } } #controls .key.active:active { color: #fff; background-color: #6e41b8; } #controls .key span.keyboard-val { display: contents; color: #aaa; } #controls .key.num { font-size: 2.5em; font-weight: 700; } #controls .key#key-submit { grid-row-end: span 2; } /* player info */ #info { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; } #info #oi { visibility: hidden; background-color: #640016; font-size: 3em; height: 1.2em; width: 3ch; outline: #111 solid 2px; position: absolute; left: 50%; right: 50%; top: 50%; bottom: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; } #info #oi.visible { visibility: visible; } #info #p1-info, #info #p2-info { background-color: #222; font-size: 1.5em; padding: 0.4rem; flex-direction: column; display: flex; align-items: center; } #info #p1-info.active, #info #p2-info.active { background-color: #304010; } #info #p1-info-inner, #info #p2-info-inner { display: contents; visibility: hidden; } #info #p1-info-inner.visible, #info #p2-info-inner.visible { visibility: visible; } #info #p1-rem, #info #p2-rem { font-size: 3em; font-weight: bold; } #info #p1-name, #info #p2-name { color: #ccc; } #info #p1-sugg, #info #p2-sugg { color: #aaa; font-size: 0.8em; } #info #p1-name:after, #info #p2-name:after, #info #p1-rem:after, #info #p2-rem:after, #info #p1-sugg:after, #info #p2-sugg:after { content: '\200b'; } #info #p1-avg, #info #p2-avg { font-size: 0.8em; width: 100%; } #info #p1-avg:before, #info #p2-avg:before { content: 'avg: '; } /* visits */ #visits { grid-area: visits; background-color: #111; font-size: 2em; overflow: auto; scrollbar-gutter: stable both-edges; padding: 0.4rem; display: grid; grid-template-columns: repeat(5, min(calc(calc(100% - 2ch) / 5), 5ch)) min-content; grid-auto-rows: min-content; row-gap: 0.2em; } #visits > * { min-width: 0; display: flex; align-items: center; justify-content: center; } #visits .p0 { color: #e00018; } #visits .p20 { color: #e06000; } #visits .p40 { color: #e09800; } #visits .p60 { color: #e0e018; } #visits .p100 { color: #78c018; } #visits .p140 { color: #20e018; } #visits .p180 { color: #20e018; font-weight: bold; } #visits .throws-first { color: #999; } #visits .throws-first:before { content: '\f151'; font-size: 0.75em; } #visits .visit-p1-name { grid-column: 1 / span 2; } #visits .visit-p2-name { grid-column: 4 / span 2; } #visits .visit-p1-pts { grid-column: 1; } #visits .visit-p1-rem { grid-column: 2; } #visits .visit-n { grid-column: 3; } #visits .visit-p2-rem { grid-column: 4; } #visits .visit-p2-pts { grid-column: 5; } #visits .visit-p2-darts { grid-column: 6; } #visits .visit-p1-name, #visits .visit-p2-name { color: #555; border-bottom: 2px solid #555; } #visits .visit-n { color: #555; } #visits .visit-p2-darts { color: #555; font-size: 0.75em; justify-content: left; white-space: nowrap; } #visits .visit-p2-darts:not(:empty):before { content: '\2003'; } @media (max-aspect-ratio: 8/5) { #visits { grid-template-columns: 1ch 1fr repeat(5, min(calc(calc(100% - 2ch) / 5), 5ch)) 1fr 1ch; } #visits .visit-p1-name, #visits .visit-p2-name { display: none; } #visits .visit-p1-pts { grid-column: 3; } #visits .visit-p1-rem { grid-column: 4; } #visits .visit-n { grid-column: 5; } #visits .visit-p2-rem { grid-column: 6; } #visits .visit-p2-pts { grid-column: 7; } #visits .visit-p2-darts { grid-column: 9; } #visits .visit-p2-darts:not(:empty):before { content: '…\2003'; } } /* modals */ .modal { background-color: #000a; width: 100%; height: 100%; display: none; position: fixed; top: 0; left: 0; z-index: 1; } .modal-content { background-color: #222; font-size: 1.4em; font-family: 'Source Serif Pro', serif; user-select: text; width: calc(min(44em, 100%) - 8em); max-height: calc(100% - 8em); margin: 2em auto; padding: 2em; outline: #7eab1e solid 2px; overflow: auto; } @media (max-width: 400px) { .modal-content { font-size: 1em; } } .modal-content p { margin: 0; } .modal-content p + p { margin-top: 1em; } .modal-content a, .modal-content .modal-close { color: #7eab1e; } .modal-content a:hover, .modal-content .modal-close:hover { color: #a8e428; } .modal-content .modal-close { cursor: pointer; }