:root {
  --paper: #f6efe4;
  --paper-deep: #eadfce;
  --ink: #2a2622;
  --muted: #776d62;
  --orange: #c65f32;
  --orange-dark: #9b4523;
  --line: rgba(70, 55, 40, 0.14);
  --ok: #2e7d5b;
  --bad: #b33a3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(198, 95, 50, 0.12), transparent 32rem),
    radial-gradient(circle at 100% 20%, rgba(226, 183, 103, 0.16), transparent 28rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 0 calc(40px + env(safe-area-inset-bottom, 0px));
}

.hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff8ef;
  background: linear-gradient(145deg, var(--orange), var(--orange-dark));
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(155, 69, 35, 0.22);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.sub,
.muted {
  color: var(--muted);
}

.sub {
  margin: 10px 0 0;
  font-size: 15px;
}

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.82);
  box-shadow: 0 18px 40px rgba(78, 59, 39, 0.07);
  backdrop-filter: blur(12px);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(198, 95, 50, 0.2);
  border-color: var(--orange);
}

button {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  color: #fff8ef;
  background: var(--orange);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--orange-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

#loginForm > button {
  width: 100%;
  margin-top: 20px;
}

.ghost {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  font-size: 13px;
}

.ghost:hover {
  background: var(--paper-deep);
}

.hint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.install-hint {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
  font-size: 11px;
  line-height: 1.5;
}

.hint code {
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
  padding: 2px 5px;
  border-radius: 5px;
}

.toolbar,
.list-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.actions {
  display: flex;
  gap: 8px;
}

.task-form {
  display: flex;
  gap: 10px;
  margin: 22px 0 26px;
}

.task-form input {
  flex: 1;
}

.list-head h2 {
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--paper-deep);
  font-size: 12px;
  font-weight: 600;
}

.pill.ok {
  color: var(--ok);
  background: rgba(46, 125, 91, 0.12);
}

.pill.bad {
  color: var(--bad);
  background: rgba(179, 58, 58, 0.12);
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.task.done {
  opacity: 0.6;
}

.task.done .task-title {
  text-decoration: line-through;
}

.task-check {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(198, 95, 50, 0.45);
  border-radius: 50%;
  color: var(--orange);
  background: transparent;
  font-size: 15px;
  line-height: 1;
}

.task-check.done {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}

.task-title {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-title:hover {
  color: var(--orange-dark);
  background: transparent;
}

.dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(198, 95, 50, 0.1);
}

.task-main {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.task-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-main .muted {
  font-size: 12px;
}

.state {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.empty {
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--bad);
  font-size: 13px;
}

.foot {
  padding-top: 26px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 760px);
    padding-top: 30px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .hero {
    gap: 14px;
  }

  .logo {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 20px;
  }

  .task-form {
    flex-direction: column;
  }
}

[hidden] {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-deep);
}

.tab {
  flex: 1;
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.tab:hover,
.tab.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.view {
  padding-top: 18px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-head h2 {
  margin-top: 3px;
  font-size: 19px;
}

.calendar-head .actions {
  gap: 5px;
}

.calendar-head .ghost {
  min-height: 32px;
  padding: 5px 9px;
}

.round {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  color: #fff8ef;
  background: var(--orange);
  font-size: 20px;
  line-height: 1;
}

.segmented {
  display: flex;
  gap: 3px;
  margin: 14px 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.segment {
  flex: 1;
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.segment:hover,
.segment.active {
  color: var(--ink);
  background: var(--paper-deep);
}

.list-head.compact {
  margin-bottom: 10px;
  font-size: 12px;
}

.calendar-body {
  min-height: 180px;
}

.week-wrap,
.month-wrap {
  width: 100%;
}

.week-head,
.month-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: start;
}

.week-col {
  min-height: 126px;
  min-width: 0;
  padding: 5px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
  font: inherit;
  text-align: left;
  overflow: hidden;
}

.week-col:hover,
.week-col.selected {
  border-color: rgba(198, 95, 50, 0.35);
  background: rgba(255, 252, 247, 0.92);
}

.week-col-head {
  display: grid;
  place-items: center;
  gap: 2px;
  padding-bottom: 5px;
  text-align: center;
}

.week-col-head strong {
  font-size: 14px;
}

.week-col-head span {
  color: var(--muted);
  font-size: 9px;
}

.week-block {
  display: grid;
  gap: 1px;
  margin-bottom: 4px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(198, 95, 50, 0.11);
  overflow: hidden;
}

.week-block b {
  color: var(--orange-dark);
  font-size: 8px;
}

.week-block span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.2;
}

.week-empty {
  display: block;
  padding-top: 8px;
  color: var(--muted);
  opacity: 0.45;
  text-align: center;
  font-size: 11px;
}

.day-list {
  display: grid;
  gap: 9px;
}

.day-block {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.day-block strong {
  color: var(--orange-dark);
  font-size: 12px;
}

.day-block span {
  font-weight: 600;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.month-cell {
  display: grid;
  min-height: 44px;
  place-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.month-cell:hover {
  background: var(--paper-deep);
}

.month-cell.outside {
  color: var(--muted);
  opacity: 0.42;
}

.month-cell.selected {
  color: #fff;
  background: var(--orange);
}

.dots {
  display: flex;
  gap: 2px;
  height: 4px;
}

.dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.block-dialog {
  width: min(420px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fbf6ee;
  box-shadow: 0 30px 80px rgba(40, 28, 18, 0.25);
}

.block-dialog::backdrop {
  background: rgba(40, 28, 18, 0.32);
  backdrop-filter: blur(3px);
}

.block-dialog form {
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dialog-head h2 {
  margin-top: 3px;
}

.dialog-head .ghost {
  min-height: 30px;
  padding: 2px 9px;
  font-size: 18px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .calendar-head {
    align-items: flex-start;
  }

  .calendar-head .actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .week-col {
    min-height: 112px;
    padding: 4px 3px;
  }

  .week-block span {
    font-size: 8px;
  }
}


.task-calendar {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.task-calendar:hover {
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
}

.week-col.drop-target,
.month-cell.drop-target {
  border-color: var(--orange) !important;
  background: rgba(198, 95, 50, 0.15) !important;
}

.week-block.linked::before {
  content: "↗";
  margin-right: 2px;
  color: var(--orange-dark);
}

.day-timeline-wrap {
  position: relative;
  padding-left: 46px;
}

.timeline-empty {
  padding: 20px 0;
}

.day-timeline {
  position: relative;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.hour-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid rgba(70, 55, 40, 0.09);
}

.hour-line span {
  position: absolute;
  left: -44px;
  top: -7px;
  width: 38px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.timeline-block {
  position: absolute;
  left: 8px;
  right: 6px;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(198, 95, 50, 0.35);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: rgba(198, 95, 50, 0.13);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.timeline-block.dragging {
  cursor: grabbing;
  opacity: 0.8;
  box-shadow: 0 8px 22px rgba(70, 45, 25, 0.2);
  z-index: 2;
}

.timeline-block.conflict,
.week-block.conflict {
  border-color: var(--bad);
  border-left-color: var(--bad);
  background: rgba(179, 58, 58, 0.13);
}

.timeline-time {
  color: var(--orange-dark);
  font-size: 10px;
}

.timeline-block.conflict .timeline-time {
  color: var(--bad);
}

.timeline-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.timeline-hint {
  color: var(--muted);
  font-size: 9px;
  opacity: 0.65;
}

.resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
  background: linear-gradient(to bottom, transparent, rgba(198, 95, 50, 0.16));
}

.timeline-block.linked .timeline-title::before {
  content: "↗ ";
  color: var(--orange-dark);
}

.task-calendar {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.task-calendar:hover {
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
}

.week-col.drop-target,
.month-cell.drop-target {
  border-color: var(--orange) !important;
  background: rgba(198, 95, 50, 0.15) !important;
}

.week-block.linked::before {
  content: "↗";
  margin-right: 2px;
  color: var(--orange-dark);
}


.task-main-row {
  display: flex;
  gap: 10px;
}

.task-main-row input {
  flex: 1;
}

.task-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.task-options label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.task-options input,
.task-options select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
}

.task-restart {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(198, 95, 50, 0.35);
  border-radius: 7px;
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
  font-size: 10px;
}

@media (max-width: 560px) {
  .task-main-row {
    flex-direction: column;
  }

  .task-options {
    grid-template-columns: 1fr;
  }
}


.reminder-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(198, 95, 50, 0.28);
  border-radius: 12px;
  background: rgba(198, 95, 50, 0.1);
}

.reminder-banner strong {
  color: var(--orange-dark);
  font-size: 13px;
}

.reminder-banner p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.reminder-banner .ghost {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11px;
}


.settings-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 12px;
}

.settings-form label:not(.toggle-row) {
  display: grid;
  gap: 6px;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-form input[type="time"] {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
}

.dnd-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.small {
  font-size: 11px;
}

@media (max-width: 560px) {
  .dnd-range {
    grid-template-columns: 1fr;
  }
}


.task.focused {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(198, 95, 50, 0.18);
}


.task-delete {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid rgba(179, 58, 58, 0.25);
  border-radius: 7px;
  color: var(--bad);
  background: transparent;
  font-size: 10px;
}

.task-delete:hover {
  background: rgba(179, 58, 58, 0.08);
}


.timeline-actions {
  position: absolute;
  top: 4px;
  right: 5px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.timeline-block:hover .timeline-actions,
.timeline-block:focus-within .timeline-actions {
  opacity: 1;
}

.timeline-actions button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid rgba(198, 95, 50, 0.25);
  border-radius: 6px;
  color: var(--orange-dark);
  background: rgba(255, 252, 247, 0.94);
  font-size: 12px;
  line-height: 1;
}

.timeline-actions button:hover {
  color: #fff;
  background: var(--orange);
}


.week-block[draggable="true"] {
  cursor: grab;
}

.week-block[draggable="true"]:active {
  cursor: grabbing;
}


.literature-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.literature-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.literature-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.literature-title:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.literature-item .muted {
  margin: 5px 0 0;
}

.literature-abstract {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .tabs {
    flex-wrap: wrap;
  }

  .tab {
    flex: 1 1 22%;
  }
}


.plugin-pairing {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.plugin-pairing h3 {
  margin: 4px 0 8px;
  font-size: 16px;
}

.token-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.token-box code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--orange-dark);
  font-size: 10px;
}

.token-box button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 11px;
}


.literature-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}

.progress-track {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.progress-label {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}


.reading-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.reading-stats span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.09);
  font-size: 11px;
  font-weight: 600;
}


.task-detail-dialog textarea {
  width: 100%;
  min-height: 96px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

.task-detail-dialog label {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.task-options {
  grid-template-columns: 1fr 1fr;
}


@media (max-width: 560px) {
  body.signed-in .hero {
    display: none;
  }

  body.signed-in .shell {
    width: calc(100% - 16px);
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  body.signed-in .card {
    padding: 14px;
    border-radius: 18px;
    backdrop-filter: none;
  }

  body.signed-in .toolbar {
    align-items: flex-start;
  }

  body.signed-in .toolbar .actions {
    gap: 5px;
  }

  body.signed-in .toolbar .actions button {
    min-height: 38px;
    padding: 5px 8px;
    font-size: 11px;
  }

  body.signed-in .tabs {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    background: rgba(250, 244, 235, 0.96);
    box-shadow: 0 -12px 30px rgba(60, 43, 27, 0.12);
    backdrop-filter: blur(18px);
  }

  body.signed-in .tab {
    min-height: 48px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
  }

  body.signed-in .tab.active {
    color: #fff;
    background: var(--orange);
  }

  body.signed-in .foot {
    display: none;
  }

  body.signed-in .week-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-right: -6px;
    padding-right: 6px;
  }

  body.signed-in .week-head,
  body.signed-in .week-grid {
    min-width: 570px;
  }

  body.signed-in .week-col {
    min-height: 132px;
  }

  body.signed-in .calendar-head {
    align-items: flex-start;
  }

  body.signed-in .calendar-head h2 {
    font-size: 18px;
  }

  body.signed-in .view {
    padding-top: 12px;
  }
}


.task-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 7px;
  margin: 0 0 6px;
}

.task-filters select {
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11px;
}

.task-filters button {
  min-height: 38px;
  padding: 5px 9px;
  font-size: 11px;
}

#taskFilterSummary {
  margin: 4px 0 10px;
}

@media (max-width: 560px) {
  .task-filters {
    grid-template-columns: 1fr 1fr;
  }
}


.queue-panel {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.queue-panel h3 {
  margin: 4px 0 8px;
  font-size: 16px;
}

.queue-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
  padding: 0;
  list-style: none;
}

.queue-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
}

.queue-item strong {
  font-size: 12px;
}

.queue-item span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.queue-item.failed {
  border-color: rgba(179, 58, 58, 0.35);
  background: rgba(179, 58, 58, 0.06);
}

.queue-item.failed span {
  color: var(--bad);
}

.queue-actions {
  display: flex;
  gap: 7px;
}

.queue-actions button {
  min-height: 34px;
  padding: 5px 9px;
  font-size: 11px;
}

.queue-actions button:disabled {
  opacity: 0.4;
}


.calendar-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.calendar-jump input {
  width: auto;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
}


.batch-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(198, 95, 50, 0.22);
  border-radius: 11px;
  background: rgba(198, 95, 50, 0.07);
}

.batch-bar span {
  flex: 1;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 700;
}

.batch-bar button {
  min-height: 32px;
  padding: 4px 9px;
  font-size: 11px;
}

.batch-bar button:disabled {
  opacity: 0.4;
}

.task-select {
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(198, 95, 50, 0.45);
  border-radius: 7px;
  color: #fff;
  background: transparent;
  font-size: 12px;
}

.task-select.selected {
  background: var(--orange);
  border-color: var(--orange);
}

.task.selected {
  border-color: rgba(198, 95, 50, 0.5);
  background: rgba(198, 95, 50, 0.07);
}


.archived-task {
  opacity: 0.82;
}

.task-restore {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(198, 95, 50, 0.35);
  border-radius: 8px;
  color: var(--orange-dark);
  background: rgba(198, 95, 50, 0.08);
  font-size: 11px;
}


.week-quick-jump {
  display: flex;
  gap: 6px;
  margin: 0 0 12px;
}

.week-quick-jump button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.week-quick-jump button:hover {
  color: var(--orange-dark);
  border-color: rgba(198, 95, 50, 0.35);
}


.task-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
}
