:root {
  color-scheme: dark;
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  --nord11: #bf616a;
  --nord12: #d08770;
  --nord13: #ebcb8b;
  --nord14: #a3be8c;
  --nord15: #b48ead;
  --bg: var(--nord0);
  --panel: var(--nord1);
  --surface: #343b49;
  --raised: var(--nord2);
  --line: rgba(216, 222, 233, 0.15);
  --line-strong: rgba(216, 222, 233, 0.28);
  --text: var(--nord6);
  --muted: var(--nord4);
  --dim: #a7b0c2;
  --shadow: rgba(20, 24, 32, 0.34);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@font-face {
  font-family: "Sarasa Gothic Mono";
  src: url("./fonts/sarasa-mono-k-regular.woff2?v=47") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarasa Gothic Mono";
  src: url("./fonts/sarasa-mono-k-semibold.woff2?v=47") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarasa Gothic Mono";
  src: url("./fonts/sarasa-mono-k-bold.woff2?v=47") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kaos Weather Icons";
  src: url("./fonts/SymbolsNerdFontMono-Regular.ttf?v=83") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  height: 100%;
  min-height: 100%;
  max-width: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  width: 100%;
}

body:has(.app[data-profile="family"]) {
  background: #fbf7fc;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 12px;
  overflow: hidden;
}

.appTop {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin: 0 -12px;
  padding: var(--safe-top) 12px 5px;
  border-bottom: 1px solid rgba(76, 86, 106, 0.78);
  background: var(--nord0);
  box-shadow: none;
  transition: box-shadow 140ms ease;
}

.appTop.hasScrolled {
  box-shadow: 0 6px 14px rgba(20, 24, 32, 0.34);
}

.appIdentity {
  min-width: 94px;
}

.topNav {
  display: grid;
  grid-template-columns: repeat(5, auto);
  align-items: end;
  justify-content: end;
  gap: 6px;
  min-width: 0;
}

.topNav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 2px 5px;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.topNav a.isActive {
  border-bottom-color: var(--nord8);
  color: var(--nord8);
}

.kicker,
.label {
  margin: 0;
  color: var(--nord7);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--nord13);
  font-size: 1.58rem;
  line-height: 1.08;
}

h2 {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.15;
}

h3 {
  font-size: 0.92rem;
  line-height: 1.2;
}

.view {
  display: grid;
  align-content: start;
  gap: 12px;
  max-width: 100%;
  min-height: 0;
  padding: 14px 0 10px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  outline: none;
}

.app[data-route="settings"] .view {
  display: block;
}

.app[data-route="settings"] .view > .panel {
  height: auto;
  min-height: max-content;
}

.collectionRail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}

.collectionRail button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collectionRail button.isActive {
  border-color: rgba(180, 142, 173, 0.62);
  background: rgba(180, 142, 173, 0.14);
  color: var(--nord15);
}

.taskFilters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.taskFilters label {
  display: grid;
  gap: 5px;
}

.taskFilters span {
  color: var(--nord7);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.taskFilters select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 720;
  padding: 0 10px;
}

.taskAddButton {
  min-height: 44px;
  padding: 0 16px;
}

.segmentedTabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.segmentedTabs button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.segmentedTabs button.isActive {
  border-color: rgba(180, 142, 173, 0.58);
  background: rgba(180, 142, 173, 0.16);
  color: var(--nord15);
}

.panel {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px var(--shadow);
}

.desktopGrid {
  display: grid;
  gap: 12px;
}

.panelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.panelHeader > div:first-child {
  min-width: 0;
}

.panelHeader > div:first-child h2 {
  overflow-wrap: anywhere;
}

.panelBody {
  max-width: 100%;
  padding: 10px;
}

.slimBody {
  padding-top: 0;
}

.duePickerRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.taskComposer {
  display: grid;
  gap: 8px;
}

.composer label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.composer .toggleLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
}

.composer .toggleLine input {
  width: 20px;
  min-height: 20px;
}

.composer label span {
  color: var(--nord7);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.composer input,
.composer select,
.composer textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 18px;
}

.composer input[type="date"],
.composer input[type="time"] {
  display: block;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  line-height: 44px;
  text-align: center;
}

.composer input[type="date"]::-webkit-date-and-time-value,
.composer input[type="time"]::-webkit-date-and-time-value {
  min-height: 44px;
  line-height: 44px;
  text-align: center;
}

.composer label.isDisabled {
  opacity: 0.46;
}

.composer input:disabled {
  color: var(--dim);
  background: rgba(46, 52, 64, 0.58);
}

.composer input,
.composer select {
  padding: 0 10px;
}

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

.composer input::placeholder,
.composer textarea::placeholder {
  color: #7f8b9e;
}

.presetList {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.presetRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.presetChoice {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}

.presetChoice.isActive {
  border-color: rgba(180, 142, 173, 0.58);
  background: rgba(180, 142, 173, 0.14);
}

.presetChoice strong,
.presetChoice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presetChoice strong {
  font-size: 0.88rem;
  font-weight: 850;
}

.presetChoice span {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 760;
}

.presetEditor {
  border-top: 1px solid var(--line);
}

.formNote {
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 760;
}

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

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

.metric {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric strong {
  display: block;
  color: var(--nord13);
  font-size: 1.2rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 720;
}

.timeline,
.taskList,
.serviceList {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li,
.taskRow,
.serviceRow {
  border-bottom: 1px dotted var(--line);
}

.timeline li:last-child,
.taskRow:last-child,
.serviceRow:last-child {
  border-bottom: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  min-height: 46px;
  padding: 9px 0;
}

.timeline time {
  color: var(--dim);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.timeline strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
}

.timeline span {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.74rem;
}

.calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
}

.calendarHeaderActions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.monthNav {
  display: inline-grid;
  grid-template-columns: 32px 58px 32px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  overflow: hidden;
}

.monthNavButton,
.monthTodayButton {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--nord8);
  font-size: 0.72rem;
  font-weight: 900;
}

.monthTodayButton {
  color: var(--muted);
  font-size: 0.74rem;
}

.monthNavButton:last-child {
  border-right: 0;
}

.addCalendarGrid.isCollapsed {
  padding-bottom: 8px;
}

.weekday {
  color: var(--dim);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.day {
  position: relative;
  display: grid;
  align-content: start;
  grid-template-rows: auto 1fr;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  padding: 6px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: left;
}

.dayHeader {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: calc(100% - 24px);
  line-height: 1;
}

.dayNumber {
  display: inline-block;
  flex: 0 0 auto;
}

.day.isSunday .dayNumber {
  color: var(--nord11);
}

.day.isSaturday .dayNumber {
  color: var(--nord8);
}

.dayWeatherGlyph {
  position: absolute;
  top: 2px;
  right: 5px;
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  font-family: "Kaos Weather Icons", "Symbols Nerd Font", "Nerd Font Symbols", monospace;
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1;
  text-align: right;
  pointer-events: none;
}

.dayMarkers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  gap: 4px;
  min-height: 14px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dayEventCount {
  color: var(--nord13);
}

.dayTaskCount {
  color: var(--nord14);
}

.day.isMuted {
  border-color: rgba(216, 222, 233, 0.08);
  background: rgba(67, 76, 94, 0.32);
  color: #687386;
  opacity: 0.48;
}

.day.isMuted .dayWeatherGlyph,
.day.isMuted .dayMarkers {
  visibility: hidden;
}

.day.isToday {
  border-color: rgba(235, 203, 139, 0.72);
}

.day.isDuty {
  border-color: rgba(180, 142, 173, 0.78);
  box-shadow: inset 0 0 0 1px rgba(180, 142, 173, 0.28);
}

.day.isSelected {
  border-color: rgba(129, 161, 193, 0.72);
  background: rgba(129, 161, 193, 0.18);
  box-shadow: inset 0 0 0 1px rgba(129, 161, 193, 0.35);
}

.day.isDuty.isSelected {
  border-color: rgba(180, 142, 173, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(180, 142, 173, 0.32),
    inset 0 0 0 2px rgba(129, 161, 193, 0.2);
}

.taskRow {
  display: block;
  min-height: 58px;
  padding: 10px 0;
}

.taskRowMain {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px;
}

.taskEditLink {
  display: block;
  min-width: 0;
}

.checkButton {
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
}

.checkButton.isDone {
  border-color: rgba(163, 190, 140, 0.62);
  background: rgba(163, 190, 140, 0.14);
}

.checkButton.isDone::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--nord14);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.taskTitle {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 760;
}

.taskRow.isDone .taskTitle {
  color: var(--muted);
  text-decoration: line-through;
}

.taskMeta,
.serviceMeta {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 0.76rem;
}

.taskBadge {
  font-size: 0.74rem;
  font-weight: 900;
  text-align: right;
}

.taskRow.priorityHigh .taskBadge {
  color: var(--nord11);
}

.taskRow.priorityMedium .taskBadge {
  color: var(--nord13);
}

.taskRow.priorityLow .taskBadge {
  color: var(--nord7);
}

.taskGroup {
  display: grid;
  gap: 4px;
  padding: 2px 0 8px;
}

.taskGroup + .taskGroup {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.taskGroupTitle,
.sectionLabel {
  color: var(--nord13);
}

.panelBody.withDivider {
  border-top: 1px solid var(--line);
}

.selectedWeather {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.selectedWeatherCompact {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.selectedWeatherCompact span {
  color: var(--dim);
  font-size: 0.76rem;
  font-weight: 850;
}

.selectedWeatherCompact strong {
  color: var(--text);
  font-family: "Kaos Weather Icons", "Symbols Nerd Font", "Nerd Font Symbols", monospace;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}

.selectedWeatherCompact em {
  color: var(--text);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.selectedWeatherSummary {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}

.selectedWeatherGlyph {
  color: var(--text);
  font-family: "Kaos Weather Icons", "Symbols Nerd Font", "Nerd Font Symbols", monospace;
  font-size: 2.85rem;
  font-weight: 400;
  line-height: 1;
}

.selectedWeatherRange {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.selectedWeatherParts {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weatherPart {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 22px;
}

.weatherPartLabel {
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 800;
}

.weatherPartValue {
  color: var(--text);
  font-family: "Kaos Weather Icons", "Sarasa Gothic Mono", "Symbols Nerd Font", "Nerd Font Symbols", monospace;
  font-size: 0.92rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.legacySubtasks {
  display: grid;
  gap: 5px;
  margin: 8px 0 0 38px;
  padding: 0;
  list-style: none;
}

.legacySubtasks li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--muted);
  font-size: 0.78rem;
}

.legacySubtasks li.isDone {
  color: var(--dim);
  text-decoration: line-through;
}

.subtaskToggle {
  position: relative;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
}

.subtaskToggle.isDone {
  border-color: rgba(163, 190, 140, 0.62);
  background: rgba(163, 190, 140, 0.12);
}

.subtaskToggle.isDone::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--nord14);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.serviceRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0;
}

.serviceRow,
.taskRow,
.timeline li,
.rounyTemplateRow,
.rounyItem,
.calendarGrid,
.summaryGrid,
.servicesGrid {
  max-width: 100%;
}

.serviceRow strong {
  color: var(--text);
  font-size: 0.9rem;
}

.serviceRow .serviceType {
  color: var(--nord8);
  font-size: 0.72rem;
  font-weight: 850;
}

.serviceActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settingsList {
  display: grid;
  gap: 10px;
  margin: 0;
}

.settingsList div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.settingsList div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settingsList dt {
  color: var(--nord7);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settingsList dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  text-align: right;
}

.settingsDisclosure {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.settingsDisclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding-top: 10px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.settingsDisclosure summary::-webkit-details-marker {
  display: none;
}

.settingsDisclosure summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--nord8);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.settingsDisclosure[open] summary::after {
  content: "-";
}

.settingsDisclosure summary span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.settingsDisclosure summary strong {
  color: var(--nord7);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.settingsDisclosure summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.settingsDisclosureBody {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.presetInlineActions {
  display: flex;
  justify-content: flex-end;
}

.settingsDisclosure .presetEditor {
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.rounyTemplateList,
.rounyEditor,
.rounyItems {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.rounyTemplateRow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px;
}

.rounyTemplateRow.isActive {
  border-color: rgba(129, 161, 193, 0.55);
  background: rgba(129, 161, 193, 0.13);
}

.rounyDragHandle {
  width: 30px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: grab;
}

.rounyTemplateButton {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.rounyTemplateButton strong,
.rounyTemplateButton span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rounyTemplateButton strong {
  font-size: 0.9rem;
  font-weight: 850;
}

.rounyTemplateButton span {
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 780;
}

.rounyWeekGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow-x: hidden;
  padding: 10px;
}

.rounyWeekGrid.hasSaturday {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.rounyGridToggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 850;
}

.rounyGridToggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.rounyDayColumn {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 160px;
  padding: 7px 5px;
  border-right: 1px solid var(--line);
}

.rounyDayColumn:last-child {
  border-right: 0;
}

.rounyDayColumn h3 {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.rounyDayItems {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.rounyDayItems p {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 760;
  text-align: center;
}

.rounyBlock {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(216, 222, 233, 0.16);
  border-radius: 6px;
  padding: 6px 4px;
  background: var(--surface);
  color: #2e3440;
  cursor: pointer;
}

.rounyBlock strong,
.rounyBlock span,
.rounyBlock em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rounyBlock strong {
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
}

.rounyBlock span {
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.rounyBlock em {
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 760;
}

.rounyBlock.isPink {
  background: rgba(244, 199, 223, 0.28);
}

.rounyBlock.isPeach {
  background: rgba(246, 190, 159, 0.25);
}

.rounyBlock.isYellow {
  background: rgba(235, 203, 139, 0.24);
}

.rounyBlock.isMint {
  background: rgba(143, 188, 187, 0.24);
}

.rounyBlock.isSky {
  background: rgba(136, 192, 208, 0.24);
}

.rounyBlock.isLavender {
  background: rgba(180, 142, 173, 0.24);
}

.rounyBlock.isGray {
  background: rgba(216, 222, 233, 0.13);
}

.rounyItem {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.rounyItem:last-child {
  border-bottom: 0;
}

.rounyItemGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 80px 80px 86px 30px;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.rounyItem label,
.rounyMemo,
.rounyTitleField,
.rounySlotRow label,
.rounyMetaGrid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rounyItem label span,
.rounyMemo span,
.rounyTitleField span,
.rounySlotRow span,
.rounyMetaGrid span {
  color: var(--nord7);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rounyItem input,
.rounyItem select,
.rounyMemo input,
.rounyTitleField input,
.rounySlotRow input,
.rounySlotRow select,
.rounyMetaGrid input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  padding: 0 9px;
}

.rounyItem input[type="time"],
.rounySlotRow input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  text-align: center;
}

.rounySlots {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rounySlotRow {
  display: grid;
  grid-template-columns: minmax(76px, 0.9fr) minmax(78px, 1fr) minmax(78px, 1fr) 34px;
  align-items: end;
  gap: 7px;
  min-width: 0;
}

.rounySlotRow input,
.rounySlotRow select {
  min-height: 34px;
  font-size: 16px;
  padding: 0 7px;
}

.rounyMetaGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.rounyMetaGrid input[type="color"] {
  width: 64px;
  padding: 4px;
}

.rounyActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.rounyLayerBackdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 17, 23, 0.44);
}

.rounyLayer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(420px, 94vw);
  max-width: 100%;
  padding: calc(18px + var(--safe-top)) 12px calc(18px + var(--safe-bottom));
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -18px 0 36px rgba(0, 0, 0, 0.26);
  overflow-y: auto;
  overflow-x: hidden;
}

.rounyLayerForm {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.rounyLayer .rounyItem {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rounyLayer .rounyItemGrid {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.55fr);
}

.rounyLayer .rounyItemGrid .iconTextButton {
  display: none;
}

.openButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  border: 1px solid rgba(136, 192, 208, 0.36);
  border-radius: 7px;
  background: rgba(136, 192, 208, 0.1);
  color: var(--nord8);
  font-size: 0.76rem;
  font-weight: 850;
}

.primaryButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(163, 190, 140, 0.44);
  border-radius: 7px;
  background: rgba(163, 190, 140, 0.13);
  color: var(--nord14);
  font-size: 0.8rem;
  font-weight: 850;
}

.plainButton {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--nord8);
  font-size: 0.78rem;
  font-weight: 850;
}

.iconTextButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(191, 97, 106, 0.1);
  color: var(--nord11);
  font-size: 0.82rem;
  font-weight: 900;
}

.app[data-profile="family"] {
  color-scheme: light;
  --bg: #fbf7fc;
  --panel: #fffaff;
  --surface: #f4edf8;
  --raised: #eee4f4;
  --line: rgba(122, 96, 132, 0.18);
  --line-strong: rgba(122, 96, 132, 0.32);
  --text: #34283b;
  --muted: #594964;
  --dim: #826f8a;
  --shadow: rgba(96, 75, 107, 0.14);
}

.app[data-profile="family"] .appTop {
  border-color: rgba(122, 96, 132, 0.16);
  background: #fbf7fc;
}

.app[data-profile="family"] .appTop.hasScrolled {
  box-shadow: 0 6px 14px rgba(96, 75, 107, 0.18);
}

.app[data-profile="family"] h1 {
  color: #9b5f8f;
}

.app[data-profile="family"] .kicker,
.app[data-profile="family"] .label,
.app[data-profile="family"] .composer label span,
.app[data-profile="family"] .taskFilters span,
.app[data-profile="family"] .settingsList dt,
.app[data-profile="family"] .settingsDisclosure summary strong {
  color: #7f6aa6;
}

.app[data-profile="family"] .collectionRail button.isActive,
.app[data-profile="family"] .topNav a.isActive {
  border-color: rgba(188, 126, 170, 0.42);
  color: #8c4f83;
}

.app[data-profile="family"] .collectionRail button.isActive {
  border-color: #b474a6;
  background: #ead5e9;
  color: #713f6a;
}

.app[data-profile="family"] .openButton,
.app[data-profile="family"] .primaryButton {
  border-color: rgba(151, 124, 184, 0.34);
  background: rgba(231, 220, 244, 0.62);
  color: #755b98;
}

.app[data-profile="family"] .day.isMuted {
  border-color: rgba(122, 96, 132, 0.08);
  background: rgba(238, 228, 244, 0.48);
  color: #b6a7bd;
  opacity: 0.54;
}

.app[data-profile="family"] .collectionRail button,
.app[data-profile="family"] .taskFilters select,
.app[data-profile="family"] .rounyTemplateRow,
.app[data-profile="family"] .rounyItem input,
.app[data-profile="family"] .rounyItem select,
.app[data-profile="family"] .rounyMemo input,
.app[data-profile="family"] .composer input,
.app[data-profile="family"] .composer select,
.app[data-profile="family"] .composer textarea {
  background: var(--surface);
}

.app[data-profile="family"] .rounyTemplateRow.isActive {
  border-color: rgba(188, 126, 170, 0.42);
  background: rgba(244, 199, 223, 0.36);
}

.app[data-profile="family"] .rounyBlock {
  border-color: rgba(122, 96, 132, 0.12);
  color: #34283b;
}

.app[data-profile="family"] .rounyBlock.isPink {
  background: #f8d8e8;
}

.app[data-profile="family"] .rounyBlock.isPeach {
  background: #f8dccf;
}

.app[data-profile="family"] .rounyBlock.isYellow {
  background: #f5e8bf;
}

.app[data-profile="family"] .rounyBlock.isMint {
  background: #d6eee6;
}

.app[data-profile="family"] .rounyBlock.isSky {
  background: #d7e8f6;
}

.app[data-profile="family"] .rounyBlock.isLavender {
  background: #e5d9f4;
}

.app[data-profile="family"] .rounyBlock.isGray {
  background: #ebe5ef;
}

.app[data-profile="family"] .rounyItem label span,
.app[data-profile="family"] .rounyMemo span {
  color: #7f6aa6;
}

.app[data-profile="family"] .rounyGridToggle {
  background: var(--surface);
  color: #594964;
}

.app[data-profile="family"] .composer input::placeholder,
.app[data-profile="family"] .composer textarea::placeholder {
  color: #a693ad;
}

@media (max-width: 380px) {
  .appTop {
    gap: 6px;
  }

  .appIdentity {
    min-width: 78px;
  }

  .appTop h1 {
    font-size: 1.32rem;
  }

  .topNav {
    gap: 2px;
  }

  .topNav a {
    padding-inline: 1px;
    font-size: 0.64rem;
  }
}

@media (max-width: 680px) {
  .rounyWeekGrid {
    padding: 8px 6px;
  }

  .rounyDayColumn {
    min-height: 140px;
    padding: 6px 3px;
  }

  .rounyDayColumn h3 {
    font-size: 0.66rem;
  }

  .rounyDayItems {
    gap: 5px;
  }

  .rounyBlock {
    padding: 5px 3px;
  }

  .rounyBlock strong {
    font-size: 0.66rem;
  }

  .rounyBlock span,
  .rounyBlock em {
    font-size: 0.58rem;
  }

  .rounyItemGrid {
    grid-template-columns: minmax(0, 1fr) 72px 72px;
  }

  .rounyItemGrid .iconTextButton {
    align-self: end;
  }
}

@media (min-width: 780px) {
  body {
    background:
      linear-gradient(90deg, #242933 0, #2e3440 22%, #2e3440 78%, #242933 100%);
  }

  .app {
    max-width: 1040px;
    padding-inline: 20px;
  }

  .appTop {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .desktopGrid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }

  .servicesGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .servicesGrid .serviceRow {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 11px;
  }
}
