#koala-demo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
  text-align: left;
  outline: none !important;
  box-shadow: none !important;
}

#koala-demo:focus,
#koala-demo:focus-visible,
#koala-demo .koala-demo-rail-shell:focus,
#koala-demo .koala-demo-rail-shell:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

#koala-demo *,
#koala-demo *::before,
#koala-demo *::after {
  box-sizing: border-box;
}

#koala-demo button,
#koala-demo input {
  font-family: inherit;
}

#koala-demo button {
  -webkit-tap-highlight-color: transparent;
}

.koala-demo-rail-shell {
  position: absolute;
  inset: 0;
  color: #f8f8f5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  isolation: isolate;
  pointer-events: none;
  text-align: left;
}

.koala-demo-rail-shape {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.koala-demo-rail-hit {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  min-width: 44px;
  cursor: pointer;
  pointer-events: auto;
}

.koala-demo-rail-column {
  position: absolute;
  right: 0;
  z-index: 9;
  width: 64px;
  opacity: 1;
  transition: opacity 180ms ease-out;
  pointer-events: auto;
}

.koala-demo-note-list {
  position: absolute;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.koala-demo-note-list::-webkit-scrollbar {
  display: none;
}

.koala-demo-note,
.koala-demo-plus {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--note-colour, transparent);
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: background-color 120ms ease-out, opacity 120ms ease-out;
}

.koala-demo-note {
  touch-action: pan-y;
}

.koala-demo-plus:hover {
  background: rgba(255, 255, 255, .12);
}

.koala-demo-note:hover,
.koala-demo-note.is-current {
  background: var(--note-colour);
}

.koala-demo-note:focus-visible {
  outline: 2px solid var(--note-ink);
  outline-offset: 1px;
}

.koala-demo-plus:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 1px;
}

.koala-demo-note.is-dragging {
  opacity: .38;
}

.koala-demo-note.is-drop-target {
  background: var(--note-colour);
  outline: 2px dashed var(--note-ink);
  outline-offset: 2px;
}

.koala-demo-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: var(--note-icon-filter, brightness(0) invert(1));
  pointer-events: none;
}

.koala-demo-plus {
  position: absolute;
  right: 10px;
}

.koala-demo-plus .koala-demo-icon {
  width: 20px;
  height: 20px;
  opacity: .92;
}

.koala-demo-note .koala-demo-icon--note {
  width: 30px;
  height: 27px;
}

.koala-demo-plus .koala-demo-icon--plus {
  width: 28px;
  height: 26px;
}

.koala-demo-card {
  position: absolute;
  z-index: 8;
  display: block;
  color: var(--card-ink, #f8f8f5);
  opacity: 1;
  pointer-events: auto;
  text-align: left;
  transform: scale(.01);
  transform-origin: right center;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.koala-demo-card.is-open {
  transform: scale(1);
}

.koala-demo-card[hidden] {
  display: none;
}

.koala-demo-card.is-closing {
  opacity: 0;
  pointer-events: none;
  transform: scale(.01);
}

.koala-demo-card.is-detached {
  min-width: var(--detached-min-width, 280px);
  min-height: var(--detached-min-height, 164px);
  max-width: calc(100% - 24px);
  max-height: calc(100% - 20px);
  overflow: hidden;
  resize: both;
  border-radius: 20px;
  background: var(--card-colour, #1f201f);
  transform-origin: center;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .28);
}

.koala-demo-card.is-detached .koala-demo-card-shape {
  display: none;
}

.koala-demo-card.is-detached::-webkit-resizer {
  background-color: transparent;
  background-image: none;
}

.koala-demo-card.is-detached .koala-demo-card-surface {
  background: var(--card-colour, #1f201f);
  color: var(--card-ink, #f8f8f5);
  width: 100% !important;
  height: 100% !important;
  border-radius: 20px;
  cursor: grab;
}

.koala-demo-card.is-detached .koala-demo-card-surface:active {
  cursor: grabbing;
}

.koala-demo-card-shape {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.koala-demo-card-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-body-width, 320px);
  height: 164px;
  overflow: hidden;
  border-radius: 20px;
  color: var(--card-ink, #f8f8f5);
  pointer-events: auto;
  text-align: left;
}

.koala-demo-card-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  color: var(--card-ink, #f8f8f5);
  text-align: left;
}

.koala-demo-card-header {
  width: 100%;
  height: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.koala-demo-card-header:active {
  cursor: grabbing;
}

#koala-demo .koala-demo-title-button,
#koala-demo .koala-demo-title-input {
  min-width: 0;
  flex: 1 1 auto;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -.01em;
  text-align: left;
}

.koala-demo-title-button {
  overflow: hidden;
  cursor: text;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.koala-demo-title-button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.koala-demo-title-button:focus-visible,
.koala-demo-title-input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.koala-demo-title-input {
  outline: 1px solid rgba(255, 255, 255, .38);
  outline-offset: 1px;
}

.koala-demo-card-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.koala-demo-card-action {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: .9;
}

.koala-demo-return-button,
.koala-demo-detach-button {
  font-size: 19px;
  line-height: 1;
}

.koala-demo-card-action:hover {
  background: rgba(255, 255, 255, .16);
  opacity: 1;
}

.koala-demo-card-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.koala-demo-card-action .koala-demo-icon {
  width: 17px;
  height: 17px;
  filter: var(--card-icon-filter, brightness(0) invert(1));
}

.koala-demo-card-action .koala-demo-icon--trash {
  width: 18px;
  height: 20px;
}

.koala-demo-wheel-button {
  position: relative;
}

.koala-demo-colour-wheel {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.koala-demo-body-preview,
.koala-demo-body-editor {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  margin-top: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.koala-demo-body-preview {
  cursor: text;
  border-radius: 4px;
}

.koala-demo-body-preview:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.koala-demo-body-editor {
  outline: none;
  cursor: text;
}

.koala-demo-body-editor:empty::before {
  content: attr(data-placeholder);
  opacity: .55;
  pointer-events: none;
}

.koala-demo-format-row {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.koala-demo-format-button {
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.koala-demo-format-button:nth-child(1) {
  font-weight: 700;
}

.koala-demo-format-button:nth-child(2) {
  font-style: italic;
}

.koala-demo-format-button:nth-child(3) {
  text-decoration: underline;
}

.koala-demo-format-button:nth-child(4) {
  text-decoration: line-through;
}

.koala-demo-format-button:hover,
.koala-demo-format-button[aria-pressed="true"] {
  background: rgba(255, 255, 255, .14);
}

.koala-demo-format-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.koala-demo-colour-popover {
  position: absolute;
  top: 50px;
  right: 14px;
  z-index: 4;
  width: 184px;
  height: 96px;
  display: grid;
  grid-template-columns: repeat(4, 28px);
  grid-auto-rows: 28px;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(31, 32, 31, .98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.koala-demo-colour-option {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--option-colour);
  color: #fff;
  cursor: pointer;
}

.koala-demo-colour-option:hover,
.koala-demo-colour-option[aria-pressed="true"] {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .82), 0 0 0 4px rgba(255, 255, 255, .18);
}

.koala-demo-colour-option:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.koala-demo-colour-option .koala-demo-icon {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
}

.koala-demo-delete-confirm {
  width: 100%;
  margin-top: 12px;
  color: inherit;
  text-align: left;
}

.koala-demo-delete-confirm h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.koala-demo-delete-confirm p {
  max-height: 46px;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
}

.koala-demo-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.koala-demo-secondary,
.koala-demo-danger {
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.koala-demo-secondary {
  background: transparent;
  color: inherit;
}

.koala-demo-danger {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(75, 30, 25, .9);
  color: #fff;
}

.koala-demo-secondary:hover,
.koala-demo-danger:hover {
  filter: brightness(1.12);
}

.koala-demo-secondary:focus-visible,
.koala-demo-danger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.koala-demo-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 440px) {
  .koala-demo-card-surface {
    border-radius: 18px;
  }

  .koala-demo-card-content {
    padding: 16px;
  }

  .koala-demo-format-row {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .koala-demo-colour-popover {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .koala-demo-rail-column,
  .koala-demo-card,
  .koala-demo-note,
  .koala-demo-plus {
    transition: none;
  }
}
