@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500;1,9..144,600;1,9..144,700&display=swap');

:root {
  /* Palette — chaleureuse, chalet, célébration */
  --ink: #1f1815;
  --ink-soft: #6b5d52;
  --ink-muted: #9b8d80;
  --paper: #fbf6ec;
  --paper-warm: #f5ecdb;
  --card: #ffffff;
  --forest: #1e3a26;
  --forest-mid: #3d6b3a;
  --forest-light: #e6ede4;
  --gold: #a87c4b;
  --gold-deep: #8a5f30;
  --gold-soft: #d4b489;
  --gold-bg: #f5ead7;
  --error: #a83232;
  --error-bg: #fbeeee;
  --success: #5a7d4f;
  --line: #e7dfd1;

  /* Typography */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shadows — softer, paper-like */
  --shadow-soft: 0 1px 2px rgba(31, 24, 21, 0.04), 0 4px 16px rgba(31, 24, 21, 0.06);
  --shadow-card: 0 1px 3px rgba(31, 24, 21, 0.06), 0 10px 32px rgba(31, 24, 21, 0.09);
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem;
}

.container.wide {
  max-width: 1180px;
}

/* ============ HERO ============ */
.hero {
  text-align: center;
  margin-bottom: 1.75rem;
  position: relative;
  padding: 0;
}

.hero-banner {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  margin: 0 0 -3.5rem;
  position: relative;
  background: linear-gradient(135deg, var(--forest) 0%, var(--gold-deep) 100%);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(251, 246, 236, 0.55) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding: 0 1.25rem 1.25rem;
}

.hero .portrait {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  border: 5px solid #ffffff;
  box-shadow:
    0 1px 3px rgba(31, 24, 21, 0.10),
    0 14px 36px rgba(31, 24, 21, 0.28);
  background: var(--paper-warm);
}

@media (min-width: 600px) {
  .hero-banner {
    height: 300px;
    border-radius: 0 0 22px 22px;
  }

  .hero .portrait {
    max-width: 420px;
    border-width: 6px;
    border-radius: 16px;
  }
}

.hero .overline {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 1.25rem;
}

.hero .age {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(5.5rem, 22vw, 9rem);
  line-height: 0.85;
  color: var(--gold);
  margin: 0;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 0 rgba(168, 124, 75, 0.08);
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  line-height: 1.2;
  color: var(--forest);
  margin: 0.5rem 0 0;
  letter-spacing: -0.005em;
}

.hero h1 .celebrants {
  display: block;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin-top: 0.2rem;
  font-size: 1.45em;
  color: var(--forest);
}

.hero .ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.75rem auto 1.25rem;
  color: var(--gold);
}

.hero .ornament::before,
.hero .ornament::after {
  content: "";
  display: block;
  height: 1px;
  width: 56px;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}

.hero .ornament span {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--gold);
}

.hero .dates {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.hero .location {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
  font-style: italic;
}

.hero .house-rule {
  display: inline-block;
  margin: 1rem auto 0;
  padding: 0.4rem 0.85rem;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Hero compact for admin */
.hero.compact {
  padding: 2rem 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.hero.compact h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
  margin: 0;
}

.hero.compact .meta {
  color: var(--ink-soft);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ============ FORM CARDS ============ */
form { padding-bottom: 2rem; }

fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.25rem;
  margin-bottom: 1.1rem;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

legend {
  font-family: var(--font-serif);
  font-weight: 600;
  padding: 0 0.55rem;
  color: var(--forest);
  font-size: 1.1rem;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.005em;
}

legend .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gold-bg);
  color: var(--gold-deep);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border: 1px solid var(--gold-soft);
}

/* ============ LABELS / INPUTS ============ */
label {
  display: block;
  margin-bottom: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}

label.radio, label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 400;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 48px;
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  color: var(--ink);
}

label.radio:hover, label.checkbox:hover {
  background: var(--forest-light);
}

label.radio input, label.checkbox input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--forest);
  cursor: pointer;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  margin-top: 0.4rem;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder, textarea::placeholder {
  color: var(--ink-muted);
  font-style: italic;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px var(--forest-light);
}

textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

.req {
  color: var(--gold);
  margin-left: 0.15rem;
  font-weight: 700;
}

.sublabel {
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.constraints-block .block-title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}

.constraints-block.partner {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line);
}

/* ============ BUTTONS ============ */
.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  min-height: 54px;
  font-family: inherit;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--forest);
  color: white;
  margin-top: 1.5rem;
  box-shadow: 0 4px 14px rgba(30, 58, 38, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: #15291b;
  box-shadow: 0 6px 20px rgba(30, 58, 38, 0.28);
}

.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--gold-bg);
  color: var(--gold-deep);
  border: 1px solid var(--gold-soft);
  margin-bottom: 1rem;
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--gold-soft);
  color: white;
}

.btn-secondary.inline {
  display: inline-block;
  width: auto;
  padding: 0.55rem 1rem;
  margin: 0;
  min-height: 0;
  font-size: 0.88rem;
}

/* ============ MISC ============ */
.error {
  color: var(--error);
  font-weight: 500;
  margin: 0.85rem 0;
  font-size: 0.95rem;
  background: var(--error-bg);
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  border-left: 3px solid var(--error);
}

.success-text { color: var(--success); font-weight: 500; }

.confirmation {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.confirmation .portrait-small {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 1.25rem;
  border-radius: 10px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 16px rgba(31, 24, 21, 0.18);
}

.confirmation h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
  font-size: 1.7rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.confirmation > p {
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.confirmation ul {
  text-align: left;
  background: var(--paper-warm);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  list-style: none;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
}

.confirmation ul li {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.edit-link {
  width: 100%;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  background: var(--paper-warm);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  color: var(--forest);
}

.hint {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0.5rem 0 1rem;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* ============ ADMIN ============ */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
}

.meal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.meal-card .label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meal-card .count {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--forest);
  margin: 0.4rem 0 0.2rem;
  line-height: 1;
}

.meal-card .count .total {
  color: var(--ink-muted);
  font-size: 0.85em;
  font-weight: 400;
}

.meal-card .alert {
  font-size: 0.74rem;
  color: var(--error);
  margin-top: 0.15rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.92rem;
  border-radius: 10px;
  overflow: hidden;
}

.admin-table th, .admin-table td {
  padding: 0.7rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  background: var(--paper-warm);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.admin-table th:hover { color: var(--forest); }

.admin-table tbody tr {
  transition: background-color 0.1s;
}

.admin-table tbody tr:hover {
  background: var(--forest-light);
  cursor: pointer;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-section {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.admin-section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  color: var(--forest);
  font-size: 1.25rem;
  letter-spacing: -0.005em;
}

.couple-line {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.couple-line:last-child { border-bottom: none; }

.couple-warn { color: var(--error); font-weight: 500; }

.missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.missing-list .badge {
  background: var(--error-bg);
  color: var(--error);
  padding: 0.35rem 0.85rem;
  border-radius: 16px;
  font-size: 0.88rem;
  border: 1px solid #f0d9d9;
}

.missing-list .badge.responded {
  background: var(--forest-light);
  color: var(--forest);
  text-decoration: line-through;
  opacity: 0.65;
  border-color: #d0dccc;
}

.toolbar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar input {
  flex: 1;
  min-width: 200px;
  margin-top: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 24, 21, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--card);
  border-radius: 14px;
  padding: 1.75rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.modal h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--forest);
  font-size: 1.4rem;
}

.modal dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}

.modal dt {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: center;
}

.modal dd {
  margin: 0;
  word-break: break-word;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.75rem;
  justify-content: flex-end;
}

.btn-danger {
  background: var(--error);
  color: white;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-danger:hover { background: #8a2828; }

/* === Chambres / lits === */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.room-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.room-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.room-card.unassigned {
  background: #fcf6e8;
  border-color: var(--gold-soft);
}

.room-card.unassigned h3 {
  color: var(--gold-deep);
  border-color: var(--gold-soft);
}

.bed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bed-list > li {
  background: var(--paper-warm);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  border: 1px solid transparent;
}

.bed-list > li.over {
  border-color: var(--error);
  background: var(--error-bg);
}

.bed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.bed-label {
  color: var(--ink-soft);
  font-weight: 500;
}

.bed-cap {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.bed-list > li.over .bed-cap {
  color: var(--error);
  font-weight: 700;
}

.occupants {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.occupants li {
  cursor: grab;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: background-color 0.1s;
  user-select: none;
}

.occupants li:hover {
  background: rgba(168, 124, 75, 0.1);
}

.occupants li:active {
  cursor: grabbing;
}

.occupants li.dragging {
  opacity: 0.4;
}

.occupants li::before {
  content: '👤 ';
  font-size: 0.75rem;
  margin-right: 0.15rem;
}

/* Drop targets — visual highlight while hovering with a dragged item */
.bed-list > li.drag-over {
  border-color: var(--forest);
  background: var(--forest-light);
  box-shadow: 0 0 0 2px var(--forest-mid) inset;
}

.room-card.unassigned.drag-over {
  border-color: var(--gold-deep);
  background: var(--gold-bg);
  box-shadow: 0 0 0 2px var(--gold-deep) inset;
}

/* === Plan des repas === */
.day-group {
  margin-bottom: 1.75rem;
}

.day-group:last-child {
  margin-bottom: 0;
}

.day-heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
  font-size: 1.2rem;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 0.45rem;
}

.meal-plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.85rem;
}

.meal-plan-card h4 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--forest);
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}

.meal-plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.meal-stats {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.meal-count strong {
  color: var(--forest);
  font-size: 1rem;
}

.meal-stats .badge.restr {
  background: var(--error-bg);
  color: var(--error);
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 500;
  border: 1px solid #f0d9d9;
}

.attendees-list summary {
  cursor: pointer;
  color: var(--forest);
  font-size: 0.85rem;
  padding: 0.25rem 0;
  user-select: none;
  list-style-position: inside;
}

.attendees-list summary::marker {
  color: var(--gold);
}

.attendees-list ul {
  margin: 0.4rem 0 0;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.allergies-list {
  background: var(--error-bg);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  border-left: 3px solid var(--error);
}

.allergies-list strong { color: var(--error); }

.allergies-list ul {
  margin: 0.3rem 0 0;
  padding-left: 1.25rem;
}

.meal-plan-card label {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.meal-plan-card textarea {
  min-height: 70px;
  font-size: 0.95rem;
}

.ingredients-editor {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 1fr 70px 80px 36px;
  gap: 0.4rem;
  align-items: center;
}

.ingredient-row input {
  margin-top: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.ing-del {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-muted);
  padding: 0.4rem;
  height: 100%;
}

.ing-del:hover {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error);
}

.save-flash {
  position: absolute;
  bottom: 0.5rem;
  right: 0.85rem;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
  background: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* === Liste de courses === */
.shopping-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
}

.shopping-list li {
  background: var(--paper-warm);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  border: 1px solid var(--line);
}

.shopping-list .item-qty {
  font-weight: 700;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  font-family: var(--font-serif);
}

.shopping-list .item-name {
  color: var(--ink);
}

/* === Print === */
.print-only { display: none; }

@media print {
  body {
    background: white;
    color: black;
    font-size: 10.5pt;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .no-print { display: none !important; }
  .print-only { display: block !important; }

  .print-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
  }

  .print-header h1 {
    font-family: var(--font-serif);
    font-size: 18pt;
    margin: 0 0 0.3rem;
    color: #1e3a26;
  }

  .print-header p {
    margin: 0;
    color: #555;
    font-size: 10pt;
  }

  .admin-section {
    box-shadow: none;
    border: none;
    padding: 0 0 1rem;
    margin-bottom: 1rem;
    page-break-inside: auto;
  }

  .admin-section h2 {
    font-size: 14pt;
    border-bottom: 1px solid #999;
    padding-bottom: 0.3rem;
  }

  .day-group {
    margin-bottom: 0.9rem;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .day-heading {
    font-size: 12pt;
    color: black;
    border-bottom: 1.5px solid #555;
    margin-bottom: 0.4rem;
  }

  .meal-plans {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .meal-plan-card h4 {
    font-size: 11pt;
    color: black;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.15rem;
    margin-bottom: 0.3rem;
  }

  .meal-plan-card {
    border: 1px solid #999;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none;
    background: white;
  }

  .meal-plan-card h3 {
    font-size: 11.5pt;
    color: black;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.2rem;
    margin-bottom: 0.4rem;
  }

  .menu-printable {
    margin: 0.3rem 0;
    font-size: 10pt;
  }

  .meal-stats .badge.restr {
    background: white;
    color: black;
    border: 1px solid #999;
  }

  .allergies-list {
    background: white;
    border: 1px solid #c00;
    border-left-width: 3px;
    color: #800;
  }

  .shopping-list {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.25rem;
  }

  .shopping-list li {
    background: white;
    border: 1px solid #ccc;
    page-break-inside: avoid;
    padding: 0.3rem 0.5rem;
    font-size: 10pt;
  }

  .shopping-list .item-qty {
    color: black;
  }

  .shopping-section {
    page-break-before: auto;
  }

  /* Hide loading & errors */
  .loading, .error { display: none !important; }
}

/* Modal assign block */
.assign-block {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.assign-block h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--forest);
  font-size: 1rem;
}

.assign-block label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.assign-block select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  margin-top: 0.25rem;
}

.assign-block select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.assign-block .btn-primary {
  margin-top: 0.5rem;
  width: 100%;
  min-height: 44px;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
}

.assign-block .btn-primary.inline {
  width: 100%;
}

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}
