/* ===========================================================
   Rainbow Dash · Thread Vault ("The Cloud Vault")
   Cloudsdale's weather bureau files every storm: each /mlp/
   Rainbow Dash thread is a cloud card, and the year filter is
   an altitude gauge — 2012 at ground level, newest up in the
   stratosphere. Pairs with style.css (sky Neocities look).
   =========================================================== */

.cv {
  position: relative;
  padding: 14px 14px 22px;
  border: 2px solid #74b6ec;
  border-radius: 10px;
  background:
    radial-gradient(140% 90% at 50% -30%, rgba(255, 255, 255, .85), transparent 60%),
    linear-gradient(180deg, #e3f4ff, #c9e7ff);
  box-shadow: 0 4px 14px var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .7);
}

/* ===========================================================
   BANNER — the vault sign hanging under a cloud layer
   =========================================================== */
.cv-banner {
  position: relative;
  height: 150px;
  margin-bottom: 14px;
  border: 2px solid #5aa7e8;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #bfe6ff, #8fcbf7 70%, #dff3ff);
}

.cv-banner .cv-puff {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: .95;
  box-shadow:
    40px 6px 0 -6px #fff, 80px 12px 0 -10px #fff,
    -36px 8px 0 -8px #fff, 20px 20px 0 -4px #fff;
}
.cv-puff--a { width: 64px; height: 64px; left: 6%; top: 30%; animation: cv-drift 32s ease-in-out infinite alternate; }
.cv-puff--b { width: 46px; height: 46px; left: 70%; top: 14%; opacity: .85; animation: cv-drift 40s ease-in-out infinite alternate-reverse; }
.cv-puff--c { width: 56px; height: 56px; left: 84%; top: 56%; opacity: .9; animation: cv-drift 36s ease-in-out infinite alternate; }
@keyframes cv-drift { from { transform: translateX(0); } to { transform: translateX(24px); } }

.cv-banner__rainbow {
  position: absolute;
  left: -60px;
  bottom: -170px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 120px,
    #ff5b6e 120px 128px, #ff9f45 128px 136px, #ffd84d 136px 144px,
    #5fcf74 144px 152px, #3fd0e6 152px 160px, #9b6bff 160px 168px, transparent 169px);
  transform: rotate(6deg);
  opacity: .9;
}

.cv-banner__sign {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) rotate(-1.4deg);
  padding: 10px 26px 12px;
  text-align: center;
  background: linear-gradient(#ffffff, #e8f5ff);
  border: 3px solid #4d8bdc;
  border-radius: 12px;
  box-shadow: 0 6px 0 #3f79c4, 0 12px 22px rgba(20, 70, 140, .35);
}
.cv-banner__sign::before,
.cv-banner__sign::after {
  content: "";
  position: absolute;
  top: -26px;
  width: 3px;
  height: 26px;
  background: #4d8bdc;
}
.cv-banner__sign::before { left: 22%; }
.cv-banner__sign::after { right: 22%; }
.cv-banner__sign h2 {
  font-family: "Gochi Hand", cursive;
  font-size: 34px;
  line-height: 1;
  color: var(--deep);
  letter-spacing: 1px;
}
.cv-banner__sign h2 b {
  background: linear-gradient(90deg, #ff5b6e, #ff9f45, #ffd84d, #5fcf74, #3fd0e6, #4f8df0, #9b6bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cv-banner__sign p { font-size: 12px; color: #3a5bb0; letter-spacing: .4px; margin-top: 2px; }
.cv-banner__dash {
  position: absolute;
  right: 8%;
  top: 18%;
  width: 92px;
  filter: drop-shadow(0 4px 8px rgba(20, 70, 140, .3));
}

/* ===========================================================
   WEATHER-STATION STATS
   =========================================================== */
.cv-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}
.cv-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  background: #fff;
  border: 2px solid #8cc6f4;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px #eaf6ff, 0 2px 6px rgba(40, 110, 190, .15);
}
.cv-stat__dial {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: radial-gradient(circle at 35% 30%, #fff, #cfe9ff 75%);
  border: 2px solid #58aeee;
  color: #1d69c7;
}
.cv-stat b { display: block; font-size: 16px; line-height: 1.05; color: var(--deep); }
.cv-stat span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: #3a5bb0; }

/* ===========================================================
   WEATHER CONSOLE — search / sort / reset
   =========================================================== */
.cv-console {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 9px 11px;
  background: linear-gradient(#f4fbff, #dbeeff);
  border: 2px solid #74b6ec;
  border-radius: 10px;
}
.cv-console input[type="search"] {
  flex: 1 1 200px;
  padding: 7px 12px;
  border: 2px solid #58aeee;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}
.cv-console select,
.cv-console button {
  padding: 7px 12px;
  border: 2px solid #58aeee;
  border-radius: 999px;
  background: linear-gradient(#ffffff, #dbeeff);
  color: var(--deep);
  font-weight: 700;
}
.cv-console select:hover,
.cv-console button:hover { border-color: var(--pink); color: var(--pink); }
.cv-console .cv-count {
  margin-left: auto;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: #1d69c7;
  background: #fff;
  border: 2px dashed #8cc6f4;
  border-radius: 8px;
  padding: 7px 10px;
  white-space: nowrap;
}

/* ===========================================================
   THE VAULT — altitude gauge + cloud grid
   =========================================================== */
.cv-vault {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* the altitude gauge year rail */
.cv-gauge {
  position: sticky;
  top: 10px;
  border: 2px solid #74b6ec;
  border-radius: 12px;
  padding: 12px 6px;
  background: linear-gradient(180deg, #f2e8ff 0%, #cfe9ff 30%, #9fd3f8 75%, #cdeccb 96%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 560px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}
.cv-gauge::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34px;
  bottom: 34px;
  width: 6px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: linear-gradient(180deg, #ff5b6e, #ff9f45, #ffd84d, #5fcf74, #3fd0e6, #4f8df0, #9b6bff);
  opacity: .8;
}
.cv-gauge__cap {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #3a5bb0;
  text-align: center;
}
.cv-gauge button {
  position: relative;
  z-index: 1;
  font-family: "Gochi Hand", cursive;
  font-size: 15px;
  line-height: 1;
  color: #1d69c7;
  background: transparent;
  border: 2px solid transparent;
  padding: 2px 7px;
  border-radius: 999px;
}
.cv-gauge button:hover { background: rgba(255, 255, 255, .9); color: var(--pink); }
.cv-gauge button.is-year {
  background: #fff;
  border-color: #ffb01f;
  color: var(--deep);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(40, 110, 190, .25);
}
.cv-gauge button.is-year::after {
  content: "";
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 22px;
  background: url("RDsprites/fly_rainbow_right.gif") center/contain no-repeat;
}

/* cloud cards */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px 14px;
  align-content: start;
}
.cv-cloud {
  position: relative;
  display: block;
  background: #fff;
  border: 2px solid #a5d3f6;
  border-radius: 26px;
  padding: 11px 11px 12px;
  box-shadow: 0 3px 0 #d5ecff, 0 7px 16px rgba(40, 110, 190, .18);
  transition: transform .16s ease, box-shadow .16s ease;
  text-decoration: none;
  color: inherit;
}
.cv-cloud::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 22px;
  width: 34px;
  height: 20px;
  background: #fff;
  border: 2px solid #a5d3f6;
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}
.cv-cloud::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 64px;
  width: 24px;
  height: 14px;
  background: #fff;
  border: 2px solid #a5d3f6;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
}
.cv-cloud:hover,
.cv-cloud:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 3px 0 #d5ecff, 0 14px 22px rgba(40, 110, 190, .26),
    0 26px 0 -14px #ff5b6e, 0 30px 0 -14px #ffd84d, 0 34px 0 -14px #3fd0e6;
}
.cv-cloud__pic {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid #cfe9ff;
  background: #eaf6ff;
}
.cv-cloud__pic--missing {
  object-fit: contain;
  padding: 34px 0;
  opacity: .8;
}
.cv-cloud__title {
  font-family: "Gochi Hand", cursive;
  font-size: 19px;
  line-height: 1.1;
  color: var(--deep);
  margin: 8px 2px 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cv-cloud__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  font-size: 11.5px;
  color: #3a5bb0;
}
.cv-cloud__meta .cv-drop {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e5f4ff;
  border: 1.5px solid #8cc6f4;
  font-weight: 700;
  color: #1d69c7;
  white-space: nowrap;
}
/* threads that hit the /mlp/ bump limit wear a little ribbon */
.cv-cloud__bump {
  position: absolute;
  top: 18px;
  left: -7px;
  z-index: 2;
  transform: rotate(-5deg);
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  letter-spacing: .5px;
  color: #7a3f00;
  background: linear-gradient(#ffe65b, #ffb01f);
  border: 2px solid #e89a00;
  border-radius: 4px 999px 999px 4px;
  padding: 3px 9px;
  box-shadow: 0 2px 5px rgba(140, 90, 0, .35);
}

.cv-cloud--newest { border-color: #ffb01f; }
.cv-cloud--newest::before,
.cv-cloud--newest::after { border-color: #ffb01f; }
.cv-cloud__flag {
  position: absolute;
  top: -9px;
  right: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 7.5px;
  letter-spacing: 1px;
  color: #7a3f00;
  background: linear-gradient(#ffe65b, #ffb01f);
  border: 2px solid #e89a00;
  border-radius: 999px;
  padding: 4px 9px;
  animation: cv-blink 1.6s steps(2) infinite;
}
@keyframes cv-blink { 50% { opacity: .55; } }

.cv-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  font-family: "Gochi Hand", cursive;
  font-size: 22px;
  color: #3a5bb0;
}

/* ===========================================================
   PAGINATION — winds
   =========================================================== */
.cv-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.cv-pages button {
  padding: 8px 16px;
  border: 2px solid #58aeee;
  border-radius: 999px;
  background: linear-gradient(#ffffff, #dbeeff);
  color: var(--deep);
  font-weight: 700;
}
.cv-pages button:hover:not(:disabled) { border-color: var(--pink); color: var(--pink); }
.cv-pages button:disabled { opacity: .45; cursor: default; }
.cv-pages .cv-status {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: #1d69c7;
}

@media (prefers-reduced-motion: reduce) {
  .cv-banner .cv-puff, .cv-cloud__flag { animation: none; }
  .cv-cloud, .cv-cloud:hover { transition: none; transform: none; }
}

@media (max-width: 900px) {
  .cv-stats { grid-template-columns: repeat(2, 1fr); }
  .cv-vault { grid-template-columns: 1fr; }
  .cv-gauge {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-height: 0;
    padding: 8px;
  }
  .cv-gauge::before { display: none; }
  .cv-gauge button.is-year::after { display: none; }
  .cv-banner__dash { display: none; }
  .cv-banner__sign h2 { font-size: 27px; }
}
