.ptk-gold-wrap{--gap:14px;background:var(--ptk-gold-bg,#11100d);color:var(--ptk-gold-text,#fff);border:1px solid rgba(216,170,69,.35);border-radius:22px;padding:18px;box-shadow:0 18px 50px rgba(0,0,0,.18);font-family:inherit;overflow:hidden}.ptk-gold-wrap *{box-sizing:border-box}.ptk-gold-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.ptk-gold-head h2{margin:0;color:var(--ptk-gold-text,#fff);font-size:24px}.ptk-gold-head p{margin:4px 0 0;color:var(--ptk-gold-muted,#d8d1c2)}.ptk-gold-refresh,.ptk-gold-alert-form button{border:0;border-radius:999px;background:linear-gradient(135deg,var(--ptk-gold-accent,#d8aa45),#f6d47b);color:#211706;font-weight:700;padding:10px 16px;cursor:pointer}.ptk-gold-card{background:var(--ptk-gold-card,#1b1711);border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:16px}.ptk-gold-latest-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-bottom:14px;color:var(--ptk-gold-muted,#d8d1c2)}.ptk-gold-latest-line strong{color:var(--ptk-gold-text,#fff)}.ptk-gold-badge{display:inline-flex;border-radius:999px;padding:5px 10px;font-style:normal;font-size:12px;font-weight:700;background:rgba(255,255,255,.08)}.ptk-gold-badge.is-up{color:#fff;background:var(--ptk-gold-up,#13b76b)}.ptk-gold-badge.is-down{color:#fff;background:var(--ptk-gold-down,#e44848)}.ptk-gold-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.ptk-gold-pricebox{border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:14px;background:rgba(255,255,255,.045)}.ptk-gold-pricebox.main{border-color:rgba(216,170,69,.45);background:rgba(216,170,69,.12)}.ptk-gold-pricebox span,.ptk-gold-world span,.ptk-gold-history-row span{display:block;color:var(--ptk-gold-muted,#d8d1c2);font-size:13px}.ptk-gold-pricebox strong{display:block;margin-top:6px;font-size:24px;color:var(--ptk-gold-text,#fff)}.ptk-gold-world{margin-top:12px;border:1px solid rgba(216,170,69,.28);border-radius:16px;padding:12px 14px;background:rgba(216,170,69,.09);display:flex;justify-content:space-between;gap:12px}.ptk-gold-world strong{color:var(--ptk-gold-accent,#d8aa45);font-size:20px}.ptk-gold-section-title{display:flex;justify-content:space-between;gap:10px;align-items:flex-end;margin:18px 0 10px}.ptk-gold-section-title strong{font-size:18px;color:var(--ptk-gold-text,#fff)}.ptk-gold-section-title span{color:var(--ptk-gold-muted,#d8d1c2);font-size:13px}.ptk-gold-history-table{border:1px solid rgba(255,255,255,.08);border-radius:18px;overflow:hidden;background:var(--ptk-gold-card,#1b1711)}.ptk-gold-history-row{display:grid;grid-template-columns:1.1fr 1fr 1fr .75fr;gap:10px;padding:12px 14px;border-top:1px solid rgba(255,255,255,.07);align-items:center}.ptk-gold-history-row.head{border-top:0;background:rgba(255,255,255,.06);font-weight:700;color:var(--ptk-gold-accent,#d8aa45)}.ptk-gold-history-row b{display:inline-block;margin-right:8px;color:var(--ptk-gold-text,#fff)}.ptk-gold-history-row em{display:inline-flex;border-radius:999px;padding:4px 8px;font-style:normal;background:rgba(255,255,255,.08);margin-bottom:4px}.ptk-gold-history-row.is-up em{background:var(--ptk-gold-up,#13b76b);color:#fff}.ptk-gold-history-row.is-down em{background:var(--ptk-gold-down,#e44848);color:#fff}.ptk-gold-chart{margin-top:14px}.ptk-gold-chart-tabs{display:flex;gap:8px;margin-bottom:10px}.ptk-gold-chart-tabs button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:var(--ptk-gold-text,#fff);border-radius:999px;padding:8px 12px;cursor:pointer}.ptk-gold-chart-tabs button.is-active{background:var(--ptk-gold-accent,#d8aa45);color:#211706}.ptk-gold-chart-panel{display:none}.ptk-gold-chart-panel.is-active{display:block}.ptk-gold-chart-svg{border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:12px;background:var(--ptk-gold-card,#1b1711)}.ptk-gold-chart-svg svg{width:100%;height:220px}.ptk-gold-chart-svg line{stroke:rgba(255,255,255,.1)}.ptk-gold-chart-svg polyline{fill:none;stroke:var(--ptk-gold-accent,#d8aa45);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.ptk-gold-chart-svg div{display:flex;justify-content:space-between;color:var(--ptk-gold-muted,#d8d1c2)}.ptk-gold-alert-form{margin-top:16px;border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;background:var(--ptk-gold-card,#1b1711)}.ptk-gold-alert-form div{display:flex;gap:8px;margin-top:10px}.ptk-gold-alert-form input{flex:1;min-width:0;border-radius:999px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.06);color:var(--ptk-gold-text,#fff);padding:11px 14px}.ptk-gold-source-status,.ptk-gold-empty,.ptk-gold-chart-empty,.ptk-gold-empty-card{margin-top:12px;border-radius:14px;padding:12px;background:rgba(255,255,255,.06);color:var(--ptk-gold-muted,#d8d1c2)}.ptk-gold-compact{display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:18px;padding:14px 16px;background:var(--ptk-gold-card,#1b1711);color:var(--ptk-gold-text,#fff);border:1px solid rgba(216,170,69,.35)}.ptk-gold-compact span{display:block;color:var(--ptk-gold-muted,#d8d1c2);font-size:13px}.ptk-gold-compact strong{font-size:22px}@media(max-width:760px){.ptk-gold-head,.ptk-gold-world,.ptk-gold-section-title{display:block}.ptk-gold-refresh{margin-top:10px}.ptk-gold-grid{grid-template-columns:1fr 1fr}.ptk-gold-history-row{grid-template-columns:1fr}.ptk-gold-history-row.head{display:none}.ptk-gold-alert-form{padding:15px}.ptk-gold-alert-form strong{display:block;width:100%;line-height:1.35}.ptk-gold-alert-form div{display:flex;flex-direction:column;gap:10px;width:100%;margin-top:12px}.ptk-gold-alert-form input{display:block;width:100%;max-width:100%;min-height:46px;flex:none}.ptk-gold-alert-form button{display:block;width:100%;max-width:100%;min-height:46px;margin-top:0}.ptk-gold-alert-form p{width:100%;margin:10px 0 0}}

/* v2.0.2: restore top change pill like early versions */
.ptk-gold-change-pill{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;border-radius:999px;padding:8px 14px;font-weight:800;background:rgba(255,255,255,.08);color:var(--ptk-gold-text,#fff);box-shadow:inset 0 0 0 1px rgba(255,255,255,.10)}
.ptk-gold-change-pill span{line-height:1;color:inherit}.ptk-gold-change-pill strong{line-height:1;font-size:18px;color:inherit}.ptk-gold-change-pill.is-up{background:var(--ptk-gold-up,#13b76b);color:#fff}.ptk-gold-change-pill.is-down{background:var(--ptk-gold-down,#e44848);color:#fff}.ptk-gold-change-pill.is-same{background:rgba(255,255,255,.10);color:var(--ptk-gold-muted,#d8d1c2)}


/* v2.0.3: subtle live change animations - frontend only */
@keyframes ptkGoldRisePulse{0%{transform:translateY(0) scale(1);box-shadow:0 0 0 rgba(19,183,107,0)}35%{transform:translateY(-2px) scale(1.015);box-shadow:0 0 24px rgba(19,183,107,.42)}100%{transform:translateY(0) scale(1);box-shadow:0 0 0 rgba(19,183,107,0)}}
@keyframes ptkGoldDropPulse{0%{transform:translateY(0) scale(1);box-shadow:0 0 0 rgba(228,72,72,0)}35%{transform:translateY(2px) scale(1.015);box-shadow:0 0 24px rgba(228,72,72,.42)}100%{transform:translateY(0) scale(1);box-shadow:0 0 0 rgba(228,72,72,0)}}
@keyframes ptkGoldStableGlow{0%{box-shadow:0 0 0 rgba(216,170,69,0)}45%{box-shadow:0 0 18px rgba(216,170,69,.20)}100%{box-shadow:0 0 0 rgba(216,170,69,0)}}
@keyframes ptkGoldNumberFlashUp{0%{color:#fff;transform:scale(1)}35%{color:var(--ptk-gold-up,#13b76b);transform:scale(1.035)}100%{color:var(--ptk-gold-text,#fff);transform:scale(1)}}
@keyframes ptkGoldNumberFlashDown{0%{color:#fff;transform:scale(1)}35%{color:var(--ptk-gold-down,#e44848);transform:scale(1.035)}100%{color:var(--ptk-gold-text,#fff);transform:scale(1)}}
.ptk-gold-card.is-up{animation:ptkGoldRisePulse 1.35s ease-out both;border-color:rgba(19,183,107,.42)}
.ptk-gold-card.is-down{animation:ptkGoldDropPulse 1.35s ease-out both;border-color:rgba(228,72,72,.42)}
.ptk-gold-card.is-same{animation:ptkGoldStableGlow 1.2s ease-out both}
.ptk-gold-card.is-up .ptk-gold-pricebox strong{animation:ptkGoldNumberFlashUp 1.25s ease-out both;display:inline-block}
.ptk-gold-card.is-down .ptk-gold-pricebox strong{animation:ptkGoldNumberFlashDown 1.25s ease-out both;display:inline-block}
.ptk-gold-change-pill.is-up{animation:ptkGoldRisePulse 1.4s ease-out both}
.ptk-gold-change-pill.is-down{animation:ptkGoldDropPulse 1.4s ease-out both}
.ptk-gold-change-pill.is-same{animation:ptkGoldStableGlow 1.1s ease-out both}
@media (prefers-reduced-motion: reduce){.ptk-gold-card,.ptk-gold-card *,.ptk-gold-change-pill{animation:none!important;transition:none!important}}

/* =========================================================
   PTK Gold v2.1.2 - Compare With Previous Day
   แสดง Up/Down เทียบกับวันก่อนหน้า
========================================================= */
.ptk-gold-day-compare{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.055);
  color:var(--ptk-gold-text,#fff);
}
.ptk-gold-day-compare div{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}
.ptk-gold-day-compare span{
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.ptk-gold-day-compare strong{
  font-size:22px;
  font-weight:900;
  line-height:1;
}
.ptk-gold-day-compare p{
  margin:0;
  color:var(--ptk-gold-muted,#d8d1c2);
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.ptk-gold-day-compare small{
  display:none;
}
.ptk-gold-day-compare.is-up{
  border-color:rgba(19,183,107,.42);
  background:rgba(19,183,107,.13);
}
.ptk-gold-day-compare.is-up span,
.ptk-gold-day-compare.is-up strong{
  color:var(--ptk-gold-up,#13b76b);
}
.ptk-gold-day-compare.is-down{
  border-color:rgba(228,72,72,.42);
  background:rgba(228,72,72,.13);
}
.ptk-gold-day-compare.is-down span,
.ptk-gold-day-compare.is-down strong{
  color:var(--ptk-gold-down,#e44848);
}
.ptk-gold-day-compare.is-same span,
.ptk-gold-day-compare.is-same strong{
  color:var(--ptk-gold-muted,#d8d1c2);
}

@media (max-width:480px){
  .ptk-gold-day-compare{
    display:block;
    padding:12px;
  }
  .ptk-gold-day-compare div{
    justify-content:space-between;
    width:100%;
  }
  .ptk-gold-day-compare strong{
    font-size:20px;
  }
  .ptk-gold-day-compare p{
    margin-top:6px;
    white-space:normal;
  }
}

/* =========================================================
   PTK Gold - Small Mobile Price Box Fix
   แก้กล่องราคาทองล้นขอบบนจอมือถือเล็ก
   STANDARD: ต้องมีติดปลั๊กอินทุกเวอร์ชันตั้งแต่ v2.1.9
========================================================= */
@media (max-width: 480px){

  .ptk-gold-wrap{
    padding:12px !important;
    max-width:100%;
    overflow:hidden;
  }

  .ptk-gold-grid{
    grid-template-columns:1fr !important;
    gap:10px !important;
    width:100%;
    max-width:100%;
  }

  .ptk-gold-pricebox{
    width:100%;
    max-width:100%;
    min-width:0;
    padding:12px 10px !important;
    overflow:hidden;
  }

  .ptk-gold-pricebox span{
    display:block;
    font-size:13px;
    line-height:1.35;
    white-space:normal;
  }

  .ptk-gold-pricebox strong{
    display:block;
    max-width:100%;
    font-size:20px !important;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

}

@media (max-width: 360px){

  .ptk-gold-pricebox strong{
    font-size:18px !important;
  }

}

/* =========================================================
   PTK Gold v2.2.3 - Transparent Daily Change Summary
   แสดงขึ้นรวม / ลงรวม / สุทธิวันนี้ แบบโปร่งใส
========================================================= */
.ptk-gold-today-summary{
  margin:0 0 14px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:18px;
  padding:13px;
  background:rgba(255,255,255,.045);
}
.ptk-gold-today-summary__head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-end;
  margin-bottom:10px;
}
.ptk-gold-today-summary__head strong{
  color:var(--ptk-gold-text,#fff);
  font-size:15px;
}
.ptk-gold-today-summary__head span{
  color:var(--ptk-gold-muted,#d8d1c2);
  font-size:12px;
  text-align:right;
}
.ptk-gold-today-summary__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.ptk-gold-today-summary__item{
  min-width:0;
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.055);
  overflow:hidden;
}
.ptk-gold-today-summary__item span{
  display:block;
  color:var(--ptk-gold-muted,#d8d1c2);
  font-size:12px;
  line-height:1.25;
}
.ptk-gold-today-summary__item strong{
  display:block;
  margin-top:5px;
  color:var(--ptk-gold-text,#fff);
  font-size:18px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ptk-gold-today-summary__item.is-up strong{color:var(--ptk-gold-up,#13b76b)}
.ptk-gold-today-summary__item.is-down strong{color:var(--ptk-gold-down,#e44848)}
.ptk-gold-today-summary.is-up .ptk-gold-today-summary__item.is-net strong{color:var(--ptk-gold-up,#13b76b)}
.ptk-gold-today-summary.is-down .ptk-gold-today-summary__item.is-net strong{color:var(--ptk-gold-down,#e44848)}
@media(max-width:480px){
  .ptk-gold-today-summary{padding:11px;border-radius:16px}
  .ptk-gold-today-summary__head{display:block}
  .ptk-gold-today-summary__head span{display:block;margin-top:3px;text-align:left}
  .ptk-gold-today-summary__grid{grid-template-columns:1fr;gap:8px}
  .ptk-gold-today-summary__item{padding:10px 11px}
  .ptk-gold-today-summary__item strong{font-size:17px}
}
