/* Chunky game menu treatment. Existing Moby Town blue palette is preserved. */
:root {
  --chunky-lip: #07519b;
  --chunky-sky-lip: #acd9f8;
  --chunky-ring: #0a1f5c;
  --chunky-shine: rgba(255,255,255,.72);
  --depth-tint: #d9f2ff;
  --font-display: "Fredoka", "Noto Sans Thai Looped", "Sarabun", system-ui, sans-serif;
}

body { background: linear-gradient(180deg,#f3fbff 0%,#e4f6ff 44%,#d9f2ff 100%); }
.wrap { max-width: 1200px; }
.top { padding: 10px 14px; border: 3px solid #fff; border-radius: 24px; background: repeating-linear-gradient(135deg,rgba(255,255,255,.38) 0 12px,transparent 12px 25px),linear-gradient(#e5f6ff,#c8eaff); box-shadow: 0 5px 0 #acd9f8; }
.brand { gap: 11px; text-shadow: 0 2px #fff; }
.brand img { padding: 3px; border: 3px solid #fff; border-radius: 18px; background: linear-gradient(#63c9ff,#1686f5); box-shadow: 0 4px 0 #0b55b8; }
.nav { gap: 8px; }
.nav a.link { padding: 7px 13px; border: 2px solid transparent; border-radius: 15px; font-family: var(--font-display); font-weight: 700; text-decoration: none; transition: transform .12s,background .12s,box-shadow .12s; }
.nav a.link:hover { background: #fff; border-color: #c8e9ff; box-shadow: 0 3px 0 #acd9f8; text-decoration: none; transform: translateY(-1px); }
.nav a.link[aria-current=page] { color: #fff; background: linear-gradient(#45baff,#1170e0); border-color: #fff; box-shadow: 0 4px 0 #07519b; text-decoration: none; }
.theme { border-color: #fff; border-radius: 14px; background: linear-gradient(#fff,#dff3ff); box-shadow: 0 4px 0 #acd9f8; }

.btn { border: 3px solid var(--chunky-ring); border-radius: 16px; background: linear-gradient(180deg,#39adf2,#1170e0); box-shadow: 0 5px 0 var(--chunky-ring),inset 0 2px 0 rgba(255,255,255,.42); text-shadow: 0 1px rgba(0,0,0,.12); }
.btn:hover { box-shadow: 0 7px 0 var(--chunky-ring),inset 0 2px 0 rgba(255,255,255,.42); }
.btn:active { box-shadow: 0 1px 0 var(--chunky-ring),inset 0 2px 0 rgba(255,255,255,.35); }
.btn.soft { background: linear-gradient(#effaff,#bdeafc); box-shadow: 0 5px 0 #75b9e8,inset 0 2px 0 #fff; }
.btn.soft:hover { box-shadow: 0 7px 0 #75b9e8,inset 0 2px 0 #fff; }
.btn.soft:active { box-shadow: 0 1px 0 #75b9e8; }
.hero { background: radial-gradient(ellipse 55% 48% at 78% 30%,rgba(255,255,255,.8),transparent 72%),linear-gradient(180deg,#f3fbff 0%,#b4e9fc 100%); }
.hero-grid { gap: 26px 46px; }
.hero h1 { text-shadow: 0 3px #fff,0 6px 0 rgba(10,31,92,.12); }
.hero .lead { max-width: 37em; }
.logo-btn img { filter: drop-shadow(0 8px 0 rgba(10,31,92,.10)) drop-shadow(0 16px 18px rgba(1,54,232,.22)); }

section.block { position: relative; }
.head h2,.sub h1 { text-shadow: 0 2px 0 #fff,0 4px 0 rgba(10,31,92,.1); }
.steps li { padding: 15px; border: 3px solid #fff; border-radius: 22px; background: linear-gradient(155deg,#fff,#eaf7ff); box-shadow: 0 6px 0 #acd9f8,inset 0 0 0 2px #d7efff; }
.steps li:not(:last-child)::after { top: 42px; border-top: 4px dotted #1486f5; }
.steps .n { border-color: #fff; box-shadow: 0 4px 0 #07519b,inset 0 2px 0 rgba(255,255,255,.7); }
.steps h3 { text-shadow: 0 1px #fff; }
.band { background: repeating-linear-gradient(135deg,rgba(255,255,255,.075) 0 13px,transparent 13px 28px),linear-gradient(180deg,#1686f5,#1170e0); }
.band .head h2 { text-shadow: 0 2px 0 rgba(10,31,92,.35); }
.band .rules li { padding: 12px 15px; border: 2px solid rgba(255,255,255,.5); border-radius: 18px; background: rgba(1,54,232,.16); box-shadow: inset 0 2px 0 rgba(255,255,255,.1); }
.band .btn { border-color: #0a1f5c; background: linear-gradient(#fff,#dff3ff); box-shadow: 0 5px 0 #0a1f5c,inset 0 2px 0 #fff; }
.band .btn:hover { box-shadow: 0 7px 0 #0a1f5c,inset 0 2px 0 #fff; }
.band .btn:active { box-shadow: 0 1px 0 #0a1f5c; }
.panel { border: 4px solid #fff; border-radius: 28px; background: linear-gradient(150deg,#fff,#e4f5ff); box-shadow: 0 8px 0 #75b9e8,0 14px 24px rgba(10,65,130,.12),inset 0 0 0 2px #c8e9ff; }
.panel img { filter: drop-shadow(0 5px 0 rgba(10,31,92,.14)); }
.seabed { position: relative; }
.sub { background: radial-gradient(ellipse at 80% 15%,rgba(255,255,255,.76),transparent 56%),linear-gradient(180deg,#f3fbff,#b4e9fc); }
.crumb { border: 2px solid #fff; border-radius: 14px; box-shadow: 0 4px 0 #acd9f8; }
.cards { gap: 18px; }
.card { position: relative; overflow: hidden; border: 3px solid #fff; border-radius: 23px; background: linear-gradient(155deg,#fff,#e7f5ff); box-shadow: 0 6px 0 #acd9f8,inset 0 0 0 2px #d7efff; transition: transform .14s,box-shadow .14s; }
.hero ~ section.block .cards .card:nth-child(3n+2) { transform: rotate(.5deg); }
.hero ~ section.block .cards .card:nth-child(3n) { transform: rotate(-.45deg); }
.card:hover { transform: translateY(-4px) rotate(0); box-shadow: 0 10px 0 #8fc7ee,0 14px 20px rgba(10,65,130,.12); }
.card b { color: #07519b; }
.chip { border: 2px solid #fff; background: linear-gradient(#8ce6ff,#43bbfa)!important; color: #0a1f5c!important; box-shadow: 0 4px 0 #07519b,inset 0 2px 0 rgba(255,255,255,.6); }
.items li,.rowed,.adm-login,.admin-note,.admin-warning,.admin-manager,.admin-result,.admin-users,.admin-page,.admin-nav { border-radius: 20px; }
.items li,.rowed,.adm-login,.admin-note,.admin-manager,.admin-users { border-color: #fff; background: linear-gradient(150deg,#fff,#edf8ff); box-shadow: 0 4px 0 #acd9f8,inset 0 0 0 1px #d7efff; }
.rowed[open] .row-summary { border-color: #acd9f8; }
.adm input,.adm select,.adm textarea,.adm-login input { border: 2px solid #afd9f7; border-radius: 13px; background: linear-gradient(#f7fcff,#e7f5ff); box-shadow: inset 0 2px 4px rgba(10,65,130,.08); }
.adm details,.admin-warning,.admin-footnote,.pen { border-radius: 15px; }
.gsec,.catbox,.pen-box,.admin-manager-head { border-radius: 18px; }
.kpi { border-color: #fff; border-radius: 18px; box-shadow: 0 4px 0 #acd9f8,inset 0 0 0 1px #d7efff; }
.kpi.y,.kpi.o,.kpi.r,.kpi.k { border-color: #fff; }
button,input,select,textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1486f5; outline-offset: 3px; }
@media (max-width: 860px) {
  .steps li { padding: 12px; }
  .steps li:not(:last-child)::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card,.btn,.nav a.link { transition: none; }
}

/* Cleaner navigation and footer branding, based on the first preview. */
.top { flex-wrap: nowrap; gap: 14px; padding: 11px 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.brand { flex: 0 0 auto; text-shadow: none; }
.brand img { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 3px 2px rgba(10,31,92,.15)); }
.nav { flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a.link { flex: 0 0 auto; padding: 7px 9px; font-size: .92rem; }
.nav a.link:hover { background: #e1f3ff; border-color: transparent; box-shadow: none; transform: none; }
.nav a.link[aria-current=page] { color: #07519b; background: #bdeafc; border-color: #fff; box-shadow: inset 0 1px 0 #fff,0 2px 0 #80c7ef; text-shadow: none; }
.nav .btn { flex: 0 0 auto; padding: .42em .9em; font-size: .92rem; }
.theme { flex: 0 0 40px; }
.foot .brand { text-shadow: none; }
.foot .brand img { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 2px 1px rgba(0,0,0,.15)); }
@media (max-width: 1000px) {
  .top { flex-wrap: wrap; justify-content: space-between; }
  .nav { order: 3; flex: 1 0 100%; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .top { padding: 8px 0; gap: 8px; }
  .nav { gap: 1px; }
  .nav a.link { padding: 6px 8px; font-size: .88rem; }
}

/* Softer color movement between the ocean header and the page sections. */
body { background: linear-gradient(180deg,#f3fbff 0%,#e6f7ff 42%,#d5f1ff 100%); }
body::before { opacity: calc(var(--p) * .14); }
.hero { background: radial-gradient(ellipse 60% 50% at 75% 30%,rgba(255,255,255,.6),transparent 70%),linear-gradient(180deg,#f3fbff 0%,#dff4fc 70%,#c9effd 100%); }
.hero::before,.hero::after,.sub::before,.sub::after { height: clamp(34px,4vw,64px); }
.hero::before,.sub::before { bottom: 3px; background: rgba(125,221,249,.28); }
.hero::after,.sub::after { background: #dff4fd; opacity: .82; }
.sub { background: radial-gradient(ellipse at 80% 15%,rgba(255,255,255,.6),transparent 56%),linear-gradient(180deg,#f3fbff 0%,#dff4fc 70%,#c9effd 100%); }
.rule-jump-highlight { outline: 3px solid #1486f5; outline-offset: 3px; box-shadow: 0 0 0 7px rgba(20,134,245,.14),0 7px 0 #8fc7ee; }
h1,h2,h3 { font-weight: 600; }
.hero h1 { text-shadow: 0 2px 0 rgba(255,255,255,.78); }

/* ---- หน่วยงาน: เมนูเลื่อนลง / โลโก้ / แบนเนอร์ ---- */
.navdrop{flex:0 0 auto;position:relative}
.nav .navdrop-btn{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:7px 9px;font-size:.92rem;border:2px solid transparent;border-radius:15px;background:none;color:inherit;cursor:pointer;font-family:var(--font-display);font-weight:700}
.nav .navdrop-btn:hover{background:#e1f3ff}
.nav .navdrop.on .navdrop-btn,.nav .navdrop-btn[aria-current=page]{color:#07519b;background:#bdeafc;border-color:#fff;box-shadow:inset 0 1px 0 #fff,0 2px 0 #80c7ef}
.navdrop-caret{width:7px;height:7px;border-right:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .15s}
.navdrop-btn[aria-expanded=true] .navdrop-caret{transform:rotate(-135deg) translateY(-2px)}
.navdrop-menu{position:fixed;z-index:60;min-width:210px;max-width:calc(100vw - 16px);padding:8px;display:grid;gap:4px;background:#fff;border:3px solid var(--outline,#0a1f5c);border-radius:18px;box-shadow:0 6px 0 rgba(10,31,92,.18)}
.navdrop-menu[hidden]{display:none}
.navdrop-menu a{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;color:var(--ink,#0a1f5c);font-family:var(--font-display);font-weight:700;text-decoration:none}
.navdrop-menu a:hover,.navdrop-menu a:focus-visible{background:#e1f3ff;outline:none}
.navdrop-menu a[aria-current=page]{background:#bdeafc}
.navdrop-menu img{width:28px;height:28px;object-fit:contain;flex:none}
.brand.is-dept img.brand-dept{width:auto;height:44px;max-width:none;object-fit:contain}
.dept-hero-in{display:flex;align-items:center;gap:clamp(18px,4vw,40px);flex-wrap:wrap}
.dept-logo{width:clamp(150px,22vw,230px);height:auto;flex:none;filter:drop-shadow(0 6px 10px rgba(10,31,92,.18))}
.dept-hero-t{flex:1 1 260px;min-width:0}
.dept-hero-t .crumb{margin-bottom:12px}
.dept-cards .dept-card{align-items:center;text-align:center}
.dept-card img{width:min(150px,60%);height:150px;object-fit:contain;margin:0 auto 6px}
.adm.is-head #catBox,.adm.is-head #importGoogleSheet,.adm.is-head #importWebsite,.adm.is-head #importCsv,.adm.is-head #importTsv,.adm.is-head #importDisabledNote,.adm.is-head label[for=dc],.adm.is-head #dc,.adm.is-head #backup,.adm.is-head #rs,.adm.is-head #pk{display:none}
@media(prefers-reduced-motion:reduce){.navdrop-caret{transition:none}}
#top{position:relative;z-index:70}
.adm.is-member [data-gdel]{display:none}
.hist-filter{margin:.6rem 0}.hist-filter label{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;font-weight:600}.hist-filter select{max-width:240px}
.req-item{border:1px solid #d9e3ee;border-radius:14px;padding:.8rem 1rem;margin:.6rem 0;background:#fff}
.req-top{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.req-st{margin-left:auto;font-size:.8rem;font-weight:700;padding:.15rem .6rem;border-radius:99px;background:#fff3cd;color:#8a6100}
.req-approved .req-st{background:#dff5e3;color:#1c6b32}.req-rejected .req-st{background:#fde2e2;color:#a12626}
.req-meta,.req-reason{margin:.25rem 0;font-size:.9rem}
