:root {
  --xp-blue: #1674d1;
  --xp-blue-light: #3c9aff;
  --xp-frame: #d8e8f7;
  scrollbar-color: var(--xp-blue) var(--xp-frame);
  scrollbar-width: auto;
}

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  border: 1px solid #9bb8d2;
  background: linear-gradient(90deg, #c4d9ec, #edf5fc 45%, #c4d9ec);
}

::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 1px solid #0755ae;
  border-radius: 3px;
  background: linear-gradient(90deg, #80b9ed, #2d86da 45%, #1674d1);
  box-shadow: inset 1px 1px #d5ebff, inset -1px -1px #0a5baa;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #a0cef5, #3c9aff 45%, #2478c9);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(90deg, #4c96d9, #1267b8 45%, #0755ae);
}

::-webkit-scrollbar-corner {
  background: var(--xp-frame);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 2rem 1rem;
  background: linear-gradient(#4ba4e8 0 48%, #78b64a 48% 100%);
  color: #111;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px;
}

.window {
  width: min(100%, 52rem);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #06458d;
  border-radius: 8px 8px 0 0;
  background: var(--xp-frame);
  box-shadow: 2px 3px 8px #173c5c88;
}

.title-bar {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 3px 5px 3px 10px;
  background: linear-gradient(180deg, var(--xp-blue-light), var(--xp-blue) 55%, #0755ae);
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px #174d8a;
}

.window-controls {
  display: flex;
  gap: 3px;
}

.window-controls span {
  display: grid;
  width: 21px;
  height: 20px;
  place-items: center;
  border: 1px solid #fff9;
  border-radius: 3px;
  background: linear-gradient(#80b9ed, #1763b4);
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
}

.window-controls .close {
  background: linear-gradient(#f28b7c, #c52c18);
  font-size: 17px;
}

.window-content {
  padding: 1rem;
}

h1,
h2 {
  margin-top: 0.25rem;
  color: #174d83;
}

nav {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

a {
  color: #0645ad;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

section {
  min-width: 0;
  margin: 0;
}

.image-window {
  width: 100%;
  margin: 0;
  border-color: #6f8da9;
  border-radius: 5px 5px 0 0;
  background: #f4f7fa;
  box-shadow: 2px 2px 4px #173c5c55;
}

.image-window .title-bar {
  min-height: 25px;
  padding-left: 8px;
  font-size: 12px;
}

.image-window .window-controls span {
  width: 17px;
  height: 16px;
}

.survey-window {
  box-sizing: border-box;
  width: 100%;
  margin: 1.5rem 0;
  border-color: #6f8da9;
  border-radius: 5px 5px 0 0;
  background: #f4f7fa;
  box-shadow: 2px 2px 4px #173c5c55;
}

.survey-window .title-bar {
  min-height: 25px;
  padding-left: 8px;
  font-size: 12px;
}

.survey-window .window-controls span {
  width: 17px;
  height: 16px;
}

.survey-content {
  padding: 1rem;
}

.survey-content p:first-child {
  margin-top: 0;
}

.survey-content fieldset {
  margin: 0;
  padding: 0.75rem;
}

.survey-options {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.survey-options label,
.survey-comment-label {
  cursor: pointer;
}

.survey-comment-label {
  display: block;
  margin-top: 1rem;
}

.survey-content textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
  padding: 0.5rem;
  resize: vertical;
  font: inherit;
}

.survey-content .survey-note {
  margin-bottom: 0;
  color: #45576a;
  font-size: 12px;
}

.image-content {
  padding: 8px;
}

.image-content img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #888;
  background: white;
}

figcaption {
  padding-top: 6px;
  font-size: 12px;
}

@media (max-width: 480px) {
  body {
    padding: 1rem 0.5rem;
  }

  .window-content {
    padding: 0.75rem;
  }
}

@media (max-width: 640px) {
  .story-row {
    grid-template-columns: 1fr;
  }
}

.bloom-page {
  background:
    radial-gradient(ellipse at 50% 45%, #233034 0, #11191d 45%, #080b0d 100%);
  color: #d5d1c7;
  font-family: Georgia, "Times New Roman", serif;
}

.bloom-window {
  border-color: #263d42;
  background: #c9cec4;
  box-shadow: 5px 7px 18px #000b;
  animation: window-tremble 5.7s ease-in-out infinite;
}

.bloom-window > .title-bar {
  background: linear-gradient(180deg, #537a78, #294745 55%, #1a302f);
  filter: saturate(0.7);
}

.bloom-window .window-content {
  min-height: 70vh;
  padding: clamp(1.25rem, 5vw, 3.5rem);
  overflow: hidden;
  background: linear-gradient(125deg, #c9cec4, #afb8ae 52%, #d5d3c5);
}

.bloom-title {
  width: fit-content;
  margin: 0 0 2.5rem;
  color: #293a35;
  font-family: "Courier New", monospace;
  font-size: clamp(3.5rem, 15vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.12em;
  line-height: 0.9;
  transform: rotate(-4deg);
  animation: title-waver 7s ease-in-out infinite;
}

.bloom-line {
  width: fit-content;
  max-width: 100%;
  margin: 1.6rem 0;
  color: #26312e;
  line-height: 1.3;
  transform-origin: center;
  animation: line-tremble 4s steps(2, end) infinite;
}

.bloom-line span {
  display: inline-block;
}

.bloom-line span:nth-child(2n) {
  font-family: "Courier New", monospace;
  font-size: 0.88em;
  font-style: italic;
}

.bloom-line span:nth-child(3n) {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12em;
  font-weight: bold;
  letter-spacing: -0.04em;
}

.line-one {
  font-family: "Courier New", monospace;
  font-size: 1.05rem;
  transform: rotate(1deg);
}

.line-two {
  max-width: 32rem;
  color: #3c292d;
  font-family: Georgia, serif;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  line-height: 1.05;
  transform: rotate(-1.5deg);
}

.line-three {
  margin-left: 12%;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  transform: rotate(2deg);
}

.line-four {
  margin-left: 4%;
  font-family: "Times New Roman", serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-style: italic;
  transform: rotate(-0.5deg);
}

.line-five {
  margin-left: 23%;
  font-family: Verdana, sans-serif;
  font-size: 0.95rem;
  transform: rotate(1.2deg);
}

.line-six {
  margin-left: 8%;
  color: #692f37;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  letter-spacing: 0.04em;
  transform: rotate(-2deg);
}

.line-seven {
  margin-left: 32%;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  transform: rotate(1.7deg);
}

.line-eight {
  max-width: 28rem;
  margin: 2.5rem 0 0 16%;
  color: #3d2731;
  font-family: cursive;
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  line-height: 1.05;
  transform: rotate(-1deg);
}

.line-two,
.line-five,
.line-eight {
  animation-delay: -1.3s;
}

.line-three,
.line-six {
  animation-delay: -2.6s;
}

.bloom-line.final {
  position: relative;
  width: auto;
  max-width: 38rem;
  margin: 5rem auto 1rem;
  padding: 2.5rem 1.5rem 1.5rem;
  border-top: 1px solid #617a70;
  border-bottom: 1px solid #617a70;
  background: #18201e;
  color: #d2dfd5;
  font-family: "Courier New", monospace;
  font-size: clamp(0.8rem, 2vw, 1rem);
  font-style: normal;
  letter-spacing: 0.04em;
  line-height: 1.9;
  text-align: left;
  text-transform: uppercase;
  transform: none;
  animation: none;
}

.bloom-line.final::before {
  position: absolute;
  top: 0.6rem;
  left: 1.5rem;
  color: #9bb8a2;
  content: "FINAL TRANSMISSION // END OF FILE";
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}

@keyframes window-tremble {
  0%, 91%, 100% { transform: translate(0, 0); }
  92% { transform: translate(1px, -1px); }
  94% { transform: translate(-1px, 1px); }
  96% { transform: translate(1px, 0); }
}

@keyframes title-waver {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(2px); }
}

@keyframes line-tremble {
  0%, 88%, 100% { translate: 0 0; }
  90% { translate: 1px 0; }
  92% { translate: -1px 1px; }
  94% { translate: 0 -1px; }
}

@media (prefers-reduced-motion: reduce) {
  .bloom-window,
  .bloom-title,
  .bloom-line {
    animation: none;
  }
}
