/* Paper header kit (Dec 2026, brief "the shop's signboard"): every app header is a torn bottle-green sheet on a honey under-sheet,
   cream paper core at the tear, walnut strip below. Active item = honey swallowtail flag; logo = round sticker. Look only, zero JS.
   Tiles repeat (never stretched); no blur, no looping motion. Used by /, /order, /admin, /cashier, /kitchen, /staff. */
:root{--ph-sheet:#0F4A30;--ph-ink:#FAF6EE;--ph-ink-2:#C9D6CD;--ph-under:#E7CB7E;--ph-core:#F6EDD3;--ph-wood:#5A3A1E;--ph-flag:#F1DC9A;--ph-flag-ink:#1F2A24;
  --ph-edge:16px;--ph-woff:3px;--ph-tile:var(--ph-T16);--ph-cast:drop-shadow(2px 3px 0 rgba(0,0,0,.28));
  --ph-cut:polygon(0 5px,5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%);
  --ph-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .98 0 0 0 0 .96 0 0 0 0 .9 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --ph-T16:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='16'%3E%3Cdefs%3E%3Cpath id='g' d='M0 0H480V3L465 3.1 450 3.9 435 3.7 420 2.5 405 4.4 390 2.9 375 2.4 360 2.4 345 2.9 330 4.6 315 2.1 300 4.9 285 3.2 270 3.7 255 4.8 240 3.9 225 2.7 210 2.4 195 4.5 180 3.3 165 2.3 150 2.2 135 3.3 120 2.1 105 3.5 90 2.2 75 3.1 60 3.6 45 2.2 30 4 15 2.5 0 3Z'/%3E%3C/defs%3E%3Cpath fill='%23E7CB7E' d='M0 0H480V9.8L464 11.4 448 9.8 432 9.9 416 8.1 400 9 384 8.8 368 8.2 352 10.1 336 8.1 320 8.6 304 10.5 288 10.6 272 11.9 256 11.9 240 8.2 224 10.8 208 11.2 192 8.4 176 9.2 160 8.4 144 11.2 128 10.5 112 10 96 8.7 80 10.3 64 10 48 9.9 32 11.7 16 10.2 0 9.8Z'/%3E%3Cuse href='%23g' fill='%23F6EDD3' y='1.5'/%3E%3Cuse href='%23g' fill='%230F4A30'/%3E%3C/svg%3E");
  --ph-T10:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='10'%3E%3Cdefs%3E%3Cpath id='g' d='M0 0H480V2.5L465 2.6 450 3.4 435 3.2 420 2 405 3.9 390 2.4 375 1.9 360 1.9 345 2.4 330 4.1 315 1.6 300 4.4 285 2.7 270 3.2 255 4.3 240 3.4 225 2.2 210 1.9 195 4 180 2.8 165 1.8 150 1.7 135 2.8 120 1.6 105 3 90 1.7 75 2.6 60 3.1 45 1.7 30 3.5 15 2 0 2.5Z'/%3E%3C/defs%3E%3Cpath fill='%23E7CB7E' d='M0 0H480V6.6L464 7.6 448 6.6 432 6.7 416 5.6 400 6.1 384 6 368 5.6 352 6.8 336 5.5 320 5.9 304 7 288 7.1 272 7.9 256 8 240 5.6 224 7.2 208 7.5 192 5.7 176 6.3 160 5.7 144 7.5 128 7.1 112 6.8 96 6 80 7 64 6.8 48 6.7 32 7.8 16 6.9 0 6.6Z'/%3E%3Cuse href='%23g' fill='%23F6EDD3' y='1.5'/%3E%3Cuse href='%23g' fill='%230F4A30'/%3E%3C/svg%3E");
  --ph-T10k:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='10'%3E%3Cdefs%3E%3Cpath id='g' d='M0 0H480V2.5L465 2.6 450 3.4 435 3.2 420 2 405 3.9 390 2.4 375 1.9 360 1.9 345 2.4 330 4.1 315 1.6 300 4.4 285 2.7 270 3.2 255 4.3 240 3.4 225 2.2 210 1.9 195 4 180 2.8 165 1.8 150 1.7 135 2.8 120 1.6 105 3 90 1.7 75 2.6 60 3.1 45 1.7 30 3.5 15 2 0 2.5Z'/%3E%3C/defs%3E%3Cpath fill='%23E7CB7E' d='M0 0H480V6.6L464 7.6 448 6.6 432 6.7 416 5.6 400 6.1 384 6 368 5.6 352 6.8 336 5.5 320 5.9 304 7 288 7.1 272 7.9 256 8 240 5.6 224 7.2 208 7.5 192 5.7 176 6.3 160 5.7 144 7.5 128 7.1 112 6.8 96 6 80 7 64 6.8 48 6.7 32 7.8 16 6.9 0 6.6Z'/%3E%3Cuse href='%23g' fill='%23F6EDD3' y='1.5'/%3E%3Cuse href='%23g' fill='%230E2219'/%3E%3C/svg%3E");
  --ph-TL:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='10'%3E%3Cpath fill='%23E7CB7E' d='M0 2.9L12 3.2 24 3.4 36 3.8 48 3.2 60 3.8 72 1.1 84 2.4 96 3.8 108 2.9 120 3.7 132 1.3 144 2.4 156 1.7 168 2.6 180 2.7 192 1 204 1.7 216 1.8 228 3.7 240 3.3 252 1.5 264 3.4 276 1.4 288 2.9 300 1.4 312 1 324 3.6 336 1.6 348 1.6 360 3.9 372 3.6 384 1.9 396 3.9 408 2.6 420 3 432 1.6 444 3.8 456 3.1 468 3.9 480 2.9 480 7.4 468 8.4 456 7.6 444 8.3 432 6.1 420 7.5 408 7.1 396 8.4 384 6.4 372 8.1 360 8.4 348 6.1 336 6.1 324 8.1 312 5.5 300 5.9 288 7.4 276 5.9 264 7.9 252 6 240 7.8 228 8.2 216 6.3 204 6.2 192 5.5 180 7.2 168 7.1 156 6.2 144 6.9 132 5.8 120 8.2 108 7.4 96 8.3 84 6.9 72 5.6 60 8.3 48 7.7 36 8.3 24 7.9 12 7.7 0 7.4Z'/%3E%3Cpath fill='%23F6EDD3' d='M0 2.9L12 3.2 24 3.4 36 3.8 48 3.2 60 3.8 72 1.1 84 2.4 96 3.8 108 2.9 120 3.7 132 1.3 144 2.4 156 1.7 168 2.6 180 2.7 192 1 204 1.7 216 1.8 228 3.7 240 3.3 252 1.5 264 3.4 276 1.4 288 2.9 300 1.4 312 1 324 3.6 336 1.6 348 1.6 360 3.9 372 3.6 384 1.9 396 3.9 408 2.6 420 3 432 1.6 444 3.8 456 3.1 468 3.9 480 2.9 480 4.4 468 5.4 456 4.6 444 5.3 432 3.1 420 4.5 408 4.1 396 5.4 384 3.4 372 5.1 360 5.4 348 3.1 336 3.1 324 5.1 312 2.5 300 2.9 288 4.4 276 2.9 264 4.9 252 3 240 4.8 228 5.2 216 3.3 204 3.2 192 2.5 180 4.2 168 4.1 156 3.2 144 3.9 132 2.8 120 5.2 108 4.4 96 5.3 84 3.9 72 2.6 60 5.3 48 4.7 36 5.3 24 4.9 12 4.7 0 4.4Z'/%3E%3C/svg%3E")}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ph-wood:#2E1D0F;--ph-flag:#E7CB7E}}
:root[data-theme="dark"]{--ph-wood:#2E1D0F;--ph-flag:#E7CB7E}

/* the sheet (the host keeps its own position: sticky/relative) */
.ph-bar{background:var(--ph-grain),var(--ph-sheet);color:var(--ph-ink);border:0;border-radius:0;box-shadow:none}
.ph-bar::before,.ph-bar::after{content:"";position:absolute;left:0;right:0;top:100%;height:var(--ph-edge);pointer-events:none}
.ph-bar::after{background:var(--ph-tile) repeat-x 0 0/480px 100%}
.ph-bar::before{background:var(--ph-wood);-webkit-mask:var(--ph-tile) repeat-x 0 var(--ph-woff)/480px 100%;mask:var(--ph-tile) repeat-x 0 var(--ph-woff)/480px 100%}
.ph-sm{--ph-edge:10px;--ph-woff:2px;--ph-tile:var(--ph-T10)}
.ph-bar [lang="km"],[data-lang="km"] .ph-bar,:lang(km) .ph-bar{line-height:1.7}

/* active item: honey swallowtail flag (shape on ::before so the zero-blur cast follows the cut) */
/* .ph-nav: the item marked aria-current=page or aria-selected=true becomes the flag */
.ph-flag,.ph-nav>[aria-current="page"],.ph-nav>[aria-selected="true"]{position:relative;isolation:isolate;display:inline-flex;align-items:center;min-height:36px;padding:6px 22px 6px 14px;color:var(--ph-flag-ink);
  transform:rotate(-1.2deg);filter:var(--ph-cast);animation:ph-flag 120ms ease-out}
.ph-flag::before,.ph-nav>[aria-current="page"]::before,.ph-nav>[aria-selected="true"]::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--ph-flag);clip-path:polygon(0 0,100% 0,calc(100% - 9px) 50%,100% 100%,0 100%)}
@keyframes ph-flag{from{opacity:0;transform:translateY(2px) rotate(-1.2deg)}}

/* cut-corner paper chip (header buttons on the staff apps and admin) */
.ph-chip{position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 14px;border:0;border-radius:0;
  background:none;color:var(--ph-ink);filter:var(--ph-cast)}
.ph-chip::before{content:"";position:absolute;inset:0;z-index:-1;background:#1B5A3C;box-shadow:inset 0 0 0 1px rgba(231,203,126,.5);clip-path:var(--ph-cut)}

/* the logo as a round sticker: deep-green disc, honey rim, walnut disc offset behind (the gold logo would vanish on a honey disc) */
.ph-emblem{flex:none;box-sizing:border-box;width:var(--ph-em,48px);height:var(--ph-em,48px);padding:5px;border-radius:50%;object-fit:contain;background:#0B3A25;
  box-shadow:0 0 0 2.5px var(--ph-under),2px 3px 0 2.5px var(--ph-wood)}
.ph-emblem img{display:block;width:100%;height:100%;object-fit:contain}
@media (prefers-reduced-motion:reduce){.ph-flag,.ph-nav>*{animation:none!important}}
