/* ============================================================
   9. Modal — early-2000s message-board style input form
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-page);
  border: 4px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 10px 0 var(--ink);
  animation: modal-pop 0.15s ease-out;
}
/* Wider variant for modals that list many rows (e.g. assigning sections
   to every existing goal at once). */
.modal-box--wide { width: min(720px, 100%); }

/* Year-retirement popup — shown when winter rolls into spring so the
   user can close out the wheel year that just ended. */
.year-retire .year-retire-lede {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 14px;
  color: var(--ink);
}
.year-retire .modal-hint {
  font-style: italic;
  color: var(--ink);
  font-weight: normal;
}

/* "Take a quick tour" affordance at the bottom of the welcome modal —
   small, quiet link-style button so it doesn't compete with the primary
   "Welcome [year]" action, but is easy to find if you want the tour. */
.year-retire-tutorial {
  display: block;
  margin: 12px auto 0;
  padding: 6px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed var(--ink);
  cursor: pointer;
}
.year-retire-tutorial:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Tutorial modal — multi-step "quick tour" opened from the welcome
   modal. Each step is a title + icon + short body with dot indicators
   showing progress. */
.tutorial-modal .tutorial-body { padding-top: 6px; }
.tutorial-step {
  text-align: center;
  padding: 16px 8px 10px;
}
.tutorial-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
  line-height: 1;
}
.tutorial-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--ink);
}
.tutorial-text {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 auto;
  max-width: 420px;
}
.tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 8px;
}
.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--ink);
  opacity: 0.5;
}
.tutorial-dot.is-on { background: var(--ink); opacity: 1; }

/* "Pick 6 books for the home shelf" picker — scrollable checkbox list
   where each row shows a color swatch + title + type. */
.featured-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 40vh;
  overflow-y: auto;
  margin: 10px 0;
  padding: 4px 2px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: rgba(255,255,255,0.4);
}
.featured-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 3px;
}
.featured-picker-row:hover { background: rgba(0,0,0,0.05); }
.featured-picker-swatch {
  width: 18px;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  flex-shrink: 0;
}
.featured-picker-title {
  flex: 1;
  font-weight: 600;
}
.featured-picker-type {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}
.modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Subcategory assignment modal — rows of goal text + section <select>,
   grouped by domain. */
.assign-domain { margin-bottom: 18px; }
.assign-domain:last-child { margin-bottom: 0; }
.assign-domain h3 {
  font-family: 'Pixelify Sans', sans-serif;
  margin: 0 0 8px;
  font-size: 1rem;
  padding: 0 0 4px;
  border-bottom: 1.5px dashed var(--ink);
}
.assign-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.assign-goal-text {
  font-size: 0.95rem;
}

@keyframes modal-pop {
  from { transform: translateY(6px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 10px 14px;
}

.modal-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  display: inline-block;
  background-color: var(--bg-page);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 4px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}

.modal-close {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  background: var(--bg-page);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 3px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  padding: 0;
  box-shadow: 2px 2px 0 var(--ink);
}
.modal-close:hover { background: var(--highlight); }

.modal-body {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 0.04em;
  display: inline-block;
  align-self: flex-start;
  background-color: var(--highlight);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 3px 10px;
  box-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 2px;
}

.modal-input,
.modal-select,
.modal-textarea {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--highlight);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: 3px 3px 0 var(--ink);
  outline: none;
}
.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
  box-shadow: 4px 4px 0 var(--ink);
}

.modal-textarea {
  min-height: 160px;
  line-height: 1.55;
  resize: vertical;
}

.modal-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.modal-submit {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 8px 18px;
  min-height: 42px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  letter-spacing: 0.03em;
  transition: box-shadow 140ms ease, transform 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-submit:hover {
  background: var(--highlight);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.modal-submit:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.modal-submit.is-danger {
  background: #e09090;
  color: #3a2432;
}
.modal-submit.is-danger:hover {
  background: #d06868;
  color: #fff;
}

.modal-message {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.45;
}

.modal-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
}

.modal-subfield {
  margin-top: 10px;
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.pill.is-on {
  background: var(--accent);
  color: var(--ink);
}

.weekday-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weekday-chip {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 42px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.weekday-chip.is-on {
  background: var(--accent);
}

.monthday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.monthday-chip {
  min-width: 0;
  font-size: 0.75rem;
  padding: 6px 4px;
}

/* --- Ideas jar shelf on home --- */
.shelf--jar .shelf-label {
  position: relative;
  top: -16px;
}
.shelf--jar .ideas-jar {
  position: relative;      /* anchor the "ideas" label above */
  display: flex;
  align-items: flex-end;   /* bottom-align so the jar touches the plank */
  gap: 10px;
  cursor: pointer;
  padding: 0 14px;
  border-radius: 8px;
  align-self: flex-end;    /* hug the shelf-row's bottom edge */
  margin-top: 22px;        /* leave room for the "ideas" label above */
  margin-bottom: -2px;     /* overlap the plank exactly like .book / .shelf-door */
  transition: transform 160ms ease;
}
/* Tiny wooden sign above the jar, matches the scroll's "archive" sign
   so the two shelf objects read as a matched pair. */
.ideas-jar-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 1px 8px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.shelf--jar .ideas-jar-count {
  padding-bottom: 10px;    /* keep the "N ideas" text floating above the plank */
}
.shelf--jar .ideas-jar:hover {
  transform: translateY(-3px);
}

/* Scroll with ribbon sitting next to the Ideas Jar — opens the archive
   of retired life-domain notes. Parchment tube with two darker caps and
   a tied ribbon in the middle. Same pixel chrome as the surrounding
   shelf decor so it blends in. */
.shelf--jar .notes-scroll {
  position: relative;
  width: 96px;
  height: 28px;
  align-self: flex-end;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 22px;     /* leave room for the "archive" label above */
  margin-bottom: 0;
  transition: transform 160ms ease;
}
.shelf--jar .notes-scroll:hover { transform: translateY(-3px); }
.shelf--jar .notes-scroll:hover .notes-scroll-body {
  filter: brightness(1.04);
  box-shadow: 3px 3px 0 var(--ink);
}
.shelf--jar .notes-scroll:active { transform: translateY(1px); }

.notes-scroll-body {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 4px;
  bottom: 4px;
  background: linear-gradient(#f3e3bf, #e3cf9c);
  border: 2px solid var(--ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--ink);
  transition: box-shadow 160ms ease, filter 160ms ease;
}
.notes-scroll-cap {
  position: absolute;
  top: 0;
  width: 14px;
  height: 100%;
  background: #a8855a;
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
}
.notes-scroll-cap--left  { left: 0; }
.notes-scroll-cap--right { right: 0; }
.notes-scroll-ribbon {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 10px;
  transform: translateX(-50%);
  background: #c14d4d;
  border: 2px solid var(--ink);
  border-radius: 2px;
  z-index: 1;
}
/* Desk calendar — pixel icon on the bottom shelf that opens the
   day-view archive of every saved Today's Page. Styled to match the
   ideas jar / scroll idiom: ink border + hard drop shadow + a small
   wooden-sign label hovering above. Shows the real current month/day
   on its face so it reads as alive. */
.desk-calendar {
  position: relative;
  width: 40px;
  height: 50px;
  align-self: flex-end;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 6px 0 4px;
  z-index: 2;
  transition: transform 160ms ease;
}
/* Faint second page peeking out behind the top sheet — gives the
   calendar a stack-of-pages feel to match how the pen cup reads as
   dimensional rather than flat. */
.desk-calendar::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 0;
  top: 8px;
  bottom: -2px;
  background: #f1e5c8;
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
  z-index: -1;
}
.desk-calendar:hover { transform: translateY(-3px); }
.desk-calendar:hover .desk-calendar-body {
  filter: brightness(1.04);
  box-shadow: 3px 3px 0 var(--ink);
}
.desk-calendar:active { transform: translateY(1px); }

.desk-calendar-body {
  position: absolute;
  inset: 6px 2px 0;
  background: #fdf6e6;
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
  overflow: hidden;
  transition: box-shadow 160ms ease, filter 160ms ease;
}
/* The red tear-off header strip across the top of the page. */
.desk-calendar-spine {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  background: var(--calendar-spine, #c14d4d);
  border-bottom: 2px solid var(--ink);
}
.desk-calendar-month {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 10px;
  line-height: 10px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  text-align: center;
}
.desk-calendar-day {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
/* Tiny wooden sign above the calendar — same idiom as "ideas" / "archive". */
.desk-calendar-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 1px 8px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Tiny wooden sign above the scroll, matching the style of the home
   shelf labels so the scroll reads as clearly as "Ideas Jar" does. */
.notes-scroll-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--ink);
  padding: 1px 8px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* When a whole archive row is clickable (days archive), give it a
   hover affordance so it reads as a button, not static text. */
.notes-archive-row[data-open-day] { cursor: pointer; }
.notes-archive-row[data-open-day]:hover { background: rgba(0,0,0,0.03); }

/* Header row inside each archived-note card: domain chip + date. */
.notes-archive-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.notes-archive-text {
  margin: 0;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------
   Archived notes page — collapsible season groups. Uses native
   <details>/<summary> so toggling is free and keyboard-accessible.
   Current season expands by default (see renderNotesArchive).
   ------------------------------------------------------------ */
.notes-archive-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}
.notes-archive-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* --- Days-archive month calendar --- */
.days-calendar {
  margin: 16px 0 8px;
  padding: 14px;
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--ink);
}
.days-calendar-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.days-calendar-label {
  flex: 1;
  text-align: center;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.15rem;
  color: var(--ink);
}
.days-calendar-today { margin-left: auto; }
.days-calendar-grid-head,
.days-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.days-calendar-grid-head { margin-bottom: 4px; }
.cal-weekday {
  text-align: center;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 2px 0;
}
.cal-cell {
  position: relative;
  min-height: 42px;
  padding: 4px 6px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--bg-page);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.9rem;
  transition: transform 0.08s ease;
}
.cal-cell--pad {
  border-color: transparent;
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.cal-cell:hover { filter: brightness(0.97); }
.cal-cell:active { transform: translate(1px, 1px); }
.cal-cell.is-today {
  outline: 2px dashed var(--ink);
  outline-offset: 2px;
}
/* Softer ring than today — shows where the user just was without
   competing with the "you are here today" cue. */
.cal-cell.is-last-visited {
  box-shadow: inset 0 0 0 2px var(--ink-soft, #b8a382);
}
.cal-cell.is-future {
  opacity: 0.55;
}
.cal-cell-num { display: block; }

/* User-marked cell: solid fill from the chosen color, border stays ink.
   Symbol rendered in the bottom-right corner. */
.cal-cell.is-marked {
  background: var(--mark-color, var(--bg-page));
}
.cal-cell-mark {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1;
}

/* --- "Mark a day" modal --- */
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.modal-field-label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.mark-symbol-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.mark-symbol-pill {
  font-size: 1rem;
  padding: 4px 8px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--bg-page);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.mark-symbol-pill:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.mark-symbol-pill.is-selected {
  background: var(--ink);
  color: var(--bg-page);
}
.mark-color {
  width: 60px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}
.mark-symbol-custom {
  max-width: 160px;
}
.notes-archive-group {
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--ink);
  overflow: hidden;
}
.notes-archive-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}
.notes-archive-summary::-webkit-details-marker { display: none; }
.notes-archive-summary::before {
  content: "▸";
  font-size: 0.9rem;
  margin-right: 4px;
  transition: transform 0.15s ease;
  display: inline-block;
}
.notes-archive-group[open] > .notes-archive-summary::before {
  transform: rotate(90deg);
}
.notes-archive-summary:hover { background: var(--highlight); }
.notes-archive-season {
  flex-grow: 1;
}
.notes-archive-count {
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--bg-page);
  border: 1px solid var(--ink-soft);
  border-radius: 999px;
  padding: 1px 8px;
}
.notes-archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px 14px;
  border-top: 1px dashed var(--ink-soft);
}
.notes-archive-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--ink-soft);
  border-radius: 4px;
  background: rgba(255,255,255,0.4);
}
.notes-archive-body {
  flex: 1;
  min-width: 0;
}
.notes-archive-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
/* Pure-CSS cookie jar — three stacked pieces: a little knob on top,
   a domed lid, and a wide rounded body with a dashed "cookies" band
   and a heart. The body's glass uses --bg-page so it reads as cream
   on whatever seasonal background is behind it. */
.ideas-jar-icon {
  /* --jar-lid and --jar-body cascade from #app[data-season="…"] so the
     jar breathes with the seasonal palette; user customs win via
     applyCustomPalettes. Defaults live in palette.css. */
  position: relative;
  width: 66px;
  height: 72px;
  flex-shrink: 0;
  font-size: 0;
  display: block;
  zoom: 1.2;              /* 20% up */
}
.ideas-jar-knob {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--jar-lid);
  border: 2px solid var(--ink);
  border-radius: 50%;
  z-index: 3;
}
.ideas-jar-lid {
  position: absolute;
  top: 6px;
  left: 0;
  width: 66px;
  height: 19px;
  background: var(--jar-lid);
  /* 2px on three sides, 1px at the seam where the lid meets the body
     so the rim reads as a single line instead of a doubled-up border. */
  border: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 33px 33px 4px 4px;
  box-shadow: inset -5px 0 0 rgba(0,0,0,0.2);
  z-index: 2;
}
.ideas-jar-body {
  position: absolute;
  top: 25px;
  left: 0;
  width: 66px;
  height: 47px;
  background: var(--jar-body);
  /* 2px on three sides, 1px at the bottom so the jar reads as flush
     with the shelf plank (same trick as .book and .shelf-door). */
  border: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 6px 6px 16px 16px;
  box-shadow: inset -6px 0 0 rgba(0,0,0,0.1);
}
.ideas-jar-body::after {
  /* A little cloud floating inside the jar */
  content: '\2601';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.ideas-jar-count {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  font-style: italic;
}
.ideas-jar-add {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 8px;
  align-self: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.ideas-jar-add:hover {
  background: var(--highlight);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Compact vertical stack for shelf-end action buttons (new + archive)
   so they read as one tidy pair instead of sprawling side-by-side. */
.shelf-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: center;
  margin-left: 8px;
  flex-shrink: 0;
}
.shelf-btn-stack .ideas-jar-add {
  margin-left: 0;
  padding: 4px 10px;
  font-size: 0.78rem;
  min-width: 92px;
  text-align: center;
}

/* --- Ideas jar modal list --- */
.ideas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.idea-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.idea-text {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.4;
}
.idea-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* --- "what do you intend?" bottom section on Today's Page --- */
.today-intend {
  margin-top: 24px;
  padding: 18px 16px;
  border-top: 2px dashed var(--ink);
}
.today-intend-prompt {
  margin: 0 0 10px;
  text-align: center;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.today-intend-input {
  width: 100%;
  min-height: 70px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--bg-page);
  resize: vertical;
  box-sizing: border-box;
}
.today-intend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.today-subsection {
  margin-bottom: 16px;
}

.date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.date-range .modal-input {
  flex: 1;
  min-width: 130px;
}
.modal-label-inline {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.today-subsection-title {
  margin: 0 0 8px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 4px;
}

.modal-cancel,
.modal-add-idea {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg-page);
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  padding: 8px 16px;
  min-height: 42px;
  box-shadow: 2px 2px 0 var(--ink);
  letter-spacing: 0.03em;
  transition: box-shadow 140ms ease, transform 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-cancel:hover,
.modal-add-idea:hover {
  background: var(--highlight);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.modal-cancel:active,
.modal-add-idea:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}


/* ==========================================================
   Mobile — modals + decorative shelf jar/scroll/calendar
   + the days-archive calendar grid.
   ========================================================== */
@media (max-width: 480px) {
  .modal-overlay { padding: 8px; }
  .modal-box { max-width: none; width: 100%; }
  .modal-header { padding: 12px 14px; }
  .modal-body { padding: 14px; }
  .modal-footer {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-footer button { flex: 1; min-height: 40px; }
  .modal-submit, .modal-cancel { padding: 10px 14px; }

  /* Assignment row: stack label over select so the select fills the row. */
  .assign-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
  }
  .assign-row select { width: 100%; }

  /* Pills wrap inside forms. */
  .pill-group { flex-wrap: wrap; gap: 4px; }
  .pill { min-height: 36px; }

  /* Days-archive calendar: slightly smaller cells. */
  .days-calendar { padding: 0 4px; }
  .days-calendar-topbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .cal-cell {
    min-height: 36px;
    padding: 2px 4px;
    font-size: 0.78rem;
  }
  .cal-weekday { font-size: 0.7rem; }

  /* Desk calendar stays its size, but the wooden labels above shelf
     decor can hide to save vertical space. */
  .ideas-jar-label, .notes-scroll-label, .desk-calendar-label {
    font-size: 0.65rem;
    padding: 0 6px;
  }
}

