/* Windows 95/98 Custom Styles for Operation Causeway */

:root {
    --desktop-bg: #008080;
    --wallpaper-color1: #000080;
    --wallpaper-color2: #008080;
}

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

.login-screen {
    position: fixed;
    inset: 0;
    min-height: 100dvh;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0 1px,
            transparent 1px 3px
        ),
        linear-gradient(#0a1976, #001b6b 45%, #00104f);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.login-dialog {
    width: min(410px, 92vw);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.login-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 11px;
    border-top: 1px solid #dfdfdf;
    border-bottom: 1px solid #808080;
    background: linear-gradient(#d7d7d7, #c5c5c5);
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00a400;
    box-shadow: 0 0 0 1px #0b4d0b inset;
    animation: login-dot-blink 1.8s steps(2, end) infinite;
    flex: 0 0 auto;
}

.login-banner-sep {
    color: #666;
}

.login-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
}

.login-avatar {
    width: 48px;
    height: 48px;
    border: 2px inset #c0c0c0;
    background:
        radial-gradient(circle at 50% 35%, #f4e4ca 11px, transparent 12px),
        linear-gradient(#000080, #000080) 50% 44px/28px 18px no-repeat,
        #008080;
    flex: 0 0 auto;
}

.login-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.login-welcome {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: bold;
}

.login-subtle {
    margin: 0 0 6px;
    font-size: 11px;
    color: #4a4a4a;
    line-height: 1.25;
}

.login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.login-status {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.login-status-right {
    color: #000080;
}

@keyframes login-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Desktop */
.desktop {
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    --desktop-icon-size: clamp(20px, 2.8vw, 32px);
    --desktop-icon-box: clamp(68px, 10.5vw, 86px);
    --desktop-icon-label-size: clamp(9px, 1.25vw, 11px);
    --desktop-icon-gap: clamp(10px, 2.4vh, 30px);
    --desktop-icon-rows: 6;
}

/* Wallpaper - classic Windows teal gradient */
.wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--desktop-bg);
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: clamp(10px, 2vh, 20px);
    left: clamp(10px, 2vw, 20px);
    right: clamp(10px, 2vw, 20px);
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--desktop-icon-rows), min-content);
    grid-auto-columns: var(--desktop-icon-box);
    row-gap: var(--desktop-icon-gap);
    column-gap: clamp(8px, 1.6vw, 18px);
    align-content: start;
    justify-content: start;
    height: calc(100dvh - 72px);
    max-height: calc(100dvh - 72px);
    overflow: hidden;
    z-index: 10;
}

.desktop-icon {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--desktop-icon-box);
    cursor: pointer;
    padding: clamp(3px, 0.6vw, 5px);
    color: inherit;
    font: inherit;
}

.desktop-icon:hover {
    background: rgba(0, 0, 128, 0.3);
    border: 1px dotted white;
}

.desktop-icon:active {
    background: rgba(0, 0, 128, 0.5);
}

.desktop-icon:focus-visible {
    outline: 2px dotted #fff;
    outline-offset: 2px;
    background: rgba(0, 0, 128, 0.35);
}

.icon-img {
    width: calc(var(--desktop-icon-size) + 2px);
    height: calc(var(--desktop-icon-size) + 2px);
    margin-bottom: clamp(3px, 0.8vh, 6px);
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-label {
    color: white;
    font-size: var(--desktop-icon-label-size);
    line-height: 1.15;
    text-align: center;
    text-shadow: 1px 1px 1px black;
    max-width: 100%;
    word-wrap: break-word;
}

.desktop-icon-image {
    width: var(--desktop-icon-size);
    height: var(--desktop-icon-size);
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.4));
}

.pixel-emoji,
.pixel-emoji-canvas {
    display: inline-block;
    width: 24px;
    height: 24px;
}

.pixel-emoji-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: saturate(1.3) contrast(1.35) drop-shadow(1px 0 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
    transform: none;
    transform-origin: center;
}

/* Windows */
.window {
    position: absolute;
    z-index: 100;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* Keep window control buttons aligned and period-correct */
.title-bar-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.title-bar-controls button {
    width: 18px;
    min-width: 18px;
    height: 16px;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.window-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Status bar */
.status-bar {
    margin-top: 10px;
    border: 2px inset #c0c0c0;
    background: #c0c0c0;
    padding: 2px 5px;
}

.status-bar-field {
    margin: 0;
    font-size: 11px;
    padding: 2px 5px;
}

/* Menu bar */
.menu-bar {
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px 5px;
    margin-bottom: 10px;
}

.menu-bar span {
    padding: 2px 8px;
    cursor: pointer;
}

.menu-bar span:hover {
    background: #000080;
    color: white;
}

/* README specific */
.readme-content {
    text-align: center;
    padding: 20px;
}

.readme-content h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.readme-content h2 {
    font-size: 18px;
    color: #000080;
    margin-top: 0;
}

.readme-content .dates {
    font-size: 16px;
    font-weight: bold;
}

.retro-banner {
    margin: 8px 0 14px;
    border: 2px inset #c0c0c0;
    padding: 6px;
    background: #000;
    color: #00ff66;
}

.blink {
    font-weight: bold;
    color: #ffff00;
    margin-right: 8px;
    animation: blink 1s steps(2, start) infinite;
}

.marquee-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
    width: calc(100% - 65px);
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 14s linear infinite;
    font-size: 12px;
}

.visitor-counter {
    margin: 12px auto;
    display: inline-block;
    border: 2px inset #c0c0c0;
    background: #000;
    color: #00ff66;
    padding: 6px 10px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
}

.readme-content hr {
    margin: 20px 0;
}

.readme-content .tagline {
    font-size: 14px;
    font-style: italic;
}

.rsvp-section {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rsvp-button {
    display: inline-block;
    background: #000080;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: 2px outset #c0c0c0;
}

.rsvp-button:hover {
    background: #0000a8;
}

.rsvp-button:active {
    border: 2px inset #c0c0c0;
}

.calendar-button {
    display: inline-block;
    background: #c0c0c0;
    color: #000;
    padding: 8px 14px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    border: 2px outset #fff;
}

.calendar-button:hover {
    background: #d8d8d8;
}

.calendar-button:active {
    border: 2px inset #fff;
}

.readme-content .note {
    font-size: 12px;
    color: #666;
}

/* Timeline */
.timeline {
    padding: 10px;
}

.timeline-day {
    margin-bottom: 15px;
    padding: 10px;
    background: #ffffd0;
    border: 2px inset #c0c0c0;
}

.timeline-day.selected {
    background: #000080;
    color: white;
}

.timeline-day h3 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.timeline-day ul {
    margin: 0;
    padding-left: 20px;
}

.timeline-day li {
    margin: 5px 0;
}

/* Warning box */
.warning-box {
    background: #ffff00;
    border: 2px solid #000;
    padding: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

/* Tide table */
.tide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.tide-table th, .tide-table td {
    border: 1px solid #808080;
    padding: 8px;
    text-align: center;
}

.tide-table th {
    background: #c0c0c0;
}

.highlight {
    background: #ffff00;
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

/* Transport grid */
.lift-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lift-box {
    border: 2px inset #c0c0c0;
    padding: 10px;
    background: #ffffd0;
}

.lift-box strong {
    display: block;
    background: #c0c0c0;
    padding: 2px 5px;
    margin: -10px -10px 10px -10px;
}

/* Dinner details */
.dinner-details {
    background: #ffffd0;
    padding: 15px;
    border: 2px inset #c0c0c0;
}

.media-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-now-playing {
    background: #ffffd0;
    border: 2px inset #c0c0c0;
    padding: 6px 8px;
    font-size: 12px;
}

.media-seek-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    align-items: center;
    font-size: 11px;
}

.media-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.media-controls button {
    min-width: 88px;
}

.media-volume-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.media-playlist {
    margin: 0;
    padding-left: 18px;
    max-height: 130px;
    overflow-y: auto;
}

.media-playlist button {
    width: 100%;
    text-align: left;
    margin: 2px 0;
}

.roadgame-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roadgame-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    align-items: center;
    justify-content: space-between;
}

.roadgame-canvas {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 320 / 220;
    border: 2px inset #c0c0c0;
    background: #1f1f1f;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    align-self: center;
}

.roadgame-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.roadgame-help {
    margin: 0;
}

.qr-slot {
    margin: 12px auto;
    width: 240px;
    height: 240px;
    border: 2px inset #c0c0c0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Beds sections */
.beds-section {
    background: #ffffd0;
    padding: 10px;
    border: 2px inset #c0c0c0;
    margin-bottom: 15px;
}

/* Guestbook */
.guestbook-embed {
    min-height: 200px;
    padding: 10px;
    background: #ffffd0;
    border: 2px inset #c0c0c0;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guestbook-form label {
    font-weight: bold;
    font-size: 12px;
}

.guestbook-form input[type="text"],
.guestbook-form textarea {
    width: 100%;
    box-sizing: border-box;
}

#guestHoney {
    position: absolute;
    left: -9999px;
}

.turnstile-wrap {
    margin-top: 6px;
}

.guestbook-actions {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.guestbook-list-wrap h4 {
    margin: 0 0 8px;
}

.guestbook-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
}

.guestbook-item {
    background: #fff;
    border: 2px inset #c0c0c0;
    padding: 8px;
}

.guestbook-item-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.guestbook-name {
    font-weight: bold;
}

.guestbook-time {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

.guestbook-message {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Dr Nitwit chatbot */
.nitwit-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nitwit-transcript {
    border: 2px inset #c0c0c0;
    background: #fff;
    min-height: 160px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nitwit-msg {
    max-width: 86%;
    padding: 6px 8px;
    border: 2px outset #c0c0c0;
    background: #f4f4f4;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
}

.nitwit-msg.user {
    margin-left: auto;
    background: #dff3ff;
}

.nitwit-msg.bot {
    margin-right: auto;
    background: #ffffd0;
}

.nitwit-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.nitwit-input {
    width: 100%;
    box-sizing: border-box;
}

.nitwit-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
}

.nitwit-controls input[type="range"] {
    width: 120px;
}

.nitwit-autovoice {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nitwit-assist-row {
    min-height: 18px;
    font-size: 11px;
    color: #404040;
}

.nitwit-help-toggle {
    min-width: 22px;
    padding: 0 6px;
    line-height: 1.2;
}

.nitwit-guestline {
    margin: 0;
    font-size: 11px;
    color: #2e2e2e;
}

.nitwit-howbox {
    border: 2px inset #c0c0c0;
    background: #fffff0;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.35;
}

.nitwit-howbox p {
    margin: 5px 0 0;
}

.nitwit-msg-body {
    margin-bottom: 6px;
}

.nitwit-evidence {
    border-top: 1px dotted #7b7b7b;
    margin-top: 6px;
    padding-top: 5px;
    font-size: 11px;
}

.nitwit-evidence-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.nitwit-evidence-list {
    margin: 0;
    padding-left: 16px;
}

.nitwit-evidence-list li {
    margin-bottom: 4px;
}

.nitwit-source-link {
    margin-left: 6px;
    font-size: 11px;
    padding: 0 5px;
    line-height: 1.2;
}

.nitwit-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.nitwit-chip {
    font-size: 11px;
    line-height: 1.2;
    padding: 1px 6px;
}

/* Attendance */
.attendance-module {
    background: #ffffd0;
    border: 2px inset #c0c0c0;
    padding: 10px;
}

.attendance-module h4 {
    margin: 0 0 8px;
}

.attendance-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attendance-form label {
    font-weight: bold;
    font-size: 12px;
}

.attendance-form input[type="text"],
.attendance-form select,
.attendance-form textarea {
    width: 100%;
    box-sizing: border-box;
}

#attendanceHoney {
    position: absolute;
    left: -9999px;
}

.attendance-actions {
    margin-top: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.attendance-summary {
    margin: 10px 0;
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.attendance-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attendance-item {
    background: #fff;
    border: 2px inset #c0c0c0;
    padding: 6px;
    font-size: 12px;
    line-height: 1.3;
}

/* Admin panel */
.admin-body {
    padding: 10px;
}

.admin-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-form select,
.admin-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

/* Calm mode */
body.calm-mode .blink,
body.calm-mode .marquee-text,
body.calm-mode .monkey,
body.calm-mode .popup-layer,
body.calm-mode .cursor-sprite {
    display: none !important;
}

body.calm-mode .desktop * {
    animation-play-state: paused !important;
}

/* FAQ details */
details {
    margin: 10px 0;
    padding: 5px;
    background: #ffffd0;
    border: 2px inset #c0c0c0;
}

summary {
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
}

summary:hover {
    background: rgba(0, 0, 128, 0.1);
}

details p {
    margin: 10px 0 0 20px;
}

/* Taskbar */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    padding: 2px 5px;
    z-index: 1000;
}

.start-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-weight: bold;
    font-size: 12px;
    border: 2px outset #fff;
    background: #c0c0c0;
    cursor: pointer;
}

.start-button:active {
    border: 2px inset #fff;
}

.start-icon {
    font-size: 16px;
}

.taskbar-divider {
    width: 2px;
    height: 20px;
    background: #808080;
    margin: 0 5px;
}

.taskbar-windows {
    flex: 1;
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.taskbar-window-btn {
    padding: 2px 10px;
    font-size: 11px;
    border: 2px outset #fff;
    background: #c0c0c0;
    cursor: pointer;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taskbar-window-btn:active,
.taskbar-window-btn.active {
    border: 2px inset #fff;
    background: #d4d0c8;
}

.taskbar-clock {
    padding: 3px 15px;
    border: 2px inset #fff;
    font-size: 12px;
    background: #c0c0c0;
}

/* Start Menu */
.start-menu {
    position: absolute;
    bottom: 30px;
    left: 5px;
    width: 200px;
    z-index: 1001;
}

.start-menu-body {
    background: #c0c0c0;
    border: 2px outset #fff;
    padding: 5px;
}

.start-menu-item {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.start-menu-item:hover {
    background: #000080;
    color: white;
}

.start-menu-divider {
    height: 2px;
    background: #808080;
    margin: 5px 0;
}

/* Note styling */
.note {
    background: #ffffd0;
    padding: 10px;
    border: 2px inset #c0c0c0;
    font-size: 12px;
}

.small-text {
    font-size: 11px;
    color: #666;
}

.guest-badge {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 1200;
    background: rgba(192, 192, 192, 0.96);
    border: 2px outset #fff;
    box-shadow: 1px 1px 0 #000;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: min(44vw, 340px);
    color: #111;
}

.guest-badge-label {
    color: #333;
    white-space: nowrap;
}

#guestBadgeName {
    color: #000080;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* High contrast mode */
.high-contrast .wallpaper {
    background: black;
}

.high-contrast .icon-label {
    color: yellow;
}

.high-contrast .window {
    border: 2px solid yellow;
}

.desktop.custom-cursor,
.desktop.custom-cursor * {
    cursor: none !important;
}

/* Monkey helper */
.monkey {
    position: fixed;
    top: 80px;
    left: 80px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transition: left 0.25s linear, top 0.25s linear, transform 0.2s ease;
}

.monkey-face {
    font-size: 42px;
    animation: bounce 1.2s infinite;
    filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.4));
}

.monkey-sprite {
    width: 84px;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.monkey.jumping {
    transform: scale(1.08) rotate(-5deg);
}

.monkey.chatting .monkey-bubble {
    display: block;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.monkey-bubble {
    display: none;
    background: #ffffd0;
    border: 2px solid #000;
    padding: 10px;
    margin-bottom: 10px;
    max-width: 200px;
    font-size: 12px;
    position: relative;
}

.monkey-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #000;
}

.monkey-toggle {
    position: fixed;
    bottom: 40px;
    right: 10px;
    padding: 5px 10px;
    background: #c0c0c0;
    border: 2px outset #fff;
    cursor: pointer;
    z-index: 1999;
}

.cursor-sprite {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    z-index: 4000;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.cursor-sprite-face {
    font-size: 20px;
    line-height: 1;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: cursor-wobble 0.45s steps(2, end) infinite;
    filter: saturate(1.4) contrast(1.35);
}

@keyframes cursor-wobble {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(1px, -1px) rotate(-8deg); }
    100% { transform: translate(-1px, 1px) rotate(8deg); }
}

.popup-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2500;
}

.retro-popup {
    position: absolute;
    width: 280px;
    pointer-events: auto;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
}

.retro-popup .window-body p {
    margin: 8px 0;
}

.popup-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.screensaver {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: #000;
    cursor: pointer;
}

.screensaver-logo {
    position: absolute;
    left: 20px;
    top: 20px;
    color: #00ff66;
    font-family: "Courier New", Courier, monospace;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff66;
    user-select: none;
}

/* Mobile responsive */
@media (min-width: 601px) and (max-width: 1024px) {
    .desktop-icons {
        top: 10px;
        left: 10px;
        right: 10px;
        grid-auto-flow: row;
        grid-template-columns: repeat(6, minmax(72px, 1fr));
        grid-template-rows: none;
        grid-auto-columns: auto;
        gap: 18px 10px;
        height: calc(100dvh - 64px);
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 60px;
    }

    .desktop-icon {
        width: 100%;
    }

    .window {
        position: fixed;
        width: min(88vw, 760px) !important;
        left: 6vw !important;
        top: 16px !important;
        max-height: calc(100dvh - 64px);
    }

    .window-body {
        max-height: calc(100dvh - 180px);
    }

    .title-bar-controls button {
        width: 24px;
        min-width: 24px;
        height: 22px;
    }

    .taskbar {
        height: 34px;
        padding: 3px 6px;
    }

    .start-menu {
        bottom: 36px;
        width: min(280px, 56vw);
    }

    .start-menu-item {
        min-height: 28px;
    }

    .monkey-toggle {
        bottom: 44px;
    }
}

@media (max-width: 600px) {
    .login-dialog {
        width: 94vw;
    }

    .login-banner {
        font-size: 10px;
        gap: 4px;
        padding: 3px 6px;
    }

    .login-body {
        flex-direction: column;
    }

    input,
    textarea,
    button,
    select {
        font-size: 16px;
    }

    .desktop-icons {
        top: max(10px, env(safe-area-inset-top));
        left: 8px;
        right: 8px;
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        grid-template-rows: none;
        grid-auto-columns: auto;
        gap: 14px 8px;
        height: calc(100dvh - 52px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 52px - env(safe-area-inset-bottom));
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }

    .desktop-icon {
        width: 100%;
    }
    
    .window {
        width: calc(100vw - 10px) !important;
        left: 5px !important;
        top: max(8px, env(safe-area-inset-top)) !important;
        max-height: calc(100dvh - 52px - env(safe-area-inset-bottom));
        position: fixed;
    }

    .window-body {
        max-height: calc(100dvh - 190px - env(safe-area-inset-bottom));
    }

    .title-bar-controls button {
        width: 24px;
        min-width: 24px;
        height: 22px;
    }
    
    .lift-grid {
        grid-template-columns: 1fr;
    }
    
    .taskbar-windows {
        display: none;
    }

    .taskbar {
        height: 38px;
        padding: 3px 4px;
        padding-bottom: max(3px, env(safe-area-inset-bottom));
    }

    .start-button {
        min-height: 28px;
        padding: 3px 8px;
    }

    .taskbar-clock {
        padding: 3px 8px;
        font-size: 11px;
    }

    .start-menu {
        left: 4px;
        right: 4px;
        width: auto;
        bottom: calc(40px + env(safe-area-inset-bottom));
    }

    .start-menu-item {
        min-height: 30px;
        padding: 9px 10px;
    }

    .popup-layer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        left: 6px;
        right: 6px;
        top: auto;
        bottom: 42px;
        height: auto;
        max-height: 45dvh;
        overflow-y: auto;
        pointer-events: none;
    }

    .cursor-sprite {
        display: none !important;
    }

    .guest-badge {
        top: 6px;
        right: 6px;
        max-width: calc(100vw - 12px);
        font-size: 10px;
        padding: 3px 6px;
    }

    .retro-popup {
        position: relative;
        width: 100%;
        left: auto !important;
        top: auto !important;
        pointer-events: auto;
    }

    .guestbook-list {
        max-height: calc(100dvh - 360px);
    }

    .guestbook-actions,
    .attendance-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .attendance-summary {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .roadgame-canvas {
        max-width: 100%;
    }

    .roadgame-controls,
    .media-controls {
        gap: 6px;
    }

    .roadgame-controls button,
    .media-controls button {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    .nitwit-transcript {
        max-height: calc(100dvh - 350px);
    }

    .nitwit-row {
        grid-template-columns: 1fr;
    }

    .nitwit-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .nitwit-controls input[type="range"] {
        width: 100%;
    }

    .monkey-toggle {
        right: 6px;
        bottom: calc(46px + env(safe-area-inset-bottom));
        min-height: 30px;
    }
}
