:root {
  --kin-navy: #0d2f5b;
  --kin-teal: #19b5b0;
  --kin-line: rgba(13, 47, 91, 0.12);
  --kin-text: #16304f;
  --kin-white: #ffffff;
  --kin-shadow: 0 12px 28px rgba(13, 47, 91, 0.09);
  --kin-radius-xl: 10px;
  --kin-radius-lg: 8px;
}

html {
  font-size: 13px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--kin-text);
  background:
    radial-gradient(circle at top left, rgba(25, 181, 176, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(13, 47, 91, 0.07), transparent 18%),
    linear-gradient(180deg, #cad7e0 0%, #b9c8d4 100%);
}

body[data-theme="dark"] {
  color: #dbe7f5;
  background:
    radial-gradient(circle at top left, rgba(25, 181, 176, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(75, 121, 178, 0.14), transparent 24%),
    linear-gradient(180deg, #08121e 0%, #0d1624 100%);
}

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

a:hover {
  color: inherit;
}

.kin-body {
  min-height: 100vh;
}

.kin-shell {
  display: grid;
  position: relative;
  width: min(1680px, calc(100% - 32px));
  margin: 0 auto;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.kin-sidebar-overlay,
.kin-topbar-menu-toggle {
  display: none;
}

.kin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: 100vh;
  padding: 0.9rem 0.65rem 0.9rem 0.55rem;
  background: linear-gradient(180deg, rgba(13, 47, 91, 0.98), rgba(9, 27, 52, 0.98));
  color: var(--kin-white);
}

.kin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--kin-radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.kin-sidebar-brand strong,
.kin-topbar-brand strong,
.kin-user-meta strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.kin-sidebar-brand span,
.kin-topbar-brand span,
.kin-user-meta span {
  display: block;
  font-size: 0.9rem;
  opacity: 0.78;
}

.kin-sidebar-brand-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.kin-user-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem;
  border-radius: var(--kin-radius-xl);
  background: linear-gradient(160deg, rgba(25, 181, 176, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kin-user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(160deg, rgba(25, 181, 176, 0.28), rgba(255, 255, 255, 0.1));
}

.kin-user-avatar,
.kin-user-avatar-image {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.kin-user-avatar {
  display: grid;
  place-items: center;
  background: var(--kin-white);
  color: var(--kin-teal);
  font-size: 1.6rem;
  font-weight: 800;
}

.kin-user-avatar-image {
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.14);
}

.kin-sidebar-nav {
  display: grid;
  gap: 0.28rem;
}

.kin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.82rem;
  padding: 0.82rem 0.95rem;
  border-radius: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  transition: 0.2s ease;
}

.kin-nav-link span {
  line-height: 1.15;
}

.kin-nav-icon {
  width: 1.18rem;
  height: 1.18rem;
  flex: 0 0 1.18rem;
  object-fit: contain;
  opacity: 0.98;
}

.kin-nav-link:hover,
.kin-nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--kin-white);
  transform: translateX(4px);
}

.kin-nav-link:hover .kin-nav-icon,
.kin-nav-link.active .kin-nav-icon {
  opacity: 1;
}

.kin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.2rem 0.95rem 0.95rem;
  backdrop-filter: blur(16px);
  background: rgba(212, 223, 232, 0.96);
  border-bottom: 1px solid var(--kin-line);
}

.kin-topbar-menu-toggle {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(13, 47, 91, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0;
}

.kin-topbar-menu-toggle span {
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: var(--kin-navy);
}

.kin-topbar-brand {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.kin-topbar-logo {
  width: clamp(180px, 22vw, 300px);
  max-height: 76px;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.kin-topbar-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.kin-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.15rem 1.2rem 1.15rem 0.95rem;
}

.kin-page {
  display: grid;
  gap: 1.1rem;
}

.kin-page-narrow {
  max-width: 980px;
}

.kin-page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.kin-page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 600;
}

.kin-page-header p {
  margin: 0.3rem 0 0;
  color: rgba(22, 48, 79, 0.72);
}

.kin-section-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--kin-teal);
}

.kin-card,
.kin-panel,
.kin-hero,
.kin-form-card,
.kin-empty {
  border: 1px solid var(--kin-line);
  border-radius: var(--kin-radius-xl);
  background: linear-gradient(180deg, rgba(228, 237, 243, 0.98), rgba(214, 225, 234, 0.97));
  box-shadow: var(--kin-shadow);
}

.kin-card,
.kin-panel,
.kin-form-card,
.kin-empty {
  padding: 1.05rem;
}

.kin-card-link {
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kin-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(25, 181, 176, 0.28);
}

.kin-panel > .kin-list > .kin-group-card,
.kin-panel > .kin-list > a.kin-group-card,
.kin-panel > .kin-empty,
.kin-panel > .kin-timeline-rail,
.kin-panel > .kin-notice-stream-wrap,
.kin-form-card > .kin-panel,
.kin-form-card > .kin-inline-explainer .kin-explainer-card,
.kin-form-card > .kin-form-switch,
.kin-form-card > .kin-inline-note {
  box-shadow: none;
}

.kin-form-card > .kin-panel {
  padding: 0.15rem 0 0.1rem;
  border: none;
  border-top: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 0;
  background: transparent;
}

.kin-panel > .kin-list > .kin-group-card,
.kin-panel > .kin-list > a.kin-group-card {
  padding: 0.9rem 0.2rem;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.kin-panel > .kin-list > .kin-group-card:last-child,
.kin-panel > .kin-list > a.kin-group-card:last-child {
  border-bottom: none;
  padding-bottom: 0.1rem;
}

.kin-panel > .kin-empty {
  padding: 0.9rem 0.2rem 0.1rem;
  border: none;
  border-top: 1px dashed rgba(13, 47, 91, 0.14);
  border-radius: 0;
  background: transparent;
}

.kin-panel > .kin-timeline-rail,
.kin-panel > .kin-notice-stream-wrap {
  border-radius: 10px;
  box-shadow: none;
}

.kin-hero {
  position: relative;
  overflow: hidden;
  padding: 1.65rem;
  background:
    linear-gradient(135deg, rgba(13, 47, 91, 0.95), rgba(25, 181, 176, 0.84)),
    linear-gradient(180deg, #fff, #fff);
  color: var(--kin-white);
}

.kin-hero::after {
  content: "";
  position: absolute;
  inset: auto -3rem -3rem auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.kin-hero h1,
.kin-hero h2 {
  font-weight: 600;
}

.kin-hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.86);
}

.kin-hero-grid,
.kin-stats-grid,
.kin-groups-grid,
.kin-plan-grid,
.kin-quick-grid {
  display: grid;
  gap: 0.85rem;
}

.kin-hero-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.kin-hero-grid .kin-card {
  background: linear-gradient(180deg, rgba(244, 248, 251, 0.95), rgba(229, 237, 242, 0.94));
  border-color: rgba(255, 255, 255, 0.22);
}

.kin-hero-grid .kin-card h2,
.kin-hero-grid .kin-card .h4 {
  color: var(--kin-navy);
}

.kin-hero-grid .kin-card p,
.kin-hero-grid .kin-card .kin-muted {
  color: rgba(22, 48, 79, 0.78);
}

.kin-hero-grid .kin-card .kin-badge {
  background: rgba(25, 181, 176, 0.16);
  color: #0d6f6b;
}

.kin-stats-grid,
.kin-groups-grid,
.kin-plan-grid,
.kin-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.kin-groups-grid-single {
  grid-template-columns: minmax(0, 980px);
}

.kin-stat-value {
  font-size: 1.3rem;
  font-weight: 500;
  color: #0d6f6b;
}

.kin-muted {
  color: rgba(22, 48, 79, 0.66);
}

.kin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(25, 181, 176, 0.2);
  color: #0d6f6b;
}

.kin-badge.outline {
  background: transparent;
  border: 1px solid rgba(13, 47, 91, 0.16);
  color: var(--kin-teal);
}

.kin-badge.navy {
  background: rgba(13, 47, 91, 0.1);
  color: #0d6f6b;
}

.kin-actions,
.kin-auth-actions,
.kin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.kin-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--kin-teal);
  color: var(--kin-white);
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kin-primary-button {
  border-radius: 8px;
  background: var(--kin-teal);
  border-color: var(--kin-teal);
  color: var(--kin-white);
  font-weight: 800;
}

.kin-action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25, 181, 176, 0.24);
}

.kin-primary-button:hover,
.kin-primary-button:focus {
  background: #16a5a0;
  border-color: #16a5a0;
  color: var(--kin-white);
  box-shadow: 0 10px 24px rgba(25, 181, 176, 0.24);
}

.kin-action-button.ghost {
  background: transparent;
  border: 1px solid rgba(13, 47, 91, 0.2);
  color: var(--kin-teal);
}

.kin-action-button.subtle {
  background: rgba(13, 47, 91, 0.08);
  color: var(--kin-teal);
}

.kin-action-button.danger {
  background: #b4414c;
  color: #fff;
  box-shadow: none;
}

.kin-action-button.danger:hover,
.kin-action-button.danger:focus {
  background: #983743;
  color: #fff;
  box-shadow: 0 10px 22px rgba(180, 65, 76, 0.18);
}

.kin-topbar .kin-action-button.ghost {
  border-color: rgba(13, 47, 91, 0.12);
}

.kin-list {
  display: grid;
  gap: 0.8rem;
}

.kin-upcoming-list {
  gap: 0.65rem;
}

.kin-upcoming-item {
  border: 1px solid var(--kin-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.44);
  overflow: hidden;
}

.kin-upcoming-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  list-style: none;
  cursor: pointer;
}

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

.kin-upcoming-summary-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.kin-upcoming-avatar,
.kin-upcoming-avatar img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
}

.kin-upcoming-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 2.2rem;
  overflow: hidden;
  background: rgba(25, 181, 176, 0.18);
  color: var(--kin-teal);
  font-size: 0.84rem;
  font-weight: 900;
  border: 1px solid rgba(25, 181, 176, 0.22);
}

.kin-upcoming-avatar img {
  object-fit: cover;
}

.kin-upcoming-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.kin-upcoming-copy strong {
  font-size: 1rem;
  color: var(--kin-text);
}

.kin-upcoming-date {
  font-size: 0.86rem;
  font-weight: 800;
  color: rgba(22, 48, 79, 0.72);
  text-transform: capitalize;
}

.kin-expand-mark {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 47, 91, 0.08);
  color: var(--kin-teal);
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.kin-upcoming-item[open] .kin-expand-mark {
  transform: rotate(45deg);
  background: rgba(25, 181, 176, 0.16);
}

.kin-upcoming-body {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(13, 47, 91, 0.08);
}

.kin-timeline-rail {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(25, 181, 176, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(221, 231, 238, 0.98), rgba(207, 220, 229, 0.97));
}

.kin-timeline-shell-copy {
  display: grid;
  gap: 0.2rem;
}

.kin-timeline-shell-copy p {
  margin: 0;
  color: rgba(22, 48, 79, 0.86);
}

.kin-timeline-rail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.kin-timeline-rail-head p {
  max-width: 740px;
  color: rgba(22, 48, 79, 0.72);
}

.kin-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  color: rgba(22, 48, 79, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
}

.kin-timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.kin-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.kin-dot.free {
  background: rgba(13, 47, 91, 0.18);
}

.kin-dot.personal {
  background: rgba(25, 181, 176, 0.82);
}

.kin-dot.group {
  background: rgba(13, 47, 91, 0.82);
}

.kin-dot.mixed {
  background: linear-gradient(135deg, rgba(25, 181, 176, 0.95), rgba(13, 47, 91, 0.95));
}

.kin-day-viewport {
  overflow-x: auto;
  padding-top: 0.45rem;
  padding-bottom: 0.35rem;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 47, 91, 0.28) transparent;
}

.kin-day-viewport.is-dragging {
  cursor: grabbing;
}

.kin-day-viewport::-webkit-scrollbar {
  height: 0.55rem;
}

.kin-day-viewport::-webkit-scrollbar-thumb {
  background: rgba(13, 47, 91, 0.24);
  border-radius: 999px;
}

.kin-day-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4.5rem) / 7);
  gap: 0.65rem;
  align-items: stretch;
}

.kin-day-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  min-height: 134px;
  padding: 0.8rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  color: var(--kin-teal);
  background: linear-gradient(180deg, rgba(233, 240, 245, 0.98), rgba(217, 227, 235, 0.97));
  box-shadow: 0 12px 28px rgba(13, 47, 91, 0.08);
  scroll-snap-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kin-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(13, 47, 91, 0.12);
}

.kin-day-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(13, 47, 91, 0.22);
  box-shadow: 0 18px 34px rgba(13, 47, 91, 0.16);
}

.kin-day-card.is-today {
  border-color: rgba(25, 181, 176, 0.28);
}

.kin-day-card.is-today::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid rgba(25, 181, 176, 0.26);
  border-radius: 12px;
  pointer-events: none;
}

.kin-day-card.is-free {
  background: linear-gradient(180deg, rgba(231, 239, 244, 0.98), rgba(215, 225, 233, 0.98));
}

.kin-day-card.is-personal {
  background: linear-gradient(180deg, rgba(25, 181, 176, 0.22), rgba(215, 225, 233, 0.98));
}

.kin-day-card.is-group {
  background: linear-gradient(180deg, rgba(13, 47, 91, 0.14), rgba(215, 225, 233, 0.98));
}

.kin-day-card.is-mixed {
  background:
    linear-gradient(150deg, rgba(25, 181, 176, 0.24), rgba(13, 47, 91, 0.12)),
    rgba(215, 225, 233, 0.98);
}

.kin-day-weekday,
.kin-day-month {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(22, 48, 79, 0.64);
}

.kin-day-number {
  margin-top: 0.15rem;
  font-size: clamp(1.4rem, 1.95vw, 1.8rem);
  line-height: 1;
  font-weight: 900;
}

.kin-day-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.45rem;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.kin-day-lines {
  display: grid;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.8rem;
}

.kin-day-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--kin-teal);
}

.kin-day-line.free {
  color: rgba(22, 48, 79, 0.62);
}

.kin-day-avatar {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(13, 47, 91, 0.16);
  border: 1px solid rgba(13, 47, 91, 0.12);
  color: var(--kin-white);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.kin-day-avatar.personal {
  background: rgba(25, 181, 176, 0.78);
  border-color: rgba(25, 181, 176, 0.28);
}

.kin-day-avatar.group {
  background: rgba(13, 47, 91, 0.74);
  border-color: rgba(13, 47, 91, 0.28);
}

.kin-day-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kin-day-count {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(22, 48, 79, 0.72);
}

.kin-day-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(13, 47, 91, 0.08);
}

.kin-day-summary strong {
  font-size: 1rem;
  font-weight: 900;
  color: #0d6f6b;
}

.kin-day-summary span {
  color: rgba(22, 48, 79, 0.72);
  font-weight: 700;
}

.kin-timeline-item,
.kin-group-card,
.kin-plan-card,
.kin-member-row {
  padding: 0.9rem;
  border: 1px solid var(--kin-line);
  border-radius: 10px;
  background: var(--kin-white);
}

.kin-plan-status {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--kin-teal);
}

.kin-plan-status.is-available {
  color: #0d6f6b;
}

.kin-plan-card .kin-action-button[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

.kin-month-planner {
  display: grid;
  gap: 1rem;
}

.kin-month-planner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.kin-month-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.kin-month-nav strong {
  min-width: 10rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  color: var(--kin-teal);
}

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

.kin-month-weekdays span {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(22, 48, 79, 0.56);
}

.kin-month-day {
  display: grid;
  gap: 0.6rem;
  align-content: space-between;
  min-height: 6.1rem;
  padding: 0.75rem;
  border: 1px solid rgba(13, 47, 91, 0.1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(230, 238, 243, 0.98), rgba(214, 224, 232, 0.97));
  box-shadow: 0 10px 22px rgba(13, 47, 91, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kin-month-day:hover {
  transform: translateY(-2px);
  border-color: rgba(25, 181, 176, 0.3);
  box-shadow: 0 14px 28px rgba(13, 47, 91, 0.1);
}

.kin-month-day.outside {
  opacity: 0.54;
  background: rgba(210, 220, 228, 0.96);
}

.kin-month-day.today {
  border-color: rgba(25, 181, 176, 0.26);
}

.kin-month-day.selected {
  border-color: rgba(25, 181, 176, 0.42);
  background: linear-gradient(180deg, rgba(25, 181, 176, 0.18), rgba(214, 224, 232, 0.98));
  box-shadow: 0 16px 34px rgba(13, 47, 91, 0.12);
}

.kin-month-day.busy .kin-month-day-note {
  color: var(--kin-teal);
}

.kin-month-day-number {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--kin-teal);
}

.kin-month-day-note {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(22, 48, 79, 0.72);
}

.kin-month-day-note.free {
  color: rgba(22, 48, 79, 0.5);
}

.kin-timeline-head,
.kin-group-head,
.kin-member-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kin-timeline-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.kin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.6rem;
  color: rgba(22, 48, 79, 0.72);
  font-size: 0.9rem;
}

.kin-form-grid {
  display: grid;
  gap: 0.85rem;
}

.kin-form-stack {
  display: grid;
  gap: 0.9rem;
}

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

.kin-form-grid.recurrence {
  grid-template-columns: minmax(0, 220px) minmax(0, 220px);
  align-items: start;
}

.kin-duration-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 160px) minmax(0, 220px) minmax(0, 1fr);
  align-items: start;
}

.kin-form-card label {
  font-weight: 800;
  color: var(--kin-teal);
}

.kin-form-card .form-control,
.kin-form-card .form-select {
  min-height: 46px;
  border-radius: 8px;
  border-color: rgba(13, 47, 91, 0.14);
}

.kin-form-card .form-control:focus,
.kin-form-card .form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
  border-color: rgba(25, 181, 176, 0.4);
  box-shadow: 0 0 0 0.25rem rgba(25, 181, 176, 0.18);
}

.kin-form-switch {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 8px;
  background: rgba(13, 47, 91, 0.025);
}

.kin-empty {
  text-align: center;
}

.kin-alert {
  border-radius: 10px;
  border: none;
}

.kin-field-help {
  color: rgba(22, 48, 79, 0.64);
  font-size: 0.92rem;
}

.kin-reminder-card {
  display: flex;
  align-items: flex-end;
  min-height: 100%;
  min-width: 0;
}

.kin-reminder-fields {
  margin-top: 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.kin-reminder-grid {
  grid-template-columns: minmax(0, 160px) minmax(0, 220px);
}

.kin-inline-note {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(25, 181, 176, 0.14);
  border-radius: 8px;
  background: rgba(25, 181, 176, 0.06);
  color: var(--kin-text);
  font-weight: 600;
}

.kin-inline-explainer {
  display: grid;
  gap: 0.75rem;
}

.kin-explainer-card {
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(25, 181, 176, 0.14);
  border-radius: 8px;
  background: rgba(25, 181, 176, 0.045);
}

.kin-explainer-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--kin-teal);
}

.kin-explainer-card p {
  color: rgba(22, 48, 79, 0.75);
}

.kin-checkbox-list {
  display: grid;
  gap: 0.75rem;
}

.kin-checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 8px;
  background: rgba(13, 47, 91, 0.015);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.kin-checkbox-card:hover {
  border-color: rgba(25, 181, 176, 0.4);
  background: rgba(25, 181, 176, 0.06);
  transform: translateY(-1px);
}

.kin-checkbox-card span {
  font-weight: 700;
  color: var(--kin-text);
}

.kin-theme-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 10px;
  background: rgba(13, 47, 91, 0.02);
}

.kin-theme-choice-copy {
  display: grid;
  gap: 0.3rem;
}

.kin-theme-choice-copy strong {
  color: var(--kin-teal);
}

.kin-nav-label-with-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.kin-nav-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 0.5rem;
  border-radius: 999px;
  background: var(--kin-teal);
  box-shadow: 0 0 0 4px rgba(25, 181, 176, 0.12);
}

.kin-plain-list {
  margin: 0;
  padding-left: 1.25rem;
}

.kin-plain-list li + li {
  margin-top: 0.4rem;
}

.kin-auth-page {
  min-height: calc(100vh - 7rem);
  align-items: center;
}

.kin-auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 460px);
  gap: 1rem;
  align-items: stretch;
  justify-content: center;
}

.kin-auth-panel {
  border: 1px solid var(--kin-line);
  border-radius: var(--kin-radius-xl);
  background: linear-gradient(180deg, rgba(228, 237, 243, 0.98), rgba(214, 225, 234, 0.97));
  box-shadow: var(--kin-shadow);
}

.kin-auth-brand,
.kin-auth-form-wrap {
  padding: 1.35rem;
}

.kin-auth-brand {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.8rem;
  background:
    radial-gradient(circle at top left, rgba(25, 181, 176, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(225, 235, 241, 0.98), rgba(212, 223, 231, 0.98));
}

.kin-auth-logo {
  width: min(100%, 320px);
  height: auto;
  display: block;
  object-fit: contain;
}

.kin-auth-form-head {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.kin-auth-form-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.kin-auth-form-head p,
.kin-auth-brand p,
.kin-auth-links span {
  color: rgba(22, 48, 79, 0.72);
}

.kin-auth-brand .kin-badge,
.kin-auth-brand h1,
.kin-auth-brand p {
  text-align: center;
}

.kin-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-weight: 700;
}

.kin-auth-links a {
  color: var(--kin-teal);
}

.kin-auth-check {
  justify-content: flex-start;
}

.kin-auth-check span {
  font-weight: 700;
  color: var(--kin-text);
}

.light-only {
  display: block;
}

.dark-only {
  display: none;
}

.kin-notice-board-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.kin-soft-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(25, 181, 176, 0.12);
  color: var(--kin-teal);
  font-size: 0.82rem;
  font-weight: 800;
}

.kin-notice-board {
  display: grid;
  gap: 1rem;
}

.kin-notice-stream-wrap {
  max-height: min(58vh, 640px);
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(13, 47, 91, 0.06);
  background: rgba(212, 222, 230, 0.82);
}

.kin-notice-stream {
  display: grid;
  gap: 0.95rem;
  min-height: 220px;
  max-height: min(58vh, 640px);
  overflow-y: auto;
  padding: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 47, 91, 0.28) transparent;
}

.kin-notice-stream::-webkit-scrollbar {
  width: 0.55rem;
}

.kin-notice-stream::-webkit-scrollbar-thumb {
  background: rgba(13, 47, 91, 0.24);
  border-radius: 999px;
}

.kin-notice-empty {
  padding: 1rem 1.05rem;
  border: 1px dashed rgba(13, 47, 91, 0.16);
  border-radius: 10px;
  background: rgba(13, 47, 91, 0.015);
  text-align: center;
}

.kin-notice-message {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  max-width: min(100%, 780px);
}

.kin-notice-message.is-own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.kin-notice-avatar-wrap,
.kin-notice-avatar-image,
.kin-notice-avatar-text {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
}

.kin-notice-avatar-wrap {
  display: grid;
  place-items: center;
  flex: 0 0 2.6rem;
  overflow: hidden;
  background: rgba(25, 181, 176, 0.14);
  border: 1px solid rgba(25, 181, 176, 0.22);
}

.kin-notice-avatar-image {
  object-fit: cover;
}

.kin-notice-avatar-text {
  display: grid;
  place-items: center;
  color: var(--kin-teal);
  font-size: 0.95rem;
  font-weight: 800;
}

.kin-notice-bubble {
  flex: 1 1 auto;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(13, 47, 91, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(229, 237, 242, 0.98), rgba(213, 223, 231, 0.96));
  box-shadow: none;
}

.kin-notice-message.is-own .kin-notice-bubble {
  background: rgba(25, 181, 176, 0.08);
  border-color: rgba(25, 181, 176, 0.2);
}

.kin-notice-bubble-head,
.kin-notice-bubble-foot,
.kin-notice-composer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.kin-notice-bubble-head {
  margin-bottom: 0.45rem;
}

.kin-notice-bubble-head time,
.kin-notice-bubble-foot,
.kin-notice-composer-foot {
  color: rgba(22, 48, 79, 0.68);
  font-size: 0.88rem;
}

.kin-notice-bubble p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--kin-text);
}

.kin-notice-bubble-foot {
  margin-top: 0.7rem;
}

.kin-notice-delete {
  padding: 0;
  color: #c14545;
  text-decoration: none;
  font-weight: 700;
}

.kin-notice-delete:hover {
  color: #a62b2b;
  text-decoration: underline;
}

.kin-notice-composer {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -1.05rem -1.05rem;
  padding: 1rem 1.05rem 1.05rem;
  border-top: 1px solid rgba(13, 47, 91, 0.08);
  background: linear-gradient(180deg, rgba(247, 251, 253, 0.88), rgba(255, 255, 255, 0.98));
  backdrop-filter: blur(12px);
}

body[data-theme="dark"] .kin-topbar {
  background: rgba(10, 18, 30, 0.86);
  border-bottom-color: rgba(117, 157, 205, 0.14);
}

body[data-theme="dark"] .kin-sidebar {
  background: linear-gradient(180deg, rgba(7, 16, 28, 0.98), rgba(10, 19, 32, 0.98));
}

body[data-theme="dark"] .kin-user-card {
  background: linear-gradient(160deg, rgba(25, 181, 176, 0.2), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .kin-user-card:hover {
  background: linear-gradient(160deg, rgba(25, 181, 176, 0.26), rgba(255, 255, 255, 0.06));
}

body[data-theme="dark"] .kin-topbar-menu-toggle {
  background: rgba(17, 29, 46, 0.96);
  border-color: rgba(117, 157, 205, 0.2);
}

body[data-theme="dark"] .kin-topbar-menu-toggle span {
  background: #eef5ff;
}

body[data-theme="dark"] .kin-page-header h1,
body[data-theme="dark"] .kin-section-title,
body[data-theme="dark"] .kin-timeline-title,
body[data-theme="dark"] .kin-stat-value,
body[data-theme="dark"] .kin-month-day-number,
body[data-theme="dark"] .kin-day-number,
body[data-theme="dark"] .kin-theme-choice-copy strong,
body[data-theme="dark"] .kin-soft-chip,
body[data-theme="dark"] .kin-inline-note {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-user-avatar {
  background: rgba(8, 18, 30, 0.96);
  border: 1px solid rgba(117, 157, 205, 0.18);
  color: #eef5ff;
}

body[data-theme="dark"] .kin-page-header p,
body[data-theme="dark"] .kin-muted,
body[data-theme="dark"] .kin-month-day-note.free,
body[data-theme="dark"] .kin-day-line.free,
body[data-theme="dark"] .kin-day-weekday,
body[data-theme="dark"] .kin-day-month,
body[data-theme="dark"] .kin-day-summary span,
body[data-theme="dark"] .kin-field-help,
body[data-theme="dark"] .kin-notice-bubble-head time,
body[data-theme="dark"] .kin-notice-bubble-foot,
body[data-theme="dark"] .kin-notice-composer-foot,
body[data-theme="dark"] .kin-user-meta span {
  color: rgba(219, 231, 245, 0.72);
}

body[data-theme="dark"] .kin-timeline-rail-head p,
body[data-theme="dark"] .kin-timeline-legend,
body[data-theme="dark"] .kin-timeline-legend span,
body[data-theme="dark"] .kin-month-day-note,
body[data-theme="dark"] .kin-day-summary strong,
body[data-theme="dark"] .kin-meta,
body[data-theme="dark"] .kin-meta span,
body[data-theme="dark"] .kin-month-weekdays span {
  color: rgba(25, 181, 176, 0.92);
}

body[data-theme="dark"] .kin-day-line.personal,
body[data-theme="dark"] .kin-day-line.group {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-notice-bubble p,
body[data-theme="dark"] .kin-notice-message.is-own .kin-notice-bubble p,
body[data-theme="dark"] .kin-notice-message.is-group .kin-notice-bubble p,
body[data-theme="dark"] .kin-timeline-item p:not(.kin-muted),
body[data-theme="dark"] .kin-group-card p:not(.kin-muted) {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-month-weekdays span {
  color: #19b5b0;
}

body[data-theme="dark"] .kin-card,
body[data-theme="dark"] .kin-panel,
body[data-theme="dark"] .kin-form-card,
body[data-theme="dark"] .kin-empty,
body[data-theme="dark"] .kin-timeline-item,
body[data-theme="dark"] .kin-group-card,
body[data-theme="dark"] .kin-plan-card,
body[data-theme="dark"] .kin-member-row,
body[data-theme="dark"] .kin-month-day,
body[data-theme="dark"] .kin-day-card,
body[data-theme="dark"] .kin-notice-bubble,
body[data-theme="dark"] .kin-explainer-card,
body[data-theme="dark"] .kin-form-switch,
body[data-theme="dark"] .kin-checkbox-card,
body[data-theme="dark"] .kin-reminder-fields,
body[data-theme="dark"] .kin-inline-note,
body[data-theme="dark"] .kin-timeline-rail,
body[data-theme="dark"] .kin-notice-stream-wrap,
body[data-theme="dark"] .kin-theme-choice {
  background: rgba(16, 28, 43, 0.9);
  border-color: rgba(117, 157, 205, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .kin-upcoming-item {
  background: rgba(16, 28, 43, 0.92);
  border-color: rgba(117, 157, 205, 0.16);
}

body[data-theme="dark"] .kin-upcoming-copy strong {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-upcoming-date {
  color: rgba(219, 231, 245, 0.72);
}

body[data-theme="dark"] .kin-expand-mark {
  background: rgba(117, 157, 205, 0.12);
  color: #8ee4df;
}

body[data-theme="dark"] .kin-upcoming-body {
  border-top-color: rgba(117, 157, 205, 0.14);
}

body[data-theme="dark"] .kin-form-card > .kin-panel {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(117, 157, 205, 0.14);
  box-shadow: none;
}

body[data-theme="dark"] .kin-panel > .kin-list > .kin-group-card,
body[data-theme="dark"] .kin-panel > .kin-list > a.kin-group-card {
  background: transparent;
  border-width: 0 0 1px;
  border-color: rgba(117, 157, 205, 0.14);
  box-shadow: none;
}

body[data-theme="dark"] .kin-panel > .kin-empty {
  background: transparent;
  border: none;
  border-top: 1px dashed rgba(117, 157, 205, 0.14);
  box-shadow: none;
}

body[data-theme="dark"] .kin-panel > .kin-timeline-rail,
body[data-theme="dark"] .kin-panel > .kin-notice-stream-wrap,
body[data-theme="dark"] .kin-notice-bubble,
body[data-theme="dark"] .kin-explainer-card,
body[data-theme="dark"] .kin-form-switch,
body[data-theme="dark"] .kin-checkbox-card,
body[data-theme="dark"] .kin-reminder-fields,
body[data-theme="dark"] .kin-inline-note {
  box-shadow: none;
}

body[data-theme="dark"] .kin-reminder-toggle-copy strong,
body[data-theme="dark"] .kin-checkbox-card span.kin-reminder-toggle-copy strong {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-reminder-toggle-copy small,
body[data-theme="dark"] .kin-reminder-header span {
  color: rgba(219, 231, 245, 0.72);
}

body[data-theme="dark"] .kin-reminder-fields {
  background: linear-gradient(180deg, rgba(16, 28, 43, 0.92) 0%, rgba(13, 24, 38, 0.98) 100%);
}

body[data-theme="dark"] .kin-notice-message.is-own .kin-notice-bubble,
body[data-theme="dark"] .kin-month-day.selected,
body[data-theme="dark"] .kin-day-card.is-personal,
body[data-theme="dark"] .kin-day-card.is-mixed,
body[data-theme="dark"] .kin-day-card.is-group {
  background: linear-gradient(180deg, rgba(25, 181, 176, 0.18), rgba(16, 28, 43, 0.96));
}

body[data-theme="dark"] .kin-day-card.is-free,
body[data-theme="dark"] .kin-month-day.outside {
  background: rgba(13, 22, 35, 0.9);
}

body[data-theme="dark"] .kin-day-summary {
  background: rgba(117, 157, 205, 0.08);
}

body[data-theme="dark"] .kin-action-button.ghost,
body[data-theme="dark"] .kin-action-button.subtle {
  background: rgba(117, 157, 205, 0.1);
  border-color: rgba(117, 157, 205, 0.18);
  color: #eef5ff;
}

body[data-theme="dark"] .kin-action-button.danger {
  background: #8f3843;
  border-color: #8f3843;
  color: #fff6f7;
}

body[data-theme="dark"] .kin-action-button.danger:hover,
body[data-theme="dark"] .kin-action-button.danger:focus {
  background: #7d2f39;
  border-color: #7d2f39;
  color: #fff6f7;
}

body[data-theme="dark"] .kin-action-button:not(.ghost):not(.subtle),
body[data-theme="dark"] .kin-primary-button {
  background: #128983;
  border-color: #128983;
  color: #f5fcff;
  box-shadow: 0 10px 22px rgba(18, 137, 131, 0.18);
}

body[data-theme="dark"] .kin-action-button:not(.ghost):not(.subtle):hover,
body[data-theme="dark"] .kin-action-button:not(.ghost):not(.subtle):focus,
body[data-theme="dark"] .kin-primary-button:hover,
body[data-theme="dark"] .kin-primary-button:focus {
  background: #0f766f;
  border-color: #0f766f;
  color: #f5fcff;
  box-shadow: 0 12px 24px rgba(15, 118, 111, 0.2);
}

body[data-theme="dark"] .kin-form-card .form-control,
body[data-theme="dark"] .kin-form-card .form-select,
body[data-theme="dark"] .kin-notice-composer .form-control {
  background: rgba(8, 18, 30, 0.96);
  border-color: rgba(117, 157, 205, 0.18);
  color: #eef5ff;
}

body[data-theme="dark"] .kin-form-card .form-control::placeholder,
body[data-theme="dark"] .kin-notice-composer .form-control::placeholder {
  color: rgba(219, 231, 245, 0.42);
}

body[data-theme="dark"] .kin-form-card label,
body[data-theme="dark"] .kin-notice-composer label,
body[data-theme="dark"] .kin-checkbox-card span {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-badge {
  background: rgba(25, 181, 176, 0.16);
  color: #8ee4df;
}

body[data-theme="dark"] .kin-badge.outline {
  border-color: rgba(117, 157, 205, 0.18);
  color: #dbe7f5;
}

body[data-theme="dark"] .kin-badge.navy {
  background: rgba(117, 157, 205, 0.12);
  color: #eef5ff;
}

body[data-theme="dark"] .kin-notice-composer {
  background: linear-gradient(180deg, rgba(8, 18, 30, 0.82), rgba(16, 28, 43, 0.98));
  border-top-color: rgba(117, 157, 205, 0.14);
}

body[data-theme="dark"] .kin-notice-delete {
  color: #ff9595;
}

body[data-theme="dark"] .kin-notice-delete:hover {
  color: #ffb0b0;
}

body[data-theme="dark"] .kin-alert {
  background: rgba(25, 181, 176, 0.16);
  color: #dff7f5;
}

body[data-theme="dark"] .kin-auth-panel {
  background: rgba(16, 28, 43, 0.92);
  border-color: rgba(117, 157, 205, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .kin-auth-brand {
  background:
    radial-gradient(circle at top left, rgba(25, 181, 176, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(16, 28, 43, 0.96), rgba(12, 23, 37, 0.98));
}

body[data-theme="dark"] .kin-auth-form-head h2,
body[data-theme="dark"] .kin-auth-brand h1 {
  color: #eef5ff;
}

body[data-theme="dark"] .kin-auth-form-head p,
body[data-theme="dark"] .kin-auth-brand p,
body[data-theme="dark"] .kin-auth-links span {
  color: rgba(219, 231, 245, 0.72);
}

body[data-theme="dark"] .kin-auth-check span {
  color: #eef5ff;
}

body[data-theme="dark"] .light-only {
  display: none;
}

body[data-theme="dark"] .dark-only {
  display: block;
}

@media (max-width: 991.98px) {
  .kin-shell {
    grid-template-columns: 1fr;
  }

  .kin-sidebar {
    position: fixed;
    top: 1rem;
    left: max(1rem, calc((100vw - min(1680px, calc(100vw - 32px))) / 2));
    z-index: 60;
    width: min(280px, calc(100vw - 2rem));
    height: calc(100vh - 2rem);
    border-radius: 12px;
    box-shadow: 0 22px 48px rgba(13, 47, 91, 0.24);
    transform: translateX(calc(-100% - 1.25rem));
    transition: transform 0.24s ease;
  }

  .kin-topbar {
    position: static;
  }

  .kin-topbar-menu-toggle,
  .kin-sidebar-overlay {
    display: inline-flex;
  }

  .kin-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    background: rgba(9, 27, 52, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .kin-shell.sidebar-open .kin-sidebar {
    transform: translateX(0);
  }

  .kin-shell.sidebar-open .kin-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .kin-notice-board-meta,
  .kin-notice-bubble-head,
  .kin-notice-bubble-foot,
  .kin-notice-composer-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .kin-notice-stream-wrap,
  .kin-notice-stream {
    max-height: 52vh;
  }

  .kin-auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .kin-content,
  .kin-sidebar,
  .kin-topbar {
    padding: 1rem;
  }

  .kin-hero-grid,
  .kin-form-grid.two {
    grid-template-columns: 1fr;
  }

  .kin-duration-grid,
  .kin-form-grid.recurrence {
    grid-template-columns: 1fr;
  }

  .kin-month-nav {
    justify-content: flex-start;
  }

  .kin-month-nav strong {
    min-width: 0;
    text-align: left;
  }

  .kin-month-weekdays,
  .kin-month-grid {
    gap: 0.45rem;
  }

  .kin-month-day {
    min-height: 5rem;
    padding: 0.55rem;
    border-radius: 10px;
  }

  .kin-month-day-number {
    font-size: 1rem;
  }

  .kin-month-day-note {
    font-size: 0.7rem;
  }

  .kin-day-track {
    gap: 0.5rem;
    grid-auto-columns: calc((100% - 3rem) / 7);
  }

  .kin-day-card {
    min-height: 132px;
    padding: 0.85rem 0.55rem;
    border-radius: 10px;
  }

  .kin-day-number {
    font-size: 1.35rem;
  }

  .kin-day-card.is-today::after {
    border-radius: 12px;
  }

  .kin-day-status,
  .kin-day-count,
  .kin-day-weekday,
  .kin-day-month {
    font-size: 0.72rem;
  }

  .kin-notice-stream-wrap,
  .kin-notice-stream {
    max-height: none;
  }

  .kin-notice-composer {
    position: static;
    margin: 0;
    padding: 0.25rem 0 0;
    background: transparent;
    backdrop-filter: none;
  }
}
