:root {
  color-scheme: light;
  --ink: #28241f;
  --muted: #726c64;
  --line: #e3dfd5;
  --paper: #f7f5ef;
  --orange: #e96b32;
  font:
    16px/1.55 Inter,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  border: 0;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #f48b52;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.65;
  cursor: default;
}
header {
  border-bottom: 1px solid var(--line);
}
nav,
main {
  width: min(1184px, calc(100% - 80px));
  margin: auto;
}
nav {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.07em;
}
.brand i {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #28241f;
  transform: rotate(-5deg);
}
.brand b {
  width: 4px;
  border-radius: 1px;
  background: #ffa673;
  height: 12px;
  transform: skew(-16deg);
}
.brand b:nth-child(2) {
  height: 18px;
}
.brand b:last-child {
  height: 9px;
}
.nav-divider {
  width: 1px;
  height: 18px;
  background: #d6d0c4;
}
.nav-link,
.back {
  font-size: 14px;
  text-decoration: none;
  color: #625a50;
}
.nav-link {
  background: none;
  padding: 5px 0;
}
.nav-link:hover,
.back:hover {
  text-decoration: underline;
}
nav time {
  margin-left: auto;
  color: #6e675f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
main {
  padding: 28px 0 18px;
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  letter-spacing: -0.045em;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: #251b18 url('hourglass.webp') right center/auto 100% no-repeat;
  color: #fff8ef;
  min-height: 330px;
  display: flex;
  align-items: center;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #201816 0%,
    #201816 47%,
    rgba(32, 24, 22, 0.76) 55%,
    transparent 82%
  );
}
.hero-body {
  padding: 32px 44px;
  width: min(59%, 560px);
}
.hero-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}
.hero h2 {
  font-size: 20px;
  letter-spacing: 0.01em;
  font-weight: 620;
}
.hero #phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f4c5a7;
}
.hero #phase:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9b63;
}
.hero output {
  display: block;
  font-family: 'Helvetica Neue', Inter, Arial, sans-serif;
  font-size: clamp(86px, 8.3vw, 124px);
  font-weight: 350;
  line-height: 1.05;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}
.mode {
  font-size: 13px;
  color: #e2cfc2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode i {
  width: 20px;
  height: 2px;
  background: #ed9363;
}
.mode span {
  opacity: 0.65;
}
.pick {
  margin: 16px 0 -6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f2dfcc;
  font-size: 14px;
}
.pick label {
  white-space: nowrap;
}
.pick select {
  min-width: 0;
  max-width: 100%;
  background: #342720;
  color: white;
  border: 1px solid #796051;
  border-radius: 7px;
  padding: 4px 5px;
}
.timer-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.timer-actions {
  margin-top: 22px;
}
.start,
.on-dark,
.primary,
.secondary {
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}
.start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffab78;
  color: #302018;
  padding: 12px 23px;
}
.start:before {
  content: '';
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.start[data-action='pause']:before {
  width: 8px;
  height: 10px;
  border: 0;
  border-left: 3px solid;
  border-right: 3px solid;
  box-sizing: border-box;
}
.start:hover {
  background: #ffc39c;
}
.on-dark {
  background: #382820;
  border: 1px solid #90715e;
  color: #fff4e8;
}
#other {
  color: #ffbd90;
}
.primary {
  background: var(--ink);
  color: #fff;
}
.secondary {
  background: #fffdf9;
  border: 1px solid #cfc8bc;
  color: var(--ink);
}
.primary:hover,
.secondary:hover,
.on-dark:hover {
  filter: brightness(0.92);
}
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 22px;
}
.panel {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 24px;
}
.section-head,
.dialog-head,
.completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel h1,
.panel h2,
dialog h2 {
  font-size: 22px;
}
.filters {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}
.filters button {
  padding: 8px 2px;
  color: var(--muted);
  background: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
}
.filters button[aria-pressed='true'] {
  color: var(--ink);
  border-bottom-color: var(--orange);
  font-weight: 650;
}
.empty {
  padding: 27px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.paper {
  display: block;
  width: 29px;
  height: 33px;
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, #bba791 5px 6px) center/13px 18px no-repeat,
    #f7ecdd;
  border: 1px solid #d8c8b4;
  border-radius: 5px;
  transform: rotate(-7deg);
  margin: 0 auto 12px;
  box-shadow: 4px 3px #eee4d7;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0 19px;
}
.metrics div + div {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.metrics strong {
  display: block;
  font:
    480 40px/1.15 'Helvetica Neue',
    Inter,
    sans-serif;
  letter-spacing: -0.055em;
}
.metrics span,
.completion,
#count,
footer {
  font-size: 13px;
  color: var(--muted);
}
.completion b {
  color: var(--ink);
}
progress {
  appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e7e0d5;
}
progress::-webkit-progress-bar {
  background: #e7e0d5;
}
progress::-webkit-progress-value {
  background: #df743e;
}
progress::-moz-progress-bar {
  background: #df743e;
}
#count {
  margin-top: 4px;
}
#tasks {
  list-style: none;
  padding: 0;
  margin: 0;
}
#tasks li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
#tasks li:last-child {
  border: 0;
}
#tasks input {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: #81503b;
}
#tasks a {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  padding: 14px 0;
}
#tasks a:hover strong {
  text-decoration: underline;
}
#tasks strong,
#tasks small {
  display: block;
  overflow-wrap: anywhere;
}
#tasks small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
#tasks input:checked + a strong {
  text-decoration: line-through;
  color: var(--muted);
}
.quick {
  font-size: 13px;
  border: 1px solid var(--line);
  background: #faf5ec;
  border-radius: 999px;
  padding: 8px 12px;
  color: #704530;
}
.quick:hover {
  background: #f2e4d1;
}
footer {
  padding: 16px 0;
}
footer details {
  margin-top: 5px;
}
footer p {
  margin: 8px 0;
}
.back {
  display: inline-block;
  margin-bottom: 7px;
}
#task-title {
  font-size: clamp(29px, 4vw, 46px);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.task-info {
  margin-top: 18px;
}
.task-info dl {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 8px 18px;
  margin: 18px 0;
}
.task-info dt {
  color: var(--muted);
}
.task-info dd {
  margin: 0;
}
#edit-status {
  color: #644e3e;
  font-size: 14px;
}
dialog {
  width: min(420px, calc(100% - 32px));
  max-height: 85dvh;
  overflow: auto;
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 24px 90px #20171633;
}
dialog::backdrop {
  background: #20191288;
}
.close {
  width: 36px;
  height: 36px;
  background: #f1ece4;
  color: var(--ink);
  border-radius: 50%;
  font-size: 22px;
}
dialog form label {
  display: block;
  margin: 14px 0 5px;
  font-size: 14px;
  font-weight: 650;
}
dialog input {
  width: 100%;
  border: 1px solid #cfc6b9;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
dialog small,
.hint,
.guide-steps p {
  color: var(--muted);
  font-size: 14px;
}
.hint,
.form-actions,
dialog .actions {
  margin-top: 16px;
}
dialog form > .primary {
  margin-top: 15px;
  width: 100%;
}
.guide-steps {
  padding-left: 1.5em;
}
.guide-steps li {
  padding: 6px;
}
.guide-steps li::marker {
  color: #a04e26;
}
#stop-dialog p {
  margin: 12px 0;
}
.form-actions {
  justify-content: flex-end;
}
#error,
#edit-error {
  background: #ffeadf;
  color: #6f3020;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
}
@media (max-width: 740px) {
  nav,
  main {
    width: calc(100% - 32px);
  }
  nav {
    gap: 16px;
    height: 58px;
  }
  main {
    padding-top: 18px;
  }
  .hero-body {
    padding: 25px;
    width: 67%;
  }
  .desk {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 15px;
  }
  .panel {
    padding: 19px;
  }
  .hero {
    min-height: 300px;
    border-radius: 18px;
  }
  .hero output {
    font-size: 80px;
  }
  .metrics {
    margin: 12px 0;
  }
  .hero-heading {
    gap: 9px;
  }
}
@media (max-width: 480px) {
  nav {
    gap: 12px;
  }
  .nav-divider,
  .nav-link[href] {
    display: none;
  }
  nav time {
    font-size: 12px;
  }
  .hero-body {
    width: 100%;
    padding: 24px;
  }
  .hero {
    background-position: 65% center;
    min-height: 276px;
  }
  .hero:before {
    background: linear-gradient(90deg, #221917f5 0%, #221917ab 45%, #21191011);
  }
  .pick {
    max-width: 90%;
  }
  .hero output {
    font-size: 76px;
  }
  .hero h2 {
    font-size: 18px;
  }
  .new-btn {
    padding: 9px 13px;
  }
  .overview {
    padding: 18px;
  }
  .timer-actions {
    margin-top: 17px;
  }
}
