:root {
  --ink: #1a2433;
  --muted: #647188;
  --paper: #fffdf7;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(26, 36, 51, 0.12);
  --brand: #5b5ce2;
  --brand-dark: #3435a7;
  --accent: #ffbf47;
  --accent-2: #39c5bb;
  --danger: #dc4b5f;
  --success: #20815e;
  --shadow: 0 18px 45px rgba(22, 29, 48, 0.12);
  --radius-xl: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 191, 71, 0.45), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(57, 197, 187, 0.32), transparent 30rem),
    linear-gradient(135deg, #f8f5eb 0%, #edf3ff 48%, #fff4e8 100%);
}

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

button {
  cursor: pointer;
}

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

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.78rem 0.88rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(91, 92, 226, 0.55);
  box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.12);
  background: #fff;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

label {
  display: grid;
  gap: 0.42rem;
  font-weight: 750;
}

small,
.hint {
  color: var(--muted);
  line-height: 1.55;
}

kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 8px;
  padding: 0.08rem 0.34rem;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 750;
}

.app-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(45deg, rgba(91, 92, 226, 0.08), rgba(91, 92, 226, 0.08) 10px, transparent 10px, transparent 20px);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 58px);
}

.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 191, 71, 0.42), rgba(255, 191, 71, 0));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  width: fit-content;
  margin-bottom: 1rem;
  border: 1px solid rgba(91, 92, 226, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: var(--brand-dark);
  background: rgba(91, 92, 226, 0.08);
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.08rem;
  line-height: 1.28;
}

.lead {
  max-width: 58ch;
  color: #39465a;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1.82;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.82rem 1.1rem;
  min-height: 44px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(26, 36, 51, 0.08);
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(26, 36, 51, 0.12);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #3738bd);
}

.btn.accent {
  color: #382200;
  background: linear-gradient(135deg, #ffd86a, var(--accent));
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.btn.danger {
  color: #fff;
  background: var(--danger);
}

.btn.success {
  color: #fff;
  background: var(--success);
}

.btn.small {
  min-height: 36px;
  padding: 0.52rem 0.78rem;
  font-size: 0.92rem;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  backdrop-filter: blur(14px);
}

.panel.tight {
  padding: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  padding: 18px;
  box-shadow: 0 12px 28px rgba(26, 36, 51, 0.06);
}

.grid,
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
}

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

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

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

.stack {
  display: grid;
  gap: 16px;
}

.stack.sm {
  gap: 9px;
}

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

.wrap {
  flex-wrap: wrap;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: #293449;
  background: rgba(91, 92, 226, 0.09);
  font-size: 0.84rem;
  font-weight: 850;
}

.pill.warn {
  background: rgba(255, 191, 71, 0.32);
}

.pill.ok {
  color: #104d38;
  background: rgba(45, 190, 130, 0.18);
}

.pill.locked {
  color: #68323a;
  background: rgba(220, 75, 95, 0.14);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(26, 36, 51, 0.1);
  backdrop-filter: blur(14px);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 950;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #ff7f50);
  box-shadow: inset 0 -8px 14px rgba(122, 48, 0, 0.16);
}

.room-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px dashed rgba(91, 92, 226, 0.55);
  border-radius: 16px;
  padding: 0.5rem 0.74rem;
  color: var(--brand-dark);
  background: rgba(91, 92, 226, 0.08);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stage-btn {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  min-height: 96px;
}

.stage-btn.active {
  border-color: rgba(91, 92, 226, 0.42);
  background: linear-gradient(135deg, rgba(91, 92, 226, 0.12), rgba(255, 191, 71, 0.18));
  box-shadow: inset 0 0 0 1px rgba(91, 92, 226, 0.1);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.dot {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 950;
}

.role-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
}

.role-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.role-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(91, 92, 226, 0.1);
  font-size: 1.45rem;
}

.info-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.info-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--brand);
}

.info-card.secret::before {
  background: var(--accent);
}

.info-card.event::before {
  background: var(--danger);
}

.info-card.public::before {
  background: var(--accent-2);
}

.info-card.locked {
  opacity: 0.64;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7) 12px, rgba(220, 75, 95, 0.06) 12px, rgba(220, 75, 95, 0.06) 24px);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin: 0.55rem 0 0.9rem;
}

.card-body {
  color: #344155;
  line-height: 1.72;
  white-space: pre-wrap;
}

.teacher-note {
  margin-top: 12px;
  border-left: 4px solid rgba(91, 92, 226, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  color: #4a5570;
  background: rgba(91, 92, 226, 0.07);
  line-height: 1.55;
}

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

.check-list {
  display: grid;
  gap: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.check-row input {
  width: auto;
  margin-top: 0.25rem;
}

.memo {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.memo p:last-child {
  margin-bottom: 0;
}

.json-box {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 44px));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(32, 44, 69, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.loading {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 7px solid rgba(91, 92, 226, 0.14);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 18px;
}

.empty {
  border: 1px dashed rgba(100, 113, 136, 0.38);
  border-radius: 20px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

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

@media (max-width: 920px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .spread:not(.no-stack) {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, var(--max));
    padding-top: 12px;
  }

  .hero,
  .panel {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2.3rem, 17vw, 4rem);
  }

  .stage-track {
    grid-template-columns: 1fr;
  }

  .actions,
  .topbar .actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

hr.soft {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

fieldset {
  border: 1px solid var(--line);
}

legend {
  padding: 0 8px;
}

/* Kabekoe Quest refresh */
:root {
  --ink: #172032;
  --muted: #667085;
  --paper: #fffaf0;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(23, 32, 50, 0.1);
  --brand: #6554e8;
  --brand-dark: #342a9b;
  --accent: #ffbf47;
  --accent-2: #1fbfbd;
  --shadow: 0 22px 70px rgba(28, 36, 60, 0.13);
}

body {
  background:
    radial-gradient(circle at 10% 6%, rgba(255, 191, 71, 0.52), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(101, 84, 232, 0.28), transparent 30rem),
    radial-gradient(circle at 78% 82%, rgba(31, 191, 189, 0.22), transparent 32rem),
    linear-gradient(135deg, #fff7e8 0%, #edf3ff 44%, #fffdf7 100%);
}

.hero {
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74)),
    linear-gradient(120deg, rgba(101, 84, 232, 0.14), transparent 42%),
    repeating-linear-gradient(45deg, rgba(23, 32, 50, 0.04), rgba(23, 32, 50, 0.04) 1px, transparent 1px, transparent 18px);
}

.hero::before {
  content: "Quest";
  position: absolute;
  right: clamp(20px, 8vw, 90px);
  bottom: clamp(18px, 5vw, 44px);
  color: rgba(101, 84, 232, 0.08);
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 1000;
  letter-spacing: -0.12em;
  pointer-events: none;
}

h1 {
  letter-spacing: -0.08em;
}

.quest-word {
  display: inline-block;
  margin-left: 0.08em;
  color: var(--brand-dark);
  letter-spacing: -0.06em;
}

.panel,
.card,
.role-card,
.info-card,
.memo,
.timeline-item {
  box-shadow: 0 18px 48px rgba(28, 36, 60, 0.08);
}

.btn {
  user-select: none;
}

.btn.primary {
  background: linear-gradient(135deg, #725cf3, #3c32ba);
}

.btn.accent {
  background: linear-gradient(135deg, #ffe184, #ffba3d);
}

.brand-mark {
  background: linear-gradient(135deg, #ffe27a, #ff8f4d 62%, #725cf3);
}

.calendar-panel {
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
}

.calendar-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.calendar-headline h2 {
  margin-bottom: 0.3rem;
}

.calendar-mini-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.calendar-mini-help span {
  border: 1px solid rgba(101, 84, 232, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.68rem;
  color: var(--brand-dark);
  background: rgba(101, 84, 232, 0.08);
  font-size: 0.84rem;
  font-weight: 850;
}

.calendar-tools {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.calendar-tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon hint";
  gap: 0 9px;
  align-items: center;
  border: 1px solid rgba(23, 32, 50, 0.1);
  border-radius: 18px;
  min-height: 78px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(23, 32, 50, 0.07);
  text-align: left;
  transition: transform 0.16s ease, border 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.calendar-tool:hover,
.calendar-tool.active {
  transform: translateY(-2px);
  border-color: rgba(101, 84, 232, 0.38);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(23, 32, 50, 0.11);
}

.calendar-tool span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(101, 84, 232, 0.1);
  font-size: 1.35rem;
}

.calendar-tool strong {
  grid-area: title;
  line-height: 1.1;
}

.calendar-tool small {
  grid-area: hint;
  color: var(--muted);
  line-height: 1.35;
}

.calendar-scroll {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid rgba(23, 32, 50, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calendar-map {
  --lane-h: 76px;
  --label-w: 150px;
  display: grid;
  grid-template-columns: var(--label-w) minmax(760px, 1fr);
  grid-template-rows: 56px auto;
  min-width: 920px;
  position: relative;
}

.calendar-corner,
.calendar-column-label,
.calendar-role-label {
  display: flex;
  align-items: center;
  border-color: rgba(23, 32, 50, 0.08);
}

.calendar-corner {
  position: sticky;
  left: 0;
  z-index: 4;
  justify-content: center;
  border-right: 1px solid rgba(23, 32, 50, 0.08);
  border-bottom: 1px solid rgba(23, 32, 50, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-weight: 900;
}

.calendar-columns {
  display: grid;
  border-bottom: 1px solid rgba(23, 32, 50, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.calendar-column-label {
  justify-content: center;
  gap: 0.42rem;
  padding: 0 10px;
  border-right: 1px solid rgba(23, 32, 50, 0.08);
  color: #38445a;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-column-label span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 0.82rem;
}

.calendar-role-labels {
  position: sticky;
  left: 0;
  z-index: 3;
  display: grid;
  background: rgba(255, 255, 255, 0.88);
  border-right: 1px solid rgba(23, 32, 50, 0.08);
}

.calendar-role-label {
  gap: 0.58rem;
  min-height: var(--lane-h);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(23, 32, 50, 0.08);
}

.calendar-role-label span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(255, 191, 71, 0.22);
  font-size: 1.12rem;
}

.calendar-role-label strong {
  min-width: 0;
  overflow: hidden;
  color: #293449;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-dropzone {
  position: relative;
  display: grid;
  grid-auto-rows: var(--lane-h);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(101, 84, 232, 0.035) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 32, 50, 0.05) 0 1px, transparent 1px),
    rgba(255, 255, 255, 0.42);
}

.calendar-cell {
  min-height: var(--lane-h);
  border-right: 1px solid rgba(23, 32, 50, 0.07);
  border-bottom: 1px solid rgba(23, 32, 50, 0.07);
  background: transparent;
}

.calendar-drag-over .calendar-dropzone {
  outline: 3px solid rgba(101, 84, 232, 0.22);
  outline-offset: -6px;
  background:
    linear-gradient(90deg, rgba(101, 84, 232, 0.06) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 32, 50, 0.05) 0 1px, transparent 1px),
    rgba(101, 84, 232, 0.05);
}

.calendar-empty {
  position: absolute;
  inset: 20px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(101, 84, 232, 0.28);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-weight: 850;
  pointer-events: none;
}

.calendar-arrow {
  position: absolute;
  z-index: 5;
  height: 48px;
  min-width: 86px;
  touch-action: none;
  filter: drop-shadow(0 13px 17px rgba(23, 32, 50, 0.13));
}

.arrow-fill {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 32, 50, 0.08);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%, 12px 50%);
  background: linear-gradient(135deg, rgba(101, 84, 232, 0.94), rgba(70, 56, 190, 0.96));
}

.calendar-arrow[data-tone="cyan"] .arrow-fill {
  background: linear-gradient(135deg, rgba(31, 191, 189, 0.94), rgba(17, 134, 151, 0.96));
}

.calendar-arrow[data-tone="amber"] .arrow-fill {
  background: linear-gradient(135deg, rgba(255, 201, 91, 0.98), rgba(237, 134, 36, 0.98));
}

.calendar-arrow[data-tone="rose"] .arrow-fill {
  background: linear-gradient(135deg, rgba(238, 93, 124, 0.96), rgba(190, 59, 92, 0.98));
}

.calendar-arrow[data-tone="green"] .arrow-fill {
  background: linear-gradient(135deg, rgba(55, 189, 124, 0.96), rgba(24, 126, 92, 0.98));
}

.calendar-arrow[data-tone="blue"] .arrow-fill {
  background: linear-gradient(135deg, rgba(78, 139, 247, 0.96), rgba(54, 80, 197, 0.98));
}

.arrow-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  height: 100%;
  padding: 0 34px 0 22px;
  color: #fff;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  cursor: grab;
  overflow: hidden;
}

.arrow-content:active,
.calendar-arrow.is-dragging .arrow-content {
  cursor: grabbing;
}

.arrow-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  text-shadow: none;
}

.arrow-content strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow-handle {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 22px;
  height: 40px;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(23, 32, 50, 0.24);
  box-shadow: 0 6px 16px rgba(23, 32, 50, 0.16);
  cursor: ew-resize;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.arrow-handle-start {
  left: -7px;
}

.arrow-handle-end {
  right: -7px;
}

.calendar-arrow:hover .arrow-handle,
.calendar-arrow:focus-within .arrow-handle,
.calendar-arrow.is-dragging .arrow-handle {
  opacity: 1;
}

.arrow-handle:hover {
  transform: translateY(-50%) scale(1.05);
}

.arrow-delete,
.arrow-rename {
  position: absolute;
  top: -10px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 32, 50, 0.88);
  box-shadow: 0 8px 18px rgba(23, 32, 50, 0.18);
  font-weight: 950;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.arrow-delete {
  right: -8px;
}

.arrow-rename {
  right: 22px;
}

.calendar-arrow:hover .arrow-delete,
.calendar-arrow:hover .arrow-rename,
.calendar-arrow:focus-within .arrow-delete,
.calendar-arrow:focus-within .arrow-rename {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .calendar-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .calendar-headline {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-mini-help {
    justify-content: flex-start;
  }

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

  .calendar-map {
    --label-w: 128px;
    min-width: 820px;
  }
}

@media (max-width: 520px) {
  .calendar-tools {
    grid-template-columns: 1fr;
  }
}
