:root {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: #493f31;
  background: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fffdf8;
  --butter: #fff0bd;
  --butter-deep: #f9e6a4;
  --sun: #e8a83e;
  --sun-dark: #bd8122;
  --text: #493f31;
  --muted: #9a8d79;
  --muted-2: #b5a995;
  --line: #f0e7d8;
  --line-strong: #e8ddca;
  --shadow: 0 16px 45px rgba(112, 84, 38, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(232, 168, 62, 0.28);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 42px 30px 28px;
  /* Pure white canvas with one faint warm-gold glow near the upper-right edge. */
  background:
    radial-gradient(
      ellipse 68% 36% at 100% 0%,
      rgba(255, 224, 151, 0.18) 0%,
      rgba(255, 236, 197, 0.08) 42%,
      rgba(255, 255, 255, 0) 76%
    ),
    #ffffff;
}

.dashboard {
  position: relative;
  z-index: 1;
  width: min(100%, 1160px);
  margin: 0 auto;
}

.top-header {
  margin-bottom: 34px;
}

.header-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.header-title-group h1 {
  margin: 0;
  color: #40382e;
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.header-date {
  margin: 12px 0 0;
  color: #9d907c;
  font-size: 14px;
}











.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e6a53b;
  box-shadow: 0 0 0 4px rgba(230, 165, 59, 0.13);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: #e8a83e;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 5px 13px rgba(205, 143, 43, 0.17);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #dc9a2e;
  box-shadow: 0 8px 18px rgba(205, 143, 43, 0.22);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(285px, 0.82fr);
  gap: 19px;
  margin-bottom: 48px;
}

.current-card {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 27px 30px 25px;
  border: 1px solid rgba(238, 218, 165, 0.9);
  border-radius: 25px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.6), transparent 13rem),
    linear-gradient(135deg, #fff2c7 0%, #ffedb2 58%, #ffe6a1 100%);
  box-shadow: 0 16px 38px rgba(163, 123, 44, 0.1);
}

.current-card.is-current {
  background:
    radial-gradient(circle at 90% 5%, rgba(255, 255, 255, 0.66), transparent 14rem),
    linear-gradient(135deg, #fff2c5 0%, #ffedb2 56%, #ffe4a0 100%);
}

.current-card-empty {
  justify-content: flex-start;
  gap: 18px;
}

.current-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.current-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(198, 153, 66, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: #896d3e;
  font-size: 11px;
  white-space: nowrap;
}

.current-status .status-dot {
  width: 6px;
  height: 6px;
  background: #d9952c;
  box-shadow: none;
}

.current-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 29px;
}

.current-time-range {
  margin-bottom: 12px;
  color: #947a4d;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
}

.current-task-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.current-task-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  color: #9d7a42;
}

.current-task-heading h2 {
  margin: 2px 0 0;
  color: #51432e;
  font-size: clamp(22px, 2.7vw, 30px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.current-task-note {
  margin: 10px 0 0 50px;
  color: #8c744b;
  font-size: 12px;
  line-height: 1.65;
}

.current-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.remaining-block {
  width: min(100%, 390px);
}

.remaining-label {
  margin-bottom: 5px;
  color: #947a4d;
  font-size: 11px;
}

.remaining-time {
  margin-bottom: 12px;
  color: #59472c;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(180, 140, 66, 0.2);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #d99a34;
  transition: width 500ms ease;
}

.progress-meta {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
  color: #9a8055;
  font-size: 10px;
}

.card-decoration {
  position: absolute;
  right: 20px;
  bottom: -60px;
  color: rgba(255, 255, 255, 0.25);
  width: 220px;
  height: 220px;
  pointer-events: none;
}

.preview-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #92774a;
  font-size: 12px;
}

.preview-sun {
  color: #d69a36;
  width: 17px;
  height: 17px;
}

.current-card-empty h2 {
  margin: 10px 0 0;
  color: #51432e;
  font-size: 27px;
}

.current-card-empty p {
  margin: 0;
  color: #8c744b;
  font-size: 13px;
}

.soft-button {
  align-self: flex-start;
  padding: 10px 15px;
  border: 1px solid rgba(167, 126, 51, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #80653b;
}

.upcoming-panel {
  min-width: 0;
  padding: 24px 23px 18px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.compact-heading {
  margin-bottom: 15px;
}

.section-heading h2,
.schedule-section-heading h2 {
  margin: 0;
  color: #514638;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.subtle-count {
  color: #b0a38e;
  font-size: 10px;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
}

.upcoming-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #f2ecdf;
  background: transparent;
  text-align: left;
}

.upcoming-item:last-child {
  border-bottom: 0;
}

.upcoming-index {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 9px;
  background: #fff4d9;
  color: #b38b4a;
  font-size: 9px;
  font-weight: 700;
}

.upcoming-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.upcoming-time {
  color: #a99b84;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.upcoming-copy strong {
  overflow: hidden;
  color: #5a4c38;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.upcoming-copy strong span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-note {
  overflow: hidden;
  color: #aaa08e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-arrow {
  padding-top: 11px;
  color: #c0ad8b;
  font-size: 14px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.upcoming-item:hover .upcoming-arrow {
  opacity: 1;
}

.upcoming-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  justify-items: center;
  color: #b5a58a;
  text-align: center;
}

.upcoming-empty-icon {
  color: #e4b45d;
}

.upcoming-empty p {
  margin: 9px 0 0;
  font-size: 12px;
}

.schedule-section {
  margin-top: 4px;
}

.schedule-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.schedule-section-heading h2 {
  font-size: 25px;
}

.schedule-total {
  margin-left: 7px;
  color: #b5a58b;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.section-add-button {
  min-height: 39px;
  padding: 0 15px;
  font-size: 12px;
}

.section-add-button span {
  font-size: 18px;
  line-height: 0.8;
}

.schedule-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.schedule-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 18px rgba(105, 81, 43, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.schedule-item:hover {
  transform: translateY(-1px);
  border-color: #ead9b7;
  box-shadow: 0 9px 24px rgba(105, 81, 43, 0.07);
}

.schedule-item.status-current {
  border-color: #edcf8c;
  background: linear-gradient(110deg, #fff7e2, #fffdf8 70%);
}

.schedule-item.status-past {
  background: rgba(255, 255, 255, 0.58);
}

.schedule-item.status-past .schedule-item-copy h3 {
  color: #8e8679;
}

.schedule-item.status-past .schedule-item-icon {
  filter: saturate(0.65);
  opacity: 0.75;
}

.schedule-item-body {
  min-width: 0;
  flex: 1;
}

.schedule-item-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.schedule-item-time {
  color: #9b896c;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.schedule-item-time span {
  padding: 0 3px;
  color: #c3b69e;
}

.item-status {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f7f3ea;
  color: #a79a84;
  font-size: 9px;
  white-space: nowrap;
}

.status-label-current {
  background: #fff0c7;
  color: #9c742e;
}

.status-label-past {
  background: #f5f2ec;
  color: #a79f91;
}

.status-label-upcoming {
  background: #f8f4e9;
  color: #9e8b69;
}

.schedule-item-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.schedule-item-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border-radius: 12px;
  background: #fff5df;
  color: #a17d43;
}

.schedule-item-copy {
  min-width: 0;
}

.schedule-item-copy h3 {
  margin: 1px 0 5px;
  color: #554936;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.schedule-item-copy p {
  margin: 0;
  color: #a19683;
  font-size: 11px;
  line-height: 1.55;
}

.schedule-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.58;
  transition: opacity 150ms ease;
}

.schedule-item:hover .schedule-item-actions {
  opacity: 1;
}

.schedule-item-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9e8e73;
  font-size: 17px;
}

.schedule-item-actions button:hover {
  background: #fff2d5;
  color: #986c2d;
}

.empty-schedule {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #e7d8bb;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.empty-schedule-icon {
  color: #dfa943;
}

.empty-schedule h3 {
  margin: 10px 0 5px;
  color: #5d503e;
  font-size: 17px;
}

.empty-schedule p {
  margin: 0 0 17px;
  color: #a39784;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(65, 54, 38, 0.28);
  backdrop-filter: blur(7px);
}

.editor-modal {
  width: min(100%, 510px);
  max-height: min(90vh, 780px);
  overflow-y: auto;
  padding: 27px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 23px;
  background: #fffdf9;
  box-shadow: 0 25px 80px rgba(61, 47, 25, 0.2);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-heading h2 {
  margin: 0;
  color: #514638;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f8f2e8;
  color: #8e806c;
  font-size: 23px;
}

.form-field {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  color: #75664f;
  font-size: 12px;
  font-weight: 600;
}

.form-field small {
  color: #b5a994;
  font-weight: 400;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #eee4d3;
  border-radius: 11px;
  background: #fff;
  color: #514638;
  font-size: 13px;
  font-weight: 450;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #c0b6a5;
}

.form-row {
  display: flex;
  gap: 12px;
}

.icon-field {
  width: 100%;
  margin-top: 2px;
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.icon-picker-option {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #f0e6d6;
  border-radius: 11px;
  background: #fff9ed;
  color: #9a8055;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.icon-picker-option:hover,
.icon-picker-option.active {
  border-color: #e6c47f;
  background: #fff0c7;
  color: #956b2d;
}

.form-error {
  margin: 0 0 13px;
  color: #b65b42;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid #f0e7d9;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.secondary-button,
.delete-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #eee4d4;
  border-radius: 999px;
  background: #fff;
  color: #8e806b;
  font-size: 12px;
}

.delete-button {
  border-color: #f0ded7;
  color: #b46a54;
}

.secondary-button:hover {
  background: #fff8eb;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 30px 22px 24px;
  }

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


  .overview-layout {
    grid-template-columns: 1fr;
  }

  .upcoming-panel {
    padding: 20px;
  }

  .upcoming-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .upcoming-item:nth-last-child(2) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 23px 15px 22px;
  }

  .header-title-group h1 {
    font-size: 43px;
  }


  .overview-layout {
    gap: 13px;
    margin-bottom: 35px;
  }

  .current-card {
    min-height: 300px;
    padding: 21px 19px 20px;
    border-radius: 21px;
  }

  .current-card-content {
    padding-top: 26px;
  }

  .current-task-heading h2 {
    font-size: 23px;
  }

  .current-card-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .remaining-block {
    width: 100%;
  }

  .card-decoration {
    right: -5px;
    bottom: -55px;
    font-size: 170px;
  }

  .upcoming-panel {
    padding: 18px 17px 12px;
    border-radius: 19px;
  }

  .upcoming-list {
    display: flex;
  }

  .upcoming-item:nth-last-child(2) {
    border-bottom: 1px solid #f2ecdf;
  }

  .schedule-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .section-add-button {
    width: 100%;
  }

  .schedule-item {
    gap: 9px;
    padding: 14px 12px;
    border-radius: 15px;
  }

  .schedule-item-actions {
    flex-direction: column;
    opacity: 1;
  }

  .schedule-item-actions button {
    width: 27px;
    height: 27px;
  }

  .schedule-item-copy h3 {
    font-size: 13px;
  }

  .schedule-item-copy p {
    font-size: 10px;
  }

  .item-status {
    font-size: 8px;
  }

  .editor-modal {
    padding: 21px 17px;
    border-radius: 19px;
  }

  .form-row {
    gap: 9px;
  }

  .icon-field {
    width: 100%;
  }

  .icon-picker {
    gap: 6px;
  }

  .icon-picker-option {
    width: 35px;
    height: 35px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* -------------------------------------------------------
   v0.1.4 · Typography and spacing refinement
   A calmer type scale, more generous rhythm, clearer hierarchy.
-------------------------------------------------------- */

.top-header {
  margin-bottom: 40px;
}

.header-main {
  gap: 32px;
}

.header-title-group h1 {
  font-size: clamp(42px, 5vw, 58px);
  letter-spacing: -0.06em;
}

.header-date {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
}






.primary-button {
  min-height: 46px;
  padding-inline: 19px;
  font-size: 14px;
}

.overview-layout {
  gap: 22px;
  margin-bottom: 52px;
}

.current-card {
  min-height: 320px;
  padding: 30px 34px 28px;
  border-radius: 27px;
}

.current-status {
  padding: 8px 12px;
  font-size: 12px;
}

.current-card-content {
  padding-top: 32px;
}

.current-time-range {
  margin-bottom: 14px;
  font-size: 14px;
}

.current-task-heading {
  gap: 14px;
}

.current-task-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 14px;
  font-size: 20px;
}

.current-task-heading h2 {
  font-size: clamp(25px, 2.8vw, 33px);
  line-height: 1.3;
}

.current-task-note {
  margin: 11px 0 0 56px;
  font-size: 13px;
  line-height: 1.7;
}

.current-card-bottom {
  margin-top: 28px;
}

.remaining-label {
  margin-bottom: 7px;
  font-size: 12px;
}

.remaining-time {
  margin-bottom: 14px;
  font-size: clamp(28px, 3.1vw, 35px);
}

.progress-track {
  height: 8px;
}

.progress-meta {
  margin-top: 9px;
  font-size: 11px;
}

.preview-hint {
  font-size: 13px;
}

.current-card-empty h2 {
  font-size: 29px;
}

.current-card-empty p {
  font-size: 14px;
}

.upcoming-panel {
  padding: 27px 25px 21px;
  border-radius: 25px;
}

.compact-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  font-size: 23px;
}

.subtle-count {
  font-size: 11px;
}

.upcoming-item {
  gap: 12px;
  padding: 15px 0;
}

.upcoming-index {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 10px;
  font-size: 10px;
}

.upcoming-copy {
  gap: 5px;
}

.upcoming-time {
  font-size: 11px;
}

.upcoming-copy strong {
  font-size: 13px;
  line-height: 1.45;
}

.upcoming-note {
  font-size: 11px;
  line-height: 1.45;
}

.upcoming-arrow {
  font-size: 15px;
}

.upcoming-empty p {
  font-size: 13px;
}

.schedule-section {
  margin-top: 0;
}

.schedule-section-heading {
  gap: 22px;
  margin-bottom: 23px;
}

.schedule-section-heading h2 {
  font-size: 27px;
  line-height: 1.25;
}

.schedule-total {
  margin-left: 9px;
  font-size: 14px;
}

.section-add-button {
  min-height: 42px;
  padding-inline: 17px;
  font-size: 13px;
}

.template-actions {
  gap: 8px;
}

.template-actions button {
  padding: 8px 12px;
  font-size: 11px;
}

.schedule-list {
  gap: 12px;
}

.schedule-item {
  gap: 18px;
  padding: 20px 22px;
  border-radius: 19px;
}

.schedule-item-topline {
  gap: 14px;
  margin-bottom: 11px;
}

.schedule-item-time {
  font-size: 12px;
}

.item-status {
  padding: 5px 9px;
  font-size: 10px;
}

.schedule-item-content {
  gap: 14px;
}

.schedule-item-icon {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
  border-radius: 13px;
  font-size: 19px;
}

.schedule-item-copy h3 {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.5;
}

.schedule-item-copy p {
  font-size: 12px;
  line-height: 1.65;
}

.schedule-item-actions {
  gap: 7px;
}

.schedule-item-actions button {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.empty-schedule {
  min-height: 270px;
  border-radius: 22px;
}

.empty-schedule h3 {
  font-size: 19px;
}

.empty-schedule p {
  font-size: 13px;
}

.editor-modal {
  padding: 30px;
  border-radius: 25px;
}

.modal-heading {
  margin-bottom: 27px;
}

.modal-heading h2 {
  font-size: 27px;
}

.form-field {
  gap: 9px;
  margin-bottom: 18px;
  font-size: 13px;
}

.form-field input,
.form-field textarea {
  min-height: 46px;
  padding: 11px 13px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 34px 24px 28px;
  }

  .top-header {
    margin-bottom: 34px;
  }

  .overview-layout {
    gap: 17px;
    margin-bottom: 42px;
  }

  .current-card {
    min-height: 300px;
  }

  .upcoming-panel {
    padding: 23px 22px 18px;
  }

  .schedule-item {
    padding: 18px 19px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 24px 16px 24px;
  }

  .top-header {
    margin-bottom: 28px;
  }

  .header-title-group h1 {
    font-size: 43px;
  }

  .header-date {
    margin-top: 11px;
    font-size: 14px;
  }




  .overview-layout {
    gap: 14px;
    margin-bottom: 36px;
  }

  .current-card {
    min-height: 290px;
    padding: 22px 20px 21px;
    border-radius: 22px;
  }

  .current-card-content {
    padding-top: 25px;
  }

  .current-time-range {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .current-task-heading {
    gap: 11px;
  }

  .current-task-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 18px;
  }

  .current-task-heading h2 {
    font-size: 23px;
  }

  .current-task-note {
    margin-left: 49px;
    font-size: 12px;
  }

  .current-card-bottom {
    margin-top: 23px;
    gap: 12px;
  }

  .remaining-time {
    font-size: 29px;
  }

  .progress-meta {
    font-size: 10px;
  }

  .upcoming-panel {
    padding: 20px 18px 14px;
    border-radius: 20px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .upcoming-item {
    padding: 13px 0;
  }

  .upcoming-copy strong {
    font-size: 13px;
  }

  .schedule-section-heading {
    gap: 13px;
    margin-bottom: 18px;
  }

  .schedule-section-heading h2 {
    font-size: 24px;
  }

  .schedule-total {
    font-size: 13px;
  }

  .template-actions button {
    min-height: 34px;
    font-size: 10px;
  }

  .schedule-list {
    gap: 10px;
  }

  .schedule-item {
    gap: 9px;
    padding: 16px 13px;
    border-radius: 16px;
  }

  .schedule-item-topline {
    gap: 8px;
    margin-bottom: 9px;
  }

  .schedule-item-time {
    font-size: 11px;
  }

  .item-status {
    padding: 4px 7px;
    font-size: 9px;
  }

  .schedule-item-content {
    gap: 10px;
  }

  .schedule-item-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
    font-size: 17px;
  }

  .schedule-item-copy h3 {
    font-size: 14px;
  }

  .schedule-item-copy p {
    font-size: 11px;
    line-height: 1.55;
  }

  .schedule-item-actions {
    gap: 2px;
  }

  .schedule-item-actions button {
    width: 29px;
    height: 29px;
    font-size: 16px;
  }

  .empty-schedule {
    min-height: 235px;
  }

  .editor-modal {
    padding: 23px 18px;
    border-radius: 21px;
  }

  .modal-heading h2 {
    font-size: 25px;
  }

  .form-field {
    font-size: 12px;
  }

  .form-field input,
  .form-field textarea {
    min-height: 43px;
    font-size: 13px;
  }
}


/* v0.1.7 · Unified SVG icon system */
.primary-button svg,
.soft-button svg,
.modal-close svg,
.schedule-item-actions button svg,
.upcoming-arrow svg,
.upcoming-empty-icon,
.empty-schedule-icon,
.preview-sun,
.sun-orbit,
.current-task-icon svg,
.schedule-item-icon svg,
.upcoming-copy strong svg {
  display: block;
  flex: 0 0 auto;
}

.current-task-icon svg,
.schedule-item-icon svg {
  width: 22px;
  height: 22px;
}

.schedule-item-icon svg {
  width: 20px;
  height: 20px;
}

.upcoming-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
}

.upcoming-copy strong svg {
  color: #a17d43;
}

.icon-picker-option svg {
  display: block;
}

.schedule-item-actions button {
  display: grid;
  place-items: center;
}

.modal-close svg {
  display: block;
}

.empty-schedule-icon {
  display: block;
}

@media (max-width: 620px) {
  .icon-picker-option {
    width: 34px;
    height: 34px;
  }
}


/* v0.1.8 · Compact remaining-time module */
.remaining-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: min(100%, 390px);
}

.remaining-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(198, 153, 66, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: #80653b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.remaining-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #d9952c;
}

.progress-track {
  width: 100%;
  height: 7px;
}

@media (max-width: 620px) {
  .remaining-block {
    width: 100%;
    gap: 9px;
  }

  .remaining-pill {
    min-height: 31px;
    padding: 6px 11px;
    font-size: 12px;
  }
}


/* v0.1.9 · Single-focus overview layout */
.overview-layout {
  display: block;
  width: 100%;
  max-width: 860px;
  margin-bottom: 42px;
}

.current-card {
  width: 100%;
  min-height: 252px;
  padding: 23px 28px 21px;
  border-radius: 23px;
}

.current-card-content {
  padding-top: 18px;
}

.current-time-range {
  margin-bottom: 8px;
}

.current-task-note {
  margin-top: 8px;
}

.current-card-bottom {
  margin-top: 18px;
}

.remaining-block {
  gap: 8px;
  width: min(100%, 390px);
}

.progress-track {
  height: 6px;
}

.card-decoration {
  right: 15px;
  bottom: -54px;
  width: 190px;
  height: 190px;
}

.current-card-empty {
  min-height: 252px;
  padding: 23px 28px 21px;
}

@media (max-width: 900px) {
  .overview-layout {
    max-width: 100%;
    margin-bottom: 36px;
  }
}

@media (max-width: 620px) {
  .overview-layout {
    margin-bottom: 32px;
  }

  .current-card {
    min-height: 245px;
    padding: 21px 19px 19px;
    border-radius: 21px;
  }

  .current-card-content {
    padding-top: 19px;
  }

  .current-card-bottom {
    margin-top: 17px;
  }

  .card-decoration {
    right: -8px;
    bottom: -52px;
    width: 165px;
    height: 165px;
  }

  .current-card-empty {
    min-height: 245px;
    padding: 21px 19px 19px;
  }
}


/* v0.2.0 · Dashboard width alignment */
.overview-layout {
  width: 100%;
  max-width: 100%;
  margin-bottom: 38px;
}

.current-card {
  width: 100%;
}

/* Keep the overview card, schedule heading and schedule grid on one shared axis. */
@media (max-width: 900px) {
  .overview-layout {
    width: 100%;
    max-width: 100%;
    margin-bottom: 34px;
  }
}

@media (max-width: 620px) {
  .overview-layout {
    margin-bottom: 30px;
  }

  .current-card {
    width: 100%;
  }
}


/* v0.2.1 · Clear action hierarchy
   One primary add action belongs to the schedule section.
   Template management stays available as a quiet secondary menu.
*/


.schedule-section-heading {
  align-items: center;
  margin-bottom: 18px;
}

.section-add-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 17px;
}

.template-menu {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
}

.template-menu > summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(226, 214, 192, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: #9a8c76;
  cursor: pointer;
  font-size: 12px;
  list-style: none;
  user-select: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.template-menu > summary::-webkit-details-marker {
  display: none;
}

.template-menu > summary:hover,
.template-menu[open] > summary {
  border-color: #e8c98d;
  background: rgba(255, 248, 232, 0.9);
  color: #916c32;
}

.template-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  width: max-content;
  min-width: 190px;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  border: 1px solid #eee4d3;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 12px 30px rgba(105, 81, 43, 0.12);
}

.template-menu-popover button {
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #76664d;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.template-menu-popover button:hover {
  background: #fff2d4;
  color: #8f672b;
}

/* The heading button remains visible and usable on narrow screens. */
@media (max-width: 620px) {

  .schedule-section-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
  }

  .section-add-button {
    width: auto;
    min-height: 39px;
    padding-inline: 14px;
    font-size: 12px;
  }

  .template-menu > summary {
    min-height: 35px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .template-menu-popover {
    min-width: 178px;
  }
}

@media (max-width: 380px) {
  .schedule-section-heading {
    align-items: flex-start;
  }

  .section-add-button {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .template-menu > summary {
    gap: 6px;
    padding-inline: 9px;
  }
}


/* v0.2.2 · Soft boundaries
   Cards are separated by warm surfaces and subtle ambient shadows,
   while controls keep their light functional outlines.
*/

/* Current-task hero: let the sunshine surface define the shape, not a stroke. */
.current-card {
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 34px rgba(163, 123, 44, 0.085);
}

/* Schedule cards: borderless at rest, softly lifted from the page. */
.schedule-item {
  border: 0;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 18px rgba(105, 81, 43, 0.045);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.schedule-item:hover {
  transform: translateY(-1px);
  border-color: transparent;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(105, 81, 43, 0.075);
}

.schedule-item.status-current {
  border: 0;
  background: linear-gradient(110deg, #fff5d9, #fffdf8 76%);
  box-shadow: 0 4px 18px rgba(176, 133, 54, 0.065);
}

.schedule-item.status-current:hover {
  background: linear-gradient(110deg, #fff2cf, #fffdf8 76%);
  box-shadow: 0 8px 22px rgba(176, 133, 54, 0.09);
}

.schedule-item.status-past {
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 3px 14px rgba(105, 81, 43, 0.025);
}

.schedule-item.status-past:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 20px rgba(105, 81, 43, 0.055);
}

/* A little more air makes separate cards readable without visible dividers. */
.schedule-list {
  gap: 13px;
}

/* Empty state stays discoverable, but its dashed frame is deliberately faint. */
.empty-schedule {
  border: 1px dashed rgba(210, 190, 155, 0.42);
  background: rgba(255, 255, 255, 0.34);
}

/* Keep functional controls outlined, but make their outlines quieter. */
.template-menu > summary {
  border-color: rgba(226, 214, 192, 0.52);
}

.current-status {
  border-color: rgba(255, 255, 255, 0.58);
}


/* v0.2.3 · Focused header
   The page header only identifies today; live time remains internal for schedule status. */
.top-header {
  margin-bottom: 38px;
}

.header-main {
  display: block;
}

.header-title-group {
  align-items: flex-start;
}


/* v0.2.4 · Current-task card composition
   Task identity is the focal point; time details form one calm horizontal footer. */
.current-card {
  min-height: 258px;
  padding: 25px 28px 22px;
}

.current-card-content {
  padding-top: 22px;
}

.current-task-heading {
  align-items: flex-start;
  gap: 13px;
}

.current-task-copy {
  min-width: 0;
  flex: 1;
}

.current-task-heading h2 {
  margin-top: 1px;
  line-height: 1.22;
}

.current-task-note {
  margin: 7px 0 0;
  line-height: 1.55;
}

.current-card-bottom.has-metrics {
  display: grid;
  grid-template-columns: auto auto minmax(100px, 1fr);
  align-items: center;
  column-gap: 16px;
  margin-top: 25px;
}

.current-card-bottom .current-time-range {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
}

.current-card-bottom .remaining-pill {
  margin: 0;
  white-space: nowrap;
}

.current-card-bottom .progress-track {
  min-width: 0;
  margin: 0;
}

.current-card-bottom:not(.has-metrics) {
  align-items: center;
  margin-top: 24px;
}

@media (max-width: 620px) {
  .current-card {
    min-height: 245px;
    padding: 21px 19px 19px;
  }

  .current-card-content {
    padding-top: 23px;
  }

  .current-task-heading {
    gap: 11px;
  }

  .current-task-heading h2 {
    font-size: clamp(20px, 5vw, 25px);
  }

  .current-task-note {
    margin-top: 6px;
  }

  .current-card-bottom.has-metrics {
    grid-template-columns: auto auto;
    justify-content: start;
    column-gap: 12px;
    row-gap: 11px;
    margin-top: 22px;
  }

  .current-card-bottom .progress-track {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .current-card-bottom.has-metrics {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 9px;
  }

  .current-card-bottom .progress-track {
    grid-column: auto;
  }
}


/* v0.2.5 · Dedicated progress row */
.current-card-bottom.has-metrics {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  margin-top: 23px;
}

.current-card-time-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.current-card-time-meta .remaining-pill {
  margin: 0;
  flex: 0 0 auto;
}

.current-card-time-meta .current-time-range {
  margin: 0;
  white-space: nowrap;
  text-align: right;
  font-size: 12px;
}

.current-card-bottom.has-metrics .progress-track {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 620px) {
  .current-card-bottom.has-metrics {
    gap: 9px;
    margin-top: 21px;
  }

  .current-card-time-meta {
    gap: 10px;
  }
}


/* v0.2.8 · Near-full centered progress bar
   A very small inset keeps the bar visually aligned with the card content. */
.current-card-bottom.has-metrics {
  gap: 12px;
}

.current-card-bottom.has-metrics .progress-track {
  width: 98%;
  max-width: none;
  align-self: center;
}

@media (max-width: 620px) {
  .current-card-bottom.has-metrics {
    gap: 12px;
  }

  .current-card-bottom.has-metrics .progress-track {
    width: 98%;
    max-width: none;
    align-self: center;
  }
}


/* v0.2.9 · Compact current-task card
   Remove the redundant kicker and tighten the card around the remaining essentials. */
.current-card-top-status-only {
  justify-content: flex-end;
}

.current-card:not(.current-card-empty) {
  min-height: 226px;
  padding: 20px 28px 19px;
}

.current-card:not(.current-card-empty) .current-card-content {
  padding-top: 12px;
}

.current-card:not(.current-card-empty) .current-card-bottom.has-metrics {
  margin-top: 18px;
}

@media (max-width: 620px) {
  .current-card:not(.current-card-empty) {
    min-height: 216px;
    padding: 18px 19px 17px;
  }

  .current-card:not(.current-card-empty) .current-card-content {
    padding-top: 12px;
  }

  .current-card:not(.current-card-empty) .current-card-bottom.has-metrics {
    margin-top: 18px;
  }
}


/* v0.2.12 · Align the task block top with the status pill top */
.current-task-main {
  transform: translateY(-38px);
}


/* v0.2.15 · Card-only schedule view
   The schedule is now a fixed single-column card list; no view switcher or grid mode. */
.schedule-list {
  grid-template-columns: 1fr;
}


/* v0.2.16 · Unified schedule heading
   Keep the title, template menu and primary add action on one calm horizontal row. */
.schedule-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 19px;
}

.schedule-section-title {
  min-width: 0;
  flex: 1 1 auto;
}

.schedule-section-title h2 {
  margin: 0;
}

.schedule-section-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.schedule-section-actions .template-menu > summary {
  min-height: 42px;
  padding-inline: 13px;
}

.schedule-section-actions .section-add-button {
  min-height: 42px;
}

/* On narrow phones, keep both actions together and let them sit below the title. */
@media (max-width: 620px) {
  .schedule-section-heading {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 16px;
  }

  .schedule-section-heading h2 {
    font-size: 22px;
    white-space: nowrap;
  }

  .schedule-section-actions {
    gap: 7px;
  }

  .schedule-section-actions .template-menu > summary {
    min-height: 38px;
    gap: 6px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .schedule-section-actions .section-add-button {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 11px;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .schedule-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .schedule-section-title {
    flex-basis: 100%;
  }

  .schedule-section-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .schedule-section-actions .template-menu > summary {
    min-height: 35px;
    padding-inline: 9px;
  }

  .schedule-section-actions .section-add-button {
    min-height: 35px;
    padding-inline: 11px;
    font-size: 10px;
  }
}


/* v0.2.17 · Mobile-first refinement
   Preserve the Daylight visual language while making the phone layout feel native. */

/* Shared touch and viewport foundations */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button,
summary,
a {
  touch-action: manipulation;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
}

/* Tablet: keep the content focused and comfortably centered. */
@media (max-width: 900px) {
  .dashboard {
    width: min(100%, 760px);
  }

  .app-shell {
    padding: 32px 22px calc(28px + env(safe-area-inset-bottom));
  }

  .top-header {
    margin-bottom: 28px;
  }

  .overview-layout {
    margin-bottom: 30px;
  }

  .current-card:not(.current-card-empty) {
    min-height: 226px;
  }
}

/* Phones */
@media (max-width: 620px) {
  .app-shell {
    padding:
      calc(20px + env(safe-area-inset-top))
      15px
      calc(24px + env(safe-area-inset-bottom));
  }

  .dashboard {
    width: 100%;
  }

  .top-header {
    margin-bottom: 23px;
  }

  .header-title-group h1 {
    font-size: 40px;
    line-height: 1.08;
  }

  .header-date {
    margin-top: 8px;
    font-size: 13px;
  }

  .overview-layout {
    width: 100%;
    margin-bottom: 27px;
  }

  /* Current task: keep the title/status on a shared visual line,
     while reserving room for the status pill on the right. */
  .current-card:not(.current-card-empty) {
    min-height: 220px;
    padding: 18px 17px 16px;
    border-radius: 21px;
  }

  .current-card-top {
    gap: 8px;
  }

  .current-status {
    min-height: 28px;
    gap: 6px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .current-status .status-dot {
    width: 5px;
    height: 5px;
  }

  .current-card:not(.current-card-empty) .current-card-content {
    padding-top: 10px;
  }

  .current-task-main {
    max-width: calc(100% - 88px);
    transform: translateY(-32px);
  }

  .current-task-heading {
    align-items: flex-start;
    gap: 9px;
  }

  .current-task-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .current-task-icon svg {
    width: 19px;
    height: 19px;
  }

  .current-task-heading h2 {
    margin-top: 0;
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .current-task-note {
    margin: 5px 0 0 43px;
    font-size: 11px;
    line-height: 1.5;
  }

  .current-card:not(.current-card-empty) .current-card-bottom.has-metrics {
    gap: 10px;
    margin-top: 12px;
  }

  .current-card-time-meta {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
  }

  .current-card-time-meta .remaining-pill {
    min-height: 29px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .current-card-time-meta .current-time-range {
    font-size: 11px;
  }

  .current-card-bottom.has-metrics .progress-track {
    width: 98%;
    height: 5px;
    align-self: center;
  }

  .card-decoration {
    right: -24px;
    bottom: -48px;
    width: 138px;
    height: 138px;
    opacity: 0.85;
  }

  .current-card-empty {
    min-height: 214px;
    padding: 20px 18px;
    border-radius: 21px;
  }

  .current-card-empty h2 {
    font-size: 21px;
    line-height: 1.3;
  }

  .current-card-empty p {
    font-size: 12px;
    line-height: 1.6;
  }

  /* Schedule heading: title on the left, both actions grouped on the right. */
  .schedule-section {
    margin-top: 0;
  }

  .schedule-section-heading {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .schedule-section-title {
    min-width: 0;
    flex: 1 1 auto;
  }

  .schedule-section-heading h2 {
    font-size: 21px;
    white-space: nowrap;
  }

  .schedule-total {
    margin-left: 5px;
    font-size: 11px;
  }

  .schedule-section-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .schedule-section-actions .template-menu > summary {
    min-height: 40px;
    gap: 5px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .schedule-section-actions .template-menu > summary svg {
    width: 13px;
    height: 13px;
  }

  .schedule-section-actions .section-add-button {
    min-height: 40px;
    gap: 6px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .schedule-list {
    gap: 9px;
  }

  /* Schedule cards: keep actions horizontal to save vertical space. */
  .schedule-item {
    align-items: center;
    gap: 8px;
    padding: 13px 11px;
    border-radius: 15px;
  }

  .schedule-item-body {
    min-width: 0;
    flex: 1 1 auto;
  }

  .schedule-item-topline {
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-bottom: 7px;
  }

  .schedule-item-time {
    font-size: 10px;
  }

  .item-status {
    padding: 4px 7px;
    font-size: 9px;
  }

  .schedule-item-content {
    align-items: flex-start;
    gap: 9px;
  }

  .schedule-item-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .schedule-item-icon svg {
    width: 19px;
    height: 19px;
  }

  .schedule-item-copy h3 {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.42;
    overflow-wrap: anywhere;
  }

  .schedule-item-copy p {
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .schedule-item-actions {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 1px;
    opacity: 1;
  }

  .schedule-item-actions button {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .empty-schedule {
    min-height: 205px;
    padding: 24px 16px;
  }

  /* On phones, the editor becomes a bottom sheet and remains scrollable
     when the software keyboard is open. */
  .modal-backdrop {
    place-items: end center;
    overflow-y: auto;
    padding:
      8px
      8px
      calc(8px + env(safe-area-inset-bottom));
  }

  .editor-modal {
    width: 100%;
    max-height: min(88dvh, 760px);
    margin: 0;
    padding: 20px 17px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal-heading {
    align-items: center;
    margin-bottom: 18px;
  }

  .modal-heading h2 {
    font-size: 22px;
  }

  .modal-close {
    width: 40px;
    height: 40px;
  }

  .form-field {
    gap: 7px;
    margin-bottom: 14px;
    font-size: 12px;
  }

  /* 16px prevents iOS Safari from zooming the page when an input is focused. */
  .form-field input,
  .form-field textarea {
    min-height: 46px;
    padding: 11px 12px;
    font-size: 16px;
  }

  .form-row {
    gap: 10px;
  }

  .form-row .form-field {
    min-width: 0;
  }

  .icon-picker {
    gap: 7px;
  }

  .icon-picker-option {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .modal-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
  }

  .modal-actions-right {
    gap: 7px;
  }

  .secondary-button,
  .delete-button,
  .modal-actions .primary-button {
    min-height: 44px;
    padding-inline: 13px;
  }
}

/* Narrow phones: give the title its own line so the two actions never collide. */
@media (max-width: 380px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .header-title-group h1 {
    font-size: 37px;
  }

  .schedule-section-heading {
    align-items: center;
    flex-wrap: nowrap;
    row-gap: 0;
  }

  .schedule-section-title {
    flex: 1 1 auto;
  }

  .schedule-section-actions {
    width: auto;
    justify-content: flex-end;
  }

  .schedule-section-actions .template-menu > summary,
  .schedule-section-actions .section-add-button {
    min-height: 38px;
  }

  .current-task-main {
    max-width: calc(100% - 78px);
  }

  .current-card-time-meta {
    gap: 6px 8px;
  }

  .schedule-item {
    gap: 6px;
    padding-right: 8px;
    padding-left: 9px;
  }

  .schedule-item-actions button {
    width: 36px;
    height: 40px;
  }

  .form-row {
    gap: 8px;
  }

  .modal-actions {
    align-items: stretch;
  }

  .modal-actions-right {
    margin-left: auto;
  }
}

/* Very short screens: keep the modal reachable without clipping its footer. */
@media (max-height: 640px) and (max-width: 620px) {
  .modal-backdrop {
    place-items: start center;
  }

  .editor-modal {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

/* Touch devices do not have hover; keep controls visible and avoid hover lift. */
@media (hover: none) and (pointer: coarse) {
  .schedule-item:hover {
    transform: none;
  }

  .schedule-item-actions {
    opacity: 1;
  }

  .primary-button:hover {
    transform: none;
  }
}


/* Only the narrowest phones need a second line for the schedule actions. */
@media (max-width: 329px) {
  .schedule-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 9px;
  }

  .schedule-section-title {
    flex: 0 0 100%;
  }

  .schedule-section-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
