@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --sb-bg: rgba(255, 255, 255, 0.06);
  --sb-border: rgba(255, 255, 255, 0.15);
  --sb-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body {
  padding: 0; /* override foundation's padding for app layout */
}

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: var(--sb-bg);
  box-shadow: var(--sb-shadow);
}

.topbar .title-input {
  flex: 1;
}

.pill {
  font-size: 12px;
  color: var(--ciiic-white-70);
  border: 1px solid var(--sb-border);
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr 420px;
  gap: 14px;
  align-items: start;
}

.panel {
  border-radius: 10px;
  border: 1px solid var(--sb-border);
  background: var(--sb-bg);
  box-shadow: var(--sb-shadow);
  padding: 12px;
}

.panel h2 {
  margin: 6px 0 12px;
  font-size: 18px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  user-select: none;
}

.list-item:hover {
  background: rgba(0, 0, 0, 0.2);
}

.list-item.is-active {
  border-color: var(--ciiic-primary-green);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.list-item .small {
  font-size: 12px;
  color: var(--ciiic-white-70);
  margin-top: 4px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row.spread {
  justify-content: space-between;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help {
  font-size: 12px;
  color: var(--ciiic-white-70);
  line-height: 1.4;
}

.danger {
  border-color: rgba(255, 80, 80, 0.6) !important;
}

.btn {
  border-radius: 6px;
}

.btn-danger {
  background: rgba(255, 80, 80, 0.2);
  border: 1px solid rgba(255, 80, 80, 0.7);
  color: #fff;
}
.btn-danger:hover {
  background: rgba(255, 80, 80, 0.3);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal {
  width: min(720px, 100%);
  border-radius: 12px;
  border: 1px solid var(--sb-border);
  background: rgba(20, 28, 26, 0.98);
  box-shadow: var(--sb-shadow);
  padding: 14px;
}

.modal h2 {
  margin: 8px 0 10px;
}

.thumb {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  aspect-ratio: 16 / 9;
  position: relative;
  --thumb-scale: 0.35;
}

.thumb .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;
  height: 900px;
  transform: scale(var(--thumb-scale));
  transform-origin: top left;
  max-width: none;
  max-height: none;
}

@media (max-width: 1200px) {
  .layout { grid-template-columns: 320px 1fr; }
  .preview-panel { display: none; }
}

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


