/* Soft 3D: the look of the theme NoteWise Glass, and an option on every other theme (data-fx="3d"): cards, buttons and boxes are solid objects with depth (POS and Call Center share this file).
   A light edge on top, a darker edge underneath, a soft shadow that lifts the object; a pressed button sinks and fields are cut into the surface.
   Everything is scoped to [data-theme="notewise"], so no other theme changes. */
html:is([data-theme="notewise"], [data-fx~="3d"]) {
  --n3-hi: rgba(255, 255, 255, .16); --n3-lo: rgba(0, 0, 0, .22); --n3-drop: rgba(0, 0, 0, .45); --n3-in: rgba(0, 0, 0, .38);
}
html:is([data-theme="notewise"], [data-fx~="3d"]):not(.night):not(.dark) { --n3-hi: rgba(255, 255, 255, .9); --n3-lo: rgba(20, 40, 80, .10); --n3-drop: rgba(40, 60, 100, .28); --n3-in: rgba(20, 40, 80, .22); }

/* cards and panels (the Frost token draws them) */
html:is([data-theme="notewise"], [data-fx~="3d"]) body:is(.pg, .pos-ui) {
  --s-shadow: inset 0 2px 6px var(--n3-hi), inset 0 -6px 12px var(--n3-lo), 0 14px 30px -10px var(--n3-drop); --s-r: 24px;
}
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.pp-card, .card, aside, main, article, [class*="bg-surface-container-low"][class*="rounded"], .lc-glass):not(.hidden):not([hidden]):not([class*="fixed"]):not(.h-full) {
  box-shadow: inset 0 2px 6px var(--n3-hi), inset 0 -6px 12px var(--n3-lo), 0 14px 30px -10px var(--n3-drop);
}

/* buttons and keys: raised, they sink when pressed */
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.tactile-key, .menu-key, .branch-feed-card, .pp-btn, .btn, .xf-key, .xf-go, button.rounded-lg, button.rounded-xl):not(.menu-key-empty):not(:disabled) {
  box-shadow: inset 0 2px 5px var(--n3-hi), inset 0 -5px 9px var(--n3-lo), 0 8px 16px -5px var(--n3-drop);
  transition: transform .08s ease, box-shadow .08s ease;
}
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.tactile-key, .menu-key, .branch-feed-card, .pp-btn, .btn, .xf-key, .xf-go, button.rounded-lg, button.rounded-xl):not(.menu-key-empty):not(:disabled):hover {
  transform: translateY(-1px); box-shadow: inset 0 2px 5px var(--n3-hi), inset 0 -5px 9px var(--n3-lo), 0 12px 20px -5px var(--n3-drop);
}
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.tactile-key, .menu-key, .branch-feed-card, .pp-btn, .btn, .xf-key, .xf-go, button.rounded-lg, button.rounded-xl):not(.menu-key-empty):not(:disabled):active {
  transform: translateY(2px); box-shadow: inset 0 4px 10px var(--n3-in), inset 0 -2px 6px var(--n3-hi);
}
/* the chosen tab or key stays pushed in */
html:is([data-theme="notewise"], [data-fx~="3d"]) :is([aria-pressed="true"], [aria-selected="true"], .active, .on):is(button, a, [role="tab"]):not(.menu-key-empty) {
  transform: translateY(1px); box-shadow: inset 0 4px 10px var(--n3-in), inset 0 -2px 6px var(--n3-hi);
}

/* fields and boxes that hold something are cut into the surface */
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  box-shadow: inset 0 3px 9px var(--n3-in), inset 0 -2px 5px var(--n3-hi);
}
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(input, select, textarea):focus { box-shadow: inset 0 3px 9px var(--n3-in), 0 0 0 2px var(--c-primary, #7c8cff); }

/* the unused places stay flat light-gray slots, pressed into the board */
html:is([data-theme="notewise"], [data-fx~="3d"]) button.menu-key-empty, html:is([data-theme="notewise"], [data-fx~="3d"]) #branchesGrid .branch-empty-place {
  box-shadow: inset 0 2px 4px var(--n3-in) !important; transform: none !important;
}
@media (prefers-reduced-motion: reduce) { html:is([data-theme="notewise"], [data-fx~="3d"]) * { transition: none !important; } }

/* soft edges: generous rounded corners on everything that is an object */
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.pp-card, .card, aside, main, article, .lc-glass):not([class*="fixed"]):not(.h-full) { border-radius: 24px !important; }
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.tactile-key, .menu-key, .branch-feed-card, .pp-btn, .btn, .xf-key, .xf-go, button.rounded-lg, button.rounded-xl):not(.menu-key-empty) { border-radius: 16px !important; }
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) { border-radius: 14px !important; }
html:is([data-theme="notewise"], [data-fx~="3d"]) :is(.tactile-key, .menu-key, .branch-feed-card, .pp-btn, .btn):not(.menu-key-empty) { border-color: transparent !important; }
html:is([data-theme="notewise"], [data-fx~="3d"]) button.menu-key-empty, html:is([data-theme="notewise"], [data-fx~="3d"]) #branchesGrid .branch-empty-place { border-radius: 16px !important; }
