@import url('https://fonts.googleapis.com/css2?family=Itim&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #fffaf5;
  --white: #fffdfb;
  --pink: #e9a6b6;
  --pink-dark: #c97f95;
  --green: #9db9a7;
  --green-light: #eaf2ec;
  --text: #514b4a;
  --muted: #8c8582;
  --line: #eee3dc;
  --shadow: 0 20px 60px rgba(114, 87, 73, .10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Noto Sans Thai', sans-serif;
  line-height: 1.7;
}

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


/* =========================
   HEADER
========================= */

.header {
  height: 76px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(255, 250, 245, .92);
  backdrop-filter: blur(12px);

  border-bottom: 1px solid var(--line);

  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
}

.logo span {
  font-size: 25px;
}

.nav {
  display: flex;
  gap: 30px;
  color: var(--muted);
  font-size: 13px;
}

.nav a:hover {
  color: var(--pink-dark);
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 23px;
}


/* =========================
   HERO
========================= */

.hero {
  min-height: 610px;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;

  padding: 80px 10%;

  background:
    linear-gradient(
      135deg,
      #fffaf5 15%,
      #f9e8e9 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.eyebrow,
.label,
.section-title > span,
.good-deed > div > span,
.sound-info > span {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--pink-dark);
  font-weight: 700;
}

.hero h1 {
  margin: 15px 0;

  font-family: 'Itim', cursive;
  font-size: 74px;
  line-height: 1.05;
  font-weight: 400;
}

.hero h1 span {
  color: var(--pink-dark);
}

.hero p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 30px;
}

.hero-lotus {
  position: absolute;
  right: 12%;
  top: 20%;

  font-size: 220px;
  opacity: .15;

  transform: rotate(10deg);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
}

.orb-1 {
  width: 230px;
  height: 230px;

  right: 3%;
  bottom: -100px;

  background: rgba(220, 233, 223, .8);
}

.orb-2 {
  width: 100px;
  height: 100px;

  right: 35%;
  top: 12%;

  background: rgba(255,255,255,.8);
}


/* =========================
   BUTTONS
========================= */

.main-button {
  display: inline-block;

  border: 0;
  border-radius: 999px;

  padding: 12px 25px;

  background: var(--pink-dark);
  color: white;

  font-family: inherit;
  cursor: pointer;

  box-shadow: 0 8px 20px rgba(201,127,149,.2);

  transition: .2s;
}

.main-button:hover {
  transform: translateY(-2px);
}

.main-button span {
  margin-left: 12px;
}

.soft-button {
  border: 1px solid #f0d8dd;

  border-radius: 999px;

  padding: 11px 20px;

  background: white;
  color: var(--pink-dark);

  font-family: inherit;

  cursor: pointer;
}

.reset-button {
  display: block;

  width: 100%;

  margin-top: 8px;

  border: 0;
  background: transparent;

  color: var(--muted);

  font-family: inherit;
  cursor: pointer;
}


/* =========================
   DAILY
========================= */

.daily-wrap {
  padding: 0 8%;
  margin-top: -50px;

  position: relative;
  z-index: 5;
}

.daily-card {
  padding: 28px 35px;

  background: var(--white);

  border: 1px solid var(--line);

  border-radius: 24px;

  box-shadow: var(--shadow);

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;
}

.daily-card h2 {
  margin: 4px 0;

  font-family: 'Itim', cursive;
  font-size: 27px;
  font-weight: 400;
}

.daily-card p {
  margin: 0;

  color: var(--muted);
  font-size: 13px;
}


/* =========================
   HOME MENU
========================= */

.home-menu {
  max-width: 1050px;

  margin: auto;

  padding: 65px 8% 20px;
}

.menu-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 16px;
}

.menu-card {
  padding: 23px;

  background: white;

  border: 1px solid var(--line);

  border-radius: 24px;

  display: flex;
  align-items: center;

  gap: 16px;

  box-shadow: 0 10px 30px rgba(114,87,73,.05);

  transition: .2s;
}

.menu-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow);

  border-color: #efd3da;
}

.menu-icon {
  width: 58px;
  height: 58px;

  border-radius: 18px;

  background: #fff5f2;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  font-size: 29px;
}

.menu-card h3,
.relax-card h3 {
  margin: 0;

  font-family: 'Itim', cursive;

  font-size: 26px;
  font-weight: 400;
}

.menu-card small,
.relax-card small {
  color: var(--muted);
  font-size: 11px;
}

.relax-card {
  margin-top: 16px;

  padding: 20px 25px;

  background: var(--green-light);

  border-radius: 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  transition: .2s;
}

.relax-card:hover {
  transform: translateY(-3px);

  box-shadow: var(--shadow);
}

.relax-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.relax-left .menu-icon {
  background: white;
}

.relax-sounds {
  color: var(--muted);
  font-size: 12px;
}


/* =========================
   SECTIONS
========================= */

.section {
  max-width: 1200px;

  margin: auto;

  padding: 100px 8% 70px;
}

.section-title {
  text-align: center;

  margin-bottom: 40px;
}

.section-title h2 {
  margin: 3px 0;

  font-family: 'Itim', cursive;

  font-size: 46px;
  font-weight: 400;
}

.section-title p {
  margin: 0;

  color: var(--muted);
  font-size: 14px;
}


/* =========================
   MEDITATION
========================= */

.meditation-box {
  padding: 55px;

  border-radius: 35px;

  background:
    linear-gradient(
      145deg,
      #f4eee9,
      #eaf2ec
    );

  box-shadow: var(--shadow);

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 90px;
}

.breathing-circle {
  width: 245px;
  height: 245px;

  border-radius: 50%;

  background: rgba(255,255,255,.7);

  display: grid;
  place-items: center;

  box-shadow:
    0 0 0 16px rgba(255,255,255,.25),
    0 25px 60px rgba(100,80,70,.1);
}

.breathing-circle.active {
  animation: breathing 8s ease-in-out infinite;
}

.breathing-circle strong {
  display: block;

  text-align: center;

  font-size: 42px;
  font-weight: 400;
}

.breathing-circle small {
  display: block;

  text-align: center;

  color: var(--muted);

  font-size: 12px;
}

.timer-area {
  width: 320px;
}

.time-buttons {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 10px;

  margin-bottom: 18px;
}

.time-button {
  padding: 10px;

  border: 1px solid #ddd5cf;

  border-radius: 12px;

  background: rgba(255,255,255,.65);

  color: var(--muted);

  font-family: inherit;

  cursor: pointer;
}

.time-button.active {
  border-color: var(--pink);

  background: white;

  color: var(--pink-dark);
}

.full {
  width: 100%;
}

@keyframes breathing {

  0%,100% {
    transform: scale(.94);
  }

  50% {
    transform: scale(1.07);
  }

}


/* =========================
   MALA
========================= */

.mala-box {
  padding: 45px;

  text-align: center;

  background: white;

  border: 1px solid var(--line);

  border-radius: 35px;

  box-shadow: var(--shadow);
}

.ring {
  width: 220px;
  height: 220px;

  position: relative;

  margin: auto;
}

.ring svg {
  width: 100%;
  height: 100%;

  transform: rotate(-90deg);
}

.ring-background,
.ring-fill {
  fill: none;

  stroke-width: 8;
}

.ring-background {
  stroke: #f1e9e4;
}

.ring-fill {
  stroke: var(--pink);

  stroke-linecap: round;

  stroke-dasharray: 603;

  stroke-dashoffset: 603;

  transition: .25s;
}

.ring-number {
  position: absolute;

  inset: 0;

  display: grid;
  place-content: center;
}

.ring-number strong {
  font-size: 54px;
  font-weight: 400;
}

.ring-number span {
  color: var(--muted);
  font-size: 13px;
}

.lotus-button {
  width: 90px;
  height: 90px;

  margin-top: 10px;

  border: 0;

  border-radius: 50%;

  background: #f9e5e8;

  font-size: 42px;

  cursor: pointer;

  box-shadow: 0 10px 25px rgba(201,127,149,.15);

  transition: .15s;
}

.lotus-button:active {
  transform: scale(.9);
}

.mala-message {
  min-height: 28px;

  color: var(--pink-dark);

  font-size: 13px;
}

.mala-buttons {
  display: flex;

  justify-content: center;

  gap: 10px;
}


/* =========================
   CHANTING
========================= */

.chant-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.chant-card {
  padding: 28px;

  background: white;

  border: 1px solid var(--line);

  border-radius: 24px;

  transition: .2s;
}

.chant-card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow);
}

.chant-icon {
  font-size: 32px;
}

.chant-card h3 {
  margin: 12px 0 3px;

  font-size: 19px;
}

.chant-card p {
  margin: 0 0 15px;

  color: var(--muted);

  font-size: 13px;
}

.read-chant {
  padding: 0;

  border: 0;

  background: transparent;

  color: var(--pink-dark);

  font-family: inherit;

  font-weight: 600;

  cursor: pointer;
}


/* =========================
   MODAL
========================= */

.modal {
  display: none;

  position: fixed;

  inset: 0;

  z-index: 500;

  align-items: center;
  justify-content: center;
}

.modal.open,
.modal.active {
  display: flex;
}

.modal-bg {
  position: absolute;

  inset: 0;

  background: rgba(65,52,48,.4);

  backdrop-filter: blur(5px);
}

.modal-box {
  width: min(520px, 90%);

  max-height: 80vh;

  overflow: auto;

  position: relative;
  z-index: 2;

  padding: 35px;

  background: #fffaf7;

  border-radius: 28px;

  box-shadow: 0 25px 80px rgba(0,0,0,.15);
}

.modal-box > span {
  font-size: 10px;

  letter-spacing: 2px;

  color: var(--pink-dark);
}

.modal-box h2 {
  font-family: 'Itim', cursive;

  font-size: 34px;

  font-weight: 400;
}

.modal-content {
  padding: 24px;

  border-radius: 18px;

  background: #fff5f2;

  text-align: center;

  line-height: 2.2;
}

.close-modal {
  position: absolute;

  right: 18px;
  top: 10px;

  border: 0;

  background: transparent;

  color: var(--muted);

  font-size: 30px;

  cursor: pointer;
}


/* =========================
   RELAX
========================= */

.player {
  padding: 25px;

  border-radius: 28px;

  background: var(--green-light);

  display: flex;
  align-items: center;

  gap: 22px;
}

.sound-image {
  width: 90px;
  height: 90px;

  border-radius: 20px;

  background: white;

  display: grid;
  place-items: center;

  font-size: 42px;
}

.sound-info {
  flex: 1;
}

.sound-info h3 {
  margin: 2px 0;

  font-family: 'Itim', cursive;

  font-size: 27px;

  font-weight: 400;
}

.sound-info p {
  margin: 0;

  color: var(--muted);

  font-size: 12px;
}

.play-button {
  width: 60px;
  height: 60px;

  border: 0;

  border-radius: 50%;

  background: var(--pink-dark);

  color: white;

  font-size: 20px;

  cursor: pointer;
}

.sound-buttons {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 15px;
}

.sound-button {
  padding: 10px 18px;

  border: 1px solid var(--line);

  border-radius: 999px;

  background: white;

  color: var(--muted);

  font-family: inherit;

  cursor: pointer;
}

.sound-button.active {
  border-color: var(--pink);

  color: var(--pink-dark);

  background: #fff5f6;
}


/* =========================
   GOOD DEED
========================= */

.good-deed {
  max-width: 1040px;

  margin: 40px auto 100px;

  padding: 38px 45px;

  border-radius: 30px;

  background: #e9f1eb;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;
}

.good-deed h2 {
  margin: 3px 0;

  font-family: 'Itim', cursive;

  font-size: 32px;

  font-weight: 400;
}

.good-deed p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
}


/* =========================
   FOOTER
========================= */

footer {
  padding: 45px 20px 60px;

  border-top: 1px solid var(--line);

  text-align: center;

  color: var(--muted);

  font-size: 13px;
}

footer div {
  font-size: 30px;
}

footer p {
  margin: 5px;
}

footer small {
  font-size: 10px;
}


/* =========================
   TOAST
========================= */

.toast {
  position: fixed;

  left: 50%;
  bottom: 25px;

  transform: translate(-50%, 20px);

  padding: 11px 20px;

  border-radius: 999px;

  background: #514b4a;

  color: white;

  font-size: 13px;

  opacity: 0;

  pointer-events: none;

  transition: .25s;

  z-index: 999;
}

.toast.show {
  opacity: 1;

  transform: translate(-50%, 0);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 760px) {

  .header {
    height: 65px;

    padding: 0 5%;
  }

  .nav {
    display: none;
  }

  .nav.mobile-open {
    display: flex;

    position: absolute;

    top: 65px;
    left: 0;
    right: 0;

    padding: 18px 5%;

    background: var(--cream);

    flex-direction: column;

    gap: 10px;

    border-bottom: 1px solid var(--line);
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    min-height: 560px;

    padding: 55px 7%;

    text-align: center;
  }

  .hero h1 {
    font-size: 57px;
  }

  .hero p {
    font-size: 13px;
  }

  .hero-lotus {
    font-size: 150px;

    right: -15px;

    top: 42%;
  }

  .daily-wrap {
    padding: 0 5%;

    margin-top: -35px;
  }

  .daily-card {
    padding: 23px;

    display: block;

    text-align: center;
  }

  .daily-card .soft-button {
    margin-top: 15px;
  }

  .home-menu {
    padding: 45px 5% 10px;
  }

  .menu-grid {
    gap: 12px;
  }

  .menu-card {
    padding: 18px 12px;

    display: block;

    text-align: center;
  }

  .menu-icon {
    width: 52px;
    height: 52px;

    margin: 0 auto 8px;

    font-size: 26px;
  }

  .menu-card h3 {
    font-size: 21px;
  }

  .relax-card {
    padding: 18px;

    display: block;

    text-align: center;
  }

  .relax-left {
    justify-content: center;
  }

  .relax-sounds {
    margin-top: 8px;

    font-size: 10px;
  }

  .section {
    padding: 75px 5% 45px;
  }

  .section-title h2 {
    font-size: 40px;
  }

  .meditation-box {
    padding: 35px 20px;

    display: block;
  }

  .breathing-circle {
    width: 210px;
    height: 210px;

    margin: 0 auto 30px;
  }

  .timer-area {
    width: 100%;
  }

  .chant-grid {
    grid-template-columns: 1fr;
  }

  .mala-box {
    padding: 35px 15px;
  }

  .player {
    padding: 18px;

    gap: 13px;
  }

  .sound-image {
    width: 65px;
    height: 65px;

    font-size: 30px;
  }

  .sound-info h3 {
    font-size: 21px;
  }

  .sound-info p {
    display: none;
  }

  .play-button {
    width: 50px;
    height: 50px;
  }

  .good-deed {
    margin: 25px 5% 70px;

    padding: 28px 23px;

    display: block;

    text-align: center;
  }

  .good-deed .main-button {
    margin-top: 18px;
  }

}
/* =========================
   GOOD DEED MODAL
========================= */

.deed-modal {
  display: none;

  position: fixed;
  inset: 0;

  z-index: 600;

  align-items: center;
  justify-content: center;
}

.deed-modal.open,
.deed-modal.active {
  display: flex;
}

.deed-modal-bg {
  position: absolute;
  inset: 0;

  background: rgba(65, 52, 48, .38);

  backdrop-filter: blur(6px);
}

.deed-modal-card {
  position: relative;
  z-index: 2;

  width: min(500px, 90%);

  padding: 38px 35px;

  background: #fffaf7;

  border-radius: 30px;

  box-shadow:
    0 25px 80px rgba(0,0,0,.15);

  text-align: center;

  animation: deedPop .25s ease;
}

@keyframes deedPop {

  from {
    opacity: 0;
    transform: translateY(15px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

}

.deed-close {
  position: absolute;

  top: 12px;
  right: 18px;

  border: 0;

  background: transparent;

  color: var(--muted);

  font-size: 28px;

  cursor: pointer;
}

.deed-flower {
  font-size: 42px;

  margin-bottom: 5px;
}

.deed-label {
  font-size: 10px;

  letter-spacing: 2px;

  color: var(--pink-dark);

  font-weight: 700;
}

.deed-modal-card h2 {
  margin: 5px 0;

  font-family: 'Itim', cursive;

  font-size: 31px;

  font-weight: 400;
}

.deed-modal-card p {
  margin: 0 0 20px;

  color: var(--muted);

  font-size: 13px;
}

.deed-modal-card textarea {
  width: 100%;

  min-height: 130px;

  padding: 16px;

  resize: vertical;

  border: 1px solid var(--line);

  border-radius: 18px;

  background: #fff;

  color: var(--text);

  font-family: inherit;

  font-size: 14px;

  outline: none;
}

.deed-modal-card textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(233,166,182,.12);
}

.deed-modal-card textarea::placeholder {
  color: #b8aeaa;
}

.deed-save {
  margin-top: 15px;

  width: 100%;
}

.saved-deed {
  display: none;

  margin-top: 18px;

  padding: 15px;

  border-radius: 16px;

  background: #eaf2ec;

  color: var(--text);

  font-size: 13px;

  line-height: 1.7;
}

.saved-deed.show {
  display: block;
}
/* =========================================
   WORLD GOOD DEEDS NOTE
========================================= */

.world-deed-note-wrap {
  display: flex;
  justify-content: center;
  margin: 18px auto 28px;
}

.world-deed-note {
  position: relative;
  width: 145px;
  min-height: 125px;
  padding: 22px 14px 14px;

  border: none;
  border-radius: 6px;

  background: #fff4a8;
  color: #5d4b32;

  box-shadow:
    0 5px 12px rgba(93, 74, 45, 0.12),
    2px 8px 18px rgba(93, 74, 45, 0.08);

  transform: rotate(-2deg);
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.world-deed-note:hover {
  transform: rotate(1deg) translateY(-3px);

  box-shadow:
    0 8px 18px rgba(93, 74, 45, 0.16);
}

.note-pin {
  position: absolute;
  top: -8px;
  font-size: 17px;
}

.note-icon {
  font-size: 28px;
  margin-bottom: 5px;
}

.world-deed-note strong {
  font-family: "Itim", cursive;
  font-size: 18px;
  font-weight: 500;
}

.world-deed-note small {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
}

.note-arrow {
  position: absolute;
  right: 9px;
  bottom: 7px;
  font-size: 14px;
  opacity: 0.5;
}


/* =========================================
   WORLD GOOD DEEDS POPUP
========================================= */

.world-deed-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.world-deed-modal.active {
  display: flex;
}

.world-deed-overlay {
  position: absolute;
  inset: 0;

  background: rgba(65, 52, 42, 0.28);
  backdrop-filter: blur(4px);
}

.world-deed-card {
  position: relative;
  z-index: 2;

  width: min(92vw, 560px);
  max-height: 88vh;

  overflow-y: auto;

  background: #fffdf7;
  border-radius: 28px;

  padding: 32px 24px 24px;

  box-shadow:
    0 20px 60px rgba(70, 55, 40, 0.18);

  animation: worldDeedAppear 0.3s ease;
}

@keyframes worldDeedAppear {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.world-deed-close {
  position: absolute;
  top: 14px;
  right: 17px;

  width: 34px;
  height: 34px;

  border: none;
  border-radius: 50%;

  background: #f7eee7;
  color: #765d4c;

  font-size: 23px;
  line-height: 1;

  cursor: pointer;
}

.world-deed-header {
  text-align: center;
  margin-bottom: 24px;
}

.world-deed-flower {
  font-size: 34px;
  margin-bottom: 5px;
}

.world-deed-header > span {
  display: block;

  font-size: 10px;
  letter-spacing: 2px;

  color: #9b8a78;
}

.world-deed-header h2 {
  margin: 6px 0 5px;

  font-family: "Itim", cursive;
  font-size: 27px;
  font-weight: 500;

  color: #5d4b40;
}

.world-deed-header p {
  margin: 0;

  font-size: 13px;
  line-height: 1.7;

  color: #99887b;
}


/* DEED CARDS */

.deed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deed-card {
  padding: 16px 17px;

  background: #f8f2e9;
  border-radius: 17px;

  border: 1px solid rgba(130, 110, 90, 0.08);
}

.deed-card:nth-child(2) {
  background: #f1f5e9;
}

.deed-card:nth-child(3) {
  background: #f8eeee;
}

.deed-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 7px;

  font-size: 12px;
  color: #7e6d60;
}

.deed-card-top small {
  color: #aaa098;
}

.deed-card p {
  margin: 0;

  font-size: 14px;
  line-height: 1.65;

  color: #5f5148;
}


/* WRITE BUTTON */

.write-deed-button {
  width: 100%;

  margin-top: 18px;
  padding: 13px 18px;

  border: none;
  border-radius: 18px;

  background: #dce8d2;
  color: #53634a;

  font-family: inherit;
  font-size: 14px;

  cursor: pointer;

  transition: 0.2s ease;
}

.write-deed-button:hover {
  background: #d1e1c5;
  transform: translateY(-1px);
}


/* MOBILE */

@media (max-width: 600px) {

  .world-deed-note {
    width: 135px;
    min-height: 115px;
  }

  .world-deed-card {
    padding: 28px 18px 20px;
    border-radius: 24px;
  }

  .world-deed-header h2 {
    font-size: 24px;
  }

}

/* =========================================================
   MALA — CIRCULAR 108 BEADS
========================================================= */

.mala-box {
  padding: 42px 24px 32px;
  overflow: hidden;
}

.mala-ring-wrap {
  position: relative;
  width: min(430px, 86vw);
  aspect-ratio: 1;
  margin: 8px auto 12px;
  display: grid;
  place-items: center;
}

.mala-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.mala-ring::before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 1px solid rgba(116, 79, 45, 0.10);
  border-radius: 50%;
}

.mala-bead {
  --bead-size: clamp(8px, 2.5vw, 12px);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--bead-size);
  height: var(--bead-size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #f0bd72 0 12%, transparent 25%),
    radial-gradient(circle at 65% 65%, #6f3519 0 18%, transparent 52%),
    linear-gradient(135deg, #9a5525, #4d2514 68%, #2f170d);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.35),
    inset -1px -1px 2px rgba(35,15,5,.45),
    0 2px 4px rgba(65,35,15,.22);
  transform:
    translate(-50%, -50%)
    rotate(var(--bead-angle))
    translateY(calc(-1 * min(42vw, 200px)))
    rotate(calc(-1 * var(--bead-angle)));
  transition: .18s ease;
  pointer-events: none;
}

.mala-bead.counted {
  filter: brightness(.68) saturate(.85);
  opacity: .70;
}

.mala-bead.next {
  opacity: .9;
}

.mala-bead.current {
  width: clamp(11px, 3vw, 16px);
  height: clamp(11px, 3vw, 16px);
  filter: brightness(1.12) saturate(1.15);
  box-shadow:
    0 0 0 4px rgba(210, 157, 116, .20),
    0 0 12px rgba(205, 137, 96, .55),
    inset 1px 1px 2px rgba(255,255,255,.40),
    inset -1px -1px 2px rgba(35,15,5,.45);
}

.mala-center-button {
  position: relative;
  z-index: 5;
  width: clamp(128px, 34vw, 158px);
  height: clamp(128px, 34vw, 158px);
  border: 1px solid rgba(178, 136, 112, .25);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, #fffdf9 0 8%, transparent 34%),
    linear-gradient(145deg, #fffaf4, #f7e7dd);
  color: #73564b;
  box-shadow:
    0 10px 28px rgba(109, 73, 53, .13),
    inset 0 1px 0 rgba(255,255,255,.85);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mala-center-button:hover {
  transform: scale(1.025);
  box-shadow:
    0 12px 30px rgba(109, 73, 53, .16),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.mala-center-button:active,
.mala-center-button.mala-tap {
  transform: scale(.94);
}

.mala-center-lotus {
  font-size: 25px;
  line-height: 1;
}

.mala-center-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}

.mala-center-count strong {
  font-size: 31px;
  font-weight: 700;
  color: #664b40;
}

.mala-center-count small {
  font-size: 12px;
  color: #a18a7d;
}

.mala-center-label {
  font-size: 12px;
  color: #8e7468;
}

.mala-message {
  margin: 4px auto 18px;
}

@media (max-width: 600px) {
  .mala-box {
    padding: 30px 10px 24px;
  }

  .mala-ring-wrap {
    width: min(350px, 92vw);
  }

  .mala-bead {
    transform:
      translate(-50%, -50%)
      rotate(var(--bead-angle))
      translateY(calc(-1 * min(46vw, 161px)))
      rotate(calc(-1 * var(--bead-angle)));
  }

  .mala-center-button {
    width: 126px;
    height: 126px;
  }

  .mala-center-count strong {
    font-size: 28px;
  }
}
/* =========================================================
   MALA COUNTER — 108 BEADS CIRCLE
========================================================= */

.mala-box {
  position: relative;
  padding: 35px 30px 40px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 35px;
  box-shadow: var(--shadow);
  overflow: hidden;
}


/* จำนวน 0 / 108 */

.mala-counter-number {
  position: relative;
  z-index: 20;

  display: flex;
  align-items: baseline;
  justify-content: center;

  gap: 5px;

  margin-bottom: 18px;
}

.mala-counter-number strong {
  font-size: 38px;
  font-weight: 500;
}

.mala-counter-number span {
  color: var(--muted);
  font-size: 16px;
}


/* วงลูกประคำ */

.mala-circle {
  position: relative;

  width: 360px;
  height: 360px;

  max-width: 90vw;
  max-height: 90vw;

  margin: 0 auto 18px;

  border-radius: 50%;
}


/* container ของลูกประคำ */

.mala-string {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  border-radius: 50%;
}


/* ลูกประคำแต่ละเม็ด */

.mala-bead {
  position: absolute;

  width: 10px;
  height: 10px;

  margin-left: -5px;
  margin-top: -5px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle at 30% 25%,
      #f2bd78 0 12%,
      transparent 25%
    ),
    linear-gradient(
      135deg,
      #a35b2a,
      #6f3519 55%,
      #3d1d0e
    );

  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.45),
    inset -1px -1px 2px rgba(40,15,5,.45),
    0 2px 4px rgba(70,35,15,.25);

  transition:
    transform .18s ease,
    opacity .18s ease,
    filter .18s ease;

  z-index: 2;
}


/* ลูกที่นับแล้ว */

.mala-bead.counted {
  opacity: .45;
  filter: brightness(.75);
}


/* ลูกปัจจุบัน */

.mala-bead.current {
  width: 15px;
  height: 15px;

  margin-left: -7.5px;
  margin-top: -7.5px;

  filter: brightness(1.15);

  box-shadow:
    0 0 0 4px rgba(201,127,149,.18),
    0 0 14px rgba(201,127,149,.45),
    inset 1px 1px 2px rgba(255,255,255,.45);
}


/* ลูกถัดไป */

.mala-bead.next {
  opacity: .85;
}


/* ปุ่มตรงกลาง */

.mala-center-button {
  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  width: 125px;
  height: 125px;

  border: 0;
  border-radius: 50%;

  background:
    radial-gradient(
      circle at 35% 30%,
      #fffaf7,
      #f9e5e8
    );

  color: var(--pink-dark);

  font-family: inherit;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 5px;

  cursor: pointer;

  box-shadow:
    0 10px 30px rgba(201,127,149,.16),
    inset 0 0 0 1px rgba(255,255,255,.8);

  z-index: 10;

  transition:
    transform .15s ease,
    box-shadow .15s ease;
}


.mala-center-button:hover {
  box-shadow:
    0 14px 35px rgba(201,127,149,.23),
    inset 0 0 0 1px rgba(255,255,255,.9);
}


.mala-center-button:active {
  transform:
    translate(-50%, -50%)
    scale(.94);
}


.mala-center-icon {
  font-size: 25px;
}


/* กดแล้วเด้งนิด ๆ */

.mala-center-button.mala-tap {
  animation: malaTap .25s ease;
}


@keyframes malaTap {

  0% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(.91);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }

}


/* ข้อความ */

.mala-message {
  min-height: 28px;

  margin: 5px 0 15px;

  color: var(--pink-dark);

  font-size: 13px;
}


/* ปุ่มล่าง */

.mala-buttons {
  position: relative;
  z-index: 20;

  display: flex;

  justify-content: center;

  gap: 10px;
}


/* มือถือ */

@media (max-width: 600px) {

  .mala-box {
    padding:
      30px
      12px
      35px;
  }


  .mala-circle {
    width: min(310px, 88vw);
    height: min(310px, 88vw);
  }


  .mala-bead {
    width: 8px;
    height: 8px;

    margin-left: -4px;
    margin-top: -4px;
  }


  .mala-bead.current {
    width: 13px;
    height: 13px;

    margin-left: -6.5px;
    margin-top: -6.5px;
  }


  .mala-center-button {
    width: 105px;
    height: 105px;
  }


  .mala-center-icon {
    font-size: 21px;
  }

}
/
/* =========================================================
   MALA FINAL
========================================================= */

.mala-box {
  position: relative;
  overflow: hidden;
  padding: 40px 25px 35px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 35px;
  box-shadow: var(--shadow);
}

.mala-circle {
  position: relative;
  width: 360px;
  height: 360px;
  max-width: 88vw;
  max-height: 88vw;
  margin: 10px auto 15px;
  border-radius: 50%;
}

.mala-string {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none !important;
}


/* ลูกประคำ */
.mala-bead {
  position: absolute !important;

  width: 10px !important;
  height: 10px !important;

  margin-left: -5px !important;
  margin-top: -5px !important;

  transform: none !important;

  border-radius: 50%;

  background:
    radial-gradient(circle at 30% 25%, #fffdfd 0 10%, transparent 28%),
    linear-gradient(145deg, #ffd9e5 0%, #f5b8cf 48%, #d997b7 100%);

  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.8),
    inset -1px -1px 2px rgba(176,105,137,.22),
    0 2px 5px rgba(205,137,165,.22);

  z-index: 2;
}


/* เม็ดที่นับแล้ว */
.mala-bead.counted {
  opacity: .45;
  filter: brightness(.75);
}


/* เม็ดปัจจุบัน */
.mala-bead.current {
  width: 14px !important;
  height: 14px !important;

  margin-left: -7px !important;
  margin-top: -7px !important;

  box-shadow:
    0 0 0 4px rgba(255, 194, 216, .28),
    0 0 14px rgba(242, 145, 183, .58),
    inset 1px 1px 2px rgba(255,255,255,.75);
}


/* ปุ่มดาวตรงกลาง */
.mala-center-button {
  position: absolute !important;

  left: 50% !important;
  top: 50% !important;

  transform: translate(-50%, -50%) !important;

  width: 125px !important;
  height: 125px !important;

  margin: 0 !important;

  border: 0;
  border-radius: 50%;

  background:
    radial-gradient(circle at 35% 25%, #ffffff 0 8%, transparent 35%),
    linear-gradient(145deg, #fff8fb, #fce6ef);

  color: #9b6178;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 5px;

  cursor: pointer;

  z-index: 10;

  box-shadow:
    0 10px 30px rgba(201,127,149,.16),
    inset 0 0 0 1px rgba(255,255,255,.8);
}

.mala-center-icon {
  font-size: 27px;
}


/* ตอนกด */
.mala-center-button:active {
  transform:
    translate(-50%, -50%)
    scale(.94) !important;
}


/* ปุ่มล่าง */
.mala-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}


/* มือถือ */
@media (max-width: 600px) {

  .mala-box {
    padding: 30px 12px 35px;
  }

  .mala-circle {
    width: min(320px, 88vw);
    height: min(320px, 88vw);
  }

  .mala-bead {
    width: 8px !important;
    height: 8px !important;

    margin-left: -4px !important;
    margin-top: -4px !important;
  }

  .mala-bead.current {
    width: 12px !important;
    height: 12px !important;

    margin-left: -6px !important;
    margin-top: -6px !important;
  }

  .mala-center-button {
    width: 105px !important;
    height: 105px !important;
  }

}
/* =========================
   HERO CHARACTER
========================= */

.hero-character {
  position: absolute;
  right: 8%;
  bottom: 35px;
  width: clamp(190px, 25vw, 330px);
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 12px 18px rgba(120, 80, 50, 0.12));
  transition: transform 0.25s ease;
}

.hero-character:hover {
  transform: translateY(-5px);
}

/* มือถือ */
@media (max-width: 760px) {
  .hero-character {
    width: 180px;
    right: 50%;
    bottom: 15px;
    transform: translateX(50%);
  }

  .hero-character:hover {
    transform: translateX(50%) translateY(-4px);
  }
}
/* =========================
   LOTUS PETAL RAIN
========================= */

.hero {
  position: relative;
  overflow: hidden;
}

.lotus-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.lotus-rain span {
  position: absolute;
  top: -40px;
  left: 0;

  font-size: 18px;
  opacity: 0.7;

  animation-name: lotusFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;

  filter: drop-shadow(0 3px 4px rgba(120, 80, 50, 0.08));
}

/* ตำแหน่ง + ความเร็วแต่ละกลีบ */

.lotus-rain span:nth-child(1) {
  left: 5%;
  animation-duration: 7s;
  animation-delay: 0s;
}

.lotus-rain span:nth-child(2) {
  left: 13%;
  animation-duration: 9s;
  animation-delay: 2s;
  font-size: 14px;
}

.lotus-rain span:nth-child(3) {
  left: 22%;
  animation-duration: 8s;
  animation-delay: 4s;
  font-size: 20px;
}

.lotus-rain span:nth-child(4) {
  left: 31%;
  animation-duration: 10s;
  animation-delay: 1s;
  font-size: 15px;
}

.lotus-rain span:nth-child(5) {
  left: 40%;
  animation-duration: 7.5s;
  animation-delay: 3s;
}

.lotus-rain span:nth-child(6) {
  left: 50%;
  animation-duration: 9.5s;
  animation-delay: 5s;
  font-size: 15px;
}

.lotus-rain span:nth-child(7) {
  left: 59%;
  animation-duration: 8.5s;
  animation-delay: 1.5s;
  font-size: 21px;
}

.lotus-rain span:nth-child(8) {
  left: 68%;
  animation-duration: 11s;
  animation-delay: 4s;
  font-size: 14px;
}

.lotus-rain span:nth-child(9) {
  left: 76%;
  animation-duration: 8s;
  animation-delay: 2.5s;
}

.lotus-rain span:nth-child(10) {
  left: 84%;
  animation-duration: 10s;
  animation-delay: 5.5s;
  font-size: 16px;
}

.lotus-rain span:nth-child(11) {
  left: 91%;
  animation-duration: 7s;
  animation-delay: 3.5s;
  font-size: 20px;
}

.lotus-rain span:nth-child(12) {
  left: 97%;
  animation-duration: 9s;
  animation-delay: 6s;
  font-size: 14px;
}

@keyframes lotusFall {
  0% {
    transform: translate3d(0, -40px, 0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  50% {
    transform: translate3d(35px, 50vh, 0) rotate(180deg);
  }

  90% {
    opacity: 0.7;
  }

  100% {
    transform: translate3d(-25px, 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

/* ให้ตัวละครอยู่ด้านหน้าฝนกลีบบัว */

.hero-character {
  z-index: 3;
}

/* มือถือ */

@media (max-width: 760px) {
  .lotus-rain span {
    font-size: 15px;
  }

  .lotus-rain span:nth-child(even) {
    font-size: 12px;
  }
}

/* คนที่เปิด Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .lotus-rain span {
    animation: none;
    opacity: 0.45;
  }
}
