:root {
  color-scheme: light;
  --bg: #f2f5f2;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-soft: #edf1ee;
  --panel-muted: #e4eae5;
  --line: rgba(38, 66, 48, 0.13);
  --line-soft: rgba(38, 66, 48, 0.08);
  --text: #18201b;
  --muted: #69736c;
  --faint: #949e97;
  --blue: #5d91aa;
  --green: #267a53;
  --green-strong: #155f3e;
  --green-soft: #dcefe4;
  --review-bg: #edf6fa;
  --review-border: #c9e0e9;
  --giveaway-bg: #fff1e4;
  --giveaway-border: #edd2bb;
  --fixed-bg: #fff0f0;
  --fixed-text: #a84545;
  --red: #c95353;
  --shadow: 0 14px 38px rgba(37, 63, 46, 0.1);
  --shadow-soft: 0 4px 16px rgba(37, 63, 46, 0.065);
  --input-font-size: 16px;
  --keyboard-offset: 0px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a18;
  --panel: rgba(35, 40, 36, 0.92);
  --panel-solid: #232824;
  --panel-soft: #2b312c;
  --panel-muted: #333a34;
  --line: rgba(227, 237, 229, 0.13);
  --line-soft: rgba(227, 237, 229, 0.08);
  --text: #f2f5f1;
  --muted: #a8b0aa;
  --faint: #778079;
  --blue: #74a6bd;
  --green: #4d9b70;
  --green-strong: #6ab788;
  --green-soft: #294c38;
  --review-bg: rgba(111, 169, 194, 0.14);
  --review-border: rgba(119, 181, 207, 0.3);
  --giveaway-bg: rgba(218, 151, 86, 0.15);
  --giveaway-border: rgba(227, 165, 103, 0.32);
  --fixed-bg: rgba(201, 83, 83, 0.16);
  --fixed-text: #f0a2a2;
  --red: #e36d6d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 5px 18px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

html {
  background: var(--bg);
  overflow-x: hidden;
}

html.page-lock {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.page-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

button {
  color: inherit;
  touch-action: manipulation;
}

button:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
  min-height: 100svh;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(82px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -12px -16px 0;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
  box-shadow: 0 5px 18px rgba(37, 63, 46, 0.035);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

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

.book-mark {
  display: grid;
  grid-template-columns: 13px 13px;
  gap: 3px;
  width: 34px;
  height: 30px;
  align-items: end;
}

.book-mark span {
  height: 25px;
  background: var(--green);
  border-radius: 3px 3px 1px 1px;
}

.book-mark span:first-child {
  transform: skewY(4deg);
}

.book-mark span:last-child {
  transform: skewY(-4deg);
}

h1 {
  margin: 7px 0 11px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

h2,
h3,
p {
  margin: 0;
}

.icon-button,
.small-button,
.primary-button,
.danger-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 26px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
  color: var(--green-strong);
  font-size: 20px;
}

.icon-button.ghost {
  background: transparent;
  color: var(--muted);
  font-size: 34px;
}

.view-tabs {
  display: inline-flex;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 3px;
  scrollbar-width: none;
}

.view-tabs::-webkit-scrollbar,
.parking-rail::-webkit-scrollbar {
  display: none;
}

.view-tab {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.view-tab.active {
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
  color: var(--green-strong);
}

.search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  padding: 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.search-field:focus-within {
  border-color: var(--green);
}

.search-field input {
  min-height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  box-shadow: none;
}

.search-field input:focus {
  box-shadow: none;
}

.search-field button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.search-field:not(.has-query) button {
  visibility: hidden;
}

main {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-top: 10px;
}

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

.eyebrow {
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 4px;
}

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

.small-button {
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-weight: 800;
}

.parking-section {
  width: calc(100% + 32px);
  max-width: calc(100% + 32px);
  min-width: 0;
  overflow: hidden;
  margin: 0 -16px;
  padding: 3px 16px 9px;
  border-bottom: 1px solid var(--line-soft);
}

.parking-section.drop-target {
  background: var(--review-bg);
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.parking-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 164px;
  gap: 9px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 18px 8px 0;
  scroll-snap-type: x mandatory;
}

.view-panel {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.view-panel.active {
  display: block;
}

.month-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.month-group {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.month-header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.month-header strong {
  font-size: 19px;
  letter-spacing: 0;
}

.month-header small {
  color: var(--faint);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
}

.month-header .chevron {
  color: var(--muted);
  font-size: 20px;
}

.month-items {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 0 0 6px 26px;
}

.month-group.collapsed .month-items {
  display: none;
}

.content-card {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  position: relative;
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 74px;
  padding: 10px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
}

.content-card[data-type="review"] {
  background: var(--review-bg);
  border-color: var(--review-border);
}

.content-card[data-type="giveaway"] {
  background: var(--giveaway-bg);
  border-color: var(--giveaway-border);
}

.content-card[data-fixed-date="true"] {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--fixed-bg);
}

.content-card[data-fixed-date="true"]::after {
  content: "!";
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--fixed-bg);
  color: var(--fixed-text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.content-card[data-fixed-date="true"] .meta-text {
  color: var(--fixed-text);
}

.parking-rail .content-card {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.content-card[data-parked="true"] {
  grid-template-rows: minmax(42px, auto) 24px;
  width: 164px;
  min-height: 88px;
  max-height: 88px;
  overflow: hidden;
}

.content-card[data-parked="true"] h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-card[data-parked="true"] .meta-line {
  display: none;
}

.content-card[data-parked="true"] .status-row {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.content-card[data-parked="true"] .status-pill {
  width: 100%;
}

.month-items .content-card {
  border-radius: 8px;
  min-height: 66px;
  margin-bottom: 5px;
  padding-right: 118px;
  box-shadow: var(--shadow-soft);
}

.month-items .content-card[data-fixed-date="true"] {
  padding-right: 134px;
}

.month-items .content-card .status-row {
  position: absolute;
  right: 10px;
  bottom: 12px;
}

.content-card:active {
  transform: scale(0.99);
}

@media (hover: hover) {
  .content-card:hover {
    border-color: var(--green);
  }
}

.content-card.dragging {
  opacity: 0.45;
}

.touch-dragging {
  overscroll-behavior: none;
}

.touch-drag-ghost {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  opacity: 0.96;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42));
  transform-origin: center;
}

.touch-drag-ghost[data-drag-context="calendar"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 14px;
  min-width: 0;
  min-height: 64px;
  max-height: 76px;
  padding: 5px;
  gap: 4px;
  overflow: hidden;
  border-radius: 8px;
}

.touch-drag-ghost[data-drag-context="calendar"] .content-card-main {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.touch-drag-ghost[data-drag-context="calendar"] .meta-line {
  display: none;
}

.touch-drag-ghost[data-drag-context="calendar"] h3 {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
  font-size: 10.5px;
  line-height: 1.12;
}

.touch-drag-ghost[data-drag-context="calendar"] .status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  align-self: end;
  width: 100%;
  padding-left: 0;
}

.touch-drag-ghost[data-drag-context="calendar"] .status-pill {
  width: 100%;
  min-width: 0;
  min-height: 14px;
  padding: 0;
  border-radius: 3px;
  font-size: 8px;
  line-height: 14px;
}

.touch-drag-ghost[data-drag-context="calendar"][data-fixed-date="true"] h3 {
  padding-right: 12px;
}

.touch-drag-ghost[data-drag-context="calendar"][data-fixed-date="true"]::after {
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  font-size: 9px;
}

.content-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-width: 0;
}

.content-card h3 {
  -webkit-user-select: none;
  user-select: none;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0;
}

.meta-line {
  -webkit-user-select: none;
  user-select: none;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  padding-left: 0;
}

.meta-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--panel-solid);
  color: var(--muted);
  font-size: 12px;
}

.status-pill.done {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.type-pill {
  display: none;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 6px;
  box-shadow: var(--shadow-soft);
}

.calendar-toolbar strong {
  font-size: 18px;
}

  .mobile-week-list {
    display: none;
  }

.week-card {
  display: grid;
  gap: 10px;
}

.week-title {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.day-card {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.day-card.drop-target,
.calendar-cell.drop-target {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.day-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
}

.day-heading strong {
  color: var(--text);
  font-size: 18px;
}

.day-items {
  display: grid;
  gap: 8px;
}

.day-items .content-card {
  min-height: 58px;
  padding: 7px;
  background: var(--panel-soft);
  border-color: var(--line);
}

.day-items .content-card h3 {
  font-size: 13px;
}

.day-items .meta-line {
  display: none;
}

.desktop-calendar {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
}

.calendar-cell {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  min-width: 0;
  min-height: 104px;
  padding: 5px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-solid);
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

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

.calendar-cell.outside {
  color: var(--faint);
  background: var(--panel-soft);
}

.calendar-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.calendar-cell-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.calendar-cell-header strong {
  color: var(--text);
  font-size: 12px;
}

.calendar-cell .day-items {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.giveaway-bars {
  display: grid;
  gap: 2px;
  min-height: 11px;
  margin: -1px -5px 4px;
}

.giveaway-bar {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  width: 100%;
  min-width: 0;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0 3px;
  background: #e4a563;
  color: #44270d;
  font-size: 7px;
  font-weight: 900;
  line-height: 10px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.giveaway-bar[data-fixed-date="true"] {
  background: var(--red);
  color: #ffffff;
}

.giveaway-bar[data-position="start"] {
  border-radius: 5px 0 0 5px;
}

.giveaway-bar[data-position="end"] {
  border-radius: 0 5px 5px 0;
}

.giveaway-bar[data-single="true"] {
  border-radius: 5px;
}

.calendar-cell .content-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 14px;
  touch-action: none;
  min-width: 0;
  min-height: 64px;
  padding: 5px;
  gap: 4px;
  border-radius: 8px;
}

.calendar-cell .content-card[data-type="review"] {
  border-color: var(--review-border);
  background: var(--review-bg);
}

.calendar-cell .content-card[data-type="giveaway"] {
  border-color: var(--giveaway-border);
  background: var(--giveaway-bg);
}

.calendar-cell .content-card[data-type="review"][data-fixed-date="true"] {
  border-color: var(--red);
  box-shadow: inset 0 0 0 2px var(--fixed-bg);
}

.calendar-cell .content-card[data-type="giveaway"][data-fixed-date="true"] {
  border-color: var(--red);
  box-shadow: inset 0 0 0 2px var(--fixed-bg);
}

.calendar-cell .content-card-main {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.calendar-cell .meta-line {
  display: none;
}

.calendar-cell .content-card h3 {
  -webkit-user-select: none;
  user-select: none;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
  font-size: 10.5px;
  line-height: 1.12;
}

.calendar-cell .content-card[data-fixed-date="true"] h3 {
  padding-right: 12px;
}

.calendar-cell .content-card[data-fixed-date="true"]::after {
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  font-size: 9px;
}

.calendar-cell .status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  align-self: end;
  width: 100%;
  padding-left: 0;
}

.calendar-cell .status-pill {
  width: 100%;
  min-width: 0;
  min-height: 14px;
  padding: 0;
  border-radius: 3px;
  font-size: 8px;
  line-height: 14px;
}

.floating-add-button {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(19, 31, 23, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  touch-action: none;
}

.detail-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: 100%;
  max-width: 100vw;
  max-height: 92svh;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 14px 18px max(20px, env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  transform: translateY(105%);
  transition: transform 180ms ease;
}

.detail-drawer.open {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.drawer-title-area {
  min-width: 0;
  flex: 1;
}

.drawer-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 4px;
}

.drawer-kicker-row .eyebrow {
  margin-bottom: 0;
}

.type-switch {
  display: block;
  width: auto;
  min-width: 0;
}

.type-switch select {
  width: auto;
  min-width: 0;
  min-height: 30px;
  border-color: var(--line-soft);
  border-radius: 999px;
  background: var(--green-soft);
  padding: 5px 24px 5px 10px;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.title-editor {
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: var(--text);
  font-size: 27px;
  font-weight: 900;
  line-height: 1.08;
}

.title-editor::placeholder {
  color: var(--faint);
  opacity: 1;
}

.title-editor:focus {
  border-color: transparent;
  box-shadow: none;
}

form {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-x: hidden;
}

form > * {
  min-width: 0;
  max-width: 100%;
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  color: var(--text);
  padding: 10px 12px;
  font-size: var(--input-font-size);
  line-height: 1.25;
  outline: none;
}

@supports (-webkit-touch-callout: none) {
  :root {
    --input-font-size: 17px;
  }
}

input[type="date"] {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 44px;
  text-align: left;
  padding-right: 42px;
}

input[type="date"]::-webkit-date-and-time-value {
  display: block;
  min-width: 0;
  min-height: 1.25em;
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 22px;
  margin: 0;
}

textarea {
  resize: vertical;
}

.stored-field {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.subpage-field {
  display: grid;
  gap: 7px;
}

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

.subpage-field p,
.subpage-heading p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subpage-list {
  display: grid;
  gap: 8px;
}

.mini-add-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 900;
}

.subpage-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.subpage-button span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subpage-button strong {
  color: var(--faint);
  font-size: 24px;
  line-height: 1;
}

.editor-page {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom) + var(--keyboard-offset));
  border-radius: 0;
  background: var(--panel-solid);
}

.detail-drawer.editor-active {
  top: 0;
  bottom: 0;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  transform: translateY(0);
  transition: none;
}

.detail-drawer.editor-active form {
  visibility: hidden;
}

.editor-header {
  grid-row: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.editor-header h2 {
  font-size: 24px;
}

.editor-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.format-editor-button,
.copy-editor-button {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.format-editor-button[aria-expanded="true"] {
  background: var(--panel-soft);
  border-color: var(--line);
}

.editor-toolbar {
  grid-row: 2;
  display: none;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 7px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.editor-page.tools-open .editor-toolbar {
  display: flex;
}

.editor-toolbar::-webkit-scrollbar {
  display: none;
}

.editor-toolbar button {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 800;
  font-size: 18px;
}

.editor-toolbar [data-tool-group="table"] {
  display: none;
}

.editor-page.table-tools-open .editor-toolbar [data-tool-group="format"] {
  display: none;
}

.editor-page.table-tools-open .editor-toolbar [data-tool-group="table"] {
  display: grid;
}

.editor-toolbar button.active {
  background: var(--green-soft);
  color: var(--text);
}

.unicode-panel {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom) + var(--keyboard-offset));
  z-index: 170;
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  padding: 10px;
  box-shadow: var(--shadow);
}

.unicode-controls {
  display: block;
  min-width: 0;
}

.unicode-controls input {
  min-height: 40px;
  min-width: 0;
  border-radius: 13px;
  padding: 8px 10px;
  font-size: 16px;
}

.unicode-style-row {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px 1px 3px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.unicode-style-row::-webkit-scrollbar {
  display: none;
}

.unicode-style-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.unicode-style-row button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-strong);
}

.unicode-preview {
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 10px;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unicode-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.unicode-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 850;
}

#textEditorInput {
  min-height: 0;
}

.rich-editor {
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 0 34px;
  outline: none;
  font-size: 18px;
  line-height: 1.42;
  white-space: normal;
}

.editor-page.unicode-open .rich-editor {
  visibility: hidden;
  overflow: hidden;
  padding-bottom: 34px;
  color: transparent;
  caret-color: transparent;
  pointer-events: none;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--faint);
  pointer-events: none;
}

.editor-page.unicode-open .rich-editor::before,
.editor-page.unicode-open .rich-editor:empty::before {
  display: none !important;
  content: none !important;
}

.rich-editor p,
.rich-editor div {
  margin: 0 0 10px;
}

.rich-editor ul,
.rich-editor ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.rich-editor li {
  margin: 3px 0;
}

.rich-editor table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--panel-solid);
  border-radius: 12px;
  overflow: hidden;
}

.rich-editor td,
.rich-editor th {
  min-width: 58px;
  border: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

.rich-editor .active-table-cell {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.rich-editor .selected-table-cell {
  background: var(--review-bg);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.table-select-mode .rich-editor td,
.table-select-mode .rich-editor th {
  cursor: cell;
}

.rich-editor td:empty::before,
.rich-editor th:empty::before {
  content: "\00a0";
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus {
  border-color: var(--blue);
}

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

.date-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-date-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--muted);
  padding: 5px 10px 5px 7px;
  font-size: 12px;
  cursor: pointer;
}

.fixed-date-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fixed-date-toggle span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--faint);
  font-weight: 950;
  line-height: 1;
}

.fixed-date-toggle strong {
  font-size: 12px;
  line-height: 1;
}

.fixed-date-toggle.active {
  border-color: var(--red);
  background: var(--fixed-bg);
  color: var(--fixed-text);
}

.fixed-date-toggle.active span {
  background: var(--red);
  color: white;
}

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

.status-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--muted);
  overflow: hidden;
  padding: 6px 4px;
}

.status-toggle span {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
}

.status-toggle strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.1;
}

.status-toggle.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-strong);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 4px;
}

.drawer-actions .danger-button[hidden] + .primary-button {
  grid-column: 1 / -1;
}

.primary-button {
  background: var(--green);
  color: white;
  font-weight: 850;
}

.danger-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--red);
}

.empty-state {
  padding: 14px 0;
  color: var(--faint);
  font-weight: 700;
}

@media (min-width: 760px) {
  .app-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 42px 42px;
  }

  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 10px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: 0;
  }

  .brand-row {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: space-between;
  }

  .brand-row .theme-toggle {
    display: grid;
  }

  h1 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 42px;
  }

  .book-mark {
    display: inline-grid;
    width: 42px;
    height: 40px;
  }

  .book-mark span {
    background: var(--green);
  }

  .view-tabs {
    grid-column: 1 / -1;
    padding-left: 0;
    margin-top: 20px;
  }

  .search-field {
    grid-column: 1 / -1;
    width: min(520px, 100%);
    margin-top: 12px;
  }

  main {
    margin-top: 18px;
  }

  .parking-section {
    margin: 0;
    padding: 0 0 12px;
  }

  .parking-rail {
    grid-auto-columns: 260px;
  }

  .month-items {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding-left: 34px;
  }

  .month-items .content-card {
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .mobile-week-list {
    display: none;
  }

  .desktop-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(132px, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .calendar-cell {
    min-height: 170px;
    padding: 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .calendar-cell.outside {
    background: var(--panel-soft);
    color: var(--faint);
  }

  .calendar-cell-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
  }

  .calendar-cell .day-items {
    gap: 6px;
  }

  .calendar-cell .content-card {
    min-height: 94px;
    padding: 9px;
    border-radius: 8px;
  }

  .calendar-cell .content-card h3 {
    font-size: 15px;
  }

  .calendar-cell .status-row {
    padding-left: 0;
  }

  .floating-add-button {
    display: none;
  }

  .detail-drawer {
    left: auto;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: min(440px, calc(100vw - 48px));
    max-height: none;
    border-radius: 12px;
  }
}

/* Cloud session and sync */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 690;
  white-space: nowrap;
}

.sync-status svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.sync-status[data-state="saved"] {
  background: var(--green-soft);
  color: var(--green-strong);
}

.sync-status[data-state="saving"] svg,
.sync-status[data-state="loading"] svg {
  animation: sync-pulse 1.2s ease-in-out infinite;
}

.sync-status[data-state="error"],
.sync-status[data-state="offline"] {
  background: var(--fixed-bg);
  color: var(--fixed-text);
}

@keyframes sync-pulse {
  50% { opacity: 0.4; }
}

html.auth-locked,
html.auth-locked body {
  height: 100%;
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: var(--bg);
}

.auth-panel {
  display: grid;
  width: min(100%, 390px);
  padding: 28px 24px 24px;
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 23px;
}

.auth-copy p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.auth-copy h2 {
  font-size: 28px;
  font-weight: 780;
  line-height: 1.05;
}

.auth-copy span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-loading {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: 28px;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--green-strong);
  font-size: 20px;
}

.auth-loading svg {
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.auth-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 690;
}

.password-field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--faint);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.password-field:focus-within {
  box-shadow: inset 0 0 0 2px var(--green);
  color: var(--green-strong);
}

.password-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 750;
}

.auth-submit:disabled {
  opacity: 0.58;
}

.auth-error {
  color: var(--fixed-text);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 360px) {
  .sync-status span { display: none; }
  .sync-status { width: 30px; justify-content: center; padding: 0; }
}

@media (min-width: 1100px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Visual system: calm, mobile-first content workspace */
:root {
  --bg: #f4f6f4;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --panel-soft: #eef2ef;
  --panel-muted: #e7ece8;
  --field-bg: #f1f4f2;
  --line: rgba(29, 53, 38, 0.095);
  --line-soft: rgba(29, 53, 38, 0.055);
  --text: #172019;
  --muted: #6e7871;
  --faint: #9ba49d;
  --green: #27805a;
  --green-strong: #176844;
  --green-soft: #dff1e7;
  --review-accent: #75aeca;
  --review-bg: #eef7fa;
  --review-border: transparent;
  --giveaway-accent: #e6a05d;
  --giveaway-bg: #fff4e9;
  --giveaway-border: transparent;
  --fixed-bg: #fdebec;
  --fixed-text: #ad4d52;
  --red: #ca5c61;
  --shadow: 0 18px 45px rgba(28, 48, 35, 0.13);
  --shadow-soft: 0 6px 20px rgba(28, 48, 35, 0.07);
  --surface-shadow: 0 2px 4px rgba(28, 48, 35, 0.025), 0 9px 24px rgba(28, 48, 35, 0.055);
}

[data-theme="dark"] {
  --bg: #171b18;
  --panel: rgba(32, 38, 33, 0.88);
  --panel-solid: #222823;
  --panel-soft: #2b322c;
  --panel-muted: #343c35;
  --field-bg: #2a312b;
  --line: rgba(235, 242, 236, 0.095);
  --line-soft: rgba(235, 242, 236, 0.055);
  --text: #f2f5f2;
  --muted: #aab2ab;
  --faint: #778179;
  --green: #56a87b;
  --green-strong: #78c096;
  --green-soft: #294c38;
  --review-accent: #77abc4;
  --review-bg: #26373d;
  --giveaway-accent: #d99b62;
  --giveaway-bg: #3a3127;
  --fixed-bg: #492e30;
  --fixed-text: #efaaae;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 7px 22px rgba(0, 0, 0, 0.19);
  --surface-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(0, 0, 0, 0.15);
}

svg.lucide {
  display: block;
  width: 1em;
  height: 1em;
  pointer-events: none;
}

.app-shell {
  padding: max(14px, env(safe-area-inset-top)) 14px calc(88px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  display: block;
  top: 0;
  margin: -14px -14px 0;
  padding: max(14px, env(safe-area-inset-top)) 14px 12px;
  border: 0;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(28, 48, 35, 0.045);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.brand-row {
  min-height: 42px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-mark {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-strong);
  font-size: 19px;
}

.brand-identity h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 760;
  line-height: 1;
}

.book-mark {
  display: none;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  background: var(--panel-soft);
  box-shadow: none;
  color: var(--text);
  font-size: 18px;
}

.view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: var(--panel-soft);
  padding: 4px;
}

.view-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 680;
}

.view-tab svg {
  font-size: 16px;
}

.view-tab.active {
  background: var(--panel-solid);
  box-shadow: 0 2px 9px rgba(28, 48, 35, 0.08);
  color: var(--text);
}

.view-tab:focus-visible,
.theme-toggle:focus-visible {
  outline: none;
}

.search-field {
  min-height: 42px;
  margin-top: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: none;
  padding: 0 12px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 620;
}

.search-field > svg {
  font-size: 17px;
}

.search-field:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--green-soft);
}

.search-field input {
  min-height: 40px;
}

main {
  gap: 20px;
  margin-top: 16px;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading h2 {
  font-size: 18px;
  font-weight: 760;
}

.parking-section {
  width: calc(100% + 28px);
  max-width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 0 14px 14px;
  border: 0;
}

.parking-rail {
  grid-auto-columns: 168px;
  gap: 10px;
  padding: 2px 18px 8px 0;
}

.content-card {
  --type-accent: var(--review-accent);
  border: 0;
  background: var(--panel-solid);
  box-shadow: var(--surface-shadow);
}

.content-card[data-type="review"],
.content-card[data-type="giveaway"] {
  background: var(--panel-solid);
  border-color: transparent;
}

.content-card[data-type="review"] {
  --type-accent: var(--review-accent);
}

.content-card[data-type="giveaway"] {
  --type-accent: var(--giveaway-accent);
}

.content-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--type-accent);
}

.parking-rail .content-card {
  border: 0;
  box-shadow: var(--surface-shadow), inset 0 3px 0 var(--type-accent);
}

.parking-rail .content-card::before {
  display: none;
}

.content-card[data-parked="true"] {
  grid-template-rows: minmax(44px, auto) 26px;
  width: 168px;
  min-height: 94px;
  max-height: 94px;
  padding: 13px 11px 10px;
}

.content-card h3 {
  font-size: 15px;
  font-weight: 740;
  line-height: 1.18;
}

.meta-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.status-row {
  gap: 5px;
}

.status-pill {
  width: 27px;
  min-width: 27px;
  height: 25px;
  min-height: 25px;
  border: 0;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--faint);
  padding: 0;
  font-size: 13px;
}

.status-pill.done {
  border: 0;
  background: var(--green-soft);
  color: var(--green-strong);
}

.content-card[data-parked="true"] .status-row {
  gap: 5px;
}

.content-card[data-parked="true"] .status-pill {
  width: 100%;
}

.month-list {
  gap: 18px;
}

.month-group {
  border: 0;
  padding-bottom: 0;
}

.month-header {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
  padding: 0 2px;
}

.month-header strong {
  font-size: 19px;
  font-weight: 760;
}

.month-header small {
  min-width: 25px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  text-align: center;
}

.month-header .chevron {
  display: grid;
  place-items: center;
  font-size: 16px;
}

.month-items {
  gap: 9px;
  padding: 4px 0 0;
}

.month-items .content-card,
.month-items .content-card[data-fixed-date="true"] {
  min-height: 64px;
  margin: 0;
  padding: 11px 112px 11px 14px;
  border: 0;
  box-shadow: var(--surface-shadow);
}

.month-items .content-card[data-fixed-date="true"] {
  padding-right: 128px;
  box-shadow: var(--surface-shadow), inset 0 0 0 1px rgba(202, 92, 97, 0.28);
}

.month-items .content-card .status-row {
  right: 10px;
  bottom: 10px;
}

.content-card[data-fixed-date="true"] {
  border-color: transparent;
}

.content-card[data-fixed-date="true"]::after {
  top: 9px;
  right: 9px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 11px;
}

.calendar-toolbar {
  min-height: 54px;
  margin-bottom: 10px;
  border: 0;
  background: var(--panel-solid);
  box-shadow: var(--surface-shadow);
  padding: 6px 8px;
}

.calendar-toolbar strong {
  font-size: 17px;
  font-weight: 740;
}

.calendar-toolbar .small-button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-soft);
  box-shadow: none;
  padding: 0;
  font-size: 18px;
}

.desktop-calendar {
  gap: 1px;
  border: 0;
  border-radius: 8px;
  background: var(--line-soft);
  box-shadow: var(--surface-shadow);
}

.calendar-cell,
.calendar-cell:nth-child(7n),
.calendar-cell:nth-last-child(-n + 7) {
  min-height: 104px;
  border: 0;
  background: var(--panel-solid);
}

.calendar-cell.outside {
  background: var(--panel-soft);
}

.calendar-cell .content-card {
  box-shadow: inset 0 3px 0 var(--type-accent);
}

.calendar-cell .content-card::before {
  display: none;
}

.calendar-cell .content-card[data-type="review"] {
  background: var(--review-bg);
}

.calendar-cell .content-card[data-type="giveaway"] {
  background: var(--giveaway-bg);
}

.calendar-cell .status-pill {
  border: 0;
  background: var(--panel-soft);
}

.calendar-cell .status-pill.done {
  background: var(--green-soft);
}

.giveaway-bar {
  height: 7px;
  background: var(--giveaway-accent);
  line-height: 7px;
}

.floating-add-button {
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 58px;
  height: 58px;
  border: 0;
  background: var(--green);
  box-shadow: 0 12px 30px rgba(24, 101, 66, 0.28);
  font-size: 25px;
}

.drawer-backdrop {
  background: rgba(24, 34, 27, 0.26);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.detail-drawer {
  max-height: 94svh;
  padding: 16px 18px max(18px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--panel-solid);
  box-shadow: 0 -12px 55px rgba(28, 48, 35, 0.18);
}

.drawer-header {
  margin-bottom: 4px;
}

.drawer-kicker-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.drawer-kicker-row .eyebrow {
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.type-switch {
  display: inline-flex;
  width: auto;
  min-width: 0;
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 3px;
}

.type-switch button {
  min-height: 27px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 11px;
  font-size: 11px;
  font-weight: 760;
}

.type-switch button.active {
  background: var(--panel-solid);
  box-shadow: 0 2px 7px rgba(28, 48, 35, 0.08);
  color: var(--text);
}

.title-editor {
  font-size: 25px;
  font-weight: 780;
  line-height: 1.12;
}

#closeDrawerButton {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel-soft);
  font-size: 19px;
}

form {
  gap: 14px;
}

label {
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 710;
}

input,
select,
textarea {
  border: 0;
  border-radius: 8px;
  background: var(--field-bg);
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--green-soft);
}

input[type="date"] {
  min-height: 44px;
}

.fixed-date-toggle {
  min-height: 32px;
  border: 0;
  background: var(--panel-soft);
  padding: 5px 10px 5px 6px;
}

.fixed-date-toggle span {
  background: var(--panel-solid);
}

.status-grid {
  gap: 8px;
}

.status-toggle {
  min-height: 58px;
  border: 0;
  background: var(--panel-soft);
  padding: 7px 5px;
}

.status-toggle span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel-solid);
  color: var(--muted);
  font-size: 15px;
}

.status-toggle strong {
  font-size: 11px;
  font-weight: 720;
}

.status-toggle.active {
  border: 0;
  background: var(--green-soft);
  color: var(--green-strong);
}

.status-toggle.active span {
  background: var(--panel-solid);
  color: var(--green-strong);
}

.subpage-heading p,
.subpage-field > p,
.subpage-field p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.mini-add-button {
  width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-soft);
  font-size: 16px;
}

.subpage-list {
  gap: 6px;
}

.subpage-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: none;
  padding: 11px 12px;
}

.subpage-button span {
  color: var(--text);
  font-size: 14px;
  font-weight: 580;
}

.subpage-button > svg {
  color: var(--faint);
  font-size: 18px;
}

#notesInput {
  min-height: 112px;
}

.drawer-actions {
  position: sticky;
  bottom: calc(-18px - env(safe-area-inset-bottom));
  z-index: 2;
  margin: 2px -18px calc(-18px - env(safe-area-inset-bottom));
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.primary-button,
.danger-button {
  min-height: 46px;
  border-radius: 8px;
}

.primary-button {
  background: var(--green);
}

.danger-button {
  border: 0;
  background: var(--panel-soft);
}

.editor-page {
  gap: 14px;
  background: var(--panel-solid);
}

.editor-header h2 {
  font-size: 23px;
  font-weight: 780;
}

.editor-header .small-button,
.editor-header .icon-button {
  border: 0;
  border-radius: 50%;
  background: var(--panel-soft);
  box-shadow: none;
}

.editor-toolbar {
  border: 0;
  background: var(--panel-soft);
  box-shadow: none;
  padding: 6px;
}

.editor-toolbar button {
  font-size: 17px;
}

.unicode-panel {
  border: 0;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.unicode-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unicode-panel-header strong {
  font-size: 14px;
  font-weight: 760;
}

.unicode-panel-header button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 0;
  font-size: 16px;
}

.unicode-controls,
.unicode-controls input {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.unicode-actions button:disabled {
  opacity: 0.38;
  cursor: default;
}

.editor-page.unicode-open .rich-editor {
  visibility: visible;
  overflow: auto;
  color: var(--text);
  caret-color: transparent;
  pointer-events: none;
}

.editor-page.unicode-open .rich-editor::before {
  display: none !important;
  content: none !important;
}

.editor-page.unicode-open .rich-editor:empty::before {
  display: block !important;
  content: attr(data-placeholder) !important;
}

.unicode-style-row button,
.unicode-preview,
.unicode-actions button {
  border: 0;
}

@media (min-width: 760px) {
  .app-shell {
    max-width: 1280px;
    padding: 32px 40px 48px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(260px, 420px);
    gap: 12px 20px;
    margin: -32px -40px 0;
    padding: 32px 40px 16px;
  }

  .brand-row {
    grid-column: 1 / -1;
  }

  .view-tabs {
    grid-column: 1;
    width: 330px;
    margin-top: 0;
  }

  .search-field {
    grid-column: 2;
    width: 100%;
    margin-top: 0;
  }

  main {
    margin-top: 32px;
  }

  .parking-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 14px;
  }

  .parking-rail {
    grid-auto-columns: 230px;
  }

  .content-card[data-parked="true"] {
    width: 230px;
  }

  .month-items {
    padding-left: 0;
  }

  .detail-drawer {
    border-radius: 14px;
  }
}

/* Compact month cards: titles and status always occupy separate rows. */
.calendar-status-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: -2px 2px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.calendar-status-key span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.calendar-status-key svg {
  width: 17px;
  height: 17px;
  padding: 3px;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green-strong);
  stroke-width: 2.4;
}

.desktop-calendar {
  background: rgba(29, 53, 38, 0.065);
}

.calendar-cell,
.calendar-cell:nth-child(7n),
.calendar-cell:nth-last-child(-n + 7) {
  min-height: 108px;
  padding: 5px 3px 6px;
}

.calendar-cell-header {
  min-height: 16px;
  margin: 0 2px 5px;
}

.calendar-cell-header span {
  font-size: 9px;
  font-weight: 720;
}

.calendar-cell-header strong {
  font-size: 11px;
  font-weight: 780;
}

.calendar-cell .day-items {
  gap: 4px;
}

.calendar-cell .content-card {
  grid-template-rows: minmax(25px, 1fr) 17px;
  min-height: 61px;
  max-height: 66px;
  gap: 3px;
  overflow: hidden;
  padding: 6px 4px 4px;
  border-radius: 7px;
  box-shadow: inset 0 3px 0 var(--type-accent), 0 2px 5px rgba(28, 48, 35, 0.055);
}

.calendar-cell .content-card-main,
.calendar-cell .content-card-main > div {
  min-height: 0;
  overflow: hidden;
}

.calendar-cell .content-card h3 {
  display: -webkit-box;
  max-height: 24px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.16;
}

.calendar-cell .content-card[data-fixed-date="true"] h3 {
  padding-right: 10px;
}

.calendar-cell .content-card[data-fixed-date="true"]::after {
  top: 4px;
  right: 3px;
  width: 11px;
  height: 11px;
  font-size: 7px;
}

.calendar-cell .status-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: end;
  width: 100%;
  height: 17px;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.calendar-cell .status-pill {
  display: grid;
  width: 100%;
  min-width: 0;
  height: 17px;
  min-height: 17px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  color: #919b94;
}

.calendar-cell .status-pill svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.5;
}

.calendar-cell .status-pill.done {
  background: var(--green);
  color: #ffffff;
}

[data-theme="dark"] .desktop-calendar {
  background: rgba(235, 242, 236, 0.07);
}

[data-theme="dark"] .calendar-cell .status-pill {
  background: rgba(255, 255, 255, 0.09);
  color: #9ca69e;
}

[data-theme="dark"] .calendar-cell .status-pill.done {
  background: var(--green);
  color: #102319;
}

@media (min-width: 760px) {
  .calendar-status-key {
    width: max-content;
    grid-template-columns: repeat(3, auto);
    gap: 18px;
    margin: 0 2px 12px auto;
    font-size: 12px;
  }

  .calendar-cell,
  .calendar-cell:nth-child(7n),
  .calendar-cell:nth-last-child(-n + 7) {
    min-height: 170px;
    padding: 8px;
  }

  .calendar-cell .content-card {
    grid-template-rows: minmax(37px, 1fr) 24px;
    min-height: 88px;
    max-height: none;
    padding: 9px 8px 7px;
  }

  .calendar-cell .content-card h3 {
    max-height: 35px;
    font-size: 14px;
    line-height: 1.2;
  }

  .calendar-cell .status-row,
  .calendar-cell .status-pill {
    height: 24px;
    min-height: 24px;
  }

  .calendar-cell .status-pill svg {
    width: 13px;
    height: 13px;
  }
}
