/* ===== sudi. Galeri Tetamu & Photobooth (warna/fon ikut tema reka bentuk: --paper --ink --accent --dark --script --caps) ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 18px/1.55 'Cormorant Garamond', Georgia, serif; min-height: 100vh; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }

.bt-ribbon { background: var(--dark); color: #fff; text-align: center; padding: 8px 14px; font-size: .95rem; }
.bt-ribbon a { color: #fff; font-weight: 700; }

/* ---- Kepala: jalur lukisan reka bentuk + tajuk ---- */
.bt-head { position: relative; text-align: center; }
.bt-art { height: min(40vh, 340px); background-size: cover; background-position: center 30%; }
.bt-art::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: min(40vh, 340px); background: linear-gradient(to bottom, rgba(0,0,0,0) 55%, var(--paper)); }
.bt-title { position: relative; margin: -70px auto 0; max-width: 520px; padding: 22px 20px 6px; background: var(--paper); border-radius: 26px 26px 0 0; }
.bt-eyebrow { font-family: var(--caps); text-transform: uppercase; letter-spacing: .3em; font-size: .78rem; color: var(--accent); }
.bt-title h1 { font-family: var(--script); font-weight: 400; font-size: clamp(2.6rem, 11vw, 3.8rem); line-height: 1.15; margin: 6px 0 2px; }
.bt-title h1 span { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: .45em; color: var(--accent); }
.bt-date { font-family: var(--caps); letter-spacing: .32em; font-size: .9rem; }
.bt-sub { margin: 10px 0 0; font-style: italic; opacity: .8; }

/* ---- Dinding polaroid ---- */
.bt-main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 130px; }
.bt-hint { text-align: center; max-width: 460px; margin: 8px auto 4px; font-size: 1rem; opacity: .85; }
.bt-count { text-align: center; font-family: var(--caps); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; color: var(--accent); margin: 0 0 18px; min-height: 1em; }
.bt-wall { columns: 2; column-gap: 14px; }
@media (min-width: 700px) { .bt-wall { columns: 3; column-gap: 22px; } }
@media (min-width: 1000px) { .bt-wall { columns: 4; } }
.bt-item { break-inside: avoid; margin: 0 0 18px; position: relative; cursor: zoom-in; transform: rotate(-1.6deg); transition: transform .3s;
  box-shadow: 0 10px 22px -14px rgba(0,0,0,.55); background: #fff; }
.bt-item:nth-child(3n+2) { transform: rotate(1.4deg); }
.bt-item:nth-child(3n) { transform: rotate(-.6deg); }
.bt-item:hover { transform: rotate(0) scale(1.02); z-index: 2; }
/* Pita pelekat di atas setiap polaroid */
.bt-item::before { content: ""; position: absolute; top: -9px; left: 50%; width: 74px; height: 20px; margin-left: -37px; z-index: 1;
  background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.12); transform: rotate(-3deg); backdrop-filter: blur(1px); }
.bt-item img { width: 100%; height: auto; }
.bt-item figcaption { background: var(--paper); padding: 8px 10px 10px; font-size: .92rem; line-height: 1.35; }
.bt-item figcaption span { display: block; font-style: italic; }
.bt-item figcaption b { display: block; font-weight: 600; font-size: .85rem; color: var(--accent); margin-top: 2px; }
.bt-new { animation: bt-drop .7s cubic-bezier(.2,.9,.3,1.2); }
@keyframes bt-drop { from { opacity: 0; transform: translateY(-30px) rotate(-8deg) scale(.9); } }
.bt-empty { column-span: all; text-align: center; padding: 40px 10px; opacity: .75; font-style: italic; }

.bt-foot { text-align: center; padding: 34px 0 0; font-size: .95rem; opacity: .85; line-height: 2; }

/* ---- Butang utama (terapung di bawah) ---- */
.bt-cta { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--dark); color: #fff; font: 700 1.05rem 'Cormorant Garamond', Georgia, serif; letter-spacing: .02em;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); white-space: nowrap; }
.bt-cta svg { width: 24px; height: 24px; }
.bt-cta:active { transform: translateX(-50%) scale(.97); }

/* ---- Modal photobooth ---- */
.bt-modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,12,16,.6); display: flex; align-items: flex-end; justify-content: center; }
.bt-modal[hidden] { display: none; }
.bt-sheet { position: relative; width: 100%; max-width: 520px; max-height: 94vh; overflow-y: auto; background: var(--paper); border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .bt-modal { align-items: center; } .bt-sheet { border-radius: 26px; } }
.bt-sheet h2 { font-family: var(--script); font-weight: 400; font-size: 2.4rem; text-align: center; margin: 6px 0 18px; }
.bt-x { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0,0,0,.06); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.bt-big { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; margin-bottom: 12px; border-radius: 18px; cursor: pointer;
  background: var(--dark); color: #fff; font-weight: 700; font-size: 1.1rem; }
.bt-big.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--accent); }
.bt-big span { font-size: 1.4rem; }
.bt-big input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bt-preview { max-width: 300px; margin: 6px auto 14px; box-shadow: 0 12px 26px -14px rgba(0,0,0,.6); }
.bt-preview canvas { width: 100%; height: auto; display: block; }
.bt-label { font-family: var(--caps); text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--accent); text-align: center; margin-bottom: 8px; }
.bt-frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.bt-frame { border: 2px solid transparent; border-radius: 12px; padding: 4px; background: rgba(0,0,0,.03); cursor: pointer; font: 600 .78rem 'Cormorant Garamond', serif; color: var(--ink); }
.bt-frame canvas { width: 100%; height: auto; display: block; border-radius: 6px; margin-bottom: 3px; }
.bt-frame.on { border-color: var(--accent); background: #fff; }
.bt-sheet input[type=text] { width: 100%; margin-bottom: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,.15); background: #fff; font: 500 1rem 'Cormorant Garamond', serif; color: var(--ink); }
.bt-msg { color: #A3352E; min-height: 1em; margin: 0 0 8px; text-align: center; font-size: .95rem; }
.bt-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.bt-btn { padding: 14px; border-radius: 999px; border: 0; cursor: pointer; background: var(--dark); color: #fff; font: 700 1rem 'Cormorant Garamond', serif; }
.bt-btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid rgba(0,0,0,.2); }
.bt-btn[disabled] { opacity: .6; }

/* ---- Lightbox & notifikasi ---- */
.bt-lb { position: fixed; inset: 0; z-index: 60; background: rgba(10,6,8,.9); display: flex; align-items: center; justify-content: center; padding: 20px; }
.bt-lb[hidden] { display: none; }
.bt-lb img { max-height: 88vh; width: auto; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.bt-lb a { position: absolute; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #222; display: grid; place-items: center; text-decoration: none; font-size: 1.4rem; }
.bt-toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -150%); z-index: 70; background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transition: transform .35s; max-width: 92vw; text-align: center; }
.bt-toast.on { transform: translate(-50%, 0); }

/* ---- Bahagian "Galeri Tetamu" dalam kad (guna pemboleh ubah tema kad) ---- */
.gg-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 18px; }
.gg-strip a { display: block; background: #fff; padding: 5px 5px 14px; box-shadow: 0 8px 16px -10px rgba(0,0,0,.5); transform: rotate(-2deg); }
.gg-strip a:nth-child(2n) { transform: rotate(2deg); }
.gg-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gg-note { margin: 0 0 14px; font-style: italic; }
