.ptk-prayers-page{
  position:relative;
  isolation:isolate;
  margin:0 auto;
  padding:24px 0 42px;
  color:#f7ecd2;
  --ptk-gold:#d7b45a;
  --ptk-gold-soft:#f3d27b;
  --ptk-dark:#090704;
  --ptk-card:rgba(13,11,8,.80);
  --ptk-line:rgba(215,180,90,.24);
}
.ptk-prayers-page *{box-sizing:border-box}
.ptk-prayers-inner{width:min(1160px,calc(100% - 28px));margin:auto}
.ptk-prayers-hero{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:26px;
  border:1px solid rgba(215,180,90,.32);
  border-radius:26px;
  background:
    radial-gradient(circle at top left,rgba(243,210,123,.14),transparent 34%),
    linear-gradient(135deg,rgba(22,17,9,.90),rgba(8,7,5,.78));
  box-shadow:0 22px 55px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(10px);
}
.ptk-prayers-kicker{display:inline-flex;margin-bottom:8px;color:var(--ptk-gold-soft);font-size:12px;letter-spacing:.14em;text-transform:uppercase}
.ptk-prayers-hero h1{margin:0 0 8px;font-size:clamp(28px,4vw,46px);line-height:1.08;color:#fff4d5;text-shadow:0 2px 18px rgba(243,210,123,.12)}
.ptk-prayers-hero p{margin:0;color:#dccda8;font-size:16px;line-height:1.75}
.ptk-prayers-stats{min-width:134px;text-align:center;padding:17px;border:1px solid rgba(243,210,123,.28);border-radius:20px;background:rgba(255,255,255,.055);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.ptk-prayers-stats strong{display:block;font-size:34px;color:var(--ptk-gold-soft);line-height:1}
.ptk-prayers-stats span{display:block;margin-top:6px;font-size:13px;color:#d9c79d}
.ptk-prayers-search{display:grid;grid-template-columns:1fr 210px 160px auto;gap:10px;margin:18px 0}
.ptk-prayers-search input,.ptk-prayers-search select,.ptk-prayers-search button{height:46px;border-radius:15px;border:1px solid rgba(215,180,90,.28);background:rgba(12,10,7,.86);color:#fff4d5;padding:0 14px;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.ptk-prayers-search input:focus,.ptk-prayers-search select:focus{border-color:rgba(243,210,123,.70);box-shadow:0 0 0 3px rgba(243,210,123,.13)}
.ptk-prayers-search button{cursor:pointer;background:linear-gradient(135deg,#b98d2f,#f3d27b);color:#120d05;font-weight:800;border-color:rgba(255,230,150,.50);transition:.18s ease}
.ptk-prayers-search button:hover{transform:translateY(-1px);filter:brightness(1.06)}
.ptk-prayers-cats{display:flex;gap:10px;overflow:auto;padding:2px 0 16px;scrollbar-width:thin}
.ptk-prayers-cats a{flex:0 0 auto;text-decoration:none;color:#ead9aa;border:1px solid rgba(215,180,90,.24);background:rgba(255,255,255,.055);border-radius:999px;padding:9px 14px;transition:.18s ease;box-shadow:0 10px 22px rgba(0,0,0,.12)}
.ptk-prayers-cats a:hover,.ptk-prayers-cats a.is-active{border-color:var(--ptk-gold-soft);background:rgba(243,210,123,.14);color:#fff4d5}
.ptk-prayers-cats span{display:inline-flex;margin-left:6px;color:var(--ptk-gold-soft)}
.ptk-prayers-page-info{margin:0 0 14px;color:#d9c79d;font-size:13px;text-align:right}
.ptk-prayers-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.ptk-prayer-card{position:relative;border:1px solid var(--ptk-line);border-radius:22px;background:var(--ptk-card);overflow:hidden;box-shadow:0 14px 32px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.ptk-prayer-card:hover{border-color:rgba(243,210,123,.42);box-shadow:0 18px 40px rgba(0,0,0,.28),0 0 0 1px rgba(243,210,123,.05)}
.ptk-prayer-card.is-open{border-color:rgba(243,210,123,.72);box-shadow:0 18px 48px rgba(0,0,0,.34),0 0 0 1px rgba(243,210,123,.11)}
.ptk-prayer-toggle{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:5px 12px;align-items:center;text-align:left;padding:17px 18px;border:0;background:transparent;color:inherit;cursor:pointer}
.ptk-prayer-toggle:after{content:'เปิด';grid-column:3;grid-row:1/3;align-self:center;display:inline-flex;align-items:center;justify-content:center;min-width:54px;height:30px;border-radius:999px;border:1px solid rgba(243,210,123,.25);color:#f3d27b;background:rgba(243,210,123,.08);font-size:12px;font-weight:700}
.ptk-prayer-card.is-open .ptk-prayer-toggle:after{content:'ปิด';background:rgba(243,210,123,.17);border-color:rgba(243,210,123,.55);color:#fff4d5}
.ptk-prayer-toggle strong{font-size:17px;color:#fff4d5;line-height:1.45}
.ptk-prayer-toggle em{grid-column:2;color:#bfae83;font-style:normal;font-size:13px;line-height:1.4}
.ptk-prayer-type{grid-row:1/3;align-self:start;display:inline-flex;border:1px solid rgba(243,210,123,.30);border-radius:999px;padding:5px 9px;color:#f3d27b;background:rgba(243,210,123,.09);font-size:12px;white-space:nowrap}
.ptk-prayer-body{display:none;padding:0 18px 18px;color:#e8dcc0}
.ptk-prayer-card.is-open .ptk-prayer-body{display:block;animation:ptkPrayerFade .18s ease both}
@keyframes ptkPrayerFade{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.ptk-prayer-content{margin-top:2px;padding:15px 16px;border-radius:17px;background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.035));border:1px solid rgba(255,255,255,.055);white-space:normal}
.ptk-prayer-body h4{margin:17px 0 7px;color:var(--ptk-gold-soft);font-size:15px}
.ptk-prayer-body p{line-height:1.86;margin:.45em 0;color:#eadfca}
.ptk-prayers-empty{grid-column:1/-1;padding:30px;text-align:center;border:1px dashed rgba(243,210,123,.34);border-radius:20px;color:#d9c79d;background:rgba(13,11,8,.58)}
.ptk-prayers-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:24px 0 4px}
.ptk-prayers-pagination a{min-width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;padding:0 13px;border:1px solid rgba(215,180,90,.30);border-radius:999px;background:rgba(13,11,8,.82);color:#ead9aa;text-decoration:none;box-shadow:0 10px 22px rgba(0,0,0,.16);transition:.18s ease}
.ptk-prayers-pagination a:hover,.ptk-prayers-pagination a.is-active{border-color:var(--ptk-gold-soft);background:rgba(243,210,123,.15);color:#fff4d5;transform:translateY(-1px)}
.ptk-prayers-pagination .ptk-page-prev,.ptk-prayers-pagination .ptk-page-next{font-weight:800;min-width:96px}
body.ptk-prayers-body-bg .ptk-prayers-page{background:transparent}
@media(max-width:800px){.ptk-prayers-hero{display:block}.ptk-prayers-stats{margin-top:16px}.ptk-prayers-search{grid-template-columns:1fr}.ptk-prayers-grid{grid-template-columns:1fr}.ptk-prayers-page-info{text-align:left}.ptk-prayer-toggle{grid-template-columns:auto 1fr}.ptk-prayer-toggle:after{grid-column:2;grid-row:3;justify-self:start;margin-top:4px}.ptk-prayer-toggle em{grid-column:2}}
@media(max-width:480px){.ptk-prayers-page{padding-top:16px}.ptk-prayers-inner{width:min(100% - 20px,1160px)}.ptk-prayers-hero{padding:18px;border-radius:21px}.ptk-prayer-toggle{padding:15px}.ptk-prayer-toggle strong{font-size:16px}.ptk-prayers-pagination{justify-content:flex-start}.ptk-prayers-pagination a{min-width:36px;height:36px;padding:0 11px}.ptk-prayers-pagination .ptk-page-prev,.ptk-prayers-pagination .ptk-page-next{min-width:auto}}

/* =========================================================
   PTK PRAYERS v1.3 - SAFE ADDITIONS
   Search polish + Copy button + Back to top
========================================================= */
.ptk-prayers-search label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.ptk-prayers-search label span{
  color:#d9c79d;
  font-size:12px;
  line-height:1;
  padding-left:4px;
}
.ptk-prayers-search .ptk-prayers-search-main{min-width:0}
.ptk-prayers-search button,
.ptk-prayers-reset{
  align-self:end;
}
.ptk-prayers-reset{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:15px;
  border:1px solid rgba(215,180,90,.25);
  background:rgba(255,255,255,.045);
  color:#ead9aa;
  text-decoration:none;
  white-space:nowrap;
  transition:.18s ease;
}
.ptk-prayers-reset:hover{
  border-color:rgba(243,210,123,.55);
  color:#fff4d5;
  background:rgba(243,210,123,.10);
}
.ptk-prayer-copybar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:2px 0 12px;
}
.ptk-prayer-copy{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(243,210,123,.32);
  background:linear-gradient(135deg,rgba(243,210,123,.13),rgba(255,255,255,.045));
  color:#f3d27b;
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  transition:.18s ease;
}
.ptk-prayer-copy:hover,
.ptk-prayer-copy.is-copied{
  border-color:rgba(243,210,123,.68);
  background:rgba(243,210,123,.18);
  color:#fff4d5;
  transform:translateY(-1px);
}
.ptk-prayer-copy-status{
  min-height:18px;
  color:#f3d27b;
  font-size:12px;
  white-space:nowrap;
}
.ptk-prayer-copy-source{position:relative}
.ptk-prayers-top{
  position:fixed;
  right:18px;
  bottom:22px;
  z-index:40;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(243,210,123,.42);
  background:linear-gradient(135deg,rgba(26,20,9,.96),rgba(10,8,5,.90));
  color:#f3d27b;
  box-shadow:0 14px 34px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:.18s ease;
}
.ptk-prayers-top.is-visible{
  opacity:1;
  pointer-events:auto;
  transform:none;
}
.ptk-prayers-top:hover{
  border-color:#f3d27b;
  color:#fff4d5;
  transform:translateY(-2px);
}
@media(max-width:980px){
  .ptk-prayers-search{grid-template-columns:1fr 1fr;}
  .ptk-prayers-search .ptk-prayers-search-main{grid-column:1/-1;}
}
@media(max-width:800px){
  .ptk-prayers-search{grid-template-columns:1fr;}
  .ptk-prayers-search button,
  .ptk-prayers-reset{align-self:stretch;}
  .ptk-prayer-copybar{align-items:flex-start;flex-direction:column;}
  .ptk-prayers-top{right:14px;bottom:78px;width:42px;height:42px;}
}
.ptk-prayers-search{grid-template-columns:minmax(240px,1fr) 210px 160px auto auto;align-items:end;}
@media(max-width:980px){.ptk-prayers-search{grid-template-columns:1fr 1fr}.ptk-prayers-search .ptk-prayers-search-main{grid-column:1/-1}}
@media(max-width:800px){.ptk-prayers-search{grid-template-columns:1fr}}

/* =========================================================
   PTK PRAYERS v1.5 - SAFE UX FIXES
   Filter alignment + working actions + single reading page
========================================================= */
.ptk-prayers-search{
  display:grid;
  grid-template-columns:minmax(260px,1.35fr) minmax(190px,.85fr) minmax(150px,.65fr) auto auto;
  gap:12px;
  align-items:end;
  padding:14px;
  margin:18px 0;
  border:1px solid rgba(215,180,90,.20);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(13,11,8,.74),rgba(255,255,255,.035));
  box-shadow:0 16px 36px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.045);
}
.ptk-prayers-search label{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:7px;
  min-width:0;
  margin:0;
}
.ptk-prayers-search label span{
  display:block;
  min-height:14px;
  padding-left:5px;
  color:#e4d3aa;
  font-size:12px;
  font-weight:700;
  line-height:1;
  letter-spacing:.02em;
}
.ptk-prayers-search input,
.ptk-prayers-search select,
.ptk-prayers-search button,
.ptk-prayers-reset{
  width:100%;
  min-height:48px;
  height:48px;
  margin:0;
}
.ptk-prayers-search button,
.ptk-prayers-reset{
  min-width:96px;
  align-self:end;
  white-space:nowrap;
}
.ptk-prayers-reset{
  width:auto;
  min-width:112px;
}
.ptk-prayer-copy,
.ptk-prayers-top{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.ptk-prayer-copybar{
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.ptk-prayer-read-single,
.ptk-prayer-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(215,180,90,.26);
  background:rgba(255,255,255,.045);
  color:#ead9aa;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  transition:.18s ease;
}
.ptk-prayer-read-single:hover,
.ptk-prayer-back:hover{
  border-color:rgba(243,210,123,.64);
  background:rgba(243,210,123,.12);
  color:#fff4d5;
  transform:translateY(-1px);
}
.ptk-prayer-single-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:16px 0 14px;
  padding:12px;
  border:1px solid rgba(215,180,90,.18);
  border-radius:20px;
  background:rgba(13,11,8,.64);
  box-shadow:0 14px 30px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.04);
}
.ptk-prayer-single-copy{
  min-height:38px;
}
.ptk-prayer-single-card{
  padding:20px;
  border:1px solid rgba(215,180,90,.28);
  border-radius:24px;
  background:linear-gradient(135deg,rgba(13,11,8,.82),rgba(255,255,255,.04));
  box-shadow:0 18px 46px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.05);
}
.ptk-prayer-single-card h4{
  margin:20px 0 8px;
  color:var(--ptk-gold-soft);
  font-size:16px;
}
.ptk-prayer-single-card p{
  line-height:1.9;
  color:#eadfca;
}
.ptk-prayer-teacher{
  margin:0 0 12px;
  padding:10px 13px;
  border:1px solid rgba(243,210,123,.22);
  border-radius:16px;
  background:rgba(243,210,123,.075);
  color:#f4e7c7;
  line-height:1.7;
}
@media(max-width:1024px){
  .ptk-prayers-search{
    grid-template-columns:1fr 1fr;
  }
  .ptk-prayers-search .ptk-prayers-search-main{
    grid-column:1/-1;
  }
  .ptk-prayers-search button,
  .ptk-prayers-reset{
    width:100%;
  }
}
@media(max-width:640px){
  .ptk-prayers-search{
    grid-template-columns:1fr;
    padding:12px;
    border-radius:19px;
  }
  .ptk-prayers-search label span{
    min-height:auto;
  }
  .ptk-prayer-single-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .ptk-prayer-back,
  .ptk-prayer-single-copy{
    width:100%;
  }
}

/* =========================================================
   PTK PRAYERS v1.6 - Saved Prayers (SAFE MODE ADD-ON)
========================================================= */
.ptk-prayers-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:14px 0 16px;
}
.ptk-prayers-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:9px 14px;
  border:1px solid rgba(215,180,90,.24);
  border-radius:999px;
  background:rgba(13,11,8,.58);
  color:#f3e4bd;
  text-decoration:none;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  transition:.18s ease;
}
.ptk-prayers-tab:hover,
.ptk-prayers-tab.is-active{
  border-color:rgba(243,210,123,.58);
  background:linear-gradient(135deg,rgba(196,154,61,.32),rgba(243,210,123,.10));
  color:#fff4d5;
  transform:translateY(-1px);
}
.ptk-prayers-tab span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:12px;
}
.ptk-prayers-alert{
  margin:12px 0 14px;
  padding:12px 14px;
  border:1px solid rgba(125,209,132,.30);
  border-radius:16px;
  background:rgba(63,143,75,.16);
  color:#dbffdf;
  font-weight:800;
}
.ptk-prayer-save-form{
  display:inline-flex;
  margin:0;
}
.ptk-prayer-save-btn,
.ptk-prayer-remove-saved,
.ptk-prayers-bulkbar button,
.ptk-prayers-login-btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 12px;
  border:1px solid rgba(215,180,90,.30);
  border-radius:999px;
  background:rgba(13,11,8,.68);
  color:#f3e4bd;
  text-decoration:none;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  transition:.18s ease;
}
.ptk-prayer-save-btn:hover,
.ptk-prayer-remove-saved:hover,
.ptk-prayers-bulkbar button:hover,
.ptk-prayers-login-btn:hover{
  border-color:rgba(243,210,123,.65);
  background:rgba(243,210,123,.13);
  color:#fff4d5;
  transform:translateY(-1px);
}
.ptk-prayer-save-btn.is-saved{
  border-color:rgba(125,209,132,.36);
  background:rgba(63,143,75,.20);
  color:#dcffe1;
}
.ptk-prayer-save-single{
  min-height:38px;
}
.ptk-prayers-login-box{
  padding:20px;
  border:1px solid rgba(215,180,90,.24);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(13,11,8,.78),rgba(255,255,255,.04));
  box-shadow:0 18px 44px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
}
.ptk-prayers-login-box h2{
  margin:0 0 8px;
  color:#fff0c9;
  font-size:22px;
}
.ptk-prayers-login-box p{
  margin:0 0 14px;
  color:#d7c9aa;
}
.ptk-prayers-bulkbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin:0 0 14px;
  padding:12px;
  border:1px solid rgba(215,180,90,.18);
  border-radius:18px;
  background:rgba(13,11,8,.58);
}
.ptk-prayers-bulkbar label,
.ptk-prayer-select{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#eadfca;
  font-weight:800;
}
.ptk-prayer-select{
  margin:12px 12px 0;
  font-size:13px;
}
.ptk-prayer-remove-saved{
  border-color:rgba(255,120,120,.28);
  color:#ffd8d8;
}
.ptk-prayer-remove-saved:hover{
  border-color:rgba(255,120,120,.55);
  background:rgba(255,120,120,.11);
  color:#fff;
}
@media(max-width:640px){
  .ptk-prayers-toolbar,
  .ptk-prayers-bulkbar{
    align-items:stretch;
    flex-direction:column;
  }
  .ptk-prayers-tab,
  .ptk-prayer-save-form,
  .ptk-prayer-save-btn,
  .ptk-prayer-remove-saved,
  .ptk-prayers-bulkbar button,
  .ptk-prayers-login-btn{
    width:100%;
  }
}

/* =========================================================
   PTK PRAYERS v1.7 - Audio listening SAFE ADDITION
========================================================= */
.ptk-prayer-audio-box{
  margin:14px 0 16px;
  padding:15px;
  border:1px solid rgba(243,210,123,.24);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(243,210,123,.105),rgba(255,255,255,.04));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
}
.ptk-prayer-audio-head{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:0 0 12px;
}
.ptk-prayer-audio-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(243,210,123,.32);
  background:rgba(13,11,8,.48);
}
.ptk-prayer-audio-head h4{
  margin:0 0 3px;
  color:#f3d27b;
  font-size:16px;
}
.ptk-prayer-audio-head p{
  margin:0;
  color:#d9c79d;
  font-size:13px;
  line-height:1.55;
}
.ptk-prayer-audio-list{
  display:grid;
  gap:10px;
}
.ptk-prayer-audio-track{
  padding:11px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:15px;
  background:rgba(8,7,5,.42);
}
.ptk-prayer-audio-title{
  margin:0 0 8px;
  color:#fff4d5;
  font-size:13px;
}
.ptk-prayer-audio-track audio{
  display:block;
  width:100%;
  max-width:100%;
  filter:sepia(.12) saturate(.9);
}
.ptk-prayers-single-page .ptk-prayer-audio-box{
  margin-top:18px;
}
@media(max-width:640px){
  .ptk-prayer-audio-box{padding:12px;border-radius:16px}
  .ptk-prayer-audio-head{gap:8px}
}
