.auth-page,
.standalone-mode,
.embed-mode {
  min-width: 320px;
  margin: 0;
  background: #f4f5f1;
  color: #18362e;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.auth-page,
.standalone-mode {
  min-height: 100vh;
}

.embed-mode {
  min-height: 0;
  overflow-x: hidden;
}

.standalone-nav {
  position: relative;
  z-index: 50;
  min-height: 52px;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dfe4df;
  background: #fff;
}

.standalone-nav > span {
  font-size: 14px;
  font-weight: 800;
}

.standalone-nav form {
  margin: 0;
}

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

.standalone-nav button,
.standalone-nav a {
  padding: 8px 12px;
  border: 1px solid #d8ded9;
  border-radius: 9px;
  background: #f7f8f5;
  color: #18362e;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.embed-mode .standalone-nav {
  display: none;
}

.standalone-mode .cimer-pm {
  min-height: calc(100vh - 52px);
}

.embed-mode .cimer-pm {
  min-height: 0;
}

.auth-page {
  padding: 32px 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 75% 15%, rgba(223, 255, 101, 0.33), transparent 26rem),
    #f4f5f1;
}

.auth-card {
  width: min(100%, 430px);
  padding: 38px;
  border: 1px solid #dfe5df;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 47, 39, 0.13);
}

.auth-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #dfff65;
  color: #102c25;
  font-size: 23px;
  font-weight: 900;
}

.auth-eyebrow {
  margin: 22px 0 4px;
  color: #6f7f78;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  color: #102c25;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.08;
}

.auth-intro,
.auth-help {
  color: #6f7f78;
  line-height: 1.55;
}

.auth-card form {
  margin-top: 28px;
}

.auth-card label,
.auth-card label span {
  display: block;
}

.auth-card label span {
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}

.auth-card input,
.auth-card select {
  width: 100%;
  padding: 12px 13px;
  box-sizing: border-box;
  border: 1px solid #cfd7d0;
  border-radius: 10px;
  color: #18362e;
  font: inherit;
}

.auth-card button {
  width: 100%;
  margin-top: 13px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: #18362e;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.auth-card input:focus-visible,
.auth-card select:focus-visible,
.auth-card button:focus-visible,
.standalone-nav button:focus-visible,
.standalone-nav a:focus-visible {
  outline: 3px solid rgba(85, 120, 255, 0.34);
  outline-offset: 3px;
}

.auth-error {
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff0ed;
  color: #a33727;
  font-size: 13px;
  font-weight: 750;
}

.auth-help {
  margin: 24px 0 0;
  font-size: 12px;
}

.auth-help code {
  overflow-wrap: anywhere;
}

.brand-picker-card {
  width: min(100%, 560px);
}

.brand-picker-card select {
  min-height: 48px;
  background: #fff;
}

.brand-picker-empty {
  margin: 26px 0 0;
  padding: 15px 17px;
  border: 1px solid #dce3dd;
  border-radius: 12px;
  background: #f7f9f6;
  color: #65756e;
  font-size: 13px;
  line-height: 1.55;
}

.brand-picker-meta {
  margin: 20px 0 0;
  color: #7b8983;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.auth-card .brand-picker-logout {
  margin-top: 8px;
}

.auth-card .brand-picker-logout button {
  margin-top: 0;
  background: transparent;
  color: #65756e;
  font-size: 12px;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 28px 22px;
  }

  .standalone-nav {
    padding-right: 14px;
    padding-left: 14px;
  }
}

.cimer-pm,
.cimer-pm * {
  box-sizing: border-box;
}

.cimer-pm {
  --pm-ink: #18362e;
  --pm-ink-strong: #102c25;
  --pm-muted: #6f7f78;
  --pm-paper: #ffffff;
  --pm-canvas: #f4f5f1;
  --pm-line: #dde3de;
  --pm-line-soft: #edf0ed;
  --pm-accent: #dfff65;
  --pm-accent-strong: #c9f34a;
  --pm-coral: #ff765f;
  --pm-blue: var(--cimer-pm-brand, #5578ff);
  --pm-shadow-sm:
    0 1px 2px rgba(17, 49, 40, 0.04),
    0 8px 26px rgba(17, 49, 40, 0.06);
  --pm-shadow-lg: 0 30px 80px rgba(20, 50, 42, 0.22);
  --pm-day-width: 9px;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow: clip;
  border-radius: 0;
  background:
    radial-gradient(circle at 88% -10%, rgba(223, 255, 101, 0.17), transparent 31rem),
    var(--pm-canvas);
  color: var(--pm-ink);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.cimer-pm button,
.cimer-pm input,
.cimer-pm select,
.cimer-pm textarea {
  color: inherit;
  font: inherit;
}

.cimer-pm button,
.cimer-pm a,
.cimer-pm input,
.cimer-pm select {
  -webkit-tap-highlight-color: transparent;
}

.cimer-pm button:focus-visible,
.cimer-pm a:focus-visible,
.cimer-pm input:focus-visible,
.cimer-pm select:focus-visible,
.cimer-pm textarea:focus-visible,
.cimer-pm-timeline-viewport:focus-visible {
  outline: 3px solid rgba(85, 120, 255, 0.34);
  outline-offset: 3px;
}

.cimer-pm [hidden] {
  display: none !important;
}

.cimer-pm-skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-170%);
  border-radius: 9px;
  background: var(--pm-ink-strong);
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease;
}

.cimer-pm-skip-link:focus {
  transform: translateY(0);
}

.cimer-pm-topbar {
  min-height: 74px;
  padding: 11px clamp(16px, 2.4vw, 30px);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, auto) minmax(280px, 1fr);
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(24, 54, 46, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.cimer-pm-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.cimer-pm-brand__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 12px 4px;
  background: var(--pm-ink-strong);
  color: var(--pm-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.cimer-pm-brand > span:nth-child(2) {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.cimer-pm-brand small {
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cimer-pm-brand strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--pm-ink-strong);
  font-size: 14px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cimer-pm-brand__id {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--pm-line);
  border-radius: 999px;
  background: #f7f9f6;
  color: var(--pm-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.cimer-pm-planning-switcher {
  display: grid;
  gap: 5px;
}

.cimer-pm-planning-switcher > label {
  color: #89958f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cimer-pm-planning-switcher > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cimer-pm-planning-switcher select {
  width: min(310px, 36vw);
  height: 40px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--pm-line);
  border-radius: 10px;
  background: #fff;
  color: var(--pm-ink);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.cimer-pm-topbar__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cimer-pm-save-status {
  margin-right: 5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--pm-muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.cimer-pm-save-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57c587;
  box-shadow: 0 0 0 4px rgba(87, 197, 135, 0.12);
}

.cimer-pm-save-status.is-saving i {
  background: #e1a633;
  box-shadow: 0 0 0 4px rgba(225, 166, 51, 0.12);
  animation: cimer-pm-pulse 1s ease infinite;
}

.cimer-pm-save-status.is-error {
  color: #b84338;
}

.cimer-pm-save-status.is-error i {
  background: #df5b50;
  box-shadow: 0 0 0 4px rgba(223, 91, 80, 0.12);
}

.cimer-pm-button,
.cimer-pm-icon-button,
.cimer-pm-text-button {
  border: 0;
  cursor: pointer;
}

.cimer-pm-button {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.cimer-pm-button:hover {
  transform: translateY(-1px);
}

.cimer-pm-button:active {
  transform: translateY(0);
}

.cimer-pm-button:disabled,
.cimer-pm-icon-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.cimer-pm-button--primary {
  background: var(--pm-ink-strong);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 7px 18px rgba(16, 44, 37, 0.18);
}

.cimer-pm-button--primary:hover {
  background: #1c493d;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 9px 22px rgba(16, 44, 37, 0.22);
}

.cimer-pm-button--primary > span:first-child {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font-size: 17px;
  line-height: 1;
}

.cimer-pm-button--ghost {
  border: 1px solid var(--pm-line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--pm-ink);
}

.cimer-pm-button--ghost:hover {
  border-color: #c5cfc8;
  background: #fff;
}

.cimer-pm-button--soft {
  border: 1px solid #dce2dc;
  background: #f4f7f3;
  color: var(--pm-ink);
}

.cimer-pm-button--soft:hover {
  background: #edf3ed;
}

.cimer-pm-button--danger {
  border: 1px solid rgba(221, 68, 68, 0.18);
  background: #fff3f0;
  color: #bd3f35;
}

.cimer-pm-button--danger:hover {
  background: #ffe9e4;
}

.cimer-pm-icon-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--pm-ink-strong);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.cimer-pm-icon-button:hover {
  transform: translateY(-1px);
  background: #214c41;
}

.cimer-pm-icon-button--light {
  border: 1px solid var(--pm-line);
  background: #fff;
  color: var(--pm-ink);
}

.cimer-pm-icon-button--light:hover {
  background: #f3f6f3;
}

.cimer-pm-workspace {
  width: min(1600px, calc(100% - clamp(24px, 3.5vw, 48px)));
  margin: 0 auto;
  padding: 30px 0 38px;
}

.cimer-pm-heading {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.cimer-pm-eyebrow {
  margin: 0 0 10px;
  color: #75877f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.cimer-pm-heading h1 {
  max-width: 840px;
  margin: 0;
  color: var(--pm-ink-strong);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1;
}

.cimer-pm-heading h1 em {
  position: relative;
  z-index: 0;
  margin-left: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.cimer-pm-heading h1 em::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 1px;
  left: -4px;
  height: 12px;
  border-radius: 50%;
  background: var(--pm-accent);
  content: "";
  transform: rotate(-1deg);
}

.cimer-pm-intro {
  max-width: 660px;
  min-height: 22px;
  margin: 15px 0 0;
  color: var(--pm-muted);
  font-size: 14px;
  line-height: 1.6;
}

.cimer-pm-summary {
  min-width: 410px;
  padding: 13px 17px 13px 13px;
  display: grid;
  grid-template-columns: auto auto 1px auto;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(24, 54, 46, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.cimer-pm-summary__date {
  width: 50px;
  height: 50px;
  display: grid;
  place-content: center;
  border-radius: 14px;
  background: var(--pm-accent);
  color: var(--pm-ink);
  text-align: center;
}

.cimer-pm-summary__date span {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.cimer-pm-summary__date small {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cimer-pm-summary > div:not(.cimer-pm-summary__date) {
  display: grid;
  gap: 4px;
}

.cimer-pm-summary > div > span {
  color: #829089;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cimer-pm-summary > div > strong {
  color: var(--pm-ink);
  font-size: 11px;
  white-space: nowrap;
}

.cimer-pm-summary > i {
  width: 1px;
  height: 32px;
  background: var(--pm-line);
}

.cimer-pm-timeline-panel {
  overflow: hidden;
  border: 1px solid rgba(19, 54, 45, 0.11);
  border-radius: 24px;
  background: var(--pm-paper);
  box-shadow: var(--pm-shadow-sm);
}

.cimer-pm-timeline-toolbar {
  min-height: 86px;
  padding: 15px 20px;
  display: grid;
  grid-template-columns: 245px 1fr auto;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--pm-line);
}

.cimer-pm-year-control {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cimer-pm-year-control > div {
  min-width: 72px;
  display: grid;
  justify-items: center;
}

.cimer-pm-year-control span {
  color: #88958f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cimer-pm-year-control strong {
  margin-top: 2px;
  color: var(--pm-ink-strong);
  font-size: 18px;
  letter-spacing: -0.04em;
}

.cimer-pm-timeline-toolbar__copy {
  justify-self: center;
  text-align: center;
}

.cimer-pm-timeline-toolbar__copy h2 {
  margin: 0;
  color: var(--pm-ink-strong);
  font-size: 15px;
  letter-spacing: -0.03em;
}

.cimer-pm-timeline-toolbar__copy p {
  margin: 5px 0 0;
  color: #829089;
  font-size: 10px;
}

.cimer-pm-timeline-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cimer-pm-timeline-tools > span {
  width: 1px;
  height: 26px;
  margin: 0 3px;
  background: var(--pm-line);
}

.cimer-pm-timeline-frame {
  padding: 0 20px;
  background: #fff;
}

.cimer-pm-timeline-viewport {
  position: relative;
  height: 540px;
  overflow: auto;
  overscroll-behavior-x: contain;
  border-right: 1px solid var(--pm-line);
  border-left: 1px solid var(--pm-line);
  background: #fafbf8;
  cursor: grab;
  scrollbar-color: #bdc9c1 #eef1ed;
  scrollbar-width: thin;
}

.cimer-pm-timeline-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.cimer-pm-timeline-viewport::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.cimer-pm-timeline-viewport::-webkit-scrollbar-track {
  background: #eef1ed;
}

.cimer-pm-timeline-viewport::-webkit-scrollbar-thumb {
  border: 2px solid #eef1ed;
  border-radius: 999px;
  background: #bdc9c1;
}

.cimer-pm-timeline-canvas {
  position: relative;
  min-height: 520px;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--pm-day-width) * 7 - 1px),
      rgba(24, 54, 46, 0.075) calc(var(--pm-day-width) * 7 - 1px),
      rgba(24, 54, 46, 0.075) calc(var(--pm-day-width) * 7)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 77px,
      rgba(24, 54, 46, 0.05) 77px,
      rgba(24, 54, 46, 0.05) 78px
    ),
    #fafbf8;
}

.cimer-pm-month-row,
.cimer-pm-week-row {
  position: absolute;
  z-index: 10;
  right: 0;
  left: 0;
}

.cimer-pm-month-row {
  top: 0;
  height: 47px;
  border-bottom: 1px solid var(--pm-line);
  background: rgba(250, 251, 248, 0.97);
}

.cimer-pm-month-band {
  position: absolute;
  top: 0;
  height: 47px;
  padding: 16px 0 0 13px;
  overflow: hidden;
  border-right: 1px solid rgba(24, 54, 46, 0.12);
  color: var(--pm-ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cimer-pm-month-band:nth-child(odd) {
  background: rgba(242, 246, 241, 0.7);
}

.cimer-pm-week-row {
  top: 47px;
  height: 55px;
  border-bottom: 1px solid var(--pm-line);
  background: rgba(250, 251, 248, 0.94);
}

.cimer-pm-week-tick {
  position: absolute;
  top: 0;
  width: calc(var(--pm-day-width) * 7);
  height: 55px;
  padding: 10px 0 0 9px;
  border-left: 1px solid rgba(24, 54, 46, 0.08);
}

.cimer-pm-week-tick strong,
.cimer-pm-week-tick span {
  display: block;
  white-space: nowrap;
}

.cimer-pm-week-tick strong {
  color: #53675f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cimer-pm-week-tick span {
  margin-top: 5px;
  color: #9aa59f;
  font-size: 7px;
}

.cimer-pm-events-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.cimer-pm-current-week {
  position: absolute;
  z-index: 1;
  top: 102px;
  bottom: 0;
  border-right: 1px solid rgba(201, 243, 74, 0.42);
  border-left: 1px solid rgba(201, 243, 74, 0.42);
  background: rgba(223, 255, 101, 0.09);
  pointer-events: none;
}

.cimer-pm-today-line {
  position: absolute;
  z-index: 12;
  top: 86px;
  bottom: 0;
  width: 2px;
  background: var(--pm-coral);
  pointer-events: none;
}

.cimer-pm-today-line::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pm-coral);
  box-shadow: 0 1px 6px rgba(154, 48, 31, 0.22);
  content: "";
  transform: translate(-50%, -50%);
}

.cimer-pm-today-line span {
  position: absolute;
  top: -28px;
  left: 50%;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--pm-coral);
  color: #fff;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.cimer-pm-event-card {
  --pm-event-color: var(--pm-blue);
  position: absolute;
  z-index: 5;
  height: 96px;
  overflow: visible;
  border: 1px solid rgba(19, 54, 45, 0.14);
  border-left: 3px solid var(--pm-event-color);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--pm-ink);
  box-shadow: 0 10px 25px rgba(23, 54, 45, 0.1);
  transition:
    height 180ms ease,
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.cimer-pm-event-card:hover {
  z-index: 8;
  transform: translateY(-2px);
  border-color: rgba(19, 54, 45, 0.24);
  box-shadow: 0 15px 32px rgba(23, 54, 45, 0.16);
}

.cimer-pm-event-card.is-expanded {
  z-index: 9;
  height: 330px;
  transform: none;
}

.cimer-pm-event-toggle {
  position: relative;
  width: 100%;
  height: 95px;
  padding: 10px 40px 10px 10px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cimer-pm-event-visual {
  position: relative;
  width: 74px;
  height: 74px;
  display: block;
  overflow: hidden;
  border-radius: 11px;
  background: var(--pm-event-color);
}

.cimer-pm-event-image,
.cimer-pm-event-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cimer-pm-event-image {
  z-index: 2;
  object-fit: cover;
}

.cimer-pm-event-fallback {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--pm-event-color) 72%, #fff),
      var(--pm-event-color)
    );
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 700;
  text-transform: uppercase;
}

.cimer-pm-event-fallback::after {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  content: "";
  transform: translate(18px, 18px);
}

.cimer-pm-event-duration {
  position: absolute;
  z-index: 3;
  right: 5px;
  bottom: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(16, 44, 37, 0.82);
  color: #fff;
  font-size: 7px;
  font-weight: 900;
}

.cimer-pm-event-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.cimer-pm-event-copy > span,
.cimer-pm-event-copy > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cimer-pm-event-date {
  color: #7d8b85;
  font-size: 8px;
  font-weight: 850;
  text-transform: capitalize;
}

.cimer-pm-event-copy > strong {
  color: var(--pm-ink-strong);
  font-size: 12px;
  letter-spacing: -0.025em;
}

.cimer-pm-event-hint {
  color: #829089;
  font-size: 8px;
  font-weight: 700;
}

.cimer-pm-event-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 1px solid #dfe5e0;
  border-radius: 50%;
  background: #f4f7f3;
  transform: translateY(-50%);
}

.cimer-pm-event-chevron::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--pm-ink);
  border-bottom: 1.5px solid var(--pm-ink);
  content: "";
  transform: translate(-50%, -64%) rotate(45deg);
  transition: transform 160ms ease;
}

.cimer-pm-event-card.is-expanded .cimer-pm-event-chevron::before {
  transform: translate(-50%, -34%) rotate(225deg);
}

.cimer-pm-event-range {
  position: absolute;
  right: auto;
  top: -9px;
  bottom: auto;
  left: 0;
  min-width: var(--pm-day-width);
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 99px;
  background: color-mix(in srgb, var(--pm-event-color) 88%, #fff);
  box-shadow:
    0 1px 3px rgba(23, 54, 45, 0.18),
    0 0 0 1px color-mix(in srgb, var(--pm-event-color) 24%, transparent);
  opacity: 0.96;
  pointer-events: none;
}

.cimer-pm-event-range::before,
.cimer-pm-event-range::after {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pm-event-color);
  box-shadow: 0 1px 4px rgba(23, 54, 45, 0.22);
  content: "";
}

.cimer-pm-event-range::before {
  left: 0;
  transform: translate(-50%, -50%);
}

.cimer-pm-event-range::after {
  right: 0;
  transform: translate(50%, -50%);
}

.cimer-pm-event-card.is-short .cimer-pm-event-range {
  height: 8px;
}

.cimer-pm-event-accordion {
  height: 234px;
  padding: 16px 17px;
  border-top: 1px solid var(--pm-line-soft);
  background: #fcfdfb;
}

.cimer-pm-event-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.cimer-pm-event-stat {
  padding: 9px 10px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--pm-line);
  border-radius: 9px;
  background: #fff;
}

.cimer-pm-event-stat small {
  color: #8b9791;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cimer-pm-event-stat strong {
  overflow: hidden;
  color: var(--pm-ink);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cimer-pm-event-description {
  height: 88px;
  margin: 11px 0 9px;
  overflow: auto;
  color: #64756e;
  font-size: 9px;
  line-height: 1.5;
}

.cimer-pm-event-description.is-empty {
  color: #99a49f;
  font-style: italic;
}

.cimer-pm-event-description p,
.cimer-pm-event-description div,
.cimer-pm-event-description ul,
.cimer-pm-event-description ol {
  margin: 0 0 5px;
}

.cimer-pm-event-description ul,
.cimer-pm-event-description ol {
  padding-left: 17px;
}

.cimer-pm-event-description > :last-child {
  margin-bottom: 0;
}

.cimer-pm-event-description a {
  color: #4167d9;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cimer-pm-event-actions {
  display: flex;
  justify-content: flex-end;
}

.cimer-pm-event-actions .cimer-pm-button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 9px;
}

.cimer-pm-empty-state {
  position: absolute;
  z-index: 6;
  top: 160px;
  left: 50%;
  width: min(360px, calc(100vw - 90px));
  padding: 28px;
  border: 1px dashed #cfd8d1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  box-shadow: 0 12px 35px rgba(24, 54, 46, 0.06);
  transform: translateX(-50%);
}

.cimer-pm-empty-state > span {
  width: 40px;
  height: 40px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--pm-accent);
  font-size: 20px;
  font-weight: 900;
}

.cimer-pm-empty-state strong {
  display: block;
  color: var(--pm-ink-strong);
  font-size: 14px;
}

.cimer-pm-empty-state p {
  margin: 7px 0 17px;
  color: var(--pm-muted);
  font-size: 10px;
}

.cimer-pm-timeline-footer {
  min-height: 58px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--pm-line);
  color: #84918b;
  font-size: 8px;
}

.cimer-pm-timeline-footer > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cimer-pm-timeline-footer > div > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cimer-pm-timeline-footer i {
  display: inline-block;
}

.cimer-pm-legend-today {
  width: 2px;
  height: 13px;
  background: var(--pm-coral);
}

.cimer-pm-legend-event {
  width: 16px;
  height: 7px;
  border-radius: 99px;
  background: var(--pm-blue);
}

.cimer-pm-timeline-footer p {
  margin: 0;
}

.cimer-pm kbd {
  min-width: 21px;
  height: 21px;
  margin-right: 3px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9ded9;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #f7f8f6;
  color: #697972;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
}

.cimer-pm-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.cimer-pm-dialog[open] {
  display: flex;
  justify-content: flex-end;
}

.cimer-pm-dialog::backdrop {
  background: rgba(12, 35, 29, 0.48);
  backdrop-filter: blur(4px);
  animation: cimer-pm-backdrop-in 180ms ease both;
}

.cimer-pm-dialog__panel {
  width: min(520px, 100%);
  height: 100%;
  padding: 32px;
  overflow-y: auto;
  background: #fbfcfa;
  color: var(--pm-ink);
  box-shadow: var(--pm-shadow-lg);
  animation: cimer-pm-panel-in 240ms cubic-bezier(0.22, 0.78, 0.28, 1) both;
}

.cimer-pm-dialog--compact .cimer-pm-dialog__panel {
  width: min(490px, 100%);
}

.cimer-pm-dialog__header {
  margin-bottom: 27px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cimer-pm-dialog__header h2 {
  margin: 0;
  color: var(--pm-ink-strong);
  font-size: 27px;
  letter-spacing: -0.055em;
}

.cimer-pm-form-section {
  padding: 21px;
  border: 1px solid var(--pm-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 54, 46, 0.04);
}

.cimer-pm-form-section + .cimer-pm-form-section {
  margin-top: 14px;
}

.cimer-pm-field {
  display: grid;
  gap: 8px;
}

.cimer-pm-field > span,
.cimer-pm-field-heading strong {
  color: var(--pm-ink);
  font-size: 10px;
  font-weight: 900;
}

.cimer-pm-field b {
  color: var(--pm-coral);
}

.cimer-pm-field small,
.cimer-pm-field-heading small {
  color: #87948e;
  font-weight: 600;
}

.cimer-pm-field input,
.cimer-pm-field textarea {
  width: 100%;
  border: 1px solid #d9e0da;
  border-radius: 10px;
  background: #fafbf9;
  color: var(--pm-ink-strong);
  font-size: 11px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.cimer-pm-field input {
  height: 45px;
  padding: 0 13px;
}

.cimer-pm-field textarea {
  min-height: 104px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.55;
}

.cimer-pm-field input:hover,
.cimer-pm-field textarea:hover {
  border-color: #bdc9c1;
}

.cimer-pm-field input:focus,
.cimer-pm-field textarea:focus {
  border-color: #7c9eff;
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(85, 120, 255, 0.1);
}

.cimer-pm-field input[aria-invalid="true"] {
  border-color: #e56e61;
  box-shadow: 0 0 0 4px rgba(229, 110, 97, 0.09);
}

.cimer-pm-rich-editor {
  overflow: hidden;
  border: 1px solid #d9e0da;
  border-radius: 10px;
  background: #fafbf9;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.cimer-pm-rich-editor:hover {
  border-color: #bdc9c1;
}

.cimer-pm-rich-editor:focus-within {
  border-color: #7c9eff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(85, 120, 255, 0.1);
}

.cimer-pm-rich-editor:has(.cimer-pm-rich-content[aria-invalid="true"]) {
  border-color: #e56e61;
  box-shadow: 0 0 0 4px rgba(229, 110, 97, 0.09);
}

.cimer-pm-rich-toolbar {
  min-height: 42px;
  padding: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #e1e6e2;
  background: #f2f5f1;
}

.cimer-pm-rich-toolbar > span {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: #d8ded9;
}

.cimer-pm-rich-toolbar button {
  min-width: 31px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #52645c;
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.cimer-pm-rich-toolbar button:hover,
.cimer-pm-rich-toolbar button:focus-visible,
.cimer-pm-rich-toolbar button.is-active {
  border-color: #d4dcd6;
  outline: 0;
  background: #fff;
  color: var(--pm-ink-strong);
}

.cimer-pm-rich-toolbar button.is-active {
  border-color: rgba(85, 120, 255, 0.32);
  background: rgba(85, 120, 255, 0.1);
  color: #3155c2;
}

.cimer-pm-rich-content {
  min-height: 128px;
  padding: 12px 13px;
  overflow-wrap: anywhere;
  color: var(--pm-ink-strong);
  font-size: 11px;
  line-height: 1.55;
  outline: 0;
}

.cimer-pm-rich-content:empty::before {
  color: #98a39d;
  content: attr(data-placeholder);
  pointer-events: none;
}

.cimer-pm-rich-content p,
.cimer-pm-rich-content div,
.cimer-pm-rich-content ul,
.cimer-pm-rich-content ol {
  margin: 0 0 8px;
}

.cimer-pm-rich-content ul,
.cimer-pm-rich-content ol {
  padding-left: 21px;
}

.cimer-pm-rich-content > :last-child {
  margin-bottom: 0;
}

.cimer-pm-rich-content a {
  color: #4167d9;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cimer-pm-rich-count {
  justify-self: end;
  color: #8c9892;
  font-size: 8px;
}

.cimer-pm-rich-count.is-over-limit {
  color: #c34b40;
  font-weight: 850;
}

.cimer-pm-field--spaced,
.cimer-pm-field--description {
  margin-top: 17px;
}

.cimer-pm-date-fields {
  margin-top: 17px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 9px;
}

.cimer-pm-date-fields > span {
  height: 45px;
  display: grid;
  place-items: center;
  color: #9aa69f;
}

.cimer-pm-image-section {
  background: #f8faf7;
}

.cimer-pm-field-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.cimer-pm-field-heading p {
  margin: 4px 0 0;
  color: #88958f;
  font-size: 8px;
}

.cimer-pm-text-button {
  padding: 4px 0;
  background: transparent;
  color: #c34b40;
  font-size: 9px;
  font-weight: 900;
}

.cimer-pm-image-grid {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 15px;
}

.cimer-pm-image-preview {
  position: relative;
  height: 118px;
  display: grid;
  place-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px dashed #cbd5cd;
  border-radius: 13px;
  background:
    radial-gradient(circle at 25% 10%, rgba(223, 255, 101, 0.34), transparent 55%),
    #eef3ed;
  color: #8d9a94;
  text-align: center;
}

.cimer-pm-image-preview.has-image {
  border-style: solid;
}

.cimer-pm-image-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cimer-pm-image-preview > span {
  color: #6f8279;
  font-size: 27px;
}

.cimer-pm-image-preview > small {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cimer-pm-image-controls {
  display: grid;
  align-content: start;
  gap: 8px;
}

.cimer-pm-field--compact {
  gap: 6px;
}

.cimer-pm-field--compact input {
  height: 39px;
  font-size: 9px;
}

.cimer-pm-media-button {
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--pm-ink);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.cimer-pm-media-button:hover {
  background: var(--pm-ink-strong);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.cimer-pm-image-controls > small {
  color: #96a19b;
  font-size: 7px;
}

.cimer-pm-form-error {
  margin: 13px 2px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff0ed;
  color: #b84338;
  font-size: 9px;
  font-weight: 800;
}

.cimer-pm-dialog__actions {
  margin-top: 21px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
}

.cimer-pm-toast {
  position: fixed;
  z-index: 10002;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--pm-ink-strong);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  box-shadow: 0 16px 42px rgba(16, 44, 37, 0.28);
  animation: cimer-pm-toast-in 180ms ease both;
}

.cimer-pm-toast::before {
  margin-right: 8px;
  color: var(--pm-accent);
  content: "●";
  font-size: 8px;
}

.cimer-pm-message {
  width: min(760px, calc(100% - 40px));
  margin: 24px auto;
  padding: 28px;
  border: 1px solid var(--pm-line);
  border-radius: 18px;
  background: #fff;
  color: var(--pm-ink);
  box-shadow: var(--pm-shadow-sm);
}

.cimer-pm-message--error {
  border-color: rgba(223, 91, 80, 0.25);
  background: #fff9f7;
}

.cimer-pm-message strong {
  color: #a93e34;
  font-size: 18px;
}

.cimer-pm-message p {
  margin: 8px 0 0;
}

@keyframes cimer-pm-panel-in {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
}

@keyframes cimer-pm-backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes cimer-pm-toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

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

@media (max-width: 1180px) {
  .cimer-pm-topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, auto);
  }

  .cimer-pm-topbar__actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: flex-end;
    padding-top: 9px;
    border-top: 1px solid var(--pm-line-soft);
  }

  .cimer-pm-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cimer-pm-summary {
    min-width: min(100%, 410px);
  }
}

@media (max-width: 850px) {
  .cimer-pm-topbar {
    grid-template-columns: 1fr;
    gap: 13px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .cimer-pm-planning-switcher select {
    width: 100%;
  }

  .cimer-pm-planning-switcher > div {
    width: 100%;
  }

  .cimer-pm-planning-switcher select {
    flex: 1 1 auto;
  }

  .cimer-pm-topbar__actions {
    grid-column: auto;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .cimer-pm-workspace {
    width: min(100% - 28px, 1600px);
    padding-top: 32px;
  }

  .cimer-pm-timeline-toolbar {
    grid-template-columns: 1fr auto;
  }

  .cimer-pm-timeline-toolbar__copy {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .cimer-pm-timeline-tools {
    grid-column: 2;
    grid-row: 1;
  }

  .cimer-pm-timeline-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

@media (max-width: 620px) {
  .cimer-pm-save-status {
    display: none;
  }

  .cimer-pm-button {
    padding-right: 12px;
    padding-left: 12px;
  }

  .cimer-pm-heading h1 {
    font-size: 34px;
  }

  .cimer-pm-summary {
    min-width: 0;
    width: 100%;
    grid-template-columns: auto 1fr;
  }

  .cimer-pm-summary > i {
    display: none;
  }

  .cimer-pm-timeline-toolbar {
    padding: 13px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .cimer-pm-timeline-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .cimer-pm-timeline-frame {
    padding: 0;
  }

  .cimer-pm-timeline-viewport {
    height: 500px;
    border-right: 0;
    border-left: 0;
  }

  .cimer-pm-dialog__panel {
    padding: 23px 18px;
  }

  .cimer-pm-date-fields,
  .cimer-pm-image-grid {
    grid-template-columns: 1fr;
  }

  .cimer-pm-date-fields > span {
    display: none;
  }

  .cimer-pm-image-preview {
    width: 118px;
  }

  .cimer-pm-dialog__actions {
    grid-template-columns: 1fr 1fr;
  }

  .cimer-pm-dialog__actions > span {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .cimer-pm *,
  .cimer-pm *::before,
  .cimer-pm *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mode lecture : uniquement le titre et le calendrier. */
.viewer-mode .standalone-nav,
.viewer-mode .cimer-pm-topbar,
.viewer-mode .cimer-pm-summary,
.viewer-mode .cimer-pm-timeline-toolbar,
.viewer-mode .cimer-pm-timeline-footer,
.viewer-mode .cimer-pm-dialog,
.viewer-mode .cimer-pm-toast,
.viewer-mode #cimerPmJsonInput {
  display: none !important;
}

.standalone-mode.viewer-mode .cimer-pm {
  min-height: 100vh;
}

.viewer-mode .cimer-pm-workspace {
  padding-top: clamp(24px, 4vw, 48px);
}

.viewer-mode .cimer-pm-heading {
  margin-bottom: 22px;
}

.viewer-mode .cimer-pm-timeline-frame {
  padding: 0;
}

.viewer-mode .cimer-pm-timeline-viewport {
  height: 600px;
  border: 0;
}

.viewer-mode .cimer-pm-empty-state .cimer-pm-button {
  display: none;
}
