/* หน้าดูดวงทะเบียน (number.php): ผลลัพธ์ + ฟอร์ม + ปุ่มแชร์ */
.nb-result, .nb-hero { font-family: "Kanit", "Sarabun", sans-serif; color: #2b1d1c; }
.nb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- การ์ดผลลัพธ์ ---------- */
.nb-result {
  padding: 28px 0 32px;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .8) 0, rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, #fde9e6 0%, #f7cdc8 60%, #f0b3ad 100%);
}
.nb-card {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 26px 22px 22px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(140, 61, 58, .2);
  text-align: center;
  overflow: hidden;
}
.nb-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 7px;
  background: linear-gradient(90deg, #d9726d, #f2bbb6 55%, #f1d27a);
}
.nb-kicker { margin: 0 0 14px; font-size: 15px; font-weight: 500; color: #b8544f; letter-spacing: .3px; }

.nb-plate {
  /* กล่องเลขทะเบียน ไม่ทำเป็นรูปป้าย เพราะไม่รู้ว่าป้ายจริงเป็นป้ายขาวดำ ป้ายประมูล หรือจังหวัดไหน */
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 26px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fff7f6 100%);
  box-shadow: inset 0 0 0 2px #f3c9c4, 0 10px 22px rgba(120, 40, 36, .12);
}
.nb-plate small { font-size: 13px; font-weight: 600; color: #b8544f; letter-spacing: .3px; }
.nb-plate span {
  margin-top: 2px;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 1.15;
  color: #2b1d1c;
  white-space: nowrap;
}

.nb-sum { margin: 18px 0 2px; }
.nb-sum small { display: block; font-size: 17px; font-weight: 500; color: #9c3f3a; }
.nb-num {
  display: block;
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  color: #c4524c;
  letter-spacing: -2px;
  text-shadow: 0 4px 0 #fde2df;
}
.nb-persona {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: #2b1d1c;
}
.nb-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}
.nb-badge-great { background: #fff3cf; color: #8a5a00; box-shadow: inset 0 0 0 1.5px #f1d27a; }
.nb-badge-good  { background: #e3f7ea; color: #0b7a3b; box-shadow: inset 0 0 0 1.5px #9fdcb4; }
.nb-badge-mixed { background: #f1ecf7; color: #5d4a7a; box-shadow: inset 0 0 0 1.5px #d5c9e6; }
.nb-badge-care  { background: #fde2df; color: #9a2f2a; box-shadow: inset 0 0 0 1.5px #f1aaa4; }
.nb-tag { margin: 12px auto 0; max-width: 420px; font-size: 18px; line-height: 1.5; color: #4a2f2d; }
/* ผลรวมอื่น (ไม่อยู่ในชุดดีมาก/ดี): โชว์ความหมายเต็มในการ์ด ไม่มีป้ายระดับ (9 ต.ค. 2026) */
.nb-persona-plain { font-size: 24px; }
.nb-meaning { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: #faf6f5; text-align: left; }
.nb-meaning-h { margin: 0 0 8px; font-family: "Kanit", sans-serif; font-weight: 600; font-size: 17px; color: #9c3f3a; }
.nb-meaning-p { font-size: 16px; line-height: 1.7; color: #4a2f2d; }
.nb-meaning-p p { margin: 0 0 10px; }
/* ผลรวมดี: ความหมายเต็มซ่อนไว้ กดอ่าน */
.nb-meaning-toggle { padding: 0 16px; }
.nb-meaning-toggle summary { padding: 12px 0; text-align: center; font-family: "Kanit", sans-serif; font-weight: 600; font-size: 16px; color: #9c3f3a; cursor: pointer; list-style: none; }
.nb-meaning-toggle summary::-webkit-details-marker { display: none; }
.nb-meaning-toggle summary::after { content: " ▾"; }
.nb-meaning-toggle[open] summary::after { content: " ▴"; }
.nb-meaning-toggle[open] summary { border-bottom: 1px dashed #f0c9c5; margin-bottom: 10px; }
.nb-meaning-toggle .nb-meaning-p { padding-bottom: 14px; }

/* เผยทีละส่วนหลังเลขนับเสร็จ */
.nb-persona, .nb-badge, .nb-tag, .nb-meaning, .nb-pts-h, .nb-pts, .nb-fit, .nb-care, .nb-share, .nb-again {
  transition: opacity .45s ease, transform .45s ease;
}
.nb-anim .nb-sum:not(.nb-done) ~ * { opacity: 0; transform: translateY(8px); }

/* จุดเด่น 3 ช่อง: ไอคอน + ด้าน + ข้อความ */
.nb-pts-h {
  margin: 20px 0 10px;
  padding-top: 16px;
  border-top: 1px dashed #f0c9c5;
  font-family: "Kanit", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #9c3f3a;
}
.nb-pts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nb-pts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px 11px;
  border-radius: 16px;
  background: #fdf1f0;
  color: #4a2f2d;
  line-height: 1.3;
  text-align: center;
}
.nb-pts i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(196, 82, 76, .16), inset 0 0 0 2px #f6d3cf;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
}
.nb-pts small {
  display: block;
  margin-bottom: 3px;
  font-family: "Kanit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #c4524c;
}
.nb-pts span { font-size: 14px; }
.nb-anim .nb-pts i { animation: nb-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.nb-anim .nb-pts li:nth-child(2) i { animation-delay: .12s; }
.nb-anim .nb-pts li:nth-child(3) i { animation-delay: .24s; }
.nb-anim .nb-sum:not(.nb-done) ~ .nb-pts i { animation: none; }
@keyframes nb-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.nb-fit, .nb-care {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.nb-fit { background: #faf6f5; color: #4a2f2d; }
.nb-care { background: #fff8ec; color: #6b4a1c; }
.nb-fit b i { font-style: normal; margin-right: 4px; }
.nb-fit b, .nb-care b { display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.nb-fit b { background: #d9726d; color: #fff; }
.nb-care b { background: #f1d27a; color: #6b4a1c; }

/* ---------- ปุ่มแชร์ ---------- */
.nb-share { margin: 18px 0 4px; }
.nb-share-q { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: #2b1d1c; }
.nb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.nb-btn:hover, .nb-btn:focus { text-decoration: none; transform: translateY(-2px); filter: brightness(1.05); }
.nb-btn-line {
  width: 100%;
  min-height: 60px;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(180deg, #19d46a 0%, #06c755 55%, #05b04b 100%);
  box-shadow: 0 10px 24px rgba(6, 160, 70, .32);
  animation: nb-glow 1.8s ease-in-out infinite;
}
.nb-btn-line:hover, .nb-btn-line:focus { color: #fff; }
.nb-btn-line .lt-ico { width: 30px; height: 30px; flex-basis: 30px; background: #fff; }
.nb-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nb-btn-sm { flex: 1 1 0; min-width: 96px; min-height: 44px; padding: 0 10px; font-size: 15px; }
.nb-btn-fb { background: #1877f2; color: #fff; }
.nb-btn-fb:hover, .nb-btn-fb:focus { color: #fff; }
.nb-btn-copy, .nb-btn-more { background: #fdf1f0; color: #9c3f3a; box-shadow: inset 0 0 0 1.5px #f0c9c5; }
.nb-btn-save { background: #fff; color: #2b1d1c; box-shadow: inset 0 0 0 1.5px #e3d6d4; }
.nb-btn-save:hover, .nb-btn-save:focus { color: #2b1d1c; }
.nb-copied { margin: 8px 0 0; font-size: 14px; color: #0b7a3b; }
.nb-copied:empty { display: none; }
.nb-again {
  display: block;
  margin: 8px auto 0;
  padding: 12px;
  border-radius: 14px;
  background: #faf6f5;
  color: #9c3f3a;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.nb-again:hover, .nb-again:focus { color: #2b1d1c; text-decoration: none; }
.nb-again small { display: block; font-size: 13px; font-weight: 400; color: #8a6a67; }

/* ---------- ต่อไป ---------- */
.nb-next { max-width: 560px; margin: 18px auto 0; text-align: center; }
.nb-next p { margin: 0 0 10px; font-size: 16px; color: #4a2f2d; }
.nb-next-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nb-next-links a {
  display: block;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  color: #2b1d1c;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(140, 61, 58, .1);
}
.nb-next-links a:hover { text-decoration: none; color: #c4524c; }
.nb-next-links b { display: block; font-size: 26px; line-height: 1.1; color: #c4524c; }
.nb-next-links span { font-size: 13px; }
.nb-next-plain { margin: 16px 0 0; text-align: center; }
.nb-next-plain a { color: #6b2f2b; font-weight: 600; font-size: 16px; }
.nb-error { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: #fde2df; color: #9a2f2a; }

/* ---------- ฟอร์ม ---------- */
.nb-hero { padding: 30px 0 26px; background: #fdf6f5; text-align: center; }
.nb-hero-title { margin: 0; font-size: 30px; font-weight: 700; color: #2b1d1c; }
.nb-hero-sub { margin: 6px 0 0; font-size: 17px; color: #6b4a47; }
.nb-form { max-width: 520px; margin: 18px auto 0; }
.nb-inputs { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.nb-field { display: block; margin: 0; text-align: left; }
.nb-field span { display: block; margin: 0 0 4px 4px; font-size: 14px; font-weight: 500; color: #9c3f3a; }
.nb-field input {
  width: 100%;
  height: 58px;
  padding: 0 14px;
  border: 2px solid #ead1ce;
  border-radius: 14px;
  background: #fff;
  font-family: "Sarabun", sans-serif;
  font-size: 26px;
  text-align: center;
  color: #111;
}
.nb-field input:focus { outline: none; border-color: #d9726d; box-shadow: 0 0 0 4px rgba(217, 114, 109, .18); }
.nb-submit {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: #c4524c;
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(196, 82, 76, .28);
  cursor: pointer;
}
.nb-submit:hover { filter: brightness(1.06); }
.nb-form-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  font-size: 14px;
  color: #6b4a47;
}
.nb-form-score input {
  width: 84px;
  height: 40px;
  border: 1.5px solid #ead1ce;
  border-radius: 10px;
  text-align: center;
  font-size: 17px;
}
.nb-form-score button {
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid #d9726d;
  border-radius: 10px;
  background: #fff;
  color: #c4524c;
  font-family: "Kanit", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

/* ความหมายเต็ม (กดเปิด) */
.nb-full { margin: 0 0 16px; padding: 4px 16px; border-radius: 14px; background: #faf6f5; }
.nb-full summary { padding: 10px 0; font-family: "Kanit", sans-serif; font-weight: 600; color: #9c3f3a; cursor: pointer; }

@keyframes nb-glow {
  0%, 100% { box-shadow: 0 10px 24px rgba(6, 160, 70, .32), 0 0 0 0 rgba(6, 199, 85, .45); }
  70% { box-shadow: 0 10px 24px rgba(6, 160, 70, .32), 0 0 0 12px rgba(6, 199, 85, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nb-btn-line, .nb-anim .nb-pts i { animation: none; }
  .nb-anim .nb-sum:not(.nb-done) ~ * { opacity: 1; transform: none; }
}
@media only screen and (max-width: 480px) {
  .nb-card { padding: 22px 16px 18px; border-radius: 22px; }
  .nb-num { font-size: 84px; }
  .nb-persona { font-size: 26px; }
  .nb-tag { font-size: 16px; }
  .nb-pts { gap: 6px; }
  .nb-pts li { padding: 10px 4px 9px; }
  .nb-pts span { font-size: 13px; }
  .nb-hero-title { font-size: 26px; }
}
