/* ImageTwist shared shell — CSS cleanup stage 2 (V4.75)
   Based on the working ImageTwist-CSS-safe-cleanup.zip stylesheet.
   Removed only earlier declarations dominated by retained rules with the same
   selectors and equal/broader media conditions. Retained rule order is unchanged.
   Overlay/age-gate/scroll-lock rules and compatibility fallbacks are preserved.
   Historical section comments below are provenance, not separate style versions. */

/* ImageTwist shared shell V4.2
   Calm, responsive shell. Legacy upload and page-specific controls remain untouched. */

:root {
  --it-bg: #f4f7fb;
  --it-surface: #fff;
  --it-text: #17243a;
  --it-muted: #66758b;
  --it-line: #e3eaf3;
  --it-blue: #238fc7;
  --it-blue-dark: #1678ad;
  --it-radius: 14px;
  --it-shadow: 0 8px 28px rgba(20, 42, 74, .07);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--it-bg);
  color: var(--it-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.bk {
  --it-bg: #101722;
  --it-surface: #182231;
  --it-text: #edf3fa;
  --it-muted: #aab8ca;
  --it-line: #2c3a4d;
  --it-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  background: var(--it-bg);
  color: var(--it-text);
}

.container-fluid {
  padding-right: 0;
  padding-left: 0;
}

.skip-link {
  position: absolute;
  z-index: 2000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--it-surface);
  color: var(--it-blue-dark);
  box-shadow: var(--it-shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

#header.it-header {
  position: relative;
  z-index: 1000;
  box-sizing: border-box;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-top: 3px solid var(--it-blue);
  border-bottom: 1px solid var(--it-line);
  background: var(--it-surface);
  box-shadow: 0 3px 16px rgba(23, 36, 58, .045);
}

.it-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100%, 1360px);
  min-height: 72px;
  margin: 0 auto;
}

.it-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.it-brand img {
  display: block;
  width: 184px;
  max-width: 42vw;
  height: auto;
}

.it-nav-wrap {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.top-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin: 0;
  padding: 0;
  float: none;
  list-style: none;
}

.top-menu > li {
  display: block;
  margin: 0;
  padding: 0;
  float: none;
}

.top-menu > li > a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--it-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}

.top-menu > li > a::before {
  display: none !important;
}

.top-menu > li > a:hover,
.top-menu > li > a:focus-visible,
.top-menu > li > a.active {
  outline: none;
  background: rgba(35, 143, 199, .10);
  color: var(--it-blue-dark);
  text-decoration: none;
}

body.bk .top-menu > li > a {
  color: #d8e3f0;
}

body.bk .top-menu > li > a:hover,
body.bk .top-menu > li > a:focus-visible {
  background: #24364a;
  color: #8bd5f5;
}

.top-menu > li > a.upload,
.top-menu > li > a.signup {
  padding-right: 16px;
  padding-left: 16px;
  background: var(--it-blue);
  color: #fff;
}

.top-menu > li > a.upload:hover,
.top-menu > li > a.signup:hover {
  background: var(--it-blue-dark);
  color: #fff;
}

.top-menu > li > a.logout {
  color: #c04444;
}

.it-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--it-line);
  border-radius: 10px;
  background: var(--it-surface);
  color: var(--it-text);
  cursor: pointer;
}

.it-nav-toggle svg {
  width: 21px;
  height: 21px;
}

.it-nav-toggle:focus-visible,
#bulb:focus-visible {
  outline: 3px solid rgba(35, 143, 199, .25);
  outline-offset: 2px;
}

html:not(.it-js) #bulb {
  display: none;
}

#bulb {
  box-sizing: border-box;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0 0 0 8px;
  padding: 0;
  float: none;
  border: 1px solid var(--it-line);
  border-radius: 8px;
  background-color: var(--it-surface);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  cursor: pointer;
}

body.bk #bulb {
  border-color: #52647a;
  background-color: #202d3d;
}

#body.it-main {
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1080px;
  min-width: 0;
  min-height: 48vh;
  margin: 26px auto 44px;
  padding: 0 18px;
  float: none;
}

#body img,
#body video {
  max-width: 100%;
  height: auto;
}

#body pre {
  max-width: 100%;
  overflow-x: auto;
}

#body .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#body table {
  max-width: 100%;
}

.it-footer {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 48px 0 0;
  padding: 30px 22px 24px;
  border: 0;
  border-top: 1px solid var(--it-line);
  background: var(--it-surface);
  color: var(--it-muted);
}

.it-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: min(100%, 1360px);
  margin: 0 auto;
}

.it-copyright {
  margin-top: 8px;
  color: var(--it-muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.it-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.it-footer-links a,
.it-footer-links a:visited {
  color: var(--it-muted) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.it-footer-links a:hover,
.it-footer-links a:focus-visible {
  color: var(--it-text) !important;
  text-decoration: underline;
}

.it-admin-links {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--it-line);
}

.it-admin-links a {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--it-line);
  border-radius: 8px;
  color: var(--it-muted);
  font-size: 12px;
  text-decoration: none;
}

.it-admin-links a:hover,
.it-admin-links a:focus-visible {
  border-color: var(--it-blue);
  background: rgba(35, 143, 199, .06);
  color: var(--it-blue);
}

@media (max-width: 1100px) {
  #header.it-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .it-header-inner {
    gap: 10px;
  }

  .top-menu > li > a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  #body.it-main {
    max-width: 1000px;
  }
}

@media (max-width: 900px) {
  .it-header-inner {
    min-height: 68px;
    padding: 9px 0;
  }

  .it-brand img {
    width: 164px;
  }

  html.it-js .it-nav-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .it-nav-wrap {
    flex: 0 0 100%;
    order: 3;
  }

  .top-menu {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 10px 0 3px;
    border-top: 1px solid var(--it-line);
  }

  html.it-js .top-menu {
    display: none;
  }

  html.it-js .top-menu.is-open {
    display: flex;
  }

  .top-menu > li,
  .top-menu > li > a {
    width: 100%;
  }

  .top-menu > li > a {
    min-height: 44px;
    padding: 11px 13px;
    white-space: normal;
  }

  .top-menu > li > a.upload,
  .top-menu > li > a.signup {
    justify-content: center;
  }

  #body.it-main {
    width: calc(100% - 32px);
    max-width: 900px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .it-footer-inner {
    grid-template-columns: 1fr;
  }

  .it-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  #header.it-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  #body.it-main {
    width: calc(100% - 20px);
    max-width: 100%;
    padding-right: 6px;
    padding-left: 6px;
  }

  .it-footer {
    margin-top: 34px;
    padding: 24px 14px 20px;
  }

  .it-footer-inner {
    justify-items: center;
    text-align: center;
  }

  .it-footer-links {
    justify-content: center;
    gap: 10px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Home upload mode selector: centered consistently at desktop and mobile widths.
   Keep file-manager .options controls on their existing layout. */

#body .options:not(.filemanager .options) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  width: 100%;
  margin: 28px auto 24px;
  padding: 0 12px;
  text-align: center;
}

#body .options:not(.filemanager .options) label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  text-align: center;
}

#body .options:not(.filemanager .options) input[type="radio"] {
  margin: 0 2px 0 0;
}

/* Keep the legacy My Account hover rule from reintroducing the old green theme. */

body #body .top-menu > li > a.myaccount:hover,
body #body .top-menu > li > a.myaccount:focus,
body #body .top-menu > li > a.myaccount:focus-visible,
body #body .top-menu > li.active > a.myaccount,
body #body .top-menu > li > a.myaccount.active {
  background: rgba(35, 143, 199, .10) !important;
  color: var(--it-blue-dark) !important;
  outline: none;
}

body.bk #body .top-menu > li > a.myaccount:hover,
body.bk #body .top-menu > li > a.myaccount:focus,
body.bk #body .top-menu > li > a.myaccount:focus-visible,
body.bk #body .top-menu > li.active > a.myaccount,
body.bk #body .top-menu > li > a.myaccount.active {
  background: #24364a !important;
  color: #8bd5f5 !important;
}

/* Neutralize legacy green account accents; retain blue as the site's primary accent. */

#body #it-account-page {
  --green: var(--it-blue-dark);
}

#body #it-account-page .ac-metric strong.money {
  color: var(--it-blue-dark);
}

#body #it-account-page .ac-message {
  background: #edf7fc;
  color: #116b93;
  border-color: #cbe8f5;
}

#body #it-account-page .green,
#body #it-account-page .btn-success {
  color: var(--it-blue-dark);
}

#body #it-account-page .btn-success {
  background-color: var(--it-blue);
  border-color: var(--it-blue);
}

.top-menu > li.active > a.myaccount {
  background: rgba(35, 143, 199, .10) !important;
  color: var(--it-blue-dark) !important;
}

/* Guest upload invitation: transforms only the specific anonymous-upload notice. */

#body .message:has(.it-guest-upload-prompt) {
  box-sizing: border-box;
  width: min(100%, 680px);
  max-width: 100%;
  margin: 28px auto 32px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
  font: inherit;
  text-align: left;
}

.it-guest-upload-prompt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 25px;
  box-sizing: border-box;
  width: 100%;
  min-height: 220px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid #dcecf6;
  border-radius: 20px;
  background: linear-gradient(125deg, #f8fcff 0%, #eef7fd 58%, #e8f4fb 100%);
  color: #17243a;
  box-shadow: 0 12px 34px rgba(35, 104, 148, .08);
  text-align: left;
}

.it-guest-upload-prompt::after {
  position: absolute;
  right: -55px;
  bottom: -95px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(35, 143, 199, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.it-guest-upload-art svg {
  overflow: visible;
}

.it-upload-cloud {
  fill: #dff1fb;
  stroke: #79bfe0;
  stroke-width: 2;
}

.it-upload-arrow {
  fill: none;
  stroke: #1688bf;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.it-upload-spark {
  fill: #48a9d5;
}

.it-guest-upload-copy {
  position: relative;
  z-index: 1;
}

.it-guest-upload-copy h2 {
  font-weight: 750;
}

.it-guest-upload-cta span {
  font-size: 17px;
  line-height: 1;
}

body.bk #body .message:has(.it-guest-upload-prompt) {
  background: transparent;
}

body.bk .it-guest-upload-prompt {
  border-color: #2b465d;
  background: linear-gradient(125deg, #1b2a3a 0%, #1b3042 58%, #1b3549 100%);
  color: #edf3fa;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}

@media (max-width: 600px) {
  #body .message:has(.it-guest-upload-prompt) {
    margin: 18px auto 24px;
  }

  .it-guest-upload-prompt {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-height: 0;
    padding: 24px 21px;
    border-radius: 16px;
  }
}

/* V4.7 header colour harmonization: override legacy green login rules. */

body #header .top-menu > li > a.login,
body #header .top-menu > li.active > a.login,
body #header .top-menu > li > a.login.active {
  background: #ffffff !important;
  color: #247fae !important;
  border: 1px solid #c9dfec !important;
  box-shadow: none !important;
}

body #header .top-menu > li > a.login:hover,
body #header .top-menu > li > a.login:focus-visible {
  background: #edf7fc !important;
  color: #176b96 !important;
  border-color: #8fc5df !important;
}

body #header .top-menu > li > a.signup,
body #header .top-menu > li > a.upload {
  background: #238fc7 !important;
  color: #ffffff !important;
  border: 1px solid #238fc7 !important;
  box-shadow: none !important;
}

body #header .top-menu > li > a.signup:hover,
body #header .top-menu > li > a.signup:focus-visible,
body #header .top-menu > li > a.upload:hover,
body #header .top-menu > li > a.upload:focus-visible {
  background: #176f9f !important;
  color: #ffffff !important;
  border-color: #176f9f !important;
}

body.bk #header .top-menu > li > a.login {
  background: #1d2d3e !important;
  color: #a9ddf4 !important;
  border-color: #405b72 !important;
}

body.bk #header .top-menu > li > a.login:hover,
body.bk #header .top-menu > li > a.login:focus-visible {
  background: #263d52 !important;
  color: #d5f1ff !important;
  border-color: #5d91b0 !important;
}

body.bk #header .top-menu > li > a.signup,
body.bk #header .top-menu > li > a.upload {
  background: #238fc7 !important;
  color: #ffffff !important;
  border-color: #238fc7 !important;
}

/* V4.9: guest signup returns to the standard navigation-link treatment. */

body #header .top-menu > li > a.signup,
body #header .top-menu > li.active > a.signup {
  background: transparent !important;
  color: var(--it-text, #29445a) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

body.bk #header .top-menu > li > a.signup,
body.bk #header .top-menu > li.active > a.signup {
  background: transparent !important;
  color: #d8e3f0 !important;
}

/* V4.10: Signup is a plain navigation link in both themes, with no special hover treatment. */

body #header .top-menu > li > a.signup,
body #header .top-menu > li.active > a.signup,
body #header .top-menu > li > a.signup:hover,
body #header .top-menu > li > a.signup:focus,
body #header .top-menu > li > a.signup:focus-visible,
body #header .top-menu > li > a.signup:active {
  background: transparent !important;
  color: var(--it-text, #29445a) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body.bk #header .top-menu > li > a.signup,
body.bk #header .top-menu > li.active > a.signup,
body.bk #header .top-menu > li > a.signup:hover,
body.bk #header .top-menu > li > a.signup:focus,
body.bk #header .top-menu > li > a.signup:focus-visible,
body.bk #header .top-menu > li > a.signup:active {
  background: transparent !important;
  color: #d8e3f0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* V4.11 guest invitation: editorial, image-first signup panel. */

.it-guest-prompt-v2 {
  display: grid;
  grid-template-columns: minmax(220px, .82fr) minmax(0, 1.18fr);
  align-items: stretch;
  gap: 0;
  width: min(100%, 790px);
  min-height: 330px;
  margin: 34px auto 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e9f3;
  border-radius: 22px;
  background: linear-gradient(120deg,#f7fbfe 0%,#fff 100%);
  box-shadow: 0 18px 48px rgba(35,91,125,.11);
  color: #1c3449;
}

.it-guest-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%,#397fa5 0,#205477 48%,#173d5b 100%);
}

.it-guest-visual-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(128,211,246,.16);
  filter: blur(2px);
}

.it-photo-card {
  position: absolute;
  width: 132px;
  height: 164px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 13px;
  background: #f8fcff;
  box-shadow: 0 15px 35px rgba(0,0,0,.2);
}

.it-photo-card-back {
  transform: translate(-37px,-9px) rotate(-13deg);
  opacity: .65;
}

.it-photo-card-mid {
  transform: translate(30px,-7px) rotate(12deg);
  opacity: .82;
}

.it-photo-card-front {
  transform: translate(0,5px) rotate(-2deg);
  padding: 9px;
}

.it-photo-landscape {
  position: relative;
  height: 112px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(#9ed7ee 0 52%,#d8edda 52% 100%);
}

.it-photo-landscape:before {
  content: "";
  position: absolute;
  left: 13px;
  bottom: 20px;
  width: 65px;
  height: 65px;
  background: #6d9f8d;
  transform: rotate(45deg);
  border-radius: 8px 0 0;
}

.it-photo-landscape:after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 17px;
  width: 58px;
  height: 58px;
  background: #4f887f;
  transform: rotate(45deg);
  border-radius: 8px 0 0;
}

.it-photo-landscape span {
  position: absolute;
  z-index: 2;
  right: 17px;
  top: 15px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff1b8;
}

.it-photo-landscape b {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: 12px;
  width: 6px;
  height: 20px;
  background: #477a69;
  border-radius: 5px;
}

.it-photo-landscape i {
  position: absolute;
  z-index: 3;
  left: 14px;
  bottom: 25px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7caf91;
}

.it-photo-caption {
  padding-top: 9px;
}

.it-photo-caption span {
  display: block;
  height: 5px;
  margin: 0 0 5px;
  border-radius: 5px;
  background: #d8e6ee;
}

.it-photo-caption span:first-child {
  width: 70%;
}

.it-photo-caption span:last-child {
  width: 43%;
}

.it-visual-plus {
  position: absolute;
  right: calc(50% - 100px);
  top: 65px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  background: #fff;
  color: #247fae;
  font-size: 23px;
  box-shadow: 0 5px 15px rgba(0,0,0,.16);
}

.it-visual-label {
  position: absolute;
  bottom: 24px;
  color: #d8effa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.it-guest-prompt-v2 .it-guest-upload-copy {
  padding: 34px 34px 28px;
  align-self: center;
}

.it-guest-prompt-v2 .it-guest-upload-eyebrow {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: .16em;
}

.it-guest-prompt-v2 .it-guest-upload-copy h2 {
  max-width: 390px;
  margin-bottom: 10px;
  font-size: clamp(23px,3vw,31px);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.it-guest-prompt-v2 .it-guest-upload-copy p {
  max-width: 410px;
  margin-bottom: 17px;
  font-size: 14px;
}

.it-guest-benefits {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.it-guest-benefits li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  color: #526a7e;
  font-size: 12px;
  line-height: 1.4;
}

.it-guest-benefits li span {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #e1f3fb;
  color: #1885b8;
  font-size: 11px;
  font-weight: 800;
}

.it-guest-prompt-v2 .it-guest-upload-actions {
  gap: 12px 16px;
}

.it-guest-prompt-v2 .it-guest-upload-cta {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 9px;
}

.it-guest-prompt-v2 .it-guest-upload-login {
  font-size: 12px;
}

.it-guest-reassurance {
  margin-top: 15px;
  color: #8799a8;
  font-size: 10px;
}

.it-guest-reassurance span {
  padding: 0 6px;
  color: #39a0ce;
}

body.bk .it-guest-prompt-v2 {
  border-color: #304a60;
  background: linear-gradient(120deg,#1b2a3a,#202f40);
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}

body.bk .it-guest-prompt-v2 .it-guest-upload-copy h2 {
  color: #eef6fc;
}

body.bk .it-guest-prompt-v2 .it-guest-upload-copy p,
body.bk .it-guest-benefits li {
  color: #b3c3d2;
}

body.bk .it-guest-benefits li span {
  background: #29485d;
  color: #9cdef8;
}

body.bk .it-guest-reassurance {
  color: #8fa5b7;
}

@media (max-width:650px) {
  .it-guest-prompt-v2 {
    grid-template-columns: 1fr;
    width: min(100%,460px);
    margin: 20px auto 28px;
  }

  .it-guest-visual {
    min-height: 205px;
  }

  .it-photo-card {
    transform-origin: center;
    scale: .82;
  }

  .it-photo-card-back {
    transform: translate(-37px,-9px) rotate(-13deg) scale(.82);
  }

  .it-photo-card-mid {
    transform: translate(30px,-7px) rotate(12deg) scale(.82);
  }

  .it-photo-card-front {
    transform: translate(0,5px) rotate(-2deg) scale(.82);
  }

  .it-visual-label {
    bottom: 13px;
  }

  .it-guest-prompt-v2 .it-guest-upload-copy {
    padding: 25px 22px 23px;
  }

  .it-guest-prompt-v2 .it-guest-upload-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V4.12: restore the compact centered guest invitation from the earlier design. */

#body .it-guest-upload-prompt {
  display: flex;
  align-items: center;
  gap: 25px;
  box-sizing: border-box;
  width: min(100%,680px);
  min-height: 220px;
  margin: 28px auto 32px;
  padding: 30px 34px;
  border: 1px solid #dcecf6;
  border-radius: 20px;
  background: linear-gradient(125deg,#f8fcff 0%,#eef7fd 58%,#e8f4fb 100%);
  box-shadow: 0 12px 34px rgba(35,104,148,.08);
  text-align: left;
}

.it-guest-upload-art {
  display: grid;
  flex: 0 0 116px;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 1px solid rgba(35,143,199,.13);
  border-radius: 28px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 22px rgba(35,104,148,.07);
}

.it-guest-upload-art svg {
  display: block;
  width: 88px;
  height: 76px;
}

.it-guest-upload-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.it-guest-upload-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: #238fc7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.it-guest-upload-copy h2 {
  margin: 0 0 8px;
  color: #172f49;
  font-size: clamp(21px,3vw,27px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.it-guest-upload-copy p {
  max-width: 390px;
  margin: 0 0 19px;
  color: #64778b;
  font-size: 14px;
  line-height: 1.55;
}

.it-guest-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 18px;
}

.it-guest-upload-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid #238fc7;
  border-radius: 10px;
  background: #238fc7;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 5px 13px rgba(35,143,199,.2);
  transition: background .16s ease,transform .16s ease,box-shadow .16s ease;
}

.it-guest-upload-cta:hover,
.it-guest-upload-cta:focus-visible {
  transform: translateY(-1px);
  background: #1678ad;
  color: #fff !important;
  box-shadow: 0 7px 17px rgba(35,143,199,.25);
}

.it-guest-upload-login {
  color: #527087 !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none !important;
}

.it-guest-upload-login:hover,
.it-guest-upload-login:focus-visible {
  color: #1678ad !important;
  text-decoration: underline !important;
}

body.bk #body .it-guest-upload-prompt {
  border-color: #2b465d;
  background: linear-gradient(125deg,#1b2a3a 0%,#1b3042 58%,#1b3549 100%);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}

body.bk .it-guest-upload-art {
  border-color: #34536b;
  background: #24384b;
}

body.bk .it-upload-cloud {
  fill: #294d66;
  stroke: #5e9fbe;
}

body.bk .it-upload-arrow {
  stroke: #8bd5f5;
}

body.bk .it-guest-upload-copy h2 {
  color: #edf5fc;
}

body.bk .it-guest-upload-copy p,
body.bk .it-guest-upload-login {
  color: #aabbd0 !important;
}

@media (max-width:600px) {
  #body .it-guest-upload-prompt {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-height: 0;
    margin: 18px auto 24px;
    padding: 24px 21px;
    border-radius: 16px;
  }

  .it-guest-upload-art {
    flex-basis: 82px;
    width: 82px;
    height: 82px;
    border-radius: 21px;
  }

  .it-guest-upload-art svg {
    width: 70px;
    height: 62px;
  }

  .it-guest-upload-copy p {
    font-size: 13px;
  }

  .it-guest-upload-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

/* V4.12: Signup uses the exact same normal and hover treatment as other nav links. */

body #header .top-menu > li > a.signup,
body #header .top-menu > li.active > a.signup,
body #header .top-menu > li > a.signup:hover,
body #header .top-menu > li > a.signup:focus-visible,
body #header .top-menu > li > a.signup:active {
  background: inherit !important;
  color: inherit !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body #header .top-menu > li > a.signup {
  color: var(--it-muted) !important;
}

body #header .top-menu > li > a.signup:hover,
body #header .top-menu > li > a.signup:focus-visible {
  background: rgba(35,143,199,.10) !important;
  color: var(--it-blue-dark) !important;
}

body.bk #header .top-menu > li > a.signup {
  color: #d8e3f0 !important;
}

body.bk #header .top-menu > li > a.signup:hover,
body.bk #header .top-menu > li > a.signup:focus-visible {
  background: #24364a !important;
  color: #8bd5f5 !important;
}

/* V4.13: responsive mobile navigation drawer */

@media (max-width: 900px) {
  .it-header-inner {
    position: relative;
    flex-wrap: nowrap !important;
  }

  .it-nav-toggle {
    order: 3 !important;
    margin-left: 10px !important;
    flex: 0 0 44px;
  }

  #bulb {
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  .it-nav-wrap {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(13, 27, 42, .48) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .it-nav-wrap.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .it-nav-wrap .top-menu,
  html.it-js .it-nav-wrap .top-menu {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    box-sizing: border-box !important;
    width: min(86vw, 370px) !important;
    height: 100% !important;
    margin: 0 !important;
    padding: max(76px, env(safe-area-inset-top) + 62px) 20px max(24px, env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 0 !important;
    border-left: 1px solid var(--it-line) !important;
    border-radius: 18px 0 0 18px !important;
    background: var(--it-surface) !important;
    box-shadow: -18px 0 50px rgba(10, 28, 45, .18) !important;
    transform: translateX(102%);
    transition: transform .24s cubic-bezier(.2,.75,.25,1);
  }

  .it-nav-wrap.is-open .top-menu {
    transform: translateX(0);
  }

  .it-nav-wrap .top-menu > li {
    width: 100% !important;
    flex: 0 0 auto;
  }

  .it-nav-wrap .top-menu > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 50px !important;
    padding: 13px 15px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  .it-nav-wrap .top-menu > li > a.upload,
  .it-nav-wrap .top-menu > li > a.signup {
    justify-content: flex-start !important;
  }
}

@media (max-width: 480px) {
  .it-brand img {
    width: 138px !important;
    max-width: 48vw !important;
  }

  .it-header-inner {
    min-height: 62px !important;
    gap: 8px !important;
  }

  .it-nav-toggle {
    width: 42px !important;
    height: 42px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .it-nav-wrap,
  .it-nav-wrap .top-menu {
    transition: none !important;
  }
}

/* V4.13: contain the legacy uploader controls inside the page's white surface. */

#body.it-main .it-upload-workspace,
#body.it-main .it-upload-workspace * {
  box-sizing: border-box;
}

#body.it-main .it-upload-workspace {
  margin: 0 auto 24px;
  padding: 8px 12px 22px;
  overflow: hidden;
  border-radius: 14px;
}

#body.it-main .it-upload-workspace .upload_block {
  min-width: 0;
  margin: 0 auto 18px;
  padding: 18px 16px;
  overflow: hidden;
  border: 1px solid var(--it-line);
  border-radius: 14px;
  background: var(--it-surface);
  box-shadow: 0 5px 18px rgba(30,65,90,.045);
}

#body.it-main .it-upload-workspace .upload_block form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#body.it-main .it-upload-workspace .upload_block .col-xs-12,
#body.it-main .it-upload-workspace .upload_block .col-sm-6 {
  min-width: 0;
}

#body.it-main .it-upload-workspace .upload_input,
#body.it-main .it-upload-workspace #files_list,
#body.it-main .it-upload-workspace #universaluploader_holder,
#body.it-main .it-upload-workspace #filesUploaded {
  max-width: 100%;
  min-width: 0;
}

#body.it-main .it-upload-workspace #universaluploader_holder {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
}

#body.it-main .it-upload-workspace #universaluploader_holder > * {
  max-width: 100%;
}

#body.it-main .it-upload-workspace .thumb_size,
#body.it-main .it-upload-workspace .per_row,
#body.it-main .it-upload-workspace .gallery {
  float: none;
  display: inline-block;
  vertical-align: top;
  width: 49%;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--it-line);
  border-radius: 10px;
  background: var(--it-panel, #f7fafd);
  color: var(--it-text);
}

#body.it-main .it-upload-workspace select,
#body.it-main .it-upload-workspace textarea,
#body.it-main .it-upload-workspace input[type="file"] {
  max-width: 100%;
}

#body.it-main .it-upload-workspace .tos_terms {
  clear: both;
  padding: 14px 12px 8px;
}

#body.it-main .it-upload-workspace input[type="submit"].btn {
  min-height: 46px;
  min-width: 150px;
  padding: 11px 25px;
  border: 0;
  border-radius: 10px;
  background: var(--it-blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(35,143,199,.18);
}

#body.it-main .it-upload-workspace input[type="submit"].btn:hover {
  background: var(--it-blue-dark);
}

#body.it-main .it-upload-modes {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 22px auto 18px;
  padding: 0;
  text-align: left;
}

#body.it-main .it-upload-mode {
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
}

#body.it-main .it-upload-mode input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#body.it-main .it-upload-mode label {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 0;
  box-sizing: border-box;
  min-height: 78px;
  width: 100%;
  margin: 0 !important;
  padding: 13px 15px !important;
  border: 1px solid var(--it-line);
  border-radius: 12px;
  background: var(--it-surface);
  color: var(--it-text);
  cursor: pointer;
  text-align: center !important;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#body.it-main .it-upload-mode label small {
  color: var(--it-muted);
  font-size: 11px;
  font-weight: 400;
}

#body.it-main .it-upload-mode .it-mode-title {
  display: block;
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

#body.it-main .it-upload-mode .it-mode-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: block;
  color: var(--it-blue-dark);
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

#body.it-main .it-upload-mode input:checked + label {
  border-color: var(--it-blue);
  background: rgba(35,143,199,.075);
  box-shadow: 0 0 0 2px rgba(35,143,199,.10);
}

#body.it-main .it-upload-mode input:focus-visible + label {
  outline: 3px solid rgba(35,143,199,.28);
  outline-offset: 2px;
}

body.bk #body.it-main .it-upload-workspace .upload_block,
body.bk #body.it-main .it-upload-mode label {
  background: var(--it-surface);
}

body.bk #body.it-main .it-upload-mode input:checked + label {
  background: rgba(72,169,218,.14);
}

@media (max-width: 700px) {
  #body.it-main .it-upload-workspace {
    padding: 4px 0 18px;
  }

  #body.it-main .it-upload-workspace .upload_block {
    padding: 12px 8px;
  }

  #body.it-main .it-upload-modes {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }

  #body.it-main .it-upload-mode label {
    min-height: 72px;
    padding: 11px 12px !important;
  }

  #body.it-main .it-upload-workspace .thumb_size,
  #body.it-main .it-upload-workspace .per_row,
  #body.it-main .it-upload-workspace .gallery {
    display: block;
    width: 100%;
    margin: 9px 0 0;
  }

  #body.it-main .it-upload-workspace .upload_block .col-xs-12,
  #body.it-main .it-upload-workspace .upload_block .col-sm-6 {
    padding-right: 8px;
    padding-left: 8px;
  }

  #body.it-main .it-upload-workspace #universaluploader_holder {
    overflow-x: auto;
  }
}

@media (max-width: 380px) {
  #body.it-main .it-upload-modes {
    grid-template-columns: 1fr;
  }
}

/* V4.18: narrow only the upload form; leave the overall site layout unchanged. */

#body.it-main .it-upload-workspace {
  box-sizing: border-box !important;
  width: 75% !important;
  max-width: 1000px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#body.it-main .it-upload-workspace .it-upload-modes,
#body.it-main .it-upload-workspace .upload_block {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 900px) {
  #body.it-main .it-upload-workspace {
    width: 92% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 600px) {
  #body.it-main .it-upload-workspace {
    width: 100% !important;
  }
}

#body.it-main .it-upload-workspace .it-multi-settings > .col-sm-6:has(select),
#body.it-main .it-upload-workspace .it-multi-settings > .col-xs-12:has(select) {
  white-space: nowrap;
}

@media (max-width: 600px) {
  #body.it-main .it-upload-workspace .it-multi-settings select {
    flex-basis: 55% !important;
  }
}

#body.it-main .it-upload-workspace .it-multi-settings > .col-sm-6,
#body.it-main .it-upload-workspace .it-multi-settings > .col-xs-12,
#body.it-main .it-upload-workspace .upload_block .thumb_size,
#body.it-main .it-upload-workspace .upload_block .per_row,
#body.it-main .it-upload-workspace .upload_block .gallery {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  height: auto !important;
  margin: 3px 0 6px !important;
  padding: 5px 8px !important;
  border: 1px solid var(--it-line) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--it-text) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

#body.it-main .it-upload-workspace .it-multi-settings select,
#body.it-main .it-upload-workspace .upload_block .thumb_size select,
#body.it-main .it-upload-workspace .upload_block .per_row select,
#body.it-main .it-upload-workspace .upload_block .gallery select {
  box-sizing: border-box !important;
  flex: 1 1 55% !important;
  width: 55% !important;
  max-width: 55% !important;
  min-width: 0 !important;
  height: 31px !important;
  min-height: 31px !important;
  margin: 0 !important;
  padding: 3px 6px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

#body.it-main .it-upload-workspace .upload_block .thumb_size:has(input[type="hidden"]) {
  display: none !important;
}

/* The multi uploader now follows the compact settings strip without a large gap. */

#body.it-main .it-upload-workspace #div_html5.it-multi-upload-block > form {
  margin-top: 0 !important;
}

#body.it-main .it-upload-workspace #div_html5.it-multi-upload-block > form > .col-xs-12:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 900px) {
  #body.it-main .it-upload-workspace .upload_block .thumb_size,
  #body.it-main .it-upload-workspace .upload_block .per_row,
  #body.it-main .it-upload-workspace .upload_block .gallery {
    display: inline-flex !important;
    width: calc(50% - 8px) !important;
    vertical-align: top !important;
  }
}

@media (max-width: 520px) {
  #body.it-main .it-upload-workspace .upload_block .thumb_size,
  #body.it-main .it-upload-workspace .upload_block .per_row,
  #body.it-main .it-upload-workspace .upload_block .gallery {
    width: 100% !important;
  }
}

/* V4.21: place all upload settings in one compact row BELOW the upload area. */

#body.it-main .it-upload-workspace .it-upload-settings-row,
#body.it-main .it-upload-workspace .it-multi-settings {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 9px 0 8px !important;
  padding: 0 !important;
  clear: both !important;
}

#body.it-main .it-upload-workspace .it-upload-settings-row > .col-sm-6,
#body.it-main .it-upload-workspace .it-upload-settings-row > .col-xs-12,
#body.it-main .it-upload-workspace .it-multi-settings > .col-sm-6,
#body.it-main .it-upload-workspace .it-multi-settings > .col-xs-12 {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  border: 1px solid var(--it-line) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--it-text) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#body.it-main .it-upload-workspace .it-upload-settings-row select,
#body.it-main .it-upload-workspace .it-multi-settings select {
  box-sizing: border-box !important;
  flex: 1 1 52% !important;
  width: 52% !important;
  max-width: 52% !important;
  min-width: 0 !important;
  height: 31px !important;
  min-height: 31px !important;
  margin: 0 !important;
  padding: 3px 6px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 13px !important;
  box-shadow: none !important;
}

#body.it-main .it-upload-workspace .it-upload-settings-row > .col-sm-6:has(input[type="hidden"]),
#body.it-main .it-upload-workspace .it-upload-settings-row > .col-xs-12:has(input[type="hidden"]),
#body.it-main .it-upload-workspace .it-multi-settings > input[type="hidden"] {
  display: none !important;
}

/* Avoid a blank settings area above the multi-file selection panel. */

#body.it-main .it-upload-workspace #div_html5.it-multi-upload-block {
  padding-top: 0 !important;
}

#body.it-main .it-upload-workspace #div_html5.it-multi-upload-block > form > br {
  display: none !important;
}

@media (max-width: 900px) {
  #body.it-main .it-upload-workspace .it-upload-settings-row,
  #body.it-main .it-upload-workspace .it-multi-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  #body.it-main .it-upload-workspace .it-upload-settings-row,
  #body.it-main .it-upload-workspace .it-multi-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #body.it-main .it-upload-workspace .it-upload-settings-row > .col-sm-6,
  #body.it-main .it-upload-workspace .it-upload-settings-row > .col-xs-12,
  #body.it-main .it-upload-workspace .it-multi-settings > .col-sm-6,
  #body.it-main .it-upload-workspace .it-multi-settings > .col-xs-12 {
    white-space: normal !important;
    padding: 5px 6px !important;
    font-size: 11px !important;
  }

  #body.it-main .it-upload-workspace .it-upload-settings-row select,
  #body.it-main .it-upload-workspace .it-multi-settings select {
    font-size: 12px !important;
  }
}

/* V4.22: normalize the shared header against legacy index-page CSS.
   Keep the same geometry and menu typography on every rendered page. */

@media (min-width: 901px) {
  #header.it-header {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 76px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border-top: 3px solid var(--it-blue) !important;
    border-bottom: 1px solid var(--it-line) !important;
    background: var(--it-surface) !important;
  }

  #header.it-header .it-header-inner {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
    width: min(100%, 1360px) !important;
    min-height: 72px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  #header.it-header .it-brand {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #header.it-header .it-brand img {
    display: block !important;
  }

  #header.it-header .it-nav-wrap {
    flex: 1 1 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
  }

  #header.it-header .top-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  #header.it-header .top-menu > li {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #header.it-header .top-menu > li > a {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 11px !important;
    border-radius: 9px !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
  }

  #header.it-header .top-menu > li > a.upload,
  #header.it-header .top-menu > li > a.signup {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }
}

/* V4.23: polish the native Single Upload file chooser without changing its
   input name, ID, form submission, or legacy upload JavaScript. */

#body.it-main .it-upload-workspace #div_file .upload_input {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 8px 12px 14px !important;
  color: var(--it-text) !important;
  line-height: 1.45 !important;
}

#body.it-main .it-upload-workspace #div_file input[type="file"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px !important;
  padding: 6px !important;
  border: 1px solid var(--it-line) !important;
  border-radius: 9px !important;
  background: var(--it-panel, #f7fafd) !important;
  color: var(--it-text) !important;
  font: inherit !important;
}

#body.it-main .it-upload-workspace #div_file input[type="file"]::file-selector-button {
  margin: 0 12px 0 0 !important;
  padding: 9px 17px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: var(--it-blue) !important;
  color: #fff !important;
  font: inherit !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

#body.it-main .it-upload-workspace #div_file input[type="file"]::file-selector-button:hover {
  background: var(--it-blue-dark) !important;
}

#body.it-main .it-upload-workspace #div_file input[type="file"]::-webkit-file-upload-button {
  margin: 0 12px 0 0 !important;
  padding: 9px 17px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: var(--it-blue) !important;
  color: #fff !important;
  font: inherit !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

#body.it-main .it-upload-workspace #div_file input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--it-blue-dark) !important;
}

/* V4.28: limit message is a sibling immediately before the upload form. */

#body.it-main .it-upload-workspace #div_html5 > .it-multi-upload-limit {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: both !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 1px !important;
  padding: 0 !important;
  color: var(--it-text, #e6edf7) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  text-align: left !important;
  white-space: normal !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* V4.31: move the complete index upload workspace closer to the header. */

@media (min-width: 901px) {
  #body.it-main:has(.it-upload-workspace) {
    margin-top: 10px !important;
  }

  #body.it-main .it-upload-workspace .it-upload-modes {
    margin-top: 8px !important;
  }
}

/* V4.34: modern blue Single Upload submit button and tighter vertical placement. */

#body.it-main .it-upload-workspace #div_file form > .col-xs-12.text-center {
  margin-top: -8px !important;
  padding-top: 0 !important;
}

#body.it-main .it-upload-workspace #div_file input[type="submit"].btn,
#body.it-main .it-upload-workspace #div_file input[type="submit"].btn-success {
  min-height: 42px !important;
  min-width: 142px !important;
  padding: 10px 28px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #238fc7 !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
  line-height: 20px !important;
  text-shadow: none !important;
  box-shadow: 0 2px 6px rgba(35,143,199,.20) !important;
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

#body.it-main .it-upload-workspace #div_file input[type="submit"].btn:hover,
#body.it-main .it-upload-workspace #div_file input[type="submit"].btn:focus,
#body.it-main .it-upload-workspace #div_file input[type="submit"].btn-success:hover,
#body.it-main .it-upload-workspace #div_file input[type="submit"].btn-success:focus {
  background: #167eaf !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: 0 3px 9px rgba(22,126,175,.25) !important;
  outline: none !important;
}

#body.it-main .it-upload-workspace #div_file input[type="submit"].btn:active,
#body.it-main .it-upload-workspace #div_file input[type="submit"].btn-success:active {
  background: #126d98 !important;
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(22,126,175,.22) !important;
}

/* Upload settings: size each control to its content and give the remainder to Gallery. */

@media (min-width: 901px) {
  #body.it-main .it-upload-workspace .it-upload-settings-row,
  #body.it-main .it-upload-workspace .it-multi-settings {
    display: grid !important;
    gap: 8px !important;
  }

  #body.it-main .it-upload-workspace .it-upload-settings-row > .thumb_size,
  #body.it-main .it-upload-workspace .it-multi-settings > .thumb_size,
  #body.it-main .it-upload-workspace .it-upload-settings-row > .per_row,
  #body.it-main .it-upload-workspace .it-multi-settings > .per_row,
  #body.it-main .it-upload-workspace .it-upload-settings-row > .gallery,
  #body.it-main .it-upload-workspace .it-multi-settings > .gallery {
    min-width: 0 !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  #body.it-main .it-upload-workspace .gallery select {
    min-width: 0 !important;
  }
}

/* V4.24: precise compact widths for the four upload settings. */

@media (min-width: 901px) {
  #body.it-main .it-upload-workspace .it-upload-settings-row,
  #body.it-main .it-upload-workspace .it-multi-settings {
    grid-template-columns: 190px 125px 225px minmax(175px, 1fr) !important;
  }

  #body.it-main .it-upload-workspace select[name="thumb_size"] {
    flex: 0 0 92px !important;
    width: 92px !important;
    max-width: 92px !important;
  }

  #body.it-main .it-upload-workspace .per_row select {
    flex: 0 0 52px !important;
    width: 52px !important;
    max-width: 52px !important;
  }

  #body.it-main .it-upload-workspace select[name="sdomain"],
  #body.it-main .it-upload-workspace select[name="sdomain5"] {
    flex: 0 0 145px !important;
    width: 145px !important;
    max-width: 145px !important;
  }

  #body.it-main .it-upload-workspace .gallery select {
    flex: 0 0 110px !important;
    width: 110px !important;
    max-width: 110px !important;
  }
}

/* V4.48 — Download1 template reliability fixes.
   Keep interstitial timing controlled by the existing template scripts.
   The mobile age gate must remain above the advertisement overlay. */

#rang2 {
  z-index: 99999 !important;
}

#rang2 .cnt {
  position: relative !important;
  z-index: 100000 !important;
  color: #1769b2 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#popupOverlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 5000 !important;
}

#popupOverlay #popupBox {
  position: relative !important;
  z-index: 5001 !important;
}

#popupOverlay .buttonblue {
  position: relative !important;
  z-index: 5002 !important;
  color: #1769b2 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#ageModal {
  z-index: 10000 !important;
}

.butoner > a.embeder,
.butoner > a.ddownloader,
.butoner > a.similarr {
  vertical-align: middle !important;
}

.butoner > a.embeder:hover,
.butoner > a.embeder:focus,
.butoner > a.ddownloader:hover,
.butoner > a.ddownloader:focus,
.butoner > a.similarr:hover,
.butoner > a.similarr:focus {
  border-color: #238fc7 !important;
  background: #238fc7 !important;
  outline: none;
}

.butoner > a img {
  display: block !important;
  box-sizing: border-box !important;
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  height: 26px !important;
  max-height: 26px !important;
  object-fit: contain !important;
}

.butoner > a .hoverr {
  display: none !important;
}

.butoner > a:hover .hoverr,
.butoner > a:focus .hoverr,
.butoner > a:focus-visible .hoverr {
  display: block !important;
}

.butoner > a:hover .nnothover,
.butoner > a:focus .nnothover,
.butoner > a:focus-visible .nnothover {
  display: none !important;
}

@media (max-width: 600px) {
  .butoner > a.embeder,
  .butoner > a.ddownloader,
  .butoner > a.similarr {
    flex-basis: 44px !important;
  }
}

/* V4.49 — stable shared header controls for desktop and mobile.
   No injected text close button: the hamburger itself becomes the close control. */

.it-nav-close {
  display: none !important;
}

@media (min-width: 901px) {
  #header.it-header .it-nav-wrap {
    transition: none !important;
  }

  #header.it-header .it-nav-wrap .top-menu {
    border: 0 !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 900px) {
  body.bk #header.it-header #bulb::before {
    font-size: 20px;
  }

  #header.it-header .it-nav-wrap.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #header.it-header .it-nav-wrap .top-menu,
  html.it-js #header.it-header .it-nav-wrap .top-menu {
    top: 0 !important;
    overscroll-behavior: contain !important;
    border-left: 1px solid var(--it-line) !important;
  }

  #header.it-header .it-nav-wrap.is-open .top-menu {
    transform: translateX(0) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #header.it-header .it-nav-wrap,
  #header.it-header .it-nav-wrap .top-menu {
    transition: none !important;
  }
}

@media (max-width: 900px) {
  #header.it-header #bulb {
    order: 2 !important;
  }

  /* A normal dropdown panel replaces the old full-screen overlay/drawer. */

  #header.it-header .it-nav-wrap {
    top: calc(100% - 1px) !important;
    right: 10px !important;
    left: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-shadow: 0 14px 36px rgba(10, 28, 45, .22) !important;
  }

  #header.it-header .it-nav-wrap .top-menu,
  html.it-js #header.it-header .it-nav-wrap .top-menu {
    inset: auto !important;
    width: 100% !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  #header.it-header .it-nav-wrap .top-menu > li > a {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 480px) {
  #header.it-header .it-header-inner {
    padding-right: 10px !important;
    padding-left: 10px !important;
  }
}

/* V4.52 — Keep the mobile site header out of the interstitial until Continue. */

@media (max-width: 900px) {
  body.it-mobile-interstitial-active #header.it-header {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* V4.53 — Header action group and full-viewport mobile navigation.
   Replaces conflicting earlier V4.13–V4.52 drawer/dropdown positioning. */

#header.it-header .it-header-actions {
  box-sizing: border-box !important;
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 20003 !important;
}

#header.it-header #bulb {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 40px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--it-line) !important;
  border-radius: 10px !important;
  background: var(--it-surface) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--it-text) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  position: relative !important;
  float: none !important;
  inset: auto !important;
  transform: none !important;
}

#header.it-header #bulb::before {
  display: block !important;
  position: static !important;
  inset: auto !important;
  content: "☾" !important;
  font-family: Arial, "Segoe UI Symbol", sans-serif !important;
  font-size: 23px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: var(--it-text) !important;
  text-shadow: none !important;
}

body.bk #header.it-header #bulb {
  background: #202d3d !important;
  background-image: none !important;
  border-color: #52647a !important;
}

body.bk #header.it-header #bulb::before {
  content: "☀" !important;
  color: #f6d77a !important;
}

#header.it-header .it-nav-close {
  display: none !important;
}

@media (min-width: 901px) {
  #header.it-header .it-header-actions {
    gap: 8px !important;
  }

  #header.it-header .it-nav-toggle {
    display: none !important;
  }

  #header.it-header .it-nav-wrap {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #header.it-header .it-nav-wrap .top-menu {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    flex-direction: row !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media (max-width: 900px) {
  #header.it-header {
    top: 0 !important;
    z-index: 20000 !important;
    overflow: visible !important;
  }

  #header.it-header .it-header-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #header.it-header .it-brand {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
  }

  #header.it-header .it-brand img {
    display: block !important;
    margin: 0 !important;
  }

  #header.it-header #bulb,
  #header.it-header .it-nav-toggle {
    flex: 0 0 42px !important;
    padding: 0 !important;
  }

  #header.it-header .it-nav-toggle {
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 1px solid var(--it-line) !important;
    background: var(--it-surface) !important;
    background-image: none !important;
    color: var(--it-text) !important;
    box-shadow: none !important;
    cursor: pointer !important;
    float: none !important;
  }

  #header.it-header .it-nav-toggle svg {
    display: block !important;
    opacity: 1 !important;
  }

  /* Full-screen backdrop: menu card is attached to the viewport, not clipped by header height. */

  #header.it-header .it-nav-wrap {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 20001 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(11, 23, 38, .58) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    transition: none !important;
  }

  #header.it-header .it-nav-wrap.is-open {
    display: block !important;
  }

  #header.it-header .it-nav-wrap .top-menu,
  html.it-js #header.it-header .it-nav-wrap .top-menu {
    box-sizing: border-box !important;
    display: flex !important;
    position: absolute !important;
    top: calc(env(safe-area-inset-top, 0px) + 76px) !important;
    right: 12px !important;
    bottom: 12px !important;
    left: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    width: min(370px, calc(100vw - 24px)) !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid var(--it-line) !important;
    border-radius: 16px !important;
    background: var(--it-surface) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .25) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    list-style: none !important;
  }

  #header.it-header .it-nav-wrap .top-menu > li {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  #header.it-header .it-nav-wrap .top-menu > li > a {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 46px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--it-text) !important;
    font: 600 15px/1.3 system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
    text-align: left !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #header.it-header .it-nav-wrap .top-menu > li > a:hover,
  #header.it-header .it-nav-wrap .top-menu > li > a:focus-visible {
    background: rgba(35, 143, 199, .10) !important;
    color: var(--it-blue-dark) !important;
  }

  body.bk #header.it-header .it-nav-wrap .top-menu > li > a {
    color: #edf3fa !important;
  }

  body.bk #header.it-header .it-nav-wrap .top-menu > li > a:hover,
  body.bk #header.it-header .it-nav-wrap .top-menu > li > a:focus-visible {
    background: #24364a !important;
    color: #8bd5f5 !important;
  }

  body.it-menu-open {
    overflow: hidden !important;
  }

  body.it-mobile-interstitial-active #header.it-header {
    display: none !important;
  }
}

/* V4.54 — Compact mobile header (approximately 15% smaller).
   Mobile-only: keep desktop header sizing and navigation unchanged. */

@media (max-width: 900px) {
  #header.it-header #bulb,
  #header.it-header .it-nav-toggle {
    flex-basis: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 9px !important;
  }

  #header.it-header #bulb::before {
    font-size: 20px !important;
  }

  #header.it-header .it-nav-toggle svg {
    width: 19px !important;
    height: 19px !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    font-size: 27px !important;
  }

  #header.it-header .it-nav-wrap .top-menu {
    top: calc(env(safe-area-inset-top, 0px) + 64px) !important;
  }
}

@media (max-width: 480px) {
  #header.it-header #bulb::before {
    font-size: 19px !important;
  }

  #header.it-header .it-nav-wrap .top-menu {
    top: calc(env(safe-area-inset-top, 0px) + 60px) !important;
  }
}

/* V4.55 — Reduce mobile header height and remove inherited empty vertical space.
   The outer header previously retained its 76px minimum even after the inner
   row was made smaller. These rules apply only to mobile/tablet widths. */

@media (max-width: 900px) {
  #header.it-header {
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #header.it-header .it-header-inner {
    box-sizing: border-box !important;
    min-height: 60px !important;
    height: auto !important;
    padding: 5px 10px !important;
  }
}

/* V4.56 — Mobile header experiment: menu left, larger centered logo, theme right.
   Keep the compact 58px row height; desktop layout is unchanged. */

@media (max-width: 900px) {
  #header.it-header .it-header-inner {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    align-items: center !important;
    justify-content: initial !important;
    gap: 8px !important;
  }

  #header.it-header .it-nav-toggle {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    order: 0 !important;
    isolation: isolate !important;
    overflow: hidden !important;
  }

  #header.it-header .it-brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    align-self: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #header.it-header .it-brand img {
    width: min(172px, 46vw) !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #header.it-header .it-header-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    z-index: 20004 !important;
  }

  #header.it-header #bulb {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    border-radius: 9px !important;
  }

  /* The close glyph fully replaces the hamburger inside the same left button. */

  #header.it-header .it-nav-toggle[aria-expanded="true"] {
    isolation: isolate !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"] svg {
    visibility: hidden !important;
    opacity: 0 !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    z-index: 2 !important;
    inset: 0 !important;
    place-items: center !important;
    color: var(--it-text) !important;
    font: 27px/1 Arial, sans-serif !important;
  }
}

@media (max-width: 480px) {
  #header.it-header .it-header-inner {
    grid-template-columns: 34px minmax(0, 1fr) 34px !important;
    min-height: 58px !important;
    height: auto !important;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  #header.it-header .it-header-actions {
    flex-basis: 34px !important;
    width: 34px !important;
  }

  #header.it-header #bulb,
  #header.it-header .it-nav-toggle {
    flex-basis: 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 8px !important;
  }

  #header.it-header .it-nav-toggle svg {
    width: 18px !important;
    height: 18px !important;
  }
}

/* The first mobile banner is a fixed 378x245 creative. Scale the iframe
   as a whole to the available content width instead of allowing side-scroll. */

.it-mobile-top-ad {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 378px !important;
  margin: 0 auto 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

.it-mobile-top-ad iframe {
  display: block !important;
  flex: 0 0 378px !important;
  width: 378px !important;
  min-width: 378px !important;
  max-width: none !important;
  height: 245px !important;
  margin: 0 !important;
  border: 0 !important;
  transform-origin: top center !important;
}

/* V4.57 — mobile logo polish, fixed-position menu close glyph and compact image actions. */

@media (max-width: 480px) {
  /* +10% over V4.56, without increasing the 58px header row. */

  #header.it-header .it-brand img {
    width: min(170px, 57.2vw) !important;
    max-width: 57.2vw !important;
    max-height: 48px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Keep the X exactly centered over the same button position as the hamburger. */

  #header.it-header .it-nav-toggle[aria-expanded="true"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    inset: auto !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    line-height: 1 !important;
  }
}

/* V4.57 — compact mobile image action row; reduce the dead space above/below it. */

@media (max-width: 600px) {
  .butoner > a.embeder,
  .butoner > a.ddownloader,
  .butoner > a.similarr {
    border-width: 1px !important;
  }
}

/* V4.58 — definitive mobile menu glyph alignment and image action controls. */

@media (max-width: 900px) {
  #header.it-header .it-nav-toggle {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 0 !important;
  }

  /* Draw the X as two geometric strokes, not a text glyph (no font baseline shift). */

  #header.it-header .it-nav-toggle[aria-expanded="true"]::before,
  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    min-width: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }
}

/* The mobile link-code panel starts closed; desktop download layout is untouched. */

@media (max-width: 600px) {
  .cccodes {
    display: none;
  }
}

@media (max-width: 600px) {
  .butoner > a.embeder,
  .butoner > a.ddownloader,
  .butoner > a.similarr {
    vertical-align: middle !important;
  }

  .butoner > a img {
    flex: 0 0 22px !important;
  }
}

/* V4.59 — authoritative mobile rules.
   Earlier iterations accumulated conflicting rules; these final selectors
   deliberately override them without removing legacy desktop/site-wide CSS. */

@media (max-width: 900px) {
  /* Keep the menu control in its original flex position in BOTH states.
     Earlier rules changed the expanded button to position:fixed/top/right. */

  #header.it-header {
    position: relative !important;
  }

  #header.it-header .it-header-inner {
    position: relative !important;
  }

  #header.it-header .it-nav-toggle,
  #header.it-header .it-nav-toggle[aria-expanded="true"] {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
    transform: none !important;
    translate: none !important;
    align-self: center !important;
    vertical-align: middle !important;
    z-index: 12010 !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"] svg {
    display: none !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::before,
  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    content: "" !important;
    position: absolute !important;
    display: block !important;
    width: 21px !important;
    height: 2px !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 2px !important;
    background: currentColor !important;
    transform-origin: center !important;
    pointer-events: none !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  #header.it-header .it-nav-toggle[aria-expanded="true"]::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }

  /* Compact image action buttons also in landscape phones/tablets. */

  .butoner {
    height: auto !important;
  }

  .butoner > a.embeder,
  .butoner > a.ddownloader,
  .butoner > a.similarr {
    max-width: 36px !important;
    max-height: 36px !important;
  }

  .butoner > a img {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
  }

  .butoner > a .hoverr {
    display: none !important;
  }

  .butoner > a:hover .hoverr,
  .butoner > a:focus .hoverr {
    display: block !important;
  }

  .butoner > a:hover .nnothover,
  .butoner > a:focus .nnothover {
    display: none !important;
  }

  /* Link panel is a normal block immediately below the action row. */

  #image-link-codes.cccodes {
    position: relative !important;
    inset: auto !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 8px 0 12px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #image-link-codes .nav-tabs > li > a {
    min-height: 0 !important;
    padding: 9px 5px !important;
    white-space: normal !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  #image-link-codes .link_textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* V4.60 — mobile action buttons and top banner spacing */

@media (max-width: 900px) {
  .butoner {
    min-height: 0 !important;
    line-height: 0 !important;
  }

  .butoner > a.embeder,
  .butoner > a.ddownloader,
  .butoner > a.similarr {
    flex-basis: clamp(42px, 12vw, 48px) !important;
    max-width: clamp(42px, 12vw, 48px) !important;
    max-height: clamp(42px, 12vw, 48px) !important;
  }

  .butoner > a img {
    width: clamp(26px, 7vw, 30px) !important;
    min-width: clamp(26px, 7vw, 30px) !important;
    max-width: clamp(26px, 7vw, 30px) !important;
    height: clamp(26px, 7vw, 30px) !important;
    min-height: clamp(26px, 7vw, 30px) !important;
    max-height: clamp(26px, 7vw, 30px) !important;
  }

  #image-link-codes.cccodes {
    margin-bottom: 8px !important;
  }

  .it-mobile-top-ad {
    margin-bottom: 1px !important;
  }

  .it-mobile-top-ad iframe {
    height: 250px !important;
  }
}

/* V4.62 — position the top mobile ad closer to the header */

@media (max-width: 900px) {
  .it-mobile-top-ad {
    margin-top: -8px !important;
    padding-top: 0 !important;
  }

  #header.it-header + .it-mobile-top-ad,
  #header.it-header + * .it-mobile-top-ad {
    margin-top: -8px !important;
  }
}

/* V4.63 — tighten spacing between the viewed image and the three ad creatives */

@media (max-width: 900px) {
  .it-mobile-inline-ad-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    margin: 3px auto 5px !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
  }

  .it-mobile-inline-ad-stack > a,
  .it-mobile-inline-ad-stack > iframe,
  .it-mobile-inline-ad-stack > video,
  .it-mobile-inline-ad-stack iframe,
  .it-mobile-inline-ad-stack video {
    display: block !important;
    flex: 0 0 auto !important;
    margin: 0 auto !important;
    vertical-align: top !important;
  }

  .it-mobile-inline-ad-stack iframe {
    max-width: 100% !important;
  }

  .it-mobile-inline-ad-stack br {
    display: none !important;
  }
}

/* V4.64 — light-theme image canvas and action-button finish */

@media (max-width: 900px) {
  /* White canvas behind the displayed image in light theme. */

  body:not(.bk) a[data-fancybox="gallery"] {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body:not(.bk) a[data-fancybox="gallery"] .pic {
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* Light theme: clean white controls rather than dark navy boxes. */

  body:not(.bk) .butoner > a.embeder,
  body:not(.bk) .butoner > a.ddownloader,
  body:not(.bk) .butoner > a.similarr {
    background: #ffffff !important;
    border: 1px solid #d7dee7 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(28, 43, 62, 0.09) !important;
    color: #263548 !important;
  }

  body:not(.bk) .butoner > a.embeder:active,
  body:not(.bk) .butoner > a.ddownloader:active,
  body:not(.bk) .butoner > a.similarr:active,
  body:not(.bk) .butoner > a.embeder:focus-visible,
  body:not(.bk) .butoner > a.ddownloader:focus-visible,
  body:not(.bk) .butoner > a.similarr:focus-visible {
    box-shadow: 0 1px 3px rgba(28, 43, 62, 0.12) !important;
  }

  body:not(.bk) .butoner > a img {
    opacity: 0.94 !important;
  }
}

/* V4.66 — force the new SVG action icons, true white controls, and tighter spacing */

@media (max-width: 900px) {
  .butoner {
    background: transparent !important;
  }

  .butoner .it-action-icon {
    opacity: 1 !important;
  }

  .butoner > a img {
    display: none !important;
  }

  .butoner + * {
    margin-top: 0 !important;
  }

  #image-link-codes.cccodes {
    margin-top: 2px !important;
  }
}

/* V4.67 — white image-page canvas and remove artificial footer gap on mobile */

@media (max-width: 900px) {
  body:not(.bk) {
    background: #fff !important;
  }

  body:not(.bk) .container-fluid,
  body:not(.bk) #body.it-main {
    background: #fff !important;
  }

  #body.it-main {
    min-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  #body.it-main .butoner {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  #body.it-main .butoner + #image-link-codes {
    margin-top: 0 !important;
  }

  #footerMain.it-footer {
    margin-top: 8px !important;
  }
}

/* V4.68 — polished link icon and genuinely theme-aware action buttons */

@media (max-width: 900px) {
  .butoner .it-action-icon {
    min-width: 27px !important;
    max-width: 27px !important;
  }

  body.bk .butoner > a.embeder:active,
  body.bk .butoner > a.ddownloader:active,
  body.bk .butoner > a.similarr:active,
  body.bk .butoner > a.embeder:focus-visible,
  body.bk .butoner > a.ddownloader:focus-visible,
  body.bk .butoner > a.similarr:focus-visible {
    background: #2b394a !important;
    border-color: #71849a !important;
    outline: none !important;
  }

  body:not(.bk) .butoner > a.embeder:active,
  body:not(.bk) .butoner > a.ddownloader:active,
  body:not(.bk) .butoner > a.similarr:active,
  body:not(.bk) .butoner > a.embeder:focus-visible,
  body:not(.bk) .butoner > a.ddownloader:focus-visible,
  body:not(.bk) .butoner > a.similarr:focus-visible {
    background: #f2f5f9 !important;
    border-color: #aebdce !important;
    outline: none !important;
  }
}

/* V4.69 — force the Report icon red in light mode without changing its button surface */

@media (max-width: 900px) {
  #body.it-main .butoner > a.it-report-button,
  #body.it-main .butoner > a.it-report-button:link,
  #body.it-main .butoner > a.it-report-button:visited,
  #body.it-main .butoner > a[title="Report"] {
    color: #dc3545 !important;
  }

  #body.it-main .butoner > a.it-report-button .it-action-icon,
  #body.it-main .butoner > a[title="Report"] .it-action-icon {
    stroke: #dc3545 !important;
    color: #dc3545 !important;
  }

  body.bk #body.it-main .butoner > a.it-report-button,
  body.bk #body.it-main .butoner > a.it-report-button:link,
  body.bk #body.it-main .butoner > a.it-report-button:visited,
  body.bk #body.it-main .butoner > a[title="Report"],
  body.bk #body.it-main .butoner > a.it-report-button .it-action-icon,
  body.bk #body.it-main .butoner > a[title="Report"] .it-action-icon {
    color: #ff6b75 !important;
    stroke: #ff6b75 !important;
  }
}

/* V4.70 — desktop image hit-area and shared desktop/mobile action controls */

.it-image-zoom-link {
  display: table !important;
  width: fit-content !important;
  max-width: 75% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 0 !important;
  cursor: zoom-in !important;
}

.it-image-zoom-link .pic {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
}

.butoner {
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  margin: 12px auto 8px !important;
  padding: 0 12px !important;
  text-align: center !important;
}

.butoner > a.embeder,
.butoner > a.ddownloader,
.butoner > a.similarr {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 48px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #d7dee7 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 2px 5px rgba(28,43,62,.09) !important;
  color: #263548 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}

.butoner > a.embeder:hover,
.butoner > a.ddownloader:hover,
.butoner > a.similarr:hover,
.butoner > a.embeder:focus-visible,
.butoner > a.ddownloader:focus-visible,
.butoner > a.similarr:focus-visible {
  background: #f3f6fa !important;
  border-color: #aebdce !important;
  box-shadow: 0 2px 7px rgba(28,43,62,.13) !important;
  outline: none !important;
}

.butoner .it-action-icon {
  display: block !important;
  width: 25px !important;
  height: 25px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.butoner > a.it-report-button,
.butoner > a[title="Report"] {
  color: #dc3545 !important;
}

body.bk .butoner > a.embeder,
body.bk .butoner > a.ddownloader,
body.bk .butoner > a.similarr {
  background: #202a37 !important;
  border-color: #52647a !important;
  color: #e8f0fa !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.22) !important;
}

body.bk .butoner > a.embeder:hover,
body.bk .butoner > a.ddownloader:hover,
body.bk .butoner > a.similarr:hover,
body.bk .butoner > a.embeder:focus-visible,
body.bk .butoner > a.ddownloader:focus-visible,
body.bk .butoner > a.similarr:focus-visible {
  background: #2a3849 !important;
  border-color: #71869f !important;
}

body.bk .butoner > a.it-report-button,
body.bk .butoner > a[title="Report"] {
  color: #ff6b75 !important;
}

@media (max-width: 900px) {
  .it-image-zoom-link {
    max-width: 100% !important;
  }
}

/* V4.72 — Increase desktop header logo by 20% from the original 184px size; mobile sizing remains unchanged. */

@media (min-width: 901px) {
  #header.it-header .it-brand img {
    width: 221px !important;
    max-width: 42vw !important;
    height: auto !important;
  }
}

/* V4.74 — My Account follows the same neutral nav treatment as File Manager,
   Reports and Earn Money. Upload remains the only filled blue navigation button. */

@media (min-width: 901px) {
  body #header.it-header .top-menu > li > a.myaccount,
  body #header.it-header .top-menu > li > a.myaccount:link,
  body #header.it-header .top-menu > li > a.myaccount:visited,
  body #header.it-header .top-menu > li.active > a.myaccount,
  body #header.it-header .top-menu > li > a.myaccount.active {
    background: transparent !important;
    color: var(--it-muted) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
  }

  body #header.it-header .top-menu > li > a.myaccount:hover,
  body #header.it-header .top-menu > li > a.myaccount:focus,
  body #header.it-header .top-menu > li > a.myaccount:focus-visible {
    background: rgba(35, 143, 199, .10) !important;
    color: var(--it-blue-dark) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }

  body.bk #header.it-header .top-menu > li > a.myaccount,
  body.bk #header.it-header .top-menu > li > a.myaccount:link,
  body.bk #header.it-header .top-menu > li > a.myaccount:visited,
  body.bk #header.it-header .top-menu > li.active > a.myaccount,
  body.bk #header.it-header .top-menu > li > a.myaccount.active {
    background: transparent !important;
    color: #d8e3f0 !important;
  }

  body.bk #header.it-header .top-menu > li > a.myaccount:hover,
  body.bk #header.it-header .top-menu > li > a.myaccount:focus,
  body.bk #header.it-header .top-menu > li > a.myaccount:focus-visible {
    background: #24364a !important;
    color: #8bd5f5 !important;
  }
}
