:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #17181c;
  --soft: rgba(23, 24, 28, 0.58);
  --faint: rgba(23, 24, 28, 0.36);
  --line: rgba(23, 24, 28, 0.09);
  --accent: #3b5bfd;
  --weak: #d9790b;
  --strong: #1f9d62;
  --tone: var(--faint);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.dp { position: relative; width: min(322px, 100%); padding: 14px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 34px 54px -36px rgba(23, 24, 28, 0.5), 0 10px 18px -14px rgba(23, 24, 28, 0.22); }
.dp[data-level="1"] { --tone: var(--weak); }
.dp[data-level="2"] { --tone: color-mix(in srgb, var(--weak) 45%, var(--strong)); }
.dp[data-level="3"] { --tone: var(--strong); }

.dp__head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.dp__ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--weak) 11%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--weak) 24%, transparent); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.dp__ico svg { width: 22px; height: 22px; fill: none; stroke: var(--weak); stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s ease; }
.dp.is-sent .dp__ico { background: color-mix(in srgb, var(--accent) 10%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.dp.is-sent .dp__ico svg { stroke: var(--accent); }
.dp__name { flex: 1 1 auto; min-width: 0; display: grid; }
.dp__name b { font-size: 14.500px; line-height: 19px; font-weight: 720; letter-spacing: -0.01em; }
.dp__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp__sum { flex: none; font-size: 15px; font-weight: 740; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.dp__due { display: flex; align-items: center; gap: 10px; height: 30px; margin-top: 10px; padding: 0 10px; border-radius: 10px; background: #f4f5f8; font-size: 12px; font-weight: 620; color: var(--ink); }
.dp__dueroll { flex: none; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.dp__dueroll span { display: block; }
/* the time left to answer: the lit part is what remains */
.dp__clock { flex: 1 1 auto; height: 4px; border-radius: 2px; background: rgba(23, 24, 28, 0.1); overflow: hidden; }
.dp__clock i { display: block; height: 100%; border-radius: 2px; background: var(--weak); transform-origin: 0 50%; transition: background-color 0.4s ease; }
.dp.is-sent .dp__clock i { background: var(--accent); }

.dp__list { list-style: none; margin-top: 6px; }
.dp__row { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 2px 0 4px; border-bottom: 1px solid var(--line); }
.dp__row:last-child { border-bottom: 0; }
.dp__what { flex: 1 1 auto; min-width: 0; display: grid; }
.dp__what b { font-size: 13px; line-height: 17px; font-weight: 660; }
.dp__sub { height: 15px; overflow: hidden; font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.dp__sub span { display: block; overflow: hidden; text-overflow: ellipsis; }
.dp__row.is-in .dp__sub { color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 10.500px; font-weight: 600; }
.dp__add { flex: none; width: 30px; height: 30px; border: 0; border-radius: 10px; display: grid; place-items: center; background: #f1f2f6; color: var(--ink); cursor: pointer; outline: none; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.dp__add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.dp__add .pl { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.2s ease; }
.dp__add .ck { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.35s ease 0.1s, opacity 0.1s ease; }
.dp__row.is-in .dp__add { background: color-mix(in srgb, var(--strong) 12%, #ffffff); color: var(--strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--strong) 28%, transparent); }
.dp__row.is-in .dp__add .pl { transform: rotate(90deg) scale(0.4); opacity: 0; }
.dp__row.is-in .dp__add .ck { stroke-dashoffset: 0; opacity: 1; }
.dp__add:disabled { cursor: default; }
.dp__add:focus-visible, .dp__go:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
@media (hover: hover) { .dp__row:not(.is-in) .dp__add:not(:disabled):hover { background: #e7e9ef; } }

.dp__meter { display: flex; align-items: center; gap: 10px; height: 28px; margin-top: 4px; padding: 0 4px; }
.dp__bars { flex: none; display: flex; gap: 3px; }
.dp__bars i { width: 22px; height: 5px; border-radius: 2.500px; background: rgba(23, 24, 28, 0.1); overflow: hidden; position: relative; }
.dp__bars i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--tone); transform: scaleX(var(--f, 0)); transform-origin: 0 50%; transition: background-color 0.4s ease; }
.dp__case { height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; font-weight: 640; color: var(--tone); white-space: nowrap; transition: color 0.4s ease; }
.dp__case span { display: block; }
.dp[data-level="0"] .dp__case { color: var(--soft); }

.dp__go { display: block; width: 100%; height: 44px; margin-top: 6px; border: 0; border-radius: 14px; background: #eef0f4; color: var(--faint); font: inherit; font-size: 13.500px; font-weight: 700; cursor: pointer; outline: none; transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.dp__go:disabled { cursor: default; }
.dp.is-ready .dp__go { background: var(--ink); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 22px -14px rgba(23, 24, 28, 0.7); }
.dp.is-sent .dp__go { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(23, 24, 28, 0.2); }
.dp__gotext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.dp__gotext span { display: block; white-space: nowrap; }
@media (hover: hover) { .dp.is-ready:not(.is-sent) .dp__go:hover { background: #2e3037; } .dp.is-sent .dp__go:hover { background: rgba(23, 24, 28, 0.05); } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17181c; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(23, 24, 28, 0.3)); z-index: 5; }
