/* Owned notebook page: canonical Lecai dimensions, scoped to LPA's available page area. */
.notebook-screen {
  --notebook-frame: var(--color-announcement-text);
  --notebook-line: var(--color-announcement-border);
  --notebook-surface: var(--color-background);
  /* 外層容器半透明，頁面漸層透得出來；筆記卡與輸入區用實心底維持文字對比。 */
  --notebook-panel-surface: color-mix(in srgb, var(--color-background) 36%, transparent);
  --notebook-row-gap-reduction: 0px;
  font-family: var(--font-ui);
  overflow-wrap: anywhere;
}
.notebook-list-screen,
.notebook-editor-screen { display: flex; flex-direction: column; }
.notebook-list-screen { height: 100%; }
.notebook-screen > .page-brand-header { flex-shrink: 0; }
.notebook-screen .page-brand-action { width: var(--page-header-action-width); }
.notebook-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding-inline: calc(var(--page-inline) + var(--safe-inline-start)) calc(var(--page-inline) + var(--safe-inline-end));
  gap: 14px;
}
.notebook-panel {
  min-width: 0;
  border: 1px solid var(--lpa-page-frame-muted);
  border-radius: var(--radius);
  background: var(--notebook-panel-surface);
}
.notebook-toggle {
  display: inline-flex;
  width: var(--page-header-action-width);
  min-width: var(--page-header-action-width);
  height: 24px;
  padding: 2px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #c9ac70;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
@media (hover: hover) { .notebook-toggle:hover { color: var(--color-selected); } }
.notebook-toggle:active { color: #ad915b; }
.notebook-toggle svg { width: 12px; height: 12px; flex: 0 0 12px; }
.notebook-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.notebook-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 8px;
  gap: 6px;
  font-family: var(--font-ui-tc);
}
.notebook-note-actions { display: flex; min-width: 0; flex-shrink: 0; gap: 6px; }
.notebook-note-actions > button {
  display: flex;
  min-width: 0;
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--notebook-line);
  border-radius: var(--radius);
  color: var(--notebook-frame);
  background: var(--notebook-surface);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.notebook-note-actions > .notebook-delete-action { color: #d88a8a; border-color: #773434; background: rgb(54 10 10 / 16%); }
.notebook-delete-action[aria-pressed="true"] { border-color: #d88a8a; }
.notebook-note-actions svg { width: 12px; height: 12px; flex: 0 0 12px; }
.notebook-pagination {
  display: grid;
  width: 100%;
  height: 26px;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--notebook-line);
  border-radius: var(--radius);
  background: var(--notebook-surface);
}
.notebook-pagination button {
  display: grid;
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #e2b64b;
  background: transparent;
}
.notebook-pagination button:disabled { color: #5f574a; }
.notebook-pagination svg { width: 15px; height: 15px; }
.notebook-pagination span { color: #d9ad42; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.notebook-sheet {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 250px;
  padding: 8px;
  flex: 1;
  flex-direction: column;
}
.notebook-watermark {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(260px, 80%);
  height: auto;
  aspect-ratio: 37 / 42;
  transform: translate(-50%, -50%);
  opacity: .1;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 76%);
  pointer-events: none;
}
.notebook-cover-logo { mix-blend-mode: screen; }
.notebook-entry-list {
  --notebook-min-row-gap: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  min-height: 0;
  min-width: 0;
  flex: 1;
  column-gap: 6px;
  row-gap: var(--notebook-fit-row-gap, max(var(--notebook-min-row-gap), calc(14px - var(--notebook-row-gap-reduction))));
  align-content: start;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.notebook-empty { grid-column: 1 / -1; min-height: 0; }
.notebook-entry { display: grid; min-width: 0; padding: 0; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--notebook-line); border-radius: var(--radius); background: var(--panel-surface); }
.notebook-entry[data-selected="true"] { border-color: #d88a8a; }
.notebook-entry-open { display: flex; width: 100%; min-width: 0; padding: 5px 4px 5px 14px; align-items: center; justify-content: space-between; gap: 8px; border: 0; color: inherit; background: transparent; text-align: left; }
.notebook-entry-copy { display: grid; min-width: 0; gap: 6px; }
.notebook-entry-copy strong { overflow: hidden; color: #e9e2d7; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.notebook-entry-time { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 2px; color: var(--color-secondary); font-size: 10px; }
.notebook-entry-time > span { white-space: nowrap; }
.notebook-entry-open > svg { width: 16px; height: 15px; flex-shrink: 0; color: #b9a46d; }
.notebook-selection-check { width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid currentColor; border-radius: var(--radius-sm); color: #d88a8a; }
.notebook-selection-check svg { width: 100%; height: 100%; }
.notebook-editor { display: flex; min-height: 0; padding: 8px 12px 12px; flex: 1 1 auto; flex-direction: column; }
.notebook-editor > header { display: flex; margin-bottom: 8px; align-items: center; justify-content: space-between; }
.notebook-editor > header button { display: flex; min-height: 36px; padding: 0; align-items: center; gap: 3px; border: 0; color: #d8bd74; background: transparent; font-size: 13px; font-weight: 600; }
.notebook-editor > header svg { width: 18px; height: 18px; }
.notebook-editor > input {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  margin-bottom: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--notebook-line);
  border-radius: var(--radius);
  outline: none;
  color: var(--color-secondary);
  background: var(--notebook-surface);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
}
.notebook-editor > textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 330px;
  flex: 1 1 330px;
  padding: 5px 5px 14px;
  border: 1px solid var(--notebook-line);
  border-radius: var(--radius);
  outline: none;
  color: #f0ece4;
  background: var(--notebook-surface);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  resize: none;
}
.notebook-editor > input:focus,
.notebook-editor > textarea:focus { border-color: var(--lpa-page-frame); }
/* Frame, text colour, glow, sparkle layer and bottom light come from the shared gold CTA rules in styles.css. */
.notebook-write-button {
  isolation: isolate;
  min-height: 36px;
  height: auto;
  margin-top: 14px;
  padding: 8px 12px;
  background: var(--cta-glow), linear-gradient(180deg, #17130c, #090805);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: normal;
}
.notebook-notice { padding: 14px; font-size: 13px; line-height: 1.65; }
.notebook-notice p { margin: 0 0 10px; }
.notebook-notice p:last-child { margin-bottom: 0; }
.notebook-compact-action { min-height: 26px; padding: 4px 8px; border: 1px solid var(--notebook-line); border-radius: var(--radius); color: var(--notebook-frame); background: var(--notebook-surface); font-size: 12px; font-weight: 600; }
.notebook-screen button:not(:disabled) { cursor: pointer; }
@media (hover: hover) { .notebook-screen :is(.notebook-body, .notebook-controls) button:not(:disabled):hover { filter: brightness(1.12); } }
.notebook-screen :is(.notebook-body, .notebook-controls) button:not(:disabled):active { filter: brightness(.9); }
.notebook-screen button:focus-visible { outline: 2px solid var(--color-selected); outline-offset: -2px; }
.notebook-screen button:disabled { cursor: default; opacity: .55; }
@media (max-width: 359px) {
  .notebook-entry-open { padding-left: 4px; gap: 2px; }
}
@media (max-width: 300px) {
  .notebook-note-actions > button { padding-inline: 4px; gap: 2px; font-size: 9px; }
  .notebook-pagination span { font-size: 10px; }
}
