/* Chinese Perpetual Calendar — RT-CHN-094 (萬年曆)
   Browsable month-grid calendar (lunar + Gregorian) → tap a day for the
   full 老黃曆. Warm amber 萬年曆 theme. 100% browser-local — NO network.
   Styles also mirrored in the Blade @push('head') block so the widget
   renders identically whether served by Blade or as a static tool page.
*/
.pc-wrap { display: flex; flex-direction: column; gap: 14px; }
.pc-note { padding: 10px 14px; background: #FEF3C7; border-left: 3px solid #B45309; border-radius: 0 6px 6px 0; font-size: 12.5px; color: #78350F; line-height: 1.5; }

.pc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; background: var(--rt-surface-2); border: 1px solid var(--rt-hairline); border-radius: 8px; }
.pc-nav { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 700; background: #fff; color: #B45309; border: 1px solid rgba(180,83,9,.4); }
.pc-nav:hover { background: #FEF3C7; }
.pc-nav:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(180,83,9,.18); }
.pc-selects { display: flex; gap: 8px; flex: 1 1 auto; justify-content: center; }
.pc-select { padding: 9px 12px; border: 1px solid var(--rt-hairline); border-radius: 6px; font-size: 14px; background: #fff; color: var(--t1, #1a1814); font-family: var(--rt-font-sans); }
.pc-select:focus { outline: none; border-color: #B45309; box-shadow: 0 0 0 3px rgba(180,83,9,.12); }
.pc-today-btn { padding: 9px 16px; font-size: 12.5px; border-radius: 6px; cursor: pointer; font-family: var(--rt-font-mono); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; background: #fff; color: #B45309; border: 1px solid rgba(180,83,9,.4); }
.pc-today-btn:hover { background: #FEF3C7; }

.pc-title { text-align: center; font-family: var(--rt-font-sans); font-size: 17px; font-weight: 700; color: #78350F; padding: 2px 0; }

.pc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pc-dow { text-align: center; font-family: var(--rt-font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--rt-ink-muted); padding: 6px 0; }
.pc-dow.pc-dow-sun, .pc-dow.pc-dow-sat { color: #b45309; }

.pc-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; min-height: 64px; padding: 6px 2px 4px; border: 1px solid var(--rt-hairline); border-radius: 8px; background: #fff; cursor: pointer; text-align: center; transition: background .12s, border-color .12s; }
.pc-cell:hover { background: #FFFBEB; border-color: rgba(180,83,9,.4); }
.pc-cell:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(180,83,9,.18); }
.pc-cell.pc-empty { background: transparent; border-color: transparent; cursor: default; }
.pc-cell.pc-empty:hover { background: transparent; }
.pc-cell.pc-today { border-color: #B45309; background: #FEF3C7; }
.pc-cell.pc-selected { border-color: #B45309; box-shadow: 0 0 0 2px rgba(180,83,9,.45); background: #FFFBEB; }
.pc-cell.pc-today.pc-selected { background: #FEF3C7; }

.pc-gday { font-size: 17px; font-weight: 700; line-height: 1.1; color: var(--t1, #1a1814); }
.pc-cell.pc-sun .pc-gday, .pc-cell.pc-sat .pc-gday { color: #b45309; }
.pc-lday { font-size: 10.5px; line-height: 1.2; color: var(--rt-ink-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-lday.pc-lmonth { color: #b45309; font-weight: 700; }
.pc-markers { display: flex; gap: 3px; margin-top: 1px; min-height: 6px; align-items: center; }
.pc-dot { width: 6px; height: 6px; border-radius: 999px; }
.pc-dot-term { background: #047857; }
.pc-dot-fest { background: #dc2626; }
.pc-tag { font-size: 9.5px; line-height: 1.1; padding: 1px 4px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-tag-term { color: #065F46; background: #ECFDF5; border: 1px solid rgba(5,150,105,.3); }
.pc-tag-fest { color: #991B1B; background: #FEF2F2; border: 1px solid rgba(220,38,38,.3); }

.pc-error { padding: 14px 18px; background: #FEF3C7; border: 1px solid rgba(180,83,9,.3); border-radius: 8px; color: #78350F; font-size: 13.5px; }

/* Detail panel */
.pc-detail { padding: 0; }
.pc-detail-empty { padding: 14px 18px; text-align: center; color: var(--rt-ink-muted); font-style: italic; font-size: 13.5px; background: var(--rt-bg-inset); border-radius: 8px; }
.pc-summary { padding: 14px 18px; background: var(--rt-result-bg); color: var(--rt-result-ink); border: 1px solid rgba(180,83,9,.22); border-radius: 10px; margin-bottom: 12px; }
.pc-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.pc-sum-lbl { color: var(--rt-result-muted); font-family: var(--rt-font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.pc-sum-val { font-family: var(--rt-font-sans); color: var(--rt-result-ink); font-size: 15px; text-align: right; }

.pc-yiji { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (max-width: 480px) { .pc-yiji { grid-template-columns: 1fr; } }
.pc-yi, .pc-ji { padding: 12px 14px; border-radius: 8px; }
.pc-yi { background: #ECFDF5; border: 1px solid rgba(5,150,105,.28); }
.pc-ji { background: #FEF2F2; border: 1px solid rgba(220,38,38,.28); }
.pc-yiji-title { font-family: var(--rt-font-mono); font-size: 13px; font-weight: 800; letter-spacing: .04em; margin-bottom: 8px; }
.pc-yi .pc-yiji-title { color: #047857; }
.pc-ji .pc-yiji-title { color: #b91c1c; }
.pc-yiji-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chip { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: #fff; }
.pc-yi .pc-chip { color: #065F46; border: 1px solid rgba(5,150,105,.3); }
.pc-ji .pc-chip { color: #991B1B; border: 1px solid rgba(220,38,38,.3); }
.pc-none { font-size: 12.5px; color: var(--rt-ink-muted); font-style: italic; }

.pc-block { padding: 14px 18px; background: var(--rt-bg-inset); border-radius: 8px; }
.pc-block-title { font-family: var(--rt-font-mono); font-size: 11.5px; color: var(--rt-ink-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; margin-bottom: 10px; }
.pc-block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
@media (max-width: 480px) { .pc-block-grid { grid-template-columns: 1fr; } }
.pc-block-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed rgba(0,0,0,.06); }
.pc-block-lbl { color: var(--rt-ink-muted); font-family: var(--rt-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.pc-block-val { color: var(--t1, #1a1814); text-align: right; }
.pc-luck-good { color: #047857; font-weight: 700; }
.pc-luck-bad { color: #b91c1c; font-weight: 700; }
.pc-fest { margin-top: 10px; font-size: 12.5px; color: #78350F; }
.pc-fest-chip { display: inline-block; background: #FEF3C7; border: 1px solid rgba(180,83,9,.3); border-radius: 999px; padding: 2px 10px; margin: 2px 4px 2px 0; }

/* Keep 7 columns on small screens but shrink the cell internals. */
@media (max-width: 560px) {
  .pc-grid { gap: 3px; }
  .pc-cell { min-height: 54px; padding: 4px 1px 3px; border-radius: 6px; }
  .pc-gday { font-size: 14px; }
  .pc-lday { font-size: 9px; }
  .pc-tag { font-size: 8.5px; padding: 1px 3px; }
  .pc-dow { font-size: 9.5px; }
  .pc-selects { flex-wrap: wrap; }
}
