/* Henrike & Yannick - Hochzeitswebsite */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #faf6f1;
  --rose:  #c4876a;
  --border: #e2d9d0;
  --ink:   #2d2520;
  --ink-soft: #6b5c55;
}

body {
  background: var(--cream);
  font-family: 'Jost', sans-serif;
  color: var(--ink);
  min-height: 100vh;
}

/* Dark Mode */
html.dark {
  --cream: #1a1612;
  --rose:  #d9a080;
  --border: #3a3028;
  --ink:   #f0ebe4;
  --ink-soft: #b0a090;
}
html.dark body { background: var(--cream); }

/* Theme Toggle */
.theme-toggle {
  position: fixed; top: 14px; right: 16px; z-index: 999;
  background: white; border: 1.5px solid var(--border);
  border-radius: 30px; padding: 6px 14px;
  font-family: 'Jost', sans-serif; font-size: 12px;
  color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: border-color .2s, color .2s, background .2s;
  box-shadow: 0 2px 8px rgba(44,32,24,0.08);
}
.theme-toggle:hover { border-color: var(--rose); color: var(--rose); }
html.dark .theme-toggle { background: #241e18; border-color: #3a3028; color: #b0a090; }
html.dark .theme-toggle:hover { border-color: var(--rose); color: var(--rose); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.hero-label {
  font-size: 11px; letter-spacing: 4px;
  text-transform: uppercase; color: var(--rose); margin-bottom: 12px;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 10vw, 80px);
  font-weight: 300; letter-spacing: -1px; line-height: 1;
}
.hero h1 em { font-style: italic; color: var(--rose); }
.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 20px;
  color: var(--ink-soft); margin-top: 8px;
}
.hero-line {
  width: 70px; height: 1px;
  background: linear-gradient(to right, transparent, var(--rose), transparent);
  margin: 20px auto;
}

/* Countdown */
.countdown {
  display: flex; gap: 16px;
  justify-content: center; margin: 30px 0;
}
.countdown-item {
  background: white; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 16px 12px;
  min-width: 72px; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.countdown-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,135,106,0.12);
}
html.dark .countdown-item { background: #241e18; border-color: #3a3028; }
.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 600;
  color: var(--rose); line-height: 1;
}
.countdown-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--ink-soft); margin-top: 4px;
}

/* Auth */
.auth-section { margin-top: 40px; text-align: center; }
.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-style: italic;
  color: var(--ink-soft); margin-bottom: 16px;
}
.auth-form {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; max-width: 400px; margin: 0 auto;
}
.auth-input {
  font-family: 'Jost', sans-serif; font-size: 14px;
  padding: 10px 18px; border: 1.5px solid var(--border);
  border-radius: 30px; background: white; color: var(--ink);
  outline: none; flex: 1; min-width: 200px; transition: border-color .2s;
}
.auth-input:focus { border-color: var(--rose); }
.auth-input::placeholder { color: #c4b8ae; }
html.dark .auth-input { background: #241e18; border-color: #3a3028; color: var(--ink); }
.auth-btn {
  font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 500;
  padding: 10px 24px; border: none; border-radius: 30px;
  background: var(--rose); color: white; cursor: pointer;
  transition: background .2s, transform .2s; letter-spacing: 0.5px;
}
.auth-btn:hover { background: #b37a60; transform: translateY(-1px); }
.auth-error { color: #c0392b; font-size: 12px; margin-top: 10px; }

/* Nav Cards */
.nav-section {
  padding: 60px 20px 80px; max-width: 700px; margin: 0 auto;
}
.nav-title {
  text-align: center; font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 300; margin-bottom: 8px;
}
.nav-subtitle {
  text-align: center; font-size: 13px;
  color: var(--ink-soft); margin-bottom: 32px;
}
.nav-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 600px) {
  .nav-cards { grid-template-columns: 1fr; }
}
.nav-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: 16px; padding: 32px 20px;
  text-align: center; cursor: pointer;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(196,135,106,0.15);
  border-color: var(--rose);
}
html.dark .nav-card { background: #241e18; border-color: #3a3028; }
html.dark .nav-card:hover { border-color: var(--rose); box-shadow: 0 8px 28px rgba(217,160,128,0.15); }
.nav-icon { font-size: 36px; margin-bottom: 12px; }
.nav-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600; margin-bottom: 6px;
}
.nav-card-desc {
  font-size: 12px; color: var(--ink-soft);
  font-weight: 300; line-height: 1.5;
}

/* Page Layout */
.page { padding: 40px 20px 60px; max-width: 800px; margin: 0 auto; }
.page-header { text-align: center; margin-bottom: 36px; }
.page-header .header-label {
  font-size: 11px; letter-spacing: 4px;
  text-transform: uppercase; color: var(--rose);
  margin-bottom: 8px; display: block;
}
.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 300; letter-spacing: -0.5px; line-height: 1;
}
.page-header h1 em { font-style: italic; color: var(--rose); }
.page-header-line {
  width: 70px; height: 1px;
  background: linear-gradient(to right, transparent, var(--rose), transparent);
  margin: 14px auto 0;
}

/* Back Button */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--border);
  border-radius: 30px; padding: 7px 16px;
  font-family: 'Jost', sans-serif; font-size: 12px;
  color: var(--ink-soft); cursor: pointer;
  margin-bottom: 28px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.back-btn:hover { border-color: var(--rose); color: var(--rose); }
html.dark .back-btn { background: transparent; border-color: #3a3028; color: var(--ink-soft); }
html.dark .back-btn:hover { border-color: var(--rose); color: var(--rose); }

/* Upload */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 20px;
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: border-color .3s, background .3s; margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--rose);
  background: rgba(196,135,106,0.05);
}
html.dark .upload-zone { border-color: #3a3028; }
html.dark .upload-zone:hover, html.dark .upload-zone.dragover {
  border-color: var(--rose); background: rgba(217,160,128,0.05);
}
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-text {
  font-family: 'Cormorant Garamond', serif; font-size: 20px; margin-bottom: 6px;
}
.upload-hint { font-size: 12px; color: var(--ink-soft); }

.upload-name-field {
  display: flex; gap: 10px; margin-bottom: 24px;
  align-items: center; flex-wrap: wrap;
}
.upload-name-label { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.upload-name-input {
  font-family: 'Jost', sans-serif; font-size: 14px;
  padding: 8px 16px; border: 1.5px solid var(--border);
  border-radius: 30px; background: white; color: var(--ink);
  outline: none; flex: 1; min-width: 180px; transition: border-color .2s;
}
.upload-name-input:focus { border-color: var(--rose); }
html.dark .upload-name-input { background: #241e18; border-color: #3a3028; color: var(--ink); }

.upload-preview {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px; margin-bottom: 24px;
}
.upload-thumb {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  border: 1.5px solid var(--border); position: relative;
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .remove-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.5); color: white; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.upload-submit { display: flex; justify-content: center; }
.upload-submit-btn {
  font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 500;
  padding: 12px 32px; border: none; border-radius: 30px;
  background: var(--rose); color: white; cursor: pointer;
  transition: background .2s, transform .2s; letter-spacing: 0.5px;
}
.upload-submit-btn:hover { background: #b37a60; transform: translateY(-1px); }
.upload-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.upload-progress { margin-top: 20px; display: none; }
.progress-bar {
  height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden; margin-bottom: 8px;
}
.progress-fill {
  height: 100%; background: var(--rose);
  border-radius: 2px; width: 0%; transition: width .3s;
}
.progress-text { font-size: 12px; color: var(--ink-soft); text-align: center; }

.upload-message {
  text-align: center; padding: 16px 20px;
  border-radius: 14px; margin-top: 20px; display: none; font-size: 14px;
}
.upload-message.success { background: rgba(106,145,112,0.12); color: #4f7a6e; }
.upload-message.error { background: rgba(192,57,43,0.1); color: #c0392b; }

/* Gallery */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
.gallery-item {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: transform .2s, box-shadow .2s; position: relative;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44,32,24,0.1);
}
html.dark .gallery-item { border-color: #3a3028; }
html.dark .gallery-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: 20px 10px 8px; color: white;
}
.gallery-item-name { font-size: 11px; font-weight: 500; }
.gallery-item-date { font-size: 10px; opacity: 0.7; }

.gallery-empty {
  text-align: center; padding: 60px 20px; color: var(--ink-soft);
}
.gallery-empty-icon { font-size: 48px; margin-bottom: 12px; }
.gallery-empty p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 18px;
}

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 9999;
  align-items: center; justify-content: center; padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain; border-radius: 8px;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: white;
  font-size: 32px; cursor: pointer; opacity: 0.7;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-info {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%); color: white;
  text-align: center; font-size: 13px; opacity: 0.7;
}

/* Livestream */
.stream-container { max-width: 800px; margin: 0 auto; }
.stream-embed {
  position: relative; padding-bottom: 56.25%;
  height: 0; border-radius: 16px; overflow: hidden;
  border: 1.5px solid var(--border); background: #000;
}
.stream-embed iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}
html.dark .stream-embed { border-color: #3a3028; }
.stream-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #888; text-align: center; padding: 20px;
}
.stream-placeholder-icon { font-size: 48px; margin-bottom: 12px; }
.stream-placeholder p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 18px;
}
.stream-info {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--ink-soft); font-style: italic;
}

/* Footer */
.site-footer {
  text-align: center; padding: 40px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 14px; color: #ccc;
}

/* ═══════════════════════════════════════
   ABLAUFPLAN
   ═══════════════════════════════════════ */

/* Screens */
.screen { display: none; padding: 40px 20px 60px; }
.screen.active { display: block; }

/* Ablaufplan Header */
.header { text-align: center; margin-bottom: 36px; }
.header-label { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--rose); margin-bottom: 8px; display: block; }
.header h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(36px, 7vw, 64px); font-weight: 300; letter-spacing: -0.5px; line-height: 1; }
.header h1 em { font-style: italic; color: var(--rose); }
.header-sub { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; color: var(--ink-soft); margin-top: 6px; }
.header-line { width: 70px; height: 1px; background: linear-gradient(to right, transparent, var(--rose), transparent); margin: 14px auto 0; }

/* Mode Cards */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; margin: 0 auto; }
.mode-card {
  background: white; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.mode-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(196,135,106,0.15); border-color: var(--rose); }
.mode-icon { font-size: 36px; margin-bottom: 12px; }
.mode-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.mode-desc { font-size: 12px; color: var(--ink-soft); font-weight: 300; line-height: 1.5; }

/* Person Picker */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-width: 700px; margin: 0 auto; }
.person-card {
  background: white; border: 1.5px solid var(--border); border-radius: 14px;
  padding: 20px 12px; text-align: center; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.person-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(44,32,24,0.1); }
.pc-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: white; margin: 0 auto 10px; }
.pc-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.pc-role { font-size: 10.5px; font-weight: 300; color: #bbb; margin-top: 2px; }

/* Single Person View */
.single-wrap { max-width: 520px; margin: 0 auto; }
.single-hero {
  display: flex; align-items: center; gap: 20px;
  background: white; border: 1.5px solid var(--border); border-radius: 20px;
  padding: 24px 28px; margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(44,32,24,0.06);
}
.single-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; color: white; flex-shrink: 0; }
.single-name { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 400; line-height: 1; }
.single-role { font-size: 12px; color: var(--ink-soft); font-weight: 300; margin-top: 4px; letter-spacing: 0.3px; }
.single-date { font-size: 11px; color: #bbb; margin-top: 6px; }

/* Timeline */
.timeline { position: relative; padding-left: 0; }
.timeline::before { content:''; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, transparent 0%, var(--border) 5%, var(--border) 95%, transparent 100%); }
.tl-item { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; margin-bottom: 8px; }
.tl-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 14px; position: relative; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--border); background: var(--cream); flex-shrink: 0; transition: transform .2s; z-index: 1; }
.tl-item.hl .tl-dot { width: 18px; height: 18px; border-color: var(--rose); background: var(--rose); margin-top: -2px; box-shadow: 0 0 0 4px rgba(196,135,106,0.15); }
.tl-item.todo .tl-dot { border-style: dashed; }
.tl-card {
  background: white; border: 1.5px solid var(--border); border-radius: 14px;
  padding: 14px 18px; transition: transform .15s, box-shadow .15s;
}
.tl-card:hover { transform: translateX(3px); box-shadow: 3px 4px 16px rgba(44,32,24,0.08); }
.tl-item.hl .tl-card { border-color: var(--rose); background: linear-gradient(135deg, white 0%, #fff5f0 100%); }
.tl-item.todo .tl-card { border-style: dashed; border-color: #c8bdb7; background: #fdf9f7; }
.tl-time { font-size: 11px; font-weight: 600; color: var(--rose); letter-spacing: 0.5px; margin-bottom: 4px; }
.tl-item.todo .tl-time { color: #bbb; }
.tl-title { font-family: 'Cormorant Garamond', serif; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tl-item.hl .tl-title { font-size: 20px; color: var(--rose); }
.tl-location { font-size: 11px; color: #bbb; font-weight: 400; margin-top: 3px; }
.tl-note { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; font-weight: 300; font-style: italic; }
.todo-badge { display: inline-block; font-size: 10px; background: #f5ede8; color: var(--rose); border-radius: 4px; padding: 2px 7px; margin-top: 5px; font-weight: 500; letter-spacing: 0.3px; }

/* Full Table */
.table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 4px 24px rgba(44,32,24,0.08); }
table { border-collapse: collapse; background: white; }
.chip { border-radius: 5px; padding: 5px 7px; font-size: 10.5px; line-height: 1.3; font-weight: 500; position: absolute; inset: 3px; overflow: hidden; display: flex; align-items: flex-start; }
.chip-normal  { background: color-mix(in srgb, var(--pcolor) 16%, white); color: var(--pcolor); }
.chip-todo    { background: color-mix(in srgb, var(--pcolor) 10%, white); color: var(--pcolor); outline: 1.5px dashed var(--pcolor); outline-offset: -3px; opacity: 0.9; }
.chip-highlight { background: linear-gradient(135deg, #c4876a, #d9905a); color: white !important; font-weight: 600; }
.chip-bold    { background: var(--pcolor); color: white; font-weight: 600; }

/* Desktop Table */
#tbl-desktop { display: table; min-width: 960px; width: 100%; }
#tbl-mobile  { display: none; }
#tbl-desktop td.zone-td, #tbl-desktop th.th-zone { width: 28px; min-width: 28px; border-right: 2px solid var(--border); position: sticky; left: 0; z-index: 10; }
#tbl-desktop th.th-zone { background: white; border-bottom: 2px solid var(--border); }
#tbl-desktop td.zone-td { text-align: center; padding: 0; vertical-align: middle; }
.zone-text-v { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.88); white-space: nowrap; padding: 8px 0; }
#tbl-desktop th.th-time { width: 58px; border-right: 1px solid var(--border); border-bottom: 2px solid var(--border); background: white; position: sticky; left: 28px; z-index: 10; }
#tbl-desktop td.td-time { text-align: right; padding: 0 7px; font-size: 11px; font-weight: 500; color: #aaa; white-space: nowrap; vertical-align: top; padding-top: 3px; border-right: 1px solid var(--border); width: 58px; background: white; position: sticky; left: 28px; z-index: 5; }
#tbl-desktop td.td-time.key { color: var(--rose); font-weight: 700; font-size: 12px; }
#tbl-desktop .person-header { display: flex; flex-direction: column; align-items: center; padding: 14px 6px 10px; gap: 6px; }
#tbl-desktop .avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: white; }
#tbl-desktop .p-name { font-size: 11.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; text-align: center; }
#tbl-desktop .p-role { font-size: 10px; font-weight: 300; color: #bbb; white-space: nowrap; }
#tbl-desktop thead th { border-bottom: 2px solid var(--border); vertical-align: bottom; position: sticky; top: 0; background: white; z-index: 20; }
#tbl-desktop th.th-person { min-width: 100px; }
#tbl-desktop tbody tr { border-bottom: 1px solid #f3ede8; height: 28px; }
#tbl-desktop tbody tr.tall-row { height: 52px; }
#tbl-desktop tbody tr.slim-row { height: 16px; }
#tbl-desktop tbody tr.row-key td.td-time { border-top: 2px solid var(--border); }
#tbl-desktop tbody tr.row-30 td.td-time  { border-top: 1px solid #e8e0d8; }
#tbl-desktop td.cell { padding: 3px; border-right: 1px solid #f0ebe5; min-width: 100px; position: relative; }
#tbl-desktop td.cell:last-child { border-right: none; }

/* Mobile Table */
#tbl-mobile th.zone-th { text-align: center; padding: 5px 4px; font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.92); white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.25); vertical-align: middle; }
#tbl-mobile th.zone-th:last-child { border-right: none; }
#tbl-mobile th.th-corner { min-width: 100px; width: 100px; position: sticky; left: 0; z-index: 30; background: white; border-right: 2px solid var(--border); border-bottom: 2px solid var(--border); }
#tbl-mobile td.td-person { position: sticky; left: 0; z-index: 5; background: white; border-right: 2px solid var(--border); border-bottom: 1px solid #f0ebe5; padding: 5px 8px; vertical-align: middle; min-width: 100px; width: 100px; }
#tbl-mobile .person-cell { display: flex; align-items: center; gap: 7px; }
#tbl-mobile .avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: white; flex-shrink: 0; }
#tbl-mobile .p-name { font-size: 11px; font-weight: 500; color: var(--ink); line-height: 1.2; }
#tbl-mobile .p-role { font-size: 9px; font-weight: 300; color: #bbb; }
#tbl-mobile th.th-slot { min-width: 36px; width: 36px; border-right: 1px solid #f0ebe5; border-bottom: 2px solid var(--border); padding: 3px 2px 4px; vertical-align: bottom; }
#tbl-mobile th.th-slot.key-col { border-left: 2px solid var(--border); border-right: 2px solid var(--border); min-width: 40px; width: 40px; }
.time-label-h { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 400; color: #bbb; padding: 4px 0 2px; white-space: nowrap; display: block; }
.time-label-h.key { color: var(--rose); font-weight: 700; font-size: 11px; }
#tbl-mobile td.cell { border-right: 1px solid #f0ebe5; border-bottom: 1px solid #f0ebe5; padding: 3px; height: 50px; position: relative; font-size: 0; }
#tbl-mobile td.cell.key-col { border-left: 2px solid var(--border); border-right: 2px solid var(--border); }
#tbl-mobile td.cell:last-child { border-right: none; }

/* Legend & Ablaufplan Footer */
.legend { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 18px; font-size: 12px; color: var(--ink-soft); align-items: center; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.todo { background: #f0e8e2; outline: 1.5px dashed #c4876a; outline-offset: -2px; }
.legend-dot.hl { background: #c4876a; }
.footer { text-align: center; margin-top: 28px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 14px; color: #ccc; }
.theme-toggle .icon { font-size: 14px; }

/* Ablaufplan Dark Mode */
html.dark .mode-card, html.dark .person-card, html.dark .tl-card, html.dark .single-hero,
html.dark .table-wrapper, html.dark table,
html.dark #tbl-desktop td.td-time, html.dark #tbl-desktop thead th,
html.dark #tbl-mobile th.th-corner, html.dark #tbl-mobile td.td-person { background: #241e18; }

html.dark .mode-card { border-color: #3a3028; }
html.dark .mode-card:hover { border-color: var(--rose); box-shadow: 0 8px 28px rgba(217,160,128,0.15); }
html.dark .mode-title { color: var(--ink); }
html.dark .mode-desc { color: var(--ink-soft); }
html.dark .person-card { border-color: #3a3028; background: #241e18; }
html.dark .person-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
html.dark .pc-name { color: var(--ink); }
html.dark .header h1, html.dark .header-sub { color: var(--ink); }
html.dark .header-label { color: var(--rose); }

html.dark table { background: #1e1812; }
html.dark #tbl-desktop thead th { background: #241e18; border-color: #3a3028; }
html.dark #tbl-desktop td.td-time { background: #1e1812; color: #665548; border-color: #3a3028; }
html.dark #tbl-desktop td.td-time.key { color: var(--rose); }
html.dark #tbl-desktop tbody tr { border-color: #2a2318; }
html.dark #tbl-desktop td.cell { border-color: #2a2318; }
html.dark #tbl-desktop .p-name { color: #b0a090; }
html.dark #tbl-desktop .p-role { color: #554840; }
html.dark #tbl-mobile th.th-corner { background: #241e18; border-color: #3a3028; }
html.dark #tbl-mobile td.td-person { background: #1e1812; border-color: #3a3028; }
html.dark #tbl-mobile .p-name { color: var(--ink); }
html.dark #tbl-mobile .p-role { color: #554840; }
html.dark #tbl-mobile td.cell { border-color: #2a2318; }
html.dark .time-label-h { color: #665548; }
html.dark .time-label-h.key { color: var(--rose); }
html.dark .chip-normal { background: color-mix(in srgb, var(--pcolor) 22%, #1e1812); }
html.dark .chip-todo   { background: color-mix(in srgb, var(--pcolor) 12%, #1e1812); outline-color: var(--pcolor); }
html.dark .chip-highlight { background: linear-gradient(135deg, #a0674a, #b87040); }
html.dark .chip-bold   { opacity: 0.9; }
html.dark .single-hero { background: #241e18; border-color: #3a3028; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
html.dark .single-name { color: var(--ink); }
html.dark .single-role { color: var(--ink-soft); }
html.dark .single-date { color: #554840; }
html.dark .timeline::before { background: linear-gradient(to bottom, transparent, #3a3028 5%, #3a3028 95%, transparent); }
html.dark .tl-card { background: #241e18; border-color: #3a3028; }
html.dark .tl-card:hover { box-shadow: 3px 4px 16px rgba(0,0,0,0.3); }
html.dark .tl-item.hl .tl-card { background: #2a1e16; border-color: #8a5030; }
html.dark .tl-item.todo .tl-card { background: #1e1a16; border-color: #3a3028; }
html.dark .tl-dot { background: #1a1612; border-color: #3a3028; }
html.dark .tl-title { color: var(--ink); }
html.dark .tl-item.hl .tl-title { color: var(--rose); }
html.dark .tl-location { color: #665548; }
html.dark .tl-note { color: var(--ink-soft); }
html.dark .todo-badge { background: #2a1e18; color: var(--rose); }
html.dark .legend { color: var(--ink-soft); }
html.dark .legend-dot.todo { background: #2a1e18; outline-color: var(--rose); }
html.dark .footer { color: #3a3028; }
html.dark .table-wrapper { border-color: #3a3028; box-shadow: 0 4px 24px rgba(0,0,0,0.4); }

/* Speech Bubble */
.speech-bubble {
  display: none; position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%); background: var(--ink); color: #faf6f1;
  border-radius: 12px; padding: 10px 16px; font-size: 12px; font-weight: 400;
  line-height: 1.4; max-width: calc(100vw - 40px); z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); text-align: center;
  animation: bubbleIn .15s ease; pointer-events: none;
}
html.dark .speech-bubble { background: #f0ebe4; color: #1a1612; }
.speech-bubble::after {
  content: ''; position: absolute; bottom: -6px; left: 50%;
  transform: translateX(-50%); border: 6px solid transparent;
  border-bottom: none; border-top-color: var(--ink);
}
html.dark .speech-bubble::after { border-top-color: #f0ebe4; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Ablaufplan Media Queries */
@media (max-width: 700px) {
  #tbl-desktop { display: none; }
  #tbl-mobile  { display: table; width: 100%; }
  .mode-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mode-card { padding: 24px 14px; }
  .mode-icon { font-size: 28px; }
  .mode-title { font-size: 16px; }
}
@media (max-width: 400px) {
  .mode-cards { grid-template-columns: 1fr; }
  .person-grid { grid-template-columns: repeat(2, 1fr); }
}
