/* Kompatibilitaet fuer die v0.10.6-Basis; nicht Teil des Studio-Blocks. */
:root { --cyan: #19c6cf; }
[hidden] { display: none !important; }
.template-builder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Originaler Newsletter-Studio-Block aus v0.9.6-test. */
.newsletter-studio { margin-top: 20px; padding: clamp(18px, 3vw, 28px); background: #f4f9f8; border: 1px solid #bcd4d2; border-radius: 15px; }
.newsletter-studio__heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.newsletter-studio__heading h3 { margin: 0; font-size: 1.3rem; }
.newsletter-studio__heading > p { max-width: 510px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.studio-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.studio-mode-button { display: grid; gap: 5px; min-height: 92px; padding: 16px 18px; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.studio-mode-button strong { font-size: .98rem; }
.studio-mode-button span { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.studio-mode-button.is-active { color: #fff; background: var(--petrol); border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(25,198,207,.18); }
.studio-mode-button.is-active span { color: rgba(255,255,255,.78); }
.studio-pane { display: none; margin-top: 18px; padding: clamp(15px, 2.5vw, 23px); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.studio-pane.is-active { display: grid; }
.studio-help { display: grid; gap: 4px; padding: 14px 16px; color: var(--petrol-dark); background: var(--petrol-soft); border-left: 4px solid var(--cyan); border-radius: 0 9px 9px 0; }
.studio-help span { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.studio-automatic-options, .studio-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.studio-optional { margin: 4px 0; padding: 13px 15px; background: #f8fbfb; border: 1px solid var(--line); border-radius: 9px; }
.studio-optional > summary { color: var(--petrol); font-size: .84rem; font-weight: 800; cursor: pointer; }
.studio-optional__content { display: grid; gap: 11px; margin-top: 14px; }
.studio-step { display: grid; gap: 14px; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.studio-step:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.studio-step__title { display: flex; align-items: center; gap: 11px; }
.studio-step__title > span { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; color: #fff; background: var(--petrol); border-radius: 999px; font-size: .78rem; font-weight: 900; }
.studio-step__title strong, .studio-step__title small { display: block; }
.studio-step__title small { margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.studio-step__title--split .studio-device-switch { margin-left: auto; }
.studio-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.studio-template-card { position: relative; display: grid; grid-template-rows: 64px auto auto; gap: 6px; min-width: 0; margin: 0 !important; padding: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; overflow: hidden; }
.studio-template-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.studio-template-card strong { font-size: .82rem; line-height: 1.25; }
.studio-template-card small { color: var(--muted); font-size: .7rem; line-height: 1.35; }
.studio-template-card.is-selected { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(13,92,99,.12); }
.studio-template-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.studio-template-actions small { flex: 1 1 280px; }
.studio-module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.studio-module-toggle { display: flex; align-items: center; gap: 10px; min-height: 58px; margin: 0 !important; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.studio-module-toggle:has(input:checked) { color: var(--petrol-dark); background: var(--petrol-soft); border-color: var(--petrol); box-shadow: inset 4px 0 0 var(--cyan); }
.studio-module-toggle.is-required { cursor: default; opacity: .82; }
.studio-module-toggle input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: var(--petrol); }
.studio-module-toggle span, .studio-module-toggle strong, .studio-module-toggle small { display: block; }
.studio-module-toggle strong { font-size: .8rem; }
.studio-module-toggle small { margin-top: 2px; color: var(--muted); font-size: .67rem; line-height: 1.25; }
.studio-template-card__image, .studio-image-thumb { display: block; background-color: #dfe8e6; background-position: center; background-size: cover; border-radius: 7px; }
.studio-template-card__image { width: 100%; height: 64px; }
.studio-image--panorama { background-image: linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.18)),url('/assets/email/freiraum-email-mountains-watermark.jpg'); }
.studio-image--weg { background-image: linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.18)),url('/assets/email/freiraum-email-way.jpg'); }
.studio-image--kante { background-image: linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.18)),url('/assets/email/freiraum-email-edge.jpg'); }
.studio-image--hochtal { background-image: linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.18)),url('/assets/email/freiraum-email-hochtal.jpg'); }
.studio-image--none { background-image: linear-gradient(135deg,#edf4f3,#fff); }
.studio-device-switch { display: inline-flex; gap: 3px; padding: 3px; background: #e8efee; border-radius: 8px; }
.studio-device-switch button { padding: 6px 9px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.studio-device-switch button.is-active { color: #fff; background: var(--petrol); }
.studio-preview-wrap { width: 100%; padding: 20px; overflow-x: auto; background: #dce7e5; border-radius: 12px; transition: padding .18s ease; }
.studio-preview-wrap.is-mobile { padding: 14px; }
.studio-mail { width: min(100%, 660px); margin: 0 auto; color: #334243; background: #fff; box-shadow: 0 16px 38px rgba(8,46,50,.16); transition: width .18s ease; }
.studio-preview-wrap.is-mobile .studio-mail { width: min(100%, 390px); }
.studio-edit-trigger { position: relative; width: 100%; padding: 0; color: inherit; font: inherit; text-align: left; background-color: transparent; border: 0; cursor: pointer; }
.studio-edit-trigger em { position: absolute; right: 10px; bottom: 9px; padding: 4px 7px; color: #fff; background: rgba(13,92,99,.88); border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .04em; opacity: 0; transition: opacity .15s ease; }
.studio-mail:not(.is-finished) .studio-edit-trigger { outline: 2px dashed rgba(13,92,99,.35); outline-offset: -4px; }
.studio-mail:not(.is-finished) .studio-edit-trigger:hover em, .studio-mail:not(.is-finished) .studio-edit-trigger:focus em { opacity: 1; }
.studio-mail__hero { display: grid; align-content: start; min-height: 275px; padding: 28px 36px 34px; background-position: center; background-size: cover; }
.studio-mail__hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(255,255,255,.92),rgba(255,255,255,.65)); }
.studio-mail__hero > * { position: relative; z-index: 1; }
.studio-mail__hero img { width: 175px; height: auto; margin-bottom: 56px; }
.studio-mail__eyebrow { display: block; margin-bottom: 8px; color: var(--petrol); font-size: 10px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.studio-mail__hero > strong { display: block; max-width: 540px; color: #0a0a0a; font-size: clamp(31px, 5vw, 45px); line-height: 1.02; letter-spacing: -.04em; }
.studio-mail__copy { display: grid; gap: 15px; min-height: 180px; padding: 35px 40px; line-height: 1.62; }
.studio-mail__copy [data-preview-body] { white-space: pre-line; }
.studio-mail__copy .studio-greeting { color: #263536; font-weight: 700; }
.studio-mail__facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #0d5c63; }
.studio-mail__facts > span { min-height: 120px; padding: 21px 17px; color: #fff; border-left: 3px solid #fff; }
.studio-mail__facts > .studio-facts-placeholder { grid-column: 1 / -1; min-height: 62px; padding: 22px; border: 0; color: rgba(255,255,255,.86); font-size: 12px; font-weight: 800; text-align: center; }
.studio-mail__facts > span:first-child { border-left: 0; }
.studio-mail__facts > span:nth-child(2) { color: #0a0a0a; background: var(--cyan); }
.studio-mail__facts strong, .studio-mail__facts small { display: block; }
.studio-mail__facts strong { font-size: 25px; line-height: 1; }
.studio-mail__facts small { margin-top: 8px; font-size: 9px; line-height: 1.35; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.studio-mail__cta { display: grid; gap: 8px; min-height: 190px; padding: 30px 38px; background: #edf5f4; border-top: 6px solid var(--petrol); }
.studio-mail__cta > strong { color: #0a0a0a; font-size: 28px; line-height: 1.08; }
.studio-mail__cta > span:not(.studio-mail__eyebrow) { line-height: 1.5; }
.studio-mail__cta > b { justify-self: start; margin-top: 7px; padding: 11px 16px; color: #0a0a0a; background: var(--cyan); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.studio-mail__highlight { display: grid; gap: 8px; min-height: 155px; padding: 29px 38px; color: #fff; background: var(--petrol); }
.studio-mail__highlight .studio-mail__eyebrow { color: var(--cyan); }
.studio-mail__highlight > strong { font-size: 27px; line-height: 1.08; }
.studio-mail__highlight > span:not(.studio-mail__eyebrow) { line-height: 1.5; }
.studio-mail__quote { display: grid; gap: 8px; min-height: 115px; padding: 28px 38px; color: var(--petrol-dark); background: #f2f7f6; border-left: 7px solid var(--cyan); }
.studio-mail__quote > strong { font-size: 21px; line-height: 1.35; }
.studio-mail__quote > span { color: var(--muted); font-size: 12px; }
.studio-mail__share { display: grid; gap: 5px; padding: 24px 38px; color: var(--petrol-dark); background: #e8f4f2; border-top: 1px solid #c8ddda; }
.studio-mail__share strong { font-size: 17px; }
.studio-mail__share > span:not(.studio-mail__eyebrow) { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.studio-mail__footer { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 25px 38px; color: #fff; background: var(--petrol); }
.studio-mail__footer img { width: 155px; height: auto; }
.studio-mail__footer span { font-size: 11px; line-height: 1.5; text-align: right; }
.studio-inline-editor { margin: 0; border-bottom: 1px solid var(--line); background: #f8fbfb; }
.studio-inline-editor > summary { padding: 11px 16px; color: var(--petrol); font-size: .77rem; font-weight: 850; cursor: pointer; }
.studio-inline-editor__content { display: grid; gap: 11px; padding: 4px 16px 18px; }
.studio-inline-editor.is-target { background: #edf7f6; box-shadow: inset 4px 0 0 var(--cyan); }
.studio-fact-fields { grid-template-columns: minmax(150px,.7fr) minmax(0,1.3fr); }
.studio-fact-fields p { grid-column: 1 / -1; }
.studio-image-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.studio-image-grid label { position: relative; display: grid; gap: 5px; margin: 0 !important; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.studio-image-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.studio-image-grid label:has(input:checked) { border-color: var(--petrol); box-shadow: 0 0 0 2px rgba(13,92,99,.12); }
.studio-image-thumb { width: 100%; height: 58px; }
.studio-image-grid strong { font-size: .75rem; }
.studio-image-grid small { color: var(--muted); font-size: .65rem; line-height: 1.3; }
.studio-finish-button { justify-self: center; }
.studio-save-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 8px; }
.studio-blank-slate { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; margin-top: 4px; padding-top: 15px; border-top: 1px solid var(--line); }
.studio-blank-slate small { flex: 1 1 280px; }

@media (max-width: 1050px) {
    .studio-template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .studio-module-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    /* Originale Kompatibilitaetsregel ausserhalb des Studio-Blocks. */
    .template-builder-grid { grid-template-columns: 1fr; }
    .newsletter-studio { margin-left: -4px; margin-right: -4px; padding: 14px 11px; }
    .newsletter-studio__heading { display: grid; gap: 8px; }
    .studio-mode-switch, .studio-automatic-options, .studio-meta-grid { grid-template-columns: 1fr; }
    .studio-mode-button { min-height: 78px; }
    .studio-template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .studio-step__title--split { align-items: flex-start; flex-wrap: wrap; }
    .studio-step__title--split .studio-device-switch { width: 100%; margin: 5px 0 0 41px; }
    .studio-device-switch button { flex: 1; }
    .studio-preview-wrap { padding: 10px; }
    .studio-mail__hero { min-height: 245px; padding: 23px 22px 28px; }
    .studio-mail__hero img { width: 145px; margin-bottom: 45px; }
    .studio-mail__hero > strong { font-size: 34px; }
    .studio-mail__copy { min-height: 150px; padding: 28px 22px; }
    .studio-mail__facts { grid-template-columns: 1fr; }
    .studio-mail__facts > span { min-height: 92px; border-left: 0; border-top: 3px solid #fff; }
    .studio-mail__facts > span:first-child { border-top: 0; }
    .studio-mail__cta { padding: 26px 22px; }
    .studio-mail__highlight, .studio-mail__quote, .studio-mail__share { padding: 24px 22px; }
    .studio-mail__footer { align-items: flex-start; flex-direction: column; padding: 24px 22px; }
    .studio-mail__footer span { text-align: left; }
    .studio-fact-fields, .studio-image-grid { grid-template-columns: 1fr; }
    .studio-image-grid label { grid-template-columns: 90px minmax(0,1fr); align-items: center; }
    .studio-image-grid label small { grid-column: 2; }
    .studio-image-thumb { grid-row: 1 / span 2; height: 62px; }
    .studio-save-actions { display: grid; grid-template-columns: 1fr; }
    .studio-save-actions .button, .studio-template-actions .button, .studio-blank-slate .button { width: 100%; }
}
