@font-face { font-family: 'Lato'; font-weight: 400; font-display: swap; src: url('fonts/Lato-Regular.woff2') format('woff2'); } @font-face { font-family: 'Lato'; font-weight: 700; font-display: swap; src: url('fonts/Lato-Bold.woff2') format('woff2'); } @font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/SourceSerif4-Regular.ttf.woff2') format('woff2'); } @font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: italic; font-display: swap; src: url('fonts/SourceSerif4-It.ttf.woff2') format('woff2'); } @font-face { font-family: 'Source Serif 4'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/SourceSerif4-Bold.ttf.woff2') format('woff2'); } @font-face { font-family: 'bootstrap-icons-sub'; src: url('fonts/bootstrap-icons-sub.woff2') format('woff2'); } @font-face { font-family: 'Inter-num'; src: url('fonts/Inter-num.woff2') format('woff2'); } html { font-size: clamp(1.5vh, 2.5vw, 2vh); 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; 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'; vertical-align: -0.125em; } /* 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 .name { font-family: 'Source Serif 4', serif; line-height: 1em; margin-top: 0.05em; } #titlebar .button { color: #eee; background-color: #583a90; border-radius: 0.4rem; text-align: center; height: 100%; padding: 0 0.4rem; display: flex; align-items: center; justify-content: center; } #titlebar #key-exit { display: none; color: #ccc; background-color: #282828; } #titlebar #key-exit.visible { display: flex; } #titlebar #key-exit.active { color: #eee; background-color: #583a90; } @media (hover: hover) and (pointer: fine) { #titlebar .button:hover { color: #fff; background-color: #6e49b4; } #titlebar #key-exit:hover { color: #ddd; background-color: #323232; } #titlebar #key-exit.active:hover { color: #fff; background-color: #6e49b4; } } #titlebar .button:active { color: #fff; background-color: #7b51ca; } #titlebar #key-exit:active { color: #eee; background-color: #383838; } #titlebar #key-exit.active:active { color: #fff; background-color: #7b51ca; } #titlebar .opt-input.first { margin-left: auto; } #titlebar .opt-input { height: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; } #titlebar .opt-input label { color: #ccc; background-color: #282828; border-radius: 0.4rem 0 0 0.4rem; height: 100%; padding: 0 0.4rem; display: flex; align-items: center; justify-content: center; } #titlebar .opt-input input { color: #eee; background-color: #583a90; font-family: inherit; font-size: 1em; text-align: right; width: 4ch; padding: 0 0.4rem; border: 0; border-radius: 0 0.4rem 0.4rem 0; } #titlebar .opt-input input#difficulty { width: 2ch; } @media (hover: hover) and (pointer: fine) { #titlebar .opt-input:hover label { color: #ddd; background-color: #323232; } #titlebar .opt-input input:hover { color: #fff; background-color: #6e49b4; } } #titlebar .opt-input:focus-within label { color: #eee; background-color: #383838; } #titlebar .opt-input:focus-within input { color: #fff; background-color: #7b51ca; outline: 0; } @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: #352356; } #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, #controls #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); overflow: visible; } @keyframes throw-anim { 0% { transform: scale(8); } 100% { transform: scale(1); } } #controls #keypad-dartboard #dartboard g.overlay circle:last-child { transform-box: fill-box; transform-origin: center; } #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 { color: #fff; background-color: #35481d; } } #controls .key:active { color: #fff; background-color: #3b5120; } #controls .key.active { color: #fff; background-color: #3d2466; } @media (hover: hover) and (pointer: fine) { #controls .key.active:hover { color: #fff; background-color: #4c2d80; } } #controls .key.active:active { color: #fff; background-color: #55328f; } #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; color: #fff; background-color: #680018; 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: #35481d; } #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: min-content repeat(5, min(calc(calc(100% - 2ch) / 5), 5ch)) min-content; grid-auto-rows: min-content; row-gap: 0.2em; } #visits > * { display: flex; align-items: center; justify-content: center; } #visits .visit-p1-name { grid-column: 2 / span 2; } #visits .visit-p2-name { grid-column: 5 / span 2; } #visits .visit-p1-darts { grid-column: 1; } #visits .visit-p1-pts { grid-column: 2; } #visits .visit-p1-rem { grid-column: 3; } #visits .visit-n { grid-column: 4; } #visits .visit-p2-rem { grid-column: 5; } #visits .visit-p2-pts { grid-column: 6; } #visits .visit-p2-darts { grid-column: 7; } #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.6em; } #visits .visit-p1-name, #visits .visit-p2-name { color: #555; border-bottom: 2px solid #555; } #visits .visit-n { color: #555; } #visits .visit-p1-darts, #visits .visit-p2-darts { color: #555; font-size: 0.75em; white-space: nowrap; } #visits .visit-p1-darts { justify-content: right; } #visits .visit-p1-darts:not(:empty):after { content: '\2003'; } #visits .visit-p2-darts { justify-content: left; } #visits .visit-p2-darts:not(:empty):before { content: '\2003'; } @media (max-aspect-ratio: 8/5) { #visits { grid-template-columns: min-content calc(calc(100% - 27ch) / 2) repeat(5, min(calc(calc(100% - 2ch) / 5), 5ch)) calc(calc(100% - 27ch) / 2) min-content; } #visits .visit-p1-name, #visits .visit-p2-name { display: none; } #visits .visit-p1-spacer { grid-column: 1; width: 1ch } #visits .visit-p2-spacer { grid-column: 9; width: 1ch } #visits .visit-p1-darts { grid-column: 1; } #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-p1-darts:not(:empty):after { content: '\2003…'; } #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.2em; font-family: 'Source Serif 4', serif; user-select: text; width: calc(min(44em, 100%) - 8em); max-height: calc(100% - 8em); margin: 2em auto; padding: 2em; outline: #94ca51 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: #94ca51; } .modal-content a:hover, .modal-content .modal-close:hover { color: #b9fd65; } .modal-content .modal-close { cursor: pointer; }