
@font-face {
  font-family: 'Open Sans Local';
  src: url('/assets/fonts/open-sans-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'imgbb';
  src: url('/assets/fonts/imgbb.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #f3f3f3;
  color: #262626;
  font-family: 'Open Sans Local', 'Open Sans', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body.overlay-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

[class^="icon-"], [class*=" icon-"] {
  font-family: 'imgbb' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}
.icon-cloud-arrow-up:before { content: "\e915"; }
.icon-images-stack:before { content: "\e90a"; }
.icon-info-circle:before { content: "\e90f"; }
.icon-language:before { content: "\e917"; }
.icon-login:before { content: "\e91a"; }
.icon-check-circle:before { content: "\e92a"; }

.site-header {
  position: relative;
  height: 57px;
  background: #fff;
  border-bottom: 1px solid #dadada;
  z-index: 10;
}
.site-header__left,
.site-header__right {
  position: absolute;
  top: 0;
  height: 57px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-header__left { left: 12px; }
.site-header__right { right: 12px; }
.site-header__center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 57px;
}
.site-logo img {
  width: 132px;
  height: auto;
  display: block;
}
.header-link {
  position: relative;
  color: #414141;
  font-size: 16px;
  line-height: 57px;
  height: 57px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.header-link__icon {
  font-size: 19px;
  color: #454545;
}
.header-link--lang .header-link__icon { font-size: 20px; }
.header-link__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #666;
  margin-left: 1px;
}
.header-link--nav .header-link__icon {
  font-size: 16px;
  margin-right: 2px;
}
.header-link.is-active {
  color: #3c83bd;
}
.header-link.is-active .header-link__icon { color: #3c83bd; }
.header-link.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #2f86d0;
}

main { min-height: calc(100vh - 57px); }
.home-background {
  min-height: calc(100vh - 57px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px 72px;
  background: #f5f5f5;
}
.hero-section {
  width: 100%;
  background: transparent;
  padding: 0;
}
.hero-section__inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero-section h1 {
  margin: 0 auto 14px;
  max-width: 1200px;
  font-size: 68px;
  line-height: 1.08;
  font-weight: 700;
  color: #2d2d2d;
  text-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.hero-section p {
  margin: 0 auto;
  max-width: 980px;
  font-size: 25px;
  line-height: 1.43;
  color: #4c4c4c;
}
.hero-button {
  margin-top: 20px;
  border: 0;
  background: #2f86d0;
  color: #fff;
  min-width: 217px;
  height: 59px;
  padding: 0 24px;
  font-size: 16px;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.hero-button:hover,
.upload-button:hover,
.major-button:hover,
.copy-button:hover { filter: brightness(0.96); }


.upload-overlay {
  position: fixed;
  inset: 57px 0 0 0;
  z-index: 20;
}
.upload-overlay[hidden] { display: none; }
.upload-overlay__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(245,245,245,.96) 0 76%, rgba(0,0,0,.72) 76% 100%);
}
.upload-overlay__panel {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 57px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px 28px;
}
.upload-overlay__topline {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 36px;
}
.overlay-action {
  border: 0;
  background: transparent;
  color: #4d4d4d;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
}
.upload-stage {
  display: none;
  text-align: center;
  padding: 20px 0 0;
}
.upload-stage[data-stage="selected"] {
  padding-top: 4px;
}
.upload-stage.is-active { display: block; }
.stage-icon {
  margin: 8px auto 20px;
  position: relative;
}
.stage-icon--glyph {
  width: auto;
  height: auto;
  line-height: 1;
}
.stage-icon--glyph span {
  display: inline-block;
  color: #5da2dd;
}
.stage-icon--cloud span { font-size: 136px; }
.stage-icon--image span { font-size: 136px; }
.stage-icon--success {
  width: 108px;
  height: 108px;
}
.stage-icon--success span {
  display: inline-block;
  font-size: 108px;
  color: #2fb758;
}
.stage-icon--error,
.stage-icon--error::before,
.stage-icon--error::after { box-sizing: border-box; }
.stage-icon--error {
  width: 108px;
  height: 108px;
}
.stage-icon--error::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #c94a4a;
}
.stage-icon--error::after {
  content: '!';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 56px;
  font-weight: 700;
}
.upload-stage h2 {
  margin: 0 auto 12px;
  max-width: 900px;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 400;
  color: #2f2f2f;
}
.upload-stage p {
  margin: 0 auto;
  max-width: 860px;
  font-size: 16px;
  line-height: 1.45;
  color: #555;
}
.text-link {
  border: 0;
  background: transparent;
  color: #4f95da;
  cursor: pointer;
  padding: 0;
}
.url-import {
  max-width: 620px;
  margin: 24px auto 0;
}
.url-import textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #cfcfcf;
  padding: 14px;
  resize: vertical;
  background: #fff;
}
.url-import__actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.major-button,
.minor-button,
.upload-button,
.copy-button {
  border: 0;
  cursor: pointer;
  height: 45px;
  padding: 0 28px;
  font-size: 18px;
  letter-spacing: 1px;
}
.major-button { background: #2f86d0; color: #fff; }
.minor-button { background: #d9d9d9; color: #353535; }
.selection-grid { margin-top: 22px; }
.thumb-stack {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 102px;
}
.thumb-card {
  position: relative;
  width: 104px;
  height: 104px;
  background: #d8d8d8;
  overflow: hidden;
}
.thumb-card img { width: 100%; height: 100%; object-fit: cover; display:block; cursor:pointer; }
.thumb-card__remove,
.thumb-card__edit {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid #b0b0b0;
  border-radius: 50%;
  background: #fff;
  color: #5f5f5f;
  cursor: pointer;
  padding: 0;
}
.thumb-card__remove {
  top: -4px; left: -4px; font-size: 16px; line-height: 20px;
}
.thumb-card__edit { top: 18px; left: -4px; }
.thumb-card__edit::before { content: '✎'; font-size: 12px; }
.selection-controls { margin-top: 18px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #2f2f2f;
}
.form-select {
  width: 280px;
  max-width: calc(100vw - 40px);
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfcfcf;
  background: #f2f2f2;
  color: #333;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  margin-top: 18px;
  background: #2fb758;
  color: #fff;
}
.upload-button--inline { text-decoration: none; }
.progress-gallery {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 96px;
}
.progress-card {
  position: relative;
  width: 96px;
  height: 96px;
  background: #d8d8d8;
  overflow: hidden;
}
.progress-card img { width: 100%; height: 100%; object-fit: cover; display:block; }
.progress-card__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 31px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,.42);
  background: rgba(0,0,0,.14);
}
.upload-stage--success {
  max-width: 640px;
  margin: 0 auto;
}
.success-thumb {
  margin: 20px auto 18px;
  width: 104px;
  height: 104px;
  background: #d8d8d8;
  overflow: hidden;
}
.success-thumb img { width: 100%; height: 100%; object-fit: cover; }

.success-thumbs-grid {
  margin: 20px auto 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 420px;
}
.success-thumbs-grid__item {
  display: block;
  width: 104px;
  height: 104px;
  background: #d8d8d8;
  overflow: hidden;
}
.success-thumbs-grid__item img { width: 100%; height: 100%; object-fit: cover; display:block; }
.upload-stage--success-multi { max-width: 760px; }
.result-linkbox--multi { max-width: 760px; }
.copy-row--stack { flex-direction: column; gap: 10px; }
.copy-row--stack .copy-button { border-left: 1px solid #cfcfcf; }
.copy-row textarea { white-space: pre; }
.result-linkbox {
  width: 100%;
  max-width: 610px;
  margin: 12px auto 0;
  text-align: left;
}
.result-linkbox label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}
.copy-row { display: flex; align-items: stretch; gap: 0; }
.copy-row input,
.copy-row textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid #cfcfcf;
  background: #f4f4f4;
  color: #333;
  padding: 13px 14px;
}
.copy-row textarea { min-height: 110px; resize: vertical; }
.copy-button {
  min-width: 168px;
  background: #d7d7d7;
  color: #2f2f2f;
  border-left: 0;
}
.view-page {
  background: #f3f3f3;
  min-height: calc(100vh - 57px);
}
.view-page__inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 70px 20px 50px;
}
.view-frame {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.view-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.view-empty {
  max-width: 560px;
  margin: 120px auto 0;
  text-align: center;
}
.view-empty h1 { margin: 0 0 12px; font-size: 34px; }
.view-empty p { margin: 0 0 24px; font-size: 18px; color: #555; }
.album-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.album-card {
  display: block;
  background: #fff;
  padding: 8px;
}
.album-card img { display: block; width: 100%; height: 180px; object-fit: cover; }


.editor-modal[hidden] { display: none; }
.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.editor-modal__shade {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}
.editor-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 612px;
  margin: 28px auto;
  background: #fff;
  min-height: 120px;
  padding: 24px 28px 30px;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.editor-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.editor-modal__title {
  margin: 0;
  font-size: 23px;
  font-weight: 400;
  color: #2f2f2f;
}
.editor-modal__close {
  border: 0;
  background: transparent;
  color: #2f2f2f;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.editor-preview {
  width: 100%;
  background: #f2f2f2;
  margin-bottom: 18px;
  overflow: hidden;
}
.editor-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.editor-field { margin-bottom: 16px; text-align: left; }
.editor-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: #333;
}
.editor-field__optional {
  color: #999;
  font-weight: 400;
}
.editor-input, .editor-textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  background: #f4f4f4;
  color: #333;
  padding: 10px 12px;
}
.editor-input { height: 44px; }
.editor-textarea { min-height: 92px; resize: vertical; }
.editor-size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 210px;
}
.editor-submit {
  border: 0;
  background: #d9d9d9;
  color: #2f2f2f;
  min-width: 112px;
  height: 44px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}
@media (max-width: 980px) {
  .site-header { height: auto; padding: 10px 0 12px; }
  .site-header__left,
  .site-header__right,
  .site-header__center {
    position: static;
    height: auto;
    justify-content: center;
  }
  .site-header__left,
  .site-header__right { margin-bottom: 8px; }
  .site-header__center { margin-bottom: 8px; }
  .header-link { line-height: 1; height: auto; }
  .header-link.is-active::after { bottom: -10px; }
  .site-logo img { width: 124px; }
  .home-background { align-items: flex-start; padding-top: 24px; }
  .hero-section h1 { font-size: 44px; text-shadow: 0 2px 4px rgba(0,0,0,.16); }
  .hero-section p { font-size: 20px; }
  .upload-overlay { inset: 110px 0 0 0; }
  .upload-overlay__shade { background: linear-gradient(to bottom, rgba(245,245,245,.96) 0 78%, rgba(0,0,0,.72) 78% 100%); }
  .upload-stage h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  .home-background { padding: 18px 14px 40px; }
  .site-logo img { width: 118px; }
  .hero-section h1 { font-size: 38px; }
  .hero-section p { font-size: 18px; max-width: 560px; }
  .hero-button,
  .major-button,
  .minor-button,
  .upload-button,
  .copy-button { width: 100%; min-width: 0; }
  .upload-overlay { inset: 72px 0 0 0; }
  .upload-overlay__panel { padding-inline: 14px; }
  .upload-overlay__shade { background: linear-gradient(to bottom, rgba(245,245,245,.96) 0 80%, rgba(0,0,0,.74) 80% 100%); }
  .upload-stage h2 { font-size: 24px; max-width: 340px; }
  .upload-stage p { max-width: 340px; }
  .selection-controls { max-width: 320px; margin-inline: auto; }
  .copy-row { flex-direction: column; gap: 10px; }
  .copy-button { border-left: 1px solid #cfcfcf; }
  .form-select { width: 100%; }
  .editor-modal__dialog { margin: 10px; padding: 18px 16px 20px; }
  .editor-size-row { max-width: none; }
}


@media (max-width: 640px) {
  .site-header {
    height: 58px;
    padding: 0;
  }
  .header-link--info,
  .site-header__right .header-link--nav:not(.is-active) {
    display: none;
  }
  .site-header__left,
  .site-header__right {
    position: absolute;
    top: 0;
    height: 58px;
    margin: 0;
    gap: 10px;
    align-items: center;
  }
  .site-header__left { left: 10px; }
  .site-header__right { right: 10px; }
  .site-header__center {
    position: static;
    height: 58px;
    margin: 0;
    justify-content: center;
  }
  .site-logo img { width: 104px; }
  .header-link {
    height: 58px;
    line-height: 58px;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
  }
  .header-link__icon { font-size: 15px; }
  .header-link--lang .header-link__icon { font-size: 15px; }
  .header-link__caret { display: none; }
  .header-link.is-active::after { bottom: -1px; height: 3px; }

  main,
  .home-background {
    min-height: calc(100vh - 58px);
  }
  .home-background {
    align-items: center;
    justify-content: center;
    padding: 24px 22px 44px;
  }
  .hero-section__inner {
    max-width: 340px;
  }
  .hero-section h1 {
    font-size: 32px;
    line-height: 1.13;
    max-width: 320px;
    margin-bottom: 14px;
  }
  .hero-section p {
    font-size: 16px;
    line-height: 1.5;
    max-width: 320px;
  }
  .hero-button {
    width: 100%;
    max-width: 300px;
    height: 56px;
    margin-top: 24px;
  }

  .upload-overlay {
    inset: 58px 0 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .upload-overlay__shade {
    background: rgba(245,245,245,.98);
  }
  .upload-overlay__panel {
    max-width: 390px;
    height: calc(100dvh - 58px);
    min-height: calc(100dvh - 58px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px 18px 132px;
  }
  .upload-overlay__topline {
    min-height: 32px;
    margin-bottom: 4px;
  }
  .overlay-action {
    font-size: 16px;
    padding: 4px 0;
  }
  .upload-stage {
    padding-top: 6px;
  }
  .upload-stage[data-stage="selected"],
  .upload-stage[data-stage="progress"],
  .upload-stage[data-stage="success"] {
    padding-top: 6px;
  }
  .stage-icon {
    margin: 8px auto 18px;
  }
  .stage-icon--cloud span,
  .stage-icon--image span {
    font-size: 112px;
  }
  .stage-icon--success,
  .stage-icon--success span,
  .stage-icon--error {
    width: 96px;
    height: 96px;
    font-size: 96px;
  }
  .upload-stage h2 {
    max-width: 320px;
    font-size: 26px;
    line-height: 1.32;
    margin-bottom: 14px;
  }
  .upload-stage p {
    max-width: 320px;
    font-size: 15px;
    line-height: 1.45;
  }
  .url-import {
    max-width: 320px;
  }
  .selection-grid {
    margin-top: 20px;
  }
  .thumb-stack {
    min-height: 118px;
    gap: 12px;
    margin-bottom: 20px;
  }
  .thumb-card {
    width: 118px;
    height: 118px;
  }
  .thumb-card__remove,
  .thumb-card__edit {
    width: 30px;
    height: 30px;
    left: -10px;
  }
  .thumb-card__remove {
    top: -10px;
    font-size: 20px;
    line-height: 26px;
  }
  .thumb-card__edit {
    top: 18px;
  }
  .selection-controls {
    max-width: 320px;
    margin: 12px auto 0;
  }
  .form-label {
    text-align: left;
    font-size: 14px;
    margin-bottom: 8px;
  }
  .form-select {
    width: 100%;
    max-width: 320px;
    height: 48px;
    background: #f2f2f2;
  }
  .upload-button {
    width: 200px;
    height: 56px;
    margin-top: 18px;
  }
  .progress-thumb,
  .success-thumb {
    width: 118px;
    height: 118px;
    margin-top: 22px;
  }
  .progress-thumb__value {
    font-size: 30px;
  }
  .upload-stage--success {
    max-width: 340px;
  }
  .result-linkbox {
    max-width: 320px;
    margin-top: 16px;
  }
  .result-linkbox label {
    font-size: 16px;
  }
  .copy-row {
    flex-direction: column;
    gap: 10px;
  }
  .copy-row input,
  .copy-row textarea {
    min-height: 52px;
  }
  .copy-button {
    width: 100%;
    min-width: 0;
    height: 48px;
    border-left: 1px solid #cfcfcf;
  }

  .editor-modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .editor-modal__dialog {
    margin: 0;
    max-width: none;
    min-height: 100dvh;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 16px 132px;
  }
  .editor-modal__header {
    margin-bottom: 14px;
  }
  .editor-preview {
    margin-bottom: 16px;
  }
  .editor-preview img {
    width: 100%;
    max-height: 42vh;
    object-fit: contain;
    background: #f2f2f2;
  }
  .editor-size-row {
    max-width: none;
  }
}
