@font-face {
  font-family: 'Literata';
  src: url('/Fonts/literata/literata-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Literata';
  src: url('/Fonts/literata/literata-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Literata';
  src: url('/Fonts/lora/lora-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Literata';
  src: url('/Fonts/lora/lora-latin-ext-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  src: url('/Fonts/lora/lora-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Lora';
  src: url('/Fonts/lora/lora-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  src: url('/Fonts/lora/lora-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Lora';
  src: url('/Fonts/lora/lora-latin-ext-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/Fonts/source-serif/source-serif-4-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/Fonts/source-serif/source-serif-4-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/Fonts/source-serif/source-serif-4-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/Fonts/source-serif/source-serif-4-latin-ext-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/Fonts/open-sans/open-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/Fonts/open-sans/open-sans-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/Fonts/open-sans/open-sans-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/Fonts/open-sans/open-sans-latin-ext-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'GFS Didot';
  src: url('/Fonts/gfs-didot/GFSDidot-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/Fonts/eb-garamond/EBGaramond-Variable.ttf') format('truetype');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  src: url('/Fonts/eb-garamond/EBGaramond-Italic-Variable.ttf') format('truetype');
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Serif';
  src: url('/Fonts/libertinus/LibertinusSerif-Italic.woff2') format('woff2'),
       url('/Fonts/libertinus/LibertinusSerif-Italic.woff') format('woff'),
       url('/Fonts/libertinus/LibertinusSerif-Italic.ttf') format('truetype'),
       url('/Fonts/libertinus/LibertinusSerif-Italic.otf') format('opentype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}


html.reader,
body.reader {
   height: 100%;
   overflow: hidden !important;
}
body.reader {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: 'EB Garamond', sans-serif;
  transition: background 0.3s, color 0.3s;
  overflow: hidden;
  overscroll-behavior-y: none; 
}
body.reader.darkmode {
  background: #111;
  color: #ddd;
}

ul, ol {
  padding-left: 1.5em;        
  list-style-position: outside;
}

ul li, ol li {
  font-size: 1rem;            
}

ul li::marker,
ol li::marker {
  font-size: 1.5em;           
}

h1 {
  font-family: 'GFS Didot', sans-serif;
  font-size: 35px;
  line-height: 1.1em;
  margin-top: 0;
  margin-bottom: 20px;
}

/* Container */
#reader-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
:root {
  --vh: 100vh;
}
#reader-container {
  height: calc(var(--vh, 1vh) * 100);
}

#top-bar, #bottom-bar {
  background: #ffffff; 
  padding: 12px 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, background-color 0.3s ease, max-height 0.3s ease, min-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  justify-content: space-between;
  color: #333;
  max-height: 120px; 
  overflow: hidden;  
}

.modern-top-bar {
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 100;
}

.modern-bottom-bar {
  gap: 15px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  z-index: 100;
  min-height: 60px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn svg {
  width: 23px;
  height: 23px;
}
.font-text-icon {
  font-family: 'GFS Didot', serif;
  font-size: 23px;
  font-weight: bold;
  line-height: 1;
  padding: 0 5px;
}

.header-title-two-lines {
  flex-grow: 1;
  text-align: center;
  font-family: 'GFS Didot', serif;
  font-size: 15px;
  line-height: 1.15;
  max-height: 2.3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 5px;
  font-weight: bold;
}

.progress-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.progress-track {
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
body.reader.darkmode .progress-track {
  background-color: rgba(255, 255, 255, 0.2);
}

.progress-fill {
  height: 100%;
  background-color: #333;
  width: 0%;
  transition: width 0.3s ease;
}
body.reader.darkmode .progress-fill {
  background-color: #ddd;
}

.progress-texts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Open Sans', sans-serif;
  font-size: 12.5px;
  color: #666;
  text-transform: none;
  letter-spacing: 0.05em;
  white-space: nowrap; 
}
#page-indicator-left {
  text-align: left;
}
#page-indicator-middle {
  text-align: center;
  font-weight: bold;
  padding: 0 8px;
}
#page-indicator-right {
  text-align: right;
}
body.reader.darkmode .progress-texts {
  color: #aaa;
}
.progress-texts strong {
  font-weight: bold;
  color: inherit;
}

body.reader.darkmode #top-bar,
body.reader.darkmode #bottom-bar {
  background: #333333;
  color: #eee;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
body.reader.darkmode .modern-bottom-bar {
  box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}



.vergangenheit {
  font-family: 'Libertinus Serif', serif;
  font-style: italic;
}



#pages {
  flex: 1;
  overflow: auto;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  padding-top: 60px;
  box-sizing: border-box;
  line-height: 1.6;
  font-size: 19px;
}


p {
  margin: 0;
  text-align: justify;
  hyphens: auto;
}
p.indent {
  text-indent: 1.5em;
}
.chapter > p:first-of-type {
  text-indent: 0;
}
p.no-indent {
  text-indent: 0 !important;
}
.nachricht,
.email,
.person,
.neutral,
.system
{
  position: relative;
  margin: 1em 0;
  background-color: #f0f0f0;
  border-radius: 10px;
  padding: 10px 14px 10px 48px;
  max-width: 90%;
  background-image: none; 
  min-height: 48px;
  line-height: 1.4em;
  overflow: hidden;
	color: #000000;
	
}

.nachricht {
}
.neutral {
			background-color: #e8e5f6;
	  padding: 10px 14px 10px 14px;


}
.system {
		background-color: #fff0d6;

}

.email {
		background-color: #d8eafd;

}

.person {
		background-color: #d4e7d3;

}

.nachricht::before,
.email::before,
.person::before,
.neutral::before,
.system::before

{
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: 24px;
  background-repeat: no-repeat;
  position: absolute;
  top: 14px;
  left: 14px;
}

.nachricht::before {
  background-image: url('../../Bilder/message.png');
}

.email::before {
  background-image: url('../../Bilder/email.png');
}

.person::before {
  background-image: url('../../Bilder/person.png');
}
.system::before {
  background-image: url('../../Bilder/system.png');
}


.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  overflow-x: hidden; 
}
.lightbox-overlay.hidden {
  display: none;
}

.lightbox-content {
  background-color: #fff; 
  color: #222;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  max-height: 90%;
  box-sizing: border-box;
  position: relative;
  margin: 0 auto; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

body.reader.darkmode .lightbox-content {
  background-color: #2b2b2b;
  color: #ddd;
}

.modern-panel {
  font-family: 'Open Sans', sans-serif;
}
.panel-heading {
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 24px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 15px;
}
body.reader.darkmode .panel-heading {
  border-bottom-color: rgba(255,255,255,0.1);
}

.option-group {
  margin-bottom: 24px;
}
.group-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 10px 0;
  letter-spacing: 0.05em;
}

.segmented-control {
  display: flex;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}
body.reader.darkmode .segmented-control {
  background: rgba(255,255,255,0.1);
}
.segmented-control label {
  flex: 1;
  cursor: pointer;
  position: relative;
}
.segmented-control input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segment-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #555;
  transition: all 0.2s;
  height: 100%;
  box-sizing: border-box;
}
body.reader.darkmode .segment-label {
  color: #ccc;
}
.segmented-control input[type="radio"]:checked + .segment-label {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
body.reader.darkmode .segmented-control input[type="radio"]:checked + .segment-label {
  background: #444;
  color: #fff;
}

.quick-font-box {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  width: 260px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
  margin-top: -30vh; 
}
body.reader.darkmode .quick-font-box {
  background: #333;
}
.quick-fs-small { font-size: 14px; }
.quick-fs-medium { font-size: 18px; }
.quick-fs-large { font-size: 24px; }

/* Preview Text */
.modern-preview {
  margin-top: 15px;
  padding: 20px;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  border: none;
  font-size: 17px;
}
body.reader.darkmode .modern-preview {
  background: rgba(255,255,255,0.05);
}

.modern-list {
  display: flex;
  flex-direction: column;
}
.modern-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 16px;
  cursor: pointer;
  color: inherit;
}
.modern-list-item:last-child {
  border-bottom: none;
}
.modern-list-item:hover {
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}
body.reader.darkmode .modern-list-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.reader.darkmode .modern-list-item:hover {
  background: rgba(255,255,255,0.05);
}
.modern-list-item input[type="radio"] {
  accent-color: #d6af67;
  width: 18px;
  height: 18px;
}
.chevron {
  color: #999;
  font-size: 20px;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.color-swatch input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.color-swatch .swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.1);
  margin-bottom: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.color-swatch input[type="radio"]:checked + .swatch {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d6af67;
}
body.reader.darkmode .color-swatch input[type="radio"]:checked + .swatch {
  box-shadow: 0 0 0 2px #333, 0 0 0 4px #d6af67;
}
.color-swatch .swatch-label {
  font-size: 12px;
  color: #666;
}
body.reader.darkmode .color-swatch .swatch-label {
  color: #aaa;
}

.scrollable {
  overflow-y: auto;
}
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}
body.reader.darkmode .lightbox-close {
  color: #aaa;
}

.toc-entry {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 16px;
}
.toc-entry:last-child {
  border-bottom: none;
}
.toc-entry:hover {
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}
body.reader.darkmode .toc-entry {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.reader.darkmode .toc-entry:hover {
  background: rgba(255,255,255,0.05);
}


/* Color Swatches für Layout Panel */
====
/* Moderne Suche */
.modern-search-input {
  width: 100%;
  padding: 16px 16px 16px 44px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  font-size: 18px !important;
  font-family: 'Open Sans', sans-serif;
  background: rgba(0,0,0,0.04);
  color: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.modern-search-input:focus {
  border-color: #d6af67;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
body.reader.darkmode .modern-search-input {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}
body.reader.darkmode .modern-search-input:focus {
  background: #2b2b2b;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #999;
  pointer-events: none;
}


#bookmark-entries {
  margin: 15px 0;
}
.bookmark-row {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 15px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bookmark-row:hover {
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
}
body.reader.darkmode .bookmark-row {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.reader.darkmode .bookmark-row:hover {
  background: rgba(255,255,255,0.05);
}
.bookmark-row button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: #999;
  padding: 5px;
}

/* Startscreen */
.startscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}
.startscreen h1 {
  font-size: 36px;
  margin-bottom: 20px;
}
.startscreen h2 {
  font-size: 20px;
  color: #888;
  margin-top: 5px;
}
.startscreen .byline {
  font-size: 14px;
  color: #aaa;
  margin-top: 20px;
}
.startscreen .intro {
  font-size: 16px;
  margin-top: 20px;
  color: #444;
  max-width: 600px;
}
.startscreen .quote {
  font-style: italic;
  color: #666;
  margin-top: 40px;
}
.startscreen .start-hint {
  font-size: 14px;
  margin-top: 20px;
  color: #aaa;
}

body.reader.serif {
  font-family: 'EB Garamond', serif;
}
body.reader.sans {
  font-family: 'Open Sans', sans-serif;
}
body.reader.ls-small #pages {
  line-height: 1.4;
}
body.reader.ls-medium #pages {
  line-height: 1.55;
}
body.reader.ls-large #pages {
  line-height: 1.8;
}
body.reader.font-small #pages {
  font-size: 17px;
}
body.reader.font-medium #pages {
  font-size: 19px;
}
body.reader.font-large #pages {
  font-size: 21px;
}


.preview {
  width: 90%;
  max-width: 100%;
  height: 300px;
  box-sizing: border-box;
  overflow-y: auto;
  margin: 0 auto;
}

.preview.serif {
  font-family: 'EB Garamond', serif;
}
.preview.sans {
  font-family: 'Open Sans', sans-serif;
}
.preview.ls-small {
  line-height: 1.4;
}
.preview.ls-medium {
  line-height: 1.55;
}
.preview.ls-large {
  line-height: 1.8;
}
.preview.font-small {
  font-size: 17px;
}
.preview.font-medium {
  font-size: 19px;
}
.preview.font-large {
  font-size: 21px;
}


#stealth-scroll {
  position: absolute;
  top: 0;
  left: 0;
  height: 200vh;
  width: 1px;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

#premium-panel .lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#premium-panel p {
  margin-bottom: 1rem;
}

#premium-panel input[type="password"] {
  border: 1px solid #999;
  border-radius: 4px;
  padding: 8px;
  font-size: 16px;
}

#premium-panel button {
  background: #4b2e2e;
  color: #fff;
  border-radius: 4px;
  font-size: 16px;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
}
#premium-panel button:hover {
  background: #2a1a1a;
}
	



#titelseite-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: #fff;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#titelseite-content {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#titelseite-overlay.show {
  display: flex;
  animation: fadeIn 0s forwards;
}
#titelseite-overlay.hide {
  animation: shrinkOut 0.8s forwards;
}



@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes shrinkOut {
  0%   { transform: scale(1) translateY(0);   opacity:1; }
  100% { transform: scale(0.5) translateY(-100%); opacity:0; }
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;                    
  background: rgba(0,0,0,0.1);     
  z-index: 1000001;
  overflow: hidden;                
}
#loading-overlay.hidden {
  display: none;
}

#loading-overlay .loader-bar {
  width: 60%;
  height: 100%;
  background: repeating-linear-gradient(
                135deg,
                #ffcb00 0 14px,
                #ffc000 14px 28px
              );
  background-size: 28px 100%;
  animation: stripesSlide 0.8s linear infinite,
             pulseWidth   2.2s ease-in-out infinite;
  transform-origin: left;
}

@keyframes stripesSlide {
  from { background-position: 0 0; }
  to   { background-position: 28px 0; }
}
@keyframes pulseWidth {
  0%   { transform: scaleX(0.35); }
  50%  { transform: scaleX(0.95); }
  100% { transform: scaleX(0.35); }
}



#titelseite-content img,
#titelseite-content svg {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  background-color: #fff; 
}

@media (min-width: 769px){
  #titelseite-overlay        { overflow: hidden; }          
  #titelseite-content        {
    max-height: none;        
    overflow: visible;       
    box-sizing: border-box; 
  }
}

#dossier-modal .modal-content,
#dossier-modal span,
#dossier-modal div {
  font-family: 'Open Sans', sans-serif !important;
}

#dossier-modal p {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 16px !important;
  text-align: left !important;
  hyphens: none !important;
  line-height: 1.66 !important;
  margin-bottom: 16px !important;
}



body.is-loading-title #pages {
  opacity: 0 !important;
  transition: none !important;
}

body.bars-hidden #top-bar {
  transform: translateY(-50px);
  max-height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}
body.bars-hidden #bottom-bar {
  transform: translateY(50px);
  max-height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.page-transition {
  animation: pageFadeIn 0.35s ease-out forwards;
}

@keyframes pageFadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}


/* === Ende-der-Leseprobe / Premium-Eingabe === */

.end-of-free {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  width: 100%;
  padding: 24px 16px;
  box-sizing: border-box;
  font-family: 'EB Garamond', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.eof-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 24px 28px;
  background: linear-gradient(180deg, #fffaf0 0%, #fbf3e3 100%);
  color: #2b2620;
  border: 1px solid rgba(182, 132, 51, 0.28);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(60, 38, 10, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.5) inset;
  text-align: center;
  animation: eof-pop 280ms ease-out;
}

@keyframes eof-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

body.reader.darkmode .eof-card {
  background: linear-gradient(180deg, #1a1410 0%, #0f0c08 100%);
  color: #ece2cc;
  border-color: rgba(214, 175, 103, 0.35);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(214, 175, 103, 0.1) inset;
}

.eof-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe5a6 0%, #c9b077 50%, #937b48 100%);
  color: #1a1410;
  box-shadow: 0 8px 22px rgba(154, 129, 77, 0.35);
}

.eof-title {
  margin: 0 0 12px 0;
  font-family: 'GFS Didot', Georgia, serif;
  font-size: 26px;
  line-height: 1.2;
  background: linear-gradient(to right, #c9a05a 0%, #6f5223 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #6f5223;
}

body.reader.darkmode .eof-title {
  background: linear-gradient(to right, #ffe5a6 0%, #9a814d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #d6af67;
}

.eof-body {
  margin: 0 0 10px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #4a3f30;
}

body.reader.darkmode .eof-body {
  color: #d6cdb6;
}

.eof-mail {
  color: #8a6020;
  text-decoration: underline;
  font-weight: 500;
  word-break: break-all;
}

body.reader.darkmode .eof-mail {
  color: #d6af67;
}

.eof-form {
  display: flex;
  gap: 8px;
  margin: 18px 0 6px 0;
  align-items: stretch;
}

.eof-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(182, 132, 51, 0.4);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  color: #2b2620;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.eof-input::placeholder {
  color: #a89878;
}

.eof-input:focus {
  border-color: #c9a05a;
  box-shadow: 0 0 0 3px rgba(201, 160, 90, 0.18);
}

body.reader.darkmode .eof-input {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(214, 175, 103, 0.4);
}

body.reader.darkmode .eof-input::placeholder {
  color: #8e7e5e;
}

body.reader.darkmode .eof-input:focus {
  border-color: #d6af67;
  box-shadow: 0 0 0 3px rgba(214, 175, 103, 0.22);
}

.eof-button {
  flex: 0 0 auto;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe5a6 0%, #c9b077 50%, #937b48 100%);
  color: #1a1410;
  box-shadow: 0 4px 14px rgba(154, 129, 77, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
  min-width: 64px;
}

.eof-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(154, 129, 77, 0.45);
}

.eof-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(154, 129, 77, 0.35);
}

.eof-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.eof-feedback {
  min-height: 20px;
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0 8px 0;
}

.eof-feedback-error {
  color: #c0392b;
}

body.reader.darkmode .eof-feedback-error {
  color: #ff8b7a;
}

.eof-feedback-pending {
  color: #6f5223;
  font-style: italic;
}

body.reader.darkmode .eof-feedback-pending {
  color: #d6af67;
  font-style: italic;
}

.eof-note {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #806c4e;
  line-height: 1.45;
}

body.reader.darkmode .eof-note {
  color: #a59676;
}

.eof-site {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(182, 132, 51, 0.32);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}

body.reader.darkmode .eof-site {
  background: rgba(214, 175, 103, 0.06);
  border-color: rgba(214, 175, 103, 0.3);
}

.eof-site:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(182, 132, 51, 0.55);
  transform: translateY(-1px);
}

body.reader.darkmode .eof-site:hover {
  background: rgba(214, 175, 103, 0.12);
  border-color: rgba(214, 175, 103, 0.5);
}

.eof-site-logo {
  max-width: 110px;
  height: auto;
  display: block;
}

.eof-site-text {
  color: #8a6020;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.reader.darkmode .eof-site-text {
  color: #d6af67;
}

/* === Leseproben-Ende (portiert aus dem alten Reader, additiv) === */
.end-of-free {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  width: 100%;
  padding: 24px 16px;
  box-sizing: border-box;
  font-family: 'EB Garamond', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.eof-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 24px 28px;
  background: linear-gradient(180deg, #fffaf0 0%, #fbf3e3 100%);
  color: #2b2620;
  border: 1px solid rgba(182, 132, 51, 0.28);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(60, 38, 10, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.5) inset;
  text-align: center;
  animation: eof-pop 280ms ease-out;
}

@keyframes eof-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

body.reader.darkmode .eof-card {
  background: linear-gradient(180deg, #1a1410 0%, #0f0c08 100%);
  color: #ece2cc;
  border-color: rgba(214, 175, 103, 0.35);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(214, 175, 103, 0.1) inset;
}

.eof-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe5a6 0%, #c9b077 50%, #937b48 100%);
  color: #1a1410;
  box-shadow: 0 8px 22px rgba(154, 129, 77, 0.35);
}

.eof-title {
  margin: 0 0 12px 0;
  font-family: 'GFS Didot', Georgia, serif;
  font-size: 26px;
  line-height: 1.2;
  background: linear-gradient(to right, #c9a05a 0%, #6f5223 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #6f5223;
}

body.reader.darkmode .eof-title {
  background: linear-gradient(to right, #ffe5a6 0%, #9a814d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #d6af67;
}

.eof-body {
  margin: 0 0 10px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #4a3f30;
}

body.reader.darkmode .eof-body {
  color: #d6cdb6;
}

.eof-mail {
  color: #8a6020;
  text-decoration: underline;
  font-weight: 500;
  word-break: break-all;
}

body.reader.darkmode .eof-mail {
  color: #d6af67;
}

.eof-form {
  display: flex;
  gap: 8px;
  margin: 18px 0 6px 0;
  align-items: stretch;
}

.eof-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(182, 132, 51, 0.4);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  color: #2b2620;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.eof-input::placeholder {
  color: #a89878;
}

.eof-input:focus {
  border-color: #c9a05a;
  box-shadow: 0 0 0 3px rgba(201, 160, 90, 0.18);
}

body.reader.darkmode .eof-input {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(214, 175, 103, 0.4);
}

body.reader.darkmode .eof-input::placeholder {
  color: #8e7e5e;
}

body.reader.darkmode .eof-input:focus {
  border-color: #d6af67;
  box-shadow: 0 0 0 3px rgba(214, 175, 103, 0.22);
}

.eof-button {
  flex: 0 0 auto;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe5a6 0%, #c9b077 50%, #937b48 100%);
  color: #1a1410;
  box-shadow: 0 4px 14px rgba(154, 129, 77, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
  min-width: 64px;
}

.eof-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(154, 129, 77, 0.45);
}

.eof-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(154, 129, 77, 0.35);
}

.eof-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.eof-feedback {
  min-height: 20px;
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0 8px 0;
}

.eof-feedback-error {
  color: #c0392b;
}

body.reader.darkmode .eof-feedback-error {
  color: #ff8b7a;
}

.eof-feedback-pending {
  color: #6f5223;
  font-style: italic;
}

body.reader.darkmode .eof-feedback-pending {
  color: #d6af67;
  font-style: italic;
}

.eof-note {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: #806c4e;
  line-height: 1.45;
}

body.reader.darkmode .eof-note {
  color: #a59676;
}

.eof-site {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(182, 132, 51, 0.32);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}

body.reader.darkmode .eof-site {
  background: rgba(214, 175, 103, 0.06);
  border-color: rgba(214, 175, 103, 0.3);
}

.eof-site:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(182, 132, 51, 0.55);
  transform: translateY(-1px);
}

body.reader.darkmode .eof-site:hover {
  background: rgba(214, 175, 103, 0.12);
  border-color: rgba(214, 175, 103, 0.5);
}

.eof-site-logo {
  max-width: 110px;
  height: auto;
  display: block;
}

.eof-site-text {
  color: #8a6020;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.reader.darkmode .eof-site-text {
  color: #d6af67;
}

.eof-form-stack { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px 0; }
.eof-form-stack .eof-input { width: 100%; box-sizing: border-box; }
.eof-primary {
  width: 100%; padding: 14px 18px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #ffe5a6 0%, #c9b077 50%, #937b48 100%);
  color: #1a1410; box-shadow: 0 6px 18px rgba(154,129,77,0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.eof-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(154,129,77,0.45); }
.eof-primary:active { transform: translateY(0); }
.eof-primary:disabled { opacity: 0.65; cursor: wait; transform: none; box-shadow: none; }
.eof-actions { display: flex; flex-direction: row; gap: 10px; margin-top: 14px; }
.eof-secondary {
  flex: 1 1 0; min-width: 0; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  font-size: 14px; font-family: inherit; font-weight: 600;
  background: transparent; color: #6f5223;
  border: 1px solid rgba(182,132,51,0.4);
}
body.reader.darkmode .eof-secondary { color: #d6af67; border-color: rgba(214,175,103,0.4); }
.eof-switch {
  margin: 12px 0 0 0; font-size: 13px; color: #806c4e; background: none; border: none;
  cursor: pointer; text-decoration: underline; font-family: inherit;
}
body.reader.darkmode .eof-switch { color: #a59676; }

.eof-formhead {
  font-family: 'GFS Didot', Georgia, serif;
  font-size: 17px; font-weight: 700; color: #6f5223;
  text-align: center; margin: 2px 0 2px 0;
}
body.reader.darkmode .eof-formhead { color: #d6af67; }
.eof-subnote {
  font-size: 12px; line-height: 1.45; color: #806c4e;
  text-align: center; margin: 2px 0 0 0;
}
body.reader.darkmode .eof-subnote { color: #a59676; }

#reader-splash {
  position: fixed; inset: 0; z-index: 1000000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #fdf9f0 0%, #f6eede 100%);
  transition: opacity .4s ease;
  font-family: 'GFS Didot', Georgia, serif;
}
#reader-splash.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
body.reader.darkmode #reader-splash {
  background: linear-gradient(180deg, #181410 0%, #100d09 100%);
}
#reader-splash .rs-ring {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid rgba(147,123,72,.22);
  border-top: 3px solid #b68433;
  animation: rsSpin 900ms linear infinite;
}
#reader-splash .rs-brand {
  margin-top: 20px; font-size: 19px; letter-spacing: .14em;
  text-transform: uppercase; color: #8a6f3c;
}
body.reader.darkmode #reader-splash .rs-brand { color: #d6af67; }
#reader-splash .rs-sub {
  margin-top: 8px; font-size: 13px; color: #9a8a6a;
  font-family: Georgia, serif; letter-spacing: .02em;
}
body.reader.darkmode #reader-splash .rs-sub { color: #8e7e5e; }
@keyframes rsSpin { to { transform: rotate(360deg); } }

.eof-order { text-align: left; margin: 16px 0 6px 0; }
.eof-order-line { display: flex; justify-content: space-between; gap: 12px;
  font-size: 16px; font-weight: 600; color: #2b2620; }
body.reader.darkmode .eof-order-line { color: #ece2cc; }
.eof-order-price { white-space: nowrap; }
.eof-order-sub { font-size: 13px; color: #806c4e; margin-top: 3px; }
body.reader.darkmode .eof-order-sub { color: #a59676; }
.eof-order-total { display: flex; justify-content: space-between;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(182,132,51,.28);
  font-size: 16px; font-weight: 700; color: #6f5223; }
body.reader.darkmode .eof-order-total { color: #d6af67; border-color: rgba(214,175,103,.3); }
.eof-consent { display: flex; align-items: flex-start; gap: 10px;
  text-align: left; font-size: 12.5px; line-height: 1.5; color: #5a4f3c;
  margin: 12px 0 0 0; cursor: pointer; }
body.reader.darkmode .eof-consent { color: #cabfa3; }
.eof-consent input { margin-top: 2px; width: 17px; height: 17px;
  accent-color: #b68433; flex: 0 0 auto; }
.eof-consent a { color: #8a6020; text-decoration: underline; }
body.reader.darkmode .eof-consent a { color: #d6af67; }
#buy-confirm { position: fixed; inset: 0; z-index: 1000002;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(20,16,10,.55); }
#buy-confirm .buy-confirm-card { max-width: 460px; }
