/* The same light edge, raised row and recessed track throughout the app. */
#app.v85-app {
  --depth-card: linear-gradient(165deg, #fffaff 0%, #f3e1ff 50%, #e7cafb 100%);
  --depth-row: linear-gradient(180deg, #fffdfd 0%, #fbf2ff 47%, #ead9f8 100%);
  --depth-gold: linear-gradient(180deg, #fff9d9 0%, #fff1a8 55%, #ffdc76 100%);
  --depth-card-shadow:
    inset 0 1px 0 white, inset 0 -2px 0 #ba80e746,
    0 2px 0 #ce9dea, 0 5px 0 #6833989c, 0 10px 16px #2e104868;
  --depth-row-shadow:
    inset 0 1px 0 #fff, inset 0 -1px 0 #9773b827,
    0 2px 0 #9163b33d, 0 3px 6px #45157426;
  --depth-track: linear-gradient(180deg, #c8addf, #e3d5ef);
  --depth-track-shadow: inset 0 2px 3px #47236853, 0 1px 0 #fffc;
  --depth-fill-sheen: linear-gradient(180deg, #fff8, #fff0 48%, #2600472b);
}

/* Lift the outer surface away from the page while retaining the existing layout. */
#app.v85-app :is(
  #childView #taskPanel,
  #childView #schoolPanel,
  #treasureView .v109-reward-section,
  #treasureView .v85-progress,
  #historyView .v111-achievement-stats,
  #historyView .v109-results-section,
  #historyView .v111-comparison,
  #calendarView .v89-calendar-intro,
  #calendarView #eventForm,
  #calendarView .calendar-month,
  #designView .v88-profile-hero,
  #designView .v88-photo-card,
  #designView .v88-avatar-card,
  #pinView .v104-pin-card,
  #pinView .v104-pin-hint,
  #parentView :is(.v85-parent-pending, .v106-step-card, .v106-schedule-panel),
  #parentView :is(#rewardWishes, .star-actions, .event-parent),
  #v85-parent-settings > .panel
) {
  background: var(--depth-card) !important;
  border-color: #fff5ff !important;
  box-shadow: var(--depth-card-shadow) !important;
}

#app.v85-app #pinView.v104-parent-lock {
  max-width: var(--mwh-shell, 580px) !important;
  margin-inline: auto !important;
}

/* Nested surfaces have a shorter shadow so adjacent rows remain distinct. */
#app.v85-app :is(
  #childView #tasks .task,
  #childView :is(.v90-week-task, .v90-selected-day, .upcoming-event, .v108-overview-progress),
  #childView #bag,
  #childView #schedule,
  #childView #bag .schoolrow,
  #treasureView :is(.v109-tier, .v88-wish-row),
  #historyView .v109-task-row,
  #historyView .v111-comparison .v85-chart-row,
  #historyView #history :is(.approval, .progress-stat, .wh-goal, .wh-chart),
  #calendarView :is(.event-item, .calendar-cell),
  #designView .v88-avatar-button,
  #parentView .v85-parent-options button,
  #parentView :is(.reward-field, .approval, .parent-event, .v74-assignment),
  #parentView :is(.task-suggestions button, .v106-summary, .v106-current-tasks),
  #parentView #scheduleInputs > *,
  #parentView #onceList > *,
  #parentView #rewardRedemptions > *,
  #v85Drawer .v85-drawer button[data-drawer-view]
) {
  background: var(--depth-surface, var(--depth-row)) !important;
  border: 1px solid var(--depth-edge, #fffbff) !important;
  box-shadow: var(--depth-row-shadow) !important;
}

#app.v85-app #childView #tasks .task.done:not(.approved) {
  --depth-surface: var(--depth-gold);
  --depth-edge: #fff6cc;
}

#app.v85-app #childView #tasks .task.approved {
  --depth-surface: linear-gradient(180deg, #f1ffe8, #d9f8c9 54%, #bdeba9);
  --depth-edge: #f4ffed;
}

#app.v85-app #treasureView .v109-tier {
  --depth-surface: radial-gradient(ellipse at 50% 22%, #fff0ae, transparent 56%),
    linear-gradient(180deg, #fffdf0, #fff4cf 62%, #f5dcf3);
  --depth-edge: #fff6c8;
}

#app.v85-app :is(
  #historyView .v85-chart-row:first-child,
  #calendarView .calendar-cell.current,
  #v85Drawer button[data-drawer-view][aria-current="page"]
) {
  --depth-surface: var(--depth-gold);
  --depth-edge: #ffe6a2;
}

#app.v85-app #designView .v88-avatar-button.selected {
  --depth-edge: #ffd654;
}

/* Keep event details integrated in the raised parent event row. */
#app.v85-app #v85-parent-events .parent-event .event-item {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#app.v85-app :is(
  #childView .v90-week-day,
  #parentView .category-buttons button,
  #v85-parent-plan :is(.v74-days button, .v106-weekdays button)
) {
  box-shadow: var(--depth-row-shadow) !important;
}

#app.v85-app :is(
  #childView .v90-week-day[aria-pressed="true"],
  #v85-parent-plan :is(.v74-days button.on, .v106-weekdays button.is-on)
) {
  background: var(--depth-gold) !important;
}

#app.v85-app :is(#childView #bag, #historyView .v85-extra > #history .progress-dashboard) {
  background: var(--depth-card) !important;
  box-shadow: var(--depth-card-shadow) !important;
}

#app.v85-app #childView #schedule .table {
  border-spacing: 0 4px;
}

#app.v85-app #childView #schedule .table :is(th, td) {
  border: 0;
  box-shadow: var(--depth-row-shadow);
}

#app.v85-app #childView #schedule .table th {
  background: linear-gradient(180deg, #f4e8fc, #dec5f3);
  border-radius: 8px 0 0 8px;
}

#app.v85-app #childView #schedule .table td {
  background: var(--depth-row);
  border-radius: 0 8px 8px 0;
}

#app.v85-app :is(
  #childView .v108-track,
  #treasureView .tier-track,
  #treasureView .v88-progbar,
  #historyView .mini-track,
  #historyView .v111-comparison .v85-chart-track,
  #historyView #history :is(.wh-track, .wh-goal-track)
) {
  background: var(--depth-track) !important;
  box-shadow: var(--depth-track-shadow) !important;
}

#app.v85-app #historyView .v109-task-row .mini-track { height: 8px; }

#app.v85-app :is(
  #childView #v108DayFill,
  #treasureView .tier-track > span,
  #treasureView #v85ProgressFill,
  #historyView .mini-track > span,
  #historyView .v111-comparison .v85-chart-track > span,
  #historyView #history :is(.wh-fill, .wh-goal-track > div)
) {
  background: var(--depth-fill-sheen), var(--depth-fill, #ffbb28) !important;
  box-shadow: inset 0 -1px 0 #400e4c32 !important;
}

#app.v85-app #historyView .mini-track > span { --depth-fill: var(--bar-color, #8a43d0); }
#app.v85-app #historyView .v85-chart-track > .v85-color-1 { --depth-fill: #27a6e5; }
#app.v85-app #historyView .v85-chart-track > .v85-color-2 { --depth-fill: #9757db; }

/* Surface edges also follow the existing shared gold-and-violet star strip. */
#app.v85-app .star-balance {
  box-shadow: inset 0 1px 0 #ffe4ffad, inset 0 -2px 0 #200a665e,
    0 3px 0 #41136c, 0 6px 12px #29124881, 0 0 7px #ffca707c !important;
}

#app.v85-app #designView .v88-profile-hero .v88-profile-details strong {
  color: var(--mwh-ink, #301456) !important;
  -webkit-text-fill-color: var(--mwh-ink, #301456) !important;
  text-shadow: none !important;
}

#app.v85-app #designView .v88-profile-hero .v88-profile-details > span {
  color: #986419 !important;
  -webkit-text-fill-color: #986419 !important;
  text-shadow: none !important;
}
