/* ==========================================================================
   Derech site chrome: header, nav, footer, bottom app nav, Guri sheet, templates.
   ========================================================================== */

/* Skip link (accessibility) */
.dk-skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 2000; background: var(--dk-teal); color: #fff; padding: .7rem 1.1rem; border-radius: var(--dk-r-sm); font-weight: 700; text-decoration: none; transition: top .2s; }
.dk-skip-link:focus { top: 12px; color: #fff; }
.dk-main:focus { outline: none; }

/* ---------- Logo ---------- */
.dk-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--dk-teal); flex: none; }
.dk-logo__mark img { width: 44px; height: 44px; border-radius: 50%; display: block; transition: transform .4s var(--dk-ease-bounce); }
.dk-logo:hover .dk-logo__mark img { transform: rotate(-10deg) scale(1.05); }
.dk-logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.dk-logo__name { font-family: var(--dk-font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: -.01em; }
.dk-logo__tag { font-size: 11px; color: var(--dk-muted); font-weight: 500; }
.dk-logo:hover { color: var(--dk-teal); }
@media (max-width: 420px) { .dk-logo__tag { display: none; } .dk-logo__name { font-size: 1.1rem; } }

/* ---------- Header ---------- */
.dk-header { position: sticky; top: 0; z-index: 500; background: rgba(251, 244, 232, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background .25s; }
.admin-bar .dk-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .dk-header { top: 46px; } }
.dk-header.is-scrolled { border-bottom-color: var(--dk-line); box-shadow: 0 6px 18px -14px rgba(74, 52, 30, .35); background: rgba(255, 253, 248, .92); }
.dk-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--dk-header-h); }
.dk-header__nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.dk-header__actions { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
.dk-nav__list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.dk-nav__link, .dk-nav .menu-item > a { display: inline-flex; align-items: center; gap: .4em; padding: .5em .85em; border-radius: var(--dk-r-pill); color: var(--dk-ink-2); text-decoration: none; font-family: var(--dk-font-display); font-weight: 600; font-size: .95rem; transition: background var(--dk-dur), color var(--dk-dur); white-space: nowrap; }
.dk-nav__link .dk-icon { width: 17px; height: 17px; color: var(--dk-teal-400); }
.dk-nav__link:hover, .dk-nav .menu-item > a:hover { background: var(--dk-cream-2); color: var(--dk-teal); }
.dk-nav__link.is-active, .dk-nav .current-menu-item > a { background: var(--dk-teal); color: #fff; }
.dk-nav__link.is-active .dk-icon { color: var(--dk-mustard); }
.dk-header__user { position: relative; }
.dk-header__avatar { position: relative; border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; display: grid; }
.dk-header__avatar .dk-avatar { box-shadow: 0 0 0 2px var(--dk-line-2); }
.dk-header__avatar:hover .dk-avatar { box-shadow: 0 0 0 2px var(--dk-clay); }
.dk-header__crown { position: absolute; top: -9px; inset-inline-start: -4px; font-size: 15px; transform: rotate(-18deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.dk-header__menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 260px; }
.dk-header__menu-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem .65rem; border-bottom: 1px dashed var(--dk-line-2); margin-bottom: .3rem; }
.dk-header__menu-head strong { font-family: var(--dk-font-display); color: var(--dk-teal); }
.dk-menu__item.is-upgrade { background: linear-gradient(90deg, #FFF6DA, transparent); font-weight: 700; color: var(--dk-clay-600); }
.dk-header-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--dk-teal); text-decoration: none; background: transparent; border: 0; cursor: pointer; transition: background var(--dk-dur); }
.dk-header-icon:hover { background: var(--dk-cream-2); color: var(--dk-clay); }
.dk-header-icon .dk-icon { width: 22px; height: 22px; }
.dk-header-icon .dk-badge--count { position: absolute; top: 2px; inset-inline-end: 0; }

/* Mobile guest menu */
.dk-mobile-menu__guri { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.dk-mobile-menu__guri img { width: 84px; height: auto; }
.dk-mobile-menu__guri p { margin: 0; background: #FFF9E8; border: 1.5px solid #F1DDA6; border-radius: 18px 18px 18px 4px; padding: .5rem .8rem; font-weight: 600; color: var(--dk-teal); }
.dk-mnav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.dk-mnav__link { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: var(--dk-r); background: var(--dk-cream); color: var(--dk-teal); text-decoration: none; font-family: var(--dk-font-display); font-weight: 700; font-size: 1.05rem; }
.dk-mnav__link .dk-icon { color: var(--dk-clay); width: 22px; height: 22px; }

/* ---------- Bottom app nav (mobile) ---------- */
.dk-bottom-nav { position: fixed; inset-inline: 10px; bottom: calc(8px + var(--dk-safe-bottom)); z-index: 600; height: var(--dk-bottom-nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: rgba(255, 253, 248, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--dk-line); border-radius: 26px; box-shadow: 0 14px 34px -16px rgba(74, 52, 30, .45); padding: 0 4px; }
.dk-bottom-nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; text-decoration: none; color: var(--dk-muted); font-size: 11px; font-weight: 700; font-family: var(--dk-font-display); -webkit-tap-highlight-color: transparent; position: relative; }
.dk-bottom-nav__icon { position: relative; display: grid; place-items: center; width: 46px; height: 32px; border-radius: 16px; transition: background .25s var(--dk-ease), transform .25s var(--dk-ease-bounce); }
.dk-bottom-nav__icon .dk-icon { width: 23px; height: 23px; }
.dk-bottom-nav__icon .dk-badge--count { position: absolute; top: -4px; inset-inline-end: 0; }
.dk-bottom-nav__item.is-active { color: var(--dk-teal); }
.dk-bottom-nav__item.is-active .dk-bottom-nav__icon { background: var(--dk-teal); color: #fff; transform: translateY(-2px); }
.dk-bottom-nav__item:active .dk-bottom-nav__icon { transform: scale(.9); }
body.dk-logged-in { padding-bottom: 0; }
@media (max-width: 959px) {
	body.dk-logged-in .dk-main { padding-bottom: calc(var(--dk-bottom-nav-h) + 24px + var(--dk-safe-bottom)); }
	body.dk-logged-in .dk-guri { bottom: calc(var(--dk-bottom-nav-h) + 20px + var(--dk-safe-bottom)); }
}

/* ---------- Footer ---------- */
.dk-footer { position: relative; margin-top: 5rem; background: var(--dk-teal); color: #D6E6E2; padding: 0 0 calc(1.5rem + var(--dk-safe-bottom)); }
.dk-footer__edge { position: absolute; inset-inline: 0; top: -38px; height: 40px; background: var(--dk-teal); clip-path: ellipse(58% 100% at 50% 100%); }
.dk-footer__peek { position: absolute; inset-inline-start: clamp(16px, 8vw, 120px); bottom: 14px; width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--dk-teal); background: radial-gradient(circle at 35% 30%, #FFF3D1, var(--dk-mustard)); object-fit: cover; box-shadow: 0 10px 20px -10px rgba(0,0,0,.4); animation: dk-guri-idle 4.5s ease-in-out infinite; }
.dk-footer a:not(.dk-btn) { color: #F4EFE6; text-decoration: none; }
.dk-footer a:not(.dk-btn):hover { color: var(--dk-mustard); }
.dk-footer .dk-btn, .dk-footer .dk-btn:hover { color: var(--btn-fg); }
.dk-footer__cta { position: relative; top: -10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; padding: 1rem 1.2rem; margin-bottom: 1.4rem; background: var(--dk-sticky, #FFE680); color: #3B3012; border-radius: 6px 6px 6px 26px; transform: rotate(-.8deg); box-shadow: 0 18px 30px -20px rgba(0,0,0,.6); }
.dk-footer__cta-copy { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.dk-footer__cta-copy .dk-hand { font-size: 1.7rem; color: var(--dk-clay-600); }
.dk-footer__cta-copy strong { font-family: var(--dk-font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.dk-footer__cta .dk-btn { flex: none; }
.dk-footer__main { display: grid; gap: 1.8rem; grid-template-columns: 1fr; padding-top: 1.6rem; }
@media (min-width: 900px) { .dk-footer__main { grid-template-columns: minmax(260px, 1fr) 2fr; gap: 3rem; } }
.dk-footer__brand { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.dk-footer__brand .dk-logo { color: #fff; }
.dk-footer__brand .dk-logo__tag { color: #A9C6C0; }
.dk-footer__brand p { margin: 0; font-size: .92rem; line-height: 1.65; color: #BFD5D0; max-width: 34ch; }
.dk-footer__book { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .8rem .45rem .5rem; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.dk-footer__book img { width: 34px; height: 50px; object-fit: cover; border-radius: 3px; box-shadow: 0 3px 8px rgba(0,0,0,.3); transform: rotate(-4deg); }
.dk-footer__book span { display: flex; flex-direction: column; font-size: .75rem; color: #A9C6C0; line-height: 1.3; }
.dk-footer__book b { font-family: var(--dk-font-display); font-size: .98rem; color: #fff; font-weight: 600; }
.dk-footer__social { display: flex; gap: .5rem; }
.dk-footer__social-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .85rem; font-weight: 600; }
.dk-footer__social-btn .dk-icon { width: 18px; height: 18px; color: var(--dk-mustard); }
.dk-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
@media (min-width: 640px) { .dk-footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dk-footer__title { font-family: var(--dk-font-display); font-weight: 600; font-size: 1rem; color: #fff; margin: 0 0 .6rem; }
.dk-footer__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.dk-footer__group a { font-size: .92rem; color: #D6E6E2; display: inline-block; padding: .1rem 0; }
.dk-footer__group a:hover { color: var(--dk-mustard); transform: translateX(-2px); }
.dk-footer__bottom { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px dashed rgba(255,255,255,.2); display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
@media (min-width: 900px) { .dk-footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.dk-footer__fine { margin: 0; font-size: .75rem; color: #9DBBB5; }
.dk-legal-links { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.dk-legal-links a, .dk-legal-links button { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .75rem; color: #D6E6E2; border: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.dk-legal-links a:hover, .dk-legal-links button:hover { background: rgba(255,255,255,.16); color: #fff; }
.dk-app-footer { padding: 1.4rem 0 2rem; color: var(--dk-muted); }
.dk-app-footer .dk-legal-links a, .dk-app-footer .dk-legal-links button { background: var(--dk-cream-2); color: var(--dk-ink-2); }
@media (max-width: 959px) { body.dk-logged-in .dk-footer { padding-bottom: calc(var(--dk-bottom-nav-h) + 30px + var(--dk-safe-bottom)); } }

/* ---------- Guri sheet ---------- */
.dk-guri-sheet .dk-sheet__panel { display: flex; flex-direction: column; gap: .9rem; }
.dk-guri-sheet__head { display: flex; gap: .9rem; align-items: center; }
.dk-guri-sheet__art { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 35% 30%, #FFF3D1, var(--dk-mustard)); flex: none; animation: dk-guri-idle 4.5s ease-in-out infinite; }
.dk-guri-sheet__head h3 { margin: 0 0 .2rem; }
.dk-guri-sheet__head p { margin: 0; }
.dk-guri-ask { display: flex; flex-direction: column; gap: .5rem; }
.dk-guri-ask .dk-textarea { min-height: 70px; border-radius: 18px; }
.dk-guri-answer { background: #FFF9E8; border: 1.5px solid #F1DDA6; border-radius: 6px 22px 22px 22px; padding: .9rem 1rem; font-size: .98rem; }
.dk-guri-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.dk-guri-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-weight: 500; }
.dk-guri-perks li { background: var(--dk-cream); border-radius: var(--dk-r-sm); padding: .6rem .8rem; }

/* ---------- Lightbox ---------- */
.dk-lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(20, 16, 14, .9); display: grid; place-items: center; padding: 16px; animation: dk-rise .25s var(--dk-ease); }
.dk-lightbox img { max-width: 100%; max-height: 90dvh; border-radius: 14px; box-shadow: var(--dk-shadow-lg); }
.dk-lightbox__close { position: absolute; top: 14px; inset-inline-end: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Content templates ---------- */
.dk-entry-hero { position: relative; padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 2.5rem); overflow: hidden; }
.dk-entry-hero__meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; color: var(--dk-muted); font-size: var(--dk-fs-sm); margin-top: .8rem; }
.dk-entry-cover { margin: 0 auto 2rem; max-width: 1000px; border-radius: var(--dk-r-xl); overflow: hidden; box-shadow: var(--dk-shadow-lg); aspect-ratio: 16 / 8; }
.dk-entry-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dk-article-card { display: flex; flex-direction: column; background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: var(--dk-r-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--dk-shadow-sm); transition: transform .3s var(--dk-ease), box-shadow .3s var(--dk-ease); }
.dk-article-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: var(--dk-shadow-lg); color: inherit; }
.dk-article-card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--dk-cream-2); position: relative; }
.dk-article-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--dk-ease); }
.dk-article-card:hover .dk-article-card__img img { transform: scale(1.05); }
.dk-article-card__lock { position: absolute; top: 12px; inset-inline-start: 12px; }
.dk-article-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.dk-article-card__title { font-family: var(--dk-font-display); font-weight: 800; font-size: 1.12rem; line-height: 1.3; color: var(--dk-teal); margin: 0; }
.dk-article-card__meta { margin-top: auto; display: flex; gap: .8rem; font-size: var(--dk-fs-xs); color: var(--dk-muted); }
.dk-cat-pills { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
.dk-cat-pills::-webkit-scrollbar { display: none; }
.dk-404 { text-align: center; padding: 4rem 1rem; }
.dk-404__art { width: min(320px, 80%); margin: 0 auto 1rem; }
.dk-pagination .nav-links { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.dk-pagination .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--dk-paper); border: 1px solid var(--dk-line); text-decoration: none; font-weight: 700; color: var(--dk-teal); }
.dk-pagination .page-numbers.current { background: var(--dk-teal); color: #fff; border-color: var(--dk-teal); }

/* ---------- Elementor harmony ---------- */
.dk-elementor-page .dk-main > .elementor { margin: 0; }
.elementor-widget-shortcode .dk-page { padding-top: 0; }
.e-con-inner .dk-container { padding-inline: 0; }

/* ---------- Print ---------- */
@media print {
	.dk-header, .dk-footer, .dk-bottom-nav, .dk-guri, .dk-toasts { display: none !important; }
	body { background: #fff; }
}

/* ---------- Guri stage (Elementor widget / shortcode) ---------- */
.dk-guri-stage { position: relative; display: inline-flex; align-items: flex-end; gap: .6rem; }
.dk-guri-stage--bubble-top { flex-direction: column-reverse; align-items: center; }
.dk-guri-stage--bubble-end { flex-direction: row-reverse; }
.dk-guri-stage__img { height: auto; filter: drop-shadow(0 18px 24px rgba(74, 52, 30, .25)); transform-origin: 50% 90%; }
.dk-guri-stage--float .dk-guri-stage__img { animation: dk-float 6s ease-in-out infinite; }
.dk-guri-stage--bounce .dk-guri-stage__img { animation: dk-guri-jump 2.4s var(--dk-ease-bounce) infinite; }
.dk-guri-stage--wiggle .dk-guri-stage__img { animation: dk-guri-idle 3s ease-in-out infinite; }
.dk-guri-stage__bubble { max-width: 300px; background: #FFF9E8; border: 2px solid #F1DDA6; border-radius: 26px 26px 26px 6px; padding: .9rem 1.1rem; font-family: var(--dk-font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.45; color: var(--dk-teal); box-shadow: var(--dk-shadow); margin-bottom: 40%; animation: dk-rise .6s var(--dk-ease-bounce) both .4s; }

/* ---------- Live stats ---------- */
.dk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.dk-stats__item { background: var(--dk-paper); border: 1px solid var(--dk-line); border-radius: var(--dk-r-lg); padding: 1rem; text-align: center; box-shadow: var(--dk-shadow-sm); display: flex; flex-direction: column; gap: .15rem; }
.dk-stats__emoji { font-size: 1.8rem; }
.dk-stats__num { font-family: var(--dk-font-display); font-weight: 900; font-size: 2rem; color: var(--dk-teal); line-height: 1.1; }
.dk-stats__label { font-size: var(--dk-fs-sm); color: var(--dk-muted); }
.dk-guri-stage--bubble-top .dk-guri-stage__bubble { margin-bottom: -6px; align-self: center; position: relative; }
.dk-guri-stage--bubble-top .dk-guri-stage__bubble::after { content: ''; position: absolute; bottom: -12px; inset-inline-start: 46%; width: 22px; height: 22px; background: #FFF9E8; border-inline-end: 2px solid #F1D57E; border-bottom: 2px solid #F1D57E; transform: rotate(45deg); }
.dk-guri-stage.is-video, .dk-guri-stage { max-width: 100%; }
.dk-guri-stage video, .dk-guri-stage img { max-width: 100%; height: auto; }
@media (max-width: 767px) { .dk-guri-stage__bubble { font-size: .95rem; max-width: 230px; } }
