/* ==========================================================
   FRUTIGER AERO — "archive" layout
   Big rounded dark shell, glossy header, button-list sidebar,
   framed content panels, grass backdrop. Plain CSS, no JS,
   no remote assets. Edit the tokens in :root to re-theme.
   ========================================================== */

/* ---------- header font ---------- */
@font-face {
  font-family: "Continuum";
  src: url("https://chariotonline.neocities.org/miscresources/contb.otf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AlteHaasGrotesk";
  src: url("https://chariotonline.neocities.org/miscresources/AlteHaasGroteskRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* greens */
  --leaf: #6fd04a;
  --leaf-light: #b6f58a;
  --link: #A6D76C;
  --link-hover: #5CC08A;
  --grass-deep: #0f4a0a;

  /* blacks + glass */
  --shell: rgba(8, 12, 8, .80);
  --panel: rgba(0, 0, 0, .38);
  --rim: rgba(255, 255, 255, .26);
  --text: #EEF9F5;
  --text-soft: #5CBFA8;

  /* glossy dark bar (sidebar headings, title bar) */
  --bar: linear-gradient(180deg, #4d4d4d 0%, #2b2b2b 48%, #121212 50%, #262626 100%);
  /* glossy dark button */
  --btn: linear-gradient(180deg, #555 0%, #343434 48%, #1b1b1b 50%, #303030 100%);
  /* glossy green button */
  --btn-green: linear-gradient(180deg, #DDE68D 0%, #23A2B1 48%, #076E75 50%, #23A2B1 100%);

  --font-display: "Continuum", "Segoe UI", "Trebuchet MS", sans-serif;
  --font: "AlteHaasGrotesk", "Frutiger", "Frutiger Linotype", "Segoe UI", "Myriad Pro", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text);
  background: #1d5a10;
}

/* ---------- grass backdrop (pure CSS, softly blurred) ---------- */

body::before {
  content: "";
  position: fixed;
  inset: -30px;
  z-index: -1;
  background: url("https://chariotonline.neocities.org/miscresources/background.png") no-repeat center center / cover;
}

/* ---------- shell ---------- */

.shell {
  width: min(1020px, 100% - 2rem);
  margin: 1rem auto 1.5rem;
  background: var(--shell);
  border: 1px solid var(--rim);
  border-radius: 80px 80px 36px 36px;
  box-shadow: 0 0 0 5px rgba(255,255,255,.10), 0 20px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

/* ---------- header ---------- */

.masthead {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem 1rem 3.2rem;
  background: linear-gradient(180deg, #3a3a3a 0%, #181818 40%, #0b0b0b 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.masthead::before { /* curved gloss along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: none;
  border: none;
  box-shadow: none;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.masthead h1 {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .02em;
  color: #fff;
}

.masthead p {
  position: relative;
  margin: .1rem 0 0;
  font-size: .88rem;
  color: var(--text-soft);
}

/* ---------- body grid ---------- */

.layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: .8rem;
  padding: .8rem;
}

/* ---------- sidebar ---------- */

.sidebar { display: grid; gap: .6rem; align-content: start; }

.nav-group {
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--rim);
  border-radius: 8px;
}

.nav-group h2 {
  margin: 0 0 4px;
  padding: .15rem .4rem;
  font-family: "Continuum";
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  background: var(--bar);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.nav-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }

.nav-group a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .18rem .45rem;
  color: #fff;
  font-size: .86rem;
  text-decoration: none;
  background: var(--btn);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  transition: filter .15s;
}

.nav-group a:hover { filter: brightness(1.35); }

.nav-group a[aria-current="page"] {
  color: #eaffd9;
  background: var(--btn-green);
  border-color: rgba(220,255,190,.6);
  text-shadow: 0 -1px 0 rgba(10,70,5,.7);
}

.ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: .82rem;
  line-height: 1;
}

.side-btn {
  display: block;
  width: 100%;
  padding: .3rem .7rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(10,70,5,.7);
  background: var(--btn-green);
  border: 1px solid rgba(220,255,190,.7);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 8px rgba(0,0,0,.4);
  cursor: pointer;
  text-decoration: none;
}
.side-btn:hover { filter: brightness(1.08); }

/* ---------- main column ---------- */

.content { display: grid; gap: .7rem; align-content: start; min-width: 0; }

.titlebar {
  margin: 0;
  padding: .2rem .8rem;
  font-family: "Continuum";
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
  color: #fff;
  background: var(--bar);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.frame {
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--rim);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}

/* ---------- banner ---------- */

.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.6);
  background: none;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  object-fit: contain;
}

.banner__text {
  position: relative;
  padding: 1rem 0 0 1.8rem;
  color: #0c1a08;
  text-shadow: 0 0 14px rgba(255,255,255,.85), 0 0 4px rgba(255,255,255,.7);
}

.banner__text p { margin: 0; font-size: 1.02rem; font-weight: 600; }

.banner__text h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.03em;
}

.banner__text .tag { margin-top: .35rem; font-style: italic; }

.mascot { /* swap for an <img> of your own */
  position: absolute;
  right: 4%;
  bottom: 18%;
  width: clamp(90px, 19%, 165px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.95) 0 22%, transparent 52%),
    linear-gradient(180deg, #c9ffa6, #3da726);
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: inset 0 -16px 26px rgba(10,80,5,.5), 0 14px 26px rgba(0,0,0,.5);
}

/* wooden shelf of pinned photos */
.shelf {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  gap: 1rem;
  padding: .9rem 1rem .6rem;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.07) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #b98d5e, #7d5632);
  border-top: 2px solid #d3ac80;
  box-shadow: 0 -6px 14px rgba(0,0,0,.35);
}

.photo {
  --r: -3deg;
  position: relative;
  flex: none;
  width: 68px;
  height: 48px;
  transform: rotate(var(--r)) translateY(-18px);
  border: 3px solid #fff;
  border-bottom-width: 5px;
  box-shadow: 0 5px 10px rgba(0,0,0,.45);
}

.photo::after { /* pin */
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  width: 9px; height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #c01818);
  box-shadow: 0 2px 3px rgba(0,0,0,.5);
}

.photo:nth-child(1) { --r: -4deg; background: linear-gradient(135deg, #3fa6f0, #bfe9ff); }
.photo:nth-child(2) { --r:  3deg; background: radial-gradient(circle at 40% 40%, #d6f06a, #5c9c1c); }
.photo:nth-child(3) { --r: -2deg; background: linear-gradient(160deg, #e8935a, #8a2f1a); }
.photo:nth-child(4) { --r:  4deg; background: linear-gradient(160deg, #3f8a5a, #123d2a); }
.photo:nth-child(5) { --r: -3deg; background: linear-gradient(180deg, #7fd0ff, #e8f8ff 70%, #f4e2b8); }
.photo:nth-child(6) { --r:  2deg; background: radial-gradient(circle at 60% 40%, #ffb347, #5a2d0c); }

/* ---------- text panel ---------- */

.prose { padding: 0rem 1.1rem .9rem; }

.prose p { margin: 0 0 .7rem; }
.prose p:last-child { margin-bottom: 0; }

.prose h3 {
  margin: 1rem 0 .35rem;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--leaf-light);
}

.prose a { color: var(--link); text-decoration: none; }
.prose a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------- footer ---------- */

.foot {
  padding: .5rem 1rem .9rem;
  text-align: center;
  font-size: .8rem;
  color: var(--text-soft);
}

/* ---------- accessibility ---------- */

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(111,208,74,.8);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .shell { border-radius: 40px 40px 24px 24px; }
  .masthead { padding: .9rem 1.2rem; }
  .logo { width: 44px; height: 44px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .banner__text { padding-left: 1.2rem; }
  .shelf { overflow-x: auto; }
}

/* ---------- custom cursor ----------
   Put the downloaded files in a "cursors" folder next to this stylesheet.
   If a file is missing, the browser falls back to the normal cursor.

   .cur files carry their own hotspot. For .png files add the hotspot
   (x y in pixels) after the url, e.g. url("cursors/arrow.png") 0 0, auto;
   Keep images 32x32 or smaller; browsers cap cursors at 128x128 and may
   hide big ones near the edge of the window. */

html,
body {
  cursor: url("cursors/arrow.cur"), auto;
}

a,
button,
summary,
label,
[role="button"],
input[type="submit"],
.btn,
.side-btn,
.nav-group a {
  cursor: url("cursors/pointer.cur"), pointer;
}

/* keep the normal text cursor in form fields */
input[type="text"],
input[type="email"],
textarea {
  cursor: text;
}

/* ---------- custom cursors ----------
   Put your two PNGs in a "cursors" folder next to this file.
   Format: url(...) hotspot-x hotspot-y, fallback.
   If a file is missing, the browser just uses the fallback. */

html, body {
  cursor: url("https://chariotonline.neocities.org/miscresources/gencursor.png") 0 0, auto;
}

a, button, .btn, .side-btn, .nav-group a, .nav a, label, summary, [role="button"] {
  cursor: url("https://chariotonline.neocities.org/miscresources/gencursor.png") 0 0, pointer;
}

input[type="text"], input[type="email"], textarea {
  cursor: text;
}

/* ---------- buttons, blinkies, stamps ---------- */

.prose ul.badges {
  display: grid;
  gap: 8px;
  max-width: none;
  margin: 0 0 .4rem;
  padding: .7rem;
  list-style: none;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--rim);
  border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
}

.prose ul.badges li {
  min-width: 0;          /* lets columns shrink instead of overflowing */
  margin: 0;
  line-height: 0;
}

.prose ul.badges a   { display: block; }
.prose ul.badges img { display: block; border: 0; }
.prose ul.badges a:hover img { filter: brightness(1.18); }

/* buttons: neat 6-column grid, images fill their cells */
.prose ul.badges.badges--buttons {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-items: stretch;
  align-items: start;
  gap: 8px 6px;            /* row gap, column gap */
}

.prose ul.badges.badges--buttons li {
  min-width: 0;
  line-height: 0;
}

.prose ul.badges.badges--buttons img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 88 / 31;
}

@media (max-width: 860px) {
  .prose ul.badges.badges--buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .prose ul.badges.badges--buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.prose ul.badges--stamps {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  justify-items: center;
}
.prose ul.badges--stamps img  { width: 99px; height: 56px; }

/* blinkies: 5 equal columns that fill the container */
.prose ul.badges--blinkies {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: stretch;
  gap: 6px;
}
.prose ul.badges--blinkies img {
  width: 100%;
  height: auto;
}

@media (max-width: 860px) {
  .prose ul.badges--blinkies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .prose ul.badges--blinkies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* userboxes: 3 per row, incomplete last row is centered */
.prose ul.badges.badges--userboxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}

.prose ul.badges.badges--userboxes li {
  flex: 0 0 calc((100% - 16px) / 3);   /* 3 columns, 2 gaps of 8px */
  min-width: 0;
  line-height: 0;
}

.prose ul.badges.badges--userboxes img {
  width: 100% !important;
  height: auto !important;
}

@media (max-width: 860px) {
  .prose ul.badges.badges--userboxes li { flex-basis: calc((100% - 8px) / 2); }   /* 2 columns */
}
@media (max-width: 520px) {
  .prose ul.badges.badges--userboxes li { flex-basis: 100%; }                      /* 1 column */
}

/* ---------- favorites boxes ---------- */
/* folder tab */
.fav-tab {
  display: inline-block;
  font-family: "Continuum";
  position: relative;
  top: 1px;                     /* tab overlaps the box's top border */
  margin: 0 0 0 .8rem;
  padding: .25rem .8rem .2rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  background: rgba(20, 28, 20, .9);
  border: 1px solid var(--rim);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

/* box */
.fav-list {
  margin: 0;
  padding: .6rem .8rem .7rem;
  list-style: none;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--rim);
  border-radius: 8px;
}

/* neat list: marker sits in its own column, wrapped lines hang under the text */
.fav-list li {
  position: relative;
  padding-left: 1.5em;
  margin: 0;
  line-height: 1.35;
  color: rgba(233, 240, 229, .62);
}
.fav-list li + li { margin-top: .2rem; }

.fav-list li::before {
  content: "–";
  position: absolute;
  left: .15em;
  color: rgba(233, 240, 229, .4);
}

/* starred favorites */
.fav-list li.top {
  color: var(--text);
  font-size: 1.05em;
}
.fav-list li.top::before {
  content: "☆";
  left: 0;
  color: var(--text);
}

/* small breathing space between starred and regular items */
.fav-list li.top + li:not(.top) { margin-top: .5rem; }

/* green accent + highlighter */
.fav-list li.accent,
.fav-list li.accent::before { color: var(--leaf-light); }

.fav-list mark {
  padding: 0 .3em;
  color: #0c1a08;
  background: var(--leaf-light);
  border-radius: 3px;
}

.prose .favs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: .5rem;
  align-items: start;      /* each box keeps its own height */
  max-width: none;
}

.fav-box { margin: 0; }

@media (max-width: 860px) { .prose .favs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .prose .favs { grid-template-columns: 1fr; } }

.prose .divider {
  display: block;
  max-width: 100%;      /* never wider than the panel */
  height: auto;
  margin: .8rem auto;   /* centered, with space above and below */
  border: 0;
}

.prose .divider-row {
  display: flex;
  flex-wrap: wrap;           /* drops to a second line only if they don't fit */
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: .8rem 0;
}

.prose .divider-row .divider {
  flex: 0 1 auto;
  margin: 0;
  max-width: 100%;
  height: auto;
}

/* ---------- fanfic library ---------- */

.rating { font-weight: 700; }
.rating::before { content: "●"; margin-right: .3em; font-size: .8em; }
.r-g { color: #7ee45a; }
.r-t { color: #ffe066; }
.r-m { color: #ffa94d; }
.r-e { color: #ff6b6b; }
.r-n { color: #b8c2bd; }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
  margin: 0 0 .6rem;
  padding: .55rem .8rem;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--rim);
  border-radius: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
  font-size: .88rem;
}

.lib-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose .lib-jump a {
  display: block;
  padding: .15rem .8rem;
  color: #fff;
  font-size: .85rem;
  text-decoration: none;
  background: var(--btn);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.prose .lib-jump a:hover { filter: brightness(1.35); text-decoration: none; }

.fic-group { scroll-margin-top: .8rem; padding-top: .7rem; }

.fic-list {
  display: grid;
  gap: .6rem;
  padding: .7rem;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--rim);
  border-radius: 8px;
}

.fic {
  padding: .6rem .8rem .7rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
}

.fic__title { margin: 0 0 .2rem; font-size: 1.05rem; font-weight: 500; }
.prose .fic__title a { color: #DDE68D }
.prose .fic__title a:hover { color: #5CC08A }

.fic__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
  margin: 0 0 .4rem;
  font-size: .82rem;
  color: var(--text-soft);
}

.ship {
  display: inline-block;
  margin: 0 .3rem .25rem 0;
  padding: .05rem .6rem;
  color: #0c1a08;
  background: var(--leaf-light);
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.5;
}
.ship--gen { background: #DDE68D; }

.prose .fic__blurb {
  margin: .35rem 0 0;
  line-height: 1.45;
  color: var(--text);
}

/* ---------- character sub-sections ---------- */

.char-group + .char-group { margin-top: .5rem; }

.char-tab {
  margin: 0 0 .45rem;
  padding: .15rem .7rem;
  font-family: "Continuum";
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--bar);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* indented, with a green guide line to show it belongs to the character */
.char-list {
  display: grid;
  gap: .5rem;
  margin-left: .3rem;
  padding-left: .7rem;
  border-left: 2px solid rgba(182, 245, 138, .35);
}

.prose .char-tab { margin-bottom: -.2rem; }
.prose .char-tab + .char-list { margin-top: 0; padding-top: 0; }

.sticker-board {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 14px 6px;
  min-height: 90px;
}

.sticker-board img.sticker {
  max-width: 40px;
  max-height: 40px;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.25));
  transition: transform 0.15s ease;
}

/* cycles through 10 preset angles based on position, so each new sticker you add looks randomly tilted without needing to set anything by hand */
.sticker-board img.sticker:nth-child(10n+1) { transform: rotate(-11deg); }
.sticker-board img.sticker:nth-child(10n+2) { transform: rotate(7deg); }
.sticker-board img.sticker:nth-child(10n+3) { transform: rotate(-4deg); }
.sticker-board img.sticker:nth-child(10n+4) { transform: rotate(13deg); }
.sticker-board img.sticker:nth-child(10n+5) { transform: rotate(-14deg); }
.sticker-board img.sticker:nth-child(10n+6) { transform: rotate(3deg); }
.sticker-board img.sticker:nth-child(10n+7) { transform: rotate(-8deg); }
.sticker-board img.sticker:nth-child(10n+8) { transform: rotate(10deg); }
.sticker-board img.sticker:nth-child(10n+9) { transform: rotate(-2deg); }
.sticker-board img.sticker:nth-child(10n+10) { transform: rotate(15deg); }

/* ---------- back to top button ---------- */

.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 50;
  padding: .45rem .95rem;
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(10, 70, 5, .7);
  background: var(--btn-green);
  border: 1px solid rgba(220, 255, 190, .7);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 3px 10px rgba(0, 0, 0, .5);

  /* hidden until the page is scrolled */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { filter: brightness(1.1); }

/* ---------- pride flag pairing tags ---------- */

:root {
  --flag-rainbow:  linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #004dff, #750787);
  --flag-trans:    linear-gradient(90deg, #5bcefa, #f5a9b8, #ffffff, #f5a9b8, #5bcefa);
  --flag-nb:       linear-gradient(90deg, #9CABA5);
  --flag-straight: linear-gradient(90deg, #f48fb1, #64b5f6);
}

.ship[class*="ship--"]:not(.ship--gen) {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 0 3px rgba(0,0,0,.95), 0 1px 2px rgba(0,0,0,.95), 0 0 6px rgba(0,0,0,.5);
  border: 1px solid rgba(0,0,0,.35);

  background-origin: border-box;   /* gradient spans the whole tag, border included */
  background-repeat: no-repeat;    /* never tile the gradient */
}

.ship.ship--gay      { background: var(--flag-rainbow); }
.ship.ship--trans    { background: var(--flag-trans); }
.ship.ship--nb    { background: var(--flag-nb); }
.ship.ship--straight { background: var(--flag-straight); }

/* two flags in one tag: left half and right half */
.ship.ship--trans-gay {
  background:
    var(--flag-trans)   left  / 50% 100% no-repeat,
    var(--flag-rainbow) right / 50% 100% no-repeat;
}

/* ---------- full-width actor sections ---------- */

.frame.frame--wide {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.frame--wide > .prose { padding: 0; }

.frame--wide .fic-group { padding-top: 0; }

.frame--wide .fav-tab { margin-left: 1rem; }   /* keeps the tab off the rounded corner */

/* optional: give the cards more room inside the box */
.frame--wide .fic-list { padding: .5rem; }
.frame--wide .char-list { margin-left: 0; padding-left: .6rem; }

/* ---------- full-width library (spans under the sidebar) ---------- */

.library-wide {
  grid-column: 1 / -1;     /* stretch across both grid columns */
  display: grid;
  gap: .7rem;
  min-width: 0;
}

button, input, textarea, select { font-family: inherit; }

/* collapsible graphics collection */
.gfx-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .5rem;
  padding: .15rem .7rem;
  font-family: "Continuum";
  font-size: 1.3rem;
  color: #fff;
  background: var(--bar);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.gfx-head::-webkit-details-marker { display: none; }
.gfx-head::before { content: "▶"; font-size: .65em; transition: transform .15s; }
details[open] > .gfx-head::before { transform: rotate(90deg); }
.gfx-head:hover { filter: brightness(1.35); }

.gfx-note {
  margin-left: auto;
  font-family: var(--font);
  font-size: .8rem;
  color: var(--text-soft);
}