4K-Upscaler / style.css
MegaPotatoAI's picture
Initial release
231317f verified
Raw History Blame Contribute Delete
15.8 kB
@font-face {
font-family: "Ubuntu Sans derivative MegaPotato";
font-weight: 100 800;
font-stretch: 75% 100%;
font-display: swap;
src: url(assets/fonts/ubuntu-sans-derivative-megapotato.woff2) format("woff2");
}
/* A dark studio: warm charcoal, off-white type, one amber for the chosen spot and the action.
Big condensed figures where the numbers matter; the two 100% panels are the argument. */
:root {
--bg: #171614;
--panel: #1e1d1a;
--ink: #f2eee6;
--ink-2: #a39e95;
--ink-3: #6b675f;
--ink-hint: #918c83; /* small text: >= 4.5:1 on bg, panel, well and hover */
--line: #2c2a26;
--line-strong: #46433d;
--well: #0e0d0c;
--hover: #262420;
--accent: #f0b232;
--accent-ink: #171614;
--error: #ff9a85;
--warn: #f0b232;
--ui: "Ubuntu Sans derivative MegaPotato", "Segoe UI", Roboto, system-ui, sans-serif;
color-scheme: dark;
}
* {
box-sizing: border-box;
}
[hidden] {
display: none !important;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font: 400 15px/1.45 var(--ui);
font-feature-settings: "kern";
}
button,
input {
font: inherit;
color: inherit;
}
figure,
fieldset,
p,
h1,
h2,
ul {
margin: 0;
}
fieldset {
padding: 0;
border: 0;
min-width: 0;
}
ul {
padding: 0;
list-style: none;
}
a {
color: inherit;
text-decoration-thickness: 1px;
text-underline-offset: 3px;
text-decoration-color: var(--line-strong);
}
a:hover {
text-decoration-color: currentColor;
}
button {
min-height: 44px;
padding: 0 16px;
border: 1px solid var(--line-strong);
border-radius: 4px;
background: transparent;
cursor: pointer;
transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
button:hover:not(:disabled) {
background: var(--hover);
border-color: var(--ink-2);
}
:where(button, a, summary):focus-visible,
.pick-button:focus-within,
.target:has(input:focus-visible),
.example:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
.primary {
border-color: var(--accent);
background: var(--accent);
color: var(--accent-ink);
font-weight: 700;
}
.primary:hover:not(:disabled) {
background: #f7c14f;
border-color: #f7c14f;
}
.primary:disabled {
background: var(--line);
color: var(--ink-3);
border-color: var(--line);
cursor: default;
}
.numeric {
font-variant-numeric: lining-nums tabular-nums;
}
.icon {
width: 14px;
height: 14px;
vertical-align: -1px;
}
/* ------------------------------------------------------------------ page */
.page {
max-width: 1360px;
margin: 0 auto;
padding: 34px 40px 28px;
}
/* ------------------------------------------------------------------ masthead */
.masthead {
display: grid;
grid-template-columns: 300px minmax(0, 1fr) auto;
grid-template-areas:
"title lead site"
"title brand site";
gap: 6px 32px;
align-items: start;
margin-bottom: 28px;
}
.masthead-row {
display: contents;
}
h1 {
grid-area: title;
}
.site {
grid-area: site;
}
.lead {
grid-area: lead;
}
.brand {
grid-area: brand;
}
h1 {
font-size: 46px;
line-height: 1;
font-weight: 700;
letter-spacing: -0.025em;
}
.site {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 15px;
text-decoration: none;
white-space: nowrap;
}
.site .icon {
transition: transform 0.2s;
}
.site:hover .icon {
transform: translate(2px, -2px);
}
.lead {
max-width: 800px;
font-size: 19px;
line-height: 1.35;
letter-spacing: -0.01em;
}
.brand {
font-size: 14px;
color: var(--ink-2);
}
.notice {
margin-bottom: 16px;
padding: 10px 0;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
font-size: 14px;
}
/* ------------------------------------------------------------------ studio grid */
.studio {
display: grid;
grid-template-columns: 300px minmax(0, 1fr) 300px;
grid-template-areas:
"controls overview examples"
"compare compare compare";
gap: 28px 32px;
padding-top: 24px;
border-top: 1px solid var(--line-strong);
}
.controls {
grid-area: controls;
}
.overview-block {
grid-area: overview;
min-width: 0;
}
.examples-block {
grid-area: examples;
min-width: 0;
}
.comparison {
grid-area: compare;
min-width: 0;
}
/* ------------------------------------------------------------------ controls */
.controls {
display: grid;
gap: 18px;
align-content: start;
}
.pick {
display: grid;
gap: 10px;
}
.pick-button {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 46px;
padding: 0 16px;
border: 1px solid var(--ink);
border-radius: 4px;
font-weight: 700;
cursor: pointer;
transition: background-color 0.15s;
}
.pick-button:hover {
background: var(--hover);
}
.pick-button input {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
.pick-meta {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
color: var(--ink-2);
font-size: 13px;
line-height: 1.35;
}
.pick-thumb {
width: 40px;
height: 40px;
object-fit: cover;
border-radius: 2px;
flex: none;
}
.pick-text {
min-width: 0;
overflow-wrap: anywhere;
}
.pick-text strong {
color: var(--ink);
font-weight: 400;
}
.targets {
display: grid;
grid-template-columns: repeat(3, 1fr);
border: 1px solid var(--line-strong);
border-radius: 4px;
overflow: hidden;
}
.target {
position: relative;
display: grid;
gap: 2px;
min-height: 64px;
padding: 10px 12px 9px;
cursor: pointer;
transition: background-color 0.15s, color 0.15s;
}
.target + .target {
border-left: 1px solid var(--line-strong);
}
.target:hover {
background: var(--hover);
}
.target input {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
.target b {
font-size: 26px;
line-height: 1;
font-weight: 700;
font-stretch: 85%;
letter-spacing: -0.01em;
}
.target small {
font-size: 12px;
color: var(--ink-2);
font-variant-numeric: tabular-nums;
}
.target.unreachable {
cursor: not-allowed;
opacity: 0.4;
}
.target.unreachable:hover {
background: transparent;
}
.targets-hint {
margin: 6px 0 0;
font-size: 12px;
line-height: 1.4;
color: var(--ink-2);
}
.target:has(input:checked) {
background: var(--ink);
color: var(--bg);
}
.target:has(input:checked) small {
color: var(--bg);
opacity: 0.7;
}
.output {
display: grid;
gap: 4px;
padding: 14px 0 12px;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
}
.output-label {
font-size: 13px;
color: var(--ink-2);
}
.output-size {
font-size: 40px;
line-height: 1;
font-weight: 700;
font-stretch: 80%;
letter-spacing: -0.01em;
font-variant-numeric: lining-nums tabular-nums;
}
.output-detail {
font-size: 13px;
color: var(--ink-2);
font-variant-numeric: tabular-nums;
}
.output-detail .icon {
width: 12px;
height: 12px;
margin: 0 2px;
}
.output-note {
font-size: 13px;
color: var(--warn);
}
.output-note:empty {
display: none;
}
.plan-error {
color: var(--error);
}
.run {
min-height: 48px;
font-size: 16px;
}
.quota {
font-size: 13px;
line-height: 1.35;
color: var(--ink-2);
}
.status {
display: grid;
gap: 10px;
padding-top: 14px;
border-top: 1px solid var(--line);
font-size: 15px;
}
.status[data-state="error"] .status-text strong {
color: var(--error);
}
.status-text strong {
font-weight: 700;
}
.status-text .meta {
color: var(--ink-2);
font-size: 14px;
}
.status .actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.status .actions a {
display: inline-flex;
align-items: center;
min-height: 40px;
padding: 0 14px;
border: 1px solid var(--ink);
border-radius: 4px;
text-decoration: none;
font-weight: 700;
}
.status .actions button {
min-height: 40px;
}
.spinner {
display: inline-block;
width: 13px;
height: 13px;
margin-right: 8px;
vertical-align: -1px;
border: 2px solid var(--line-strong);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.turnstile:empty {
display: none;
}
/* ------------------------------------------------------------------ overview with the locator */
.overview-block {
display: grid;
gap: 10px;
align-content: start;
}
.caption {
font-size: 15px;
min-height: 21px;
}
.caption strong {
font-weight: 700;
}
.caption .meta {
margin-left: 8px;
color: var(--ink-2);
font-variant-numeric: tabular-nums;
}
.caption .icon {
width: 12px;
height: 12px;
margin: 0 2px;
}
.overview {
position: relative;
width: min(100%, calc(400px * var(--ar, 1.5)));
aspect-ratio: var(--ar, 1.5);
overflow: hidden;
background: var(--well);
touch-action: pan-y;
cursor: crosshair;
}
.overview-image {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
pointer-events: none;
}
.locator {
position: absolute;
box-sizing: border-box;
border: 2px solid var(--accent);
box-shadow: 0 0 0 9999px rgba(14, 13, 12, 0.32);
pointer-events: none;
}
.locator-handle {
position: absolute;
min-height: 0;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
cursor: move;
touch-action: none;
}
/* the handle is only a hit area: no hover/active fill over the photo (the generic button:hover rule is more specific) */
.locator-handle,
.locator-handle:hover:not(:disabled),
.locator-handle:active {
background: transparent;
border: 0;
}
.overview-help {
font-size: 13px;
color: var(--ink-hint);
}
.note-touch {
display: none;
}
/* ------------------------------------------------------------------ examples list */
.examples-block {
display: grid;
gap: 10px;
align-content: start;
}
.examples-head {
font-size: 15px;
min-height: 21px;
color: var(--ink-2);
}
.examples {
display: grid;
gap: 4px;
}
.example {
display: grid;
grid-template-columns: 72px 1fr;
align-items: center;
gap: 12px;
width: 100%;
min-height: 0;
padding: 4px;
border: 1px solid transparent;
border-radius: 4px;
text-align: left;
color: var(--ink-2);
}
.example:hover:not(:disabled) {
border-color: transparent;
background: var(--hover);
color: var(--ink);
}
.example img {
display: block;
width: 72px;
height: 48px;
object-fit: cover;
border-radius: 2px;
}
.example-text {
display: grid;
gap: 1px;
min-width: 0;
font-size: 14px;
line-height: 1.3;
}
.example-text small {
font-size: 12px;
color: var(--ink-hint);
}
.example[aria-pressed="true"] {
border-color: var(--accent);
color: var(--ink);
}
/* ------------------------------------------------------------------ the two 100% panels */
.detail-pair {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.detail-pair figure {
min-width: 0;
display: grid;
gap: 8px;
}
.detail-pair figcaption {
font-size: 14px;
color: var(--ink-2);
}
.detail-pair figcaption.is-result {
color: var(--ink);
font-weight: 700;
}
.detail-pair figcaption.is-result::before {
content: "";
display: inline-block;
width: 9px;
height: 9px;
margin-right: 8px;
background: var(--accent);
vertical-align: 0;
}
.detail {
position: relative;
height: clamp(300px, 34vw, 520px);
overflow: hidden;
background: var(--well);
}
.detail img {
display: none !important;
}
.detail-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.detail-pair.is-loading .detail-canvas {
visibility: hidden;
}
.detail-pair.is-loading .detail img {
visibility: hidden;
}
.detail img {
position: absolute;
left: 0;
top: 0;
max-width: none;
max-height: none;
pointer-events: none;
image-rendering: auto;
}
.detail-empty {
position: absolute;
inset: 0;
display: grid;
place-items: center;
padding: 24px;
text-align: center;
color: var(--ink-2);
font-size: 14px;
}
.detail-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 8px 16px;
margin-top: 12px;
}
.detail-note {
font-size: 14px;
color: var(--ink-2);
}
.detail-actions {
display: flex;
gap: 8px;
}
.detail-actions button {
min-height: 36px;
padding: 0 12px;
font-size: 14px;
color: var(--ink-2);
}
.detail-actions button:hover:not(:disabled) {
color: var(--ink);
}
.detail-actions [aria-pressed="true"] {
color: var(--ink);
border-color: var(--ink-2);
}
/* ------------------------------------------------------------------ colophon */
.colophon {
margin-top: 40px;
padding-top: 14px;
border-top: 1px solid var(--line);
font-size: 14px;
color: var(--ink-2);
}
.colophon-links {
display: flex;
flex-wrap: wrap;
gap: 8px 24px;
min-height: 32px;
align-items: center;
}
.about summary {
cursor: pointer;
padding: 8px 0;
list-style: none;
}
.about summary::-webkit-details-marker {
display: none;
}
.about summary::before {
content: "+";
display: inline-block;
width: 16px;
font-weight: 700;
}
.about[open] summary::before {
content: "–";
}
.about-body {
max-width: 76ch;
display: grid;
gap: 10px;
padding: 4px 0 16px 16px;
}
.about-body h2 {
margin-top: 8px;
font-size: 14px;
font-weight: 700;
color: var(--ink);
}
.credits {
display: grid;
gap: 4px;
}
/* ------------------------------------------------------------------ drop anywhere */
.dropzone {
position: fixed;
inset: 12px;
display: none;
place-items: center;
border: 2px dashed var(--accent);
background: rgba(23, 22, 20, 0.82);
font-size: 22px;
font-weight: 700;
z-index: 10;
pointer-events: none;
}
body[data-dragover="true"] .dropzone {
display: grid;
}
/* ------------------------------------------------------------------ input modes */
@media (hover: none) {
.note-mouse {
display: none;
}
.note-touch {
display: inline;
}
#follow {
display: none;
}
.overview {
cursor: default;
}
}
@media (prefers-reduced-motion: reduce) {
* {
transition: none !important;
animation-duration: 0.01ms !important;
}
}
/* ------------------------------------------------------------------ narrower desktops */
@media (max-width: 1180px) {
.masthead {
grid-template-columns: 280px minmax(0, 1fr) auto;
}
.studio {
grid-template-columns: 280px minmax(0, 1fr);
grid-template-areas:
"controls overview"
"controls examples"
"compare compare";
}
.examples {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.example {
grid-template-columns: 56px 1fr;
gap: 8px;
}
.example img {
width: 56px;
height: 38px;
}
}
/* ------------------------------------------------------------------ phones */
@media (max-width: 760px) {
.page {
padding: 22px 16px 24px;
}
.masthead {
grid-template-columns: 1fr;
grid-template-areas:
"title"
"site"
"lead"
"brand";
gap: 8px;
margin-bottom: 20px;
}
h1 {
font-size: 36px;
}
.lead {
font-size: 17px;
}
.studio {
grid-template-columns: 1fr;
grid-template-areas:
"controls"
"examples"
"overview"
"compare";
gap: 24px;
padding-top: 20px;
}
.examples {
display: flex;
gap: 8px;
margin: 0 -16px;
padding: 0 16px 4px;
overflow-x: auto;
scrollbar-width: none;
}
.examples li {
flex: none;
}
.example {
grid-template-columns: 1fr;
width: 132px;
gap: 6px;
padding: 3px;
}
.example img {
width: 100%;
height: 82px;
}
.example-text {
font-size: 13px;
}
.overview {
width: 100%;
}
.detail-pair {
grid-template-columns: 1fr;
gap: 14px;
}
.detail {
height: 250px;
}
.output-size {
font-size: 36px;
}
}