@import url('https://cdn.jsdelivr.net/npm/@fontsource/fusion-pixel-12px-monospaced-sc@5.3.0/index.css');

:root {
  --pixel-font: "Fusion Pixel 12px Monospaced SC", "Fusion Pixel 12px Monospaced Zh Hans", "Zpix", "Microsoft YaHei", monospace;
  --pixel-body-font: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --pixel-utility-font: "Fusion Pixel 12px Monospaced SC", ui-monospace, "Cascadia Mono", monospace;
  --pixel-forest: #0b2a22;
  --pixel-forest-deep: #061712;
  --pixel-forest-glass: #1b4d3e;
  --pixel-ink: #18362d;
  --pixel-paper: #fff1c8;
  --pixel-paper-light: #fff9e5;
  --pixel-paper-shadow: #c99f5d;
  --pixel-wood: #6b4328;
  --pixel-wood-light: #a56e3d;
  --pixel-leaf: #86a947;
  --pixel-mint: #8ed5cf;
  --pixel-gold: #f1c75b;
  --pixel-coral: #e47a61;
  --pixel-line: #355f50;
  --pixel-shadow: #071b15;
  --pixel-border-soft: #8b7044;
  --pixel-scene-position: center;
  --pixel-scene-position-mobile: 58% center;
  --pixel-scene-x: 50%;
  --pixel-scene-y: 50%;
  --pixel-scene-x-mobile: 58%;
  --pixel-scene-y-mobile: 50%;
  --pixel-scene-current-x: var(--pixel-scene-x);
  --pixel-scene-current-y: var(--pixel-scene-y);
  --pixel-scene-shift-x: 0px;
  --pixel-scene-shift-y: 0px;
  --pixel-scene-scroll-y: 0px;
  --pixel-command-shadow: 0 4px 0 #8a572f, 0 7px 0 var(--pixel-shadow);
  --pixel-panel-shadow: 5px 7px 0 rgba(7, 27, 21, .82);
}

.pixel-page {
  --pixel-scene-current-x: var(--pixel-scene-x);
  --pixel-scene-current-y: var(--pixel-scene-y);
  color: var(--pixel-ink);
  background-color: var(--pixel-forest-deep);
  background-image: url("/assets/pixel-greenhouse-interior.png");
  background-position: var(--pixel-scene-position);
  background-size: cover;
  background-attachment: fixed;
  font-family: var(--pixel-body-font);
  font-size: 14px;
  line-height: 1.6;
  font-synthesis: weight;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  isolation: isolate;
}

.pixel-page.pixel-scene-effects-active {
  background-position:
    calc(var(--pixel-scene-current-x) + var(--pixel-scene-shift-x))
    calc(var(--pixel-scene-current-y) + var(--pixel-scene-shift-y) + var(--pixel-scene-scroll-y)) !important;
}

.pixel-scene-ambient {
  --pixel-pollen-shift-x: 0px;
  --pixel-pollen-shift-y: 0px;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(var(--pixel-pollen-shift-x), var(--pixel-pollen-shift-y), 0);
  contain: strict;
  will-change: transform;
}

.pixel-scene-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffe8a0;
  box-shadow: 4px 0 0 rgba(142, 213, 207, .7);
  opacity: 0;
  animation: pixel-pollen-rise 12s steps(12, end) infinite;
  will-change: transform, opacity;
}

.pixel-scene-particle:nth-child(1) { left: 7%; top: 78%; animation-delay: -2s; --pixel-pollen-drift: 12px; }
.pixel-scene-particle:nth-child(2) { left: 18%; top: 46%; animation-delay: -8s; --pixel-pollen-drift: -8px; }
.pixel-scene-particle:nth-child(3) { left: 34%; top: 84%; animation-delay: -5s; --pixel-pollen-drift: 8px; }
.pixel-scene-particle:nth-child(4) { left: 63%; top: 70%; animation-delay: -10s; --pixel-pollen-drift: -12px; }
.pixel-scene-particle:nth-child(5) { left: 76%; top: 36%; animation-delay: -4s; --pixel-pollen-drift: 8px; }
.pixel-scene-particle:nth-child(6) { left: 88%; top: 82%; animation-delay: -7s; --pixel-pollen-drift: -8px; }
.pixel-scene-particle:nth-child(7) { left: 95%; top: 58%; animation-delay: -1s; --pixel-pollen-drift: 12px; }

.pixel-scene-effects-paused .pixel-scene-particle {
  animation-play-state: paused;
}

@keyframes pixel-pollen-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 14vh, 0);
  }

  16%,
  72% {
    opacity: .36;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--pixel-pollen-drift), -18vh, 0);
  }
}

.pixel-page *,
.pixel-page *::before,
.pixel-page *::after {
  border-radius: 0 !important;
}

.pixel-page :where(h1, h2, h3, button, summary, legend, .brand, .brand-copy, .view-kicker, .section-index, .kicker, .share-label, .reminder-label, .eyebrow, .log-label, .phase-number, .current-badge) {
  font-family: var(--pixel-font) !important;
  letter-spacing: 0;
}

.pixel-page :where(input, select, textarea, output, p, li, dd) {
  font-family: var(--pixel-body-font);
}

.pixel-page :where(.view-kicker, .section-index, .kicker, .share-label, .reminder-label, .eyebrow, .log-label, code, pre, .system-log, .history-list) {
  font-family: var(--pixel-utility-font) !important;
}

.pixel-page :where(h1, h2, h3) {
  line-height: 1.22;
}

.pixel-page :where(p, li, dd, label, small) {
  line-height: 1.6;
}

.pixel-page :where(img, canvas, video) {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.pixel-page :where(input[type="text"], input[type="number"], input[type="time"], input[type="date"], select, textarea) {
  color: var(--pixel-ink) !important;
  background: var(--pixel-paper-light) !important;
  border: 3px solid #4a2e1d !important;
  box-shadow:
    inset 0 6px 0 var(--pixel-wood-light),
    inset 3px 3px 0 #dfc58c,
    0 3px 0 var(--pixel-shadow);
}

.pixel-page :where(input[type="text"], input[type="number"], input[type="time"], input[type="date"], select, textarea):focus {
  border-color: var(--pixel-forest) !important;
  outline: 3px solid var(--pixel-mint) !important;
  outline-offset: 2px !important;
  box-shadow:
    0 0 0 3px rgba(142, 213, 207, .34),
    inset 0 6px 0 #2f7e70,
    inset 3px 3px 0 #d8c18c,
    0 4px 0 var(--pixel-shadow);
}

.pixel-page :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--pixel-leaf);
}

.pixel-page button,
.pixel-page :where(.back-link, .header-link, .art-header a) {
  box-shadow: 3px 3px 0 var(--pixel-shadow);
  transition: filter 60ms steps(1, end), transform 60ms steps(1, end), box-shadow 60ms steps(1, end);
}

.pixel-page button:not(:disabled):hover,
.pixel-page :where(.back-link, .header-link, .art-header a):hover {
  filter: brightness(1.08);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--pixel-shadow);
}

.pixel-page button:not(:disabled):active,
.pixel-page :where(.back-link, .header-link, .art-header a):active {
  filter: none;
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pixel-shadow);
}

.pixel-page :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--pixel-mint) !important;
  outline-offset: 3px !important;
  animation: pixel-focus-step 160ms steps(2, end) 1;
}

@keyframes pixel-focus-step {
  0%,
  100% {
    filter: none;
  }

  50% {
    filter: brightness(1.1);
  }
}

.pixel-page :where(button, input, select, textarea):disabled {
  filter: grayscale(.35);
  opacity: .55;
}

.pixel-page :where(.section-index, .kicker, .share-label, .reminder-label) {
  color: #a84f3c !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  text-transform: uppercase;
}

.pixel-page :where(.brand, .topbar a, .brand-lockup h1, .art-header h1) {
  text-shadow: 2px 2px 0 #0a211b;
}

.pixel-page :where(.checkin-header, .app-header, .tutor-header, .postcard-header, .topbar, .showcase-header, .art-header, .challenge-header) {
  min-height: 68px;
  color: var(--pixel-paper-light);
  background: rgba(6, 31, 24, .96);
  border-color: var(--pixel-shadow);
  border-bottom: 5px solid var(--pixel-gold);
  box-shadow: 0 4px 0 var(--pixel-wood), 0 8px 0 rgba(7, 27, 21, .48);
}

.pixel-page :where(.paper-panel, .upload-panel, .postcard-editor, .capture-panel, .settings-panel, .builder) {
  color: var(--pixel-ink);
  background-color: rgba(255, 241, 200, .96);
  border-color: #4a2e1d;
}

.pixel-page :where(.dialogue-box, .guide-dialogue p, .speech-bubble, .notice, .observer-dialogue, .codex-dialogue) {
  color: #3f2c1d;
  background: var(--pixel-paper-light);
  border-color: #4a2e1d;
  box-shadow: 0 4px 0 #a46a39, 0 7px 0 var(--pixel-shadow), inset 0 0 0 3px #ddbd76;
}

.pixel-page :where(.primary-button, .primary-command, .primary-action, .confirm-command, .button-primary, .primary) {
  color: #342413;
  background: var(--pixel-gold);
  border-color: #4a2e1d;
  box-shadow: var(--pixel-command-shadow), inset 0 4px 0 #ffe49a, inset 0 -4px 0 #bd812f;
}

.pixel-page :where(.primary-button, .primary-command, .primary-action, .confirm-command, .button-primary, .primary):not(:disabled):hover {
  filter: brightness(1.04) saturate(1.08);
}

.pixel-page :where(.system-log, .checkin-status, .inline-status, .history-section, #share-status) {
  color: #9cde8a;
  background: #09251d;
  border-color: #234e3e;
}

.pixel-page :where(.back-link, .return-link, .secondary-command, .button-quiet, .actions button, .action-switcher button, .segmented-control button, .segmented button) {
  color: #3f2c1d;
  background: #ead7a2;
  border-color: #4a2e1d;
  box-shadow: 0 3px 0 #946139, 0 6px 0 var(--pixel-shadow), inset 0 3px 0 #fff1c8;
}

.pixel-page :where(.action-switcher button, .segmented-control button, .segmented button, .palette-swatch, .swatches button)[aria-pressed="true"] {
  color: var(--pixel-paper-light);
  background: var(--pixel-forest-glass);
  border-color: var(--pixel-forest);
  box-shadow: 0 0 0 3px var(--pixel-mint), 0 4px 0 #28796c, 0 7px 0 var(--pixel-shadow), inset 0 3px 0 #337c6d;
}

.pixel-page :where(.rights-field, .toggle-row, .summary-choice, .override-field, .frequency-option, .eligibility-field, .concept-options label) input[type="checkbox"],
.pixel-page :where(.frequency-option, .concept-options label) input[type="radio"] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  appearance: none;
  background: var(--pixel-paper-light);
  border: 3px solid #4a2e1d;
  box-shadow: inset 2px 2px 0 #cfad6c;
}

.pixel-page :where(.rights-field, .toggle-row, .summary-choice, .override-field, .frequency-option, .eligibility-field, .concept-options label) input[type="checkbox"]:checked,
.pixel-page :where(.frequency-option, .concept-options label) input[type="radio"]:checked {
  background: var(--pixel-mint);
  border-color: var(--pixel-forest);
  box-shadow: inset 0 0 0 4px var(--pixel-paper-light), inset 0 0 0 7px #267d70, 0 0 0 2px var(--pixel-mint);
}

.pixel-home { --pixel-scene-position: 54% center; --pixel-scene-x: 54%; }
.pixel-tutor { --pixel-scene-position: 42% center; --pixel-scene-x: 42%; }
.pixel-postcard { --pixel-scene-position: 52% center; --pixel-scene-x: 52%; }

.pixel-tutor .tutor-app,
.pixel-postcard .postcard-app {
  background: transparent;
}

.pixel-tutor .tutor-workspace,
.pixel-postcard .postcard-workspace {
  background-color: transparent;
}

.pixel-tutor :where(.section-heading > p:last-child, .dialogue-box p, .privacy-note, .candidate-workspace .section-heading > p:last-child, .empty-state),
.pixel-postcard :where(.editor-heading > p:last-child, .guide-dialogue strong, .fieldset-note, .download-note) {
  font-family: var(--pixel-body-font);
  font-size: 13px;
  line-height: 1.65;
}

/* Photo check-in: a two-pane quest confirmation screen. */
.pixel-checkin .checkin-app {
  background: rgba(11, 42, 34, .78);
  border-inline: 3px solid var(--pixel-shadow);
  box-shadow: 5px 0 0 rgba(53, 95, 80, .72), -5px 0 0 rgba(53, 95, 80, .72);
}

.pixel-checkin .capture-panel {
  background: rgba(255, 241, 200, .96);
  border-right: 3px solid var(--pixel-wood);
  box-shadow: inset -3px 0 0 #d2b377;
}

.pixel-checkin .judgment-workspace {
  background: rgba(7, 31, 24, .58);
}

.pixel-checkin :where(.file-field, .checkin-status, .authority-badge, .override-field, .resolution-note) {
  border: 2px solid var(--pixel-line);
  box-shadow: 2px 3px 0 rgba(89, 67, 39, .44);
}

.pixel-checkin .file-field {
  border-style: dashed;
}

.pixel-checkin .file-field input::file-selector-button {
  padding: 8px 10px;
  color: var(--pixel-paper);
  background: #28634d;
  border: 3px solid var(--pixel-shadow);
  font-family: var(--pixel-font);
  box-shadow: 3px 3px 0 var(--pixel-shadow);
}

.pixel-checkin .judgment-heading {
  border-bottom: 4px solid var(--pixel-wood);
}

.pixel-checkin .judgment-grid {
  margin-top: 16px;
  border: 3px solid var(--pixel-line);
  box-shadow: 3px 4px 0 rgba(7, 27, 21, .58);
}

.pixel-checkin .judgment-grid > div {
  background: rgba(255, 249, 229, .94);
  border-color: #8c6c44;
  border-width: 0 2px 2px 0;
}

.pixel-checkin .judgment-grid > div:nth-child(2n) {
  border-right: 0;
}

.pixel-checkin .judgment-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pixel-checkin :where(.primary-command, .confirm-command, .secondary-command, .icon-command, .icon-text-command) {
  border: 3px solid var(--pixel-shadow);
}

.pixel-checkin .progression-panel {
  padding: 18px;
  border: 3px solid var(--pixel-line);
  background: rgba(255, 241, 200, .95);
  box-shadow: 3px 4px 0 rgba(7, 27, 21, .52);
}

.pixel-checkin .progression-phase {
  background: rgba(255, 249, 229, .92);
  border: 2px solid var(--pixel-border-soft);
  border-left: 5px solid var(--pixel-leaf);
}

/* Reminders: the care-routine menu uses the same frame language as the greenhouse. */
.pixel-reminders .reminder-app {
  border-inline: 3px solid var(--pixel-shadow);
  box-shadow: 5px 0 0 rgba(53, 95, 80, .72), -5px 0 0 rgba(53, 95, 80, .72);
}

.pixel-reminders .settings-panel {
  background: rgba(255, 241, 200, .96);
  border-right: 3px solid var(--pixel-wood);
}

.pixel-reminders .recovery-panel {
  background: var(--pixel-paper);
}

.pixel-reminders :where(.setting-row, .setting-group, .number-setting, .active-reminder, .draft-panel, .history-section) {
  border: 2px solid var(--pixel-line);
  box-shadow: 2px 3px 0 rgba(89, 67, 39, .34);
}

.pixel-reminders .switch > span {
  border: 3px solid var(--pixel-shadow);
  box-shadow: inset 0 -4px 0 #74857a;
}

.pixel-reminders .switch > span::after {
  top: 2px;
  left: 2px;
  border: 2px solid var(--pixel-shadow);
  transition: transform 80ms steps(1, end);
}

.pixel-reminders .segmented-control span {
  border: 3px solid var(--pixel-line);
}

.pixel-reminders :where(.button, .icon-command, .pace-state) {
  border: 3px solid var(--pixel-shadow);
}

.pixel-reminders .terrarium-strip {
  border: 5px solid var(--pixel-shadow);
  box-shadow: 5px 5px 0 var(--pixel-wood);
}

.pixel-reminders .active-reminder {
  background: var(--pixel-paper-light);
}

.pixel-reminders .minimum-task {
  border: 3px solid var(--pixel-line);
  border-left: 8px solid var(--pixel-leaf);
}

.pixel-reminders .countdown {
  border: 4px solid var(--pixel-shadow);
  box-shadow: inset 0 -5px 0 #0c251e, 4px 4px 0 var(--pixel-wood);
}

.pixel-reminders .history-heading {
  border-bottom: 3px solid var(--pixel-line);
}

.pixel-reminders .history-list li {
  border: 2px solid var(--pixel-line);
  border-left: 5px solid var(--pixel-leaf);
}

/* Share builder: fieldsets become compact RPG inventory groups. */
.pixel-share-builder {
  background: var(--pixel-forest-deep);
}

.pixel-share-builder .share-layout {
  background: rgba(255, 241, 200, .94);
  border-inline: 3px solid var(--pixel-shadow);
  box-shadow: 5px 0 0 rgba(53, 95, 80, .62), -5px 0 0 rgba(53, 95, 80, .62);
}

.pixel-share-builder .builder {
  background: rgba(255, 241, 200, .96);
}

.pixel-share-builder .preview {
  background: var(--pixel-paper);
  border-left: 4px solid var(--pixel-wood);
}

.pixel-share-builder fieldset {
  padding: 16px;
  border: 2px solid var(--pixel-line);
  background: rgba(255, 249, 229, .9);
  box-shadow: none;
}

.pixel-share-builder legend {
  padding: 4px 8px;
  color: var(--pixel-paper);
  background: var(--pixel-forest);
  border: 3px solid var(--pixel-shadow);
}

.pixel-share-builder .segmented {
  border: 3px solid var(--pixel-line);
}

.pixel-share-builder .segmented button {
  border-right: 3px solid var(--pixel-line);
  box-shadow: none;
}

.pixel-share-builder .segmented button:hover,
.pixel-share-builder .segmented button:active {
  transform: none;
  box-shadow: none;
}

.pixel-share-builder .swatches button {
  border: 3px solid var(--pixel-line);
}

.pixel-share-builder .swatches i {
  border: 3px solid var(--pixel-shadow);
}

.pixel-share-builder .primary {
  border: 4px solid var(--pixel-shadow);
  box-shadow: 5px 5px 0 var(--pixel-shadow);
}

.pixel-share-builder .preview section {
  padding: 16px;
  border: 2px solid var(--pixel-line);
  background: rgba(255, 249, 229, .92);
  box-shadow: none;
}

.pixel-share-builder #share-preview-fields li,
.pixel-share-builder dd {
  border: 2px solid var(--pixel-line);
  border-left: 4px solid var(--pixel-mint);
  background: var(--pixel-paper-light);
}

.pixel-share-builder .actions button {
  border: 3px solid var(--pixel-line);
}

/* Read-only showcase: retain the scene layout while removing modern framing. */
.pixel-public-showcase .public-showcase {
  background: #234a3d;
}

.pixel-public-showcase .showcase-header,
.pixel-public-showcase .showcase-greenhouse,
.pixel-public-showcase .postcard-frame {
  border-width: 4px;
  box-shadow: 5px 5px 0 #081b16;
}

.pixel-public-showcase .greenhouse-scene {
  box-shadow: inset 0 -5px 0 #102c25;
}

.pixel-public-showcase .greenhouse-zone {
  box-shadow: inset -4px -4px 0 rgba(102, 66, 45, .36);
}

.pixel-public-showcase .greenhouse-growth-stage {
  border: 3px solid var(--pixel-gold);
  box-shadow: 3px 3px 0 var(--pixel-shadow);
}

.pixel-public-showcase .showcase-summary {
  border: 3px solid var(--pixel-wood);
  border-left: 5px solid var(--pixel-coral);
  box-shadow: 3px 4px 0 var(--pixel-shadow);
}

.pixel-public-showcase .summary-row {
  border-bottom: 3px solid #c8a86d;
}

/* Art QA pages are developer tools, but use the same game shell. */
.pixel-art-tools .art-page {
  background: #234a3d;
  border-inline: 4px solid var(--pixel-shadow);
}

.pixel-art-tools .art-band {
  border: 3px solid var(--pixel-shadow);
  box-shadow: 4px 4px 0 var(--pixel-wood);
}

.pixel-art-tools :where(.palette, .asset-card) {
  border: 2px solid var(--pixel-line);
  box-shadow: 2px 3px 0 rgba(89, 67, 39, .34);
}

.pixel-art-tools .reference-grid img {
  border: 4px solid var(--pixel-line);
  box-shadow: 4px 4px 0 var(--pixel-shadow);
}

.pixel-five-second .test-panel {
  border: 6px solid var(--pixel-shadow);
  box-shadow: 8px 8px 0 var(--pixel-wood);
}

.pixel-five-second #start-panel,
.pixel-five-second .concept-form {
  padding: 20px;
  border: 4px solid var(--pixel-line);
  background: #fff8d8;
  box-shadow: inset 0 0 0 4px #e8d394;
}

.pixel-five-second .concept-options label {
  border: 3px solid var(--pixel-line);
  box-shadow: 3px 3px 0 var(--pixel-paper-shadow);
}

.pixel-five-second :where(.primary-command, #export-results) {
  border: 4px solid var(--pixel-shadow);
}

@media (max-width: 800px) {
  .pixel-share-builder .preview {
    border-top: 4px solid var(--pixel-wood);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .pixel-page {
    --pixel-scene-current-x: var(--pixel-scene-x-mobile);
    --pixel-scene-current-y: var(--pixel-scene-y-mobile);
    background-position: var(--pixel-scene-position-mobile);
    background-attachment: scroll;
    font-size: 13px;
  }

  .pixel-page :where(.checkin-header, .app-header, .tutor-header, .postcard-header, .topbar, .showcase-header, .art-header, .challenge-header) {
    min-height: 58px;
  }

  .pixel-checkin .capture-panel,
  .pixel-reminders .settings-panel {
    border-right: 0;
    border-bottom: 3px solid var(--pixel-wood);
  }

  .pixel-public-showcase .showcase-summary {
    border: 3px solid var(--pixel-wood);
    border-top: 5px solid var(--pixel-coral);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-page *,
  .pixel-page *::before,
  .pixel-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .pixel-scene-ambient {
    display: none !important;
  }

  .pixel-page.pixel-scene-effects-active {
    background-position: var(--pixel-scene-position) !important;
  }
}
