* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

::selection { background: transparent; color: inherit; }

body {
    font-family: 'VT323', monospace;
    background-color: #2b3a32; /* Rich nature earth tone */
    color: #f1f8ee;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 1rem;
    user-select: none;
    -webkit-user-select: none;
}

#nature-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    z-index: 0;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 700px) {
    html, body, button, a, input, select { -webkit-tap-highlight-color:transparent !important; }
    button, a, input, select { -webkit-appearance:none; appearance:none; }
    button:focus, a:focus, input:focus, select:focus { outline:none; }
    button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline:2px solid #fff0b3; outline-offset:3px; }
}

.content-window {
    position: relative;
    z-index: 10;
    background: rgba(22, 34, 27, 0.88);
    backdrop-filter: blur(8px);
    border: 3px solid #4d6d53;
    border-radius: 6px;
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.5rem 1.25rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 2px #18241d;
}

/* Roaming Critter along the window edge */
.window-critter {
    position: absolute;
    width: 24px;
    height: 24px;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    z-index: 12;
    transform-origin: center bottom;
    transition: transform 0.1s linear;
}

header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.sub-badge {
    display: inline-block;
    font-size: 0.95rem;
    color: #9cd48b;
    letter-spacing: 2px;
    background: rgba(60, 95, 70, 0.4);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(3.2rem, 14vw, 4.5rem);
    color: #b7f394;
    letter-spacing: 3px;
    line-height: 0.9;
    text-shadow: 3px 3px 0 #1b3823;
}

.subtitle {
    font-size: 1.25rem;
    color: #cde4c5;
    margin-top: 0.5rem;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hub-link {
    display: flex;
    align-items: center;
    background: rgba(35, 54, 43, 0.75);
    border: 2px solid #4a6c52;
    padding: 0.85rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: #e5f4e0;
    transition: all 0.2s ease;
}

.hub-link:hover, .hub-link:active {
    transform: translateY(-2px);
    background: rgba(52, 82, 64, 0.95);
    border-color: #a0ea83;
}

.link-pixel-icon {
    font-size: 1.8rem;
    margin-right: 0.9rem;
}

.link-text h3 {
    font-size: 1.4rem;
    line-height: 1.1;
    color: #d8fad0;
}

.link-text p {
    font-size: 1rem;
    color: #8fa88c;
}

#ground-shelf {
    margin-top: 1.75rem;
    text-align: center;
    border-top: 2px dashed #3a5542;
    padding-top: 0.75rem;
    color: #7d9e80;
    font-size: 0.95rem;
}

/* Full-screen world interface */
body {
    display: block;
    height: 100svh;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: #6d9a58;
    overscroll-behavior: none;
    touch-action: none;
}

#nature-canvas {
    z-index: 0;
}

.site-header {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-height: clamp(3.8rem, 9vw, 5.5rem);
    padding: 0.7rem clamp(1rem, 4vw, 4rem);
    border-bottom: 3px solid rgba(46, 77, 41, 0.7);
    background: rgba(25, 55, 34, 0.78);
    box-shadow: 0 3px 0 rgba(244, 225, 154, 0.25);
}

.brand {
    color: #f6e8b0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 0.8;
    letter-spacing: 2px;
    text-decoration: none;
    text-shadow: 3px 3px 0 #3b5d36;
}

.brand span { color: #ffe39a; }

.tagline {
    color: #d0e7aa;
    font-size: clamp(0.95rem, 2vw, 1.3rem);
    letter-spacing: 0.5px;
}

.header-status {
    color: #ffe39a;
    font-size: 0.8rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.25rem;
    background: #b7f394;
    box-shadow: 0 0 8px #b7f394;
}

.world {
    position: relative;
    z-index: 2;
    height: calc(100svh - clamp(3.8rem, 9vw, 5.5rem));
    min-height: 31rem;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
}

.world-prompt,
.world-note,
.world-footer {
    color: #f5f0c9;
    text-shadow: 2px 2px 0 rgba(31, 67, 37, 0.8);
}

.world-prompt {
    position: absolute;
    top: clamp(1.1rem, 4vh, 2.8rem);
    left: clamp(1rem, 5vw, 5rem);
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    letter-spacing: 1px;
}

.world-object {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: max-content;
    padding: 0.35rem;
    border: 0;
    color: #fff5ca;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    text-align: left;
    filter: drop-shadow(3px 4px 0 rgba(28, 63, 32, 0.55));
    transition: transform 160ms ease, filter 160ms ease;
}

.world-object:hover,
.world-object:focus-visible {
    z-index: 4;
    transform: translateY(-6px) scale(1.04);
    filter: drop-shadow(4px 7px 0 rgba(28, 63, 32, 0.6));
    outline: none;
}

.object--globe { top: 21%; left: 9%; }
.object--calculator { top: 34%; right: 8%; }
.object--plant { top: 57%; left: 13%; }
.object--arcade { top: 69%; right: 11%; }

.object-art {
    display: grid;
    place-items: center;
    width: clamp(3.7rem, 11vw, 6.5rem);
    height: clamp(3.7rem, 11vw, 6.5rem);
    color: #ffe39a;
    font-size: clamp(3.2rem, 9vw, 5.5rem);
    line-height: 1;
    text-shadow: 3px 3px 0 #4b713f;
}

.object--globe .object-art {
    color: #93d3d1;
    text-shadow: 3px 3px 0 #2b6960;
}

.object--plant .object-art { color: #c5ed8f; }

.object-label {
    display: flex;
    flex-direction: column;
    min-width: 7rem;
    padding: 0.25rem 0.45rem;
    background: rgba(35, 73, 40, 0.72);
    border-left: 2px solid #ffe39a;
}

.object-label strong {
    font-size: clamp(1rem, 2.8vw, 1.45rem);
    line-height: 1;
}

.object-label small {
    margin-top: 0.2rem;
    color: #c3dca0;
    font-size: clamp(0.75rem, 1.8vw, 1rem);
}

.world-note {
    position: absolute;
    right: clamp(1rem, 5vw, 5rem);
    bottom: 1.5rem;
    max-width: 15rem;
    font-size: 1rem;
    text-align: right;
}

.world-footer {
    position: fixed;
    z-index: 3;
    right: 1rem;
    bottom: 0.7rem;
    font-size: 0.85rem;
}

.toast {
    position: absolute;
    left: 50%;
    bottom: 3.5rem;
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: 0.5rem 0.8rem;
    color: #fff5ca;
    background: rgba(31, 67, 37, 0.92);
    border: 2px solid #ffe39a;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.75rem);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 560px) {
    .site-header { grid-template-columns: 1fr auto; }
    .tagline { display: none; }
    .world-prompt { max-width: 12rem; }
    .object-label { min-width: 6rem; }
    .world-note { bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .world-object,
    .toast { transition: none; }
}

/* Minimal scene overlay */
body {
    display: block;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: #6d9a58;
}

.site-header {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: clamp(4rem, 11vw, 6.5rem);
    padding: 0.75rem 1rem;
    background: rgba(25, 55, 34, 0.35);
    border-bottom: 2px solid rgba(255, 227, 154, 0.45);
}

.site-header h1 {
    color: #fff0b3;
    font-size: clamp(3rem, 10vw, 6rem);
    letter-spacing: 3px;
    line-height: 0.8;
    text-shadow: 4px 4px 0 #315b3b;
}

.world {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
}

.portfolio-link {
    position: absolute;
    top: clamp(1.25rem, 4vh, 3rem);
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.6rem;
    color: #fff4c7;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    text-decoration: none;
    text-shadow: 2px 2px 0 #315b3b;
    transform: translateX(-50%);
    transition: color 160ms ease, transform 160ms ease;
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
    color: #fff0a0;
    transform: translateX(-50%) translateY(-3px);
    outline: none;
}

.portfolio-icon {
    color: #ffe39a;
    font-size: 1.5em;
}

.ufo-link {
    position: fixed;
    z-index: 4;
    top: 46.8%;
    left: 47%;
    width: clamp(6rem, 22vw, 11rem);
    height: clamp(3rem, 10vw, 6rem);
    cursor: pointer;
    pointer-events: auto;
}

.fisherman-link {
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    cursor: pointer;
    pointer-events: auto;
}

.fisherman-link:focus-visible {
    outline: 2px dashed #fff0b3;
    outline-offset: 4px;
}

.ufo-link:focus-visible {
    outline: 2px dashed #fff0b3;
    outline-offset: 4px;
}