/* idb.lv — оформление сайта: «Алюминий на графите».
   Тёмный стол, светлые листы бумаги на проволочных кольцах,
   панель загрузки — плита оранжевого анодированного алюминия на стальных пластинах. */

:root {
  --orange: #ff7a00;
  --orange-dark: #cf5a00;
  --orange-soft: #f6ecdd;
  --text: #2c2925;
  --muted: #7d766c;
  --line: #e4ded4;
  --paper: #f7f3ec;
  --radius: 8px;

  /* фактуры: зерно и шлифовка (шум, а не нарисованные линии) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.7 .7 .7 0 -.55 .7 .7 .7 0 -.55 .7 .7 .7 0 -.55 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.002 1.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.3 .3 .3 0 .05 .3 .3 .3 0 .05 .3 .3 .3 0 .05 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='600' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  --brush-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='600'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4 .002' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.3 .3 .3 0 .05 .3 .3 .3 0 .05 .3 .3 .3 0 .05 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='200' height='600' filter='url(%23n)'/%3E%3C/svg%3E");

  /* материалы; применяются вместе с .mat-* ниже (режим наложения у первого слоя — soft-light) */
  --anod: var(--brush),
    linear-gradient(90deg, rgba(70, 22, 0, .2), rgba(255, 255, 255, .2) 27%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .13) 74%, rgba(70, 22, 0, .22)),
    linear-gradient(#ff9523, #ff7a00 50%, #ec6300);
  --steel: var(--brush-v), linear-gradient(90deg, #b3b8bd, #f6f7f8 28%, #d7dadd 52%, #9da3a9 80%, #cdd1d5);
  --steel-h: var(--brush), linear-gradient(#f7f8f9, #d3d7db 45%, #aeb4ba);
  --machined: conic-gradient(from 25deg, #f6f7f8, #868d94 12%, #eef0f2 25%, #7a8188 38%, #f6f7f8 50%, #868d94 62%, #eef0f2 75%, #7a8188 88%, #f6f7f8);
  --engrave: 0 -1px 0 rgba(130, 50, 0, .7);
}

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

html { overflow-y: scroll; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--grain), radial-gradient(1000px 560px at 50% 0, #3a3531, #1b1917 72%) no-repeat, #1b1917;
  background-blend-mode: soft-light, normal, normal;
  color: var(--text);
  font: 15px/1.5 Ubuntu, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { border: 0; max-width: 100%; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #ffc98a; color: #000; }

h1 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1::before, h1::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h1::before { flex: 0 0 22px; height: 3px; border-radius: 2px; background: var(--orange); }
h2 { font-size: 20px; font-weight: 500; line-height: 1.3; }
p { margin: 6px 0; }

.wrap { width: min(980px, 100% - 32px); margin: 0 auto; }

/* ---------- Шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(110, 40, 0, .7), 0 1px 0 #000, 0 10px 22px -8px rgba(0, 0, 0, .8);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; flex: none; }
.logo img { display: block; }
.topnav { display: flex; gap: 4px; margin-left: auto; padding: 6px 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  padding: 8px 14px;
  border-radius: 7px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: var(--engrave);
  transition: background .15s;
}
.topnav a:hover { background: rgba(110, 40, 0, .16); text-decoration: none; }
.topnav a.current { background: rgba(110, 40, 0, .3); box-shadow: inset 0 1px 3px rgba(70, 22, 0, .7), 0 1px 0 rgba(255, 225, 180, .45); }

/* кнопка меню (только на телефоне) */
.burger { display: none; }

/* выбор языка: три клавиши, утопленные в шапку */
.langs { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(110, 40, 0, .3); box-shadow: inset 0 1px 3px rgba(70, 22, 0, .7), 0 1px 0 rgba(255, 225, 180, .45); }
.langs a { padding: 3px 7px; border-radius: 5px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-shadow: var(--engrave); }
.langs a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.langs a.current { background: var(--steel-h); background-blend-mode: soft-light, normal; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(80, 40, 10, .55), 0 1px 2px rgba(60, 20, 0, .45); color: var(--text); text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }

/* ---------- Лист бумаги на кольцах ---------- */

.paper {
  position: relative;
  margin: 48px 0 0;
  padding: 36px 28px 26px;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .5), 0 22px 34px -14px rgba(0, 0, 0, .85);
}
/* второй лист под первым */
.paper::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 3px -4px;
  border-radius: 3px;
  background: #e6e0d6;
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .7);
  transform: rotate(.35deg);
}
.mount {
  position: absolute;
  z-index: 1;
  top: -14px;
  width: 180px;
  height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='34'%3E%3ClinearGradient id='g' gradientUnits='userSpaceOnUse' x1='6' x2='14'%3E%3Cstop offset='0' stop-color='%236d7379'/%3E%3Cstop offset='.4' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23767d84'/%3E%3C/linearGradient%3E%3Cellipse cx='10' cy='25.5' rx='4.4' ry='3.8' fill='%23362e25' fill-opacity='.55'/%3E%3Cpath d='M7.6 26V6.4a2.4 2.4 0 0 1 4.8 0V26' fill='none' stroke='%234d5359' stroke-width='2.9' stroke-linecap='round'/%3E%3Cpath d='M7.6 26V6.4a2.4 2.4 0 0 1 4.8 0V26' fill='none' stroke='url(%23g)' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .4));
  pointer-events: none;
}
.mount.left { left: 28px; }
.mount.right { right: 28px; }

/* На широком экране баннер и список всегда в одну строку: баннер при нехватке места сужается, список не переносится */
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.banner { position: relative; flex: 0 1 600px; min-width: 0; }
.benefits { flex: none; }
#slideshow {
  position: relative;
  width: 600px;
  max-width: 100%;
  aspect-ratio: 600 / 120;
  overflow: hidden;
  border-radius: 4px;
  background: #24211e;
  box-shadow: 0 0 0 1px var(--line);
}
/* баннеры старого размера (468x60) вписываются целиком, без обрезки */
#slideshow img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* слайдер: баннеры стоят справа за кадром и въезжают по очереди (положение задаёт app.js) */
#slideshow a { position: absolute; inset: 0; transform: translateX(100%); transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
#slideshow a.active, #slideshow a:only-child { transform: none; }
.slide-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--steel-h);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(40, 44, 48, .7), 0 2px 6px rgba(0, 0, 0, .5);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
}
.slide-arrow.prev { left: 8px; }
.slide-arrow.next { right: 8px; }
.slide-arrow .ico { width: 16px; height: 16px; }
.slide-arrow.prev .ico { transform: rotate(90deg); }
.slide-arrow.next .ico { transform: rotate(-90deg); }
#slideshow:hover .slide-arrow, .slide-arrow:focus-visible { opacity: 1; }
.slide-dots { position: absolute; left: 0; bottom: 6px; display: flex; gap: 6px; }
.slide-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: #cfc7ba; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25); cursor: pointer; transition: width .25s, background .25s; }
.slide-dots button:hover { background: #b5ac9e; }
.slide-dots button.active { width: 22px; background: var(--orange); }
.banner-link { display: block; margin-top: 8px; font-size: 13px; text-align: right; }

.benefits li { position: relative; padding: 2px 0 2px 26px; font-size: 14px; }
.benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--orange);
  -webkit-mask: url('../images/icons/check.svg') center / contain no-repeat;
  mask: url('../images/icons/check.svg') center / contain no-repeat;
}

/* ---------- Иконки ---------- */

.ico {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background: currentColor;
  vertical-align: middle;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.ico-code { --i: url('../images/icons/code.svg'); }
.ico-download { --i: url('../images/icons/download.svg'); }
.ico-trash { --i: url('../images/icons/trash.svg'); }
.ico-close { --i: url('../images/icons/close.svg'); }
.ico-settings { --i: url('../images/icons/settings.svg'); }
.ico-chevron { --i: url('../images/icons/chevron.svg'); }
.ico-image { --i: url('../images/icons/image.svg'); }
.ico-link { --i: url('../images/icons/link.svg'); }
.ico-qr { --i: url('../images/icons/qr.svg'); }
.ico-reply { --i: url('../images/icons/reply.svg'); }
.ico-stats { --i: url('../images/icons/stats.svg'); }
.ico-search { --i: url('../images/icons/search.svg'); }
.ico-logout { --i: url('../images/icons/logout.svg'); }
.ico-move { --i: url('../images/icons/move.svg'); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--orange-soft); color: var(--orange-dark); text-decoration: none; }
.icon-btn.delete:hover { background: #fbe3df; color: #d93a25; }

/* ---------- Панель загрузки ---------- */

.uploader { position: relative; max-width: 820px; margin: 60px auto 0; }

/* плита из оранжевого анодированного алюминия */
.uploader-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px 66px;
  border-radius: 12px;
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(110, 40, 0, .65), inset 0 0 0 1px rgba(150, 55, 0, .4),
    0 1px 0 #9c4300, 0 2px 0 #7a3300, 0 4px 6px rgba(0, 0, 0, .6),
    0 30px 40px -16px rgba(0, 0, 0, .9), 0 30px 70px -20px rgba(255, 110, 0, .4);
}

/* стальные пластины с винтами по краям панели */
.bracket {
  position: absolute;
  z-index: 2;
  top: -10px;
  bottom: -10px;
  width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-radius: 6px;
  background: var(--steel);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 0 0 1px #3e4348, 0 4px 7px rgba(0, 0, 0, .7), 0 0 12px rgba(0, 0, 0, .45);
}
.bracket.left { left: -14px; }
.bracket.right { right: -14px; }
.screw {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--machined);
  box-shadow: 0 0 0 1px rgba(60, 66, 72, .7), 0 1px 2px 1px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .45);
}
/* шлиц под шестигранник */
.screw::after {
  content: "";
  position: absolute;
  inset: 4.5px;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  background: linear-gradient(140deg, #15181b, #596067);
}
.screw + .screw::after { transform: rotate(20deg); }

.uploader-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--machined);
  box-shadow: 0 0 0 1px rgba(90, 40, 0, .6), 0 1px 0 1px rgba(255, 225, 180, .5), 0 3px 6px rgba(60, 20, 0, .5);
  color: #ff8a14;
}
.uploader-icon::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 20%, #45403a, #1b1815 70%);
  box-shadow: inset 0 2px 4px #000, 0 1px 0 rgba(255, 255, 255, .7);
}
.uploader-icon .ico { position: relative; width: 24px; height: 24px; filter: drop-shadow(0 0 5px rgba(255, 130, 0, .8)); }

.uploader-field { flex: 1; min-width: 0; }
.field-row {
  display: flex;
  align-items: center;
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(#efe8dc, #fffdf8 60%);
  box-shadow: inset 0 2px 4px rgba(70, 28, 0, .5), inset 0 0 0 1px rgba(110, 42, 0, .5), 0 1px 0 rgba(255, 225, 180, .6);
  transition: box-shadow .2s;
}
.field-row:focus-within { box-shadow: inset 0 2px 4px rgba(70, 28, 0, .5), inset 0 0 0 1px rgba(110, 42, 0, .6), 0 0 0 3px rgba(255, 240, 215, .55); }
.uploader.dragover .field-row { background: #fff; box-shadow: inset 0 2px 4px rgba(70, 28, 0, .4), inset 0 0 0 1px rgba(110, 42, 0, .6), 0 0 0 3px #fff, 0 0 26px 4px rgba(255, 225, 170, .9); }
.field-text {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: 0;
}
.field-text.placeholder, .field-text::placeholder { color: #8d7c69; font-weight: 400; }
#file-name { cursor: pointer; }
.browse {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  height: 40px;
  margin-right: 6px;
  padding: 0 20px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(#45403b, #24211e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px #14110f, 0 2px 3px rgba(0, 0, 0, .3);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.browse:hover { filter: brightness(1.12); }
.browse[hidden] { display: none; }
.browse input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#upload-btn, .mode-url .browse {
  background: linear-gradient(#ff9523, #ec6300);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px #b34b00, 0 2px 3px rgba(90, 35, 0, .35);
  text-shadow: var(--engrave);
}

/* значок «перетащите» в начале поля */
.drop-ico { margin-left: 18px; color: #b8763a; }
.uploader.dragover .drop-ico { color: var(--orange); animation: nudge .7s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.25); } }
.mode-url[hidden], .mode-file[hidden] { display: none; }

/* переключатель способа загрузки, утопленный в панель */
.uploader-modes {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  border-radius: 9px;
  background: rgba(110, 40, 0, .3);
  box-shadow: inset 0 1px 3px rgba(70, 22, 0, .7), 0 1px 0 rgba(255, 225, 180, .5);
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: var(--engrave);
  cursor: pointer;
  transition: background .15s;
}
.mode-btn .ico { width: 16px; height: 16px; }
.mode-btn:hover { background: rgba(255, 255, 255, .14); }
.mode-btn.active {
  background: var(--steel-h);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(80, 40, 10, .55), 0 2px 3px rgba(60, 20, 0, .45);
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* стальной язычок «Настройки» под нижней кромкой панели */
.settings-toggle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 6px 16px 7px;
  border: 0;
  border-radius: 0 0 9px 9px;
  background: var(--steel-h);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .22), inset 1px 0 0 rgba(255, 255, 255, .6), inset -1px 0 0 rgba(255, 255, 255, .6), 0 0 0 1px #6c7278, 0 4px 6px rgba(40, 15, 0, .35);
  color: #3a3632;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  cursor: pointer;
}
.settings-toggle:hover { filter: brightness(1.05); }
.settings-toggle .ico { width: 16px; height: 16px; }
.settings-toggle .ico-chevron { transition: transform .3s; }
.uploader.open .settings-toggle .ico-chevron { transform: rotate(180deg); }

.uploader-rail { display: none; }

/* выдвижной блок дополнительных функций: лист в оранжевой алюминиевой рамке */
.uploader-drawer {
  position: relative;
  z-index: 1;
  margin: -8px 58px 0;
  padding: 0 6px 6px;
  border-radius: 0 0 12px 12px;
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 -1px 0 rgba(110, 40, 0, .65), inset 0 0 0 1px rgba(150, 55, 0, .4), 0 2px 0 #7a3300, 0 4px 6px rgba(0, 0, 0, .6), 0 30px 40px -18px rgba(0, 0, 0, .9);
}
.drawer-slide {
  display: grid;
  grid-template-rows: 0fr;
  padding-top: 42px;
  background: linear-gradient(rgba(30, 12, 0, .5), rgba(30, 12, 0, 0) 22px), var(--paper);
  box-shadow: inset 1px 0 0 rgba(110, 42, 0, .35), inset -1px 0 0 rgba(110, 42, 0, .35);
  transition: grid-template-rows .4s cubic-bezier(.3, .7, .2, 1);
}
.uploader.open .drawer-slide { grid-template-rows: 1fr; }
.drawer-slide > div { min-height: 0; overflow: hidden; }
.options { padding: 4px 26px; }
.options li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  min-height: 48px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.options li:last-child { border-bottom: 0; }
.options label { display: flex; align-items: center; gap: 10px; cursor: pointer; }

/* галочки настроек — переключатели */
.options input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 11px;
  background: #c9c1b4;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.options input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(#fff, #e4e0d9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: transform .2s;
}
.options input[type="checkbox"]:checked { background: linear-gradient(#f26a00, #ff8f1a); }
.options input[type="checkbox"]:checked::before { transform: translateX(18px); }
.options input[type="checkbox"]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.options input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.options input:disabled + span { color: #b3ab9f; }
.option-extra { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.drawer-foot {
  display: flex;
  justify-content: center;
  padding: 14px 0 22px;
  border-radius: 0 0 7px 7px;
  background: var(--paper);
  box-shadow: inset 0 -1px 0 rgba(110, 42, 0, .35), inset 1px 0 0 rgba(110, 42, 0, .35), inset -1px 0 0 rgba(110, 42, 0, .35);
}

/* ---------- Поля и кнопки ---------- */

.btn, .form-button, #send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 26px;
  border: 0;
  border-radius: 8px;
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(110, 40, 0, .6), 0 0 0 1px #b34b00, 0 2px 3px rgba(60, 25, 0, .4), 0 10px 16px -8px rgba(200, 80, 0, .7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: var(--engrave);
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover, .form-button:hover, #send:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active, .form-button:active, #send:active { transform: translateY(1px); }
#send { min-width: 220px; padding: 12px 40px; font-size: 14px; }

.button-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 500;
}
.button-box:hover { background: #f1e0c6; text-decoration: none; }
.button-box .ico { width: 14px; height: 14px; }

.nice-button {
  display: inline-block;
  margin: 2px;
  padding: 6px 14px;
  border-radius: 6px;
  background: #ebe5db;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.nice-button:hover { background: #e2dbcf; text-decoration: none; }
.nice-button.active {
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px #b34b00;
  color: #fff;
  text-shadow: var(--engrave);
}

.paper label, #popup-box label { display: block; margin: 14px 0 6px; font-weight: 500; font-size: 14px; }
.paper .options label { margin: 0; font-weight: 400; font-size: 15px; }

.text-box, .text-box1, .text-box2, .num-box, .select-box, .select-box1, .file-box, .text-desc, #search-text {
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #d3cbbe;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(60, 40, 10, .1);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.text-box:focus, .text-box1:focus, .text-box2:focus, .num-box:focus, .select-box:focus, .select-box1:focus, .text-desc:focus, #search-text:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, .18);
}
.text-box1, .select-box, .file-box { display: block; width: 520px; }
.text-desc { display: block; width: 100%; min-height: 200px; resize: vertical; }
.options .text-box, .options .text-box2, .options .num-box, .options .select-box1 { padding: 6px 10px; font-size: 14px; }
.text-box { width: 280px; }
.text-box2 { width: 220px; }
.num-box { width: 76px; text-align: center; }
.select-box1 { width: 130px; }
.pick { cursor: pointer; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
#popup-box .text-box1, .codes .text-box1 { width: 100%; }

.spacer { clear: both; height: 10px; }
.spacer_2px { clear: both; height: 1px; margin: 22px 0; background: var(--line); }
.clear { clear: both; }
.leftfloat { float: left; }
.rightfloat { float: right; }
.centertext { text-align: center; }
.small { font-size: 12px; color: var(--muted); }

/* ---------- Галерея ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; text-align: left; }
.photo-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.photo-box:hover { transform: translateY(-2px); box-shadow: 0 12px 20px -12px rgba(40, 30, 20, .55); }
.photo { display: grid; place-items: center; height: 176px; padding: 8px; background: #efeae2; }
.photo a { display: grid; place-items: center; width: 100%; height: 100%; }
.photo img { max-width: 100%; max-height: 160px; border-radius: 3px; }
.photo-info { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 6px 8px 12px; }
.photo-info b { font-size: 14px; }
.actions { display: flex; flex: none; }
.single { max-width: 240px; margin: 0 auto; }
.empty { padding: 30px 0; color: var(--muted); text-align: center; }

#search-box { margin-bottom: 22px; text-align: center; }
#search-box form { display: flex; gap: 8px; margin-top: 12px; }
#search-text { flex: 1; min-width: 0; }
#search-button {
  padding: 9px 22px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(#45403b, #24211e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px #14110f;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}
#search-button:hover { filter: brightness(1.12); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 4px; }
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  background: #ebe5db;
  color: var(--text);
  font-weight: 500;
}
.pagination a:hover { background: #e2dbcf; text-decoration: none; }
.pagination li span {
  background: var(--anod);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px #b34b00;
  color: #fff;
  text-shadow: var(--engrave);
}
.total-pages { order: 2; margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Просмотр картинки ---------- */

#image-wrap {
  display: inline-block;
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 10px 18px -12px rgba(40, 30, 20, .5);
  line-height: 0;
}
#image-wrap img { border-radius: 2px; cursor: zoom-in; }
#image-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 8px 12px 16px;
  border-radius: 6px;
  background: #efeae2;
  text-align: left;
}
#image-info h2 { overflow-wrap: anywhere; }
#image-info p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Всплывающие элементы ---------- */

#opaco-box {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgba(10, 8, 6, .7);
  backdrop-filter: blur(2px);
}
#popup-box, #popup-img {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: none;
  transform: translate(-50%, -50%);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 0 0 1px #000, 0 30px 60px -20px #000;
}
#popup-box { width: min(600px, 100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; padding: 26px; border-top: 4px solid var(--orange); }
#popup-img { padding: 6px; line-height: 0; }
#popup-img img { max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); border-radius: 3px; }
.show { display: block !important; }
.x-close { position: absolute; top: 12px; right: 12px; }
#popup-img .x-close { top: -14px; right: -14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); border-radius: 50%; }

#tooltip {
  position: absolute;
  z-index: 200;
  display: none;
  max-width: 280px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #14110f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 14px rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}
#tooltip img { display: block; margin: 3px 0; border-radius: 3px; background: #fff; }

#error-box, #done-box {
  position: fixed;
  top: 78px;
  right: 16px;
  z-index: 120;
  max-width: min(340px, 100vw - 32px);
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 24px -8px rgba(0, 0, 0, .8);
  transition: opacity .5s, transform .5s;
}
#error-box { background: #d8432d; }
#done-box { background: #2b9a50; }
.fade-out { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e6dccd;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes menu-drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
#loading {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  width: 58px;
  height: 58px;
  margin: auto;
  padding: 14px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 0 0 1px #000, 0 10px 30px rgba(0, 0, 0, .7);
}
#sms-loading { display: grid; place-items: center; padding: 10px; }

/* ---------- Реклама, контакты ---------- */

#advert-counter {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 700;
}
/* свободные и занятые места под бесплатные баннеры */
.slots { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; padding: 12px 16px; border-left: 3px solid #35a35a; border-radius: 6px; background: #e9f3e6; font-weight: 500; }
.slots.full { border-left-color: var(--orange); background: var(--orange-soft); }
.slot-dots { display: flex; gap: 5px; }
.slot-dots i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #35a35a; }
.slot-dots i.taken { background: var(--orange); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px #b34b00; }
.own-banner { margin-top: 14px; font-weight: 500; }
.paper form .small { margin-top: 12px; }

/* ---------- Панель администратора ---------- */

.admin-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.control-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.control-box:hover, .control-box.current { border-color: var(--orange); background: var(--orange-soft); text-decoration: none; }
.control-ico { flex: none; width: 44px; height: 44px; object-fit: contain; }
.control-box b { display: block; color: var(--orange-dark); }
.control-box span { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.admin-bar { display: flex; justify-content: flex-end; margin-top: 12px; }

.table-scroll { overflow-x: auto; }
.topics { width: 100%; border-collapse: collapse; font-size: 14px; }
.topics th {
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}
.topics td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.topics tr:hover td { background: #efeae2; }
.topics .w3 { white-space: nowrap; text-align: right; }
.topics .centertext { text-align: center; }

.roll li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.roll li > span:first-child { flex: none; width: 240px; max-width: 100%; color: var(--muted); font-weight: 500; }

/* ---------- Подвал: тёмная полка с проточкой по верхней кромке ---------- */

#copyright {
  margin-top: auto;
  background: linear-gradient(rgba(0, 0, 0, .34), rgba(0, 0, 0, .2));
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 255, 255, .06);
  color: #8d857a;
  font-size: 13px;
}

#copyright .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding: 20px 0 22px; }
.foot-brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.foot-brand b { color: #d2cabd; font-weight: 500; letter-spacing: .02em; }
.foot-brand .screw { width: 14px; height: 14px; }
.foot-brand .screw::after { inset: 3.5px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-nav a { color: #8d857a; transition: color .15s; }
.foot-nav a:hover { color: #ff9523; text-decoration: none; }
main.wrap { padding-bottom: 64px; }

/* ---------- Телефон ---------- */

@media (max-width: 760px) {
  .paper { padding: 32px 16px 20px; }
  .mount { width: 100px; }
  .mount.left { left: 16px; }
  .mount.right { right: 16px; }
  .intro { flex-wrap: wrap; justify-content: center; }
  .banner { flex-basis: 100%; }
  .benefits { flex: 0 1 auto; }
  .logo img { width: 150px; height: auto; }
  .topbar .wrap { gap: 10px; }
  .langs { margin-left: auto; }
  .burger {
    position: relative;
    flex: none;
    display: block;
    width: 42px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(110, 40, 0, .3);
    box-shadow: inset 0 1px 3px rgba(70, 22, 0, .7), 0 1px 0 rgba(255, 225, 180, .45);
    cursor: pointer;
  }
  .burger span, .burger::before, .burger::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    top: 16px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
    box-shadow: 0 -1px 0 rgba(130, 50, 0, .7);
    transition: transform .25s, opacity .2s;
  }
  .burger::before { transform: translateY(-6px); }
  .burger::after { transform: translateY(6px); }
  .menu-open .burger span { opacity: 0; }
  .menu-open .burger::before { transform: rotate(45deg); box-shadow: none; }
  .menu-open .burger::after { transform: rotate(-45deg); box-shadow: none; }

  /* меню выезжает из-под шапки */
  .topnav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 8px 16px 12px;
    overflow: visible;
    background: var(--anod);
    background-blend-mode: soft-light, normal, normal;
    box-shadow: inset 0 1px 0 rgba(110, 40, 0, .6), inset 0 -1px 0 rgba(110, 40, 0, .7), 0 16px 24px -8px rgba(0, 0, 0, .85);
  }
  .menu-open .topnav { display: flex; animation: menu-drop .2s ease-out; }
  .topnav a { padding: 11px 14px; font-size: 16px; }
  #copyright .wrap { justify-content: center; text-align: center; }
  .foot-nav { justify-content: center; }

  .uploader-panel { flex-wrap: wrap; justify-content: center; gap: 12px; padding: 22px 40px 24px; }
  .uploader-icon { display: none; }
  .uploader-field { flex: 1 1 100%; }
  .uploader-modes { flex-direction: row; }
  .mode-btn { padding: 5px 10px; font-size: 13px; }
  .bracket { width: 30px; }
  .bracket.left { left: -8px; }
  .bracket.right { right: -8px; }
  .drop-ico { margin-left: 12px; }
  .browse { padding: 0 14px; }
  .uploader-drawer { margin: -8px 26px 0; }
  .options { padding: 4px 12px; }
  .option-extra { width: 100%; padding-left: 50px; }
  .text-box, .text-box2 { flex: 1; min-width: 0; width: auto; }
  .text-box1, .select-box, .file-box { width: 100%; }
  #image-info { flex-direction: column; align-items: flex-start; }
}
