/* The notes screen. Colors and fonts come from style.css. */
[hidden] { display: none !important; }
.notes-page { font-size: 17px; }
.shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100dvh;
}
.side {
  border-right: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 16px) 16px 24px;
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.side-head { display: flex; align-items: center; gap: 12px; }
.side-head h1 { flex: 1; margin: 0; font: 600 28px/1.1 var(--serif); }
.back-home { color: var(--soft); text-decoration: none; font-size: 15px; }
.back-home:hover { color: var(--ink); }

button { font: inherit; cursor: pointer; }
.primary {
  border: 0; border-radius: 999px;
  padding: 8px 16px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.primary.small { padding: 6px 12px; font-size: 15px; }
.link {
  border: 0; background: none; padding: 6px 4px;
  color: var(--accent); font-weight: 600;
}
.link.danger { color: var(--soft); }
.link.danger:hover { color: var(--accent); }
.primary:focus-visible, .link:focus-visible, .item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#show-deleted { align-self: flex-start; font-size: 15px; color: var(--soft); }

.search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font: inherit;
}
.search:focus { outline: 2px solid var(--accent); border-color: transparent; }

.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.item {
  display: block; width: 100%; text-align: left;
  border: 0; border-radius: 10px;
  padding: 10px 12px;
  background: transparent; color: var(--ink);
}
.item:hover { background: var(--card); }
.item.on { background: var(--accent-soft); }
.item-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-when { display: block; color: var(--soft); font-size: 14px; }

.pane {
  max-width: 760px; width: 100%;
  margin: 0;
  padding: calc(env(safe-area-inset-top) + 16px) 32px 40px;
  min-width: 0;
}
.pane-bar { display: flex; align-items: center; flex-wrap: wrap; column-gap: 12px; min-height: 40px; }
.pane-bar .link { white-space: nowrap; }
.status { flex: 1; color: var(--soft); font-size: 14px; }
.title {
  width: 100%; margin-top: 8px;
  border: 0; background: none; color: var(--ink);
  font: 600 32px/1.2 var(--serif);
}
.title:focus, .body:focus { outline: none; }
.body {
  width: 100%; min-height: 60vh; margin-top: 12px;
  border: 0; background: none; color: var(--ink); resize: vertical;
  font: 400 18px/1.6 var(--sans);
}
.read { margin-top: 12px; font-size: 18px; line-height: 1.6; }
.read h2, .read h3, .read h4 { font-family: var(--serif); text-transform: none; letter-spacing: 0; color: var(--ink); margin: 1.2em 0 .4em; }
.read h2 { font-size: 26px; } .read h3 { font-size: 22px; } .read h4 { font-size: 19px; }
.pane-h { font: 600 26px/1.2 var(--serif); text-transform: none; letter-spacing: 0; color: var(--ink); margin: 8px 0 4px; }
.hint { color: var(--soft); margin: 0 0 16px; font-size: 15px; }
.deleted-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.deleted-item > div { min-width: 0; }
.pane-empty { margin-top: 30vh; text-align: center; }
.only-phone { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .link { color: var(--accent-soft); }

/* Phone: the list, or one note, never both. */
@media (max-width: 699px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; }
  .pane { padding: calc(env(safe-area-inset-top) + 12px) 16px 40px; }
  .shell.open .side { display: none; }
  .shell:not(.open) .pane { display: none; }
  .only-phone { display: inline; }
  .title { font-size: 26px; }
}

/* Tasks in Read (B6): a box she can tick. */
.read li.task { list-style: none; margin-left: -1.3em; }
.read li.task input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--accent); cursor: pointer; }
.read li.task.done span { text-decoration: line-through; color: var(--soft); }

/* A page read as a checklist ("bring over what worked", from the Ship Board
   and the Salon's full-loop page): each heading says how many of its tasks
   are done; a ticked task hides until Show done, and the line at the top
   says what was ticked, with Undo. */
.read .steps-count { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--soft); white-space: nowrap; }
.read.steps:not(.show-done) li.task.done { display: none; }
.read .steps-bar { margin: 0 0 8px; text-align: right; }
.read .just-ticked { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); }
.read .steps-bar .link, .read .just-ticked .link { min-height: 44px; }
