:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-strong: #f0f4f3;
  --surface-muted: #f4f6f7;
  --surface-raised: #f8fafb;
  --field-bg: #ffffff;
  --control-bg: #ffffff;
  --day-bg: #ffffff;
  --today-bg: #f7fcfb;
  --event-bg: #f8fafb;
  --event-bg-hover: #ffffff;
  --ink: #202124;
  --ink-on-brand: #ffffff;
  --event-ink: #17212a;
  --label: #35424e;
  --pill-ink: #43515d;
  --muted: #65717d;
  --line: #d8dee6;
  --line-strong: #b8c2cc;
  --brand: #147a73;
  --brand-strong: #0d5f5a;
  --brand-soft: #dff0ed;
  --danger: #b73535;
  --danger-line: #d79b95;
  --danger-soft: #f8e5e2;
  --focus: #f0b429;
  --topbar-bg: rgba(247, 248, 250, 0.92);
  --auth-glow-a: rgba(20, 122, 115, 0.10);
  --auth-glow-b: rgba(182, 91, 141, 0.11);
  --modal-backdrop: rgba(20, 24, 28, 0.48);
  --swatch-ring: #ffffff;
  --toast-bg: #202124;
  --shadow: 0 18px 55px rgba(26, 37, 47, 0.12);
  --soft-shadow: 0 12px 35px rgba(26, 37, 47, 0.06);
  --radius: 8px;
  --teal: #147a73;
  --blue: #2d6cdf;
  --rose: #b65b8d;
  --amber: #d1843f;
  --green: #4d8648;
  --violet: #7657c5;
  --graphite: #4d5862;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141614;
  --surface: #1d211f;
  --surface-strong: #232b27;
  --surface-muted: #191d1b;
  --surface-raised: #242a27;
  --field-bg: #151917;
  --control-bg: #222724;
  --day-bg: #181c1a;
  --today-bg: #192a27;
  --event-bg: #222724;
  --event-bg-hover: #29302c;
  --ink: #f3f1ea;
  --ink-on-brand: #ffffff;
  --event-ink: #f5f1e8;
  --label: #d9d3c5;
  --pill-ink: #e2dbcf;
  --muted: #aaa99f;
  --line: #343b37;
  --line-strong: #4c5650;
  --brand: #35a69a;
  --brand-strong: #64c2b7;
  --brand-soft: #183a36;
  --danger: #ff9d92;
  --danger-line: #7c423c;
  --danger-soft: #3b2321;
  --topbar-bg: rgba(20, 22, 20, 0.92);
  --auth-glow-a: rgba(53, 166, 154, 0.14);
  --auth-glow-b: rgba(182, 91, 141, 0.15);
  --modal-backdrop: rgba(0, 0, 0, 0.62);
  --swatch-ring: #1d211f;
  --toast-bg: #f3f1ea;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  --soft-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.color-teal {
  --chip-color: var(--teal);
  --swatch-color: var(--teal);
}

.color-blue {
  --chip-color: var(--blue);
  --swatch-color: var(--blue);
}

.color-rose {
  --chip-color: var(--rose);
  --swatch-color: var(--rose);
}

.color-amber {
  --chip-color: var(--amber);
  --swatch-color: var(--amber);
}

.color-green {
  --chip-color: var(--green);
  --swatch-color: var(--green);
}

.color-violet {
  --chip-color: var(--violet);
  --swatch-color: var(--violet);
}

.color-graphite {
  --chip-color: var(--graphite);
  --swatch-color: var(--graphite);
}

.board-pink {
  --note-bg: #ffd7e8;
  --note-line: #eb9fbd;
}

.board-butter {
  --note-bg: #fff2a8;
  --note-line: #dcc65c;
}

.board-mint {
  --note-bg: #c9f3d3;
  --note-line: #7ecb91;
}

.board-sky {
  --note-bg: #cde9ff;
  --note-line: #7db9e8;
}

.board-lavender {
  --note-bg: #e2d8ff;
  --note-line: #a792e7;
}

.board-peach {
  --note-bg: #ffd4b8;
  --note-line: #e7a172;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(120deg, var(--auth-glow-a), transparent 42%),
    linear-gradient(300deg, var(--auth-glow-b), transparent 48%),
    var(--bg);
}

.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-lockup .theme-toggle {
  margin-left: auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--ink-on-brand);
  background: var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(20, 122, 115, 0.18);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

.brand-text h1,
.brand-text p {
  margin: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text h1 {
  font-size: 1.45rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand-text p {
  color: var(--muted);
  margin-top: 4px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

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

label {
  color: var(--label);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(240, 180, 41, 0.42);
  outline-offset: 2px;
}

.error {
  min-height: 20px;
  margin: 0 0 14px;
  color: var(--danger);
  font-size: 0.92rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar .brand-lockup {
  margin: 0;
}

.top-actions,
.nav-cluster,
.view-tabs,
.filter-tabs,
.modal-actions,
.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.side-link-actions {
  margin-top: 12px;
}

.button,
.icon-button,
.tab-button,
.danger-button,
.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--ink);
  padding: 9px 13px;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.title-edit-button {
  width: 30px;
  min-height: 30px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.title-edit-button:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: rgba(20, 122, 115, 0.2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.title-edit-button svg {
  width: 16px;
  height: 16px;
}

.primary-button {
  min-height: 42px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--ink-on-brand);
  padding: 10px 14px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(20, 122, 115, 0.2);
}

.primary-button:hover {
  background: var(--brand-strong);
}

.ghost-button {
  background: transparent;
}

.danger-button {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

.tab-button {
  min-height: 36px;
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.tab-button[aria-pressed="true"] {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: rgba(20, 122, 115, 0.22);
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  padding: 22px clamp(16px, 3vw, 32px) 36px;
}

.calendar-area,
.side-area {
  min-width: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
}

.toolbar-groups {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-frame,
.side-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

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

.weekday {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.day-cell {
  position: relative;
  min-height: 132px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--day-bg);
}

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

.day-cell.is-muted {
  background: var(--surface-muted);
  color: var(--muted);
}

.day-cell.is-today {
  background: var(--today-bg);
  box-shadow: inset 0 0 0 2px rgba(20, 122, 115, 0.22);
}

.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.day-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 900;
}

.is-today .day-number {
  color: var(--ink-on-brand);
  background: var(--brand);
}

.add-day {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.add-day:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: rgba(20, 122, 115, 0.2);
}

.event-stack {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.event-chip {
  width: 100%;
  min-height: 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  text-align: left;
  color: var(--event-ink);
  background: var(--event-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--chip-color, var(--teal));
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
}

.event-chip:hover {
  border-color: var(--line-strong);
  background: var(--event-bg-hover);
}

.event-time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

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

.month-grid .event-chip {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2px;
}

.month-grid .event-time {
  font-size: 0.7rem;
}

.more-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.week-day {
  min-height: 540px;
  border-right: 1px solid var(--line);
  background: var(--day-bg);
}

.week-day:last-child {
  border-right: 0;
}

.week-heading {
  min-height: 72px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.week-heading strong,
.week-heading span {
  display: block;
}

.week-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.week-events {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.agenda-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--event-ink);
  background: var(--event-bg);
}

.agenda-item:hover {
  border-color: var(--line-strong);
}

.agenda-stripe {
  width: 6px;
  min-height: 100%;
  border-radius: 999px;
  background: var(--chip-color, var(--teal));
}

.agenda-copy {
  min-width: 0;
}

.agenda-copy h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.agenda-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--pill-ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.side-area {
  display: grid;
  gap: 14px;
  align-content: start;
}

.side-panel {
  padding: 16px;
}

.side-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.today-block {
  display: grid;
  gap: 8px;
}

.today-date {
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 950;
}

.today-copy {
  color: var(--muted);
  font-weight: 750;
}

.mini-agenda {
  display: grid;
  gap: 8px;
}

.notification-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.mini-event {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--chip-color, var(--teal));
  border-radius: var(--radius);
  color: var(--event-ink);
  background: var(--event-bg);
  text-align: left;
}

.mini-event strong {
  overflow-wrap: anywhere;
}

.mini-event span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.board-page {
  grid-template-columns: minmax(0, 1fr);
}

.board-shell {
  min-width: 0;
}

.board-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.corkboard-frame {
  padding: 14px;
  border: 1px solid rgba(116, 78, 44, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(78, 46, 24, 0.22), rgba(255, 255, 255, 0.16)),
    #9c6b42;
  box-shadow: var(--shadow);
}

.corkboard {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 18px 24px, rgba(92, 58, 31, 0.22) 0 2px, transparent 2px 11px),
    radial-gradient(circle at 48px 42px, rgba(255, 227, 174, 0.2) 0 2px, transparent 2px 13px),
    linear-gradient(25deg, rgba(255, 207, 139, 0.34), transparent 42%),
    #c58a55;
  background-size: 64px 64px, 78px 78px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 245, 225, 0.22), inset 0 0 48px rgba(82, 48, 24, 0.22);
}

.corkboard.is-dragging-over {
  outline: 4px solid rgba(255, 242, 168, 0.72);
  outline-offset: -10px;
}

.corkboard-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 24%, rgba(92, 58, 31, 0.08) 48%, transparent 72%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05), transparent 36%, rgba(92, 58, 31, 0.08));
  mix-blend-mode: soft-light;
}

.board-empty {
  position: absolute;
  inset: 32px;
  display: grid;
  place-content: center;
  gap: 8px;
  color: rgba(67, 38, 20, 0.76);
  text-align: center;
  font-weight: 900;
}

.board-empty span {
  max-width: 320px;
  font-size: 0.92rem;
}

.board-item {
  position: absolute;
  display: grid;
  gap: 10px;
  color: #322218;
  border: 0;
  text-align: left;
  transform: rotate(var(--tilt));
  transform-origin: 50% 16px;
  cursor: grab;
  touch-action: none;
}

.board-item:active {
  cursor: grabbing;
}

.board-note {
  min-height: 154px;
  padding: 26px 18px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 36%),
    var(--note-bg);
  border: 1px solid var(--note-line);
  border-radius: 4px;
  box-shadow: 0 16px 28px rgba(64, 38, 20, 0.22);
}

.board-note-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 760;
}

.board-pin {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 2px, transparent 3px),
    #d94d63;
  box-shadow: 0 3px 7px rgba(48, 20, 20, 0.32);
  transform: translateX(-50%);
}

.board-byline {
  align-self: end;
  color: rgba(50, 34, 24, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
}

.board-photo {
  padding: 12px 12px 14px;
  background: #fffaf1;
  border-radius: 3px;
  box-shadow: 0 18px 32px rgba(64, 38, 20, 0.24);
}

.board-photo img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #f2eee5;
  border-radius: 2px;
}

.board-caption {
  padding: 0 2px;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 800;
}

.board-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 84px;
  height: 28px;
  background: rgba(255, 240, 186, 0.82);
  border-left: 1px dashed rgba(139, 102, 47, 0.34);
  border-right: 1px dashed rgba(139, 102, 47, 0.34);
  box-shadow: 0 4px 10px rgba(80, 48, 24, 0.12);
  transform: translateX(-50%) rotate(-2deg);
}

.board-item.is-archived {
  opacity: 0.68;
  filter: saturate(0.72);
}

.board-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.board-swatch {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.board-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.board-swatch span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--note-bg);
  border: 1px solid var(--note-line);
}

.board-swatch input:checked + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.board-image-preview {
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.board-image-preview img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--modal-backdrop);
}

.modal {
  width: min(100%, 620px);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-body {
  padding: 20px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 18px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  position: relative;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch span {
  width: 34px;
  height: 34px;
  display: block;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 4px var(--swatch-ring), 0 0 0 1px var(--line-strong);
}

.swatch input:checked + span {
  border-color: var(--ink);
}

.modal-actions {
  justify-content: space-between;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.modal-actions .right-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  color: var(--bg);
  background: var(--toast-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 1060px) {
  .page {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .toolbar-groups,
  .view-tabs,
  .filter-tabs {
    width: 100%;
  }

  .view-tabs,
  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filter-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }

  .month-grid,
  .week-grid {
    display: block;
  }

  .weekday {
    display: none;
  }

  .day-cell {
    min-height: 116px;
    border-right: 0;
  }

  .day-cell.is-muted {
    display: none;
  }

  .week-day {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .week-day:last-child {
    border-bottom: 0;
  }

  .side-area {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px;
  }

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

  .board-actions .ghost-button {
    grid-column: 1 / -1;
  }

  .corkboard-frame {
    padding: 10px;
  }

  .corkboard {
    min-height: 0;
    height: min(720px, 128vw);
    min-height: 520px;
  }

  .board-empty {
    min-height: 220px;
  }

  .board-photo img {
    max-height: 420px;
  }
}

@media (max-width: 460px) {
  .brand-text h1 {
    font-size: 1.2rem;
  }

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

  .top-actions .nav-cluster {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    width: 100%;
  }

  .top-actions .theme-toggle {
    width: 42px;
  }

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

  .board-actions {
    grid-template-columns: 1fr;
  }

  .button,
  .primary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .modal-actions,
  .modal-actions .right-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
