/* Own posts, the "Eigene" / "Own" view (2026-11-21; own-posts.js).
   Published own posts carry the glowing, pulsing frame of the game card, in the theme colour instead of the game blue. Every other own post keeps the normal frame
   of its content type and shows its status as a symbol and a status line. The frame mechanism mirrors the game frame of reader 0.14.5: the card keeps ITS frame (width, dashing,
   spoken-edition line) and only takes the colour; .card-own-glow is just the halo that breathes around it. */
:root{--own-ok:#1c7a52;--own-bad:#c8372f}
:root[data-theme=dark]{--own-ok:#58d39b;--own-bad:#ff7b72}

/* ---- frame of a published own post (theme colour: --accent-text follows the chosen colour world) ---- */
.news-card[data-own=published]{--own-glow:var(--accent-text,var(--accent,#ffb454));--own-glow-soft:color-mix(in srgb,var(--own-glow) 48%,transparent);--card-line:var(--own-glow);--frame-glow:var(--own-glow)}
.news-card[data-own=published]:not([data-frame=short-dash]):not([data-frame=long-dash])>.card-surface{border-color:var(--own-glow)}
.news-card[data-own=published]:is([data-frame=short-dash],[data-frame=long-dash])>.card-outline{display:block;color:var(--own-glow);animation:own-outline-glow 2.4s ease-in-out infinite}
/* An opened (wide) card: reader.css lights its solid frame up to a mix of accent and line, except for the game and spoken-edition frames. The published own post keeps its theme colour
   (same specificity as that rule, three times the attribute to be sure, and own.css comes after reader.css). */
.news-card.wide[data-own=published][data-own=published][data-own=published]:not([data-frame=short-dash]):not([data-frame=long-dash])>.card-surface{border-color:var(--own-glow)}
.card-own-glow{position:absolute;inset:0;z-index:0;border-radius:var(--radius,22px);pointer-events:none}
.card-own-glow::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 12px 2px var(--own-glow-soft),0 0 30px 7px var(--own-glow-soft);opacity:.2;animation:own-glow 2.4s ease-in-out infinite}
.news-card[data-own=published]:is([data-frame=short-dash],[data-frame=long-dash],[data-frame=none])>.card-own-glow{display:none}
.news-card.wide-fit>.card-own-glow{bottom:auto;height:var(--fit-h,70vh);transform:translateY(var(--fit-dy,0px))}
@keyframes own-glow{50%{opacity:1}}
@keyframes own-outline-glow{0%,100%{filter:drop-shadow(0 0 1px var(--own-glow-soft))}50%{filter:drop-shadow(0 0 3px var(--own-glow)) drop-shadow(0 0 9px var(--own-glow-soft))}}
@media(prefers-reduced-motion:reduce){.card-own-glow::after{animation:none;opacity:.6}.news-card[data-own=published]>.card-outline{animation:none;filter:drop-shadow(0 0 4px var(--own-glow-soft))}}
@media(forced-colors:active){.card-own-glow{display:none}.news-card[data-own=published]>.card-surface{border-style:solid;border-color:Highlight}.news-card[data-own=published]>.card-outline{color:Highlight;animation:none;filter:none}}

/* ---- own posts that are not public (and the tutorial card) are never saved, pinned, shared or sourced: they have no public article to point at ---- */
.news-card[data-own]:not([data-own=published]) :is(.pin,.bookmark,.evidence-badge,.origin-summary,.sources-toggle,.card-sources){display:none}

/* ---- status symbol next to the other card indicators ---- */
.card-indicators .own-status-badge{color:var(--metadata,var(--muted))}
.card-indicators .own-status-badge[data-own-state=published]{color:var(--own-ok)}
.card-indicators .own-status-badge[data-own-state=rejected]{color:var(--own-bad)}
.card-indicators .own-status-badge[data-own-state=pending]{color:var(--accent-text,var(--accent))}
.card-indicators .own-status-badge svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ---- status line under the text of a post that is not public ---- */
.own-status{display:flex;align-items:flex-start;gap:11px;margin:14px 0 6px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--line) 80%,var(--muted));border-radius:calc(var(--radius,14px)*.6);background:color-mix(in srgb,var(--surface) 70%,transparent);font-size:13px;line-height:1.4;color:var(--muted)}
.own-status-icon{flex:none;display:inline-grid;place-items:center;width:26px;height:26px;color:var(--metadata,var(--muted))}
.own-status[data-own-state=pending] .own-status-icon{color:var(--accent-text,var(--accent))}
.own-status[data-own-state=rejected] .own-status-icon{color:var(--own-bad)}
.own-status-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.own-status-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.own-status-text strong{font-size:13px;font-weight:800;color:var(--ink,inherit)}
.own-note{display:block;margin-top:2px;padding-left:9px;border-left:2px solid var(--own-bad);color:var(--ink,inherit);overflow-wrap:anywhere}
.own-action{align-self:flex-start;margin-top:6px;padding:7px 12px;border:1px solid currentColor;border-radius:999px;background:transparent;color:var(--accent-text,var(--accent));font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.own-action:hover{background:color-mix(in srgb,var(--accent-text,var(--accent)) 14%,transparent)}
.own-action:focus-visible,.own-create-button:focus-visible{outline:2px solid var(--ink,currentColor);outline-offset:3px}

/* ---- the tutorial card: a click anywhere on it opens the community dialog; the text is still readable through "Mehr lesen" ---- */
.news-card[data-own=tutorial]{cursor:pointer}
.news-card[data-own=tutorial] :is(.card-detail,.card-footer,a,button){cursor:auto}
.news-card[data-own=tutorial] button{cursor:pointer}
.own-create{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:14px 0 6px}
.own-create-button{display:inline-flex;align-items:center;gap:8px;min-height:40px}
.own-create-button svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.own-create-hint{min-width:0;font-size:12px;font-weight:700;line-height:1.3;color:var(--metadata,var(--muted))}
@media(forced-colors:active){.own-status{border-color:CanvasText}.own-note{border-color:Highlight}}
