/* Web-only overrides: the launcher UI unchanged, minus desktop chrome. */

/* No OS window to minimize/close, and no Explorer to open a folder in. */
.win-controls { display: none !important; }
#open-btn { display: none !important; }

/* Browsers without the File System Access API (Firefox/Safari): no folder
   picker, so hide Locate + the folder path — downloads go to the browser's
   Downloads folder. Chrome/Edge (html.fs-access) keep the full statusbar:
   Locate picks the Rotations\Classic folder and installs land in it. */
html.no-fs-access #locate-btn { display: none !important; }
html.no-fs-access .path-label,
html.no-fs-access #classic-path,
html.no-fs-access #status-line { display: none !important; }

/* Rotation cards open a details pop-up on the web. Every card carries a
   clean strip along its bottom edge — uniform, obviously clickable, and it
   can never crowd the rotation name (the old inline pill truncated names). */
#cards .card {
  cursor: pointer;
  padding-bottom: 38px;
  /* --cc is the class color, stamped per card by rotation-details.js */
  border-color: color-mix(in srgb, var(--cc, #4cafe0) 60%, transparent);
}
#cards .card:hover {
  border-color: var(--cc, #4cafe0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35),
              0 0 12px color-mix(in srgb, var(--cc, #4cafe0) 25%, transparent);
}
/* An available update still glows frost blue — that signal outranks class tint */
#cards .card.update,
#cards .card.update:hover { border-color: var(--frost-dim); }
#cards .card::after {
  content: 'ⓘ  Details & Changelog';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  padding: 5px 12px;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: color-mix(in srgb, var(--cc, #4cafe0) 70%, white);
  background: color-mix(in srgb, var(--cc, #4cafe0) 11%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--cc, #4cafe0) 35%, transparent);
  border-radius: 0 0 3px 3px;
  pointer-events: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
#cards .card:hover::after {
  color: color-mix(in srgb, var(--cc, #4cafe0) 65%, white);
  background: color-mix(in srgb, var(--cc, #4cafe0) 16%, transparent);
  border-top-color: color-mix(in srgb, var(--cc, #4cafe0) 50%, transparent);
}

/* Details pop-up — two panes: the write-up, and (on demand) a separate
   scrollable changelog frame on the right that can grow forever. */
.modal.details {
  position: relative;
  max-width: 640px;
  width: min(92vw, 640px);
  max-height: 84vh;
  overflow: hidden;       /* the panes scroll, not the modal */
  text-align: left;
  transition: max-width 0.25s ease, width 0.25s ease;
}
.modal.details.cl-open {
  max-width: 1020px;
  width: min(96vw, 1020px);
}
.dt-panes { display: flex; gap: 20px; align-items: stretch; }
.dt-main {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 72vh;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: none;             /* the visible scroll bar belongs to the
                                        changelog — the write-up still wheel-
                                        scrolls, just without a bar (Firefox) */
}
.dt-main::-webkit-scrollbar { width: 0; height: 0; }
.dt-side {
  flex: 0 0 340px;
  max-height: 72vh;
  overflow-y: auto;       /* the changelog's own scroll frame — the frost bar
                             appears only once the history is long enough */
  border-left: 1px solid rgba(201, 163, 78, 0.3);
  padding-left: 18px;
  padding-right: 6px;
}
/* Frost-blue scroll bar for the changelog (Chrome/Edge) */
.dt-side::-webkit-scrollbar { width: 10px; }
.dt-side::-webkit-scrollbar-track {
  background: rgba(76, 175, 224, 0.08);
  border-radius: 999px;
}
.dt-side::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4cafe0, #2a6b8f);
  border-radius: 999px;
  border: 2px solid rgba(8, 12, 14, 0.7);
}
.dt-side::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5fc1f0, #2f7ba3);
}
/* Firefox fallback: native thin bar, same blue */
@supports not selector(::-webkit-scrollbar) {
  .dt-side {
    scrollbar-width: thin;
    scrollbar-color: #4cafe0 rgba(76, 175, 224, 0.1);
  }
}
.dt-side-title {
  margin: 2px 0 10px;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  color: #c9a34e;
}
@media (max-width: 900px) {
  .dt-panes { flex-direction: column; }
  .dt-main { max-height: 46vh; }
  .dt-side {
    flex: none;
    max-height: 30vh;
    border-left: none;
    border-top: 1px solid rgba(201, 163, 78, 0.3);
    padding: 12px 4px 0 0;
  }
}
.modal.details .dt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;   /* .win-btn is hidden on web — bring it back here */
}
.modal.details h2 { padding-right: 40px; }
.dt-tagline {
  margin: 6px 0 14px;
  font-style: italic;
  opacity: 0.85;
}
.dt-h {
  margin: 16px 0 6px;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  color: #c9a34e;
}
.dt-items { display: grid; gap: 4px; }
.dt-line {
  font-size: 0.9em;
  line-height: 1.45;
  opacity: 0.92;
}
.dt-soon { opacity: 0.85; line-height: 1.5; }
.dt-cl-list { display: grid; gap: 8px; }
.dt-cl-row {
  padding: 8px 12px;
  border-left: 2px solid rgba(76, 175, 224, 0.5);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 6px 6px 0;
}
.dt-cl-head {
  font-size: 0.88em;
  font-weight: bold;
  color: #4cafe0;
}
.dt-cl-note { font-size: 0.86em; line-height: 1.4; margin-top: 2px; }
.dt-cl-note.empty { opacity: 0.55; font-style: italic; }
.dt-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 163, 78, 0.25);
  font-size: 0.85em;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dt-footer .dt-footer-note { flex: 1 1 auto; }
#dt-cl-btn.active {
  background: rgba(76, 175, 224, 0.16);
  border-color: rgba(76, 175, 224, 0.8);
}
.dt-footer a { color: #4cafe0; }
.dt-footer code {
  background: rgba(76, 175, 224, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Ten classes now (Death Knight) — keep the whole crest row on a single
   line; the 1150px breakpoint splits it 5 × 2. */
.crest-grid { grid-template-columns: repeat(10, 1fr); }
@media (max-width: 1150px) { .crest-grid { grid-template-columns: repeat(5, 1fr); } }

/* "🔔 Update alerts" — the Chrome extension pop-up (web only) */
@media (max-width: 700px) {
  .ext-btn-label,
  .guide-btn-label { display: none; }  /* phones keep just the icons */
}

/* "📖 How to install" — the full install guide pop-up (web only) */
.modal.guide {
  position: relative;
  width: min(620px, 94vw);
  max-height: 86vh;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.modal.guide .dt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;   /* .win-btn is hidden on web — bring it back here */
}
.modal.guide h2 { padding-right: 40px; margin-bottom: 2px; }
.guide-tagline { margin: 0 0 12px; font-style: italic; opacity: 0.85; }
.guide-body {
  overflow-y: auto;       /* the guide scrolls inside the pop-up */
  min-height: 0;
  padding-right: 8px;
}
.guide-body::-webkit-scrollbar { width: 10px; }
.guide-body::-webkit-scrollbar-track {
  background: rgba(76, 175, 224, 0.08);
  border-radius: 999px;
}
.guide-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4cafe0, #2a6b8f);
  border-radius: 999px;
  border: 2px solid rgba(8, 12, 14, 0.7);
}
@supports not selector(::-webkit-scrollbar) {
  .guide-body {
    scrollbar-width: thin;
    scrollbar-color: #4cafe0 rgba(76, 175, 224, 0.1);
  }
}
.guide-body h3 {
  margin: 18px 0 6px;
  font-size: 0.95em;
  letter-spacing: 0.04em;
  color: #c9a34e;         /* matches the details pop-up's section headers */
}
.guide-body h3:first-child { margin-top: 2px; }
.guide-body p,
.guide-body li { font-size: 0.9em; line-height: 1.5; }
.guide-body p { margin: 0 0 8px; }
.guide-body ul,
.guide-body ol {
  margin: 0 0 10px 20px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.guide-body code {
  background: rgba(76, 175, 224, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}
.modal.ext {
  position: relative;
  width: min(520px, 92vw);  /* the numbered steps need a little more room */
  text-align: left;
}
.modal.ext .dt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;   /* .win-btn is hidden on web — bring it back here */
}
.modal.ext h2 { padding-right: 40px; }
.ext-copy { margin: 8px 0 16px; line-height: 1.5; opacity: 0.92; }
.ext-dl {
  display: inline-block;
  margin-bottom: 16px;
  text-decoration: none;  /* it's an <a> wearing button clothes */
}
.ext-steps {
  margin: 0 0 14px 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ext-steps li { line-height: 1.45; font-size: 0.92em; }
.ext-steps code,
.ext-note code {
  background: rgba(76, 175, 224, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}
.ext-note {
  font-size: 0.83em;
  opacity: 0.75;
  line-height: 1.5;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 163, 78, 0.25);
}

/* Frame the app in the middle of the screen like a hosted console. */
html, body { min-height: 100vh; }
body {
  max-width: 1280px;
  margin: 0 auto;
  box-shadow: 0 0 0 1px #000, 0 30px 90px rgba(0, 0, 0, 0.8),
              0 0 70px rgba(76, 175, 224, 0.08);
}

/* required add-ons pop-up — locate row + per-addon cards with changelogs */
#addons-btn { position: relative; }
.ra-bubble { top: -12px; right: -8px; }
.ra-bubble::after { left: auto; right: 18px; transform: none; }
.modal.addons {
  width: min(620px, 92vw);
  text-align: left;
  position: relative;
}
.modal.addons .dt-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; font-size: 0.9rem;
}
.modal.addons h2 { padding-right: 40px; }
.ra-tagline { margin: 4px 0 14px; font-style: italic; opacity: 0.85; }
.ra-locate {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line); border-radius: 5px;
}
.ra-locate .path-label { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.ra-locate code {
  font-family: var(--mono); font-size: 0.74rem; color: #b8d9e6;
  background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
  padding: 2px 8px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ra-list {
  display: grid; gap: 8px;
  max-height: min(46vh, 420px); overflow-y: auto;
  padding-right: 4px;
}
.ra-list::-webkit-scrollbar { width: 10px; }
.ra-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35); border-radius: 5px;
}
.ra-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e475a, #122f3d);
  border: 1px solid var(--frost-dim); border-radius: 5px;
}
.ra-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 5px;
}
.ra-card.update { border-color: var(--frost-dim); }
.ra-card .pill { font-size: 0.68rem; padding: 2px 8px; margin-top: 2px; white-space: nowrap; }
.ra-card .btn { padding: 4px 10px; font-size: 0.72rem; flex-shrink: 0; margin-top: 0; }
.ra-card .ra-dl { margin-left: 6px; }
.ra-card .busy { margin-top: 4px; }
.ra-main { min-width: 0; }
.ra-name { font-weight: 700; letter-spacing: 0.03em; }
.ra-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ra-sub .note { color: #b8d9e6; }
.ra-desc { font-size: 0.8rem; opacity: 0.85; margin-top: 4px; line-height: 1.45; }
.ra-cl-toggle { margin-top: 6px; padding: 2px 0; }
.ra-history { display: grid; gap: 6px; margin-top: 6px; }
.ra-hist-row {
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid var(--frost-dim); border-radius: 3px;
}
.ra-hist-head {
  display: flex; justify-content: space-between;
  font-size: 0.74rem; font-weight: 700; color: #b8d9e6;
}
.ra-hist-note { font-size: 0.78rem; line-height: 1.45; margin-top: 2px; white-space: pre-wrap; }
.ra-hist-note.empty { opacity: 0.55; font-style: italic; }
.ra-empty { opacity: 0.75; font-size: 0.85rem; padding: 10px 2px; }
.ra-foot {
  font-size: 0.78rem; opacity: 0.75; line-height: 1.5;
  margin: 12px 0 0; padding-top: 10px;
  border-top: 1px solid rgba(201, 163, 78, 0.25);
}
.ra-foot code {
  font-family: var(--mono); font-size: 0.9em;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 4px;
}
.ra-manual-hint {
  font-size: 0.8rem; line-height: 1.55;
  margin: 10px 0 4px; padding: 9px 12px;
  color: #e7d8ad;
  background: rgba(201, 163, 78, 0.08);
  border: 1px solid rgba(201, 163, 78, 0.35);
  border-radius: 8px;
}
.ra-manual-hint code {
  font-family: var(--mono); font-size: 0.9em;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 4px;
}
@media (max-width: 700px) {
  .addons-btn-label { display: none; }
}
.ra-sub .err { color: var(--danger); }

/* front screen — full-viewport intro video + ⚔ ENTER (web only) */
#intro-screen {
  position: fixed; inset: 0; z-index: 100;
  background: #040607;
  opacity: 1; transition: opacity 0.65s ease;
}
#intro-screen.leaving { opacity: 0; pointer-events: none; }
#intro-screen[hidden] { display: none; }
#intro-screen video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.intro-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 7, 0.3), transparent 28%,
              transparent 55%, rgba(4, 6, 7, 0.92));
}
.intro-enter {
  position: absolute; left: 50%; bottom: 8vh;
  transform: translateX(-50%);
  padding: 15px 64px;
  font-family: var(--serif);
  font-size: 1.06rem; font-weight: 400;
  letter-spacing: 0.62em; text-indent: 0.62em; text-transform: uppercase;
  color: #f2eedd;
  background: rgba(6, 9, 11, 0.42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(76, 175, 224, 0.4);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease, box-shadow 0.3s ease,
              background 0.3s ease, color 0.3s ease;
  animation: intro-breathe 3.2s ease-in-out infinite;
}
/* hairlines fading out from each side — quiet cinematic framing */
.intro-enter::before,
.intro-enter::after {
  content: ''; position: absolute; top: 50%; width: 72px; height: 1px;
}
.intro-enter::before {
  right: 100%; margin-right: 20px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 224, 0.55));
}
.intro-enter::after {
  left: 100%; margin-left: 20px;
  background: linear-gradient(270deg, transparent, rgba(76, 175, 224, 0.55));
}
.intro-enter:hover {
  color: #ffffff;
  border-color: rgba(76, 175, 224, 0.9);
  background: rgba(12, 24, 30, 0.5);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), 0 0 28px rgba(76, 175, 224, 0.28);
}
.intro-enter:active { background: rgba(8, 15, 18, 0.6); }
.intro-enter:focus-visible { outline: 1px solid var(--frost); outline-offset: 5px; }
@keyframes intro-breathe {
  50% { border-color: rgba(76, 175, 224, 0.62); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-enter { animation: none; }
}

/* ambient background — blurred hero-video bleed + fel embers in the side
   gutters (web only; element built by js/ambient.js at z-index -1) */
html { background: #040607; } /* stops body bg propagating to the canvas */
#ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
#ambient video {
  position: absolute; inset: -6%;
  width: 112%; height: 112%;
  object-fit: cover;
  filter: blur(48px) brightness(0.4) saturate(1.25);
}
.amb-embers { position: absolute; inset: 0; }
.amb-embers i {
  position: absolute; bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c4eeff, #4cafe0 55%, rgba(76, 175, 224, 0));
  box-shadow: 0 0 8px rgba(76, 175, 224, 0.8);
  animation: ember-rise linear infinite;
}
@keyframes ember-rise {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(9px, -27vh); }
  50%  { transform: translate(-7px, -54vh); }
  75%  { transform: translate(10px, -81vh); }
  99%  { opacity: inherit; }
  100% { transform: translate(0, -108vh); opacity: 0; }
}
.amb-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}
/* no gutters on narrow screens — skip the whole layer */
@media (max-width: 1299px) { #ambient { display: none; } }
@media (prefers-reduced-motion: reduce) { .amb-embers i { animation: none; } }

/* ☕ Ko-fi tip link — quiet gold chip at the statusbar's right edge */
.kofi {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--gold-bright); text-decoration: none;
  background: rgba(201, 163, 78, 0.08);
  border: 1px solid rgba(201, 163, 78, 0.35);
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.kofi:hover {
  border-color: var(--gold-bright);
  background: rgba(201, 163, 78, 0.14);
  box-shadow: 0 0 12px rgba(201, 163, 78, 0.25);
}
.kofi:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
@media (max-width: 900px) { .kofi-label { display: none; } } /* phones keep just the cup */

/* the cup bobs and steams — a quiet little eye-catcher */
.kofi-cup {
  position: relative; display: inline-block;
  animation: kofi-bob 2.6s ease-in-out infinite;
}
@keyframes kofi-bob {
  50% { transform: translateY(-3px); }
}
.kofi-cup i {
  position: absolute; left: 50%; top: -3px;
  width: 3px; height: 8px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(231, 205, 138, 0), rgba(231, 205, 138, 0.85));
  filter: blur(0.8px);
  opacity: 0;
  pointer-events: none;
  animation: kofi-steam 2.2s ease-out infinite;
}
.kofi-cup i:nth-child(1) { margin-left: -4px; }
.kofi-cup i:nth-child(2) { margin-left: -1px; animation-delay: 0.7s; }
.kofi-cup i:nth-child(3) { margin-left: 2px; animation-delay: 1.4s; }
@keyframes kofi-steam {
  0%   { transform: translate(0, 3px) scaleY(0.5); opacity: 0; }
  30%  { opacity: 0.9; }
  100% { transform: translate(2px, -10px) scaleY(1.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .kofi-cup, .kofi-cup i { animation: none; }
}

/* Rotations that have not been built yet (js/coming-soon.js relabels the
   manifest-less pill). Cold blue rather than the plain muted grey, so an
   unbuilt rotation reads as upcoming instead of broken. */
.pill.none.pill-soon {
  color: #9fb8d4;
  border-color: #33455e;
  background: rgba(80, 140, 200, 0.08);
}

/* ---------- Frost ornament: icicles under the titlebar (web only) ----------
   art/ui/icicles.png is a MASK, not a picture: a 2-channel LA png whose alpha
   is the icicle silhouette. The colour comes from the gradient below, so the
   ornament re-tints with the skin instead of being baked to one blue -- and
   the file stays ~99 KB instead of ~5.7 MB of keyed ice photography.
   Purely decorative: aria-hidden by virtue of being a pseudo-element, and
   pointer-events:none so it can never eat a click on the bar above it. */
.titlebar { position: relative; }
.titlebar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 44px;
  background: linear-gradient(180deg,
              rgba(236, 249, 255, 0.98) 0%,
              rgba(190, 227, 250, 0.92) 35%,
              rgba(120, 186, 226, 0.72) 70%,
              rgba(76, 175, 224, 0.30) 100%);
  -webkit-mask-image: url('../art/ui/icicles.png');
          mask-image: url('../art/ui/icicles.png');
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  /* A tight dark shadow keeps the ice legible over bright hero art without
     turning the icicles themselves into silhouettes. */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7))
          drop-shadow(0 0 7px rgba(120, 200, 255, 0.35));
  opacity: 0.92;
  pointer-events: none;
  z-index: 6;
}
/* Browsers without mask-image would show a solid gradient slab -- hide it
   rather than ship a blue bar across the top. */
@supports not ((-webkit-mask-image: url('')) or (mask-image: url(''))) {
  .titlebar::after { display: none; }
}
@media (max-width: 700px) { .titlebar::after { height: 30px; opacity: 0.5; } }
