/*
Theme Name: Schweiz damals
Theme URI: http://historie.local
Author: Schweiz damals
Description: Społecznościowe archiwum historii zwykłych mieszkańców Szwajcarii — interaktywna mapa, oś czasu, historie przypisane do miejsc.
Version: 1.6.5
License: GNU General Public License v2 or later
Text Domain: schweiz-damals
*/

/* ============ Zmienne i podstawa ============ */
:root {
	--sd-red: #c8102e;
	--sd-red-dark: #9c0c23;
	--sd-accent: #7c3a2a;
	--sd-accent-dark: #612d20;
	--sd-cream: #f7f2e7;
	--sd-cream-dark: #ece4d2;
	--sd-ink: #2b251d;
	--sd-ink-soft: #6f6452;
	--sd-line: #e2d8c0;
	--sd-white: #fcf9f1;
	--sd-dark: #38322a;
	--sd-dark-soft: #4c4438;
	--sd-serif: Georgia, 'Times New Roman', serif;
	--sd-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--sd-radius: 6px;
	--sd-shadow: 0 1px 3px rgba(43, 38, 34, .08), 0 4px 14px rgba(43, 38, 34, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--sd-cream);
	color: var(--sd-ink);
	font-family: var(--sd-sans);
	font-size: 16px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--sd-red); text-decoration: none; }
a:hover { color: var(--sd-red-dark); }
h1, h2, h3, h4 { font-family: var(--sd-serif); font-weight: 700; line-height: 1.2; color: var(--sd-ink); }
h1 a, h2 a, h3 a { color: inherit; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ============ Header ============ */
.site-header {
	background: var(--sd-white);
	border-bottom: 1px solid var(--sd-line);
	position: sticky; top: 0; z-index: 1000;
}
.site-header__inner {
	display: flex; align-items: center; gap: 28px;
	padding: 14px 24px; max-width: 1440px; margin: 0 auto;
}
.site-brand { display: flex; align-items: center; gap: 10px; }
.site-brand__flag {
	width: 30px; height: 30px; background: var(--sd-red); border-radius: 4px;
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.site-brand__flag::before {
	content: ''; width: 16px; height: 16px;
	background:
		linear-gradient(var(--sd-white), var(--sd-white)) center/100% 4px no-repeat,
		linear-gradient(var(--sd-white), var(--sd-white)) center/4px 100% no-repeat;
}
.site-brand__name { font-family: var(--sd-serif); font-size: 20px; font-weight: 700; color: var(--sd-ink); }
.site-brand__slogan { display: block; font-size: 10.5px; color: var(--sd-ink-soft); font-family: var(--sd-sans); letter-spacing: .02em; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
	display: block; padding: 8px 14px; color: var(--sd-ink); font-size: 15px;
	border-bottom: 2px solid transparent; transition: border-color .15s;
}
.main-nav a:hover, .main-nav .current-menu-item a { border-color: var(--sd-red); color: var(--sd-ink); }
.site-header__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.site-search input[type="search"] {
	padding: 9px 14px; border: 1px solid var(--sd-line); border-radius: 20px;
	background: var(--sd-cream); width: 240px; font-size: 14px; outline: none;
}
.site-search input[type="search"]:focus { border-color: var(--sd-red); background: var(--sd-white); }
.btn {
	display: inline-block; padding: 10px 20px; border-radius: var(--sd-radius);
	font-weight: 600; font-size: 15px; cursor: pointer; border: 0; transition: background .15s, transform .1s;
}
.btn--red { background: var(--sd-red); color: #fff; }
.btn--red:hover { background: var(--sd-red-dark); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid var(--sd-line); color: var(--sd-ink); }
.btn--ghost:hover { border-color: var(--sd-red); color: var(--sd-red); }

/* ============ Baner powitalny ze zdjęciem ============ */
.hero-banner {
	position: relative; border-bottom: 1px solid var(--sd-line);
	background-color: var(--sd-cream-dark);
	background-size: cover; background-position: center;
}
.hero-banner::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(247,242,231,.96) 0%, rgba(247,242,231,.88) 32%, rgba(247,242,231,.30) 62%, rgba(247,242,231,.06) 100%);
}
.hero-banner__inner {
	position: relative; z-index: 1; max-width: 1100px; margin: 0 auto;
	padding: 38px 24px 42px;
	display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.hero-banner__content { max-width: 520px; }
.hero-banner__kicker {
	font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
	color: var(--sd-accent); margin-bottom: 10px;
}
.hero-banner h1 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 10px; line-height: 1.12; }
.hero-banner__content p { font-size: 14px; color: var(--sd-ink); margin: 0; max-width: 480px; }
.hero-banner__stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 3px; color: var(--sd-accent); }
.hero-stat strong { font-family: var(--sd-serif); font-size: 19px; color: var(--sd-ink); }
.hero-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sd-ink-soft); }
.hero-stat--motto em { font-style: italic; font-size: 12px; color: var(--sd-ink-soft); line-height: 1.4; }
.hero-banner__note {
	font-family: 'Segoe Script', 'Bradley Hand', 'Comic Sans MS', cursive;
	font-size: clamp(15px, 1.5vw, 19px); line-height: 1.45;
	color: rgba(43, 37, 29, .78); transform: rotate(-3deg);
	max-width: 230px; text-align: left; flex-shrink: 0;
}
@media (max-width: 900px) {
	.hero-banner__inner { padding: 30px 24px 32px; }
	.hero-banner__note { display: none; }
	.hero-banner__stats { gap: 22px; }
}

/* ============ Oś czasu ============ */
.timeline-bar { background: var(--sd-cream); border-bottom: 1px solid var(--sd-line); padding: 26px 24px 10px; }
.timeline-bar__head { max-width: 1200px; margin: 0 auto 22px; }
.timeline-bar__head h2 { font-size: 24px; margin: 0 0 4px; }
.timeline-bar__head p { margin: 0; font-size: 13.5px; color: var(--sd-ink-soft); }
.timeline-bar__row { display: flex; align-items: flex-start; gap: 14px; max-width: 1200px; margin: 0 auto; }
.timeline-wrap { flex: 1; min-width: 0; }
.timeline-arrow {
	flex-shrink: 0; width: 34px; height: 34px; margin-top: 2px; border-radius: 50%;
	border: 1px solid var(--sd-line); background: var(--sd-white); cursor: pointer;
	font-size: 20px; line-height: 1; color: var(--sd-ink); transition: all .15s;
}
.timeline-arrow:hover { border-color: var(--sd-accent); color: var(--sd-accent); }
.timeline-track { position: relative; height: 52px; }
.timeline-track__line { position: absolute; top: 19px; left: 0; right: 0; height: 2px; background: var(--sd-line); }
.timeline-track__selection { position: absolute; top: 19px; height: 3px; margin-top: -0.5px; background: var(--sd-accent); border-radius: 2px; }
.timeline-label {
	position: absolute; top: -16px; transform: translateX(-50%);
	background: var(--sd-accent); color: #fdf8ef; font-family: var(--sd-serif); font-weight: 700; font-size: 13px;
	padding: 3px 12px; border-radius: 4px; white-space: nowrap; z-index: 4; pointer-events: none;
	transition: left .12s ease;
}
.timeline-label::after {
	content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
	border: 5px solid transparent; border-top-color: var(--sd-accent);
}
.timeline-dot {
	position: absolute; top: 0; transform: translateX(-50%); background: none; border: 0;
	cursor: pointer; padding: 0 8px; user-select: none;
}
.timeline-dot::before {
	content: ''; display: block; margin: 14px auto 0;
	width: 9px; height: 9px; border-radius: 50%; background: #c3b699; border: 2px solid var(--sd-cream);
	transition: all .15s;
}
.timeline-dot:hover::before, .timeline-dot.is-active::before { background: var(--sd-accent); transform: scale(1.15); }
.timeline-dot__year { display: block; margin-top: 6px; font-size: 11.5px; color: var(--sd-ink-soft); }
.timeline-dot.is-active .timeline-dot__year { color: var(--sd-ink); font-weight: 600; }
.timeline-minor {
	position: absolute; top: 17px; transform: translateX(-50%);
	width: 5px; height: 5px; border-radius: 50%; background: #cfc3a8; pointer-events: none;
}
.timeline-minor.is-active { background: var(--sd-accent); }
.timeline-handle {
	position: absolute; top: 11px; width: 17px; height: 17px; border-radius: 50%;
	background: var(--sd-accent); border: 3px solid var(--sd-cream); cursor: ew-resize; transform: translateX(-50%); z-index: 3;
	box-shadow: 0 0 0 1.5px var(--sd-accent), 0 1px 5px rgba(0,0,0,.3);
}
.timeline-eras { position: relative; height: 22px; margin-top: 2px; border-top: 1px dashed var(--sd-line); }
.timeline-era {
	position: absolute; top: 5px; text-align: center; overflow: hidden;
	font-family: var(--sd-serif); font-style: italic; font-size: 11.5px; color: var(--sd-ink-soft);
	white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; box-sizing: border-box;
}
@media (max-width: 900px) {
	.timeline-era { font-size: 10px; }
	.timeline-dot__year { display: none; }
	.timeline-dot:nth-child(odd) .timeline-dot__year { display: block; }
}

/* ============ Filtry kategorii ============ */
.category-chips {
	display: flex; gap: 10px; overflow-x: auto; padding: 14px 24px;
	background: var(--sd-cream); border-bottom: 1px solid var(--sd-line); scrollbar-width: thin;
}
.chip {
	display: inline-flex; align-items: center; gap: 7px;
	flex-shrink: 0; padding: 7px 16px; border-radius: 20px; border: 1px solid var(--sd-line);
	background: var(--sd-white); font-size: 13.5px; cursor: pointer; color: var(--sd-ink); transition: all .15s;
}
.chip .sd-ic { flex-shrink: 0; }
.chip:hover { border-color: var(--sd-accent); color: var(--sd-accent); }
.chip.is-active { background: var(--sd-dark); color: #f7f2e7; border-color: var(--sd-dark); }

/* ============ Układ mapa + lista ============ */
.map-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 0; min-height: 640px; }
.map-layout__map { position: relative; background: #e8e2d5; }
#sd-map { position: absolute; inset: 0; min-height: 640px; }
.map-toolbar {
	position: absolute; top: 14px; left: 14px; z-index: 500; display: flex; gap: 0;
	background: var(--sd-white); border-radius: var(--sd-radius); box-shadow: var(--sd-shadow); overflow: hidden;
}
.map-toolbar button { padding: 7px 16px; border: 0; background: var(--sd-white); cursor: pointer; font-size: 13px; }
.map-toolbar button.is-active { background: var(--sd-red); color: #fff; }
.map-layout__list { background: var(--sd-white); border-left: 1px solid var(--sd-line); display: flex; flex-direction: column; max-height: 760px; }
.story-list__header { padding: 18px 20px 10px; border-bottom: 1px solid var(--sd-line); }
.story-list__header h2 { font-size: 20px; margin: 0 0 4px; }
.story-list__count { font-size: 13px; color: var(--sd-ink-soft); }
.story-list__controls { display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--sd-line); flex-wrap: wrap; }
.story-list__controls select, .story-list__controls input {
	padding: 7px 10px; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); font-size: 13px; background: var(--sd-cream); flex: 1; min-width: 120px;
}
.story-list__items { overflow-y: auto; flex: 1; }

/* Karta na liście obok mapy */
.story-row {
	display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--sd-line);
	cursor: pointer; transition: background .12s;
}
.story-row:hover { background: var(--sd-cream); }
.story-row__img { width: 108px; height: 82px; object-fit: cover; border-radius: var(--sd-radius); flex-shrink: 0; background: var(--sd-cream-dark); }
.story-row__body { min-width: 0; }
.story-row__meta { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--sd-accent); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.story-row__meta .story-row__year { color: var(--sd-accent-dark); margin-left: 6px; font-family: var(--sd-serif); font-size: 13px; }
.story-row__title { font-family: var(--sd-serif); font-size: 16.5px; font-weight: 700; margin: 3px 0; }
.story-row__title a { color: var(--sd-ink); }
.story-row__excerpt { font-size: 13px; color: var(--sd-ink-soft); margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-row__footer { font-size: 12px; color: var(--sd-ink-soft); display: flex; gap: 12px; }

/* Markery na mapie */
.sd-pin {
	width: 42px; height: 42px; border-radius: 50% 50% 50% 0;
	background: var(--sd-dark); border: 3px solid var(--sd-cream);
	box-shadow: 0 3px 9px rgba(0,0,0,.45);
	transform: rotate(-45deg); position: relative;
	transition: transform .15s ease;
}
.sd-pin:hover { transform: rotate(-45deg) scale(1.12); z-index: 1000; background: var(--sd-accent); }
.sd-pin__icon {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	transform: rotate(45deg); line-height: 1; color: #f7f2e7;
}
.sd-pin__icon svg { width: 21px; height: 21px; }
/* pinezka bez ikony (mini-mapa, formularz) */
.sd-pin:empty::after {
	content: ""; position: absolute; top: 50%; left: 50%;
	width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
	background: var(--sd-cream); border-radius: 50%;
}
/* vintage: lekko sepiowe kafelki mapy i miniatury */
.leaflet-tile-pane { filter: sepia(.28) saturate(.8); }
.story-row__img, .story-card__img img { filter: sepia(.22); }
.sd-cluster {
	background: var(--sd-accent); color: #fdf8ef; border-radius: 50%;
	width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 18px; border: 3px solid var(--sd-cream); box-shadow: 0 2px 8px rgba(0,0,0,.35);
	cursor: pointer;
}
.leaflet-popup-content-wrapper { border-radius: var(--sd-radius); }
.sd-popup { width: 240px; }
.sd-popup img { width: 100%; height: 120px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.sd-popup__meta { font-size: 11px; color: var(--sd-red); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.sd-popup__title { font-family: var(--sd-serif); font-size: 15px; font-weight: 700; margin: 4px 0; color: var(--sd-ink); }
.sd-popup__text { font-size: 12.5px; color: var(--sd-ink-soft); margin: 0 0 8px; }
.sd-popup a.btn { font-size: 13px; padding: 6px 14px; }

/* ============ Karty (archive / siatka) ============ */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; padding: 34px 0; }
.story-card { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); overflow: hidden; box-shadow: var(--sd-shadow); transition: transform .15s; }
.story-card:hover { transform: translateY(-3px); }
.story-card__img { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--sd-cream-dark); }
.story-card__img img { width: 100%; height: 100%; object-fit: cover; }
.story-card__body { padding: 18px 20px 16px; }
.story-card__meta { display: flex; gap: 12px; font-size: 12px; }
.story-card__cat { color: var(--sd-red); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.story-card__year { color: var(--sd-ink-soft); }
.story-card__title { font-size: 19px; margin: 8px 0; }
.story-card__excerpt { font-size: 14px; color: var(--sd-ink-soft); margin: 0 0 12px; }
.story-card__footer { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sd-ink-soft); border-top: 1px solid var(--sd-line); padding-top: 10px; }

/* ============ Pojedyncza historia ============ */
.story-single { max-width: 1200px; margin: 0 auto; padding: 30px 24px 60px; display: grid; grid-template-columns: 1fr 340px; gap: 44px; }
.breadcrumb { font-size: 13px; color: var(--sd-ink-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--sd-ink-soft); }
.breadcrumb a:hover { color: var(--sd-red); }
.story-single__loc { color: var(--sd-red); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.story-single h1 { font-size: clamp(28px, 3.5vw, 42px); margin: 10px 0 14px; }
.story-single__lead { font-size: 19px; font-family: var(--sd-serif); font-style: italic; color: var(--sd-ink-soft); margin-bottom: 20px; }
.story-single__meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--sd-ink-soft); border-top: 1px solid var(--sd-line); border-bottom: 1px solid var(--sd-line); padding: 12px 0; margin-bottom: 26px; }
.story-single__meta strong { color: var(--sd-ink); }
.story-hero-img { border-radius: var(--sd-radius); overflow: hidden; margin-bottom: 30px; box-shadow: var(--sd-shadow); }
.story-content { font-size: 17.5px; line-height: 1.75; }
.story-content h2 { font-size: 26px; margin: 36px 0 14px; }
.story-content h3 { font-size: 21px; margin: 28px 0 12px; }
.story-content blockquote, .sd-quote {
	font-family: var(--sd-serif); font-style: italic; font-size: 20px;
	border-left: 4px solid var(--sd-red); margin: 30px 0; padding: 6px 0 6px 22px; color: var(--sd-ink);
}
.sd-quote__source { display: block; font-size: 13px; font-style: normal; font-family: var(--sd-sans); color: var(--sd-ink-soft); margin-top: 8px; }
.story-content img { border-radius: var(--sd-radius); }
.story-content figcaption, .wp-caption-text { font-size: 13px; color: var(--sd-ink-soft); margin-top: 6px; }
.story-actions { display: flex; gap: 12px; margin: 34px 0; flex-wrap: wrap; }
.story-sources { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 20px 24px; margin: 34px 0; font-size: 14.5px; }
.story-sources h3 { margin-top: 0; font-size: 17px; }

/* Sidebar historii */
.story-sidebar > * { margin-bottom: 26px; }
.sidebar-box { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 18px 20px; box-shadow: var(--sd-shadow); }
.sidebar-box h3 { font-size: 16px; margin: 0 0 10px; }
#sd-mini-map { height: 200px; border-radius: var(--sd-radius); }
.sidebar-related a { display: block; padding: 8px 0; border-bottom: 1px solid var(--sd-line); color: var(--sd-ink); font-size: 14.5px; }
.sidebar-related a:hover { color: var(--sd-red); }
.sidebar-related .sidebar-related__year { color: var(--sd-ink-soft); font-size: 12px; margin-right: 6px; }
.cta-box { background: var(--sd-red); color: #fff; border-radius: var(--sd-radius); padding: 24px; text-align: center; }
.cta-box h3 { color: #fff; margin-top: 0; }
.cta-box p { font-size: 14px; opacity: .92; }
.cta-box .btn { background: #fff; color: var(--sd-red); }
.cta-box .btn:hover { background: var(--sd-cream); color: var(--sd-red-dark); }

/* ============ Komentarze ============ */
.comments-area { max-width: 780px; margin: 50px auto 0; }
.comments-area h2 { font-size: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 16px 20px; margin-bottom: 14px; }
.comment .children { list-style: none; padding-left: 26px; margin-top: 14px; }
.comment-meta { font-size: 12.5px; color: var(--sd-ink-soft); margin-bottom: 6px; }
.comment-author { font-weight: 700; color: var(--sd-ink); }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"] {
	width: 100%; padding: 10px 14px; border: 1px solid var(--sd-line); border-radius: var(--sd-radius);
	background: var(--sd-white); font-family: inherit; font-size: 15px; margin-bottom: 10px;
}
.comment-form .submit { background: var(--sd-red); color: #fff; border: 0; padding: 10px 24px; border-radius: var(--sd-radius); font-weight: 600; cursor: pointer; }
.comment-form .submit:hover { background: var(--sd-red-dark); }

/* ============ Formularz dodawania historii ============ */
.submit-story { max-width: 760px; margin: 40px auto; padding: 0 24px 60px; }
.submit-story__steps { display: flex; gap: 6px; margin-bottom: 26px; }
.submit-story__step-dot { flex: 1; height: 4px; background: var(--sd-line); border-radius: 2px; }
.submit-story__step-dot.is-done { background: var(--sd-red); }
.submit-step { display: none; background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 30px 34px; box-shadow: var(--sd-shadow); }
.submit-step.is-active { display: block; }
.submit-step h2 { margin-top: 0; }
.submit-step label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.submit-step input[type="text"], .submit-step input[type="number"], .submit-step input[type="email"], .submit-step select, .submit-step textarea {
	width: 100%; padding: 10px 14px; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); font-size: 15px; font-family: inherit; background: var(--sd-cream);
}
.submit-step input:focus, .submit-step textarea:focus, .submit-step select:focus { outline: none; border-color: var(--sd-red); background: var(--sd-white); }
.submit-step__nav { display: flex; justify-content: space-between; margin-top: 26px; }
#sd-submit-map { height: 260px; border-radius: var(--sd-radius); margin-top: 10px; border: 1px solid var(--sd-line); }
.submit-notice { padding: 14px 18px; border-radius: var(--sd-radius); margin-bottom: 16px; display: none; }
.submit-notice.is-error { display: block; background: #fdecea; color: var(--sd-red-dark); border: 1px solid #f5c6c0; }
.submit-notice.is-success { display: block; background: #e9f7ef; color: #1e7e4d; border: 1px solid #b7e4cd; }
.checkbox-line { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14.5px; }
.checkbox-line input { margin-top: 4px; }

/* ============ Zeitleiste / strony ============ */
.page-content { max-width: 900px; margin: 0 auto; padding: 40px 24px 60px; }
.page-content h1 { font-size: 36px; }
.zeitleiste-era { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 24px 28px; margin-bottom: 20px; box-shadow: var(--sd-shadow); }
.zeitleiste-era h2 { margin: 0 0 6px; font-size: 22px; }
.zeitleiste-era .zeitleiste-era__count { color: var(--sd-red); font-weight: 600; font-size: 14px; }

/* ============ Footer ============ */
.site-footer { background: var(--sd-ink); color: #cfc7bc; padding: 44px 24px 30px; margin-top: 60px; }
.site-footer__inner { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer a { color: #e8e0d3; }
.site-footer a:hover { color: #fff; }
.site-footer__brand { font-family: var(--sd-serif); font-size: 20px; color: #fff; }
.site-footer__motto { font-size: 13px; font-style: italic; margin-top: 6px; }
.site-footer__bottom { max-width: 1440px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ============ Mobile ============ */
.mobile-switcher { display: none; }
@media (max-width: 1024px) {
	.map-layout { grid-template-columns: 1.3fr 1fr; }
	.story-single { grid-template-columns: 1fr; }
	.hero__inner { grid-template-columns: 1fr; }
	.hero__media--2 .hero__photos, .hero__media--3 .hero__photos { min-height: 0; }
	.hero__media--2 .hero__photo, .hero__media--3 .hero__photo { position: static; width: 88%; max-width: 320px; margin: 0 auto 14px; }
	.hero__media--2 .hero__photo--2, .hero__media--3 .hero__photo--2, .hero__media--3 .hero__photo--3 { display: none; }
}
@media (max-width: 768px) {
	.site-header__inner { flex-wrap: wrap; gap: 12px; }
	.site-search input[type="search"] { width: 160px; }
	.map-layout { display: block; }
	.map-layout__map { height: 60vh; }
	#sd-map { min-height: 60vh; }
	.map-layout__list { max-height: none; border-left: 0; border-top: 1px solid var(--sd-line); }
	.mobile-switcher { display: flex; gap: 0; margin: 0; border-bottom: 1px solid var(--sd-line); background: var(--sd-white); }
	.mobile-switcher button { flex: 1; padding: 12px; border: 0; background: var(--sd-white); font-weight: 600; cursor: pointer; }
	.mobile-switcher button.is-active { color: var(--sd-red); border-bottom: 2px solid var(--sd-red); }
	.map-layout.is-list-view .map-layout__map { display: none; }
	.map-layout:not(.is-list-view) .map-layout__list { display: none; }
	.submit-step { padding: 22px 20px; }
}

/* ============ Strona dodawania historii (jedna strona) ============ */
.submit-page { max-width: 1200px; margin: 0 auto; padding: 40px 24px 70px; }
.submit-page__hero { text-align: center; margin-bottom: 36px; }
.submit-page__hero h1 { font-size: clamp(28px, 3.5vw, 40px); margin-bottom: 10px; }
.submit-page__hero p { color: var(--sd-ink-soft); max-width: 640px; margin: 0 auto; font-size: 15.5px; }
.submit-page__layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }

.form-card {
	background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: 10px;
	padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--sd-shadow);
}
.form-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.form-card__num {
	width: 30px; height: 30px; border-radius: 50%; background: var(--sd-red); color: #fff;
	display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.form-card__head h2 { margin: 0; font-size: 19px; }
.form-card label { display: block; font-weight: 600; font-size: 13.5px; margin: 14px 0 6px; }
.form-card input[type="text"], .form-card input[type="number"], .form-card input[type="email"], .form-card select, .form-card textarea {
	width: 100%; padding: 10px 14px; border: 1px solid var(--sd-line); border-radius: 8px;
	font-size: 15px; font-family: inherit; background: var(--sd-cream); transition: border-color .15s, background .15s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: none; border-color: var(--sd-red); background: #fff; }
.form-card__counter { text-align: right; font-size: 12px; color: var(--sd-ink-soft); margin-top: 4px; }

/* Edytor tekstu sformatowanego */
.sd-editor-wrap { border: 1px solid var(--sd-line); border-radius: 8px; background: var(--sd-white); overflow: hidden; }
.sd-editor-wrap:focus-within { border-color: var(--sd-accent); }
.sd-editor-toolbar {
	display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
	padding: 7px 10px; background: var(--sd-cream); border-bottom: 1px solid var(--sd-line);
}
.sd-editor-toolbar button {
	min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
	background: transparent; cursor: pointer; font-size: 14px; color: var(--sd-ink); font-family: inherit;
}
.sd-editor-toolbar button:hover { background: var(--sd-white); border-color: var(--sd-line); }
.sd-editor-toolbar button:active { background: var(--sd-cream-dark); }
.sd-editor-sep { width: 1px; height: 20px; background: var(--sd-line); margin: 0 4px; }
.sd-editor {
	min-height: 220px; max-height: 480px; overflow-y: auto;
	padding: 14px 16px; font-size: 15px; line-height: 1.65; outline: none;
}
.sd-editor:empty::before {
	content: attr(data-placeholder); color: var(--sd-ink-soft); opacity: .75; pointer-events: none;
}
.sd-editor p { margin: 0 0 10px; }
.sd-editor h3 { font-family: var(--sd-serif); font-size: 18px; margin: 16px 0 6px; color: var(--sd-ink); }
.sd-editor blockquote {
	border-left: 3px solid var(--sd-accent); margin: 12px 0; padding: 8px 14px;
	font-style: italic; color: var(--sd-ink-soft); background: var(--sd-cream); border-radius: 0 6px 6px 0;
}
.sd-editor ul, .sd-editor ol { margin: 8px 0; padding-left: 26px; }
.sd-editor li { margin-bottom: 4px; }
.form-card__hint { font-size: 12.5px; color: var(--sd-ink-soft); margin: 8px 0 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
#sd-submit-map { height: 280px; border-radius: 8px; border: 1px solid var(--sd-line); }

/* Chipsy tematów */
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Dropzone */
.dropzone {
	border: 2px dashed var(--sd-line); border-radius: 10px; padding: 30px 20px; text-align: center;
	color: var(--sd-ink-soft); cursor: pointer; transition: all .15s; font-size: 14.5px; position: relative;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--sd-red); background: #fdf6f3; color: var(--sd-red); }
.dropzone__icon { font-size: 30px; display: block; margin-bottom: 8px; }
.dropzone input { display: none; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.photo-preview { position: relative; width: 110px; }
.photo-preview img { width: 110px; height: 82px; object-fit: cover; border-radius: 6px; box-shadow: var(--sd-shadow); }
.photo-preview button {
	position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
	background: var(--sd-red); color: #fff; border: 2px solid #fff; cursor: pointer; font-size: 11px; line-height: 1;
}

/* Karty tożsamości */
.identity-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.identity-card {
	border: 2px solid var(--sd-line); border-radius: 10px; padding: 16px 12px; text-align: center;
	cursor: pointer; transition: all .15s; display: block;
}
.identity-card:hover { border-color: var(--sd-red); }
.identity-card.is-active { border-color: var(--sd-red); background: #fdf6f3; box-shadow: 0 0 0 3px rgba(200,16,46,.08); }
.identity-card input { display: none; }
.identity-card__icon { font-size: 26px; display: block; margin-bottom: 6px; }
.identity-card strong { display: block; font-size: 15px; }
.identity-card small { color: var(--sd-ink-soft); font-size: 12px; }

.submit-page__send { width: 100%; padding: 16px; font-size: 17px; border-radius: 10px; }

/* Aside */
.submit-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
.aside-box { background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: 10px; padding: 20px 22px; box-shadow: var(--sd-shadow); }
.aside-box h3 { margin: 0 0 12px; font-size: 16px; }
.live-preview__card { background: var(--sd-cream); border-radius: 8px; padding: 16px 18px; }
.live-preview__meta { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--sd-red); font-weight: 600; }
.live-preview__title { font-family: var(--sd-serif); font-weight: 700; font-size: 17px; margin: 6px 0; }
.live-preview__text { font-size: 13px; color: var(--sd-ink-soft); margin: 0 0 8px; }
.live-preview__loc, .live-preview__author { font-size: 12px; color: var(--sd-ink-soft); }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.checklist li { padding: 5px 0 5px 26px; position: relative; color: var(--sd-ink-soft); }
.checklist li::before { content: '○'; position: absolute; left: 4px; color: var(--sd-line); font-weight: 700; }
.checklist li.is-done { color: var(--sd-ink); }
.checklist li.is-done::before { content: '✔'; color: #1e7e4d; }
.completeness__bar { height: 6px; background: var(--sd-cream-dark); border-radius: 3px; overflow: hidden; }
.completeness__bar span { display: block; height: 100%; background: var(--sd-red); border-radius: 3px; transition: width .3s; }
.aside-box--tip { background: linear-gradient(160deg, #fff, var(--sd-cream-dark)); }
.aside-box--tip ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--sd-ink-soft); }
.aside-box--tip li { margin-bottom: 6px; }

/* Sukces */
.submit-success { text-align: center; background: var(--sd-white); border: 1px solid var(--sd-line); border-radius: 12px; padding: 60px 30px; max-width: 640px; margin: 40px auto; box-shadow: var(--sd-shadow); }
.submit-success__icon { font-size: 52px; margin-bottom: 14px; }
.submit-success p { color: var(--sd-ink-soft); }
.submit-success .btn { margin: 6px; }

@media (max-width: 900px) {
	.submit-page__layout { grid-template-columns: 1fr; }
	.submit-aside { position: static; }
	.identity-cards { grid-template-columns: 1fr; }
	.form-grid-3 { grid-template-columns: 1fr; }
}
