/* ==============================================================
 * elle eats — styles.css
 * Folgt STYLEGUIDE.md (Kreidetafel-Look, mobile-first).
 * ============================================================== */

:root {
  /* Farben */
  --c-slate:    #1E2421;
  --c-frame:    #0F1110;
  --c-ink:      #1A1B1A;
  --c-chalk:    #EFE8DA;
  --c-linen:    #F5F1EA;
  --c-paper:    #FAF7F1;
  --c-oak:      #C9A574;
  --c-walnut:   #6E4A2D;
  --c-sage:     #8B9D7E;
  --c-burgundy: #6B2E2E;

  /* Schriften */
  --f-display:   'Fraunces', 'Hoefler Text', Georgia, serif;
  --f-chalk-cap: 'Architects Daughter', 'Bradley Hand', cursive;
  --f-chalk:     'Caveat', 'Bradley Hand', cursive;
  --f-body:      'Inter', 'Helvetica Neue', system-ui, sans-serif;

  /* Spacing (4er-Skala) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;

  /* Tafel */
  --frame-width: 12px;
  --tafel-bg: radial-gradient(ellipse 120% 100% at 30% 25%,
              #262C29 0%, #1E2421 60%, #181D1B 100%);

  /* Sonstiges */
  --radius: 4px;
  --radius-sheet: 16px;
  --shadow-card: 0 18px 40px rgba(15, 17, 16, 0.18);
  --transition: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 720px) {
  :root { --frame-width: 22px; }
}

/* ==============================================================
 * RESET
 * ============================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, ol, li, figure, blockquote, form { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--c-sage); outline-offset: 2px; border-radius: var(--radius); }

html { -webkit-text-size-adjust: 100%; }

/* ==============================================================
 * BODY
 * ============================================================== */
body {
  background: var(--c-linen);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--s-3) var(--s-3);
  padding-top: max(var(--s-3), env(safe-area-inset-top, 0));
  padding-bottom: max(var(--s-2), env(safe-area-inset-bottom, 0));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 720px) {
  body { padding: var(--s-4) var(--s-7); }
}

/* ==============================================================
 * HEADER
 * ============================================================== */
.page-header {
  text-align: center;
  margin-bottom: var(--s-2);
}
.brand {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  line-height: 1;
}
.tagline { display: none; }

@media (min-width: 720px) {
  .brand    { font-size: 40px; line-height: 1.05; }
  .tagline  {
    display: block;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-walnut);
    margin-top: var(--s-2);
  }
  .page-header { margin-bottom: var(--s-3); }
}

/* ==============================================================
 * WEEK NAVIGATION
 * ============================================================== */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin: 0 auto var(--s-2);
  max-width: 480px;
}
.week-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink);
  flex: 1;
  text-align: center;
  font-feature-settings: 'tnum';
}
.nav-arrow {
  color: var(--c-ink);
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.nav-arrow:hover { background: rgba(26, 27, 26, 0.05); }
.nav-arrow:active { background: rgba(26, 27, 26, 0.1); }

@media (min-width: 720px) {
  .week-label { font-size: 13px; }
  .week-nav { margin-bottom: var(--s-3); }
  .nav-arrow { width: 44px; height: 44px; font-size: 22px; }
}

/* ==============================================================
 * SECTION NAV (Wochenkarte / Rezepte)
 * ============================================================== */
.section-nav {
  display: flex;
  justify-content: center;
  gap: var(--s-4);
  margin: 0 auto var(--s-3);
  max-width: 480px;
}
.section-link {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-walnut);
  text-decoration: none;
  padding: var(--s-1) var(--s-2);
  transition: color var(--transition);
}
.section-link:hover { color: var(--c-ink); }
body[data-section="board"]   .section-link[data-section="board"],
body[data-section="recipes"] .section-link[data-section="recipes"],
body[data-section="recipe"]  .section-link[data-section="recipes"] {
  color: var(--c-ink);
  font-weight: 600;
}
@media (min-width: 720px) {
  .section-nav { gap: var(--s-5); margin-bottom: var(--s-4); }
  .section-link { font-size: 12px; }
}

/* ==============================================================
 * AUTH-CORNER (kleines Login-Icon oben rechts)
 * ============================================================== */
.auth-corner {
  position: absolute;
  top: max(var(--s-3), env(safe-area-inset-top, 0));
  right: max(var(--s-3), env(safe-area-inset-right, 0));
  z-index: 10;
}
.auth-corner[hidden] { display: none; }
.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--c-walnut);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity var(--transition), color var(--transition);
}
.auth-btn:hover { opacity: 1; color: var(--c-ink); }
.auth-icon { display: block; }
.auth-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-sage);
  box-shadow: 0 0 0 2px var(--c-linen);
}
@media (min-width: 720px) {
  .auth-corner {
    top: max(var(--s-4), env(safe-area-inset-top, 0));
    right: max(var(--s-5), env(safe-area-inset-right, 0));
  }
}

/* Read-only-Modus: alles, was Editieren erlaubt, ausblenden. */
body[data-can-edit="no"] .recipe-new,
body[data-can-edit="no"] .recipe-actions,
body[data-can-edit="no"] .image-add,
body[data-can-edit="no"] .image-delete { display: none !important; }

body[data-can-edit="no"] .recipe-title,
body[data-can-edit="no"] .field-input {
  border-color: transparent;
  background: transparent;
}
body[data-can-edit="no"] .recipe-title:focus,
body[data-can-edit="no"] .field-input:focus { border-color: transparent; }

/* ==============================================================
 * APP / VIEWS
 * ============================================================== */
main.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
.view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
.view.hidden { display: none; }
.view-board { flex: 1; }

/* ==============================================================
 * CANVAS / CHALKBOARD
 * ============================================================== */
.canvas {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chalkboard {
  background: var(--c-frame);
  padding: var(--frame-width);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-card),
    inset 0 0 0 1px rgba(239, 232, 218, 0.05);
  flex: 1;
  display: flex;
  min-height: 0;
}

.chalk-surface {
  background: var(--tafel-bg);
  padding: var(--s-3) var(--s-4);
  border-radius: 2px;
  box-shadow: inset 0 0 30px rgba(15, 17, 16, 0.5);
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

@media (min-width: 720px) {
  .chalk-surface { padding: var(--s-5) var(--s-6); }
}

/* ==============================================================
 * DAYS
 * ============================================================== */
.days {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  justify-content: space-between;
  min-height: 0;
}
@media (min-width: 720px) {
  .days { gap: var(--s-3); }
}

.day {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  transition: opacity var(--transition);
}
.day:hover .weekday::after {
  background: rgba(239, 232, 218, 0.85);
}
.day:active { opacity: 0.85; }
.day:focus-visible {
  outline: 2px solid var(--c-sage);
  outline-offset: 6px;
  border-radius: 2px;
}

.weekday {
  font-family: var(--f-chalk-cap);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--c-chalk);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-right: 10px;
  padding-bottom: 2px;
  text-shadow: 0 0 0.5px rgba(239, 232, 218, 0.4);
}

/* Kreidelinie unter dem Wochentag */
.weekday::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: rgba(239, 232, 218, 0.55);
  border-radius: 2px;
  transition: background var(--transition);
}

/* „heute"-Punkt */
.today-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-sage);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 4px;
}

.dish {
  font-family: var(--f-chalk);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--c-chalk);
  margin-top: 2px;
  min-height: 24px;
  text-shadow: 0 0 0.5px rgba(239, 232, 218, 0.4);
  word-break: break-word;
}

@media (min-width: 720px) {
  .weekday { font-size: 20px; padding-bottom: 4px; }
  .dish    { font-size: 28px; min-height: 30px; margin-top: 6px; }
}

/* ==============================================================
 * BELOW BOARD
 * ============================================================== */
.below-board {
  text-align: center;
  margin-top: var(--s-2);
}
.below-board:empty,
.below-board:has(> .hidden:only-child) {
  margin-top: 0;
  min-height: 0;
}

/* ==============================================================
 * BUTTONS
 * ============================================================== */
.btn-primary {
  background: var(--c-ink);
  color: var(--c-chalk);
  border: 1px solid var(--c-ink);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition);
  min-height: 48px;
}
.btn-primary:hover { background: #2a2b2a; }
.btn-primary:active { background: #353635; }

.btn-tertiary {
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  min-height: 44px;
  transition: text-underline-offset var(--transition), color var(--transition);
}
.btn-tertiary:hover { text-underline-offset: 5px; }
.btn-tertiary.danger { color: var(--c-burgundy); }

.hidden { display: none !important; }

/* ==============================================================
 * SHEET (DIALOG)
 * Mobile: Bottom Sheet · Desktop: zentriert
 * ============================================================== */
dialog.sheet {
  border: none;
  background: var(--c-paper);
  color: var(--c-ink);
  padding: 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;

  /* mobile: bottom sheet */
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -10px 40px rgba(15, 17, 16, 0.25);

  overflow: hidden;
  animation: sheet-in var(--transition);
}

dialog.sheet::backdrop {
  background: rgba(15, 17, 16, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: backdrop-in var(--transition);
}

@keyframes sheet-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (min-width: 720px) {
  dialog.sheet {
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    border-radius: var(--radius);
    width: min(560px, 92vw);
    animation: sheet-in-desktop var(--transition);
  }
  @keyframes sheet-in-desktop {
    from { transform: translate(-50%, calc(-50% + 12px)); opacity: 0; }
    to   { transform: translate(-50%, -50%);              opacity: 1; }
  }
}

.sheet-form {
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  padding-bottom: max(var(--s-5), calc(env(safe-area-inset-bottom, 0) + var(--s-3)));
  gap: var(--s-4);
  max-height: 92vh;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.sheet-day {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-walnut);
  font-weight: 500;
}
.sheet-close {
  font-size: 28px;
  width: 36px;
  height: 36px;
  color: var(--c-ink);
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.sheet-close:hover { background: rgba(26, 27, 26, 0.06); }

/* Mini-Tafel im Sheet — Eingabe fühlt sich an wie Schreiben auf der Tafel */
.sheet-input-wrap {
  background: var(--tafel-bg);
  border: 1px solid var(--c-frame);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  box-shadow: inset 0 0 20px rgba(15, 17, 16, 0.45);
}
.dish-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-chalk);
  font-family: var(--f-chalk);
  font-size: 30px;
  line-height: 1.2;
  text-shadow: 0 0 0.5px rgba(239, 232, 218, 0.4);
  caret-color: var(--c-chalk);
  padding: 0;
  min-height: 38px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.dish-input::placeholder {
  color: var(--c-chalk);
  opacity: 0.35;
}

/* Vorschläge */
.suggestions {
  border-top: 1px solid rgba(26, 27, 26, 0.08);
  padding-top: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 0; /* damit die Liste scrollen kann */
}
.suggestions-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-walnut);
}
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--s-2) * -1);
}
.suggestion {
  width: 100%;
  text-align: left;
  padding: 12px var(--s-2);
  font-size: 16px;
  color: var(--c-ink);
  border-radius: var(--radius);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background var(--transition);
}
.suggestion:hover, .suggestion:focus { background: rgba(26, 27, 26, 0.05); outline: none; }
.suggestion-empty {
  font-size: 14px;
  color: var(--c-walnut);
  padding: var(--s-3) var(--s-2);
  font-style: italic;
}

.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  border-top: 1px solid rgba(26, 27, 26, 0.08);
  padding-top: var(--s-4);
}
.sheet-actions .btn-primary { flex: 1; min-width: 0; }
.sheet-actions .hidden + .btn-primary { margin-left: 0; }

/* Aktion zwischen Eingabe und Vorschlägen: „Rezept öffnen / anlegen" */
.dish-action { text-align: center; }
.dish-action:empty { display: none; }
.dish-action .btn-link {
  font-size: 13px;
  color: var(--c-walnut);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--f-body);
  transition: color var(--transition);
}
.dish-action .btn-link:hover { color: var(--c-ink); }

/* ==============================================================
 * REZEPTE — LISTE
 * ============================================================== */
.view-recipes {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: var(--s-7);
}
.recipes-toolbar {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.recipe-search {
  flex: 1;
  min-width: 0;
  background: var(--c-paper);
  border: 1px solid rgba(26, 27, 26, 0.12);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--c-ink);
  border-radius: var(--radius);
  font-family: var(--f-body);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.recipe-search:focus { border-color: var(--c-walnut); }
.recipe-new { white-space: nowrap; min-height: 44px; padding: 10px 18px; }

.recipe-list {
  display: flex;
  flex-direction: column;
}
.recipe-item {
  border-bottom: 1px solid rgba(26, 27, 26, 0.08);
}
.recipe-item:first-child { border-top: 1px solid rgba(26, 27, 26, 0.08); }
.recipe-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-2);
  color: var(--c-ink);
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.2;
  transition: background var(--transition);
}
.recipe-link::after {
  content: "›";
  color: var(--c-walnut);
  font-size: 22px;
  flex-shrink: 0;
}
.recipe-link:hover { background: rgba(26, 27, 26, 0.04); }
.recipe-empty {
  padding: var(--s-6) var(--s-3);
  color: var(--c-walnut);
  font-style: italic;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

/* ==============================================================
 * REZEPT — DETAIL
 * ============================================================== */
.view-recipe {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: var(--s-7);
}
.back-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-walnut);
  text-decoration: none;
  margin-bottom: var(--s-3);
  padding: var(--s-2) 0;
  transition: color var(--transition);
}
.back-link:hover { color: var(--c-ink); }

.recipe-title {
  width: 100%;
  display: block;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-ink);
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  padding: 0 0 var(--s-3) 0;
  border-bottom: 1px solid rgba(26, 27, 26, 0.1);
  margin-bottom: var(--s-4);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  resize: none;
  overflow: hidden;
  white-space: nowrap;
}
.recipe-title::placeholder { color: var(--c-walnut); opacity: 0.45; }
.recipe-title:focus { border-bottom-color: var(--c-walnut); }

@media (min-width: 720px) {
  .recipe-title { font-size: 44px; }
}

.field {
  display: block;
  margin-bottom: var(--s-4);
}
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-walnut);
  font-weight: 600;
  margin-bottom: var(--s-2);
}
.field-input {
  width: 100%;
  background: var(--c-paper);
  border: 1px solid rgba(26, 27, 26, 0.12);
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-ink);
  font-family: var(--f-body);
  border-radius: var(--radius);
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 60px;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.field-input:focus { border-color: var(--c-walnut); }
.field-input::placeholder { color: var(--c-walnut); opacity: 0.5; }

.recipe-actions {
  margin-top: var(--s-5);
  text-align: center;
}

/* ==============================================================
 * REZEPT — BILDER
 * ============================================================== */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.image-gallery:empty { display: none; }

.image-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-paper);
  box-shadow: 0 1px 2px rgba(15, 17, 16, 0.08);
}
.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.image-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 17, 16, 0.7);
  color: var(--c-chalk);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.image-delete:hover { background: var(--c-burgundy); }

@media (min-width: 720px) {
  .image-thumb { width: 120px; height: 120px; }
}

.image-add {
  width: 96px;
  height: 96px;
}
.image-add-btn {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  background: transparent;
  border: 1px dashed rgba(26, 27, 26, 0.22);
  border-radius: var(--radius);
  color: var(--c-walnut);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.image-add-btn:hover {
  background: var(--c-paper);
  border-color: rgba(26, 27, 26, 0.45);
  color: var(--c-ink);
}
.image-add-btn:active { background: #ECE6DA; }
.image-add-icon {
  display: block;
  color: currentColor;
}
.image-add-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
}

@media (min-width: 720px) {
  .image-add { width: 120px; height: 120px; }
  .image-add-label { font-size: 12px; }
}

/* ==============================================================
 * LIGHTBOX
 * ============================================================== */
dialog.lightbox {
  border: none;
  background: rgba(15, 17, 16, 0.92);
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  margin: 0;
  inset: 0;
  display: none;
}
dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog.lightbox::backdrop {
  background: rgba(15, 17, 16, 0.92);
}
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: max(var(--s-3), env(safe-area-inset-top, 0));
  right: var(--s-3);
  width: 44px;
  height: 44px;
  font-size: 32px;
  color: var(--c-chalk);
  background: rgba(15, 17, 16, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1;
}
.lightbox-close:hover { background: rgba(15, 17, 16, 0.9); }

/* ==============================================================
 * CONFIRM-DIALOG
 * ============================================================== */
dialog.confirm {
  border: none;
  background: var(--c-paper);
  color: var(--c-ink);
  padding: var(--s-5);
  border-radius: var(--radius);
  width: min(420px, 92vw);
  box-shadow: 0 10px 40px rgba(15, 17, 16, 0.25);
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  animation: sheet-in-desktop var(--transition);
}
dialog.confirm::backdrop {
  background: rgba(15, 17, 16, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: backdrop-in var(--transition);
}
.confirm-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 var(--s-2) 0;
}
.confirm-text {
  margin: 0 0 var(--s-5) 0;
  color: var(--c-walnut);
  font-size: 15px;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-4);
}
