.cyc-sheet[hidden] {
  display: none;
}

.cyc-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.cyc-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cyc-sheet__panel {
  position: absolute;
  left: 50%;
  top: 16px;
  width: calc(100% - 24px);
  max-width: 340px;
  max-height: calc(100% - 32px);
  overflow: hidden;
  border-radius: 26px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

.cyc-sheet--open .cyc-sheet__panel {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cyc-sheet__panel--identity {
  padding: 18px;
}

.cyc-sheet__panel--character {
  padding: 18px;
  max-width: 360px;
}

.cyc-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cyc-sheet__title {
  font-size: 16px;
  font-weight: 800;
  color: #4d5c77;
}

.cyc-sheet__sub {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(93, 110, 139, 0.7);
}

.cyc-sheet__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(171, 187, 209, 0.3);
  border-radius: 12px;
  background: rgba(254, 253, 248, 0.76);
  color: #4d5c77;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cyc-sheet__body,
.cyc-sheet__scroll {
  margin-top: 16px;
}

.cyc-sheet__scroll {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding-right: 4px;
}

.cyc-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid rgba(171, 187, 209, 0.3);
  border-radius: 18px;
  background: rgba(254, 253, 248, 0.76);
  color: #4d5c77;
  text-align: left;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.cyc-sheet__item + .cyc-sheet__item {
  margin-top: 12px;
}

.cyc-sheet__item:hover,
.cyc-sheet__item--active {
  border-color: rgba(171, 187, 209, 0.48);
  box-shadow: 0 12px 20px rgba(171, 187, 209, 0.18);
  transform: translateY(-1px);
}

.cyc-sheet__item-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
}

.cyc-sheet__item-name {
  font-size: 15px;
  font-weight: 700;
}

.cyc-sheet__create {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: none;
  border-radius: 16px;
  background: rgba(254, 253, 248, 0.8);
  color: #4d5c77;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cyc-sheet-character {
  padding: 14px;
  border: 1px solid rgba(171, 187, 209, 0.28);
  border-radius: 20px;
  background: rgba(254, 253, 248, 0.76);
}

.cyc-sheet-character__header {
  margin-bottom: 12px;
}

.cyc-sheet-character__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cyc-sheet-character__avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(171, 187, 209, 0.28);
  border-radius: 14px;
  background: rgba(254, 253, 248, 0.92);
}

.cyc-sheet-character__name {
  font-size: 15px;
  font-weight: 800;
  color: #4d5c77;
}

.cyc-sheet-character__owner {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(93, 110, 139, 0.7);
}

.cyc-sheet__group + .cyc-sheet__group {
  margin-top: 14px;
}

.cyc-sheet__label {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(93, 110, 139, 0.7);
  letter-spacing: 0.04em;
}

.cyc-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(171, 187, 209, 0.3);
  border-radius: 14px;
  background: rgba(254, 253, 248, 0.78);
  color: #4d5c77;
  font-size: 13px;
}

.cyc-check-row + .cyc-check-row {
  margin-top: 8px;
}

.cyc-check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #abbbd1;
}

.cyc-move-row {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 10px;
  align-items: center;
}

@media (max-width: 420px) {
  .cyc-sheet__panel {
    width: calc(100% - 20px);
    top: 10px;
    max-height: calc(100% - 20px);
    border-radius: 22px;
  }

  .cyc-sheet__panel--identity,
  .cyc-sheet__panel--character {
    padding: 16px;
  }

  .cyc-move-row {
    grid-template-columns: 1fr;
  }
}

.cyc-sheet__backdrop {
  background: rgba(93, 110, 139, 0.18);
}

.cyc-sheet__panel {
  background: rgba(254, 253, 248, 0.9);
  border: 1px solid rgba(171, 187, 209, 0.28);
  box-shadow:
    0 16px 32px rgba(171, 187, 209, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.cyc-sheet__title,
.cyc-sheet__item,
.cyc-sheet-character__name,
.cyc-check-row,
.cyc-sheet__create {
  color: #4d5c77;
}

.cyc-sheet__sub,
.cyc-sheet-character__owner,
.cyc-sheet__label {
  color: rgba(93, 110, 139, 0.7);
}

.cyc-sheet__close,
.cyc-sheet__item,
.cyc-sheet__create,
.cyc-sheet-character,
.cyc-sheet-character__avatar,
.cyc-check-row {
  border-color: rgba(171, 187, 209, 0.3);
  background: rgba(254, 253, 248, 0.76);
  box-shadow:
    0 10px 24px rgba(171, 187, 209, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.cyc-sheet__item:hover,
.cyc-sheet__item--active {
  border-color: rgba(171, 187, 209, 0.48);
  box-shadow:
    0 14px 28px rgba(171, 187, 209, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.cyc-check-row input[type="checkbox"] {
  accent-color: #abbbd1;
}
