* {
  box-sizing: border-box;
}
:root {
  --ground: #f5f5f7;
  --line: #ddddec;
  --muted: #898991;
  --tile: #f7f7f9;
  --accent: #ff682b;
  --purple: #aa5aff;
  --gold: #efbd00;
  --stripe: repeating-linear-gradient(
    32deg,
    transparent 0 12px,
    rgba(149, 149, 166, 0.085) 12.5px 13px,
    transparent 13.5px 14px
  );
  font:
    15px -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: #19191c;
  background: var(--ground);
}
body {
  margin: 0;
}
button,
a,
input,
select {
  font: inherit;
}
button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.94);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.sheet {
  min-height: 100svh;
  width: 84.5%;
  margin: auto;
  position: relative;
  display: grid;
  place-items: center;
  background: var(--stripe);
  border-inline: 1px solid var(--line);
  padding: 48px 0 58px;
  overflow: hidden;
}
.frame {
  width: clamp(334px, 33.6vw, 560px);
  position: relative;
  padding: 2px;
  border-inline: 1px dashed var(--line);
}
.frame:before,
.frame:after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.frame:before {
  inset: 0 -100vw;
  border-block: 1px dashed var(--line);
}
.frame:after {
  inset: -100vh -1px;
  border-inline: 1px dashed var(--line);
}
.card {
  position: relative;
  z-index: 1;
  background: var(--ground);
  border: 1px solid #e3e3ea;
  border-radius: 18px;
  box-shadow:
    0 3px 5px #25253412,
    0 32px 52px -24px #22223042;
  container-type: inline-size;
}
header,
footer,
.tools,
nav,
.legend,
.legend span,
.dialogHead,
.caption span {
  display: flex;
  align-items: center;
}
header {
  padding: 3.7% 3.9%;
  gap: 2.6%;
  min-height: 13.7cqw;
}
h1 {
  font-size: 3.55cqw;
  letter-spacing: -0.045em;
  font-weight: 450;
  margin: 0;
}
.today,
.add {
  border-radius: 100px;
  height: 6.5cqw;
}
.today {
  border: 1px solid #d6d6e2;
  font-size: 2.8cqw;
  padding-inline: 3.1%;
  letter-spacing: -0.03em;
}
.add {
  margin-left: auto;
  background: var(--accent);
  color: white;
  width: 10%;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 16px #d99e7c30;
}
svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav button,
.tools button {
  color: #96969f;
  padding: 0;
  width: 6cqw;
  height: 7cqw;
  display: grid;
  place-items: center;
  font-size: 4cqw;
}
.add svg {
  width: 3.6cqw;
  height: 3.6cqw;
}
.paper {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-inline: -1px;
  padding: 4.7% 3.9% 3.8%;
}
.week,
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1cqw;
}
.week {
  margin-bottom: 1cqw;
}
.week span,
.day,
.legend,
.total,
.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.week span {
  font-size: 2.55cqw;
  text-align: center;
  padding: 1.25cqw 0;
  background: var(--tile);
  border-radius: 20px;
  color: var(--muted);
}
.day {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.8cqw;
  aspect-ratio: 1;
  border-radius: 2.5cqw;
  background: var(--tile);
  padding: 1.05cqw 0.25cqw 0;
  font-size: 2.6cqw;
  color: var(--muted);
  border: 1px solid transparent;
}
.day:hover {
  border-color: #d9d8e2;
}
.outside {
  background: var(--stripe), #fafafb;
  color: #aaaab2;
}
.selected {
  border-color: #ffa783;
  background: #ffede5;
  color: #fa5f22;
}
.dots {
  position: absolute;
  display: flex;
  gap: 2px;
  top: 1.05cqw;
  right: 1.05cqw;
}
i {
  display: inline-block;
  background: var(--purple);
  width: 1.25cqw;
  height: 1.25cqw;
  border-radius: 50%;
}
i.yearly {
  background: var(--gold);
}
.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.logo {
  width: 4.65cqw;
  height: 4.65cqw;
  object-fit: contain;

}
.letter {
  display: grid;
  place-items: center;
  border-radius: 25%;
  background: #e3dbf6;
  color: #66449d;
  font-size: 0.78em;
  font-weight: 650;
}
.logos small {
  font-size: 2cqw;
}
.legend,
.total,
.meta {
  text-transform: uppercase;
  font-size: 2.35cqw;
  letter-spacing: 0.01em;
}
.legend {
  gap: 3.6%;
  margin-top: 3.7%;
  color: #626269;
}
.legend span {
  gap: 2cqw;
}
.legend .count {
  margin-left: auto;
  color: #888890;
  white-space: pre;
}
.legend strong,
.total strong {
  font-weight: 600;
  color: #27272a;
}
footer {
  padding: 2.2% 3.9%;
  justify-content: space-between;
}
.tools {
  gap: 0.5cqw;
}
.tools b {
  width: 1px;
  height: 3.5cqw;
  background: #d5d5df;
  margin-inline: 0.8cqw;
}
.tools button:first-child {
  width: 3.8cqw;
}
.total {
  color: #888891;
  padding: 1.5cqw 0;
}
.total strong {
  margin-left: 1cqw;
}
.caption {
  position: absolute;
  bottom: 3%;
  left: 2.5%;
  right: 2.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #96969d;
  font-size: clamp(12px, 1vw, 16px);
}
.caption span {
  gap: 10px;
}
.caption img {
  width: clamp(22px, 2.2vw, 32px);
  aspect-ratio: 1;
  border-radius: 50%;
}
.defs {
  display: none;
}
dialog {
  width: min(400px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  color: #25252a;
  box-shadow: 0 20px 80px #27273830;
  max-height: 88svh;
}
dialog::backdrop {
  background: #41414f28;
  backdrop-filter: blur(4px);
}
.dialogHead {
  justify-content: space-between;
  margin-bottom: 16px;
}
.dialogHead button {
  font-size: 24px;
  color: var(--muted);
}
h2 {
  font-size: 20px;
  letter-spacing: -0.04em;
  margin: 0;
}
p {
  font-size: 14px;
  line-height: 1.55;
  color: #62626c;
}
form,
label {
  display: grid;
  gap: 6px;
}
form {
  gap: 13px;
}
label {
  font-size: 12px;
  color: #61616c;
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 8px;
  padding: 9px;
  color: #222;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.primary,
.secondary,
.danger {
  display: inline-block;
  text-decoration: none;
  border-radius: 9px;
  padding: 10px 14px;
  text-align: center;
}
.primary {
  background: #f0642d;
  color: #fff;
}
.secondary {
  background: var(--ground);
}
.danger {
  color: #a42e25;
}
.row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  padding: 11px 0;
}
.row .logo {
  width: 25px;
  height: 25px;
}
.row small {
  margin-left: auto;
  color: #777;
  font-size: 12px;
}
.error {
  color: #9b3016;
}
.error:empty {
  display: none;
}
.meta {
  font-size: 11px;
  color: #83838b;
}
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.note {
  font-size: 12px;
}
.upload {
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload .logo {
  width: 30px;
  height: 30px;
}
@media (max-width: 600px) {
  .sheet {
    width: 100%;
    padding-inline: 8px;
  }
  .frame {
    width: min(100%, 430px);
  }
  .caption {
    left: 5%;
    right: 5%;
  }
}
@media (max-height: 600px) {
  .caption {
    position: static;
    align-self: end;
    width: 95%;
  }
  .sheet {
    gap: 30px;
    padding-block: 25px;
  }
}
