/* Reflective surfaces only: never blur or lower the opacity of the text. */
:root{
  --glass-surface:linear-gradient(135deg,#fffffff0 0%,#ffffffad 36%,#edf5ffc4 76%,#ffffffdf 100%);
  --glass-edge:#ffffffde;
  --glass-depth:0 12px 34px #294b7820,inset 0 1px 0 #fff,inset 1px 0 0 #ffffffb3,inset 0 -1px 0 #92b3dc40;
  --glass-control:linear-gradient(145deg,#ffffffe6,#f1f6ffb8);
}
html[data-theme="dark"]{
  --glass-surface:linear-gradient(135deg,#3b5066e6 0%,#1b2c42d9 36%,#18263be6 76%,#304259e6 100%);
  --glass-edge:#c7e1ff45;
  --glass-depth:0 12px 34px #00000040,inset 0 1px 0 #e1efff50,inset 1px 0 0 #c7e1ff24,inset 0 -1px 0 #06102080;
  --glass-control:linear-gradient(145deg,#344961ed,#1b2c42e6);
}
html[data-theme] body :is(header,#cloudSyncBar,nav:not(.glass-dock),
  .card,.stat,.folder:not(.folder-colored):not(.study-paused),.drop-root,.deck-tile:not(.study-paused),.swipe-card,
  .study-card,.study-session-zone,.study-session-stage,.profile-card,.auth-card,.ai-window,.streak-modal,
  .explain-box,.edit-card-box,.study-history-card,.study-session-bubble-panel,.more-menu,dialog:not(#streakPage),#streakPage.streak-bubble,
  .shared-lib-folder,.shared-lib-deck,.shared-editor-card,.shared-lib-form,.shared-editor-footer,.shared-lib-card,.shared-new-card,
  .rich-editor,.make-card-item,.preview-explain,.library-access,
  .battle-panel,.battle-question-card,.battle-state-card,.battle-player,.battle-score-panel,.battle-paused-card,
  .ma-setup,.ma-panel,.ma-manager-panel,.ma-dialog,.ma-question,.ma-team-card,.ma-card,.ma-stat,.ma-column,.ma-category,
  .membership-free,.membership-usage>div,.membership-table-wrap,.admin-user-card){
  background:var(--glass-surface)!important;
  border-color:var(--glass-edge)!important;
  box-shadow:var(--glass-depth)!important;
  backdrop-filter:blur(20px) saturate(155%)!important;
  -webkit-backdrop-filter:blur(20px) saturate(155%)!important;
}
html[data-theme] body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select,.btn.alt,.icon-btn,.study-history-btn){
  background:var(--glass-control)!important;
  border-color:var(--glass-edge)!important;
  box-shadow:inset 0 1px 0 #ffffff50,0 3px 10px #1735570d!important;
}
/* A translucent card must never reveal its delete action while at rest. */
html[data-theme] body #deckCards .swipe-delete{
  visibility:hidden;
  pointer-events:none;
  width:92px;
  background:#fee2e2;
}
html[data-theme] body #deckCards .is-delete-visible>.swipe-delete{
  visibility:visible;
  pointer-events:auto;
}
html[data-theme] body #deckCards .swipe-delete-btn{
  background:transparent!important;
  color:#991b1b!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body #deckCards .swipe-delete{background:#432b39}
html[data-theme="dark"] body #deckCards .swipe-delete-btn{color:#ffb1b7!important}
/* Provide a solid readable surface on browsers without backdrop filtering. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root{--glass-surface:linear-gradient(135deg,#fff,#e8f0fc);--glass-control:#f4f7fc}
  html[data-theme="dark"]{--glass-surface:linear-gradient(135deg,#304259,#18263b);--glass-control:#25364f}
}
