/* =========================
1. ROOT / BASE
========================= */

* {
box-sizing: border-box;
}

html {
min-height: 100%;
}

body {
margin: 0;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
position: relative;
overflow-x: hidden;
}

body::after {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
z-index: 0;
}

button,
select {
font: inherit;
}

button {
cursor: pointer;
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
}


/* =========================
2. BACKGROUND THEMES
========================= */

body.morning {
background:
radial-gradient(circle at 50% 18%, rgba(255,255,255,0.55), transparent 40%),
radial-gradient(circle at 50% 45%, rgba(255,255,255,0.35), transparent 55%),
radial-gradient(circle at 50% 90%, rgba(120,140,130,0.15), transparent 60%),
linear-gradient(180deg, #eef3f1 0%, #e6eeea 30%, #d7e3dc 60%, #c9d8cf 100%);
}

body.morning::after {
background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), transparent 65%);
}


/* =========================
   TAGESSCREEN
========================= */

body.day {
  min-height: 100vh;
  color: #26332c;
  overflow: hidden;

  background:
    radial-gradient(circle at 22% 20%,
      rgba(255, 244, 210, 0.9) 0%,
      rgba(255, 244, 210, 0.3) 23%,
      transparent 46%
    ),
    radial-gradient(circle at 82% 24%,
      rgba(188, 221, 190, 0.38) 0%,
      rgba(188, 221, 190, 0.14) 28%,
      transparent 55%
    ),
    radial-gradient(circle at 48% 90%,
      rgba(108, 142, 105, 0.28) 0%,
      rgba(108, 142, 105, 0.12) 34%,
      transparent 68%
    ),
    linear-gradient(145deg,
      #f3f6ed 0%,
      #e7efe2 32%,
      #d7e5d5 68%,
      #bfd2bf 100%
    );
}

/* ===== Fern-Layer (Himmel / Landschaft) ===== */

body.day::before {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -3;

  background:
    radial-gradient(ellipse at 50% 18%,
      rgba(255, 250, 222, 0.72) 0%,
      rgba(255, 250, 222, 0.22) 34%,
      transparent 62%
    ),
    radial-gradient(ellipse at 12% 58%,
      rgba(117, 151, 116, 0.22) 0%,
      rgba(117, 151, 116, 0.09) 32%,
      transparent 62%
    ),
    radial-gradient(ellipse at 88% 64%,
      rgba(144, 173, 126, 0.20) 0%,
      rgba(144, 173, 126, 0.08) 36%,
      transparent 68% 
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 46%,
      rgba(95, 125, 98, 0.18) 50%,
      rgba(255, 255, 255, 0.22) 52%,
      rgba(95, 125, 98, 0.10) 56%,
      transparent 64%
    );

  filter: blur(22px);
}

/* ===== Vordergrund-Tiefe ===== */

body.day::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;

  background:
    radial-gradient(ellipse at center,
      transparent 0%,
      transparent 48%,
      rgba(65, 92, 70, 0.08) 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 52%,
      rgba(120, 150, 110, 0.12) 66%,
      rgba(75, 105, 80, 0.22) 86%,
      rgba(52, 82, 64, 0.28) 100%
    ),
    radial-gradient(ellipse at 50% 82%,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0.14) 28%,
      transparent 62%
    );

  opacity: 0.9;
}

/* ===== Atmosphere (animierter Layer) ===== */

.day-atmosphere {
  position: fixed;
  inset: -22%;
  pointer-events: none;
  z-index: -1;

  background:
    radial-gradient(ellipse at 22% 18%,
      rgba(255, 248, 210, 0.58) 0%,
      rgba(255, 248, 210, 0.24) 30%,
      transparent 64%
    ),
    radial-gradient(ellipse at 72% 42%,
      rgba(210, 232, 205, 0.36) 0%,
      rgba(210, 232, 205, 0.16) 32%,
      transparent 68%
    ),
    radial-gradient(ellipse at 50% 78%,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(255, 255, 255, 0.18) 24%,
      transparent 58%
    );

  filter: blur(20px);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1.04);
}

/* ===== Dein UI-Container ===== */

body.day .screen-inner {
  position: relative;
  z-index: 2;

  background: rgba(255, 255, 248, 0.42);
  box-shadow:
    0 34px 90px rgba(57, 83, 60, 0.16),
    0 10px 30px rgba(57, 83, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(16px);
}


/* =========================
   NIGHTSCREEN
========================= */

body.night {
  min-height: 100vh;
  color: #eef2f2;
  overflow: hidden;

  background:
    radial-gradient(circle at 24% 18%,
      rgba(132, 158, 176, 0.22) 0%,
      rgba(132, 158, 176, 0.08) 26%,
      transparent 52%
    ),
    radial-gradient(circle at 76% 72%,
      rgba(54, 82, 100, 0.36) 0%,
      rgba(54, 82, 100, 0.12) 36%,
      transparent 72%
    ),
    linear-gradient(145deg,
      #0c1620 0%,
      #142432 35%,
      #1f3444 68%,
      #0d1821 100%
    );
}

body.night::before {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -3;

  background:
    radial-gradient(ellipse at 52% 16%,
      rgba(220, 232, 238, 0.14) 0%,
      rgba(220, 232, 238, 0.05) 34%,
      transparent 64%
    ),
    radial-gradient(ellipse at 18% 62%,
      rgba(74, 104, 122, 0.30) 0%,
      rgba(74, 104, 122, 0.10) 36%,
      transparent 68%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 43%,
      rgba(170, 205, 215, 0.08) 52%,
      rgba(5, 12, 18, 0.24) 78%,
      rgba(2, 6, 9, 0.42) 100%
    );

  filter: blur(26px);
}

body.night::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;

  background:
    radial-gradient(ellipse at center,
      transparent 0%,
      transparent 42%,
      rgba(0, 0, 0, 0.34) 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 54%,
      rgba(4, 10, 15, 0.22) 78%,
      rgba(0, 3, 6, 0.48) 100%
    );

  opacity: 0.92;
}

/* bewegte Nachtluft / Wolkenschleier */
.night-atmosphere {
  position: fixed;
  inset: -24%;
  pointer-events: none;
  z-index: 1;

  background:
    radial-gradient(ellipse at 12% 58%,
      rgba(170, 205, 225, 0.18) 0%,
      rgba(170, 205, 225, 0.08) 24%,
      transparent 58%
    ),
    radial-gradient(ellipse at 78% 64%,
      rgba(118, 156, 174, 0.16) 0%,
      rgba(118, 156, 174, 0.06) 34%,
      transparent 72%
    ),
    radial-gradient(ellipse at 44% 44%,
      rgba(210, 225, 235, 0.10) 0%,
      rgba(210, 225, 235, 0.04) 32%,
      transparent 70%
    );

  filter: blur(34px);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1.08);
}

/* weniger, edlere Sterne */
.night-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;

  background-image:
    radial-gradient(circle, rgba(255,255,255,0.88) 0 1.1px, transparent 1.9px),
    radial-gradient(circle, rgba(210,230,235,0.52) 0 0.9px, transparent 1.7px),
    radial-gradient(circle, rgba(255,245,210,0.38) 0 0.8px, transparent 1.5px);

  background-size:
    320px 320px,
    430px 430px,
    560px 560px;

  background-position:
    40px 76px,
    170px 130px,
    260px 220px;

  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
}

/* einzelne stärkere Funkelsterne */
.night-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;

  background-image:
    radial-gradient(circle, rgba(255,255,255,0.98) 0 1.5px, transparent 2.6px),
    radial-gradient(circle, rgba(255,255,255,0.80) 0 1.2px, transparent 2.2px);

  background-size:
    520px 520px,
    680px 680px;

  background-position:
    120px 90px,
    360px 240px;

  mix-blend-mode: screen;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.55));
}

/* Papier vorne behalten */
body.night .paper-sheet {
  position: relative;
  z-index: 2;
}
/* =========================
   3. APP / SCREEN SYSTEM
========================= */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}
.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.screen.is-active {
  display: grid;
}
.screen__inner {
  width: 100%;
  min-height: 100vh;
  padding: clamp(16px, 3vh, 40px) clamp(16px, 3vw, 48px);
  display: grid;
  place-items: center;
  position: relative;
}
/* =========================
   4A. PAPER / BOOK LAYOUT
========================= */
/*
  Fluid sizing:
  - Mobile:       ~90vw  (aber max 420px)
  - Small laptop: ~60vw
  - Desktop:      ~44vw  (aber max 620px)
  - Large screen: capped bei 680px
  clamp(min, preferred, max)
*/
.paper-sheet {
  position: relative;
  width: clamp(300px, 46vw, 680px);
  aspect-ratio: 777 / 1023;
  background: transparent;
  box-shadow: none;
  /* overflow: visible ist Standard — Stift darf rausragen */
  overflow: visible;
  z-index: 2;
  /* Isoliert Stacking Context → verhindert SVG-Filter-Bleed */
  isolation: isolate;
}
.paper-sheet--start,
.paper-sheet--transition {
  display: block;
  position: relative;
}
.paper-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
  /* Verhindert subpixel-Gap unter dem SVG */
  display: block;
}
/* =========================
   4B. DESK PROPS
========================= */
.screen__inner--desk,
.screen--start .screen__inner,
.screen--transition .screen__inner {
  position: relative;
}
/*
  Der Pen liegt NICHT mehr im screen__inner-Koordinatensystem,
  sondern wird via JS oder direkt als Kind von .paper-sheet behandelt.
  Da er im HTML ein Geschwisterkind von .paper-sheet ist,
  positionieren wir ihn relativ zum screen__inner —
  aber mit Werten, die sich am paper-sheet orientieren.
  Trick: screen__inner ist place-items:center → das paper-sheet
  sitzt mittig. Wir nutzen transform auf dem pen, um ihn
  relativ zum Notebook zu halten.
*/
.desk-props {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.desk-prop {
  position: absolute;
  display: block;
  pointer-events: none;
}
/*
  Pen: sitzt rechts vom Notebook.
  Wir nutzen left: 50% als Ausgangspunkt (Mitte des screen__inner)
  und schieben ihn dann per translate relativ zum Notebook-Rand.
  Das paper-sheet hat width: clamp(300px, 46vw, 680px),
  also halbe Breite = clamp(150px, 23vw, 340px).
  Pen soll ca. 5% über den rechten Rand ragen.
*/
.desk-prop--pen {
  width: clamp(28px, 3.2vw, 52px);
  /* Vertikale Mitte: leicht über Notebook-Mitte */
  top: 50%;
  /* Horizontale Position: Mitte + halbe Notebook-Breite + kleiner Offset */
  left: 50%;
  transform: translate(
    calc(clamp(150px, 23vw, 340px) - clamp(20px, 2.5vw, 36px)),
    calc(-50% - clamp(40px, 6vh, 90px))
  ) rotate(18deg);
  z-index: 4;
}

.book-wrap,
.notebook-wrap,
.book-shell {
  filter: drop-shadow(0 18px 34px rgba(34, 20, 12, 0.22))
          drop-shadow(0 4px 10px rgba(34, 20, 12, 0.18));
}
/* =========================
   5. START SCREEN
========================= */
.paper-sheet--start {
  display: block;
  position: relative;
}
/* =========================
   START PANEL — SVG-präzise Platzierung
   Basiert auf book.svg Geometrie:
   Weißer Innenbereich: x=40–702, y=14–972
   Nutzbar (nach Ringen): x=121–664
   In Prozent des SVG (755×988):
   Links der Ringe: 121/755 = 16%
   Rechts vor Buchrücken: (755-91)/755 = 88%
   Oben: 14/988 = ~1.5%
========================= */
.start-panel {
  position: absolute;
  top: 6%;
  left: 17%;
  right: 12%;
  bottom: 6%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  transform: none;
  width: auto;
  max-width: none;
  margin: 0;

  padding: clamp(10px, 3%, 26px) clamp(6px, 2%, 18px);
  overflow: visible;
}

.start-header {
  text-align: center;
  width: 100%;
  flex-shrink: 0;

  margin-bottom: clamp(48px, 10%, 90px);
}

.start-title {
  width: 88%;
  margin: 0 auto clamp(3px, 1%, 9px);
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1.06;
  color: #2a3f5f;
  text-align: left;
}

.start-subtitle {
  width: 88%;
  margin: clamp(60px, 5%, 5px) auto 0;
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.35;
 color: #1f3552;
letter-spacing: 0.02em;
  text-align: left;
}

/* =========================
   START FORM — NOTEBOOK LINES
========================= */

.time-form {
  width: 88%;
  flex: 1;
  min-height: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;

  margin-top: clamp(10px, 2%, 18px);
  gap: clamp(20px, 4.8%, 38px);
}

.time-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(16px, 4.2%, 34px);
}

.time-group {
  width: 100%;
  padding: 0;
  border-radius: 0;
  text-align: left;

  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.time-group label {
  display: block;
  margin: 0 0 clamp(5px, 1.8%, 16px);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 600;
  color: rgba(42, 63, 95, 0.72);
  text-align: left;
}

.time-inputs {
  width: 100%;
  margin: 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: clamp(10px, 1.4vw, 18px);
}

.time-inputs select {
  width: 100%;
  min-width: 0;
  height: clamp(34px, 4vw, 54px);

  padding: 0 clamp(4px, 0.8vw, 12px);

  border: none;
  border-bottom: 2px solid rgba(42, 63, 95, 0.48);
  border-radius: 0;
  outline: none;

  background: transparent;
  color: #2a3f5f;

  font-family: inherit;
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 500;
  text-align: center;

  box-shadow: none;
  cursor: pointer;

  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.time-inputs select:hover {
  border-bottom-color: rgba(42, 63, 95, 0.78);
  background: rgba(255, 235, 145, 0.16);
}

.time-inputs select:focus {
  border-bottom-color: #2a3f5f;
  background: rgba(255, 235, 145, 0.24);
}

.colon {
  padding-bottom: clamp(3px, 0.5vw, 7px);
  font-size: clamp(20px, 2.4vw, 34px);
  color: #2a3f5f;
}

/* =========================
   START CONFIRM — NOTEBOOK CHECK
========================= */

.plan-check-button {
  align-self: flex-start;
  margin-top: clamp(14px, 4%, 34px);

  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(9px, 1vw, 15px);

  padding: clamp(6px, 1vw, 10px) clamp(8px, 1.5vw, 16px);

  border: none;
  border-radius: 0;

  background: transparent;
  color: #2a3f5f;

  font-family: "Caveat", cursive;
  font-size: clamp(20px, 1.9vw, 30px);
  font-weight: 600;

  box-shadow: none;
  cursor: pointer;
  transform: rotate(-0.4deg);

  transition:
    transform 0.16s ease,
    background 0.16s ease;
}

.plan-check-button:hover {
  transform: rotate(-0.4deg) translateY(-1px);
  background: rgba(255, 235, 145, 0.18);
}

.plan-check-button:active {
  transform: rotate(-0.4deg) translateY(1px) scale(0.985);
  background: rgba(255, 235, 145, 0.28);
}

.plan-check-box {
  position: relative;

  width: clamp(19px, 1.7vw, 27px);
  height: clamp(19px, 1.7vw, 27px);

  border: 2px solid rgba(42, 63, 95, 0.54);
  border-radius: 4px;

  background: rgba(255, 255, 255, 0.16);

  box-shadow: none;
}

.plan-check-mark {
  position: absolute;
  left: 50%;
  top: 47%;

  transform: translate(-50%, -50%) scale(0.7) rotate(-8deg);
  opacity: 0.18;

  color: #2f6b4f;
  font-family: "Caveat", cursive;
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1;

  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    color 0.16s ease;
}

.plan-check-button:hover .plan-check-mark {
  opacity: 0.45;
  transform: translate(-50%, -50%) scale(0.9) rotate(-8deg);
}

.plan-check-button:active .plan-check-mark {
  opacity: 1;
  color: #2f6b4f;
  transform: translate(-50%, -50%) scale(1.08) rotate(-8deg);
}

.plan-check-label {
  transform: translateY(1px);
  border-bottom: 2px solid rgba(42, 63, 95, 0.36);
}

.dedication {
  width: 88%;
  margin: clamp(2px, 1%, 8px) auto 0;
  font-size: clamp(8px, 0.65vw, 11px);
  color: rgba(42, 63, 95, 0.32);
  opacity: 0.75;
  text-align: left;
  flex-shrink: 0;
}

/* =========================
6. TRANSITION SCREEN
========================= */

.screen--transition .screen__inner {
display: grid;
place-items: center;
}


/* =========================
7. STICKY NOTE SYSTEM (FINAL POLISH)
========================= */

.sticky-note {
position: relative;
z-index: 20;

  width: clamp(234px, 47vw, 432px);
aspect-ratio: 2635 / 2515;

transform: rotate(-7deg);
transform-origin: 50% 40%;
}

.sticky-note.is-hidden {
display: none;
}

.sticky-note__visual,
.sticky-note__svg {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}

.sticky-note__svg {
display: block;
}

/* leichte Papiertextur */
.sticky-note::after {
content: "";
position: absolute;
inset: 10% 8% 8%;
pointer-events: none;
z-index: 1;

opacity: 0.12;
mix-blend-mode: multiply;

background-image:
radial-gradient(circle, rgba(70, 45, 10, 0.14) 0 0.7px, transparent 0.8px),
linear-gradient(135deg, rgba(255,255,255,0.10), rgba(0,0,0,0.04));
background-size: 14px 14px, 100% 100%;
}

.sticky-note__content {
position: absolute;
inset: 25% 15% 13%;
z-index: 2;

display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;

text-align: center;
font-family: "Caveat", cursive;
color: #1f3552;
}

.sticky-note__state {
display: none;
width: 100%;
}

.sticky-note__state.is-active {
display: flex;
flex-direction: column;
align-items: center;
}

/* =========================
TYPO SYSTEM
========================= */

.sticky-note__title {
margin: 0;
font-size: clamp(24px, 3vw, 34px);
font-weight: 600;
line-height: 1.18;
letter-spacing: 0.01em;
font-family: "Caveat", cursive;
color: #1f3552;  
}

/* =========================
STATE 1: GEPLANT
========================= */

/* =========================
   STICKY NOTE — TYPO (KULI)
========================= */

.sticky-note__state--planned .sticky-note__title {
  max-width: 88%;
  margin-bottom: 14px;

  color: #1f3552;
  font-family: "Caveat", cursive;
}

.sticky-note__checklist {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;

  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.25;

  color: #1f3552;
  font-family: "Caveat", cursive;
}

.sticky-note__checklist li {
  margin-bottom: 6px;
}

/* =========================
   STICKY NOTE — CHECK BUTTON
========================= */

.sticky-note__button {
  margin-top: 10px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 6px 10px;

  border: none;
  border-radius: 0;

  background: transparent;
  color: #1f3552;

  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 600;

  cursor: pointer;

  transform: rotate(-0.6deg);
  transition: transform 0.16s ease, background 0.16s ease;
}

.sticky-note__button:hover {
  transform: rotate(-0.6deg) translateY(-1px);
  background: rgba(255, 235, 145, 0.18);
}

.sticky-note__button:active {
  transform: rotate(-0.6deg) translateY(1px) scale(0.98);
  background: rgba(255, 235, 145, 0.28);
}

/* CHECKBOX */

.sticky-note__button::before {
  content: "";

  width: 20px;
  height: 20px;

  border: 2px solid rgba(31, 53, 82, 0.6);
  border-radius: 4px;

  display: inline-block;

  background: rgba(255, 255, 255, 0.15);
}

/* CHECKMARK (erscheint beim Klick später per Klasse) */

.sticky-note__button.is-checked::after {
  content: "✓";

  position: absolute;

  transform: translate(2px, -1px) rotate(-8deg);

  font-size: 20px;
  color: #2f6b4f;
  font-family: "Caveat", cursive;
}
/* =========================
STATE 2: WAITING
========================= */

.sticky-note__state--waiting {
padding-top: 16px;
}

.sticky-note__state--waiting .sticky-note__title {
max-width: 86%;
font-size: clamp(24px, 3vw, 34px);
 font-family: "Caveat", cursive;
color: #1f3552;  
}

/* =========================
STATE 3: BREAK
========================= */

.sticky-note__state--break {
padding-top: 6px;
}

.sticky-note__state--break .sticky-note__title {
font-size: clamp(28px, 3.6vw, 40px);
font-family: "Caveat", cursive;
color: #1f3552;   
}

/* =========================
STATE 4: DONE
========================= */

.sticky-note__state--done {
padding-top: 6px;
}

.sticky-note__state--done .sticky-note__title {
max-width: 90%;
font-size: clamp(22px, 2.7vw, 30px);
}

/* =========================
LAYOUT
========================= */

/* Transition: Sticky + Papier */
.screen--transition .screen__inner {
display: grid;
place-items: center;
}

.screen--transition .paper-sheet,
.screen--transition .sticky-note {
grid-area: 1 / 1;
}

/* Break Layout */
.break-layout {
width: 100%;
min-height: calc(100vh - 84px);

display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;

gap: 42px;
}

/* Sticky im Break */
.screen--break .sticky-note {
width: min(58vw, 400px);
transform: rotate(-5deg);
}

/* =========================
8. BREAK SCREEN LAYOUT
========================= */

.screen--break .screen__inner {
padding: 48px 20px 36px;
place-items: start center;
}

.break-layout {
width: 100%;
min-height: calc(100vh - 84px);

display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
gap: 34px;
}

/* =========================
   FLIP CLOCK
========================= */

.flip-clock-wrap {
display: flex;
justify-content: center;
align-items: center;
width: 820px;
max-width: 92vw;
margin-top: 10px;
margin-bottom: 34px;
padding: 12px;
border-radius: 40px;
box-sizing: border-box;

background: linear-gradient(
180deg,
#ffb84d 0%,
#ff9d1f 35%,
#f07c00 70%,
#c85e00 100%
);

box-shadow:
0 16px 28px rgba(0, 0, 0, 0.28),
0 0 28px rgba(255, 190, 80, 0.10),
inset 0 2px 2px rgba(255, 255, 255, 0.35),
inset 0 -10px 14px rgba(0, 0, 0, 0.28),
inset 8px 0 12px rgba(255, 255, 255, 0.06),
inset -8px 0 12px rgba(0, 0, 0, 0.14);

border: 2px solid rgba(0, 0, 0, 0.15);
}

.flip-clock-panel {
position: relative;
width: 100%;
padding: 36px 48px 34px;
border-radius: 29px;
background: linear-gradient(
180deg,
#504941 0%,
#433d37 35%,
#39342f 68%,
#312d29 100%
);
box-shadow:
0 8px 18px rgba(0,0,0,0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.05),
inset 0 10px 18px rgba(255, 255, 255, 0.015),
inset 0 -14px 24px rgba(0, 0, 0, 0.42);
box-sizing: border-box;
}

.flip-clock-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 29px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.03) 0, transparent 18%),
    radial-gradient(circle at 76% 70%, rgba(255, 255, 255, 0.02) 0, transparent 22%);
  pointer-events: none;
}

.flip-label {
  position: relative;
  z-index: 2;
  margin: 0 0 18px;
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: #f2d99a;
  font-family: Arial, sans-serif;
}

.flip-display {
position: relative;
width: 74%;
margin: 0 auto;

display: flex;
justify-content: center;
align-items: center;
gap: 10px;

border-radius: 22px;
background: linear-gradient(
180deg,
#292826 0%,
#22211f 48%,
#1c1b19 100%
);
box-shadow:
0 6px 16px rgba(0,0,0,0.18),
inset 0 10px 18px rgba(0, 0, 0, 0.72),
inset 0 -4px 8px rgba(255, 255, 255, 0.04);
}


.flip-display::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.00) 28%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
}

.flip-group {
  position: relative;
  display: flex;
  gap: 2px;
}

.flip-group::before,
.flip-group::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 28px;
  transform: translateY(-50%);
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    #d8d2ca 0%,
    #9c968e 50%,
    #5d5954 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.38);
  z-index: 5;
}

.flip-group::before {
  left: -5px;
}

.flip-group::after {
  right: -5px;
}

.flip-card {
  position: relative;
  width: 118px;
  height: 156px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    180deg,
    #43433f 0%,
    #343530 42%,
    #282925 100%
  );
  color: #f4efe5;
  font-size: 104px;
  font-weight: 700;
  line-height: 1;
  font-family: Arial, sans-serif;
  border-radius: 8px;
  border: 2px solid #171715;
  box-sizing: border-box;
  box-shadow:
    inset 0 14px 18px rgba(255, 255, 255, 0.04),
    inset 0 -18px 18px rgba(0, 0, 0, 0.34),
    inset 8px 0 12px rgba(255, 255, 255, 0.02),
    inset -10px 0 14px rgba(0, 0, 0, 0.34);
}

.flip-card::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  z-index: -1;
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.72),
    inset 0 -4px 6px rgba(255, 255, 255, 0.03);
}

.flip-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 3;
}

.flip-card + .flip-card {
  margin-left: -1px;
}

.flip-middle-panel {
  position: relative;
  width: 96px;
  min-height: 170px;
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 -8px;
  border-radius: 0;
  background: linear-gradient(
    180deg,
    #504941 0%,
    #433d37 35%,
    #39342f 68%,
    #312d29 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -6px 10px rgba(0, 0, 0, 0.25);
}

.flip-middle-panel::before,
.flip-middle-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: inherit;
  z-index: -1;
}

.flip-middle-panel::before {
  top: -10px;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.flip-middle-panel::after {
  bottom: -10px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.flip-separator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: auto;
}

.flip-separator span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    #e3ddd4 0%,
    #aaa49b 50%,
    #6a655f 100%
  );
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35);
}



/* ============================================================
   FLIP CLOCK - CORE MECHANICS
   Single digit flip card
============================================================ */

.flip-card {
  position: relative;
  width: 118px;
  height: 156px;

  perspective: 1000px;
  transform-style: preserve-3d;

  font-family: Arial, sans-serif;
  font-size: 104px;
  font-weight: 700;
  line-height: 1;

  color: #f4efe5;

  border-radius: 8px;
  overflow: hidden;

  background: #282925;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* middle split line */
.flip-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );

  z-index: 20;
  pointer-events: none;
}

/* shared half styles */
.flip-panel-top,
.flip-panel-bottom,
.flip-leaf-front,
.flip-leaf-back {
  position: absolute;
  left: 0;

  width: 100%;
  height: 50%;

  overflow: hidden;
  box-sizing: border-box;

  display: flex;
  justify-content: center;

  background: linear-gradient(
    180deg,
    #43433f 0%,
    #343530 44%,
    #282925 100%
  );

  border: 1px solid #171715;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* fixed top half */
.flip-panel-top {
  top: 0;
  align-items: flex-end;
  border-radius: 8px 8px 0 0;
  z-index: 1;
}

/* fixed bottom half */
.flip-panel-bottom {
  bottom: 0;
  align-items: flex-start;
  border-radius: 0 0 8px 8px;
  z-index: 1;
}

/* moving leaf */
.flip-leaf {
  position: absolute;
  left: 0;
  top: 0;

  width: 100%;
  height: 50%;

  z-index: 10;

  transform-origin: bottom center;
  transform-style: preserve-3d;
  transform: rotateX(0deg);

  will-change: transform;
}

/* front side of leaf */
.flip-leaf-front {
  top: 0;
  height: 100%;
  align-items: flex-end;
  border-radius: 8px 8px 0 0;
}

/* back side of leaf */
.flip-leaf-back {
  top: 0;
  height: 100%;
  align-items: flex-start;
  border-radius: 0 0 8px 8px;

  transform: rotateX(180deg);
}

/* number positioning */
.flip-panel-top span,
.flip-leaf-front span {
  transform: translateY(50%);
}

.flip-panel-bottom span,
.flip-leaf-back span {
  transform: translateY(-50%);
}

/* animated state */
.flip-card.is-flipping .flip-leaf {
  animation: flipLeafDown 0.6s ease-in-out forwards;
}

@keyframes flipLeafDown {
  0% {
    transform: rotateX(0deg);
  }

  100% {
    transform: rotateX(-180deg);
  }
}



.app-credit {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
}

/* =========================
   LARGE DESKTOP (≥ 1600px)
========================= */
@media (min-width: 1600px) {
  .paper-sheet {
    width: clamp(500px, 32vw, 640px);
  }

  .start-title {
    font-size: clamp(28px, 2.6vw, 46px);
  }

  .desk-prop--pen {
    width: clamp(38px, 2.8vw, 58px);
  }

  .sticky-note {
    width: clamp(234px, 47vw, 432px);
  }
}
/* =========================
   SMALL LAPTOP (≤ 1280px)
========================= */
@media (max-width: 1280px) {
  .paper-sheet {
    width: clamp(300px, 52vw, 580px);
  }
  .start-title {
    font-size: clamp(18px, 3.4vw, 36px);
  }
  .start-subtitle {
    font-size: clamp(10px, 1vw, 14px);
  }
   .sticky-note {
  width: clamp(240px, 46vw, 430px);
}
/* =========================
   TABLET (≤ 900px)
========================= */
@media (max-width: 900px) {
  .screen__inner {
    padding: clamp(12px, 2vh, 24px) clamp(12px, 3vw, 28px);
  }
  .paper-sheet {
    width: clamp(300px, 70vw, 480px);
  }
  /* Pen auf Tablet: kleiner, engere Anbindung ans Notebook */
  .desk-prop--pen {
    width: clamp(24px, 2.8vw, 38px);
    transform: translate(
      calc(clamp(150px, 35vw, 240px) - clamp(16px, 2vw, 28px)),
      calc(-50% - clamp(30px, 4vh, 60px))
    ) rotate(18deg);
  }
  .sticky-note {
    width: clamp(240px, 58vw, 400px);
  }
  .screen--break .sticky-note {
    width: clamp(200px, 48vw, 320px);
  }
}
/* =========================
   MOBILE (≤ 768px)
========================= */
@media (max-width: 768px) {
  /* Layout */
  .screen {
    min-height: 100svh;
  }
  .screen__inner {
    min-height: 100svh;
    padding: clamp(12px, 3vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  /* Notebook: fast fullwidth auf Mobile */
  .paper-sheet {
    width: clamp(260px, 82vw, 400px);
  margin: 0 auto;
    /* overflow:hidden clippt SVG-Filter-Bleed = kein braunes Rechteck */
    overflow: hidden;
  }
  /* start-panel: auf Mobile relative statt absolute,
     damit es sich ins normale flow-Layout einfügt
     und nicht über den Notebook-Rand rutscht */
  .start-panel {
    position: absolute;
    top: 8%;
    left: 8%;
    right: 8%;
    bottom: 4%;
    padding: clamp(6px, 3%, 16px) clamp(8px, 4%, 16px);
    gap: 0;
    overflow: hidden;
  }
  .start-title {
    font-size: clamp(16px, 5.2vw, 26px);
    line-height: 1.08;
  }
  .start-subtitle {
    font-size: clamp(10px, 2.8vw, 13px);
  }
  .time-form {
    width: 92%;
    margin-top: clamp(4px, 2%, 12px);
    gap: clamp(4px, 1.5%, 10px);
  }
  .time-row {
    gap: clamp(4px, 1.5%, 10px);
  }
  .time-group {
    padding: clamp(6px, 1.5%, 12px) clamp(8px, 2%, 14px);
    border-radius: clamp(8px, 2vw, 14px);
  }
  .time-group label {
    font-size: clamp(10px, 2.8vw, 13px);
    margin-bottom: clamp(4px, 1%, 8px);
  }
  .time-inputs select {
    height: clamp(30px, 8vw, 52px);
    font-size: clamp(14px, 4.2vw, 22px);
    border-radius: clamp(8px, 1.8vw, 14px);
  }
  .colon {
    font-size: clamp(18px, 4.8vw, 26px);
  }
  .button,
  #start-button {
    margin-top: clamp(4px, 1.5%, 12px);
    padding: clamp(8px, 1.8%, 12px) clamp(14px, 4vw, 24px);
    width: 78%;
    font-size: clamp(12px, 3.4vw, 15px);
  }
  .dedication {
    display: none;
  }
  /* Pen: auf Mobile ausblenden — zu wenig Platz, wirkt unruhig */
  .desk-prop--pen {
    display: none;
  }
  /* Transition Screen */
  .screen--transition .screen__inner {
    display: grid;
    place-items: start center;
    padding-top: clamp(24px, 5vh, 48px);
  }
  .screen--transition .sticky-note {
    margin-top: clamp(90px, 22vw, 140px);
    width: clamp(220px, 72vw, 340px);
  }
  /* Sticky Note */
  .sticky-note {
    width: clamp(220px, 72vw, 340px);
    /* Auf Mobile SVG-Filter containen */
    overflow: hidden;
    isolation: isolate;
  }
  .sticky-note__content {
    inset: 23% 12% 12%;
  }
  .sticky-note__title {
    font-size: clamp(18px, 5.2vw, 26px);
    line-height: 1.12;
  }
  .sticky-note__checklist {
    margin: clamp(8px, 2%, 16px) 0 clamp(8px, 2%, 16px);
    font-size: clamp(15px, 4.2vw, 22px);
    line-height: 1.2;
  }
  .sticky-note__button {
    padding: clamp(8px, 2%, 12px) clamp(16px, 4vw, 24px);
    font-size: clamp(12px, 3vw, 15px);
  }
  .screen--break .sticky-note {
    width: clamp(190px, 62vw, 300px);
  }
  /* Break Screen */
  .screen--break .screen__inner {
    padding: clamp(20px, 4vh, 40px) 0 clamp(16px, 3vh, 32px);
    align-items: flex-start;
    overflow-x: hidden;
  }
  .break-layout {
    width: 100%;
    min-height: auto;
    gap: clamp(24px, 5vh, 42px);
    overflow: hidden;
  }
  .flip-clock-wrap {
    width: min(92vw, 390px);
    max-width: 92vw;
    padding: 8px;
    border-radius: 28px;
    margin: 0;
  }
  .flip-clock-panel {
    padding: clamp(18px, 4vw, 28px) clamp(10px, 2.5vw, 18px) clamp(16px, 3.5vw, 24px);
    border-radius: 22px;
  }
  .flip-label {
    font-size: clamp(18px, 5vw, 26px);
    margin-bottom: 14px;
  }
  .flip-display {
    width: 100%;
    gap: 4px;
  }
  .flip-card {
    width: clamp(52px, 16vw, 72px);
    height: clamp(78px, 22vw, 104px);
    font-size: clamp(52px, 15vw, 74px);
  }
  .flip-middle-panel {
    width: clamp(44px, 12vw, 60px);
    min-height: clamp(90px, 24vw, 120px);
    margin: 0 -4px;
  }
  .flip-middle-panel::before,
  .flip-middle-panel::after {
    width: clamp(44px, 12vw, 60px);
  }
  .flip-separator span {
    width: 9px;
    height: 9px;
  }
} /* end @media mobile */
/* =========================
   VERY SMALL MOBILE (≤ 390px)
   z.B. iPhone SE
========================= */
@media (max-width: 390px) {
  .paper-sheet {
    width: 92vw;
  }
  .start-title {
    font-size: clamp(14px, 4.8vw, 20px);
  }
  .time-inputs select {
    height: clamp(28px, 9vw, 44px);
    font-size: clamp(13px, 4.8vw, 20px);
  }
  .colon {
    font-size: clamp(16px, 4.8vw, 22px);
  }
  .sticky-note {
    width: 84vw;
  }
}
   
}

@media (max-width: 768px) {
  .start-panel {
    top: 5%;
    left: 16%;
    right: 10%;
    bottom: 3%;
    padding: clamp(4px, 2%, 12px) clamp(4px, 2%, 10px);
  }
}
