/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Kanit","arguments":[{"subsets":["thai","latin"],"weight":["400","500","600","700","800"],"display":"swap","variable":"--font-kanit"}],"variableName":"kanit"} ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* thai */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/75717585c59e5075-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/158a69e2aae09d8b-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/9c064da0c6a8705d-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/a5f02fb6311fcdbc-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* thai */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/c0ec9aca5b19e917-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/06bc8c83090c1ec1-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/1f6d3ad4ae0f1460-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/eb67d5f0a1d7501d-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* thai */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/e947190c9bdf6068-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/52c95d4165d01384-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/574f1d56a01c5fcb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/25f7d470e08d7a87-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* thai */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/dd867c03515903ae-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/5dfeb3c6bf0f27aa-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/5d1189028b68a613-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/61eb19e8a04bc1be-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* thai */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/1ce8bc761c7de99c-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* vietnamese */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/a51b7baf2cdbd7ab-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/d6e1b2c00650118d-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Kanit_08ed37';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/f42c4a7e6e15f653-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Kanit_Fallback_08ed37';src: local("Arial");ascent-override: 108.49%;descent-override: 38.96%;line-gap-override: 0.00%;size-adjust: 101.39%
}.__className_08ed37 {font-family: '__Kanit_08ed37', '__Kanit_Fallback_08ed37';font-style: normal
}.__variable_08ed37 {--font-kanit: '__Kanit_08ed37', '__Kanit_Fallback_08ed37'
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: var(--font-kanit), Kanit, IBM Plex Sans Thai, ui-sans-serif, system-ui, sans-serif; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.\!visible {
  visibility: visible !important;
}
.visible {
  visibility: visible;
}
.invisible {
  visibility: hidden;
}
.collapse {
  visibility: collapse;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: sticky;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.contents {
  display: contents;
}
.hidden {
  display: none;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-4xl {
  max-width: 56rem;
}
.max-w-5xl {
  max-width: 64rem;
}
.flex-1 {
  flex: 1 1 0%;
}
.flex-shrink {
  flex-shrink: 1;
}
.shrink {
  flex-shrink: 1;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.cursor-pointer {
  cursor: pointer;
}
.resize {
  resize: both;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.items-center {
  align-items: center;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.space-y-5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.25rem * var(--tw-space-y-reverse));
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.break-all {
  word-break: break-all;
}
.rounded {
  border-radius: 0.25rem;
}
.border {
  border-width: 1px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-\[var\(--border-1\)\] {
  border-color: var(--border-1);
}
.p-5 {
  padding: 1.25rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-semibold {
  font-weight: 600;
}
.uppercase {
  text-transform: uppercase;
}
.italic {
  font-style: italic;
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.underline {
  text-decoration-line: underline;
}
.line-through {
  text-decoration-line: line-through;
}
.outline {
  outline-style: solid;
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Kanit is loaded via next/font/google in src/app/layout.tsx (self-hosted as
   static WOFF2 + injected as the .className on <body>). IBM Plex Sans Thai is
   still imported as a CDN fallback in case Kanit can't load. JetBrains Mono
   for .num / monospace blocks. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* === LIGHT THEME (default / primary) === */
:root {
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --bg-page: #ffffff;
  --bg-panel: #f9fafb;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-input: #f9fafb;
  --bg-elevated: #ffffff;

  /* Each tier bumped one notch darker so all readable-text tiers pass WCAG AA
     contrast on white (≥ 4.5:1 for body, ≥ 3:1 for large/disabled text):
       fg-3:  slate-600 → 5.8:1  (labels)
       fg-4:  slate-500 → 4.6:1  (muted, hints)
       fg-5:  slate-400 → 3.4:1  (disabled / placeholder — AA-large exempt)
     The fg-1/fg-2 (primary + body) tiers already pass at slate-900/700. */
  --fg-1: #0f172a;          /* slate-900 — primary text */
  --fg-2: #334155;          /* slate-700 — body */
  --fg-3: #475569;          /* slate-600 — labels (was slate-500) */
  --fg-4: #64748b;          /* slate-500 — muted (was slate-400) */
  --fg-5: #94a3b8;          /* slate-400 — disabled (was slate-300) */

  --border-1: #e5e7eb;      /* gray-200 — hairline */
  --border-2: #d1d5db;      /* gray-300 — dashed default */
  --border-3: #9ca3af;      /* gray-400 — input idle stronger */
  --border-focus: #6366f1;

  --accent-300: #a5b4fc;
  --accent-400: #6366f1;
  --accent-500: #4f46e5;    /* indigo-600 — primary action */
  --accent-600: #4338ca;    /* press */
  --accent-700: #3730a3;
  --accent-fg: #ffffff;
  --accent-tint: rgba(79, 70, 229, 0.10);
  --accent-ring: rgba(99, 102, 241, 0.35);

  --success: #16a34a;       /* green-600 */
  --success-tint: rgba(34, 197, 94, 0.10);

  --warning: #d97706;       /* amber-600 */
  --warning-tint: rgba(245, 158, 11, 0.10);

  --danger: #dc2626;        /* red-600 */
  --danger-tint: rgba(220, 38, 38, 0.10);

  --info: #0284c7;          /* sky-600 */
  --info-tint: rgba(14, 165, 233, 0.10);

  --neutral: #64748b;
  --neutral-tint: rgba(100, 116, 139, 0.08);

  --pink-500: #db2777;
  --pink-tint: rgba(219, 39, 119, 0.10);

  --navy-500: #1e293b;
  --navy-600: #0f172a;
  --navy-700: #020617;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --shadow-popover: 0 14px 36px rgba(15, 23, 42, 0.16);
  --shadow-toast:   0 18px 44px rgba(15, 23, 42, 0.22);
  /* Rest shadow — "the card is lifted ~12px off the page". Two-layer cast
     (close + far) gives natural depth. Bumped from the previous subtle pass. */
  --shadow-card:    0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.10);
  --shadow-card-hover: 0 6px 12px rgba(15, 23, 42, 0.08), 0 22px 48px rgba(15, 23, 42, 0.16);
  --shadow-none:    none;

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* === DARK THEME (optional) — applied when html has .dark === */
.dark {
  --bg-page: #030712;
  --bg-panel: #0b1220;
  --bg-card: #111827;
  --bg-card-hover: #161f31;
  --bg-input: #0f172a;
  --bg-elevated: #1f2937;

  --fg-1: #f9fafb;
  --fg-2: #d1d5db;
  --fg-3: #9ca3af;
  --fg-4: #6b7280;
  --fg-5: #4b5563;

  --border-1: #1f2937;
  --border-2: #374151;
  --border-3: #4b5563;

  --accent-300: #a5b4fc;
  --accent-400: #818cf8;
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --accent-700: #4338ca;
  --accent-tint: rgba(99, 102, 241, 0.12);

  --success: #34d399;
  --success-tint: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-tint: rgba(251, 191, 36, 0.12);
  --danger: #fb7185;
  --danger-tint: rgba(251, 113, 133, 0.12);
  --info: #38bdf8;
  --info-tint: rgba(56, 189, 248, 0.12);
  --neutral: #94a3b8;
  --neutral-tint: rgba(148, 163, 184, 0.12);

  --pink-500: #ec4899;
  --pink-tint: rgba(236, 72, 153, 0.14);

  --shadow-popover: 0 14px 36px rgba(0, 0, 0, 0.48);
  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.30);
  --shadow-card-hover: 0 6px 12px rgba(0, 0, 0, 0.40), 0 22px 48px rgba(0, 0, 0, 0.48);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html,
body {
  background: var(--bg-page);
  color: var(--fg-1);
  /* Kanit via next/font (--font-kanit CSS variable). IBM Plex Sans Thai is the
     CDN fallback if Kanit's WOFF2 can't load. */
  font-family: var(--font-kanit), "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img, svg, video, canvas { max-width: 100%; height: auto; }
img[width][height] { height: auto; }

/* Accessibility: skip-to-content link. Pinned off-screen by default; once
   focused (keyboard Tab on page load) it pops into view at the top-left so
   keyboard users can jump past the header straight to <main>. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--accent-500);
  color: var(--accent-fg);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 120ms var(--ease);
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

/* Screen-reader-only helper for visually-hidden labels (a11y). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.card {
  background: var(--bg-card);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 14px;
  transition: all 180ms;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent-500);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background: var(--accent-600);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--fg-1);
  border-color: var(--border-2);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--fg-2);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--fg-1);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-3);
  color: var(--fg-1);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 180ms;
}
.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.input::-moz-placeholder { color: var(--fg-4); }
.input::placeholder { color: var(--fg-4); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--r-full);
}
.badge-success { background: var(--success-tint); color: var(--success); }
.badge-warning { background: var(--warning-tint); color: var(--warning); }
.badge-danger { background: var(--danger-tint); color: var(--danger); }
.badge-info { background: var(--info-tint); color: var(--info); }
.badge-accent { background: var(--accent-tint); color: var(--accent-500); }
.badge-pink { background: var(--pink-tint); color: var(--pink-500); }

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  font-weight: 500;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border-1);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  display: inline-block;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-1);
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
}
table.tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-1);
}
table.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-1);
  font-size: 14px;
}
table.tbl tr:hover td {
  background: var(--bg-card-hover);
}

.article-body { white-space: pre-wrap; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: var(--fg-1);
  font-weight: 600;
  margin: 1.4em 0 0.5em;
  line-height: 1.3;
  white-space: normal;
}
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 18px; }
.article-body h4 { font-size: 16px; }
.article-body p { margin: 0 0 1em; white-space: pre-wrap; }
.article-body a { color: var(--accent-500); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-600); }
.article-body ul, .article-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.article-body li { margin: 0.25em 0; white-space: normal; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 0.75em 0; }
.article-body blockquote {
  border-left: 3px solid var(--accent-500);
  padding: 0.5em 1em;
  margin: 1em 0;
  background: var(--accent-tint);
  color: var(--fg-2);
  border-radius: 0 8px 8px 0;
}

/* === Inline rich-text editor on /admin/articles === */
.article-editor-body { white-space: normal; }
.article-editor-body h1 { font-size: 24px; font-weight: 700; margin: 1em 0 0.4em; color: var(--fg-1); }
.article-editor-body h2 { font-size: 20px; font-weight: 600; margin: 1em 0 0.4em; color: var(--fg-1); }
.article-editor-body h3 { font-size: 17px; font-weight: 600; margin: 0.9em 0 0.3em; color: var(--fg-1); }
.article-editor-body p  { margin: 0 0 0.85em; }
.article-editor-body ul, .article-editor-body ol { margin: 0 0 0.85em; padding-left: 1.5em; }
.article-editor-body li { margin: 0.2em 0; }
.article-editor-body a  { color: var(--accent-500); text-decoration: underline; }
.article-editor-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 0.5em 0; }
.article-editor-body blockquote {
  border-left: 3px solid var(--accent-500);
  padding: 0.4em 0.9em;
  margin: 0.8em 0;
  background: var(--accent-tint);
  border-radius: 0 6px 6px 0;
}
.article-editor-body code {
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.article-editor-body hr {
  border: 0;
  border-top: 1px dashed var(--border-2);
  margin: 1.2em 0;
}
/* Placeholder when empty */
.article-editor-body:empty::before {
  content: attr(data-placeholder);
  color: var(--fg-4);
  pointer-events: none;
}
.article-body code {
  background: var(--bg-input);
  border: 1px solid var(--border-1);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}
.article-body pre {
  background: var(--bg-input);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 1em 0;
  white-space: pre;
}
.article-body pre code { background: transparent; border: 0; padding: 0; }
.article-body hr { border: 0; border-top: 1px dashed var(--border-1); margin: 2em 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* Skeleton shimmer used by admin pages + SyncPicker. */
@keyframes sk-shimmer {
  0%   { background-position: -720px 0; }
  100% { background-position:  720px 0; }
}

/* ===== Admin UX polish ===== */
.admin-nav-link:hover {
  background: linear-gradient(90deg, var(--accent-tint), transparent);
  color: var(--fg-1);
  transform: translateX(2px);
}
.admin-nav-link:hover svg { color: var(--accent-500); }

@keyframes admin-badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Form elements don't inherit `font-family` from body in all browsers — pin
   them to Kanit explicitly so inputs, selects, buttons match surrounding text.
   Site-wide rule (not scoped to admin) since the body font is also Kanit. */
input, select, textarea, button {
  font-family: var(--font-kanit), 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
}
.admin-shell {
  letter-spacing: -0.005em;
}

/* Card hover lift on admin pages */
.admin-shell .card { transition: border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.admin-shell .card:hover { border-color: color-mix(in srgb, var(--accent-500) 50%, var(--border-2)); }

/* Nicer table hover */
.admin-shell table.tbl tr { transition: background 120ms var(--ease); }
.admin-shell table.tbl tbody tr:hover td { background: var(--accent-tint); }

/* Buttons get a tiny press feedback */
.admin-shell .btn { transition: transform 80ms var(--ease), opacity 120ms var(--ease), background 120ms var(--ease); }
.admin-shell .btn:active:not(:disabled) { transform: scale(0.97); }

/* Page heading gradient accent */
.admin-shell h1 {
  background: linear-gradient(110deg, var(--fg-1) 70%, var(--accent-500));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.sk-box {
  display: inline-block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-input) 0px, var(--bg-elevated) 180px, var(--bg-input) 360px);
  background-size: 720px 100%;
  animation: sk-shimmer 1.4s infinite linear;
}

/* === Responsive utilities === */
.mobile-only { display: none !important; }
.tbl-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll table { min-width: 640px; }

/* Tablet (≤1080) — narrow desktop */
@media (max-width: 1080px) {
  [data-stack-2] { grid-template-columns: 1fr !important; }
  [data-stack-3] { grid-template-columns: 1fr !important; }
  [data-stack-4] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Mobile (≤768) — phone */
@media (max-width: 768px) {
  body { font-size: 13px; }

  .cat-rail { display: none !important; }
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }

  /* Public layout flex row stays as block on mobile, full-width main */
  .public-shell { display: block !important; }

  /* Inline padding shrink on common containers */
  main { width: 100% !important; min-width: 0; }

  /* Footer keeps a 2-col layout on mobile so it's not endless scroll */
  .app-footer [data-stack-4] {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
  }
  .app-footer [data-stack-4] > div:first-child {
    grid-column: 1 / -1;
  }

  /* Admin layout shrinks horizontal padding on mobile */
  .admin-content { padding: 14px 12px !important; }
  .admin-header { padding: 0 12px !important; }

  /* Make the AdminUserMenu's button avatar work without showing user details */
  .admin-header .admin-user-username { display: none !important; }

  [data-stack-2] { grid-template-columns: 1fr !important; }
  [data-stack-3] { grid-template-columns: 1fr !important; }
  [data-stack-4] { grid-template-columns: 1fr !important; }
  [data-stack-5] { grid-template-columns: 1fr !important; }
  [data-stack-6] { grid-template-columns: 1fr 1fr !important; }

  /* Opt-in stacking for inline grids/flex rows */
  [data-mobile-stack] {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Page padding shorthand for inner containers */
  .pg-pad { padding-left: 12px !important; padding-right: 12px !important; }

  /* Tables: tighter cells; auto-scroll horizontally on phones */
  table.tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  table.tbl thead, table.tbl tbody { display: table; min-width: 100%; }
  table.tbl th, table.tbl td {
    padding: 10px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Flex-wrap forms: let fixed-width inputs become full-width on mobile */
  form .input { width: 100% !important; min-width: 0 !important; }
  form select.input { width: 100% !important; }

  /* Cards inside cards get less padding */
  .card { border-radius: var(--r-md); }

  /* Buttons/inputs: larger touch targets */
  .btn { min-height: 40px; padding: 9px 14px; }
  .btn-sm { min-height: 34px; padding: 6px 10px; }
  .input { font-size: 16px; min-height: 40px; }

  /* Section title sizes down */
  .section-title { font-size: 17px; }

  /* Article body trims margins */
  .article-body h2 { font-size: 19px; }
  .article-body h3 { font-size: 16px; }
  .article-body h4 { font-size: 14px; }
}

@media (max-width: 640px) {
  [data-stack-6] { grid-template-columns: 1fr !important; }
}

/* =========================================================
   STOREFRONT — mobile polish
   The product grid uses inline cols={N} from React for desktop;
   here we collapse it to 2 / 1 columns at narrower breakpoints
   so cards don't crush together.
   ========================================================= */
/* Tablet (≤1080) — keep at most 2 product cards per row */
@media (max-width: 1080px) {
  [data-product-grid] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
/* Phone (≤640) — single column, full-width cards */
@media (max-width: 640px) {
  [data-product-grid] { grid-template-columns: 1fr !important; gap: 10px !important; }
}

/* Storefront ProductCard — tighten paddings on phone */
@media (max-width: 640px) {
  [data-product-grid] > div { padding: 14px !important; border-radius: 14px !important; }
  /* Hero section pads down on phone */
  [data-hero-section] { padding: 20px 16px !important; }
  [data-hero-title]   { font-size: 26px !important; line-height: 1.2 !important; }
  [data-hero-stack]   { gap: 18px !important; }
  [data-hero-cta]     { gap: 8px !important; flex-direction: column !important; align-items: stretch !important; }
  [data-hero-cta] > * { width: 100% !important; justify-content: center !important; }
  [data-hero-live]    { margin-left: 0 !important; text-align: center !important; }

  /* TopBar — search hides via .desktop-only already; brand banner shrinks */
  [data-brand-icon] { width: 36px !important; height: 36px !important; font-size: 14px !important; border-radius: 10px !important; }

  /* Bigger card touch targets on mobile */
  [data-row-card] { grid-template-columns: 1fr !important; padding: 16px !important; }
}

/* Safe-area for iOS notched devices */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* =========================================================
   ADMIN — MODERN POLISH (v2)
   adds: glass cards, layered shadows, motion, skeleton tiers
   ========================================================= */

:root {
  --shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md:     0 4px 8px rgba(15, 23, 42, 0.05), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg:     0 10px 24px rgba(15, 23, 42, 0.07), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-xl:     0 20px 48px rgba(15, 23, 42, 0.10), 0 8px 16px rgba(15, 23, 42, 0.05);
  --shadow-glow-accent:  0 0 0 1px var(--accent-tint), 0 12px 36px -8px var(--accent-ring);
  --shadow-glow-success: 0 0 0 1px var(--success-tint), 0 12px 36px -8px rgba(22,163,74,0.35);
  --shadow-glow-warning: 0 0 0 1px var(--warning-tint), 0 12px 36px -8px rgba(217,119,6,0.35);
  --shadow-glow-danger:  0 0 0 1px var(--danger-tint),  0 12px 36px -8px rgba(220,38,38,0.35);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  --grad-accent:  linear-gradient(135deg, var(--accent-500), var(--accent-700));
  --grad-success: linear-gradient(135deg, #10b981, #047857);
  --grad-warning: linear-gradient(135deg, #f59e0b, #b45309);
  --grad-danger:  linear-gradient(135deg, #f43f5e, #be123c);
  --grad-info:    linear-gradient(135deg, #38bdf8, #0369a1);
  --grad-pink:    linear-gradient(135deg, #f472b6, #be185d);

  --grad-card-light: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.0));
}
.dark {
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 8px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg:     0 10px 24px rgba(0,0,0,0.55), 0 4px 8px rgba(0,0,0,0.4);
  --shadow-xl:     0 20px 48px rgba(0,0,0,0.6),  0 8px 16px rgba(0,0,0,0.45);
  --shadow-glow-accent:  0 0 0 1px var(--accent-tint), 0 12px 40px -6px rgba(99,102,241,0.5);
  --shadow-glow-success: 0 0 0 1px var(--success-tint), 0 12px 40px -6px rgba(52,211,153,0.5);
  --shadow-glow-warning: 0 0 0 1px var(--warning-tint), 0 12px 40px -6px rgba(251,191,36,0.45);
  --shadow-glow-danger:  0 0 0 1px var(--danger-tint), 0 12px 40px -6px rgba(251,113,133,0.5);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --grad-card-light: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.0));
}

/* ----- keyframes ----- */
@keyframes slide-up        { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-down      { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-in-left   { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fade-in         { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in          { 0% { opacity: 0; transform: scale(0.92); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes glow-pulse      { 0%,100% { box-shadow: 0 0 0 0 var(--accent-ring); } 50% { box-shadow: 0 0 0 6px transparent; } }
@keyframes sheen           { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }
@keyframes float-up        { 0% { opacity: 0; transform: translateY(8px) scale(0.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ring-pulse      { 0% { box-shadow: 0 0 0 0 var(--accent-ring); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes draw            { from { stroke-dashoffset: var(--len, 1000); } to { stroke-dashoffset: 0; } }
@keyframes spin            { to { transform: rotate(360deg); } }
@keyframes wiggle          { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }

/* ----- glass cards (admin only) ----- */
.admin-shell .card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms var(--ease), box-shadow 220ms var(--ease), transform 200ms var(--ease);
  overflow: hidden;
}
.admin-shell .card::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-card-light);
  pointer-events: none;
  opacity: 1;
  z-index: 0;
}
.admin-shell .card > * { position: relative; z-index: 1; }
.admin-shell .card:hover {
  border-color: color-mix(in srgb, var(--accent-500) 40%, var(--border-1));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Lift accent for KPI/alert cards */
.admin-shell .card-glow-accent  { box-shadow: var(--shadow-glow-accent); }
.admin-shell .card-glow-success { box-shadow: var(--shadow-glow-success); }
.admin-shell .card-glow-warning { box-shadow: var(--shadow-glow-warning); }
.admin-shell .card-glow-danger  { box-shadow: var(--shadow-glow-danger); }

/* Stagger entrance: data-stagger-children on parent */
.admin-shell [data-enter] {
  animation: slide-up 360ms var(--ease) both;
}
.admin-shell [data-enter="fade"]    { animation-name: fade-in; }
.admin-shell [data-enter="pop"]     { animation-name: pop-in; }
.admin-shell [data-enter="left"]    { animation-name: slide-in-left; }
.admin-shell [data-enter="float"]   { animation-name: float-up; }
.admin-shell [data-enter-delay="1"] { animation-delay: 40ms; }
.admin-shell [data-enter-delay="2"] { animation-delay: 80ms; }
.admin-shell [data-enter-delay="3"] { animation-delay: 120ms; }
.admin-shell [data-enter-delay="4"] { animation-delay: 160ms; }
.admin-shell [data-enter-delay="5"] { animation-delay: 200ms; }
.admin-shell [data-enter-delay="6"] { animation-delay: 240ms; }
.admin-shell [data-enter-delay="7"] { animation-delay: 280ms; }
.admin-shell [data-enter-delay="8"] { animation-delay: 320ms; }

/* Refresh sheen — slides a highlight across the card when stats update */
.admin-shell .refresh-sheen { position: relative; overflow: hidden; }
.admin-shell .refresh-sheen.go::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-500) 18%, transparent), transparent);
  animation: sheen 900ms var(--ease);
  pointer-events: none;
}

/* Live pulse ring */
.live-ring {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: ring-pulse 1.6s infinite;
}

/* Number tick-up wrapper (for animated counters) */
.metric-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-accent);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.metric-num.flat { background: none; color: var(--fg-1); -webkit-text-fill-color: var(--fg-1); }

/* ----- skeletons (admin) ----- */
.sk { display: block; background: linear-gradient(90deg, var(--bg-input) 0px, color-mix(in srgb, var(--bg-input) 60%, var(--bg-elevated)) 200px, var(--bg-input) 400px); background-size: 800px 100%; animation: sk-shimmer 1.4s infinite linear; border-radius: 8px; }
.sk-line   { height: 12px; width: 100%; }
.sk-line-sm{ height: 9px;  width: 60%;  }
.sk-line-lg{ height: 18px; width: 80%;  }
.sk-circle { width: 36px;  height: 36px; border-radius: 50%; }
.sk-square { width: 36px;  height: 36px; border-radius: 8px; }
.sk-stat   { height: 32px; width: 70%; border-radius: 6px; }
.sk-chart  { height: 180px; width: 100%; border-radius: 10px; }
.sk-card   { padding: 18px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border-1); }

/* ----- modern table row (admin) ----- */
.admin-shell table.tbl th {
  font-size: 10px; letter-spacing: 0.08em; padding: 10px 14px;
  background: linear-gradient(180deg, var(--bg-panel), transparent);
}
.admin-shell table.tbl td { padding: 12px 14px; }
.admin-shell table.tbl tr { transition: background 140ms var(--ease), transform 140ms var(--ease); }
.admin-shell table.tbl tbody tr:hover td { background: color-mix(in srgb, var(--accent-500) 4%, transparent); }
.admin-shell table.tbl tbody tr.row-new {
  animation: float-up 420ms var(--ease);
  background: color-mix(in srgb, var(--success) 5%, transparent);
}

/* ----- sidebar polish ----- */
.admin-sidebar {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-panel) 96%, var(--accent-500)),
    var(--bg-panel) 30%);
  backdrop-filter: blur(8px);
}
.admin-sidebar .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--fg-2); text-decoration: none;
  font-size: 13px; font-weight: 500;
  position: relative;
  transition: background 200ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.admin-sidebar .nav-link:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-500) 10%, transparent), transparent);
  color: var(--fg-1);
  transform: translateX(2px);
}
.admin-sidebar .nav-link svg { color: var(--fg-4); transition: color 160ms var(--ease); flex-shrink: 0; }
.admin-sidebar .nav-link:hover svg { color: var(--accent-500); }
.admin-sidebar .nav-link.active {
  background: linear-gradient(90deg, var(--accent-tint), transparent 70%);
  color: var(--fg-1);
  box-shadow: inset 2px 0 0 var(--accent-500);
}
.admin-sidebar .nav-link.active svg { color: var(--accent-500); }
.admin-sidebar .brand-badge {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-glow-accent), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative; overflow: hidden;
}
.admin-sidebar .brand-badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%);
}

/* ----- header glass ----- */
.admin-header {
  background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border-1);
}

/* ----- button enhancements (admin) ----- */
.admin-shell .btn-primary {
  background: var(--grad-accent);
  border: 0;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.2);
}
.admin-shell .btn-primary:hover { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-1px); }

/* ----- KPI gradient borders (subtle) ----- */
.kpi-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-1);
  padding: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms var(--ease), transform 200ms var(--ease), border-color 200ms var(--ease);
}
.kpi-card::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-card-light);
  pointer-events: none;
}
.kpi-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-accent);
  opacity: 0.6;
}
.kpi-card.tone-success::after { background: var(--grad-success); }
.kpi-card.tone-warning::after { background: var(--grad-warning); }
.kpi-card.tone-danger::after  { background: var(--grad-danger); }
.kpi-card.tone-info::after    { background: var(--grad-info); }
.kpi-card.tone-pink::after    { background: var(--grad-pink); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent-500) 35%, var(--border-1)); }
.kpi-card > * { position: relative; z-index: 1; }

/* ----- ticker chip ----- */
.ticker-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(90deg, var(--success-tint), transparent);
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
  font-size: 12px; color: var(--fg-1);
  animation: float-up 360ms var(--ease) both, fade-in 240ms ease 8s forwards reverse;
  white-space: nowrap;
}

/* SVG path draw-in (charts) */
.admin-shell .chart-path {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  animation: draw 900ms var(--ease) both;
}
.admin-shell .chart-bar { animation: float-up 480ms var(--ease) both; transform-origin: bottom; }
.admin-shell .chart-donut > circle:nth-child(n+2) { transform-origin: center; animation: pop-in 520ms var(--ease) both; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Storefront app-card hover (lifts + tints with the app's brand color via --app-color set inline) */
.storefront-app-card:hover {
  border-color: var(--app-color, var(--accent-500)) !important;
  background: color-mix(in srgb, var(--app-color, var(--accent-500)) 8%, var(--bg-card)) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--app-color, var(--accent-500)) 18%, transparent);
}

/* === Mobile drawer (used by AppTopBar / Admin / CategoryRail) === */
.mobile-drawer-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--bg-elevated);
  color: var(--fg-1);
  align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .mobile-drawer-toggle { display: inline-flex; }
}

/* Lock background scroll while a mobile drawer/menu is open */
body.has-drawer-open { overflow: hidden; }

.mobile-drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--ease), visibility 200ms;
}
.mobile-drawer-backdrop.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed; top: 0; left: 0;
  height: 100vh; height: 100dvh;
  width: min(320px, 86vw); z-index: 61;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transform: translateX(-100%);
  transition: transform 220ms var(--ease);
  display: flex; flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
}
.mobile-drawer.open { transform: translateX(0); visibility: visible; }
.mobile-drawer.right {
  left: auto; right: 0;
  border-right: 0; border-left: 1px solid var(--border-1);
  transform: translateX(100%);
}
.mobile-drawer.right.open { transform: translateX(0); }

/* Hide drawer machinery on desktop */
@media (min-width: 769px) {
  .mobile-drawer-backdrop,
  .mobile-drawer { display: none !important; }
}

/* =========================================================
   ADMIN — FORMAL CONSOLE FINISH
   Final admin overrides tuned for a quieter back-office surface.
   ========================================================= */
.admin-shell {
  --admin-panel: color-mix(in srgb, var(--bg-panel) 94%, var(--bg-card));
  --admin-panel-strong: color-mix(in srgb, var(--bg-card) 88%, var(--bg-panel));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-panel) 86%, var(--bg-card)) 0%, var(--bg-page) 42%),
    var(--bg-page) !important;
}

.admin-shell h1 {
  background: none;
  color: var(--fg-1);
  -webkit-text-fill-color: var(--fg-1);
  letter-spacing: 0;
}

.admin-shell h2,
.admin-shell h3,
.admin-shell h4 {
  letter-spacing: 0;
}

.admin-sidebar {
  background:
    linear-gradient(180deg, var(--admin-panel-strong) 0%, var(--admin-panel) 100%);
  box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.03);
}

.dark .admin-sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.admin-sidebar > div:first-child {
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 18px;
  scrollbar-gutter: stable;
}

.admin-nav-group {
  margin-bottom: 14px;
}

.admin-nav-label {
  color: var(--fg-4);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 10px 12px 7px;
}

.admin-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-sidebar .nav-link {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 8px;
  gap: 9px;
  outline: none;
}

.admin-sidebar .nav-link:hover {
  background: color-mix(in srgb, var(--accent-500) 7%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent-500) 14%, transparent);
  transform: none;
}

.admin-sidebar .nav-link:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.admin-sidebar .nav-link.active {
  background: color-mix(in srgb, var(--accent-500) 11%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent-500) 22%, var(--border-1));
  box-shadow: inset 3px 0 0 var(--accent-500), var(--shadow-sm);
}

.admin-nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-4);
  background: color-mix(in srgb, var(--bg-input) 74%, transparent);
  flex: 0 0 auto;
}

.admin-sidebar .nav-link.active .admin-nav-icon {
  color: var(--accent-500);
  background: var(--accent-tint);
}

.admin-nav-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav-badge {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.admin-nav-badge.tone-danger { background: var(--danger); }
.admin-nav-badge.tone-info { background: var(--info); }
.admin-nav-badge.tone-warning { background: var(--warning); }

.admin-header {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  box-shadow: 0 1px 0 var(--border-1), 0 10px 24px rgba(15, 23, 42, 0.04);
}

.admin-content {
  width: 100%;
}

.admin-shell .card,
.admin-shell .kpi-card,
.admin-shell .sk-card {
  border-radius: 8px;
  border: 1px solid var(--border-1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-shell .card:hover,
.admin-shell .kpi-card:hover {
  border-color: color-mix(in srgb, var(--accent-500) 20%, var(--border-1));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.admin-shell .card::before,
.admin-shell .kpi-card::before {
  opacity: 0.55;
}

.admin-shell .btn {
  min-height: 36px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0;
}

.admin-shell .btn:focus-visible,
.admin-user-trigger:focus-visible,
.admin-user-menu-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.admin-shell .btn-primary {
  background: var(--accent-500);
  border: 1px solid color-mix(in srgb, var(--accent-700) 36%, transparent);
}

.admin-shell .btn-primary:hover {
  background: var(--accent-600);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent-500) 18%, transparent);
}

.admin-shell .btn-secondary,
.admin-shell .input,
.admin-shell select.input,
.admin-shell textarea.input {
  border-radius: 8px;
  border-color: var(--border-2);
  background: color-mix(in srgb, var(--bg-card) 82%, var(--bg-input));
}

.admin-shell .input:focus,
.admin-shell select.input:focus,
.admin-shell textarea.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.admin-shell .badge {
  min-height: 22px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  font-weight: 700;
}

.admin-shell table.tbl {
  border-collapse: separate;
  border-spacing: 0;
}

.admin-shell table.tbl th {
  background: color-mix(in srgb, var(--bg-panel) 80%, var(--bg-card));
  border-bottom: 1px solid var(--border-1);
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 11px 14px;
  vertical-align: middle;
}

.admin-shell table.tbl td {
  color: var(--fg-2);
  padding: 12px 14px;
  vertical-align: middle;
}

.admin-shell table.tbl tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-panel) 30%, transparent);
}

.admin-shell table.tbl tbody tr:hover td {
  background: color-mix(in srgb, var(--accent-500) 5%, var(--bg-card));
}

.admin-shell table.tbl th:first-child,
.admin-shell table.tbl td:first-child {
  padding-left: 16px;
}

.admin-shell table.tbl th:last-child,
.admin-shell table.tbl td:last-child {
  padding-right: 16px;
}

.admin-user-trigger {
  height: 36px;
  padding: 0 10px 0 4px;
  border-radius: 8px;
  border: 1px solid var(--border-1);
  background: color-mix(in srgb, var(--bg-card) 86%, var(--bg-elevated));
  color: var(--fg-1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.admin-user-trigger:hover {
  border-color: color-mix(in srgb, var(--accent-500) 22%, var(--border-1));
  background: var(--bg-card);
}

.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.admin-user-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 232px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  box-shadow: var(--shadow-popover);
  padding: 6px;
  z-index: 100;
  animation: slide-down 140ms var(--ease) both;
}

.admin-user-popover-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 4px;
}

.admin-user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--fg-1);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-user-menu-item:hover {
  background: var(--bg-card-hover);
}

.admin-user-menu-item.danger {
  color: var(--danger);
}

@media (max-width: 768px) {
  .admin-shell {
    background: var(--bg-page) !important;
  }

  .admin-shell .card,
  .admin-shell .kpi-card,
  .admin-shell .sk-card {
    border-radius: 8px;
  }

  .admin-header {
    box-shadow: 0 1px 0 var(--border-1);
  }
}

/* =========================================================
   STOREFRONT POLISH — softer depth, button micro-interactions,
   gentle entrance. Admin keeps its own look via .admin-shell
   (higher specificity), so these mainly touch the storefront.
   prefers-reduced-motion is already neutralised globally above.
   ========================================================= */

/* Cards: rest shadow + smooth hover glow */
.card {
  box-shadow: var(--shadow-card);
  transition: box-shadow 240ms var(--ease), border-color 240ms var(--ease), transform 240ms var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: color-mix(in srgb, var(--accent-500) 22%, var(--border-2));
}

/* Cat-card and lift-card get a real rest shadow too (was hover-only before) */
.cat-card { box-shadow: var(--shadow-card); }
.lift-card { box-shadow: var(--shadow-card); }

/* Buttons: depth + lift on hover + press feedback */
.btn {
  position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: transform 140ms var(--ease), box-shadow 180ms var(--ease), background 160ms var(--ease), opacity 140ms var(--ease);
}
.btn:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12); }
/* Press: brief tactile squish — :active is leaf-only, can't trap fixed children */
.btn:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10) inset, 0 1px 2px rgba(15, 23, 42, 0.06);
  transition-duration: 60ms;
}
.btn:focus-visible:not(:disabled) {
  outline: 2px solid var(--accent-400);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
  box-shadow: 0 2px 10px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-700));
  box-shadow: 0 8px 22px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-secondary:hover { box-shadow: var(--shadow-card-hover); }

/* Inputs: smooth focus */
.input { transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease); }

/* Links: smooth colour transition */
a { transition: color 160ms var(--ease); }

/* Badges: a hair of inner highlight for depth */
.badge { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }

/* Section titles get a subtle gradient accent on the storefront */
.section-title {
  background: linear-gradient(108deg, var(--fg-1) 62%, var(--accent-500));
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* Entrance: opacity-only fade. (An earlier translateY version left a persistent
   transform on .rail which created a containing block + stacking context that
   mis-positioned fixed dropdowns/modals — making them appear "dead" on click.
   Opacity at its 1 end-state creates no containing block, so this is safe.) */
@keyframes sf-fade { from { opacity: 0; } to { opacity: 1; } }
.rail {
  animation: sf-fade 260ms var(--ease) both;
  /* Constrain content width so cards don't stretch to viewport edge on big monitors.
     Section-level wrappers (hero, why-us, etc.) live inside this rail. */
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

/* Section slide-up reveal — opacity + filter (no persistent transform),
   so it can't trap fixed dropdowns. Stagger via :nth-child for a cascade. */
@keyframes sf-rise-soft {
  from { opacity: 0; filter: blur(2px); }
  to   { opacity: 1; filter: blur(0); }
}
.rail > section { animation: sf-rise-soft 420ms var(--ease) both; }
.rail > section:nth-child(1) { animation-delay: 0ms; }
.rail > section:nth-child(2) { animation-delay: 60ms; }
.rail > section:nth-child(3) { animation-delay: 120ms; }
.rail > section:nth-child(4) { animation-delay: 180ms; }
.rail > section:nth-child(5) { animation-delay: 240ms; }
.rail > section:nth-child(6) { animation-delay: 300ms; }
.rail > section:nth-child(7) { animation-delay: 360ms; }

/* Count-up reveal for big stat numbers — scales softly into place */
@keyframes sf-stat-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.sf-stat-pop { animation: sf-stat-pop 480ms var(--ease) both; }

/* Idle "breathe" on a primary CTA — very subtle, draws the eye */
@keyframes sf-breathe {
  0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.14), 0 0 0 0 var(--accent-tint); }
  50%      { box-shadow: 0 4px 14px rgba(0,0,0,0.14), 0 0 0 10px transparent; }
}
.sf-breathe { animation: sf-breathe 2.6s var(--ease) infinite; }

/* Hero search bar: subtle inner shine on focus */
.sf-search-shine:focus-within {
  box-shadow: 0 18px 40px rgba(0,0,0,0.22), 0 6px 14px rgba(0,0,0,0.10),
              0 0 0 6px rgba(255,255,255,0.18) !important;
}

/* WhyUs feature icon hover — gentle bounce + colour shift */
.sf-feat-icon { transition: transform 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease); }
.sf-feat:hover .sf-feat-icon {
  transform: translateY(-2px) scale(1.06);
  background: var(--accent-500);
  color: #fff;
}

/* FAQ chevron — rotate on open */
details > summary .sf-chev { transition: transform 220ms var(--ease); }
details[open] > summary .sf-chev { transform: rotate(180deg); }

/* Gentle floating decoration on hero */
@keyframes sf-float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.sf-float-y { animation: sf-float-y 6s var(--ease) infinite; }

/* ── Skeleton loaders ───────────────────────────────────────────────
   .skeleton => a shimmer-pulse block. Set width/height/border-radius
   inline. The shimmer is a moving gradient sweep, NOT a transform on
   any wrapper (just background-position) so it can't trap fixed kids. */
@keyframes sf-skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  position: relative;
  background: linear-gradient(90deg,
    var(--bg-elevated) 0%,
    color-mix(in srgb, var(--accent-500) 8%, var(--bg-elevated)) 50%,
    var(--bg-elevated) 100%);
  background-size: 200% 100%;
  animation: sf-skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton.dark {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent-500) 12%, var(--bg-card)) 0%,
    color-mix(in srgb, var(--accent-500) 20%, var(--bg-card)) 50%,
    color-mix(in srgb, var(--accent-500) 12%, var(--bg-card)) 100%);
  background-size: 200% 100%;
  animation: sf-skel-shimmer 1.4s ease-in-out infinite;
}

/* ── Marquee strip — scrolling badges (e.g. promo benefits in hero) ──
   Uses transform on an inner track only; the outer wrapper has overflow:hidden
   so the moving track can't visually escape its containing box, and it sits
   inside the hero, not over any dropdown/modal mount point. */
@keyframes sf-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.sf-marquee-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: sf-marquee 28s linear infinite;
}
.sf-marquee-wrap:hover .sf-marquee-track { animation-play-state: paused; }

/* ── Animated background gradient sweep ─────────────────────────────
   For the hero — a subtle slow colour-position shift, NOT a transform. */
@keyframes sf-grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.sf-grad-shift {
  background-size: 200% 200%;
  animation: sf-grad-shift 14s ease-in-out infinite;
}

/* ── Live ping dot (online indicator) ───────────────────────────────
   Pseudo-element ring expands then fades — uses scale + opacity on a
   leaf pseudo, doesn't affect layout of host. */
.live-ping {
  position: relative; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
}
.live-ping::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: var(--success);
  animation: sf-live-ping 1.6s ease-out infinite;
}
@keyframes sf-live-ping {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ── Interactive click/tap feedback ───────────────────────────────────
   All of these use :active / :focus-visible only, on leaf elements.
   No persistent transforms on wrappers (the dropdown-killing bug). */

/* Ripple-on-click for buttons. Uses a pseudo-element that fades out from
   the click point, no JS. Skips when reduced-motion is on (handled globally).
   Skipped on .btn-ghost so secondary links don't flash. */
.btn:not(.btn-ghost)::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45), transparent 60%);
  opacity: 0; pointer-events: none;
  transition: opacity 480ms var(--ease);
}
.btn:not(.btn-ghost):active::after {
  opacity: 1;
  transition-duration: 0ms;
}

/* Cat-card press squish (already lifts on hover; this is the click bounce) */
.cat-card:active { transform: translateY(0) scale(0.97); transition-duration: 80ms; }

/* Lift-card click bounce — matches the lift utility added earlier */
.lift-card:active { transform: translateY(0) scale(0.98); transition-duration: 80ms; }

/* Anchor links: underline grows from left on hover (storefront only, not nav) */
.rail p a, .rail li a {
  position: relative; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 220ms var(--ease), color 160ms var(--ease);
}
.rail p a:hover, .rail li a:hover { background-size: 100% 1.5px; }

/* Input focus pulse — a calm ring that fades, not a hard outline */
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* Pulse helper — apply to any element via className="pulse-hint" to draw
   the eye gently (e.g. first-time CTA). */
@keyframes pulse-hint {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-ring); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
.pulse-hint { animation: pulse-hint 2s var(--ease) infinite; }

/* ── Storefront colour: hero glow blobs + per-category app cards ──────────
   Decorative blobs are pointer-events:none and sit behind content (z-index 0),
   so their transform/animation can never intercept clicks or shift layout. */
.hero-blob {
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  filter: blur(72px); opacity: 0.20; pointer-events: none; z-index: 0;
  animation: hero-float 9s var(--ease) infinite alternate;
}
@keyframes hero-float { from { transform: translateY(0); } to { transform: translateY(-24px); } }

.cat-card {
  --cat: var(--accent-500);
  position: relative;
  padding: 18px 14px; border-radius: 16px;
  border: 1.5px solid color-mix(in srgb, var(--cat) 26%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--cat) 13%, var(--bg-card)), var(--bg-card) 72%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cat) 55%, transparent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--cat) 30%, transparent);
}

/* Generic hover-lift for leaf cards (works in server components, no JS).
   Optionally colour the glow: style={{ ['--lift']: 'var(--info)' }}.
   Apply ONLY to small leaf cards/items — never a page-level wrapper. */
.lift-card {
  --lift: var(--accent-500);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.lift-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--lift) 22%, transparent);
  border-color: color-mix(in srgb, var(--lift) 40%, var(--border-2));
}

/* Soft gradient hairline divider */
.grad-divider {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--border-2) 20%, var(--border-2) 80%, transparent);
}

/* Coloured icon chip — set --chip to the token colour */
.icon-chip {
  --chip: var(--accent-500);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  color: var(--chip);
  background: color-mix(in srgb, var(--chip) 14%, transparent);
}
@media (min-width: 768px) {

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

