/* ---color Griad ---
#F1F1F1 [Light Grey],
#E7E0D8 [Oak Wood],
#F4EBE9 [pale Blush],
#C6D1D9 [Misty Blue],
#67869A [Nordic Blue]
---color Griad ---*/
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); */
* {
  font-family: 'monospace', sans-serif;
  outline: none;
}

html,
body {
  height: 100%;
  overflow: hidden;
  /* ✅ ปิด scroll ทั้งหน้า */
}

.page {
  width: 100%;
  height: 100vh;
  background: #fdfdfd;
  font-family: 'Encode Sans Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: .03em;
  color: #212121;
}


header {
  display: flex;
  position: fixed;
  width: 100%;
  height: 70px;
  background: #67869A;
  color: #fff;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  z-index: 99;
}

main {
  padding: 70px 20px 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

main>div {
  margin: auto;
  max-width: 99%;
}

main h2 span {
  color: #BF7497;
}

main p {
  line-height: 1.5;
  font-weight: 200;
  margin: 20px 0;
}

main small {
  font-weight: 300;
  color: #888;
}

.top-logo {
  padding-right: 6px;
  border-radius: 50px;
  width: 150px;
  width: 35px;
}

#nav-container {
  position: fixed;
  height: 100vh;
  width: 100%;
  pointer-events: none;
  z-index: 99;
}

#nav-container .bg {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100% - 70px);
  visibility: hidden;
  opacity: 0;
  transition: .3s;
  background: #000;
}

#nav-container:focus-within .bg {
  visibility: visible;
  opacity: .6;
}

#nav-container * {
  visibility: visible;
}

.button {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* -webkit-appearance: none; */
  border: 0;
  background: transparent;
  border-radius: 0;
  height: 70px;
  width: 30px;
  cursor: pointer;
  pointer-events: auto;
  margin-left: 25px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  z-index: 99;
}

.icon-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: #aaa;
  transition: .3s;
  z-index: 99;
}

.icon-bar+.icon-bar {
  margin-top: 5px;
}

#nav-container:focus-within .button {
  pointer-events: none;
}

#nav-container:focus-within .icon-bar:nth-of-type(1) {
  transform: translate3d(0, 8px, 0) rotate(45deg);
}

#nav-container:focus-within .icon-bar:nth-of-type(2) {
  opacity: 0;
}

#nav-container:focus-within .icon-bar:nth-of-type(3) {
  transform: translate3d(0, -8px, 0) rotate(-45deg);
}

#nav-content {
  margin-top: 70px;
  padding: 20px;
  width: 90%;
  max-width: 300px;
  position: absolute;
  top: 0;
  left: 0;
  height: 80%;
  /* height: calc(100% - 70px); */
  background: #ececec;
  pointer-events: auto;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  transform: translateX(-100%);
  transition: transform .3s;
  will-change: transform;
  contain: paint;
  overflow-y: scroll;

}

#nav-content ul {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#nav-content li a {
  padding: 10px 5px;
  display: block;
  text-transform: uppercase;
  transition: color .1s;
}

#nav-content li a:hover {
  color: #BF7497;
}

#nav-content li:not(.small)+.small {
  margin-top: auto;
}

.small {
  display: flex;
  align-self: center;
}

.small a {
  font-size: 12px;
  font-weight: 400;
  color: #888;
}

.small a+a {
  margin-left: 15px;
}

#nav-container:focus-within #nav-content {
  transform: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a,
a:visited,
a:focus,
a:active,
a:link {
  text-decoration: none;
  outline: 0;
}

a {
  color: currentColor;
  transition: .2s ease-in-out;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  vertical-align: middle;
  height: auto;
  width: 100%;
}

.content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 5px;
  /* border:1px solid #67869A; */
  height: 84dvh;
  margin: -70px 0 0 2px;
  pointer-events: auto;
}

.itembox1 {
  /* border: 1px solid #ccc; */
  height: 86%;
  overflow-y: scroll;
  display: flex;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  /*justify-content: center;   /* จัดกลางแนวนอน */
  /*align-items: center;       /* จัดกลางแนวตั้ง */
  /*flex-wrap: wrap;           /* ถ้ามีหลาย item ให้ขึ้นบรรทัดใหม่ */
  gap: 5px;
  padding: 5px;
}

.itembox2 {
  /* border: 1px solid #ccc; */
  margin-top: 10px;
  height: 75%;
  overflow-y: scroll;
}

/* .item{
  border: 1px solid #3908fa;
  width:30%;
  height: 35%;
  margin: 0;
} */
.item {
  border: 1px solid #ccc;
  width: 100%;
  height: 200px;
  aspect-ratio: 4 / 3;
  /* ✅ ใช้ตัวนี้พอ */
  overflow: hidden;
}

.item>.itemimg img {
  border: 1px solid #f5f1f1cc;
  width: 100%;
  height: 132px;
  object-fit: scale-down;
  display: block;
}

.item>.item-title p {
  /* border: 1px solid #f40716; */
  width: 100%;
  margin-top: 3%;
  margin-bottom: 1%;
  color: #09090a;
  font-size: 73%;
  font-weight: 700;
  line-height: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.item-title>.item-nums p {
  color: red;
}

.item:hover {
  background-color: #C6D1D9;
}

.item-ilst {
  border: 1px solid #ccc;
  bottom: 3px;
  width: 100%;
  height: 70px;
  aspect-ratio: 4 / 3;
  /* ✅ ใช้ตัวนี้พอ */
  overflow: hidden;
  font-size: 70%;
  color: #0a0909;
  flex-wrap: wrap;
}

.item-ilst p {
  margin-bottom: -12%;
}

.item-ilst:hover {
  background-color: #e49393;
}

.ordone1 {
  border: 1px solid #ccc;
  font-size: 80%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: fixed;
  bottom: 10%;
  left: 0;
  width: 100%;
  height: 10%;
  background: #fff;
  object-fit: scale-down;
}

.ordone1-1 {
  /* border: 1px solid #f7163c; */
  font-size: 80%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: fixed;
  bottom: 10%;
  left: 0;
  width: 100%;
  height: 80%;
  background: #fff;
  object-fit: scale-down;
}

.ordone2 {
  /* border: 1px solid #ccc; */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10%;
  background: #fff;
  object-fit: scale-down;
}

.onin {
  display: block;
  width: 40%;
  margin: -10% 0% 0% 43%;
  border: 1px solid #0c0c0ccc;
  height: 20%;
  font-size: 100%;
}

.hidd {
  display: none;
}

#imgf {
  display: none;
  border: 1px solid #000;
  margin: -14% 3% 5% 139%;
  background-color: #CCC;
  width: 95%;
  height: 85%;
}

#imgf img {
  width: 100%;
  height: 100%;
}

.page:has(.onin:focus-within) #nav-container:not(.ordone2) {
  /* filter: blur(6px); */
  pointer-events: none;
}

.page:has(.onin:focus-within) header {
  pointer-events: none;
}

.page:has(.onin:focus-within) .content {
  pointer-events: none;
}

.btn-b {
  background-color: #208cad;
  border: 1px solid #fff;
  border-radius: 5px;
  margin: 1px;
  padding: 3% 5% 5% 12%;
  font-size: 150%;
  width: 100%;
  pointer-events: auto;
  object-fit: scale-down;
}

.btn-bb {
  background-color: #2baa53;
  border: 1px solid #fff;
  border-radius: 5px;
  margin: 1px;
  padding: 3% 5% 5% 25%;
  font-size: 150%;
  width: 100%;
  pointer-events: auto;
  object-fit: scale-down;
}

.btnred {
  background-color: #ee4545;

}

.btn-b.btnred:hover {
  background-color: #f35c5c;
  color: #fbfbfb;
}

.btn-b:hover {
  background-color: #6090f7;
  color: #fbfbfb;
}

.btn-bb:hover {
  background-color: #1aa44a;
  color: #fbfbfb;
}

/* #bnt1{
  display: none;
}
#bnt2{
  display: none;
} */
.img-title {
  text-align: left;
  margin: 3% 3% auto;
  /* border:1px solid #060606; */
  font-size: 11px;
  width: 90%;
  height: 25%;
  /* overflow-wrap: break-word; */
}

.img-title p {
  text-align: left;
  margin: 0px;

}

.hd-reserch {
  padding: 6px;
  border: 0.5px solid #a3a4f7;
  border-radius: 5px;
  background: transparent;
  font-size: 17px;
  color: #ffff;
  width: 35.4%;
  flex-grow: wrap;
  padding-left: 3px;
  margin-right: -40px;
}

.hd-reserch::placeholder {
  color: #CCC;
}

.icons-bg {
  font-size: 28px;
  color: #ccc
}

.icons-bg:hover {
  color: #ffff;
}

.bg-center {
  margin-right: 22.7%;
}

.bg-right {
  margin-right: 63%;
}

.l-input {
  width: 35%;
  height: 50%;
  border: 0.5px solid #ccc;
  border-radius: 5px;
  font-size: 18px;
  text-align: center;
  text-overflow: clip;
}

.h_p {
  width: 105%;
  height: 72px;
  /* border: 1px solid #000 ; */
  margin: 0px 1px 0 0px;
  justify-content: center;
}

.b_plus {
  margin: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  width: 30%;
  height: 50%;
  text-align: center;
  color: #CCC;
  font-weight: 300;
  font-size: 25px;
}

.b_plus:disabled {
  background: none;
  color: #CCC;
  cursor: not-allowed;
  pointer-events: none;
}

.b_plus:hover {
  background: #3ff989;
  color: #FFFF;
}

.b_del {
  margin: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  width: 30%;
  height: 50%;
  text-align: center;
  color: #CCC;
  font-weight: 300;
  font-size: 25px;
}

.b_del:hover {
  background-color: #f85b3f;
  color: #FFFF;
}

.add-list {
  border: none;
  border-radius: 5px;
  background: transparent;
  width: 98%;
  height: 50%;
  text-align: center;
  color: rgb(9, 9, 9);
  font-weight: 300;
  margin-top: 3px;
}

.add-list:hover {
  background: #69a6ec;
  color: #FFF;
}

#icons-cal:after {
  content: attr(value);
  font-size: 18px;
  color: #fff;
  background: red;
  border-radius: 50%;
  padding: 0 5px;
  position: relative;
  left: -8px;
  top: -10px;
  opacity: 0.9;
}

.dinf {
  font-size: 250%;
  width: 100%;
  margin-top: 0%;
}

@media screen and (orientation: portrait) {
  body {
    background-color: #208cad;
  }

  #nav-content {
    height: 100%;
  }

  .itembox1 {
    width: 108%;
    gap: 3px;
    margin-left: -6%;
  }

  .itembox2 {
    width: 108%;
  }

  .item {
    width: 100%;
    height: 20dvh;
  }

  .item>.itemimg img {
    width: 100%;
    height: 125px;
    object-fit: scale-down;
    display: block;
  }

  .item>.item-title p {
    /* border: 1px solid #f40716; */
    width: 100%;
    margin-top: 3%;
    margin-bottom: 1%;
    color: #09090a;
    font-size: 58%;
    font-weight: 700;
    line-height: 1;
    justify-content: center;
    flex-wrap: wrap;
  }

  .item-title>.item-nums p {
    font-size: 43%;
    white-space: pre-line;
    color: red;
  }

  .item-ilst {
    font-size: 65%;
  }

  .ordone1 div {
    font-size: 100%;
  }

  .ordone1-1 div {
    font-size: 100%;
  }

  .dinf {
    font-size: 170%;
  }

  .btn-b {
    font-size: 110%;
  }

  .btn-b>.btnred {
    font-size: 125%;
  }

  .btn-bb {
    font-size: 110%;
  }
}

@media only screen and (max-width: 400px) {
  body {
    background-color: #c6ed06;

  }

  #nav-content {
    height: 70%;
  }

  .content {
    gap: 1px;
  }

  .itembox1 {
    width: 110%;
    margin-left: -10%;
  }

  .itembox2 {
    width: 123%;
    font-size: 20%;

  }

  .item>.itemimg img {
    width: 100%;
    height: 120px;
    object-fit: scale-down;
    display: block;
  }

  .item-ilst p {
    font-size: 20%;
  }
}

.keycode {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* -webkit-appearance: none; */
  border: 1px solid #fff;
  background: transparent;
  border-radius: 5px;
  height: 30px;
  width: 8%;
  cursor: pointer;
  pointer-events: auto;
  margin-left: -20%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  z-index: 99;
}

.scancode {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* -webkit-appearance: none; */
  border: 1px solid #fff;
  background: transparent;
  border-radius: 5px;
  height: 30px;
  width:8%;
  cursor: pointer;
  pointer-events: auto;
  margin-left: 2%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  z-index: 99;
}
.keycode:hover{
  background-color:#3e5fa5;
  color: #fff;
}
.scancode:hover{
  background-color:#3e5fa5;;
  color: #fff;
}