@font-face {
  font-family: Lato;
  src: url("./Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("./Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #171a1e;
  --panel: #24282d;
  --input: #1d2227;
  --ink: #ece8df;
  --muted: #b1b8be;
  --line: #424b53;
  --accent: #d4aa64;
  --accent-hover: #e0ba7c;
  --danger: #f1aaa5;
  --radius: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Lato,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
textarea,
select,
summary {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  transition:
    background 140ms var(--ease),
    transform 140ms var(--ease);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
textarea,
input {
  caret-color: var(--accent);
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sprite {
  display: none;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app {
  max-width: 1200px;
  margin: auto;
  padding: 28px 40px 24px;
}
.course-back {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  min-height: 30px;
  margin-bottom: 15px;
}
.course-back svg {
  width: 15px;
  height: 15px;
}
.course-back:hover {
  color: var(--ink);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiet,
.export-menu > summary {
  border: 1px solid var(--line);
  background: transparent;
}
.quiet:hover,
.export-menu > summary:hover {
  background: #30363d;
}
.primary {
  background: var(--accent);
  color: #201a12;
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.primary:disabled {
  background: #41484f;
  color: #b0b7bd;
  opacity: 0.65;
}
.text-button {
  padding: 5px 7px;
  min-height: 40px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 400;
  font-size: 14px;
}
.text-button:hover {
  color: var(--ink);
  background: #2b3137;
}
.film-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.film-heading h2 {
  font-size: 28px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.film-heading p {
  color: var(--muted);
  margin-top: 5px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.96fr) minmax(0, 1.94fr);
  gap: 16px;
}
.timer-panel,
.composer,
.notes-section {
  background: var(--panel);
  border-radius: var(--radius);
}
.timer-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.muted {
  color: var(--muted);
}
.clock {
  font-size: clamp(38px, 4.25vw, 58px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 12px 0 14px;
  white-space: nowrap;
}
.timer-status {
  font-size: 19px;
  margin-bottom: 18px;
}
.film-runtime {
  margin: -6px 0 14px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.timer-button {
  width: 100%;
  font-size: 18px;
  min-height: 52px;
}
.timer-button svg {
  width: 18px;
  height: 18px;
}
.timer-button [href="#i-play"] {
  fill: currentColor;
  stroke: none;
}
.sync-button {
  align-self: center;
  margin: 4px 0 12px;
}
.timer-help {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 15px;
}
.period-row {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  margin-top: auto;
  padding-top: 26px;
  color: var(--muted);
  font-size: 14px;
}
.composer {
  padding: 24px;
  min-width: 0;
}
.composer-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.composer-heading label {
  font-size: 20px;
  font-weight: 700;
}
.draft-time {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  resize: vertical;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px 18px;
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
textarea::placeholder,
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.small {
  font-size: 13px;
}
#draft-status {
  min-height: 20px;
  margin-top: 8px;
}
.composer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
.kinds label {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.kinds input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  margin: 0;
}
.save-actions {
  display: flex;
  gap: 6px;
}
.mark-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.shortcut {
  font-size: 12px;
  color: var(--muted);
}
.notes-section {
  margin-top: 16px;
  padding: 24px;
}
.notes-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 8px;
}
.notes-heading h2 {
  font-size: 20px;
}
.count {
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
  margin-left: 7px;
}
.filters {
  display: flex;
  gap: 4px;
}
.filters button {
  font-size: 13px;
  min-height: 40px;
  padding: 6px 12px;
  font-weight: 400;
  color: var(--muted);
}
.filters button[aria-pressed="true"] {
  background: #343b43;
  color: var(--ink);
}
.empty {
  padding: 32px 10px;
  text-align: center;
  color: var(--muted);
}
.empty span {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}
.notes-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.note {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.note:first-child {
  margin-top: 12px;
}
.note-time {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  color: var(--ink);
}
.note-period {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.note-tag {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.note-actions {
  display: flex;
  gap: 2px;
}
.note-actions button {
  font-size: 13px;
  min-height: 40px;
  padding: 5px 9px;
  color: var(--muted);
  font-weight: 400;
}
.note-actions button:hover {
  background: #353c43;
  color: var(--ink);
}
.note.is-marked .note-text {
  color: var(--muted);
  font-style: italic;
}
.note.just-added {
  animation: added 0.6s var(--ease);
}
@keyframes added {
  from {
    background: #4a4130;
  }
  to {
    background: transparent;
  }
}
.how-to {
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}
.how-to summary {
  min-height: 44px;
  display: list-item;
  padding: 10px 0;
  width: fit-content;
  text-underline-offset: 3px;
}
.how-to div {
  max-width: 74ch;
  padding: 10px 0;
}
.how-to p + p {
  margin-top: 12px;
}
.how-to strong {
  color: var(--ink);
}
.viewing-guide {
  margin: 16px 0 0;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.viewing-guide summary {
  width: auto;
  padding: 12px 0;
  color: var(--ink);
  font-weight: 700;
}
.guide-hint {
  margin-left: 10px;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  white-space: nowrap;
}
.viewing-guide > div {
  max-width: none;
  padding: 0 0 16px;
}
.guide-context {
  color: var(--accent);
  font-weight: 700;
}
.viewing-guide p + p {
  margin-top: 4px;
}
.viewing-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}
.viewing-prompts strong,
.viewing-prompts span {
  display: block;
}
.viewing-prompts strong {
  margin-bottom: 2px;
}
.guide-discussion {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.central-question {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}
.discussion-steps {
  display: grid;
  gap: 12px;
  padding-left: 24px;
  margin: 16px 0 0;
  max-width: 78ch;
}
@media (max-width: 600px) {
  .viewing-prompts {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 2px;
}
.export-menu {
  position: relative;
}
.export-menu > summary {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  list-style: none;
}
.export-menu > summary::-webkit-details-marker {
  display: none;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 255px;
  background: #30363d;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 35px #0007;
  z-index: 5;
}
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-weight: 400;
  font-size: 14px;
}
.menu button:hover {
  background: #424b53;
}
dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  padding: 26px;
  box-shadow: 0 20px 65px #0009;
}
dialog::backdrop {
  background: #090c10b8;
}
dialog p {
  margin-bottom: 18px;
  color: var(--muted);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 24px;
}
.icon-button {
  width: 44px;
  height: 44px;
  padding: 8px;
  color: var(--muted);
}
.icon-button:hover {
  background: #353c43;
  color: var(--ink);
}
dialog label {
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}
dialog input,
dialog select {
  display: block;
  width: 100%;
  height: 47px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 18px;
}
dialog input[type="number"] {
  max-width: 140px;
}
.form-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 20px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.notebooks-list {
  margin-bottom: 24px;
  max-height: 50vh;
  overflow: auto;
}
.notebook-choice {
  display: block;
  text-align: left;
  width: 100%;
  padding: 15px 12px;
  border-radius: 7px;
  font-weight: 400;
}
.notebook-choice:hover {
  background: #353c43;
}
.notebook-choice[aria-current="true"] {
  background: #363d44;
}
.notebook-choice strong,
.notebook-choice span {
  display: block;
  overflow-wrap: anywhere;
}
.notebook-choice span {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.error {
  color: var(--danger);
}
.warning {
  background: #443528;
  border: 1px solid #9c7845;
  padding: 15px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.warning p {
  margin-bottom: 8px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  background: #e8e3d8;
  color: #22272b;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 28px #0005;
  z-index: 20;
  font-size: 14px;
}
.toast button {
  color: #22272b;
  text-decoration: underline;
  min-height: 30px;
  padding: 2px 4px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #5a636d var(--bg);
}
@media (min-width: 1600px) {
  .app {
    padding-top: 40px;
  }
  .clock {
    font-size: 58px;
  }
}
@media (max-width: 760px) {
  .app {
    padding: 18px 20px 24px;
  }
  .course-back {
    margin-bottom: 12px;
  }
  .app-header {
    margin-bottom: 24px;
    gap: 10px;
  }
  h1 {
    font-size: 30px;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions .quiet,
  .export-menu > summary {
    width: 44px;
    padding: 10px;
  }
  .header-actions span {
    display: none;
  }
  .film-heading {
    display: block;
    margin-bottom: 18px;
  }
  .film-heading h2 {
    font-size: 23px;
  }
  .film-heading p {
    font-size: 14px;
  }
  .film-heading > .text-button {
    margin-left: -7px;
    margin-top: 5px;
    min-height: 34px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .timer-panel {
    padding: 20px;
  }
  .clock {
    font-size: 44px;
    margin: 7px 0 8px;
  }
  .timer-status {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .timer-button {
    min-height: 48px;
  }
  .sync-button {
    margin-bottom: 4px;
  }
  .timer-help {
    font-size: 13px;
    padding-top: 12px;
  }
  .period-row {
    padding-top: 9px;
  }
  .composer {
    padding: 20px;
  }
  textarea {
    min-height: 130px;
    font-size: 16px;
  }
  .composer-controls {
    align-items: stretch;
  }
  .kinds {
    flex: 1;
  }
  .kinds label {
    font-size: 13px;
    padding: 8px 9px;
  }
  .save-actions {
    width: 100%;
    margin-top: 6px;
  }
  .save-actions > .primary {
    flex: 1;
  }
  .mark-row {
    margin-top: 12px;
  }
  .mark-row > .quiet {
    width: 100%;
  }
  .shortcut {
    display: none;
  }
  .notes-section {
    padding: 20px;
    margin-top: 12px;
  }
  .notes-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters button {
    padding: 5px 10px;
  }
  .note {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 0;
  }
  .note-time {
    font-size: 15px;
  }
  .note-actions {
    grid-column: 2;
    justify-self: end;
  }
  .note-text {
    font-size: 15px;
  }
  .note-tag {
    margin-top: 7px;
  }
  .empty {
    padding: 24px 4px;
  }
  .empty span {
    font-size: 12px;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  footer .text-button {
    margin-left: -7px;
  }
  .form-row {
    gap: 12px;
  }
  dialog {
    padding: 20px;
  }
  .toast {
    bottom: 16px;
    width: max-content;
  }
  .how-to {
    margin: 16px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .app {
    padding: 0;
  }
  .workspace,
  .header-actions,
  .course-back,
  .film-heading > button,
  .filters,
  .note-actions,
  footer,
  .how-to,
  .toast {
    display: none;
  }
  .notes-section {
    background: transparent;
  }
  .note-text,
  .note-time,
  .note-period,
  .film-heading p {
    color: black;
  }
  .notes-list .note {
    break-inside: avoid;
  }
  .note {
    border-color: #999;
  }
  h1 {
    font-size: 24px;
  }
  .film-heading h2 {
    font-size: 20px;
  }
}

.note-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.marked-text {
  color: var(--muted);
  font-style: italic;
}
@media (max-width: 760px) {
  .app {
    padding-top: 16px;
  }
  .course-back {
    min-height: 24px;
    margin-bottom: 8px;
  }
  .app-header {
    margin-bottom: 18px;
  }
  .film-heading {
    margin-bottom: 12px;
  }
  .film-heading > .text-button {
    margin-top: 0;
    min-height: 30px;
  }
  .timer-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    column-gap: 10px;
    padding: 16px;
  }
  .timer-panel > .muted {
    grid-column: 1/-1;
    font-size: 14px;
  }
  .clock {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(28px, 8vw, 36px);
    margin: 5px 0;
  }
  .timer-status {
    grid-column: 1;
    grid-row: 4;
    font-size: 14px;
    margin: 0;
    align-self: center;
  }
  .timer-button {
    grid-column: 2;
    grid-row: 2;
    min-height: 44px;
    font-size: 14px;
    padding: 8px;
    gap: 6px;
  }
  .sync-button {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
    padding: 4px;
  }
  .film-runtime {
    grid-column: 1/-1;
    grid-row: 3;
    margin: 0 0 6px;
  }
  .timer-help {
    grid-column: 1/-1;
    margin-top: 8px;
    padding-top: 8px;
    font-size: 13px;
  }
  .period-row {
    grid-column: 1/-1;
    padding-top: 2px;
  }
  .composer {
    padding: 16px;
  }
  .composer-heading {
    margin-bottom: 10px;
  }
  .composer-heading label {
    font-size: 18px;
  }
  textarea {
    height: 108px;
    min-height: 108px;
  }
  .composer-controls {
    margin-top: 10px;
  }
  .mark-row {
    margin-top: 10px;
  }
  .kinds label {
    min-height: 40px;
  }
}
