:root {
  --paper: #f5f2ec;      /* the warm white page */
  --card: #fffdf9;       /* the app card and the rows */
  --ink: #1b1a17;        /* names and titles */
  --muted: #8a857b;      /* subjects and times */
  --line: #ebe6dc;       /* the hairlines between rows */
  --accent: #e2552d;     /* the single accent: the new count and the hints */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: min(14px, 2.4vh);
  padding: 2vh 16px;
}

.app {
  width: min(340px, 90vw);
  height: min(520px, 80vh);
  background: var(--card);
  border-radius: min(26px, 4.4vh);
  border: 1px solid #e9e3d8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(40, 30, 10, .05), 0 18px 40px -18px rgba(40, 30, 10, .22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app__head {
  padding: min(18px, 3vh) 20px min(10px, 1.6vh);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 3;
  background: var(--card);
}

.app__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.app__brand svg { width: 14px; height: 14px; }

.app__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: min(8px, 1.3vh);
}

.app__title h1 {
  font-size: min(26px, 4.6vh);
  font-weight: 640;
  font-stretch: 92%;
  letter-spacing: -.02em;
}

.app__new {
  font: 600 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 99px;
  padding: 5px 9px;
}

.view {
  position: relative;
  flex: 1;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.view.is-dragging { cursor: grabbing; }

.list {
  list-style: none;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  height: min(60px, 9.6vh);
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  will-change: transform;
}

.ava {
  width: min(36px, 5.8vh);
  height: min(36px, 5.8vh);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  color: #6f6a60;
  background: linear-gradient(180deg, #f3efe7, #e9e3d7);
  box-shadow: 0 0 0 1px rgba(60, 45, 20, .06) inset;
}

.txt { min-width: 0; display: grid; gap: 2px; }

.txt b {
  font-size: min(14px, 2.4vh);
  font-weight: 520;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txt span {
  font-size: min(13px, 2.2vh);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.is-new .txt b { font-weight: 700; }
.is-new .txt span { color: #4d4941; }

time {
  font: 500 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  color: var(--muted);
}

.is-new time { color: var(--ink); }

.hint {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 500 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  letter-spacing: .04em;
  color: var(--muted);
  opacity: 0;
}

.hint svg { width: 14px; height: 14px; color: var(--accent); }
.hint--top { top: 0; }
.hint--bottom { bottom: 0; }

.note {
  font: 500 11px/1 "JetBrains Mono Variable", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .list, .row { will-change: auto; }
}
