/* HK Adventskalender-Nummern. Brand: Rot #E2001A, eckige Ecken, Lora + Source Sans Pro. */

@font-face {
  font-family: 'HKAKFredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/fredoka-600-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'HKAKCaveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/caveat-600-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'HKAKYeseva';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/yeseva-one-400-latin.woff2) format('woff2');
}

/* ---------- Seite ---------- */

/* Rahmen kommt vom Theme (body.hk-pattern-layout); hier nur Eyebrow und Überschrift. */
body.hk-adventskalender-layout article.page::before {
  content: "Basteln & Drucken";
}

body.hk-adventskalender-layout article.page > h1 {
  max-width: none;
  margin-bottom: 16px;
}

.hk-adventskalender-page .hk-ak-intro {
  max-width: 760px;
  margin: 0 0 32px;
  color: #54595f;
  font: 400 18px/1.6 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---------- Generator ---------- */

.hk-ak,
.hk-ak * {
  box-sizing: border-box;
}

.hk-ak [hidden] {
  display: none !important;
}

.hk-ak {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
}

.hk-ak-form {
  margin: 0;
}

.hk-ak-group {
  margin: 0 0 22px;
  padding: 0 0 18px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #ddd;
}

.hk-ak-group legend {
  float: left;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  font: 400 18px/1.3 Lora, Georgia, serif;
  color: #333;
}

.hk-ak-group > *:not(legend) {
  clear: both;
}

.hk-ak-label {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #54595f;
}

.hk-ak-segs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.hk-ak-seg {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.hk-ak-segs-shapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hk-ak-segs-shapes .hk-ak-seg-shape span {
  flex-direction: column;
  gap: 4px;
  padding: 8px 2px;
  font-size: 13px;
  white-space: nowrap;
}

.hk-ak-shape-ico {
  display: block;
  width: 34px;
  height: 34px;
}

.hk-ak-shape-ico svg {
  display: block;
}

.hk-ak-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hk-ak-seg span {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  margin: 0 -1px -1px 0;
  padding: 9px 12px;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

.hk-ak-seg:hover span {
  border-color: #333;
  position: relative;
  z-index: 1;
}

.hk-ak-seg input:checked + span {
  position: relative;
  z-index: 2;
  background: #e2001a;
  border-color: #c90017;
  color: #fff;
  font-weight: 600;
}

.hk-ak-seg input:focus-visible + span {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.hk-ak-field {
  margin: 12px 0 0;
}

.hk-ak-field label {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #54595f;
}

.hk-ak-field input[type="text"],
.hk-ak-field select {
  display: block;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  color: #333;
  font: 400 16px/1.3 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.hk-ak-field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  color: #333;
  font: 400 15px/1.4 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  resize: vertical;
}

.hk-ak-field textarea:focus {
  border-color: #333;
  outline: 2px solid #333;
  outline-offset: 0;
}

.hk-ak-field input[type="text"]:disabled {
  background: #f3f3f3;
  color: #7a7a7a;
}

.hk-ak-field input:focus,
.hk-ak-field select:focus {
  border-color: #333;
  outline: 2px solid #333;
  outline-offset: 0;
}

.hk-ak-field-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hk-ak-field-inline label {
  margin: 0;
}

/* Farbwelten: Mini-Vorschau mit Hintergrund (Fläche), Farbe (Kreis mit Zahl) und Zierlinie */
.hk-ak .hk-ak-label-text {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #54595f;
}

.hk-ak .hk-ak-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hk-ak .hk-ak-preset {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #c9c9c9;
  border-radius: 0;
  background: var(--hk-ak-t);
  cursor: pointer;
}

.hk-ak .hk-ak-preset::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: var(--hk-ak-a);
}

.hk-ak .hk-ak-preset::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 22px;
  height: 3px;
  margin-left: -11px;
  background: var(--hk-ak-b);
}

.hk-ak .hk-ak-preset:hover {
  border-color: #333;
}

.hk-ak .hk-ak-preset[aria-pressed="true"] {
  outline: 2px solid #333;
  outline-offset: 2px;
  border-color: #333;
}

.hk-ak .hk-ak-preset:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* Aussehen: Unterabschnitte (Farben, Schrift, Schnittlinien) */
.hk-ak .hk-ak-block {
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #ececec;
}

.hk-ak .hk-ak-block-title {
  margin: 0 0 2px;
  padding: 0;
  font: 700 12px/1.3 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #54595f;
}

/* Farbe und Hintergrund nebeneinander in einer Zeile */
.hk-ak-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
}

.hk-ak-colors .hk-ak-field-inline {
  gap: 8px;
}

.hk-ak-field input[type="color"] {
  width: 56px;
  height: 36px;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
}

.hk-ak-hint,
.hk-ak-help,
.hk-ak-privacy {
  margin: 6px 0 0;
  color: #7a7a7a;
  font-size: 13px;
  line-height: 1.45;
}

.hk-ak-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 15px;
  cursor: pointer;
}

.hk-ak-check[hidden] {
  display: none;
}

.hk-ak-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #e2001a;
}

.hk-ak-actions {
  margin: 10px 0 0;
}

.hk-ak-btn {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 600 16px/1.3 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.hk-ak-btn-primary {
  width: 100%;
  background: #e2001a;
  border-color: #c90017;
  color: #fff;
}

.hk-ak-btn-primary:hover,
.hk-ak-btn-primary:active {
  background: #af0014;
  color: #fff;
}

.hk-ak-btn-dark {
  padding: 8px 16px;
  background: #333;
  color: #fff;
}

.hk-ak-btn-dark:hover {
  background: #000;
  color: #fff;
}

/* Editor: Inhalt hinter den Türen */
.hk-ak-contents {
  margin-top: 10px;
  border: 1px solid #ccc;
  background: #fff;
}

.hk-ak-contents > summary {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.hk-ak-contents > .hk-ak-actions {
  padding: 0 12px 12px;
}

.hk-ak-rows {
  max-height: 420px;
  overflow-y: auto;
  border-top: 1px solid #ddd;
}

.hk-ak-crow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.hk-ak-crow-label {
  font-size: 13px;
  font-weight: 600;
  color: #54595f;
}

.hk-ak-crow .hk-ak-crow-text {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  color: #333;
  font: 400 15px/1.3 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.hk-ak-crow .hk-ak-crow-text:focus {
  border-color: #333;
  outline: 2px solid #333;
}

.hk-ak-crow-img {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hk-ak-crow-pick {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.hk-ak-crow-pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.hk-ak-crow-pick span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f3f3f3;
  color: #333;
  font-size: 14px;
  line-height: 1.3;
}

.hk-ak-crow-pick:hover span {
  border-color: #333;
}

.hk-ak-crow-pick input:focus-visible + span {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.hk-ak-bulk {
  margin: 0 0 12px;
}

.hk-ak-bulk-pick span {
  padding: 8px 16px;
  border-color: #333;
  background: #333;
  color: #fff;
  font-size: 15px;
}

.hk-ak-bulk-pick:hover span {
  border-color: #000;
  background: #000;
}

.hk-ak-crow-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: 1px solid #ccc;
}

.hk-ak-crow-clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.hk-ak-crow-clear:hover {
  border-color: #e2001a;
  color: #e2001a;
}

.hk-ak-bgrow {
  margin-top: 10px;
}

.hk-ak-field input[type="range"] {
  display: block;
  width: 100%;
  margin: 6px 0 0;
  accent-color: #e2001a;
  cursor: pointer;
}

.hk-ak-btn-wide {
  width: 100%;
  margin-top: 10px;
  padding: 11px 22px;
}

.hk-ak-print {
  margin-top: 4px;
}

/* "Drucken": normaler Knopf im Formular, nicht fixiert */
.hk-ak .hk-ak-print .hk-ak-btn-primary {
  width: 100%;
  padding: 14px 30px;
  background: #e2001a;
  border: 1px solid #c90017;
  color: #fff;
  font-size: 17px;
}

.hk-ak .hk-ak-print .hk-ak-btn-primary:hover,
.hk-ak .hk-ak-print .hk-ak-btn-primary:active {
  background: #af0014;
  color: #fff;
}

.hk-ak .hk-ak-print .hk-ak-btn-primary:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* ---------- Vorschau ---------- */

.hk-ak-preview {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.hk-ak-stage {
  position: relative;
  width: 100%;
  max-width: 794px;
  margin: 0 auto;
  overflow: hidden;
  background: #e9e9e9;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.hk-ak-scaler {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}

.hk-ak-privacy {
  max-width: 794px;
  margin: 12px auto 0;
  text-align: center;
}

/* ---------- Blatt (Vorschau und Druck) ---------- */

.hk-ak-sheet {
  position: relative;
  overflow: hidden;
  background: #fff;
  color: #222;
  line-height: 1.2;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  break-inside: avoid;
  break-after: avoid;
}

.hk-ak-sheet,
.hk-ak-sheet * {
  box-sizing: border-box;
}

/* Hintergrundbild auf Seite 1: Bild füllt das Blatt, darüber ein weißer Schleier */
.hk-ak-bg {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.hk-ak-veil {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  background: #fff;
}

.hk-ak-head {
  position: absolute;
  text-align: center;
  overflow: hidden;
}

.hk-ak-title {
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
}

.hk-ak-sub {
  margin-top: 0.6mm;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 4.2mm;
  color: #555;
}

.hk-ak-rule {
  display: block;
  width: 28mm;
  height: 0.9mm;
  margin: 2.4mm auto 0;
}

.hk-ak-bodywrap {
  position: absolute;
}

.hk-ak-body {
  display: grid;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-content: center;
}

.hk-ak-body-free {
  display: block;
  position: relative;
}

.hk-ak-body-free > .hk-ak-cell {
  position: absolute;
}

.hk-ak-cell {
  position: relative;
  box-sizing: border-box;
  border: 0.5mm solid #222;
  border-radius: 2.5mm;
  overflow: hidden;
}

.hk-ak-badge {
  position: absolute;
  top: 3mm;
  left: 3mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0.4mm solid #222;
  border-radius: 50%;
  line-height: 1;
}

.hk-ak-badge-sub {
  display: block;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hk-ak-badge-num {
  display: block;
  line-height: 1;
}

/* Klapptüren: Seite 1 Türen (gestrichelt geschnitten, links gepunktet geknickt), Seite 2 leere Kästchen */
.hk-ak-cell.is-door {
  border: 0;
  border-radius: 0;
}

.hk-ak-doorlines {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  pointer-events: none;
}

/* Inhalt im Kästchen hinter der Tür (Seite 2) */
.hk-ak-content {
  position: absolute;
  top: 1.5mm;
  right: 1.5mm;
  bottom: 1.5mm;
  left: 1.5mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hk-ak-cimg {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  border-radius: 0;
  cursor: pointer;
}

/* Kästchen hinter den Türen: eckig, ein Bild füllt das ganze Kästchen */
.hk-ak-cell.is-box {
  border-radius: 0;
}

.hk-ak-content.has-img {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.hk-ak-content.has-img .hk-ak-cimg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Text liegt als helles Band unten über dem Bild (leer: unsichtbar) */
.hk-ak-content.has-img .hk-ak-ctext {
  position: relative;
  margin-top: auto;
  padding: 1mm 1.5mm;
  background: rgba(255, 255, 255, 0.9);
}

.hk-ak-content.has-img .hk-ak-ctext:empty {
  background: transparent;
}

.hk-ak-cell.is-box .hk-ak-content.has-img .hk-ak-ctext:empty::before {
  opacity: 0;
}

.hk-ak-cell.is-box .hk-ak-content.has-img .hk-ak-ctext:empty:hover::before,
.hk-ak-cell.is-box .hk-ak-content.has-img .hk-ak-ctext:empty:focus::before {
  opacity: 1;
}

.hk-ak-cell.is-box .hk-ak-content.has-img .hk-ak-ctext:hover,
.hk-ak-cell.is-box .hk-ak-content.has-img .hk-ak-ctext:focus {
  background: rgba(255, 255, 255, 0.95);
}

.hk-ak-ctext {
  flex: 0 1 auto;
  padding-top: 1mm;
  line-height: 1.15;
  color: #333;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Direkt bearbeiten in der Vorschau (wird nicht gedruckt) */
.hk-ak-cell.is-box .hk-ak-ctext {
  min-height: 5mm;
  cursor: text;
  outline: none;
}

.hk-ak-cell.is-box .hk-ak-ctext:empty::before {
  content: attr(data-ph);
  color: #b0b0b0;
}

.hk-ak-cell.is-box .hk-ak-ctext:hover,
.hk-ak-cell.is-box .hk-ak-ctext:focus {
  background: rgba(226, 0, 26, 0.07);
}

.hk-ak .hk-ak-sheet button.hk-ak-pick {
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0.3mm dashed #c4c4c4;
  border-radius: 0;
  background: transparent;
  color: #9a9a9a;
  min-width: 0;
  font: 600 3.2mm/1 "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.hk-ak .hk-ak-sheet button.hk-ak-pick:hover,
.hk-ak .hk-ak-sheet button.hk-ak-pick:focus-visible {
  border-color: #e2001a;
  background: transparent;
  color: #e2001a;
  outline: none;
}

.hk-ak .hk-ak-sheet button.hk-ak-cimgx {
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  position: absolute;
  top: 1.5mm;
  right: 1.5mm;
  width: 5.5mm;
  height: 5.5mm;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 400 4.2mm/5.5mm Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  opacity: 0;
}

.hk-ak .hk-ak-content:hover button.hk-ak-cimgx,
.hk-ak .hk-ak-sheet button.hk-ak-cimgx:focus-visible {
  opacity: 1;
}

.hk-ak-content.has-img .hk-ak-ctext {
  flex: 0 0 auto;
  max-height: 40%;
}

.hk-ak-scaler .hk-ak-sheet + .hk-ak-sheet {
  margin-top: 6mm;
}

.hk-ak-tag {
  position: relative;
}

.hk-ak-shape {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.hk-ak-tagbody {
  position: absolute;
  left: 1.5mm;
  right: 1.5mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hk-ak-tagword {
  display: block;
  margin-bottom: 0.6mm;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.hk-ak-tagnum {
  display: block;
  line-height: 1;
}

.hk-ak-for {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: flex-end;
  gap: 1.2mm;
  margin-left: 0;
  transform: translateX(-50%);
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 3mm;
  line-height: 1;
  color: #555;
}

.hk-ak-for i {
  flex: 1 1 auto;
  height: 0;
  margin-bottom: 0.3mm;
  border-bottom: 0.25mm solid #999;
}

.hk-ak-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8mm;
  text-align: center;
  font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 3mm;
  letter-spacing: 0.08em;
  color: #9a9a9a;
}

/* ---------- Responsive ---------- */

/* Vollbild-Knopf in der Vorschau */
.hk-ak .hk-ak-stage .hk-ak-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 38px;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #bbb;
  border-radius: 0;
  background: #fff;
  color: #333;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.hk-ak .hk-ak-stage .hk-ak-zoom:hover {
  border-color: #e2001a;
  background: #fff;
  color: #e2001a;
}

.hk-ak .hk-ak-stage .hk-ak-zoom:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.hk-ak-zoom .hk-ak-zoom-out,
.hk-ak.is-full .hk-ak-zoom .hk-ak-zoom-in {
  display: none;
}

.hk-ak.is-full .hk-ak-zoom .hk-ak-zoom-out {
  display: block;
}

/* Vollbild: Steuerung links, Vorschau füllt den Rest des Bildschirms */
html.hk-ak-full-open {
  overflow: hidden;
}

.hk-ak.is-full {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  box-sizing: border-box;
  height: 100vh;
  padding: 20px;
  gap: 24px;
  align-items: stretch;
  overflow: hidden;
  background: #f1f1f1;
}

.hk-ak.is-full .hk-ak-form {
  min-height: 0;
  padding-right: 10px;
  overflow-y: auto;
}

.hk-ak.is-full .hk-ak-preview {
  position: relative;
  top: 0;
  display: flex;
  min-height: 0;
  overflow: auto;
}

.hk-ak.is-full .hk-ak-stage {
  flex: 0 0 auto;
  margin: auto;
}

.hk-ak.is-full .hk-ak-privacy {
  display: none;
}

@media (max-width: 980px) {
  .hk-ak {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hk-ak-preview {
    position: static;
  }

  .hk-ak.is-full {
    display: block;
    overflow: auto;
  }

  .hk-ak.is-full .hk-ak-form {
    overflow: visible;
    margin-bottom: 20px;
  }

  .hk-ak.is-full .hk-ak-preview {
    position: static;
    display: block;
    overflow: visible;
  }

  body.hk-adventskalender-layout article.page > h1 {
    font-size: 32px;
  }
}

/* ---------- Druck ---------- */

#hk-ak-print-root {
  display: none;
}

@media print {
  html.hk-ak-printing body > *:not(#hk-ak-print-root) {
    display: none !important;
  }

  html.hk-ak-printing #hk-ak-print-root {
    display: block;
  }

  /* Aus dem Vollbild gedruckt: nichts abschneiden. */
  html.hk-ak-printing.hk-ak-full-open {
    overflow: visible !important;
  }

  html.hk-ak-printing,
  html.hk-ak-printing body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* Nichts außer den Blättern darf Seiten erzeugen (sonst leere Folgeseite). */
  html.hk-ak-printing > *:not(head):not(body) {
    display: none !important;
  }

  html.hk-ak-printing body {
    height: var(--hk-ak-printh, auto) !important;
    overflow: hidden !important;
  }

  #hk-ak-print-root .hk-ak-sheet {
    box-shadow: none;
    break-after: page;
  }

  #hk-ak-print-root .hk-ak-sheet:last-child {
    break-after: auto;
  }

  /* Randlos: Sonst ist das Blatt 1 mm niedriger als die Seite (das verhindert eine leere
     Folgeseite). Mit Hintergrundbild füllt die erste Seite das Papier bis zur Kante. */
  html:not(.hk-ak-safari) #hk-ak-print-root .hk-ak-sheet.has-bg {
    height: var(--hk-ak-full, 297mm) !important;
  }

  /* Safari: Der Druckbereich ist durch die Mindestränder des Druckers etwas kleiner als das Papier,
     das 296 mm hohe Blatt ragt dann auf eine leere Folgeseite. Darum 5 % kleiner, mittig, ohne feste Höhe. */
  html.hk-ak-safari.hk-ak-printing body {
    height: auto !important;
    overflow: visible !important;
  }

  html.hk-ak-safari.hk-ak-printing #hk-ak-print-root .hk-ak-sheet {
    zoom: 0.95;
    margin-right: auto;
    margin-left: auto;
  }
}
