/* ============================================================
   Парк аттракционов на кассу — изолированные стили
   Префикс: apkn- (всё под .apkn-root)
   Безопасно встраивается в существующий проект.
   ============================================================ */

.apkn-root {
  --apkn-accent: #FE5D26;
  --apkn-accent-hover: #D95427;
  --apkn-black: #312D2B;
  --apkn-text: #272F3D;
  --apkn-bg: #F6F6F6;
  --apkn-white: #FFFFFF;
  --apkn-border: rgba(49, 45, 43, 0.1);
  --apkn-card-shadow: 0 1px 4px 0 rgba(49, 45, 43, 0.08);
  --apkn-card-bg: rgba(49, 45, 43, 0.05);
  --apkn-transition: .25s ease;
  --apkn-radius-sm: 10px;
  --apkn-radius-md: 12px;
  --apkn-radius-lg: 24px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--apkn-text);
  background-color: var(--apkn-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.apkn-root a {
  text-decoration: none;
  color: inherit;
}

.apkn-root img {
  max-width: 100%;
  height: auto;
  display: block;
}

.apkn-root button {
  font-family: inherit;
}

.apkn-container {
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Hero --- */
.apkn-hero {
  padding: 40px 0 72px;
}

.apkn-hero-grid {
  display: flex;
  align-items: center;
  gap: 48px;
}

.apkn-hero-text {
  flex: 1;
  max-width: 560px;
}

.apkn-hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--apkn-black);
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}

.apkn-hero-accent {
  color: var(--apkn-accent);
}

.apkn-hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--apkn-text);
  opacity: 0.65;
  max-width: 480px;
  margin: 0 0 32px;
}

.apkn-hero-btns {
  display: flex;
  gap: 12px;
}

.apkn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--apkn-radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--apkn-transition), color var(--apkn-transition);
  white-space: nowrap;
  vertical-align: middle;
}

.apkn-btn.apkn-btn-primary {
  background: var(--apkn-accent);
  color: #fff;
}

.apkn-btn.apkn-btn-primary:hover {
  background: var(--apkn-accent-hover);
}

.apkn-btn.apkn-btn-secondary {
  background: var(--apkn-card-bg);
  color: var(--apkn-black);
}

.apkn-btn.apkn-btn-secondary:hover {
  background: var(--apkn-border);
}

.apkn-hero-media {
  flex-shrink: 0;
  width: 600px;
  height: 350px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  position: relative;
}

.apkn-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.apkn-hero-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Divider --- */
.apkn-divider {
  height: 1px;
  background: var(--apkn-border);
  margin-bottom: 72px;
}

/* --- How it works --- */
.apkn-how {
  padding-bottom: 100px;
}

.apkn-how-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  color: var(--apkn-black);
  text-align: center;
  margin: 0 0 8px;
}

.apkn-how-subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--apkn-text);
  opacity: 0.55;
  text-align: center;
  margin: 0 auto 48px;
  max-width: 600px;
}

.apkn-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.apkn-how-card {
  background: var(--apkn-white);
  border-radius: var(--apkn-radius-lg);
  box-shadow: var(--apkn-card-shadow);
  padding: 32px;
}

.apkn-how-num {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: var(--apkn-accent);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.apkn-how-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--apkn-black);
  margin: 0 0 12px;
}

.apkn-how-card-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--apkn-text);
  opacity: 0.7;
  margin: 0;
}

.apkn-how-card-text strong {
  color: var(--apkn-black);
  opacity: 1;
  font-weight: 600;
}

.apkn-how-note {
  display: flex;
  gap: 16px;
  padding: 24px 28px;
  background: var(--apkn-white);
  border: 1px solid var(--apkn-accent);
  box-shadow: 0 0 0 2px rgba(254, 93, 38, 0.16);
  border-radius: var(--apkn-radius-lg);
}

.apkn-how-note-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
  color: var(--apkn-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.apkn-how-note-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.apkn-how-note strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: var(--apkn-black);
  margin-bottom: 6px;
}

.apkn-how-note p {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--apkn-text);
  opacity: 0.7;
  margin: 0;
}

/* --- Calculator --- */
.apkn-calc {
  padding-bottom: 100px;
}

.apkn-calc-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  color: var(--apkn-black);
  text-align: center;
  margin: 0 0 16px;
}

.apkn-calc-subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: var(--apkn-text);
  opacity: 0.55;
  text-align: center;
  margin: 0 0 48px;
}

.apkn-calc-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  align-items: stretch;
}

.apkn-calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.apkn-calc-card {
  background: var(--apkn-white);
  border-radius: var(--apkn-radius-lg);
  box-shadow: var(--apkn-card-shadow);
  padding: 32px;
}

.apkn-calc-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--apkn-black);
  margin: 0;
}

.apkn-slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.apkn-slider-value {
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  color: var(--apkn-black);
  background: none;
  border: none;
  border-bottom: 2px dashed var(--apkn-border);
  cursor: pointer;
  padding: 0 0 2px;
  transition: border-color var(--apkn-transition), color var(--apkn-transition);
  white-space: nowrap;
}

.apkn-slider-value:hover {
  border-color: var(--apkn-accent);
  color: var(--apkn-accent);
}

.apkn-slider-value-input {
  font-family: inherit;
  font-size: 24px;
  font-weight: 800;
  color: var(--apkn-accent);
  background: none;
  border: none;
  border-bottom: 2px solid var(--apkn-accent);
  outline: none;
  padding: 0 0 2px;
  width: 180px;
  text-align: right;
}

.apkn-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--apkn-border);
  outline: none;
  cursor: pointer;
}

.apkn-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--apkn-accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(254, 93, 38, 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}

.apkn-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.apkn-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--apkn-accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(254, 93, 38, 0.3);
  cursor: pointer;
}

.apkn-slider-minmax {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--apkn-text);
  opacity: 0.35;
}

.apkn-warning {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--apkn-radius-sm);
  background: rgba(254, 93, 38, 0.06);
  border: 1px solid rgba(254, 93, 38, 0.15);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: var(--apkn-accent);
}

.apkn-breakdown {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.apkn-breakdown-item {
  flex: 1;
  min-width: 120px;
  padding: 14px;
  border-radius: var(--apkn-radius-sm);
  background: var(--apkn-bg);
}

.apkn-breakdown-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--apkn-text);
  opacity: 0.5;
  margin-bottom: 4px;
}

.apkn-breakdown-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: var(--apkn-black);
}

.apkn-markup-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.apkn-markup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 42px;
  padding: 0 16px;
  border: 2px solid var(--apkn-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--apkn-black);
  background: none;
  transition: all 0.2s;
  user-select: none;
}

.apkn-markup-btn:not(.apkn-is-active):hover {
  border-color: var(--apkn-accent);
  color: var(--apkn-accent);
}

.apkn-markup-btn.apkn-is-active {
  border-color: var(--apkn-accent);
  background: var(--apkn-accent);
  color: #fff;
  cursor: default;
}

.apkn-custom-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.apkn-custom-input {
  width: 64px;
  height: 42px;
  border: 2px solid var(--apkn-border);
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
  transition: border-color 0.2s;
}

.apkn-custom-input:focus {
  border-color: var(--apkn-accent);
}

.apkn-custom-input::-webkit-inner-spin-button,
.apkn-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.apkn-custom-sign {
  font-size: 15px;
  font-weight: 700;
  color: var(--apkn-black);
}

.apkn-formula-bar {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--apkn-radius-sm);
  background: var(--apkn-bg);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.8;
  color: #999;
  text-align: center;
}

/* --- Result panel --- */
.apkn-result-panel {
  position: sticky;
  top: 24px;
  background: var(--apkn-white);
  border-radius: var(--apkn-radius-lg);
  border: 2px solid var(--apkn-accent);
  box-shadow: 0 8px 32px rgba(254, 93, 38, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.apkn-result-body {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.apkn-result-body--empty {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.apkn-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--apkn-text);
  opacity: 0.6;
}

.apkn-result-head svg {
  color: var(--apkn-accent);
  width: 22px;
  height: 22px;
}

.apkn-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
}

.apkn-result-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--apkn-text);
  opacity: 0.7;
}

.apkn-result-label--bold {
  font-weight: 700;
  opacity: 1;
}

.apkn-result-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: var(--apkn-black);
  text-align: right;
}

.apkn-result-value--thin {
  font-weight: 400;
}

.apkn-result-value--big {
  font-size: 18px;
  font-weight: 800;
}

.apkn-result-value--profit-pos { color: #16A34A; }
.apkn-result-value--profit-neg { color: #ef4444; }

.apkn-result-divider {
  height: 1px;
  background: var(--apkn-border);
  margin: 16px 0;
}

.apkn-deposit-highlight {
  padding: 16px;
  border-radius: var(--apkn-radius-md);
  background: rgba(254, 93, 38, 0.06);
  border: 1px solid rgba(254, 93, 38, 0.12);
  margin: 16px 0;
}

.apkn-deposit-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--apkn-accent);
  margin-bottom: 4px;
}

.apkn-deposit-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--apkn-accent);
}

/* --- Features --- */
.apkn-features {
  padding-bottom: 100px;
}

.apkn-features-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: var(--apkn-black);
  text-align: center;
  margin: 0 0 40px;
}

.apkn-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.apkn-feature-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.apkn-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--apkn-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apkn-text);
  transition: background var(--apkn-transition), color var(--apkn-transition);
}

.apkn-feature-card:hover .apkn-feature-icon {
  background: var(--apkn-accent);
  color: #fff;
}

.apkn-feature-icon svg {
  width: 28px;
  height: 28px;
}

.apkn-feature-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--apkn-black);
  margin: 0;
}

.apkn-feature-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--apkn-text);
  opacity: 0.65;
  margin: 0;
}

/* --- CTA --- */
.apkn-cta {
  padding-bottom: 72px;
}

.apkn-cta-dark {
  background: linear-gradient(135deg, var(--apkn-accent) 30%, #7B2FF2 120%);
  border-radius: 24px;
  padding: 48px 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.apkn-cta-dark::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.apkn-cta-dark-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  color: #fff;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}

.apkn-cta-dark-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin: 0;
  position: relative;
  z-index: 1;
}

.apkn-btn.apkn-btn-cta-white {
  background: #fff;
  color: var(--apkn-accent);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.apkn-btn.apkn-btn-cta-white:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* --- CTA form --- */
.apkn-cta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
  width: 560px;
  flex-shrink: 0;
}
.apkn-cta-form-fields {
  display: flex;
  flex-direction: row;
  gap: 8px;
}
.apkn-cta-form-fields .apkn-cta-input {
  flex: 1 1 0;
  min-width: 0;
}
.apkn-cta-dark > div:first-child {
  max-width: 420px;
}
.apkn-cta-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: background .15s, border-color .15s;
}
.apkn-cta-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.apkn-cta-input:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.65);
}
.apkn-cta-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
}
.apkn-cta-agree input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.apkn-cta-agree-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  position: relative;
}
.apkn-cta-agree-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--apkn-accent);
  border-bottom: 2px solid var(--apkn-accent);
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity .15s;
}
.apkn-cta-agree input:checked + .apkn-cta-agree-box {
  background: #fff;
  border-color: #fff;
}
.apkn-cta-agree input:checked + .apkn-cta-agree-box::after { opacity: 1; }
.apkn-cta-submit { width: 100%; }
.apkn-cta-thanks {
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  text-align: center;
  padding: 16px 0;
  position: relative;
  z-index: 1;
}

/* --- Formats --- */
.apkn-formats {
  padding-bottom: 72px;
}

.apkn-formats-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: var(--apkn-black);
  text-align: center;
  margin: 0 0 32px;
}

.apkn-formats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.apkn-format-card {
  background: var(--apkn-white);
  border-radius: var(--apkn-radius-lg);
  box-shadow: var(--apkn-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--apkn-transition), box-shadow var(--apkn-transition);
}

.apkn-format-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(49, 45, 43, 0.12);
}

.apkn-format-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--apkn-card-bg);
}

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

.apkn-format-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--apkn-black);
  margin: 0;
  padding: 16px 20px;
  text-align: center;
}

.apkn-formats-scrollbar {
  display: none;
  margin-top: 20px;
  height: 3px;
  background: rgba(49, 45, 43, 0.08);
  border-radius: 2px;
  position: relative;
}
.apkn-formats-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 25%;
  background: var(--apkn-accent);
  border-radius: 2px;
  transition: left .12s linear, width .12s linear;
}

/* --- FAQ --- */
.apkn-faq {
  padding-bottom: 72px;
}

.apkn-faq-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: var(--apkn-black);
  text-align: center;
  margin: 0 0 32px;
}

.apkn-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apkn-faq-item {
  background: var(--apkn-white);
  border-radius: var(--apkn-radius-lg);
  box-shadow: var(--apkn-card-shadow);
  overflow: hidden;
}

.apkn-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--apkn-black);
  cursor: pointer;
  text-align: left;
  transition: color var(--apkn-transition);
}

.apkn-faq-question:hover {
  color: var(--apkn-accent);
}

.apkn-faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.apkn-faq-item.apkn-is-open .apkn-faq-chevron {
  transform: rotate(180deg);
}

.apkn-faq-answer {
  padding: 0 24px 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--apkn-text);
  opacity: 0.7;
  display: none;
}

.apkn-faq-item.apkn-is-open .apkn-faq-answer {
  display: block;
}

/* --- Gallery --- */
.apkn-gallery {
  padding-bottom: 72px;
}

.apkn-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.apkn-gallery-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  color: var(--apkn-black);
  margin: 0;
}

.apkn-gallery-nav {
  display: flex;
  gap: 8px;
}

.apkn-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--apkn-border);
  background: var(--apkn-white);
  color: var(--apkn-black);
  cursor: pointer;
  transition: background var(--apkn-transition), color var(--apkn-transition), border-color var(--apkn-transition), opacity var(--apkn-transition);
}

.apkn-nav-btn:hover {
  background: var(--apkn-accent);
  color: #fff;
  border-color: var(--apkn-accent);
}

.apkn-nav-btn svg {
  width: 20px;
  height: 20px;
}

.apkn-nav-btn.apkn-is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.apkn-gallery-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x pan-y;
}

.apkn-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.apkn-gallery-viewport img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.apkn-gallery-track {
  display: flex;
  gap: 24px;
  padding: 0 15px;
}

.apkn-gallery-slide {
  flex: 0 0 auto;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
}

.apkn-gallery-slide a {
  display: block;
  height: 100%;
}

.apkn-gallery-slide img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.apkn-gallery-slide:hover img {
  transform: scale(1.05);
}

.apkn-gallery-scrollbar {
  margin-top: 24px;
  height: 4px;
  background: rgba(49, 45, 43, 0.08);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.apkn-gallery-thumb {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--apkn-accent);
  border-radius: 2px;
  transition: left 0.1s;
  cursor: grab;
}

.apkn-gallery-thumb:active {
  cursor: grabbing;
  transition: none;
}

/* --- Lightbox --- */
.apkn-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 40px;
}

.apkn-lightbox[hidden] {
  display: none;
}

.apkn-root [hidden] {
  display: none !important;
}

.apkn-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.apkn-lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--apkn-transition);
}

.apkn-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Responsive --- */
@media screen and (max-width: 991px) {
  .apkn-how-grid { grid-template-columns: 1fr; }
  .apkn-hero-grid { flex-direction: column; gap: 32px; }
  .apkn-hero-media { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .apkn-calc-grid { grid-template-columns: 1fr; }
  .apkn-result-panel { position: static; }
  .apkn-features-grid { grid-template-columns: repeat(2, 1fr); }
  .apkn-formats-grid { grid-template-columns: repeat(2, 1fr); }
  .apkn-gallery-slide { height: 400px; }
}

@media screen and (max-width: 768px) {
  .apkn-root section { margin-bottom: 20px; }
  .apkn-hero-title { font-size: 32px; }
  .apkn-hero-subtitle { font-size: 16px; line-height: 24px; }
  .apkn-calc-title { font-size: 26px; line-height: 34px; }
  .apkn-features-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .apkn-cta-dark { padding: 32px 28px; flex-direction: column; align-items: flex-start; }
  .apkn-cta-dark > div:first-child { max-width: 100%; }
  .apkn-cta-form { width: 100%; }
  .apkn-cta-form-fields { flex-direction: column; }
  .apkn-faq-question { font-size: 15px; padding: 16px 20px; }
  .apkn-gallery-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .apkn-gallery-slide { height: 320px; }
}

@media screen and (max-width: 600px) {
  .apkn-formats-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .apkn-formats-grid::-webkit-scrollbar { display: none; }
  .apkn-format-card {
    flex: 0 0 70%;
    min-width: 0;
    scroll-snap-align: start;
  }
  .apkn-formats-scrollbar { display: block; }
}

@media screen and (max-width: 480px) {
  .apkn-hero { padding: 74px 0 48px; }
  .apkn-hero-title { font-size: 26px; }
  .apkn-hero-btns { flex-direction: column; }
  .apkn-calc-card { padding: 24px 20px; }
  .apkn-breakdown { flex-direction: column; }
  .apkn-result-body { padding: 24px 20px; }
  .apkn-features-grid { grid-template-columns: 1fr; }
  .apkn-gallery-slide { height: 260px; }
}
