/* ===== Variables ===== */
:root {
  --color-bg: #faf7f2;
  --color-bg-card: #ffffff;
  --color-primary: #4a7c9b;
  --color-primary-light: #e8f1f6;
  --color-primary-dark: #2d5a73;
  --color-accent: #d4a84b;
  --color-accent-light: #fdf6e8;
  --color-success: #5a9a6e;
  --color-success-light: #e8f5ec;
  --color-danger: #c45c5c;
  --color-danger-light: #fceaea;
  --color-text: #3d3a36;
  --color-text-muted: #7a756d;
  --color-border: #e8e2d9;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-heading: 'Lora', Georgia, serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(61, 58, 54, 0.08);
  --shadow-lg: 0 8px 30px rgba(61, 58, 54, 0.12);
  --header-height: 72px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 600;
}

a { color: var(--color-primary); }

.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  box-shadow: var(--shadow);
  padding-top: env(safe-area-inset-top, 0);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-title { flex: 1; text-align: center; }

.header-subtitle {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-header h1 {
  font-size: 1.15rem;
  font-weight: 600;
}

.save-indicator {
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.save-indicator.visible { opacity: 0.9; }
.save-indicator.saving { opacity: 1; color: var(--color-accent); }

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.btn-secondary:hover { background: #d5e5ef; }

.btn-danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}
.btn-danger:hover { background: #f5d5d5; }

.btn-nav {
  background: white;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-border);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.btn-nav:hover:not(:disabled) { border-color: var(--color-primary); }
.btn-nav:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-icon {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.btn-icon:hover { background: rgba(255,255,255,0.25); }

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: white;
  cursor: pointer;
  color: var(--color-text-muted);
}
.filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(360px, 92vw);
  height: 100vh;
  background: var(--color-bg-card);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary-light);
}

.sidebar-header h2 { font-size: 1.1rem; color: var(--color-primary-dark); }

.sidebar-stats {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: var(--color-accent-light);
}

.sidebar-filter {
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border);
}

.session-index {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.index-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.78rem;
  line-height: 1.35;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-body);
}
.index-item:hover { background: var(--color-primary-light); }
.index-item.active { background: var(--color-primary-light); }

.index-item .day-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.index-item.completed .day-num {
  background: var(--color-success);
  color: white;
}

.index-item .day-info,
.index-list-item .day-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.index-item .day-label,
.index-list-item .day-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.index-item .day-title,
.index-list-item .day-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  white-space: normal;
  word-break: break-word;
}

.index-item.active .day-title {
  color: var(--color-primary-dark);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ===== Welcome / Index View ===== */
.welcome-hero {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.hero-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.welcome-hero h2 {
  font-size: 1.6rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.welcome-hero p {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.progress-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.progress-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.progress-bar-wrap {
  height: 14px;
  background: var(--color-border);
  border-radius: 7px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), #7cb88a);
  border-radius: 7px;
  width: 0%;
  transition: width 0.5s ease;
}

.progress-text {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.index-list-header {
  margin-bottom: 0.75rem;
}

.index-list-header h3 {
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.25rem;
}

.index-list-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.index-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  background: var(--color-bg-card);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
}

.index-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.index-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  color: var(--color-text);
}

.index-list-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.index-list-item.completed {
  background: var(--color-success-light);
  border-color: #c8e6d0;
}

.index-list-item .day-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.index-list-item.completed .day-num {
  background: var(--color-success);
  color: white;
}

.index-list-item.completed .day-title {
  color: var(--color-success);
}

/* ===== Curriculum overview ===== */
.curriculum-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.curriculum-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.curriculum-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.curriculum-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: var(--shadow);
}

.curriculum-card.in-progress:not(.active) {
  border-color: var(--color-accent);
}

.curriculum-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.curriculum-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.curriculum-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.curriculum-card h4 {
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.15rem;
}

.curriculum-sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.curriculum-range {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.curriculum-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.curriculum-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.curriculum-progress-bar div {
  height: 100%;
  background: var(--color-success);
  border-radius: 3px;
}

/* ===== Index section headers ===== */
.index-section-header {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 0.75rem 0.4rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--color-border);
}

.index-section-header:first-child {
  border-top: none;
  margin-top: 0;
}

.index-section-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.index-section-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.index-section-text strong {
  font-size: 0.88rem;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
}

.index-section-text span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.index-section-range {
  font-size: 0.68rem !important;
  font-weight: 600;
  color: var(--color-primary) !important;
}

.session-section-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
}

.session-section-banner .section-banner-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.session-section-banner strong {
  display: block;
  color: var(--color-primary-dark);
  margin-bottom: 0.15rem;
}

.session-section-banner span {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

/* ===== Session View ===== */
.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.day-badge {
  background: var(--color-accent);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.95rem;
}

.session-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.session-header {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
  padding: 1.75rem 1.5rem;
  border-bottom: 3px solid var(--color-accent);
}

.session-header h2 {
  font-size: 1.5rem;
  color: var(--color-primary-dark);
}

.session-header .editable-title {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  border: 2px dashed transparent;
  background: transparent;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  resize: none;
  overflow: hidden;
  line-height: 1.3;
}
.session-header .editable-title:focus {
  border-color: var(--color-primary);
  background: white;
  outline: none;
}

.section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-number {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.section h3 {
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}

.section-content {
  padding-left: 0.25rem;
}

.section-content p,
.section-content li {
  font-size: 1.05rem;
}

.section-content ul,
.section-content ol {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.section-content li { margin-bottom: 0.4rem; }

/* Editable content areas */
.editable-block {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  padding: 0.85rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fefefe;
  color: var(--color-text);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}
.editable-block:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 155, 0.15);
}
.editable-block::placeholder { color: #b0a99f; }

.editable-block.large { min-height: 140px; }
.editable-block.small { min-height: 60px; }

.editable-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-item-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  padding: 0.6rem 0.85rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fefefe;
  box-sizing: border-box;
}

.list-item-textarea {
  min-height: 3.2rem;
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
  field-sizing: content;
}

.list-item-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Bible quote box */
.bible-box {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 0.5rem;
}

.bible-reference {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.bible-text {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.bible-explanation {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Challenge & Prayer boxes */
.challenge-box {
  background: var(--color-success-light);
  border: 2px dashed var(--color-success);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
}

.prayer-box {
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-primary-dark);
  font-style: italic;
}

/* Writing section */
.writing-section {
  background: #f9f6f1;
}

.writing-section .field-group {
  margin-bottom: 1.25rem;
}

.writing-section label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.4rem;
}

.writing-section .field-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

input[type="date"].editable-block {
  min-height: auto;
  max-width: 220px;
}

/* Evaluation */
.evaluation-section {
  background: var(--color-primary-light);
}

.eval-group {
  margin-bottom: 1.25rem;
}

.eval-group label.eval-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-option {
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  background: white;
  transition: all 0.15s;
}

.radio-option input:checked + span {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.radio-option:hover span {
  border-color: var(--color-primary);
}

/* ===== Answer selection ===== */
.answers-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: white;
  transition: all 0.15s;
}

.answer-option:hover {
  border-color: var(--color-primary);
}

.answer-option input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.answer-option span {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.answer-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.custom-answers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.custom-answer-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.custom-answer-row .list-item-input {
  flex: 1;
}

.btn-remove-answer {
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--color-danger);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-remove-answer:hover {
  background: var(--color-danger-light);
  border-color: var(--color-danger);
}

.answers-print-summary {
  display: none;
}

.answers-print-list {
  padding-left: 1.25rem;
  margin: 0;
}

.answers-print-list li {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* ===== Child tabs (Gonzalo / Martín) ===== */
.child-diary-group {
  margin-bottom: 1.25rem;
}

.child-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.child-tab {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: white;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.child-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.child-tab.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.child-tabs-panels {
  border: 2px solid var(--color-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 0.85rem;
  background: white;
}

.child-tab-panel {
  display: none;
}

.child-tab-panel.active {
  display: block;
}

.child-tab-panel .editable-block {
  border: none;
  padding: 0;
  min-height: 100px;
  background: transparent;
}

.child-tab-panel .editable-block:focus {
  box-shadow: none;
}

.child-print-summary {
  display: none;
}

/* Session actions */
.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

#btn-mark-complete.completed {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 2px solid var(--color-success);
}

.check-icon { font-size: 1.1rem; }

/* ===== Footer ===== */
.app-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* ===== Print Styles ===== */
@media print {
  .app-header, .app-footer, .day-nav, .session-actions,
  .sidebar, .sidebar-overlay, .save-indicator { display: none !important; }

  body { background: white; font-size: 12pt; }

  .main-content {
    max-width: 100%;
    padding: 0;
  }

  .session-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .section { break-inside: avoid; }

  .editable-block, .list-item-input {
    border: 1px solid #ccc;
    background: white;
  }

  .hidden { display: block !important; }

  .view-index { display: none !important; }
  .view-session { display: block !important; }

  .answers-picker,
  .answers-section .field-hint,
  .btn-add-custom-answer { display: none !important; }

  .answers-print-summary {
    display: block !important;
  }

  .answers-section-empty-print { display: none !important; }

  .child-tabs-nav,
  .child-tabs-panels { display: none !important; }

  .child-print-summary {
    display: block !important;
  }

  .child-print-entry {
    margin-bottom: 0.75rem;
    page-break-inside: avoid;
  }

  .child-print-entry strong {
    display: block;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
  }

  .child-print-entry p {
    margin: 0;
    white-space: pre-wrap;
  }

  .child-diary-group:has(.child-print-summary:empty) { display: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .app-header h1 { font-size: 1rem; }

  .header-inner {
    padding: 0.6rem max(1rem, env(safe-area-inset-right, 0)) 0.6rem max(1rem, env(safe-area-inset-left, 0));
    gap: 0.5rem;
  }

  .header-subtitle { font-size: 0.65rem; }

  .save-indicator { display: none; }

  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }

  .main-content {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0));
  }

  .curriculum-overview {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .curriculum-card {
    padding: 0.85rem;
    touch-action: manipulation;
  }

  .index-list-item,
  .index-item {
    min-height: 44px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .filter-btn,
  .child-tab {
    min-height: 44px;
    touch-action: manipulation;
  }

  .answer-option {
    min-height: 44px;
    align-items: center;
  }

  .answer-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .session-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .session-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .day-nav { flex-direction: column; }
  .day-nav .btn-nav {
    width: 100%;
    min-height: 48px;
  }

  .session-header { padding: 1.25rem 1rem; }
  .session-header h2,
  .session-header .editable-title { font-size: 1.25rem; }

  .section { padding: 1.25rem 1rem; }

  .editable-block,
  .list-item-input,
  input[type="text"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }

  .list-item-textarea {
    min-height: 3.5rem;
  }

  .sidebar {
    width: min(360px, 100vw);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .app-footer {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0));
  }
}
