:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --line: #e4e7eb;
  --text: #1f2933;
  --muted: #77808a;
  --teal: #00a88f;
  --teal-soft: #e6f5f2;
  --blue: #3478f6;
  --blue-soft: #edf4ff;
  --purple: #8b5cf6;
  --purple-soft: #f1ebff;
  --red: #e5484d;
  --red-soft: #fff1f2;
  --amber: #b76b00;
  --amber-soft: #fff4d8;
  --day-pad: 0.625rem;
  --day-head-height: 1.75rem;
  --event-height: 1.75rem;
  --event-gap: 0.35rem;
  --events-top: calc(var(--day-pad) + var(--day-head-height) + var(--event-gap));
  --event-step: calc(var(--event-height) + var(--event-gap));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-screen[hidden],
.app-layout[hidden] {
  display: none;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(31, 41, 51, 0.08);
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-actions {
  display: flex;
  gap: 10px;
}

.auth-actions button {
  flex: 1;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
}

.app-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.app-brand {
  display: grid;
  gap: 5px;
}

.app-brand strong {
  font-size: 18px;
}

.app-brand span {
  color: var(--muted);
  font-size: 12px;
}

.app-nav {
  display: grid;
  gap: 8px;
}

.app-nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
}

.app-nav button.active {
  border-color: #cfeee8;
  background: var(--teal-soft);
  color: #007c6b;
  font-weight: 800;
}

.user-panel {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.user-panel span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.user-panel small {
  color: var(--muted);
  line-height: 1.4;
}

.user-panel small[data-state="ok"] {
  color: #00846f;
}

.user-panel small[data-state="error"] {
  color: var(--red);
}

.user-panel button {
  width: 100%;
  justify-content: center;
}

.app-view[hidden] {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

button:hover {
  background: #f9fafb;
}

button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

button.danger {
  border-color: #ffd4d8;
  background: var(--red-soft);
  color: var(--red);
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 34px;
  padding: 0 10px;
}

textarea {
  resize: vertical;
  padding: 9px 10px;
}

.calendar-app,
.memo-app {
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 32px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#monthLabel {
  min-width: 112px;
  text-align: center;
  font-size: 18px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.calendar-column {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tools {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.tools input[type="search"] {
  width: 260px;
}

.tools input[type="number"] {
  width: 96px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
}

.dot:first-child {
  margin-left: 0;
}

.dot.rest {
  background: var(--teal);
}

.dot.festival {
  background: var(--red);
}

.dot.work {
  background: var(--amber);
}

.dot.today {
  background: #111827;
}

.calendar {
  overflow: hidden;
  min-width: 54rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.major-todo {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 36px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.todo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.todo-head p {
  margin-top: 5px;
  font-size: 13px;
}

#todoCount {
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #00846f;
  font-weight: 800;
}

.todo-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.todo-form input {
  min-width: 0;
}

.todo-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.todo-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fafafa;
}

.todo-item {
  display: grid;
  grid-template-columns: 24px 22px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: start;
  min-height: 44px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.todo-expand {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.todo-expand:hover {
  background: var(--teal-soft);
  color: #00846f;
}

.todo-item input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--teal);
}

.todo-title {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.todo-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.todo-item.done .todo-title {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 500;
}

.todo-delete {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
}

.todo-delete:hover {
  color: var(--red);
  background: var(--red-soft);
}

.subtodo-panel {
  grid-column: 2 / -1;
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  border-radius: 8px;
  background: #fafafa;
}

.subtodo-list {
  display: grid;
  gap: 6px;
}

.subtodo-empty {
  color: var(--muted);
  font-size: 13px;
}

.subtodo-item {
  display: grid;
  grid-template-columns: 22px 20px minmax(0, 1fr) 26px;
  gap: 7px;
  align-items: start;
  color: #4b5563;
}

.todo-item.dragging,
.subtodo-item.dragging {
  opacity: 0.5;
}

.todo-item.order-drop-target,
.subtodo-item.order-drop-target {
  border-color: var(--teal);
  box-shadow: 0 -2px 0 var(--teal);
}

.subtodo-expand {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.subtodo-expand:hover {
  background: var(--teal-soft);
  color: #00846f;
}

.subtodo-item input {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}

.subtodo-item span {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.subtodo-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.subtodo-delete {
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--muted);
}

.subtodo-delete:hover {
  color: var(--red);
  background: var(--red-soft);
}

.subtodo-detail-wrap {
  grid-column: 3 / -1;
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

.subtodo-detail-wrap label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.subtodo-detail {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 8px;
  line-height: 1.45;
  font-size: 13px;
}

.subtodo-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.subtodo-form input,
.subtodo-form button {
  height: 30px;
}

.subtodo-form input {
  width: 100%;
  margin: 0;
  padding: 0 8px;
}

.subtodo-form button {
  padding: 0 9px;
}

.clear-done {
  width: 100%;
  color: var(--muted);
}

.memo-workbench {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 120px);
}

.note-list-panel,
.note-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.note-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.note-list-head {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

#noteCount {
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #00846f;
  font-weight: 800;
}

.note-search {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.note-search input {
  width: 100%;
}

.note-list {
  overflow: auto;
  padding: 10px;
}

.note-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fafafa;
}

.note-item {
  width: 100%;
  height: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  background: transparent;
}

.note-item:hover {
  background: #fafafa;
}

.note-item.active {
  border-color: #cfeee8;
  background: var(--teal-soft);
}

.note-item-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.note-item-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.note-editor {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  overflow: hidden;
}

.note-title-input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.note-content-input {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 0;
  padding: 18px;
  line-height: 1.65;
  font-size: 15px;
}

.note-editor-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.note-editor.empty {
  place-items: center;
  grid-template-rows: 1fr;
  min-height: 360px;
  color: var(--muted);
}

.note-editor.empty .note-title-input,
.note-editor.empty .note-content-input,
.note-editor.empty .note-editor-footer {
  display: none;
}

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays {
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  color: #606b75;
  font-weight: 700;
}

.weekdays span {
  min-height: 2.6rem;
  display: flex;
  align-items: center;
  padding: 0 var(--day-pad);
  border-right: 1px solid var(--line);
  line-height: 1.2;
}

.weekdays span:last-child,
.day:nth-child(7n) {
  border-right: 0;
}

.days {
  grid-auto-rows: minmax(calc(var(--events-top) + (var(--event-step) * var(--visible-count)) + 3.25rem), 1fr);
  position: relative;
}

.day {
  min-width: 0;
  min-height: calc(var(--events-top) + (var(--event-step) * var(--visible-count)) + 2.5rem);
  padding: var(--day-pad);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: relative;
}

.day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.day.outside {
  color: #9aa3ad;
  background: #fcfcfd;
}

.day.rest {
  background: linear-gradient(180deg, #fff, var(--red-soft));
}

.day.work {
  background: linear-gradient(180deg, #fff, var(--amber-soft));
}

.day.today {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.day-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  min-height: var(--day-head-height);
  margin-bottom: var(--event-gap);
  white-space: nowrap;
  overflow: hidden;
}

.date-number {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.today .date-number {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--teal);
  color: white;
}

.lunar {
  color: var(--muted);
  font-size: 0.86rem;
}

.tag {
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.tag.rest {
  background: #dff6ef;
  color: #00846f;
}

.tag.festival {
  background: #ffe1e4;
  color: #cf3038;
}

.tag.work {
  background: #ffedbf;
  color: var(--amber);
}

.range-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.range-scroll-group {
  position: absolute;
  left: var(--group-left);
  top: calc(var(--group-top) + var(--events-top));
  width: var(--group-width);
  height: calc(var(--event-step) * var(--visible-count));
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-color: #b8c3c0 transparent;
  scrollbar-width: thin;
}

.range-scroll-group.has-overflow {
  overflow-y: auto;
  pointer-events: auto;
}

.range-scroll-group::-webkit-scrollbar {
  width: 8px;
}

.range-scroll-group::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: #b8c3c0;
  background-clip: padding-box;
}

.range-scroll-content {
  position: relative;
  width: 100%;
  min-height: calc(var(--event-step) * var(--slot-count));
  pointer-events: none;
}

.range-scroll-group.has-overflow .range-scroll-content {
  pointer-events: auto;
}

.event {
  position: absolute;
  left: calc(var(--left) + var(--day-pad));
  top: calc(var(--top) + var(--events-top) + (var(--event-step) * var(--slot)));
  width: calc(var(--width) - (var(--day-pad) * 2));
  min-height: var(--event-height);
  min-width: 0;
  display: grid;
  grid-template-columns: 0.5rem minmax(1.65rem, 2rem) minmax(0, 1fr) minmax(1rem, 1.35rem) 0.5rem;
  align-items: center;
  overflow: hidden;
  border-radius: 4px;
  border: 0;
  padding: 0;
  background: var(--teal-soft);
  --event-color: var(--teal);
  color: #35413f;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
}

.range-scroll-group .event {
  top: calc(var(--event-step) * var(--slot));
}

.event.order-drop-target {
  box-shadow: inset 0 2px 0 var(--event-color), inset 0 -2px 0 var(--event-color);
}

.event::before {
  content: none;
}

.event.meeting {
  background: var(--blue-soft);
  --event-color: var(--blue);
}

.event.milestone {
  background: var(--purple-soft);
  --event-color: var(--purple);
}

.event.done {
  background: #eef2f1;
  --event-color: #9aa8a5;
  color: #76817f;
}

.event.done .event-title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(118, 129, 127, 0.65);
}

.event.done .range-mark {
  color: #9aa8a5;
}

.event-complete {
  width: 1.2rem;
  height: 1.2rem;
  min-width: 1.2rem;
  display: grid;
  place-items: center;
  padding: 0;
  justify-self: center;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--event-color), #ffffff 14%);
  background: rgba(255, 255, 255, 0.72);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.event-complete:hover {
  transform: scale(1.12);
  background: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-color), transparent 78%);
}

.event.done .event-complete {
  border-color: var(--event-color);
  background: var(--event-color);
  color: #ffffff;
}

.event-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 0.3rem;
  min-width: 0;
}

.resize-handle {
  width: 100%;
  height: 100%;
  background: var(--event-color);
  cursor: ew-resize;
  opacity: 0.95;
}

.resize-handle.left {
  border-radius: 4px 0 0 4px;
}

.resize-handle.right {
  border-radius: 0 4px 4px 0;
  opacity: 0;
}

.event:hover .resize-handle.right,
.event.range .resize-handle.right,
.event.dragging .resize-handle.right {
  opacity: 0.7;
}

.range-mark {
  color: color-mix(in srgb, var(--event-color), #111827 18%);
  font-size: 0.86rem;
  text-align: center;
}

.event.dragging {
  opacity: 0.65;
  outline: 2px solid color-mix(in srgb, var(--event-color), #ffffff 20%);
}

.day.drop-target {
  background: #eefaf7;
  box-shadow: inset 0 0 0 2px rgba(0, 168, 143, 0.55);
}

.is-dragging,
.is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.completion-burst {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 9999;
  pointer-events: none;
  animation: completion-fade 780ms ease-out forwards;
}

.completion-ring,
.completion-pop,
.completion-particle {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  pointer-events: none;
}

.completion-ring {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 168, 143, 0.72);
  border-radius: 50%;
  animation: completion-ring 560ms cubic-bezier(.2, .8, .2, 1) forwards;
}

.completion-pop {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #00a88f;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(0, 168, 143, 0.28);
  animation: completion-pop 620ms cubic-bezier(.17, .84, .44, 1) forwards;
}

.completion-particle {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  animation: completion-particle 760ms cubic-bezier(.17, .84, .44, 1) forwards;
  animation-delay: var(--delay);
}

@keyframes completion-ring {
  from {
    opacity: 0.82;
    scale: 0.55;
  }
  to {
    opacity: 0;
    scale: 3.4;
  }
}

@keyframes completion-pop {
  0% {
    opacity: 0;
    scale: 0.4;
  }
  24% {
    opacity: 1;
    scale: 1.22;
  }
  100% {
    opacity: 0;
    scale: 0.86;
    transform: translateY(-22px);
  }
}

@keyframes completion-particle {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--spin));
  }
}

@keyframes completion-fade {
  to {
    opacity: 1;
  }
}

.add-day {
  position: absolute;
  right: var(--day-pad);
  bottom: var(--day-pad);
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  opacity: 0;
}

.day:hover .add-day {
  opacity: 1;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.32);
}

.dialog-card {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.18);
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-head button {
  width: 32px;
  padding: 0;
}

.dialog-card label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-weight: 700;
}

.dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    padding: 12px 10px;
  }

  .app-nav {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-app {
    width: calc(100vw - 20px);
    padding-top: 14px;
  }

  .memo-app {
    width: calc(100vw - 20px);
    padding: 14px 0 24px;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .major-todo {
    position: static;
    max-height: none;
  }

  .memo-workbench {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tools input[type="search"] {
    width: min(100%, 260px);
  }

  .calendar {
    min-width: 60rem;
  }

  .weekdays span,
  .day {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}
