/* Food-guide theme for personal.html#food -- active only while body.theme-guide
   is set by assets/personal-guide.js. Red guide-book cover, a spinning plate,
   and thermal-paper receipts on a dark wooden table. */

body.theme-guide {
    --gd-red: #c8102e; --gd-red-d: #9c0c23; --gd-cream: #fbf6ec; --gd-ink: #231a14; --gd-sub: #cdb9a4;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,190,120,0.16), rgba(255,190,120,0) 70%),
        repeating-linear-gradient(0deg, #251912 0 3px, #2a1d15 3px 7px, #22170f 7px 9px) fixed #251912;
}
body.theme-guide .gallery-wrap { max-width: 1120px; padding: 0 20px 5rem; }
body.theme-guide .back-bar,
body.theme-guide .hero-title,
body.theme-guide .hero-sub,
body.theme-guide .category-view-header,
body.theme-guide .pcms-admin-only[onclick="openDraftModal()"],
body.theme-guide[data-gd-cat="food"] .gallery-section[data-category="food"] { display: none !important; }

#guideView { display: none; font-family: 'Outfit', 'Mitr', var(--font-body, 'Plus Jakarta Sans', 'Sarabun'), sans-serif; color: var(--gd-cream); }
body.theme-guide #guideView { display: block; }
#guideView button { font: inherit; }
#guideView button:focus-visible, #guideView a:focus-visible { outline: 2px solid #ffd27a; outline-offset: 3px; }

.gd-btn { border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: var(--gd-cream); border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.gd-btn:hover { transform: translateY(-2px); }
.gd-btn.is-red { background: linear-gradient(180deg, #e0243f, var(--gd-red-d)); border-color: #ef4a61; color: #fff; box-shadow: 0 8px 20px rgba(200,16,46,0.35); }
.gd-btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- guide-book cover ---------- */
.gd-cover { position: relative; margin: 22px 0 26px; padding: 36px 24px 28px; text-align: center; border-radius: 6px 18px 18px 6px; overflow: hidden;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.14), rgba(255,255,255,0) 55%), linear-gradient(135deg, #d81b37, var(--gd-red-d));
    box-shadow: inset 14px 0 0 rgba(0,0,0,0.18), inset 16px 0 0 rgba(255,255,255,0.08), 0 20px 44px rgba(0,0,0,0.5); }
.gd-cover::after { content: ''; position: absolute; inset: 10px 10px 10px 26px; border: 1px solid rgba(255,230,200,0.35); border-radius: 4px 12px 12px 4px; pointer-events: none; }
.gd-back { position: absolute; left: 34px; top: 20px; z-index: 1; background: none; border: 0; color: rgba(255,240,225,0.85); cursor: pointer; font-size: .95rem; }
.gd-back span { display: inline-block; font-size: 1.3rem; line-height: 1; margin-right: 3px; transition: transform .25s ease; }
.gd-back:hover span { transform: translateX(-3px); }
.gd-add { position: absolute; right: 22px; top: 16px; z-index: 1; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; background: var(--gd-cream); color: var(--gd-red-d); box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.gd-rosette { display: inline-block; font-size: 2.6rem; line-height: 1; color: #ffe2b0; text-shadow: 0 2px 10px rgba(0,0,0,0.3); animation: gdTurn 18s linear infinite; }
@keyframes gdTurn { to { transform: rotate(360deg); } }
.gd-edition { margin: 6px 0 2px; font-size: .78rem; letter-spacing: .3em; color: rgba(255,232,210,0.85); }
.gd-cover h2 { margin: 0; font-family: 'Cormorant Garamond', 'Trirong', Georgia, serif; font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: .08em; line-height: 1.05; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,0.18); }
.gd-tagline { margin: 6px 0 0; color: rgba(255,238,222,0.92); }
.gd-stats { display: flex; justify-content: center; gap: 20px; margin: 16px 0 0; color: rgba(255,232,210,0.85); font-size: .92rem; }
.gd-stats b { color: #fff; font-size: 1.15rem; margin-right: 2px; }

.gd-sample-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 0 0 22px; padding: 12px 16px; border: 1.5px dashed #ffcf7a; border-radius: 12px; background: rgba(255,207,122,0.08); color: #ffe3b3; font-size: .9rem; text-align: center; }

/* ---------- spinning plate ---------- */
.gd-spin { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; margin: 0 0 30px; padding: 26px 30px; border-radius: 20px;
    background: repeating-linear-gradient(90deg, rgba(200,16,46,0.9) 0 18px, rgba(251,246,236,0.95) 18px 36px), #fff; position: relative; overflow: hidden; }
.gd-spin::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(200,16,46,0.55) 0 18px, rgba(251,246,236,0.0) 18px 36px); pointer-events: none; }
.gd-plate-wrap { position: relative; z-index: 1; width: 260px; height: 260px; padding: 16px; border-radius: 50%; background: #fdfdfb; box-shadow: 0 16px 34px rgba(0,0,0,0.35), inset 0 0 0 6px #f0ebe0; }
.gd-pointer { position: absolute; left: 50%; top: -6px; z-index: 2; transform: translateX(-50%); color: var(--gd-red); font-size: 1.7rem; text-shadow: 0 2px 4px rgba(0,0,0,0.35); }
.gd-plate { position: relative; width: 100%; height: 100%; border-radius: 50%; transform: rotate(var(--spin, 0deg)); transition: transform 3.2s cubic-bezier(.12,.72,.12,1);
    box-shadow: inset 0 0 0 3px rgba(200,16,46,0.25), inset 0 0 22px rgba(0,0,0,0.08); }
.gd-slice { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)); }
.gd-slice i, .gd-slice b { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; }
.gd-slice i { top: -104px; font-style: normal; font-size: 1.5rem; }
.gd-slice b { top: -74px; font-size: .62rem; font-weight: 600; color: #6b4a2e; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
.gd-plate-hub { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 1.6rem; box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
.gd-spin-side { position: relative; z-index: 1; padding: 20px 22px; border-radius: 16px; background: rgba(251,246,236,0.96); color: var(--gd-ink); box-shadow: 0 10px 26px rgba(0,0,0,0.25); }
.gd-kicker { margin: 0; color: var(--gd-red); font-weight: 600; font-size: .9rem; }
.gd-spin-side h3 { margin: 2px 0 4px; font-size: 2rem; line-height: 1.15; }
.gd-spin-sub { margin: 0 0 14px; color: #7a6552; font-size: .92rem; }
.gd-result { margin-top: 14px; min-height: 10px; }
.gd-wait { margin: 0; color: #7a6552; animation: gdPulse 1s ease-in-out infinite; }
@keyframes gdPulse { 50% { opacity: .4; } }
.gd-result-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 1.5px solid #e9dcc6; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; color: var(--gd-ink); animation: gdPop .45s cubic-bezier(.2,.9,.3,1.3); }
.gd-result-card img, .gd-result-card .gd-noimg { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; display: grid; place-items: center; font-size: 1.8rem; background: #f4ece0; }
.gd-result-card small { display: block; color: var(--gd-red); font-weight: 600; font-size: .78rem; }
.gd-result-card b { display: block; font-size: 1.15rem; }
.gd-result-card em { display: block; font-style: normal; color: #7a6552; font-size: .82rem; }
@keyframes gdPop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- filters ---------- */
.gd-filters { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 22px; }
.gd-tabs, .gd-cuisines { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gd-tab, .gd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 500;
    color: var(--gd-cream); background: rgba(255,245,230,0.06); border: 1px solid rgba(255,230,200,0.22); transition: background .15s ease, transform .15s ease, border-color .15s ease; }
.gd-tab:hover, .gd-chip:hover { transform: translateY(-1px); border-color: rgba(255,230,200,0.5); }
.gd-tab i, .gd-chip i { font-style: normal; font-size: .75rem; font-weight: 700; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: rgba(255,230,200,0.14); text-align: center; }
.gd-tab.is-on { background: var(--gd-red); border-color: #ef4a61; color: #fff; }
.gd-tab.is-on i { background: rgba(0,0,0,0.25); }
.gd-chip { font-size: .9rem; padding: 6px 12px; }
.gd-chip.is-on { background: var(--gd-cream); color: var(--gd-ink); border-color: var(--gd-cream); }
.gd-chip.is-on i { background: rgba(0,0,0,0.1); }

/* ---------- receipts ---------- */
.gd-receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 26px 22px; align-items: start; }
.gd-receipt { position: relative; transform: rotate(var(--tilt, 0deg)); transition: transform .3s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 14px 18px rgba(0,0,0,0.45)); }
.gd-receipt:nth-child(3n+1) { --tilt: -1.2deg; } .gd-receipt:nth-child(3n+2) { --tilt: .8deg; } .gd-receipt:nth-child(3n) { --tilt: -.4deg; }
.gd-receipt:hover { transform: rotate(0deg) translateY(-6px); }
.gd-rc-open { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 16px 16px 26px; border: 0; cursor: pointer; text-align: left; color: #2b2520;
    font-family: 'IBM Plex Mono', 'Outfit', 'Mitr', monospace; font-size: .8rem; background: #fffdf8;
    background-image: linear-gradient(180deg, rgba(0,0,0,0.025), rgba(0,0,0,0) 30%, rgba(0,0,0,0.02));
    /* torn zig-zag bottom edge */
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat;
            mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat; }
.gd-receipt.is-sample .gd-rc-open { cursor: default; }
.gd-rc-head { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-bottom: 8px; border-bottom: 1.5px dashed #cfc5b5; }
.gd-rc-head b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.15rem; letter-spacing: .14em; color: var(--gd-red); }
.gd-rc-head small { font-size: .62rem; letter-spacing: .12em; color: #8c8173; }
.gd-rc-photo { position: relative; display: block; aspect-ratio: 4 / 3; margin: 4px 0; overflow: hidden; border-radius: 4px; background: #eee6d8; filter: saturate(1.05) contrast(1.02); }
.gd-rc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gd-receipt:hover .gd-rc-photo img { transform: scale(1.05); }
.gd-noimg { display: grid; place-items: center; height: 100%; font-size: 2.6rem; }
/* v3: status colour per bill -- a band across the top + the framed stamp. */
.gd-receipt { --st: #15803d; }
.gd-receipt.is-watching { --st: #1d4ed8; } .gd-receipt.is-plan { --st: #d97706; } .gd-receipt.is-hold { --st: #6b7280; } .gd-receipt.is-dropped { --st: #b91c1c; }
.gd-rc-open { border-top: 7px solid var(--st) !important; }
.gd-bill-stamp { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 8px 0 4px; padding: 6px 18px 5px;
    border: 3.5px double var(--st); border-radius: 8px; color: var(--st); background: color-mix(in srgb, var(--st) 7%, transparent);
    transform: rotate(-5deg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--st) 25%, transparent); mix-blend-mode: multiply; }
.gd-bill-stamp b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.75rem; letter-spacing: .14em; line-height: 1; }
.gd-bill-stamp small { font-family: 'Outfit', 'Mitr', sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: 0; }
/* 5 stars: Audi's own rosette seal, pressed over the photo corner. */
.gd-seal { position: absolute; right: 8px; top: 76px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 62px; height: 62px; border-radius: 50%;
    color: #fff; background: radial-gradient(circle at 32% 28%, #f0435c 0%, #d0142f 55%, #a30d25 100%);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9), inset 0 0 0 4px #c8102e, 0 6px 14px rgba(0,0,0,0.35);
    transform: rotate(-8deg); pointer-events: none; animation: gdSeal .5s cubic-bezier(.2,.9,.3,1.4) both; }
.gd-seal i { font-style: normal; font-size: 1.55rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.gd-seal b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1rem; letter-spacing: .2em; line-height: 1; padding-left: .2em; }
@keyframes gdSeal { from { transform: rotate(-8deg) scale(1.6); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.gd-receipt.is-star .gd-rc-head b::before { content: '⭐ '; font-size: .85em; }
.gd-tab.is-star { border-color: rgba(239,74,97,0.6); }
.gd-tab.is-star.is-on { background: #fff; color: var(--gd-red); }
.gd-rc-name { font-family: 'Outfit', 'Mitr', sans-serif; font-size: 1.2rem; font-weight: 600; line-height: 1.25; color: #1d1712; }
.gd-rc-sub { font-family: 'Outfit', 'Mitr', sans-serif; color: #7a6d5f; font-size: .82rem; }
.gd-rc-rule { display: block; border-top: 1.5px dashed #cfc5b5; margin: 4px 0; }
.gd-line { display: flex; align-items: baseline; gap: 6px; }
.gd-line > span:first-child { letter-spacing: .06em; color: #5d5347; }
.gd-line i { flex: 1; border-bottom: 1.5px dotted #b9ae9d; transform: translateY(-3px); }
.gd-line b { white-space: nowrap; font-weight: 700; color: #1d1712; font-family: 'IBM Plex Mono', 'Outfit', 'Mitr', monospace; }
.gd-stars { color: #e0a100; letter-spacing: .06em; font-family: "Segoe UI Symbol", 'Outfit', 'Mitr', sans-serif; font-size: .95rem; }
.gd-stars i { font-style: normal; color: #ddd3c2; }
.gd-memory { align-self: flex-start; margin-top: 2px; padding: 3px 10px; border-radius: 999px; background: #fdecef; color: var(--gd-red-d); font-family: 'Outfit', 'Mitr', sans-serif; font-size: .78rem; font-weight: 600; }
.gd-rc-note { font-family: 'Outfit', 'Mitr', sans-serif; font-size: .85rem; color: #5d5347; line-height: 1.45; }
.gd-rc-foot { text-align: center; font-size: .66rem; letter-spacing: .14em; color: #8c8173; }
.gd-receipt.is-dropped .gd-rc-photo { filter: grayscale(.8); }
.gd-rc-tools { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.gd-edit.is-card { background: var(--gd-cream); color: var(--gd-red-d); border-color: var(--gd-cream); font-weight: 600; }
.gd-edit.is-card:hover { background: #fff; }
.gd-map, .gd-edit { border: 1px solid rgba(255,230,200,0.3); background: rgba(255,245,230,0.08); color: var(--gd-cream); border-radius: 999px; padding: 5px 12px; font-size: .8rem; cursor: pointer; text-decoration: none; }
.gd-map:hover, .gd-edit:hover { background: rgba(255,245,230,0.18); }
.gd-empty { text-align: center; color: var(--gd-sub); padding: 26px; border: 1px dashed rgba(255,230,200,0.3); border-radius: 14px; margin: 0; }
.gd-empty-page { text-align: center; padding: 50px 20px; color: var(--gd-sub); }
.gd-empty-page span { font-size: 3rem; }
.gd-credit { margin: 28px 0 0; text-align: center; font-size: .68rem; color: #8f7b67; }

/* ---------- editor dialog ---------- */
.gd-dlg { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(10,6,4,0.7); backdrop-filter: blur(3px); }
.gd-dlg-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 16px; background: var(--gd-cream, #fbf6ec); color: #231a14; font-family: 'Outfit', 'Mitr', sans-serif; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.gd-dlg-box h3 { margin: 0 0 4px; font-size: 1.2rem; }
.gd-dlg-box label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; }
.gd-dlg-box select, .gd-dlg-box input { padding: 9px 10px; border: 1px solid #d9ccb8; border-radius: 8px; background: #fff; color: #231a14; font: inherit; font-weight: 400; color-scheme: light; }
.gd-dlg-err { margin: 0; min-height: 1em; color: #b91c1c; font-size: .85rem; }
.gd-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.gd-dlg-box .gd-btn { color: #231a14; border-color: #d9ccb8; background: #fff; }
.gd-dlg-box .gd-btn.is-red { color: #fff; background: linear-gradient(180deg, #e0243f, #9c0c23); }

@media (prefers-reduced-motion: reduce) {
    .gd-rosette, .gd-wait, .gd-seal { animation: none; }
    .gd-plate { transition: none; }
    .gd-receipt, .gd-rc-photo img, .gd-tab, .gd-chip, .gd-btn { transition: none; }
    .gd-result-card { animation: none; }
}
@media (max-width: 760px) {
    .gd-cover { padding: 56px 16px 22px; }
    .gd-back { left: 26px; top: 14px; }
    .gd-add { right: 14px; top: 12px; padding: 6px 12px; font-size: .85rem; }
    .gd-spin { grid-template-columns: 1fr; justify-items: center; gap: 18px; padding: 20px 14px; }
    .gd-plate-wrap { width: 230px; height: 230px; }
    .gd-slice i { top: -92px; } .gd-slice b { top: -64px; }
    .gd-spin-side { width: 100%; box-sizing: border-box; text-align: center; }
    .gd-spin-side h3 { font-size: 1.6rem; }
    .gd-receipts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .gd-rc-open { padding: 12px 10px 22px; font-size: .7rem; }
    .gd-rc-name { font-size: 1rem; }
    .gd-seal { width: 50px; height: 50px; top: 52px; right: 4px; }
    .gd-seal i { font-size: 1.2rem; } .gd-seal b { font-size: .78rem; }
    .gd-bill-stamp { padding: 5px 10px 4px; } .gd-bill-stamp b { font-size: 1.3rem; }
    .gd-rc-tools { flex-wrap: wrap; }
    .gd-rc-head b { font-size: .92rem; letter-spacing: .06em; white-space: nowrap; }
    .gd-line { gap: 4px; }
}
