/* First page additions and the Event Calendar page (assets/calendar.js) */
#kd2041-front section[aria-labelledby="kd-calendar-title"] { display: none; }
#kd2041-front #kdc-kvk:empty { display: none; }
/* Kingdom Quick Stats and MGE: one under the other, each card row in one line */
#kd2041-front .kd-panel-grid { grid-template-columns: minmax(0, 1fr) !important; }
#kd2041-front #kingdom-info { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
#kd2041-front #mge-info { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 700px) {
  #kd2041-front #kingdom-info, #kd2041-front #mge-info { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

.kdc { color: #ece9f7; font-family: inherit; }
.kdc *, .kdc *::before { box-sizing: border-box; }
.kdc-muted { margin: 0; color: #b8afce; font-size: 15px; }
.kdc-kick { margin: 0 0 4px; color: #f5c451; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.kdc-pad { padding: 14px 18px 16px; }
.kdc-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px 40px; }
.kdc-two .kdc-kick { padding-bottom: 8px; border-bottom: 1px solid rgba(245, 196, 81, .25); }
.kdc-none { padding: 12px 0; }
.kdc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.kdc-foot .kdc-legend { margin: 0; }
a.kdc-btn.kdc-link { display: inline-flex; align-items: center; color: #f5c451; text-decoration: none; }
a.kdc-btn.kdc-link::after { content: "\2192"; margin-left: 8px; }
a.kdc-btn.kdc-link:hover { background: #f5c451; color: #08110d; }

.kdc-hero { padding: 20px; margin: 0 0 16px; border-color: rgba(245, 196, 81, .42) !important; }
.kdc-hero-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.kdc-h1 { margin: 4px 0; color: #ece9f7; font-family: Cinzel, serif; font-size: clamp(25px, 4vw, 34px); line-height: 1.15; }
.kdc-cds { display: flex; gap: 8px; }
.kdc-cd { min-width: 72px; padding: 10px 12px; border-radius: 8px; background: #0b0812; text-align: center; }
.kdc-cd b { display: block; font-size: 28px; line-height: 1.1; }
.kdc-cd span { color: #b8afce; font-size: 12px; }
.kdc-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.kdc-stages i { display: block; height: 7px; border-radius: 4px; background: #2a2138; }
.kdc-stages span { display: block; margin-top: 7px; color: #b8afce; font-size: 13px; font-weight: 700; }
.kdc-stages .is-on i, .kdc-stages .is-done i { background: #f5c451; }
.kdc-stages .is-done i { opacity: .55; }
.kdc-stages .is-on span { color: #f5c451; }

.kdc-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 15px; }
.kdc-row:last-child { border-bottom: 0; }
.kdc-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.kdc-when { color: #b8afce; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.kdc-dot { display: inline-block; width: 10px; height: 10px; border: 2px solid; border-radius: 50%; background: currentColor; }
.kdc-dot.kdc-s-exp { background: transparent; }
.kdc-legend span { display: inline-flex; align-items: center; gap: 6px; color: #b8afce; font-size: 13px; }
.kdc-legend .kdc-dot { width: 9px; height: 9px; }
.kdc-s-game { color: #7dea9a; border-color: #7dea9a; }
.kdc-s-tl { color: #f5c451; border-color: #f5c451; }
.kdc-s-off { color: #e0a3ff; border-color: #e0a3ff; }
.kdc-s-exp { color: #b8afce; border-color: #b8afce; border-style: dashed; }

.kdc-box { margin: 0 0 16px; padding: 18px; border: 1px solid rgba(168, 85, 247, .24); border-radius: 8px; background: rgba(16, 13, 27, .86); }
.kdc-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.kdc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kdc-btn { min-height: 44px; padding: 0 13px; border: 1px solid rgba(245, 196, 81, .5); border-radius: 8px; background: transparent; color: #ece9f7; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.kdc-btn:hover { border-color: #f5c451; }
.kdc-btn.is-on { background: #f5c451; color: #08110d; }
.kdc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.kdc-head h2 { margin: 0; color: #ece9f7; font-family: Cinzel, serif; font-size: 22px; }
.kdc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kdc-dow { padding: 4px; color: #b8afce; font-size: 13px; font-weight: 700; }
.kdc-day { display: flex; flex-direction: column; gap: 3px; min-height: 112px; min-width: 0; padding: 5px; border-radius: 6px; background: #0b0812; }
.kdc-day.is-out { background: transparent; opacity: .55; }
.kdc-day.is-today { background: #2a1f3f; box-shadow: inset 0 0 0 1px #f5c451; }
.kdc-n { font-size: 13px; font-weight: 700; }
.kdc-ev { padding: 2px 4px; overflow: hidden; border: 1px solid; border-radius: 4px; color: #ece9f7; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.kdc-more { color: #b8afce; font-size: 12px; }
.kdc-lday h3 { margin: 16px 0 2px; color: #f5c451; font-size: 15px; }
.kdc-lday:first-child h3 { margin-top: 0; }

/* KvK Timeline (Officer Tools) */
.kdo-tl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.kdo-tl-form input { flex: 1 1 320px; min-width: 0; }
.kdo-tl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.kdo-tl-cards > div { padding: 12px; border-radius: 10px; background: #0b0812; }
.kdo-tl-cards span, .kdo-tl-cards small { display: block; color: #b8afce; font-size: 13px; }
.kdo-tl-cards b { display: block; margin: 2px 0; font-size: 16px; }
.kdo-tl-cards small.is-ok { color: #7dea9a; }
.kdo-tl-cards small.is-bad { color: #ff9aa8; }
.kdo-tl-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.kdo-tl-cat { min-height: 56px; padding: 8px 12px; border: 1px solid rgba(168, 85, 247, .28); border-radius: 8px; background: transparent; color: #ece9f7; font: inherit; text-align: left; cursor: pointer; }
.kdo-tl-cat.is-on { border-color: #f5c451; background: #2a1f3f; }
.kdo-tl-cat b { display: block; font-size: 15px; }
.kdo-tl-cat small { display: block; color: #b8afce; font-size: 13px; }
.kdo-tl-list { max-height: 460px; overflow: auto; }
