/* Calendar follows the site's existing light/dark tokens. */
.tibo-panel-intro { display: grid; grid-template-columns: minmax(0, 1fr) 92px; column-gap: 20px; row-gap: 18px; align-items: center; }
.tibo-panel-intro > .all-news-heading { grid-column: 1; grid-row: 1; min-width: 0; }
.tibo-panel-intro > .news-status { grid-column: 1; grid-row: 2; min-width: 0; }
#allNewsView:has([data-knowledge-section="news"].is-active) #allNewsMeta { display: none; }
.tibo-trigger { position: relative; grid-column: 2; grid-row: 1 / span 2; justify-self: end; z-index: 5; width: 76px; height: 76px; padding: 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); box-shadow: 0 6px 24px var(--shadow); transition: transform 180ms ease, border-color 180ms ease; }
.tibo-trigger > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: saturate(.7); }
.tibo-trigger:hover { transform: translateY(-3px); border-color: var(--muted); }
.tibo-tooltip { position: absolute; left: 65%; bottom: calc(100% + 12px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px 9px 9px 2px; color: var(--ink); background: var(--panel-solid); box-shadow: 0 8px 24px var(--shadow); font-size: 13px; white-space: nowrap; opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.tibo-trigger:hover .tibo-tooltip, .tibo-trigger:focus-visible .tibo-tooltip { opacity: 1; transform: none; }
.tibo-dialog { --tibo-surface: #101112; --tibo-cell: #18191a; --tibo-post: #151617; --tibo-green: #91b6a8; --tibo-green-bg: #1b2824; --tibo-amber: #c4af8c; --tibo-amber-bg: #29251f; width: min(1280px, calc(100vw - 64px)); max-width: none; max-height: calc(100dvh - 64px); margin: auto; padding: 0; color: var(--ink); background: var(--tibo-surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 120px #0008; overflow: auto; overscroll-behavior: contain; }
body[data-theme="light"] .tibo-dialog { --tibo-surface: #fdfdfb; --tibo-cell: #f3f3f0; --tibo-post: #fff; --tibo-green: #476e5e; --tibo-green-bg: #eaf0ec; --tibo-amber: #8b7048; --tibo-amber-bg: #f3efe7; }
.tibo-dialog::backdrop { background: #000a; backdrop-filter: blur(7px); }
.tibo-dialog[open] { animation: tibo-appear 180ms ease-out; }
.tibo-dialog button, .tibo-dialog a { -webkit-tap-highlight-color: transparent; }
.tibo-dialog button:focus-visible, .tibo-dialog a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tibo-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 30px; border-bottom: 1px solid var(--line); }
.tibo-heading { display: flex; align-items: center; gap: 13px; }
.tibo-heading img, .tibo-post-author img { border-radius: 50%; object-fit: cover; }
.tibo-heading p { margin: 0 0 5px; color: var(--muted); font-size: 10px; letter-spacing: .15em; }
.tibo-heading h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .01em; }
.tibo-header-actions { display: flex; align-items: center; gap: 22px; }
.tibo-header-actions > span { color: var(--muted); font-size: 11px; }
.tibo-header-actions .icon-button { width: 34px; height: 34px; }
.tibo-overview { display: grid; grid-template-columns: 1.12fr 1fr; border-bottom: 1px solid var(--line); }
.tibo-history, .tibo-prediction { min-width: 0; padding: 22px 30px; }
.tibo-history { position: relative; --tibo-history-reset: #407d68; --tibo-history-credit: #a17a3e; }
body[data-theme="light"] .tibo-history { --tibo-history-reset: #7eb39b; --tibo-history-credit: #d0a15d; }
.tibo-history-tooltip { position: absolute; z-index: 6; max-width: min(300px, calc(100% - 16px)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-solid); color: var(--ink); box-shadow: 0 6px 20px var(--shadow); font-size: 12px; line-height: 1.7; pointer-events: none; }
.tibo-prediction { border-left: 1px solid var(--line); }
.tibo-overview-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.tibo-overview-heading h3 { margin: 0; font-size: 14px; font-weight: 550; }
.tibo-overview-heading > span, .tibo-overview-heading > a { color: var(--muted); font-size: 10px; text-decoration: none; }
.tibo-overview-heading > a:hover { text-decoration: underline; color: var(--ink); }
.tibo-history-grid { display: grid; grid-template-columns: repeat(18, minmax(24px, 1fr)); grid-template-rows: repeat(5, 26px); gap: 4px; margin-top: 14px; padding: 3px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tibo-history-day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 1px 0; border: 1px solid transparent; border-radius: 4px; background: var(--tibo-cell); color: var(--muted); font-variant-numeric: tabular-nums; }
.tibo-history-day.has-reset { background: var(--tibo-history-reset); color: var(--tibo-green); }
.tibo-history-day.has-credit { background: var(--tibo-history-credit); color: var(--tibo-amber); }
.tibo-history-day.has-reset.has-credit { background: linear-gradient(135deg, var(--tibo-history-reset) 50%, var(--tibo-history-credit) 50%); color: var(--ink); }
.tibo-history-day.is-announced { border-color: var(--line); border-style: dashed; }
.tibo-history-day[aria-pressed="true"], .tibo-history-day:hover { border-color: var(--muted); }
.tibo-history-day[aria-current="date"] { border-color: var(--ink); color: var(--ink); }
.tibo-history-day.is-unknown { opacity: .3; }
.tibo-history-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 9px; color: var(--muted); }
.tibo-history-legend > span { display: flex; align-items: center; gap: 5px; }
.tibo-prediction-label { margin: 10px 0 13px; color: var(--muted); font-size: 10px; }
.tibo-prediction-days { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.tibo-prediction-days li > div { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.tibo-prediction-days time { font-size: 12px; color: var(--muted); }
.tibo-prediction-days strong { font-size: 18px; font-weight: 550; font-variant-numeric: tabular-nums; }
.tibo-prediction-days small { font-size: 10px; margin-left: 2px; font-weight: 400; color: var(--muted); }
.tibo-prediction-days meter { display: block; width: 100%; height: 4px; border: 0; border-radius: 3px; overflow: hidden; appearance: none; background: var(--soft); }
.tibo-prediction-days meter::-webkit-meter-bar { height: 4px; border: 0; border-radius: 3px; background: var(--soft); }
.tibo-prediction-days meter::-webkit-meter-optimum-value { background: var(--tibo-green); border-radius: 3px; }
.tibo-prediction-days meter::-moz-meter-bar { background: var(--tibo-green); }
.tibo-prediction-timing { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.tibo-prediction-timing strong { color: var(--ink); font-weight: 500; margin-left: 4px; }
.tibo-prediction-note { margin: 9px 0 0; font-size: 9px; color: var(--muted); line-height: 1.7; }
.tibo-prediction-note > span { display: block; color: var(--tibo-amber); }
.tibo-prediction-empty { display: grid; place-content: center; gap: 14px; min-height: 180px; color: var(--muted); font-size: 12px; text-align: center; }
.tibo-prediction-empty button { justify-self: center; border: 1px solid var(--line); border-radius: 6px; padding: 6px 14px; background: transparent; color: var(--ink); font-size: 11px; }
.tibo-notice { margin: 16px 30px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--tibo-amber); font-size: 12px; line-height: 1.7; }
.tibo-notice button { margin-left: 12px; border: 0; background: none; color: inherit; text-decoration: underline; }
.tibo-content { display: grid; grid-template-columns: 1.12fr 1fr; }
.tibo-calendar { padding: 30px; min-width: 0; }
.tibo-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tibo-month-nav h3 { margin: 0; font-size: 23px; font-weight: 620; letter-spacing: -.025em; }
.tibo-month-nav > div { display: flex; align-items: center; gap: 8px; }
.tibo-recent, .tibo-month-button { border: 0; background: transparent; color: var(--muted); }
.tibo-recent { font-size: 12px; padding: 10px; }
.tibo-month-button { display: grid; place-items: center; width: 30px; height: 32px; border-radius: 6px; }
.tibo-month-button svg { width: 18px; height: 18px; }
.tibo-recent:hover, .tibo-month-button:hover { color: var(--ink); background: var(--soft); }
.tibo-dialog button:disabled { opacity: .25; cursor: default; }
.tibo-month-summary { display: flex; align-items: center; gap: 6px; margin: 16px 0 30px; font-size: 12px; color: var(--muted); }
.tibo-month-summary strong { color: var(--ink); font-weight: 550; }
.tibo-month-summary > span { margin: 0 5px; }
.tibo-weekdays, .tibo-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.tibo-weekdays { margin-bottom: 12px; text-align: center; color: var(--muted); font-size: 12px; }
.tibo-day { display: flex; flex-direction: column; align-items: center; position: relative; min-height: 68px; padding: 11px 2px 8px; border: 1px solid transparent; border-radius: 8px; background: var(--tibo-cell); color: var(--ink); transition: border-color 140ms ease, background 140ms ease; }
.tibo-day-number { font-size: 16px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.tibo-day-number sup { position: absolute; margin-left: 3px; font-size: 9px; color: var(--muted); }
.tibo-day-label { margin-top: auto; padding-top: 8px; font-size: 10px; white-space: nowrap; }
.tibo-day-label small { display: block; margin-top: 2px; font-size: 8px; }
.tibo-day.has-reset { background: var(--tibo-green-bg); }
.tibo-day.has-reset .tibo-day-label { color: var(--tibo-green); }
.tibo-day.has-credit { background: var(--tibo-amber-bg); }
.tibo-day.has-credit .tibo-day-label { color: var(--tibo-amber); }
.tibo-day.is-announced { border: 1px dashed var(--line); }
.tibo-day.outside { opacity: .38; }
.tibo-day[aria-pressed="true"] { border: 1px solid var(--ink); box-shadow: inset 0 0 0 2px var(--tibo-surface); opacity: 1; }
.tibo-day:hover { border-color: var(--muted); }
.tibo-day[aria-current="date"] .tibo-day-number::after { content: ""; position: absolute; margin: 1px 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); }
.tibo-calendar-foot { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 23px; font-size: 10px; color: var(--muted); }
.tibo-calendar-foot > span { display: flex; align-items: center; gap: 6px; }
.tibo-dot { width: 6px; height: 6px; border-radius: 2px; }
.tibo-dot.reset { background: var(--tibo-green); }
.tibo-dot.credit { background: var(--tibo-amber); }
.tibo-dot.announced { border: 1px dashed var(--muted); }
.tibo-calendar-note { margin: 14px 0 0; font-size: 10px; color: var(--muted); line-height: 1.8; }
.tibo-details { min-width: 0; padding: 30px; border-left: 1px solid var(--line); max-height: 650px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tibo-detail-date { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tibo-detail-date h3 { margin: 0; font-size: 22px; font-weight: 600; }
.tibo-detail-date > span { color: var(--muted); font-size: 12px; }
.tibo-event + .tibo-event { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.tibo-event-status { margin: 0 0 12px; color: var(--tibo-green); font-size: 12px; }
.tibo-event-status.credit { color: var(--tibo-amber); }
.tibo-event-status.pending { color: var(--muted); }
.tibo-event-status > span { color: var(--muted); }
.tibo-event h4 { margin: 0 0 21px; font-size: 21px; font-weight: 600; line-height: 1.45; }
.tibo-receipt-note { font-size: 11px; line-height: 1.7; color: var(--muted); margin: -10px 0 18px; }
.tibo-post { padding: 20px; margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--tibo-post); }
.tibo-post-author { display: flex; align-items: center; gap: 10px; }
.tibo-post-author > div { display: grid; gap: 4px; }
.tibo-post-author strong { font-size: 14px; font-weight: 600; }
.tibo-post-author span { color: var(--muted); font-size: 11px; }
.tibo-post-author time { margin-left: auto; color: var(--muted); font-size: 10px; text-align: right; }
.tibo-post-text { margin: 22px 0; font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.tibo-schedule { color: var(--tibo-green); font-size: 11px; line-height: 1.8; }
.tibo-post-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10px; }
.tibo-post-footer a, .tibo-footer a { text-decoration: none; }
.tibo-post-footer a:hover, .tibo-footer a:hover { color: var(--ink); text-decoration: underline; }
.tibo-empty { display: grid; justify-items: center; align-content: center; min-height: 300px; text-align: center; color: var(--muted); }
.tibo-empty > span { font-size: 36px; opacity: .5; }
.tibo-empty h4 { margin: 16px 0 0; color: var(--ink); font-size: 16px; font-weight: 500; }
.tibo-empty p { font-size: 12px; line-height: 1.9; }
.tibo-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 30px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
@keyframes tibo-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 2200px) {
  .tibo-tooltip { left: auto; right: 0; }
}
@media (max-width: 900px) {
  .tibo-dialog { width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .tibo-dialog-header { padding: 20px; }
  .tibo-overview { grid-template-columns: 1fr; }
  .tibo-history, .tibo-prediction { padding: 22px 24px; }
  .tibo-prediction { border-left: 0; border-top: 1px solid var(--line); }
  .tibo-content { grid-template-columns: 1fr; }
  .tibo-calendar { padding: 24px; }
  .tibo-details { border-left: 0; border-top: 1px solid var(--line); padding: 24px; max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
  .tibo-panel-intro { grid-template-columns: minmax(0, 1fr) 56px; column-gap: 12px; row-gap: 12px; }
  .tibo-trigger { width: 52px; height: 52px; }
  .tibo-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .tibo-dialog-header { padding: 16px; }
  .tibo-heading h2 { font-size: 17px; }
  .tibo-header-actions > span { display: none; }
  .tibo-history, .tibo-prediction { padding: 20px 14px; }
  .tibo-calendar, .tibo-details { padding: 22px 14px; }
  .tibo-month-nav h3 { font-size: 19px; }
  .tibo-month-nav > div { gap: 2px; }
  .tibo-month-summary { margin-bottom: 24px; font-size: 11px; }
  .tibo-day { min-height: 60px; padding-top: 9px; border-radius: 6px; }
  .tibo-day-number { font-size: 14px; }
  .tibo-day-label { font-size: 9px; }
  .tibo-day-number sup { font-size: 8px; }
  .tibo-weekdays, .tibo-days { gap: 4px; }
  .tibo-calendar-foot { gap: 12px; }
  .tibo-post { padding: 16px; }
  .tibo-post-text { font-size: 16px; }
  .tibo-footer { padding: 16px; font-size: 9px; }
  .tibo-notice { margin-left: 16px; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tibo-dialog[open] { animation: none; }
  .tibo-trigger, .tibo-tooltip, .tibo-day { transition: none; }
}
/* Only the news module reserves an avatar column. Other modules use full width. */
#allNewsView:not(:has([data-knowledge-section="news"].is-active)) .tibo-panel-intro { grid-template-columns:minmax(0,1fr); column-gap:0; }
#allNewsView:not(:has([data-knowledge-section="news"].is-active)) #tiboCalendarTrigger { display:none; }
