/* Kalenderlink: Oberfläche nach Business DNA design.md
   Dunkel Türkis #09849a · Hell Türkis #c8e4e0 · Rosa #efbfcf · Aubergine #5a385c
   Mauve #a087a3 · Hell Rosa #ffe0e4 · Anthrazit #393939 · Schrift Lato */

:root {
  --t-dark: #09849a;
  --t-light: #c8e4e0;
  --rosa: #efbfcf;
  --rosa-soft: #ffe0e4;
  --aubergine: #5a385c;
  --mauve: #a087a3;
  --mauve-soft: #efe6f0;
  --ink: #393939;
  --muted: #6b6168;
  --bg: #fbf9f9;
  --card: #ffffff;
  --line: #e7e2e4;
  --radius: 16px;
  --font: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --accent: var(--t-dark);
  --button-text: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; }

/* Kopf */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; height: 80px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { color: var(--aubergine); text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.mark { background: var(--t-dark); color: #fff; width: 36px; height: 36px; border-radius: 10px; text-align: center; line-height: 36px; font-size: 18px; }
.by { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; background: var(--t-light); color: var(--aubergine); padding: 6px 10px; border-radius: 999px; margin-left: 4px; font-weight: 700; }
.local { color: var(--muted); font-size: 14px; }

main { max-width: 1400px; margin: auto; padding: 44px 5vw 60px; }
.intro { margin-bottom: 32px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; color: var(--t-dark); margin: 0 0 8px; }
.intro h1 { font-size: clamp(28px, 3vw, 40px); color: var(--aubergine); margin: 8px 0; line-height: 1.15; }
.intro p:not(.eyebrow) { color: var(--muted); margin: 0; }

.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.editor { background: var(--card); border: 1px solid var(--line); padding: 30px; border-radius: var(--radius); }
h2 { font-size: 20px; color: var(--aubergine); margin: 0 0 22px; }

/* Formular */
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 18px; }
label span { color: var(--t-dark); }
input, textarea, select { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #cfc7cb; border-radius: 8px; padding: 11px 12px; margin-top: 6px; min-height: 46px; font-weight: 400; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--t-light); outline-offset: 2px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.colors { grid-template-columns: 120px 120px 1fr; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 18px; }
.check input { width: auto; min-height: 0; margin: 0; }
input[type=color]:disabled { opacity: .5; cursor: not-allowed; }
input[type=color] { padding: 5px; cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; min-width: 0; }
legend { padding: 0 6px; font-size: 14px; font-weight: 700; color: var(--aubergine); }
.session .row label { margin-bottom: 8px; }
.remove-session { padding: 7px 12px; font-size: 13px; color: #9a2828; margin-top: 8px; }
#add-session { margin-bottom: 16px; }
.repeat { background: var(--mauve-soft); border-color: transparent; }
.repeat-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
.repeat-row label { margin-bottom: 0; }
.repeat-row button { margin-bottom: 0; min-height: 46px; white-space: nowrap; }
.repeat .subtle { margin-top: 12px; }
.hosting { border-top: 1px solid var(--line); padding-top: 18px; font-size: 14px; }
.hosting summary { cursor: pointer; font-weight: 700; }
.hosting p, .privacy, .subtle, .footnote { font-size: 13px; line-height: 1.6; color: var(--muted); }
.hosting p { font-size: 14px; }
.privacy { margin: 20px 0 0; }
#error { color: #b52828; font-size: 14px; line-height: 1.5; font-weight: 700; }
#error:empty { display: none; }

/* Vorschau */
.preview-head { display: flex; justify-content: space-between; align-items: center; }
.preview-head h2 { margin: 6px 0 18px; }
.preview-head span { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.event-card { background: var(--card-bg, #fff); color: var(--card-text, var(--ink)); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 30px; box-shadow: 0 12px 30px rgba(90, 56, 92, .06); }
.date-badge { margin-top: 20px; width: 64px; background: var(--card-bg, #fff); border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 9px; color: inherit; }
.date-badge strong { display: block; font-size: 28px; line-height: 1.1; }
.date-badge span { font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.event-card h3 { font-size: 26px; line-height: 1.2; margin: 20px 0 14px; overflow-wrap: anywhere; }
.event-card > p { line-height: 1.55; overflow-wrap: anywhere; color: inherit; }
#preview-time { font-size: 15px; white-space: pre-line; }
#preview-location, #preview-description { font-size: 14px; opacity: .85; }
#preview-description { white-space: pre-wrap; }
#calendar-menu { margin-top: 24px; }
#calendar-menu summary { background: var(--accent); color: var(--button-text); padding: 14px 22px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
#calendar-menu summary::-webkit-details-marker { display: none; }
#calendar-menu nav { display: block; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card-bg, #fff); }
#calendar-menu nav a:hover { background: var(--mauve-soft); }
.event-card.button-only { background: transparent; border: 0; padding: 0; box-shadow: none; }
.event-card.button-only > *:not(#calendar-menu) { display: none; }
.event-card.button-only #calendar-menu { margin: 0; }

/* Ausgaben */
.exports { margin-top: 28px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-radius: 0; background: none; padding: 12px 0; color: var(--muted); font-weight: 700; }
.tabs button[aria-selected=true] { color: var(--t-dark); border-bottom: 2px solid var(--t-dark); }
button { font: inherit; font-size: 14px; font-weight: 700; padding: 11px 18px; border: 1px solid #cfc7cb; border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; transition: filter .15s; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary, #save-event { background: var(--t-dark); border-color: var(--t-dark); color: #fff; text-transform: uppercase; letter-spacing: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
#code { font: 12px/1.6 Consolas, monospace; background: var(--mauve-soft); border: 0; }
#export-help { font-size: 14px; line-height: 1.6; color: var(--muted); }
.footnote { margin-top: 24px; }
#status { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--aubergine); color: #fff; padding: 12px 22px; border-radius: 999px; display: none; max-width: 90vw; z-index: 10; }
#status:not(:empty) { display: block; }

/* Speichern und Übersicht (share.js) */
.share-panel { margin-bottom: 28px; }
.share-panel > p { font-size: 14px; line-height: 1.6; }
.share-panel h2 { margin-bottom: 12px; }
#save-status, #library-status { color: var(--t-dark); font-size: 14px; }
#saved-links { margin-top: 20px; }
.library { margin-bottom: 28px; }
.library-head, .library-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.library-head h2 { margin-bottom: 0; }
.library-row { padding: 16px 0; border-top: 1px solid var(--line); }
.library-row strong { overflow-wrap: anywhere; }
.library-row .actions { margin: 0; flex-shrink: 0; }
.library-row a { color: var(--t-dark); padding: 11px 12px; text-decoration: none; font-size: 14px; font-weight: 700; }
.library-row p { margin-bottom: 0; }
.library-tools { margin-top: 16px; }
.library-tools summary { cursor: pointer; font-size: 14px; margin-bottom: 18px; font-weight: 700; }

/* Fuß */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 5vw; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: #fff; }
.footer nav { display: flex; gap: 18px; }
.footer a { color: var(--aubergine); text-decoration: none; font-weight: 700; }

@media (max-width: 900px) {
  main { padding: 25px 5vw; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .library-row { align-items: flex-start; flex-direction: column; }
  .library-head { flex-wrap: wrap; }
  .repeat-row { grid-template-columns: 1fr 1fr; }
  .repeat-row button { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .topbar { height: 70px; }
  .local, .by { display: none; }
  .row { grid-template-columns: 1fr; }
  .colors { grid-template-columns: 1fr 1fr; }
  .colors .check { grid-column: 1 / -1; }
  .editor, .event-card { padding: 22px; }
  .preview-head span { display: none; }
}
