/* Entry 031 — The only notification
   Series: One Screen Futures.
   Scene art direction: a newsroom at 4 a.m. deciding the one story that runs — but
   domestic. A still pre-dawn desk, one warm lamp from the upper-left, a wide quiet
   dark. A single frosted-glass "front page" floats in the warm gloom: today's one
   chosen notification set like a headline, and — greyed beneath it — the pile it
   silenced, liftable. One accent: an ember-coral for the chosen thing and the
   machine's reason. Own recipe: Playfair Display (the front-page voice) + IBM Plex
   Sans (the editor's desk), 18px radius, warm and lamplit. Distinct from the last
   entries' gold/jade/clay/cyan cool-glass recipes. */

.only-scene {
  --ember: #e0855c;
  --ember-glow: #f2b48f;
  --on-dark: #f7eee7;
  --deep: #241d18;
  --mid: #6b5647;

  display: grid;
  place-items: center;
  min-height: 780px;
  padding: 116px 32px;
  border-color: rgba(28, 20, 15, 0.7);
  /* background-first: a warm, dark photograph carries the mood; a soft scrim,
     brightest at the upper-left where the lamp is, keeps the panel legible. */
  background-image:
    radial-gradient(120% 90% at 30% 22%, rgba(58, 41, 29, 0.30) 0%, rgba(20, 14, 10, 0.62) 62%, rgba(14, 9, 6, 0.80) 100%),
    url("../../public/media/backgrounds/dark-warm-19-ruedi.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* mid layer — the desk lamp, warm light spilled and blurred into the dark */
.lamp {
  position: absolute;
  z-index: 0;
  left: 30%;
  top: 26%;
  width: min(720px, 92%);
  height: 500px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(58% 58% at 50% 50%, rgba(224, 148, 92, 0.22), transparent 72%);
  filter: blur(64px);
  pointer-events: none;
  transition: opacity 900ms ease, background 900ms ease;
}

/* ------------------------------------------------------------------ */
/* THE COMPONENT — one frosted-glass "front page"                      */
/* ------------------------------------------------------------------ */

.frontpage {
  position: relative;
  z-index: 2;
  width: min(660px, 100%);
  display: grid;
  gap: 22px;
  padding: 44px 46px 40px;
  border-radius: 18px;
  font-family: "IBM Plex Sans", var(--ui-sans);
  /* warm frosted glass: a thin film of lamplight over the photograph */
  background:
    linear-gradient(168deg, rgba(60, 45, 35, 0.34), rgba(24, 17, 12, 0.40));
  border: 1px solid rgba(240, 214, 190, 0.20);
  box-shadow:
    0 1px 0 rgba(250, 236, 222, 0.26) inset,
    0 0 0 1px rgba(16, 11, 8, 0.30),
    0 60px 130px rgba(10, 7, 4, 0.62),
    0 18px 54px rgba(120, 74, 40, 0.24);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  color: var(--on-dark);
  transition: border-color 600ms ease, box-shadow 600ms ease;
}

/* masthead row — small, sans, recessive: the date and the budget */
.fp-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(240, 214, 190, 0.16);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 214, 198, 0.6);
}

.fp-budget {
  color: var(--ember-glow);
  font-variant-numeric: tabular-nums;
}

.fp-kicker {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(224, 148, 92, 0.82);
}

/* the chosen thing — the hero. front-page serif, large, warm, never pure white */
.fp-chosen {
  display: grid;
  gap: 14px;
}

.fp-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(238, 222, 208, 0.82);
}

.fp-source .fp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(224, 148, 92, 0.95);
}

.fp-cat {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 214, 198, 0.5);
  padding: 2px 8px;
  border: 1px solid rgba(240, 214, 190, 0.2);
  border-radius: 999px;
}

.fp-headline {
  margin: 0;
  font-family: "Playfair Display", "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4.8vw, 50px);
  line-height: 1.06;
  letter-spacing: 0.002em;
  color: #fbf4ec;
  text-wrap: balance;
}

.fp-defence {
  margin: 0;
  max-width: 54ch;
  font-size: clamp(14px, 1.55vw, 16px);
  line-height: 1.55;
  color: rgba(232, 216, 202, 0.74);
}

.fp-actions {
  margin-top: 2px;
}

.btn {
  font-family: "IBM Plex Sans", var(--ui-sans);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 180ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

/* Reject — a ghost. available, but it costs the pick */
.btn-reject {
  border: 1px solid rgba(240, 214, 190, 0.26);
  background: rgba(224, 148, 92, 0.06);
  color: rgba(240, 224, 210, 0.86);
}

.btn-reject:hover:not(:disabled) {
  border-color: rgba(224, 148, 92, 0.55);
  color: #fbf4ec;
  transform: translateY(-1px);
}

.btn-reject:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-reject .cost {
  font-weight: 400;
  font-size: 12px;
  color: rgba(232, 214, 198, 0.5);
}

/* ---- the silenced pile ---- */
.fp-silenced {
  border-top: 1px solid rgba(240, 214, 190, 0.14);
  padding-top: 18px;
}

.fp-lid {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: rgba(232, 216, 202, 0.7);
}

.fp-count {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: rgba(240, 224, 210, 0.9);
  font-variant-numeric: tabular-nums;
}

.fp-count-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 214, 198, 0.52);
}

.fp-chevron {
  margin-left: auto;
  font-size: 12px;
  color: rgba(224, 148, 92, 0.7);
  transition: transform 240ms ease;
}

.frontpage[data-open="true"] .fp-chevron {
  transform: rotate(90deg);
}

.fp-graveyard {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  animation: rise 460ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

/* respect the toggle — author display:grid would otherwise defeat [hidden] */
.fp-graveyard[hidden] {
  display: none;
}

.grave-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(20, 14, 10, 0.4);
  border: 1px solid rgba(240, 214, 190, 0.1);
  /* silenced things read cold and grey — no ember here */
  filter: grayscale(0.5);
}

.grave-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.grave-source {
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 214, 204, 0.7);
}

.grave-cat {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(210, 196, 186, 0.42);
}

.grave-text {
  margin: 0 0 4px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 15px;
  color: rgba(232, 220, 210, 0.82);
}

.grave-reason {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(210, 194, 182, 0.56);
}

.grave-rest {
  padding: 4px 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(206, 190, 178, 0.5);
  font-style: italic;
}

/* ---- priority chips: the person's stated stance ---- */
.fp-controls {
  border-top: 1px solid rgba(240, 214, 190, 0.14);
  padding-top: 18px;
}

.fp-controls-head {
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 214, 198, 0.5);
}

.fp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Sans", var(--ui-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(240, 214, 190, 0.2);
  background: rgba(20, 14, 10, 0.34);
  color: rgba(232, 218, 206, 0.7);
  transition: all 200ms ease;
}

.chip-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(240, 214, 190, 0.3);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  position: relative;
}

.chip[data-level="down"] { opacity: 0.62; }
.chip[data-level="down"] .chip-mark::after { content: "−"; color: rgba(232, 214, 198, 0.6); }

.chip[data-level="normal"] .chip-mark::after { content: ""; }

.chip[data-level="up"] {
  border-color: rgba(224, 148, 92, 0.6);
  background: rgba(224, 148, 92, 0.14);
  color: #fbf1e8;
  box-shadow: 0 6px 20px rgba(180, 96, 44, 0.24);
}
.chip[data-level="up"] .chip-mark {
  border-color: var(--ember);
  background: var(--ember);
}
.chip[data-level="up"] .chip-mark::after { content: "★"; color: #2a1a10; font-size: 9px; }

/* ---- emergency: the honest seam. the rule bends, the frame reddens-warm ---- */
.fp-emergency {
  justify-self: start;
  margin-top: 2px;
  font-family: "IBM Plex Sans", var(--ui-sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px dashed rgba(224, 148, 92, 0.4);
  background: none;
  color: rgba(226, 176, 148, 0.7);
  transition: all 200ms ease;
}

.fp-emergency:hover {
  border-color: rgba(224, 148, 92, 0.7);
  color: #fbe6d8;
}

.frontpage[data-state="emergency"] {
  border-color: rgba(226, 120, 78, 0.7);
  box-shadow:
    0 1px 0 rgba(250, 236, 222, 0.26) inset,
    0 0 0 1px rgba(226, 120, 78, 0.3),
    0 60px 130px rgba(10, 7, 4, 0.66),
    0 18px 60px rgba(200, 84, 40, 0.4);
}

.frontpage[data-state="emergency"] .fp-source .fp-dot {
  background: #f0693f;
  box-shadow: 0 0 14px rgba(240, 105, 63, 0.95);
  animation: pulse 1.6s ease-in-out infinite;
}

.frontpage[data-state="emergency"] .fp-budget {
  color: #f0906f;
}

.only-scene:has(.frontpage[data-state="emergency"]) .lamp {
  background: radial-gradient(58% 58% at 50% 50%, rgba(226, 96, 60, 0.24), transparent 72%);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* unobtrusive photo attribution, bottom-right of the scene */
.scene-credit {
  position: absolute;
  right: 16px;
  bottom: 13px;
  z-index: 3;
  font-family: var(--ui-sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 224, 210, 0.32);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .fp-graveyard { animation: none; }
  .frontpage[data-state="emergency"] .fp-source .fp-dot { animation: none; }
}

/* ---- small screens ---- */
@media (max-width: 720px) {
  .only-scene { padding: 64px 14px; min-height: 0; }
  .frontpage { padding: 32px 24px 30px; border-radius: 16px; gap: 20px; }
  .fp-headline { font-size: clamp(26px, 8vw, 34px); }
  .fp-masthead { flex-wrap: wrap; gap: 6px; }
}
