/* ==================================================================
   DEITY DATABASE (1.7.0)   ramapani.com/page/deity-database
   Uses the site's own colours so the app sits inside the page:
   ink #4b4032, link #8b5e3c, paper #fdfcf9, soft #f4f1ec.
   Layouts: .dd-is-page (inside the site), .dd-is-play (own window),
   .dd-is-embed (iframe on another site). .dd-full / .dd-fullpage = full screen.
   The quiz (.dq-app) shares the same colours and buttons.
================================================================== */
.dd-app, .dq-app {
    --dd-ink: #4b4032;
    --dd-accent: #8b5e3c;
    --dd-paper: #fdfcf9;
    --dd-soft: #f4f1ec;
    --dd-line: #e2dacd;
    --dd-mute: #7a6d5c;
    --dd-ok: #4f7a3a;
    --dd-bad: #a8443a;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--dd-ink);
}
.dd-app *, .dd-app *::before, .dd-app *::after,
.dq-app *, .dq-app *::before, .dq-app *::after { box-sizing: border-box; }
.dd-app [hidden], .dq-app [hidden] { display: none !important; }
.dd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- breathing space: phones use the full width, desktops get margins ---- */
.dd-is-page, .dq-app {
    width: 100%;
    max-width: 1240px;
    margin: 1rem auto 1.5rem;
    padding: 0 1em;
}
@media (min-width: 900px) {
    .dd-is-page, .dq-app { padding: 0 clamp(2em, 5vw, 4.5em); }
}
.dd-is-play, .dd-is-embed { margin: 0; padding: 12px 14px 20px; min-height: 100vh; background: var(--dd-paper); }

/* ---- full screen: the browser's own, or a fixed full-window view on phones that refuse it ---- */
.dd-app:fullscreen, .dq-app:fullscreen { overflow: auto; max-width: none; margin: 0; padding: 14px clamp(14px, 5vw, 4.5em) 24px; background: var(--dd-paper); }
.dd-app:-webkit-full-screen, .dq-app:-webkit-full-screen { overflow: auto; max-width: none; margin: 0; padding: 14px clamp(14px, 5vw, 4.5em) 24px; background: var(--dd-paper); width: 100%; height: 100%; }
.dd-fullpage, .dq-app.dd-fullpage {
    position: fixed; inset: 0; z-index: 99990; overflow: auto; -webkit-overflow-scrolling: touch;
    max-width: none; margin: 0; background: var(--dd-paper);
    padding: max(12px, env(safe-area-inset-top)) clamp(14px, 5vw, 4.5em) max(24px, env(safe-area-inset-bottom));
}
html.dd-noscroll, html.dd-noscroll body { overflow: hidden; }

/* ---- the toolbar: search, share, full screen ---- */
.dd-toolbar { display: flex; gap: 8px; align-items: stretch; }
#dd-q {
    flex: 1 1 auto; min-width: 0; padding: 12px 16px; font: inherit; font-size: 16px;
    color: var(--dd-ink); background: var(--dd-paper);
    border: 1px solid var(--dd-line); border-radius: 12px;
}
.dd-tool, .dq-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    flex: 0 0 auto; padding: 0 14px; min-height: 46px; min-width: 46px;
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    color: var(--dd-ink); background: var(--dd-soft);
    border: 1px solid var(--dd-line); border-radius: 12px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dd-tool:hover, .dq-btn:hover { border-color: var(--dd-accent); background: #fff; }
.dd-tool svg, .dq-btn svg, .dd-sharecard svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }
.dd-i-unfs { display: none; }
.dd-full .dd-i-fs { display: none; }
.dd-full .dd-i-unfs { display: block; }
@media (max-width: 600px) {
    .dd-tool span { display: none; }
    .dd-tool { padding: 0; }
}
#dd-q:focus-visible, .dd-chip:focus-visible, .dd-card:focus-visible, .dd-rel:focus-visible, .dd-x:focus-visible,
.dd-tool:focus-visible, .dd-sharecard:focus-visible, .dd-tagpill:focus-visible, .dd-tag-x:focus-visible,
.dq-btn:focus-visible, .dq-option:focus-visible, .dq-pick:focus-visible {
    outline: 3px solid #f5cf2e; outline-offset: 2px;
}

/* ---- tradition and school buttons ---- */
.dd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dd-chip {
    padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
    color: var(--dd-ink); background: var(--dd-paper);
    border: 1px solid var(--dd-line); border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dd-chip:hover { background: var(--dd-soft); }
.dd-chip.dd-on { background: var(--dd-accent); border-color: var(--dd-accent); color: #fff; }
.dd-schools { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--dd-line); }
.dd-chip-sub { font-size: 12px; padding: 4px 12px; }
.dd-chip-sub.dd-on { background: #6f7f4f; border-color: #6f7f4f; }
/* phones: one swipeable row of buttons instead of a tall block */
@media (max-width: 600px) {
    .dd-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; margin-left: -1em; margin-right: -1em; padding-left: 1em; padding-right: 1em; }
    .dd-is-play .dd-chips, .dd-is-embed .dd-chips, .dd-full .dd-chips, .dd-fullpage .dd-chips { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
    .dd-chips::-webkit-scrollbar { display: none; }
}
.dd-count { margin: 10px 0 0; font-size: 13px; color: var(--dd-mute); }

/* ---- the active tag ---- */
.dd-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 6px 4px 14px; font-size: 14px; color: #fff; background: var(--dd-accent); border-radius: 999px; }
.dd-tag-x { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.dd-tag-x:hover { background: rgba(255, 255, 255, 0.35); }

/* ---- the grid of cards ---- */
.dd-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dd-empty { grid-column: 1 / -1; color: var(--dd-mute); }
.dd-card {
    display: block; width: 100%; padding: 14px; margin: 0; text-align: left; cursor: pointer;
    font: inherit; color: var(--dd-ink); background: var(--dd-paper);
    border: 1px solid var(--dd-line); border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dd-card:hover { transform: translateY(-2px); border-color: var(--dd-accent); box-shadow: 0 4px 14px rgba(75, 64, 50, 0.12); }
.dd-glyph { display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; background: var(--dd-soft); color: var(--dd-accent); font-size: 26px; }
.dd-glyph img { width: 100%; height: 100%; object-fit: cover; }
.dd-big { width: 88px; height: 88px; font-size: 42px; }
.dd-card-name { display: block; margin-top: 10px; font-size: 18px; font-weight: 600; line-height: 1.25; }
.dd-card-nat { display: block; font-size: 14px; color: var(--dd-mute); min-height: 1.2em; overflow-wrap: anywhere; }
.dd-card-tag { display: inline-block; margin-top: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dd-accent); }
.dd-card-dom { display: block; margin-top: 4px; font-size: 13px; color: var(--dd-mute); }
@media (max-width: 600px) {
    .dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dd-card { padding: 12px; }
    .dd-glyph { width: 44px; height: 44px; font-size: 22px; }
    .dd-big { width: 72px; height: 72px; font-size: 34px; }
    .dd-card-name { font-size: 16px; }
    .dd-card-dom { display: none; }
}

/* ---- the detail sheet: a centred card on desktop, the whole screen on phones ---- */
.dd-modal {
    position: fixed; inset: 0; z-index: 99995; display: none; overflow: auto; -webkit-overflow-scrolling: touch;
    align-items: flex-start; justify-content: center; padding: 28px 14px;
    background: rgba(40, 32, 22, 0.62);
}
.dd-modal.dd-open { display: flex; }
.dd-sheet {
    position: relative; width: 100%; max-width: 680px; padding: 0 26px 26px;
    color: var(--dd-ink); background: var(--dd-paper);
    border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.dd-sheet-bar {
    position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin: 0 -26px 6px; padding: 12px 14px 10px 26px;
    background: var(--dd-paper); border-bottom: 1px solid var(--dd-line); border-radius: 16px 16px 0 0;
}
.dd-sharecard {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    color: #fff; background: var(--dd-accent); border: 0; border-radius: 999px;
}
.dd-sharecard:hover { background: #73492c; }
.dd-x {
    width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: var(--dd-soft); color: var(--dd-ink); font-size: 26px; line-height: 1; cursor: pointer;
}
.dd-x:hover { background: var(--dd-line); }
.dd-sheet h2 { margin: 12px 0 2px; font-size: 26px; line-height: 1.2; }
.dd-meta { color: var(--dd-mute); font-size: 14px; }
.dd-sec { margin-top: 16px; }
.dd-sec h3 { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dd-mute); }
.dd-pill { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 10px; font-size: 14px; background: var(--dd-soft); border-radius: 8px; }
.dd-tagpill { border: 1px solid transparent; font: inherit; font-size: 14px; color: var(--dd-ink); cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.dd-tagpill:hover { border-color: var(--dd-accent); background: var(--dd-paper); }
.dd-mantra { padding: 10px 14px; background: var(--dd-soft); border-left: 3px solid var(--dd-accent); border-radius: 0 8px 8px 0; }
.dd-mantra b { display: block; font-size: 17px; font-weight: 600; }
.dd-mantra span { font-size: 14px; color: var(--dd-mute); }
.dd-text { margin: 0; }
.dd-honour { padding: 10px 14px; background: var(--dd-soft); border-radius: 8px; }
.dd-rel {
    margin: 3px 6px 3px 0; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer;
    color: var(--dd-ink); background: var(--dd-paper); border: 1px solid var(--dd-line); border-radius: 8px;
}
.dd-rel:hover { border-color: var(--dd-accent); background: var(--dd-soft); }
.dd-rel small { color: var(--dd-mute); }
@media (max-width: 600px) {
    .dd-modal { padding: 0; }
    .dd-sheet { max-width: none; min-height: 100%; border-radius: 0; padding: 0 16px 28px; box-shadow: none; }
    .dd-sheet-bar { margin: 0 -16px 6px; padding: max(10px, env(safe-area-inset-top)) 12px 10px 16px; border-radius: 0; }
    .dd-sheet h2 { font-size: 23px; }
}

/* ---- messages ---- */
.dd-toast {
    position: fixed; left: 50%; bottom: 22px; z-index: 99999; transform: translate(-50%, 10px);
    max-width: min(460px, calc(100% - 28px)); margin: 0; padding: 11px 18px;
    font-size: 14px; text-align: center; overflow-wrap: anywhere;
    color: var(--dd-ink); background: #fbeed2; border: 1px solid #e7cf9a; border-radius: 12px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
.dd-toast.dd-show { opacity: 1; transform: translate(-50%, 0); }

/* ---- credit line in the embed and the own-window view ---- */
.dd-credit { margin: 22px 0 0; text-align: center; font-size: 13px; color: var(--dd-mute); }
.dd-credit a { color: var(--dd-accent); }

/* ---- words around the app ---- */
.dd-accuracy { margin: 1rem 0; padding: 12px 16px; background: #f4f1ec; border: 1px solid #e2dacd; border-left: 4px solid #8b5e3c; border-radius: 0 10px 10px 0; }
.dd-accuracy p { margin: 0; }
.dd-launch { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ==================================================================
   THE QUIZ
================================================================== */
.dq-card {
    max-width: 760px; margin: 0 auto; padding: 22px 24px;
    background: var(--dd-paper); border: 1px solid var(--dd-line); border-radius: 16px;
}
.dq-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.dq-top .dq-tools { display: flex; gap: 8px; }
.dq-progress { font-size: 13px; color: var(--dd-mute); letter-spacing: 0.04em; }
.dq-bar { height: 6px; margin: 0 0 18px; background: var(--dd-soft); border-radius: 999px; overflow: hidden; }
.dq-bar i { display: block; height: 100%; width: 0; background: var(--dd-accent); transition: width 0.3s ease; }
.dq-title { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
.dq-lead { margin: 0 0 16px; color: var(--dd-mute); }
.dq-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.dq-pick {
    padding: 16px; text-align: left; cursor: pointer; font: inherit;
    color: var(--dd-ink); background: var(--dd-soft); border: 1px solid var(--dd-line); border-radius: 14px;
}
.dq-pick:hover { border-color: var(--dd-accent); background: #fff; }
.dq-pick b { display: block; font-size: 17px; }
.dq-pick span { display: block; margin-top: 4px; font-size: 13px; color: var(--dd-mute); }
.dq-pick .dq-sym { font-size: 26px; color: var(--dd-accent); }
.dq-q { margin: 0 0 16px; font-size: 20px; line-height: 1.35; font-weight: 600; }
.dq-options { display: grid; gap: 10px; }
.dq-option {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; text-align: left; cursor: pointer;
    font: inherit; font-size: 16px; color: var(--dd-ink); background: var(--dd-paper);
    border: 2px solid var(--dd-line); border-radius: 12px; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dq-option:hover:not([disabled]) { border-color: var(--dd-accent); background: var(--dd-soft); }
.dq-option[disabled] { cursor: default; }
.dq-letter { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--dd-soft); font-weight: 700; font-size: 14px; }
.dq-option.dq-right { border-color: var(--dd-ok); background: #eef5e8; }
.dq-option.dq-right .dq-letter { background: var(--dd-ok); color: #fff; }
.dq-option.dq-wrong { border-color: var(--dd-bad); background: #f9ebe8; }
.dq-option.dq-wrong .dq-letter { background: var(--dd-bad); color: #fff; }
.dq-feedback { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--dd-soft); }
.dq-feedback b { display: block; margin-bottom: 2px; }
.dq-feedback.dq-yes b { color: var(--dd-ok); }
.dq-feedback.dq-no b { color: var(--dd-bad); }
.dq-feedback a { color: var(--dd-accent); }
.dq-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dq-main { color: #fff; background: var(--dd-accent); border-color: var(--dd-accent); }
.dq-main:hover { background: #73492c; border-color: #73492c; }
.dq-score { margin: 6px 0; font-size: 48px; font-weight: 700; color: var(--dd-accent); line-height: 1; }
.dq-review { margin: 18px 0 0; padding: 0; list-style: none; }
.dq-review li { padding: 8px 0; border-top: 1px solid var(--dd-line); font-size: 14px; }
.dq-review li b { color: var(--dd-ok); }
.dq-review li.dq-missed b { color: var(--dd-bad); }
@media (max-width: 600px) {
    .dq-card { padding: 16px 14px; border-radius: 12px; }
    .dq-q { font-size: 18px; }
    .dq-btn span { display: none; }
    .dq-actions .dq-btn span { display: inline; }
}

/* ---- types: the menu, the label on each card and the button on the detail sheet (1.7.0) ---- */
.dd-countrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.dd-countrow .dd-count { margin: 0; }
.dd-select {
    padding: 7px 34px 7px 12px; font: inherit; font-size: 14px; color: var(--dd-ink); cursor: pointer;
    background: var(--dd-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237a6d5c' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 8px center / 20px;
    border: 1px solid var(--dd-line); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.dd-select:hover { border-color: var(--dd-accent); }
.dd-select:focus-visible, .dd-typepill:focus-visible { outline: 3px solid #f5cf2e; outline-offset: 2px; }
.dd-card-type { display: block; margin-top: 2px; font-size: 12px; font-style: italic; color: var(--dd-mute); }
.dd-typepill {
    display: inline-block; margin: 6px 0 4px; padding: 3px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    color: #fff; background: #6f7f4f; border: 0; border-radius: 999px;
}
.dd-typepill:hover { background: #5b6a3f; }

/* ==================================================================
   WHO AM I? (1.8.0)
================================================================== */
.dw-worth { display: inline-block; margin-left: 8px; padding: 2px 10px; font-size: 13px; font-weight: 600; vertical-align: middle; color: #fff; background: var(--dd-accent); border-radius: 999px; }
.dw-worth:empty { display: none; }
.dw-clues { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.dw-clue { padding: 10px 14px; background: var(--dd-soft); border-left: 3px solid var(--dd-line); border-radius: 0 10px 10px 0; }
.dw-clue b { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dd-mute); }
.dw-clue span { font-size: 16px; }
.dw-new { border-left-color: var(--dd-accent); animation: dw-in 0.35s ease; }
@keyframes dw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dw-more { margin: 0 0 14px; }
.dw-opttype { display: block; font-size: 12px; color: var(--dd-mute); }
.dq-review a { color: var(--dd-accent); }

/* ==================================================================
   RELATIONSHIP MAP (1.8.0)
================================================================== */
.dg-app {
    --dd-ink: #4b4032; --dd-accent: #8b5e3c; --dd-paper: #fdfcf9; --dd-soft: #f4f1ec; --dd-line: #e2dacd; --dd-mute: #7a6d5c;
    box-sizing: border-box; width: 100%; max-width: 1240px; margin: 1rem auto 1.5rem; padding: 0 1em;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45; color: var(--dd-ink);
}
.dg-app *, .dg-app *::before, .dg-app *::after { box-sizing: border-box; }
.dg-app [hidden] { display: none !important; }
@media (min-width: 900px) { .dg-app { padding: 0 clamp(2em, 5vw, 4.5em); } }
.dg-app:fullscreen, .dg-app:-webkit-full-screen { overflow: auto; max-width: none; width: 100%; height: 100%; margin: 0; padding: 14px clamp(14px, 4vw, 3em) 24px; background: var(--dd-paper); }
.dg-app.dd-fullpage { position: fixed; inset: 0; z-index: 99990; overflow: auto; max-width: none; margin: 0; background: var(--dd-paper); padding: max(12px, env(safe-area-inset-top)) clamp(14px, 4vw, 3em) max(24px, env(safe-area-inset-bottom)); }
.dg-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
#dg-search { flex: 1 1 220px; min-width: 0; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--dd-ink); background: var(--dd-paper); border: 1px solid var(--dd-line); border-radius: 12px; }
#dg-search:focus-visible { outline: 3px solid #f5cf2e; outline-offset: 2px; }
#dg-mode { font-weight: 700; }
@media (max-width: 600px) {
    .dg-toolbar .dq-btn span { display: none; }
    .dg-toolbar .dq-btn { padding: 0 12px; }
    #dg-search { flex-basis: 100%; }
}
.dg-stage {
    position: relative; margin-top: 12px; width: 100%; height: clamp(420px, 70vh, 780px);
    background: radial-gradient(ellipse at center, #fffdf8 0%, #f6f1e8 100%);
    border: 1px solid var(--dd-line); border-radius: 16px; overflow: hidden;
}
.dg-app.dd-full .dg-stage, .dg-app.dd-fullpage .dg-stage { height: calc(100vh - 210px); min-height: 360px; }
@media (max-width: 600px) { .dg-stage { height: clamp(380px, 64vh, 640px); } }
#dg-svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; transition: opacity 0.2s ease; }
.dg-is-web #dg-svg { touch-action: none; cursor: grab; }
.dg-is-web #dg-svg:active { cursor: grabbing; }
.dg-second { position: absolute; left: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13px; background: rgba(253, 252, 249, 0.92); border: 1px solid var(--dd-line); border-radius: 999px; cursor: pointer; }
.dg-edge { stroke: #b9ab95; stroke-width: 1.5; }
.dg-l2 { stroke: #d8cdbb; stroke-width: 1; stroke-dasharray: 3 4; }
.dg-l3 { stroke: #d8cdbb; stroke-width: 1; }
.dg-wedge { stroke: #cdbfa8; stroke-width: calc(0.8px * var(--dg-s, 1)); opacity: 0.55; }
.dg-edge.dg-hot { stroke: var(--dd-accent); stroke-width: 2.5; opacity: 1; stroke-dasharray: none; }
.dg-wedge.dg-hot { stroke-width: calc(2px * var(--dg-s, 1)); }
.dg-node { cursor: pointer; outline: none; }
.dg-node circle { transition: stroke-width 0.15s ease; }
.dg-node:hover circle, .dg-node:focus circle, .dg-node.dg-hover circle { stroke: #4b4032; stroke-width: 3; }
.dg-node:focus-visible circle { stroke: #f5cf2e; stroke-width: 4; }
.dg-glyph { pointer-events: none; font-family: "Segoe UI Symbol", "Noto Sans Symbols", system-ui, sans-serif; }
.dg-label { font-size: 12px; font-weight: 600; fill: var(--dd-ink); paint-order: stroke; stroke: #fdfcf9; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.dg-label-main { font-size: 16px; font-weight: 700; }
@media (max-width: 600px) { .dg-label { font-size: 10px; } .dg-label-main { font-size: 13px; } }
.dg-wlabel { fill: var(--dd-ink); font-weight: 600; paint-order: stroke; stroke: #fdfcf9; stroke-width: calc(3px * var(--dg-s, 1)); pointer-events: none; display: none; }
.dg-big .dg-wlabel, .dg-wnode.dg-hover .dg-wlabel, .dg-wnode:focus .dg-wlabel { display: inline; }
.dg-wnode circle { stroke: #fdfcf9; stroke-width: calc(1px * var(--dg-s, 1)); }
.dg-caption { min-height: 1.5em; margin: 8px 2px 0; font-size: 14px; color: var(--dd-mute); }
.dg-caption b { color: var(--dd-ink); }
.dg-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 2px 0; font-size: 13px; color: var(--dd-mute); }
.dg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: 6px; flex: 0 0 auto; }
.dg-legend .dg-dot { margin-right: 0; }
.dg-panel { margin-top: 16px; padding: 18px 20px; background: var(--dd-paper); border: 1px solid var(--dd-line); border-radius: 16px; }
.dg-panel h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.dg-panel p { margin: 10px 0 0; }
.dg-head { display: flex; align-items: center; gap: 14px; }
.dg-sub { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dd-mute); }
.dg-panel-actions { margin-top: 12px; }
.dg-rels .dd-rel { display: inline-flex; align-items: center; }
.dd-maplink { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--dd-accent); }

/* ==================================================================
   SAME IDEA, DIFFERENT TRADITIONS (1.8.0)
================================================================== */
.ds-theme { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dd-accent); }
.ds-prompt { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.ds-prompt .dd-glyph { flex: 0 0 auto; }
.ds-prompt .dq-q { margin: 4px 0 0; }
.ds-prompt .dq-q a { color: var(--dd-accent); }
.ds-prompt .dq-q small { font-weight: 400; color: var(--dd-mute); }
.ds-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; text-align: left; cursor: pointer;
    font: inherit; color: var(--dd-ink); background: var(--dd-paper); border: 2px solid var(--dd-line); border-radius: 14px;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.ds-card:hover:not([disabled]) { border-color: var(--dd-accent); transform: translateY(-2px); }
.ds-card:focus-visible { outline: 3px solid #f5cf2e; outline-offset: 2px; }
.ds-card[disabled] { cursor: default; }
.ds-card .dd-glyph { width: 40px; height: 40px; font-size: 20px; margin-bottom: 6px; }
.ds-card b { font-size: 15px; line-height: 1.25; }
.ds-card span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dd-accent); }
.ds-card small { font-size: 12px; font-style: italic; color: var(--dd-mute); }
.ds-card.ds-on { border-color: var(--dd-accent); background: #f6ece2; }
.ds-card.ds-on::after { content: "\2713"; position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--dd-accent); font-size: 14px; font-weight: 700; }
.ds-card.ds-right { border-color: var(--dd-ok); background: #eef5e8; }
.ds-card.ds-right::after { background: var(--dd-ok); }
.ds-card.ds-wrong { border-color: var(--dd-bad); background: #f9ebe8; }
.ds-card.ds-wrong::after { content: "\2717"; background: var(--dd-bad); }
.ds-card.ds-missed { border-color: var(--dd-ok); border-style: dashed; }
.ds-card.ds-missed::after { content: "\2713"; position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--dd-ok); border: 2px dashed var(--dd-ok); font-size: 13px; font-weight: 700; }
.ds-why { margin: 6px 0 0; padding-left: 18px; }
.ds-why li { margin: 4px 0; }
.ds-why a { color: var(--dd-accent); }
