Files
2026-10-07 10:56:35 +02:00

378 lines
8.8 KiB
CSS

:root {
color-scheme: light;
--ink: #182b3d;
--muted: #4a6071;
--paper: #eef6f8;
--panel: #f3f8f9;
--line: #547389;
--accent: #265d82;
}
* { box-sizing: border-box; }
html, body {
width: 100%;
min-height: 100%;
margin: 0;
}
body {
overflow: hidden;
background: #b9d9ed;
color: var(--ink);
font-family: "Courier New", monospace;
}
body.dark-mode {
color-scheme: dark;
--ink: #edf3f5;
--muted: #bdced7;
--paper: #1d2e3d;
--panel: #243747;
--line: #8ba8b9;
--accent: #a9d9ef;
background: #111d2a;
}
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, canvas:focus-visible {
outline: 3px solid #d48439;
outline-offset: 3px;
}
.hidden { display: none; }
.no-script {
position: fixed;
inset: 0;
z-index: 100;
display: grid;
place-content: center;
gap: 12px;
padding: 24px;
background: #e6f3fa;
color: #182b3d;
text-align: center;
}
.no-script a { color: #265d82; }
#welcome-screen {
position: fixed;
inset: 0;
z-index: 10;
display: grid;
place-items: center;
overflow-y: auto;
padding: 70px 22px 32px;
background:
radial-gradient(circle at 20% 18%, rgba(255,255,255,.56) 0 2px, transparent 3px),
radial-gradient(circle at 76% 32%, rgba(255,255,255,.55) 0 2px, transparent 3px),
linear-gradient(#91bfdc, #d9edf7 78%, #f5fafb);
transition: opacity .7s ease;
}
body.dark-mode #welcome-screen {
background:
radial-gradient(circle at 20% 18%, rgba(255,255,255,.48) 0 2px, transparent 3px),
radial-gradient(circle at 76% 32%, rgba(255,255,255,.42) 0 2px, transparent 3px),
linear-gradient(#152738, #304b60 78%, #627d8c);
}
#welcome-screen.hidden {
display: grid;
opacity: 0;
pointer-events: none;
}
#welcome-content {
transition: opacity .5s ease, transform .7s ease;
}
#welcome-screen.hidden #welcome-content {
opacity: 0;
transform: translateY(-14px);
}
#welcome-content {
width: min(620px, 100%);
text-align: center;
}
.welcome-penguin {
display: block;
width: clamp(96px, 15vw, 142px);
height: clamp(96px, 15vw, 142px);
margin: 0 auto 18px;
object-fit: contain;
image-rendering: pixelated;
}
.eyebrow {
margin: 0 0 12px;
font-size: .9rem;
font-weight: bold;
letter-spacing: .28em;
text-transform: uppercase;
}
#welcome-text {
margin: 0;
font-size: clamp(2.25rem, 6vw, 4.4rem);
font-weight: bold;
line-height: 1.08;
letter-spacing: -.055em;
}
.welcome-intro {
margin: 21px 0 28px;
color: var(--muted);
font-size: clamp(.94rem, 1.5vw, 1.08rem);
line-height: 1.6;
}
#enter-button {
min-width: 172px;
min-height: 54px;
padding: 9px 22px;
border: 3px solid #162b3c;
border-radius: 2px;
background: #244d69;
box-shadow: 5px 5px 0 #162b3c;
color: #fff;
font-size: 1.08rem;
font-weight: bold;
transition: transform .12s ease, box-shadow .12s ease;
}
#enter-button:hover {
transform: translate(2px, 2px);
box-shadow: 3px 3px 0 #162b3c;
}
#enter-button span { margin-left: 15px; }
.control-guide {
max-width: 520px;
margin: 34px auto 0;
padding-top: 16px;
border-top: 1px solid rgba(24,43,61,.4);
color: var(--muted);
font-size: .78rem;
line-height: 1.8;
}
.dark-mode-toggle {
position: fixed;
top: 14px;
right: 14px;
z-index: 40;
display: grid;
place-items: center;
width: 42px;
height: 42px;
padding: 0;
border: 2px solid var(--line);
border-radius: 2px;
background: var(--paper);
color: var(--ink);
}
.dark-mode-toggle:hover { background: var(--panel); }
.theme-icon { font-size: 1.4rem; line-height: 1; }
.theme-label {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
body.menu-open .dark-mode-toggle {
opacity: 0;
pointer-events: none;
}
#sound-toggle {
position: fixed;
bottom: 14px;
left: 14px;
z-index: 20;
display: none;
place-items: center;
width: 42px;
height: 42px;
padding: 0;
border: 2px solid var(--line);
border-radius: 2px;
background: var(--paper);
color: var(--ink);
font-size: 1.45rem;
}
body.game-started #sound-toggle { display: grid; }
#sound-toggle[hidden], body.menu-open #sound-toggle { display: none; }
#sound-toggle:hover { background: var(--panel); }
#sound-toggle[aria-pressed="false"]::after {
content: "";
position: absolute;
width: 29px;
height: 2px;
background: currentColor;
transform: rotate(-45deg);
}
#game-container {
position: relative;
display: none;
width: 100%;
height: 100vh;
height: 100dvh;
overflow: hidden;
background: #b4d8ed;
opacity: 0;
transition: opacity .75s ease;
}
#game-container.visible { opacity: 1; }
#game-canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
}
#block-info {
position: absolute;
z-index: 5;
width: min(300px, calc(100vw - 30px));
padding: 16px;
border: 2px solid var(--line);
border-radius: 2px;
background: var(--panel);
color: var(--ink);
}
#block-info h1 { margin: 0 0 8px; font-size: 1.1rem; }
#block-info p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
body.menu-open #block-info { display: none; }
#projects { display: none; }
#snow-container {
position: fixed;
inset: 0;
z-index: 2;
overflow: hidden;
pointer-events: none;
}
body.menu-open #snow-container { display: none; }
.snowflake {
position: absolute;
top: -12px;
width: 6px;
height: 6px;
background: #fff;
opacity: .8;
animation: fall linear infinite;
}
.paused .snowflake { animation-play-state: paused; }
@keyframes fall { to { transform: translateY(110vh); } }
#npc-dialog {
position: fixed;
top: clamp(20px, 8vh, 80px);
left: 50%;
z-index: 30;
width: min(540px, calc(100vw - 30px));
max-height: calc(100dvh - 40px);
overflow-y: auto;
padding: 20px;
border: 3px solid var(--line);
border-radius: 2px;
background: var(--panel);
color: var(--ink);
transform: translateX(-50%);
}
.dialog-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
font-size: 1.05rem;
font-weight: bold;
}
#npc-dialog-close {
width: 34px;
height: 34px;
border: 2px solid var(--line);
border-radius: 2px;
background: var(--paper);
color: var(--ink);
font-size: 1.3rem;
}
#npc-dialog-text {
margin: 18px 0 20px;
color: var(--muted);
font-size: .86rem;
line-height: 1.6;
}
#npc-dialog-content > button:not(#npc-dialog-close) {
display: block;
width: 100%;
min-height: 42px;
margin-top: 8px;
padding: 9px 12px;
border: 2px solid var(--line);
border-radius: 2px;
background: var(--paper);
color: var(--ink);
font-size: .82rem;
font-weight: bold;
text-align: left;
}
#npc-dialog-content > button:not(#npc-dialog-close):hover { background: var(--panel); }
.dialog-hint { margin: 17px 0 0; color: var(--muted); font-size: .72rem; }
#mobile-controls { display: none; }
@media (max-width: 767px) {
#welcome-screen { padding: 70px 20px 26px; }
#welcome-text { font-size: clamp(2.15rem, 11vw, 3.4rem); }
.control-guide { margin-top: 27px; font-size: .72rem; }
#sound-toggle { top: 14px; right: 64px; bottom: auto; left: auto; }
body.game-started #mobile-controls {
position: fixed;
right: 12px;
bottom: max(12px, env(safe-area-inset-bottom));
left: 12px;
z-index: 6;
display: flex;
align-items: end;
gap: 7px;
pointer-events: none;
}
#mobile-controls button {
display: grid;
place-items: center;
min-width: 52px;
height: 52px;
padding: 0 10px;
border: 2px solid #a4c1d2;
border-radius: 2px;
background: #18374d;
color: #fff;
font-size: 1.25rem;
font-weight: bold;
pointer-events: auto;
touch-action: none;
}
#mobile-controls button:active { background: #326789; }
#mobile-controls .hidden, body.menu-open #mobile-controls { display: none; }
#interact-button { margin-left: auto; font-size: .84rem !important; }
#interact-character-button {
position: absolute;
right: 0;
bottom: 61px;
background: #265d82 !important;
font-size: .84rem !important;
}
#npc-dialog { padding: 16px; }
}
@media (max-width: 390px) {
#mobile-controls button { min-width: 45px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: .01ms !important;
transition-duration: .01ms !important;
}
.snowflake { display: none; }
}