:root {
  color-scheme: dark;
  --guizz-bg: #07111e;
  --guizz-panel: rgba(12, 27, 45, .92);
  --guizz-panel-raised: rgba(15, 36, 59, .96);
  --guizz-line: rgba(119, 183, 243, .2);
  --guizz-blue: #64b6ff;
  --guizz-cyan: #52e0ff;
  --guizz-text: #edf6ff;
  --guizz-muted: #9bb0c7;
  --guizz-glow: rgba(44, 143, 255, .24);
}

html,
body {
  min-height: 100%;
  background-color: var(--guizz-bg) !important;
  color: var(--guizz-text) !important;
}

body {
  background-image:
    radial-gradient(ellipse at 82% 7%, rgba(22, 126, 255, .2), transparent 36%),
    radial-gradient(ellipse at 8% 38%, rgba(0, 197, 255, .09), transparent 32%),
    linear-gradient(160deg, #07111e 0%, #08182a 52%, #06101c 100%) !important;
  background-attachment: fixed !important;
}

body::after {
  content: "GUIZZ";
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
  color: rgba(126, 190, 255, .38);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .32em;
  text-shadow: 0 0 20px var(--guizz-glow);
}

nav {
  border-bottom: 1px solid rgba(119, 183, 243, .16) !important;
  background: rgba(5, 15, 28, .84) !important;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .16) !important;
  backdrop-filter: blur(18px) !important;
}

.nav-logo { min-width: 0 !important; gap: 7px !important; }
.nav-logo-mark {
  display: block !important;
  flex: 0 0 auto;
  width: 78px !important;
  height: auto !important;
  max-width: calc(100vw - 205px);
  border-radius: 0 !important;
  object-fit: contain;
}
.nav-logo > span {
  display: block !important;
  color: #edf6ff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .02em;
  white-space: nowrap;
}
.nav-logo::after { display: none !important; content: none !important; }
@media (max-width: 380px) {
  .nav-logo { gap: 5px !important; }
  .nav-logo-mark { width: 64px !important; }
  .nav-logo > span { font-size: 12px !important; }
}

.nav-link,
.nav-btn {
  color: #c4d9ee !important;
}

.nav-link:hover,
.nav-btn:hover,
.nav-link[data-active="true"] {
  color: #fff !important;
  background-color: rgba(66, 151, 255, .12) !important;
}

.nav-btn,
.nav-link,
.nav-cta {
  border-color: var(--guizz-line) !important;
}

.nav-cta {
  background: linear-gradient(130deg, #49aaff, #347fff) !important;
  color: #061323 !important;
  box-shadow: 0 7px 25px rgba(50, 136, 255, .2) !important;
}

.nav-cta:hover {
  filter: brightness(1.12);
}

main[data-tools-column="true"] {
  max-width: 960px !important;
  padding-top: 48px !important;
  padding-bottom: 72px !important;
}

.tl-head {
  padding: 20px 22px 24px !important;
  border: 1px solid var(--guizz-line) !important;
  border-radius: 25px !important;
  background:
    radial-gradient(ellipse at 93% 35%, rgba(28, 132, 255, .17), transparent 35%),
    linear-gradient(145deg, rgba(16, 39, 64, .96), rgba(8, 23, 40, .94)) !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(190, 223, 255, .06) !important;
}

.tl-mcbtn {
  border: 1px solid rgba(105, 181, 255, .28) !important;
  border-radius: 11px !important;
  background: rgba(48, 128, 206, .12) !important;
  color: #a9d4ff !important;
}

.tl-mcbtn:hover {
  border-color: rgba(105, 181, 255, .55) !important;
  background: rgba(48, 128, 206, .2) !important;
  color: #fff !important;
}

.tl-head-row {
  gap: 17px !important;
  align-items: center !important;
}

.tl-slot.is-big {
  border: 1px solid rgba(110, 185, 255, .3) !important;
  border-radius: 18px !important;
  background: rgba(45, 124, 204, .15) !important;
  box-shadow: 0 0 28px rgba(44, 143, 255, .12) !important;
}

.tl-title {
  color: var(--guizz-text) !important;
  font-size: clamp(30px, 5vw, 45px) !important;
  letter-spacing: -.045em !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.tl-sub {
  max-width: 520px;
  color: var(--guizz-muted) !important;
  line-height: 1.65 !important;
}

.tl-head-row::after {
  flex: 0 0 150px;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(112, 190, 255, .4);
  border-radius: 22px;
  background: url("../world-rescue-only/assets/capa-guizz.png") center / cover no-repeat;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .26), 0 0 34px rgba(40, 153, 255, .2);
  content: "";
}

.drop-zone {
  min-height: 238px !important;
  gap: 12px !important;
  padding: 26px 22px !important;
  border: 1px dashed rgba(105, 181, 255, .48) !important;
  border-radius: 21px !important;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(43, 144, 255, .13), transparent 60%),
    rgba(8, 24, 42, .8) !important;
  color: var(--guizz-text) !important;
  box-shadow: inset 0 1px 0 rgba(190, 223, 255, .04) !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

.drop-zone::before { display: none !important; }

.drop-zone:hover,
.drop-zone:focus,
.drop-zone[aria-busy="true"] {
  border-color: var(--guizz-cyan) !important;
  box-shadow: 0 0 0 4px rgba(70, 186, 255, .08), 0 0 38px rgba(40, 153, 255, .12) !important;
}

.drop-zone__icon {
  border: 1px solid rgba(112, 190, 255, .28) !important;
  border-radius: 16px !important;
  background: rgba(40, 137, 237, .16) !important;
}

.drop-zone__title,
.drop-zone__browse {
  color: #b7dcff !important;
}

.drop-zone__subtitle,
.drop-zone__formats {
  color: var(--guizz-muted) !important;
}

.drop-zone__format {
  border: 1px solid rgba(105, 181, 255, .22) !important;
  border-radius: 8px !important;
  background: rgba(53, 130, 208, .12) !important;
  color: #9ccfff !important;
}

.drop-zone__formats { display: none !important; }

.drop-zone__browse.tl-mcbtn {
  min-height: 40px;
  padding: 0 12px !important;
  border: 1px solid #36516b !important;
  border-image: none !important;
  border-radius: 0 !important;
  background: #15283d !important;
  color: #d4e7f8 !important;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.3 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.drop-zone:hover .drop-zone__browse,
.drop-zone:focus-visible .drop-zone__browse {
  filter: brightness(1.08);
}

.report-card {
  border: 1px solid var(--guizz-line) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(145deg, rgba(15, 34, 55, .94), rgba(8, 22, 38, .94)) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(190, 223, 255, .035) !important;
}

.tl-ptitle {
  color: #e3f2ff !important;
}

.tl-text,
.tl-steps {
  color: #a9bed3 !important;
}

.tl-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 8px !important;
  border: 1px solid rgba(105, 181, 255, .17) !important;
  border-radius: 13px !important;
  background: rgba(4, 15, 28, .56) !important;
}

.tl-tabs::after {
  content: none !important;
  display: none !important;
}

.tl-tabs .tool-tab {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 9px 8px !important;
  border: 1px solid rgba(92, 155, 211, .4) !important;
  border-image: none !important;
  border-radius: 9px !important;
  background: #0b1c2d !important;
  color: #bed8ed !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease !important;
}

.tl-tabs .tool-tab:hover {
  border-color: rgba(111, 187, 255, .72) !important;
  background: #122d48 !important;
  color: #fff !important;
}

.tl-tabs .tool-tab[data-active="true"],
.tl-tabs .tool-tab[aria-selected="true"] {
  border-color: #60b5fa !important;
  background: linear-gradient(135deg, #174374, #12365f) !important;
  color: #f0f8ff !important;
  box-shadow: inset 0 0 0 1px rgba(176, 219, 255, .14), 0 2px 8px rgba(0, 0, 0, .14) !important;
}

.tl-tabpanel {
  border-color: rgba(105, 181, 255, .14) !important;
  background: rgba(6, 18, 32, .5) !important;
}

.step-dot {
  border: 1px solid rgba(92, 174, 255, .24) !important;
  background: rgba(44, 138, 229, .15) !important;
  color: #82c3ff !important;
}

.ai-btn {
  overflow: hidden;
  border: 1px solid rgba(112, 190, 255, .4) !important;
  background: #0b2440 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3), 0 0 25px rgba(44, 143, 255, .18) !important;
}

.ai-btn img {
  content: url("../world-rescue-only/assets/capa-guizz.png");
  object-fit: cover;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse at 82% 7%, rgba(37, 141, 255, .13), transparent 36%),
    linear-gradient(155deg, #edf6ff, #e2f0ff 58%, #f6fbff) !important;
  color: #132944 !important;
}

html[data-theme="light"] .tl-head,
html[data-theme="light"] .report-card {
  border-color: rgba(43, 111, 181, .2) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .97), rgba(236, 246, 255, .98)) !important;
  box-shadow: 0 18px 50px rgba(30, 86, 140, .1) !important;
}

html[data-theme="light"] .tl-title,
html[data-theme="light"] .tl-ptitle {
  color: #122b47 !important;
}

html[data-theme="light"] .tl-sub,
html[data-theme="light"] .tl-text,
html[data-theme="light"] .tl-steps {
  color: #4e6580 !important;
}

html[data-theme="light"] .drop-zone,
html[data-theme="light"] .tl-tabs,
html[data-theme="light"] .tl-tabpanel {
  background: rgba(236, 246, 255, .88) !important;
  color: #183451 !important;
}

@media (max-width: 680px) {
  main[data-tools-column="true"] {
    padding-top: 24px !important;
  }

  .tl-head {
    padding: 17px !important;
  }

  .tl-head-row {
    flex-wrap: wrap !important;
  }

  .tl-head-row::after {
    flex-basis: 104px;
    width: 104px;
    border-radius: 17px;
  }

  .tl-sub {
    font-size: 13px !important;
  }
}

/* This page is a focused recovery tool, so remove the site-wide category
   links while keeping the Guizz mark, language selector, and theme toggle. */
.site-nav .nav-link,
.site-nav .nav-social,
.site-nav .nav-glide,
.site-nav .nav-chevron,
.site-nav .nav-cta,
.site-nav button[data-slot="dropdown-menu-trigger"],
.site-nav div:has(> button[data-slot="dropdown-menu-trigger"]) {
  display: none !important;
}

.recovery-status,
.status {
  padding: 10px 13px;
  border: 1px solid rgba(105, 181, 255, .2);
  border-radius: 12px;
  background: rgba(8, 24, 42, .7);
  color: var(--guizz-muted);
  font-size: 14px;
  line-height: 1.5;
}

#status.status:not(.is-working):not(.is-error):not(.is-warning):not(.is-success) {
  display: none !important;
}

.status.is-working { color: #9ed7ff; }
.status.is-success { color: #a5e7c0; }
.status.is-warning { color: #ffd98c; }
.status.is-error { color: #ff9b9b; }

.recovery-report:not(.hidden) { display: grid; gap: 12px; }
.recovery-report.hidden,
.recovery-actions.hidden,
.recovery-download.hidden { display: none !important; }
.recovery-report > h2 { margin: 0; }
.recovery-report > p { margin: 0; }
.report-message { margin: 0; color: #c1d3e5; line-height: 1.6; }
.warning-message { color: #ffd98c; }

.finding-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.finding-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--guizz-line);
  border-radius: 11px;
  background: rgba(8, 24, 42, .62);
}

.finding-title { color: var(--guizz-text); }
.finding-state { flex: 0 0 auto; color: #8dc7ff; font-size: 12px; }
.recovery-actions, .recovery-download { display: flex; flex-wrap: wrap; gap: 10px; }

.recovery-primary,
.recovery-secondary,
.recovery-download-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 11px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.recovery-primary,
.recovery-download-link {
  border: 1px solid rgba(106, 187, 255, .65);
  background: linear-gradient(130deg, #49aaff, #347fff);
  color: #061323;
}

.recovery-secondary {
  border: 1px solid var(--guizz-line);
  background: rgba(48, 128, 206, .12);
  color: #c4d9ee;
}

.recovery-primary:disabled { cursor: wait; opacity: .65; }
.recovery-download { align-items: center; color: #a5e7c0; }

@media (max-width: 520px) {
  .recovery-actions > *, .recovery-download-link { width: 100%; }
}

@media (min-width: 681px) and (max-width: 900px) {
  .ai-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
  }
}

/* Final responsive pass: leave room below the fixed navigation and let
   mobile content wrap instead of clipping labels or artwork. */
main[data-tools-column="true"] {
  padding-top: 88px !important;
}

@media (max-width: 680px) {
  .tl-head-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 88px !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .tl-slot.is-big {
    display: none !important;
  }

  .tl-head-row > .min-w-0 { display: contents !important; }
  .tl-head-row .tl-title {
    grid-column: 1;
    grid-row: 1;
    margin: 0 !important;
    font-size: clamp(25px, 7vw, 31px) !important;
    line-height: 1.15 !important;
  }
  .tl-head-row .tl-sub {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin: 0 !important;
  }
  .tl-head-row::after {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 88px;
    border-radius: 12px;
  }

  .tl-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  .tool-tab {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 6px !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: center !important;
    text-overflow: clip !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .tool-tab .is-long {
    display: inline !important;
  }

  .tool-tab .is-short {
    display: none !important;
  }

  body::after {
    display: none;
  }

  .ai-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 13px !important;
  }
}

@media (max-width: 639px) {
  .site-nav .ml-auto > div:has(.theme-toggle) {
    display: flex !important;
  }

  .site-nav .ml-auto > span[aria-hidden="true"] {
    display: none !important;
  }
}

.site-nav .relative:has(> .guizz-language-menu) { position: relative; }
.guizz-language-menu {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 9px);
  right: 0;
  width: 232px;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(126, 184, 238, .25);
  border-radius: 13px;
  background: #081728;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}
.guizz-language-menu[hidden] { display: none !important; }
.guizz-language-option {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: #bad1e9;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.guizz-language-option:hover,
.guizz-language-option:focus-visible,
.guizz-language-option.is-selected {
  outline: none;
  background: rgba(82, 164, 245, .16);
  color: #fff;
}
.guizz-language-option img {
  flex: 0 0 26px;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
}
.guizz-language-check { margin-left: auto; color: #72bdff; font-weight: 800; }
html[dir="rtl"] .guizz-language-menu { right: auto; left: 0; }
html[dir="rtl"] .guizz-language-option { text-align: right; }
html[dir="rtl"] .guizz-language-check { margin-right: auto; margin-left: 0; }

@media (max-width: 639px) {
  .guizz-language-menu,
  html[dir="rtl"] .guizz-language-menu {
    position: fixed;
    top: 60px;
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(-50%);
  }
}

/* Restored Minecraft world details shown immediately after a .mcworld is read. */
.world-info-card {
  display: block;
  padding: 16px !important;
  border: 1px solid rgba(119, 183, 243, .2) !important;
  border-radius: 16px !important;
  background: linear-gradient(145deg, rgba(14, 33, 54, .96), rgba(8, 21, 36, .96)) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .2), 0 0 28px rgba(44, 143, 255, .07);
}

.world-summary-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.world-cover {
  display: block;
  width: 88px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(145, 198, 249, .48);
  border-radius: 7px;
  background: #0b1d30;
}

.world-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-cover.is-empty img { object-fit: contain; padding: 12px; opacity: .7; }
.world-summary-name { min-width: 0; display: grid; gap: 3px; }
.world-summary-title { margin: 0 !important; overflow-wrap: anywhere; }
.world-summary-file { margin: 0 !important; overflow: hidden; color: var(--guizz-muted) !important; text-overflow: ellipsis; white-space: nowrap; }

.world-change-button {
  min-height: 38px;
  border: 1px solid rgba(133, 190, 246, .3) !important;
  border-radius: 9px !important;
  padding: 7px 12px !important;
  background: rgba(72, 145, 217, .13) !important;
  color: var(--guizz-text) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.world-change-button:hover { border-color: rgba(133, 190, 246, .62) !important; background: rgba(72, 145, 217, .23) !important; }
.world-change-button:focus-visible { outline: 2px solid var(--guizz-blue); outline-offset: 2px; }

.world-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.world-stat-tile {
  display: grid;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid rgba(119, 183, 243, .16);
  border-radius: 9px;
  background: rgba(4, 13, 23, .55);
}

.world-stat-value { overflow: hidden; color: var(--guizz-text); font-size: 14px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.world-stat-label { overflow: hidden; color: var(--guizz-muted); font-size: 10px; font-weight: 700; letter-spacing: .075em; line-height: 1.25; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
html[dir="rtl"] .world-summary-head { direction: rtl; }

@media (max-width: 600px) {
  .world-info-card { padding: 12px !important; }
  .world-summary-head { grid-template-columns: 62px minmax(0, 1fr) auto; align-items: start; gap: 7px 9px; }
  .world-cover { grid-row: 1 / span 2; width: 62px; height: 52px; align-self: center; }
  .world-summary-name { display: contents; }
  .world-summary-title { grid-column: 2; grid-row: 1; align-self: center; }
  .world-summary-file { grid-column: 2 / 4; grid-row: 2; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
  .world-change-button { min-height: 36px; padding: 6px 9px !important; font-size: 12px; }
  .world-change-button { grid-column: 3; grid-row: 1; }
  .world-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
  .world-stat-tile { min-height: 58px; padding: 8px 9px; }
  .world-stat-value { font-size: 13px; }
}

.world-info-card.hidden { display: none !important; }


/* Compact post-upload flow: issue summary, exact repair list, then one next step. */
.recovery-report,
.recovery-plan { gap: 12px; }
.recovery-report > h2,
.recovery-plan > h2 { margin: 0 !important; }
.compact-findings {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compact-findings li {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-left: 3px solid #69b9ff;
  border-radius: 0 8px 8px 0;
  background: rgba(4, 13, 23, .52);
  color: var(--guizz-text);
  font-size: 14px;
  line-height: 1.45;
}
.repair-plan-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.repair-plan-item { display: flex; align-items: flex-start; gap: 9px; color: var(--guizz-text); font-size: 14px; line-height: 1.5; }
.repair-plan-check { flex: 0 0 auto; color: #77d99a; font-weight: 900; }
.original-note { margin: 0; color: var(--guizz-muted); font-size: 12px; line-height: 1.5; }
.recovery-actions { margin-top: 2px; }
.recovery-primary { min-height: 48px; padding: 12px 18px; }
.recovery-download {
  display: grid;
  gap: 10px;
  align-items: stretch;
  margin-top: 4px;
  padding: 13px;
  border: 1px solid rgba(119, 217, 154, .25);
  border-radius: 12px;
  background: rgba(27, 89, 63, .15);
  color: #b8efcb;
}
.recovery-download-link { width: fit-content; min-width: 220px; }
.recovery-download.hidden,
.repair-plan-list.hidden { display: none !important; }
@media (max-width: 520px) {
  .recovery-actions > *, .recovery-download-link { width: 100%; }
  .recovery-download-link { min-width: 0; }
  .compact-findings li { font-size: 13px; }
}

#report-content { display: grid; gap: 10px; }
.recovery-plan:not(.hidden) { display: grid; gap: 12px; }
.recovery-plan.hidden { display: none !important; }


/* After a world is selected, keep only the world, diagnosis, repair plan, and download flow. */
body.world-selected #world-file-guide,
body.world-selected #achievements-explainer,
body.world-selected main .tl-head > a.tl-mcbtn,
body.world-selected .ai-root,
body.world-selected::after {
  display: none !important;
}

/* Match the reference after upload: begin at the selected-world card. */
body.world-selected main .tl-head,
body.world-selected #dropzone,
body.world-selected #status:not(.is-working):not(.is-error) {
  display: none !important;
}
body.world-selected main[data-tools-column="true"] > .tool-enter {
  margin-top: 0 !important;
}
body.world-selected .world-info-card { scroll-margin-top: 88px; }
body.world-selected main[data-tools-column="true"] { padding-bottom: 64px !important; }

/* Branded social links, shown on the information view before a world is selected. */
.guizz-social-section { display: grid; gap: 17px; }
.guizz-social-intro { display: grid; gap: 6px; }
.guizz-social-eyebrow {
  color: #78bfff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
.guizz-social-intro h2,
.guizz-social-intro p { margin: 0 !important; }
.guizz-social-intro p { color: var(--guizz-muted); }
.guizz-social-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.guizz-social-card {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(119, 183, 243, .2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(14, 35, 57, .96), rgba(7, 19, 32, .96));
  color: var(--guizz-text);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.guizz-social-card:hover {
  transform: translateY(-2px);
  border-color: rgba(112, 190, 255, .62);
  background: linear-gradient(145deg, rgba(21, 53, 83, .98), rgba(9, 28, 47, .98));
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}
.guizz-social-card:focus-visible { outline: 2px solid #72bdff; outline-offset: 3px; }
.guizz-social-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
}
.guizz-social-icon img { display: block; width: 25px; height: 25px; object-fit: contain; }
.social-tiktok .guizz-social-icon { background: linear-gradient(145deg, rgba(37, 244, 238, .17), rgba(254, 44, 85, .15)); }
.social-discord .guizz-social-icon { background: rgba(88, 101, 242, .2); }
.social-youtube .guizz-social-icon { background: rgba(255, 0, 0, .16); }
.guizz-social-copy { display: grid; min-width: 0; gap: 4px; }
.guizz-social-copy strong { font-size: 13px; line-height: 1.2; }
.guizz-social-copy small { overflow: hidden; color: var(--guizz-muted); font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.guizz-social-arrow { margin-left: auto; color: #8ebfe9; font-size: 16px; }
html[dir="rtl"] .guizz-social-arrow { margin-right: auto; margin-left: 0; }
body.world-selected #guizz-socials { display: none !important; }
@media (max-width: 680px) {
  .guizz-social-section { gap: 14px; }
  .guizz-social-links { grid-template-columns: 1fr; gap: 8px; }
  .guizz-social-card { min-height: 64px; }
}
.guizz-sites {
  display: grid;
  gap: 11px;
  padding-top: 16px;
  border-top: 1px solid rgba(119, 183, 243, .14);
}
.guizz-sites-title { margin: 0; color: var(--guizz-text); font-size: 14px; font-weight: 700; }
.guizz-sites-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guizz-site-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(119, 183, 243, .2);
  border-radius: 14px;
  background: rgba(7, 19, 32, .94);
  color: var(--guizz-text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.guizz-site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(112, 190, 255, .62);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}
.guizz-site-card:focus-visible { outline: 2px solid #72bdff; outline-offset: 3px; }
.guizz-site-cover {
  position: relative;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
  aspect-ratio: 1;
  padding: 2px;
  background: radial-gradient(ellipse at center, rgba(45, 112, 172, .2), #071321 74%);
}
.guizz-site-cover::after { display: none; content: none; }
.guizz-site-cover img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .2s ease;
}
.guizz-site-card:hover .guizz-site-cover img { filter: brightness(1.06); }
.guizz-site-open {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 9px;
  background: rgba(4, 13, 23, .68);
  color: #fff;
  font-size: 15px;
  backdrop-filter: blur(8px);
}
.guizz-site-info { display: grid; gap: 4px; padding: 12px 14px 14px; }
.guizz-site-info strong { font-size: 14px; line-height: 1.2; }
.guizz-site-info small { overflow: hidden; color: var(--guizz-muted); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
html[dir="rtl"] .guizz-site-open { right: auto; left: 9px; }
@media (max-width: 520px) {
  .guizz-sites-grid { grid-template-columns: 1fr; gap: 9px; }
  .guizz-site-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
    min-height: 96px;
  }
  .guizz-site-cover {
    position: static;
    width: 96px;
    height: 96px;
    aspect-ratio: 1;
  }
  .guizz-site-info { align-content: center; padding: 12px 42px 12px 14px; }
  .guizz-site-open { top: 10px; right: 10px; }
  html[dir="rtl"] .guizz-site-open { right: auto; left: 10px; }
  html[dir="rtl"] .guizz-site-info { padding: 12px 14px 12px 42px; }
}

/* Determinate copy progress reflects bytes actually consumed by the ZIP workers. */
.recovery-actions:not(.hidden) { display: grid; gap: 10px; }
#action-row.is-processing #fix-button { display: none !important; }
.copy-progress {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(101, 184, 255, .24);
  border-radius: 11px;
  background: rgba(8, 24, 41, .72);
}
.copy-progress.hidden { display: none !important; }
/* The AI launcher is part of the shared site shell; keep this tool page focused. */
button.ai-launch { display: none !important; }
.copy-progress-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.copy-progress-message {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--guizz-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.copy-progress-message::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #72bdff;
  box-shadow: 0 0 0 4px rgba(101, 184, 255, .12);
  content: "";
}
.copy-progress-percent {
  flex: 0 0 auto;
  color: #9acfff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.copy-progress-track {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(123, 183, 231, .14);
}
.copy-progress-track > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4caaff, #8bd4ff);
  transition: width .16s linear;
}
html[dir="rtl"] .copy-progress-track > span { right: 0; left: auto; }
.copy-progress-bytes {
  justify-self: end;
  color: var(--guizz-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
@media (prefers-reduced-motion: reduce) {
  .copy-progress-track > span { transition: none; }
}

/* Keep every step legible when the visitor chooses the light theme. */
html[data-theme="light"] {
  --guizz-text: #173451;
  --guizz-muted: #4d6881;
  --guizz-line: rgba(47, 107, 164, .22);
  --guizz-glow: rgba(35, 113, 194, .14);
}

html[data-theme="light"] body {
  background-color: #eef5fc !important;
  background-image: linear-gradient(160deg, #f7fbff 0%, #eaf4ff 60%, #f3f9ff 100%) !important;
}

html[data-theme="light"] nav {
  border-bottom-color: rgba(44, 99, 151, .18) !important;
  background: rgba(250, 253, 255, .94) !important;
  box-shadow: 0 10px 28px rgba(40, 85, 133, .1) !important;
}

html[data-theme="light"] .nav-btn { color: #284966 !important; }
html[data-theme="light"] .nav-btn:hover { background: rgba(58, 134, 208, .12) !important; }

html[data-theme="light"] .drop-zone {
  border-color: rgba(57, 129, 198, .48) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(88, 166, 246, .16), transparent 65%), #f4f9ff !important;
  box-shadow: 0 16px 36px rgba(43, 93, 140, .08) !important;
}

html[data-theme="light"] .drop-zone:hover,
html[data-theme="light"] .drop-zone:focus-visible {
  border-color: #2781d4 !important;
  box-shadow: 0 0 0 4px rgba(52, 139, 224, .12), 0 18px 38px rgba(43, 93, 140, .11) !important;
}

html[data-theme="light"] .drop-zone__icon {
  border-color: rgba(48, 124, 196, .25) !important;
  background: #e4f2ff !important;
}

html[data-theme="light"] .drop-zone__title { color: #173e65 !important; }
html[data-theme="light"] .drop-zone__subtitle { color: #4d6881 !important; }
html[data-theme="light"] .drop-zone__browse {
  border-color: #9bbbd9 !important;
  background: #e7f2ff !important;
  color: #244c72 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .status {
  border-color: rgba(47, 107, 164, .22);
  background: #f5faff;
  color: #4d6881;
}
html[data-theme="light"] .status.is-working { color: #125f9a; }
html[data-theme="light"] .status.is-success { color: #176646; }
html[data-theme="light"] .status.is-warning { color: #895b10; }
html[data-theme="light"] .status.is-error { color: #a9333d; }

html[data-theme="light"] .tl-tabs {
  border-color: rgba(47, 107, 164, .2) !important;
  background: #e7f1fb !important;
}
html[data-theme="light"] .tool-tab { color: #3f5c76 !important; }
html[data-theme="light"] .tool-tab[data-active="true"],
html[data-theme="light"] .tool-tab[aria-selected="true"] {
  background: #cfe6ff !important;
  color: #164a79 !important;
  box-shadow: inset 0 0 0 1px rgba(49, 117, 183, .25) !important;
}
html[data-theme="light"] .tl-tabs .tool-tab {
  border: 1px solid rgba(48, 111, 171, .24) !important;
  border-image: none !important;
  background: #f8fbff !important;
  color: #315675 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] .tl-tabs .tool-tab[data-active="true"],
html[data-theme="light"] .tl-tabs .tool-tab[aria-selected="true"] {
  border-color: rgba(42, 113, 180, .4) !important;
  background: #d5eaff !important;
  color: #164a79 !important;
  box-shadow: inset 0 0 0 1px rgba(49, 117, 183, .18) !important;
}
html[data-theme="light"] .tl-tabpanel { background: #f5faff !important; }
html[data-theme="light"] .step-dot {
  border-color: rgba(54, 131, 205, .28) !important;
  background: #e1efff !important;
  color: #1767aa !important;
}

html[data-theme="light"] .world-stat-tile,
html[data-theme="light"] .compact-findings li,
html[data-theme="light"] .finding-list li {
  border-color: rgba(47, 107, 164, .18);
  background: #eaf3fd;
  color: #183b5b;
}
html[data-theme="light"] .compact-findings li { border-left-color: #348fe1; }
html[data-theme="light"] .world-stat-value,
html[data-theme="light"] .finding-title,
html[data-theme="light"] .repair-plan-item { color: #183b5b; }
html[data-theme="light"] .world-stat-label { color: #516b84; }
html[data-theme="light"] .world-summary-file,
html[data-theme="light"] .original-note { color: #55718b !important; }
html[data-theme="light"] .world-change-button {
  border-color: rgba(44, 119, 191, .35) !important;
  background: #e3f1ff !important;
  color: #1b547e !important;
  text-shadow: none !important;
}
html[data-theme="light"] .world-change-button:hover { background: #d5eaff !important; }
html[data-theme="light"] .report-message { color: #385570; }
html[data-theme="light"] .warning-message { color: #885b17; }

html[data-theme="light"] .copy-progress {
  border-color: rgba(47, 107, 164, .25);
  background: #eaf4ff;
}
html[data-theme="light"] .copy-progress-percent { color: #145f9e; }
html[data-theme="light"] .copy-progress-track { background: #c9dfef; }
html[data-theme="light"] .recovery-download {
  border-color: rgba(31, 125, 82, .28);
  background: #e6f7ef;
  color: #176646;
}

html[data-theme="light"] .guizz-social-card,
html[data-theme="light"] .guizz-site-card {
  border-color: rgba(47, 107, 164, .2);
  background: #f9fcff;
  color: #173451;
}
html[data-theme="light"] .guizz-social-card { background-image: none; }
html[data-theme="light"] .guizz-social-card:hover,
html[data-theme="light"] .guizz-site-card:hover {
  border-color: rgba(36, 120, 202, .55);
  background: #eef7ff;
}
html[data-theme="light"] .guizz-social-arrow { color: #356f9f; }
html[data-theme="light"] .guizz-social-eyebrow { color: #276fb0; }
html[data-theme="light"] .social-tiktok .guizz-social-icon {
  border-color: transparent;
  background: linear-gradient(145deg, #173e55, #432a47);
}
html[data-theme="light"] .social-discord .guizz-social-icon {
  border-color: transparent;
  background: #5865e8;
}
html[data-theme="light"] .social-youtube .guizz-social-icon {
  border-color: transparent;
  background: #d93245;
}

.recovery-primary,
.recovery-download-link { transition: filter .18s ease, box-shadow .18s ease, transform .18s ease; }
.recovery-primary:hover:not(:disabled),
.recovery-download-link:hover { filter: brightness(1.08); box-shadow: 0 10px 22px rgba(49, 131, 225, .2); transform: translateY(-1px); }
.recovery-primary:focus-visible,
.recovery-download-link:focus-visible,
.tool-tab:focus-visible,
.site-nav .nav-btn:focus-visible { outline: 2px solid #60b7ff; outline-offset: 3px; }

@media (max-width: 520px) {
  .drop-zone { padding: 24px 16px !important; }
  .drop-zone__subtitle { max-width: 270px; line-height: 1.5 !important; }
}

@media (max-width: 360px) {
  html[lang="ru"] .tl-title { font-size: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .recovery-primary,
  .recovery-download-link { transition: none; }
  .recovery-primary:hover:not(:disabled),
  .recovery-download-link:hover { transform: none; }
}

/* Small usability polish: visible keyboard focus and comfortable touch targets. */
:root { --guizz-focus: #84caff; }
html[data-theme="light"] { --guizz-focus: #175f9f; }

.tl-screen :is(a, button, [role="button"], [role="tab"], [role="menuitem"]):focus-visible {
  outline: 2px solid var(--guizz-focus) !important;
  outline-offset: 3px;
}

.tl-screen :is(a, button, [role="button"], [role="tab"], [role="menuitem"]) {
  touch-action: manipulation;
}

.site-nav .nav-btn.is-icon {
  min-width: 44px !important;
  min-height: 44px !important;
}

.guizz-language-option {
  min-height: 44px;
}

.drop-zone {
  touch-action: manipulation;
}

.drop-zone__browse.tl-mcbtn {
  min-height: 44px !important;
}

.world-change-button {
  min-height: 44px;
}

/* Keep the brand label legible in the light theme and respect motion settings. */
html[data-theme="light"] .nav-logo > span {
  color: #173451 !important;
}

@media (prefers-reduced-motion: reduce) {
  .tl-screen .drop-zone,
  .tl-screen .tool-tab,
  .tl-screen .guizz-social-card,
  .tl-screen .guizz-site-card,
  .tl-screen .nav-btn {
    transition: none !important;
  }

  .tl-screen .guizz-social-card:hover,
  .tl-screen .guizz-site-card:hover {
    transform: none !important;
  }
}

