.wc-entry, .wc-pet, .wc-panel, dialog.wc-tutorial {
  --wc-accent: var(--primary, var(--wine-dark, var(--wine, #8a4059)));
  --wc-ink: var(--ink, var(--text, #47313d));
  --wc-muted: var(--muted, #78616d);
  --wc-paper: var(--panel, var(--paper, #fffdfc));
  --wc-tint: var(--panel-soft, var(--rose, #f7edf1));
  --wc-line: var(--line, #e6dce0);
}

.wc-entry, .wc-panel-entry, .wc-close, .wc-reminder-action, .wc-clip {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.wc-entry {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid var(--wc-line);
  border-radius: 8px;
  background: var(--wc-paper);
  color: var(--wc-accent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  flex: none;
}

.wc-entry:hover, .wc-close:hover, .wc-clip:hover, .wc-reminder-action:hover {
  background: var(--wc-tint);
}

.sh-heading .wc-entry { margin-top: 9px; }
.wc-settings-entry.btn { display: none; }

.wc-pet, .wc-panel {
  position: fixed;
  z-index: 70;
  box-sizing: border-box;
}

.wc-pet {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border: 1px solid var(--wc-line);
  border-radius: 50%;
  padding: 0;
  background: var(--wc-paper);
  color: var(--wc-accent);
  box-shadow: 0 5px 19px rgb(46 25 34 / 15%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.wc-pet:hover, .wc-pet[aria-expanded=true] { background: var(--wc-tint); }
.wc-pet.wc-dragging { cursor: grabbing; }
.wc-mascot { display: block; position: relative; width: 32px; height: 36px; pointer-events: none; }
.wc-ears, .wc-face { position: absolute; display: block; }
.wc-ears { inset: 2px 3px auto; height: 16px; }
.wc-ears::before, .wc-ears::after {
  content: '';
  position: absolute;
  top: 0;
  width: 8px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 70% 70% 56% 56%;
  background: var(--wc-tint);
}
.wc-ears::before { left: 3px; transform: rotate(-17deg); }
.wc-ears::after { right: 3px; transform: rotate(17deg); }
.wc-face {
  inset: 14px 0 2px;
  border: 1px solid currentColor;
  border-radius: 55% 55% 46% 46%;
  background: radial-gradient(ellipse at 16% 65%, #ed9bb280 0 2px, transparent 3px),
    radial-gradient(ellipse at 84% 65%, #ed9bb280 0 2px, transparent 3px), var(--wc-tint);
}
.wc-face::before, .wc-face::after { content: ''; position: absolute; background: currentColor; }
.wc-face::before { top: 7px; left: 8px; width: 3px; height: 4px; border-radius: 50%; box-shadow: 11px 0 currentColor; }
.wc-face::after { top: 12px; left: 13px; width: 4px; height: 3px; border-radius: 50% 50% 65% 65%; }

.wc-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 1px solid var(--wc-paper);
  border-radius: 12px;
  background: var(--wc-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 17px;
  pointer-events: none;
}

.wc-panel {
  width: min(286px, calc(100vw - 24px));
  max-height: min(320px, 54vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 9px 13px 13px;
  border: 1px solid var(--wc-line);
  border-radius: 15px;
  background: var(--wc-paper);
  color: var(--wc-ink);
  box-shadow: 0 14px 42px rgb(46 25 34 / 20%);
}

.wc-panel[hidden], .wc-badge[hidden] { display: none; }
.wc-panel-head, .wc-tutorial-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wc-panel-head h2 { margin: 0; color: var(--wc-ink); font: inherit; font-weight: 750; font-size: 15px; }
.wc-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--wc-muted);
  font-size: 23px;
  line-height: 1;
}
.wc-panel-entry {
  width: 100%;
  min-height: 42px;
  padding: 7px 11px;
  border: 1px solid var(--wc-line);
  border-radius: 9px;
  background: var(--wc-tint);
  color: var(--wc-accent);
  font-weight: 700;
  text-align: left;
}
.wc-panel-entry::after { content: '›'; float: right; font-size: 17px; line-height: 1.35; }
.wc-reminder-section h3 { margin: 10px 0 3px; color: var(--wc-ink); font: inherit; font-weight: 700; font-size: 13px; }
.wc-reminder-list, .wc-clip-list { padding: 0; margin: 0; list-style: none; }
.wc-reminder-list li + li { border-top: 1px solid var(--wc-line); }
.wc-reminder-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.wc-chevron { color: var(--wc-accent); font-size: 18px; }
.wc-muted { color: var(--wc-muted); margin: 4px 0; font-size: 13px; line-height: 1.5; }

dialog.wc-tutorial {
  box-sizing: border-box;
  inset: 0;
  width: min(560px, calc(100vw - 26px));
  max-width: none;
  max-height: 88vh;
  max-height: 88dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--wc-line);
  border-radius: 16px;
  background: var(--wc-paper);
  color: var(--wc-ink);
  box-shadow: 0 20px 80px rgb(46 25 34 / 22%);
  overflow: hidden;
}
dialog.wc-tutorial[open] { display: flex; flex-direction: column; }
dialog.wc-tutorial::backdrop { background: rgb(44 28 39 / 46%); }
.wc-tutorial-head { flex: none; padding: 12px 17px; border-bottom: 1px solid var(--wc-line); }
.wc-tutorial-head h2 { margin: 0; color: var(--wc-ink); font: inherit; font-size: 20px; font-weight: 750; }
.wc-tutorial-head .wc-muted { margin: 1px 0 0; }
.wc-tutorial-body { min-height: 0; overflow: auto; padding: 12px 17px 17px; overscroll-behavior: contain; }
.wc-search {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  margin: 0 0 9px;
  padding: 7px 10px;
  border: 1px solid var(--wc-line);
  border-radius: 8px;
  background: var(--wc-paper);
  color: var(--wc-ink);
  font: inherit;
  font-size: 16px;
}
.wc-group { border: 1px solid var(--wc-line); border-radius: 9px; overflow: clip; }
.wc-group + .wc-group { margin-top: 7px; }
.wc-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 11px;
  background: var(--wc-tint);
  color: var(--wc-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.wc-summary::-webkit-details-marker { display: none; }
.wc-summary::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}
.wc-group[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.wc-group-count { margin-left: auto; color: var(--wc-muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
.wc-clip-list li { border-top: 1px solid var(--wc-line); }
.wc-clip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 43px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  font-size: 14px;
  text-align: left;
  line-height: 1.55;
}
.wc-play { width: 22px; height: 22px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--wc-tint); color: var(--wc-accent); }
.wc-play::before { content: ''; border: solid transparent; border-width: 4px 0 4px 6px; border-left-color: currentColor; margin-left: 1px; }
.wc-clip-title { overflow-wrap: anywhere; }
.wc-time { margin-left: auto; color: var(--wc-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wc-back { margin: 0 0 8px; }
.wc-video-title { margin: 0 0 5px; color: var(--wc-ink); font: inherit; font-size: 17px; font-weight: 750; line-height: 1.45; }
.wc-video { display: block; width: 100%; max-height: 58vh; max-height: 58dvh; margin: 9px auto 0; border-radius: 9px; background: #181419; object-fit: contain; }
.wc-video + .wc-muted:empty { display: none; }

@media (max-width: 760px) {
  #account-settings-page .wc-settings-entry.btn {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    white-space: nowrap;
  }
  .topbar:has(.wc-entry) .mobile-brand { min-width: 0; }
  .topbar:has(.wc-entry) .mobile-brand .lm-wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .top-right:has(.wc-entry) { flex: none; gap: 6px; }
  .topbar .wc-entry { min-height: 35px; padding-inline: 7px; }
  .psych-role-header .wc-entry { min-height: 40px; }
  .wc-pet { width: 49px; height: 49px; }
  .wc-tutorial-head { padding: 10px 12px; }
  .wc-tutorial-body { padding: 10px 12px 12px; }

  #app > [data-sh-page]:has(.wc-entry) { padding-inline: clamp(16px, 5vw, 22px); }
  .sh-heading:has(.wc-entry) {
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
  }
  .sh-heading:has(.wc-entry) > div { flex-basis: 100%; order: -1; min-width: 0; }
  .sh-heading:has(.wc-entry) > button { white-space: nowrap; }
}
