.yearly-composer-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--layer-playfield, 1000) + 600);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 12, 24, 0.72);
  backdrop-filter: blur(4px);
}

.yearly-composer-inline {
  position: relative;
}

.yearly-composer-inline .yearly-composer {
  width: 100%;
  max-height: none;
}

.yearly-composer {
  width: min(920px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(21, 31, 52, 0.96), rgba(15, 24, 39, 0.96));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
  color: #f1f5ff;
  padding: 18px;
}

.yearly-composer__header h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.yearly-composer__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.yearly-composer__reason {
  margin: 8px 0 0;
  opacity: 0.9;
}

.yearly-composer__formation {
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto minmax(220px, 320px);
  align-items: center;
  gap: 8px 12px;
}

.yearly-composer__formation select {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  padding: 8px 10px;
}

.yearly-composer__formation-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.84rem;
  color: rgba(211, 244, 203, 0.92);
}

.yearly-composer__body {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 12px;
}

.yearly-composer__timeline {
  min-width: 0;
}

.yearly-composer__timeline h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  opacity: 0.92;
}

.yearly-composer__periods {
  display: grid;
  gap: 10px;
  max-height: min(50vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.yearly-composer__period {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.yearly-composer__period.is-current {
  border-color: rgba(120, 210, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(120, 210, 255, 0.35) inset;
}

.yearly-composer__period--internship {
  background: rgba(255, 174, 102, 0.18);
}

.yearly-composer__period--vacation {
  background: rgba(113, 204, 143, 0.2);
}

.yearly-composer__period-meta {
  display: grid;
  gap: 4px;
}

.yearly-composer__period-calendar {
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(221, 237, 250, 0.78);
}

.yearly-composer__kind {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.yearly-composer__period-controls {
  min-width: 0;
}

.yearly-composer__dropzone {
  min-height: var(--ui-control-height-md, 44px);
  border-radius: var(--ui-radius-sm, 10px);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(9, 18, 31, 0.66);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.yearly-composer__dropzone.is-empty {
  justify-content: center;
}

.yearly-composer__dropzone.is-over {
  border-color: rgba(122, 215, 159, 0.95);
  background: rgba(51, 109, 79, 0.42);
  box-shadow: 0 0 0 1px rgba(122, 215, 159, 0.26) inset;
}

.yearly-composer__drop-hint {
  font-size: 0.83rem;
  opacity: 0.85;
}

.yearly-composer__assigned {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(122, 215, 159, 0.6);
  background: rgba(27, 63, 49, 0.78);
  padding: 6px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  cursor: grab;
}

.yearly-composer__assigned-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.yearly-composer__assigned-label {
  font-size: 0.87rem;
  font-weight: 700;
}

.yearly-composer__assigned-fit {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(180, 214, 240, 0.24);
  background: rgba(10, 28, 38, 0.62);
  color: rgba(229, 240, 249, 0.92);
  padding: 0 8px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.yearly-composer__assigned-fit[data-fit-status="ok"] {
  border-color: rgba(122, 215, 159, 0.48);
  background: rgba(24, 67, 51, 0.82);
  color: rgba(206, 255, 228, 0.94);
}

.yearly-composer__assigned-fit[data-fit-status="too_short"],
.yearly-composer__assigned-fit[data-fit-status="too_long"] {
  border-color: rgba(255, 196, 120, 0.46);
  background: rgba(68, 43, 17, 0.86);
  color: rgba(255, 227, 182, 0.97);
}

.yearly-composer__assigned-clear {
  border: 0;
  border-radius: var(--ui-radius-pill, 999px);
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  cursor: pointer;
}

.yearly-composer__assigned-clear:hover,
.yearly-composer__assigned-clear:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.yearly-composer__period-note {
  font-size: 0.88rem;
  opacity: 0.85;
}

.yearly-composer__available {
  min-width: 0;
  border-radius: var(--ui-radius-md, 12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 14, 24, 0.58);
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.yearly-composer__available h3 {
  margin: 0;
  font-size: 0.98rem;
}

.yearly-composer__available-count {
  margin: 0;
  font-size: 0.84rem;
  opacity: 0.86;
}

.yearly-composer__available-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: min(50vh, 420px);
  overflow: auto;
}

.yearly-composer__available-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--ui-radius-sm, 10px);
  background: rgba(255, 255, 255, 0.07);
  padding: 8px 9px;
  display: grid;
  gap: 5px;
  cursor: grab;
}

.yearly-composer__available-item.is-selected {
  border-color: rgba(122, 215, 159, 0.72);
  box-shadow: 0 0 0 1px rgba(122, 215, 159, 0.22) inset;
}

.yearly-composer__available-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.yearly-composer__available-badge {
  border-radius: var(--ui-radius-pill, 999px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.yearly-composer__available-work,
.yearly-composer__available-tags {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.9;
}

.yearly-composer__available-empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--ui-radius-sm, 10px);
  padding: 10px;
  font-size: 0.84rem;
  opacity: 0.9;
}

.yearly-composer.is-dragging .yearly-composer__available-item,
.yearly-composer.is-dragging .yearly-composer__assigned {
  cursor: grabbing;
}

.yearly-composer__tooltip {
  position: fixed;
  z-index: calc(var(--layer-playfield, 1000) + 700);
  width: min(440px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid rgba(125, 218, 240, 0.55);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 196, 120, 0.14), transparent 44%),
    linear-gradient(160deg, rgba(6, 14, 24, 0.98), rgba(7, 17, 29, 0.96));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 12px;
  pointer-events: none;
  color: #eef6ff;
}

.yearly-composer__tooltip-shell {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.yearly-composer__tooltip-media {
  margin: 0;
  position: relative;
  min-height: 164px;
  border-radius: 14px;
  border: 1px solid rgba(255, 205, 143, 0.36);
  background: linear-gradient(160deg, rgba(17, 33, 52, 0.96), rgba(9, 20, 34, 0.98));
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.yearly-composer__tooltip-media-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.yearly-composer__tooltip-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  color: rgba(237, 247, 255, 0.9);
}

.yearly-composer__tooltip-content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.yearly-composer__tooltip-family {
  margin: 0;
  font-size: 0.68rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 214, 162, 0.8);
}

.yearly-composer__tooltip-title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.18;
  font-weight: 700;
}

.yearly-composer__tooltip-subtitle {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  color: rgba(205, 224, 241, 0.84);
}

.yearly-composer__tooltip-meta,
.yearly-composer__tooltip-body {
  display: grid;
  gap: 4px;
}

.yearly-composer__tooltip-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.yearly-composer__tooltip-line {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(223, 236, 248, 0.9);
}

.yearly-composer__tooltip-stat {
  border-radius: 11px;
  border: 1px solid rgba(177, 214, 245, 0.18);
  background: rgba(14, 24, 38, 0.78);
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.yearly-composer__tooltip-stat-label {
  font-size: 0.62rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(176, 205, 229, 0.76);
}

.yearly-composer__tooltip-stat-value {
  font-size: 0.96rem;
  line-height: 1.05;
  color: #f5fbff;
}

@media (max-width: 640px) {
  .yearly-composer__tooltip {
    width: min(380px, calc(100vw - 20px));
  }

  .yearly-composer__tooltip-shell {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .yearly-composer__tooltip-media {
    min-height: 134px;
  }

  .yearly-composer__tooltip-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.yearly-composer__error {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 115, 115, 0.18);
  border: 1px solid rgba(255, 115, 115, 0.45);
}

.yearly-composer__actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.yearly-composer__btn {
  border: 0;
  min-height: var(--ui-control-height-md, 44px);
  border-radius: var(--ui-radius-sm, 10px);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.yearly-composer__btn--ghost {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

.yearly-composer__btn--primary {
  background: #d3f4cb;
  color: #113117;
}

@media (max-width: 760px) {
  .yearly-composer {
    padding: 14px;
  }

  .yearly-composer__formation {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .yearly-composer__body {
    grid-template-columns: 1fr;
  }

  .yearly-composer__period {
    grid-template-columns: 1fr;
  }

  .yearly-composer__actions {
    justify-content: stretch;
  }

  .yearly-composer__btn {
    flex: 1;
  }
}

@media (max-width: 980px) {
  .yearly-composer__body {
    grid-template-columns: 1fr;
  }

  .yearly-composer__available-list,
  .yearly-composer__periods {
    max-height: min(34vh, 280px);
  }
}
