/* Calendar and post composer. Same ink, lines and radius as the rest of the app. */
.pc-muted { color: var(--muted); }
.pc-error { color: var(--red-ink); }
.pc-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pc-toolbar .pc-account { margin-left: auto; }
.pc-monthnav { display: flex; align-items: center; gap: 6px; }
.pc-monthnav strong { min-width: 140px; text-align: center; font-size: var(--text-sm); }
.pc-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.pc-filters button { border: 1px solid transparent; background: none; border-radius: var(--radius-full); padding: 5px 11px; font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
.pc-filters button.active { background: var(--surface); border-color: var(--line); color: var(--ink); }
.pc-filters span { color: var(--faint); font-weight: 500; }

.scheduled, .preparing, .processing, .checking, .publishing { --tone: var(--ink); }
.draft { --tone: var(--faint); }
.published { --tone: var(--green); }
.failed, .review { --tone: var(--red); }

.pc-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.pc-weekday { padding: 9px 10px; font-size: var(--text-xs); color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line); }
.pc-day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-day:nth-child(7n) { border-right: 0; }
.pc-day.out { background: var(--bg); }
.pc-day.out .pc-daynum span { color: var(--faint); }
.pc-day.over { background: var(--gray-100); }
.pc-daynum { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-xs); font-weight: 600; }
.pc-daynum span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.pc-day.today .pc-daynum span { background: var(--ink); color: var(--surface); }
.pc-daynum button { width: 22px; height: 22px; border: 0; border-radius: var(--radius-sm); background: var(--gray-100); opacity: 0; line-height: 1; }
.pc-day:hover .pc-daynum button, .pc-daynum button:focus-visible { opacity: 1; }
.pc-chip { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 5px 3px 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; min-width: 0; }
.pc-chip:hover { border-color: var(--faint); }
.pc-chip.draft { border-style: dashed; }
.pc-chip img, .pc-chip .pc-nothumb { width: 28px; height: 28px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.pc-nothumb { display: grid; place-items: center; background: var(--gray-100); color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.pc-chip > span:not(.pc-nothumb) { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.pc-chip b { font-size: 11px; font-weight: 600; }
.pc-chip small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-chip i, .pc-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--tone); flex: none; }
.pc-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: var(--text-xs); color: var(--muted); }
.pc-legend > span { display: flex; align-items: center; gap: 6px; }
.pc-legend .pc-zone { margin-left: auto; color: var(--faint); }

.pc-list { overflow: hidden; }
.pc-list.pc-narrow { display: none; }
.pc-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: left; }
.pc-row:last-child { border-bottom: 0; }
.pc-row:hover { background: var(--bg); }
.pc-row img, .pc-row .pc-nothumb { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; flex: none; }
.pc-row-main { display: grid; min-width: 0; flex: 1; }
.pc-row-main strong, .pc-row-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-row-main small { color: var(--muted); font-size: var(--text-xs); }
.pc-row-main small.pc-error { color: var(--red-ink); white-space: normal; }
.pc-status { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.pc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.pc-details { display: grid; gap: 12px; }
.pc-details img { width: 120px; border-radius: var(--radius); }
.pc-details p { white-space: pre-wrap; overflow-wrap: anywhere; }

.pc-composer { position: fixed; inset: 0; z-index: 90; background: var(--bg); }
.pc-composer [hidden] { display: none !important; }
.pc-composer form { display: flex; flex-direction: column; height: 100%; }
.pc-top, .pc-foot { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--surface); flex: none; flex-wrap: wrap; }
.pc-top { border-bottom: 1px solid var(--line); }
.pc-foot { border-top: 1px solid var(--line); gap: 8px; }
.pc-types { margin: 0 auto; }
.pc-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 600px) 340px; justify-content: center; align-items: start; gap: 28px; padding: 24px 20px; }
.pc-edit { display: grid; gap: 14px; }
.pc-section { display: grid; gap: 14px; }
.pc-more { display: block; padding: 0 20px; }
.pc-more summary { cursor: pointer; font-weight: 600; padding: 15px 0; }
.pc-more[open] { padding-bottom: 18px; }
.pc-more > :not(summary) { margin-top: 12px; }
.pc-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.pc-toggle > span:first-child { display: grid; }
.pc-toggle b { font-weight: 500; }
.pc-toggle small { color: var(--faint); font-size: var(--text-xs); }
.pc-counters { display: flex; gap: 14px; margin-top: -8px; font-size: var(--text-xs); color: var(--faint); }
.pc-poll { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.pc-media { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-drop { width: 100%; min-height: 168px; display: grid; place-content: center; justify-items: center; gap: 6px; border: 1px dashed var(--gray-300); border-radius: var(--radius); background: var(--bg); }
.pc-drop span { color: var(--faint); font-size: var(--text-xs); }
.pc-drop:hover, .pc-drop.over { border-color: var(--ink); }
.pc-thumb { position: relative; width: 78px; height: 78px; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); display: grid; place-items: center; }
.pc-thumb.active { border-color: var(--ink); }
.pc-thumb :is(img, video) { width: 100%; height: 100%; object-fit: cover; }
.pc-add { border: 1px dashed var(--gray-300); }
.pc-progress, .pc-badge { position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: var(--radius-full); background: rgba(17, 24, 39, .75); color: #fff; font-size: 11px; font-weight: 600; }
.pc-badge .icon { width: 11px; height: 11px; }
.pc-itembar, .pc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pc-tags button { border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius-full); padding: 3px 10px; font-size: var(--text-xs); }
.pc-cover { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pc-cover :is(img, video) { width: 56px; height: 100px; object-fit: cover; border-radius: var(--radius); background: var(--gray-100); }
.pc-cover input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--ink); }

.pc-side { position: sticky; top: 0; display: grid; gap: 8px; justify-items: center; }
.pc-phone { position: relative; width: 300px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); }
.pc-user { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: var(--text-xs); }
.pc-user span { position: relative; overflow: hidden; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-weight: 600; }
.pc-frame { position: relative; background: var(--gray-100); }
.pc-frame :is(img, video) { display: block; width: 100%; }
.pc-frame.tagging { cursor: crosshair; }
.pc-frame.pc-empty { display: grid; place-items: center; aspect-ratio: 1; color: var(--faint); font-size: var(--text-xs); }
.pc-tag { position: absolute; transform: translate(-50%, 4px); padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(17, 24, 39, .85); color: #fff; font-size: 11px; white-space: nowrap; pointer-events: none; }
.pc-phone.feed > p { padding: 8px 12px 14px; font-size: var(--text-xs); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 130px; overflow-y: auto; }
.pc-phone.full { aspect-ratio: 9 / 16; background: var(--ink); }
.pc-phone.full .pc-frame { height: 100%; background: var(--ink); display: grid; align-items: center; color: var(--faint); }
.pc-phone.full .pc-frame :is(img, video) { max-height: 100%; height: 100%; object-fit: contain; min-height: 0; }
.pc-overlay { position: absolute; inset: 0 0 auto; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); pointer-events: none; }
.pc-user img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-overlay .pc-user span { background: #fff; color: var(--ink); text-shadow: none; }
.pc-overlay p { padding: 0 12px; font-size: var(--text-xs); max-height: 60px; overflow: hidden; }
.pc-dots { display: flex; justify-content: center; gap: 5px; padding-top: 8px; }
.pc-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--gray-300); }
.pc-dots button.active { background: var(--ink); }

.pc-limit { color: var(--faint); font-size: var(--text-xs); }
.pc-foot .pc-error { flex: 1; font-size: var(--text-xs); text-align: right; min-width: 0; }

@media (max-width: 860px) {
  .pc-month, .pc-legend, .pc-monthnav { display: none; }
  .pc-list.pc-narrow { display: block; }
  .pc-body { grid-template-columns: minmax(0, 1fr); }
  .pc-side { position: static; }
  .pc-types { order: 3; margin: 0; width: 100%; }
  .pc-top .pc-account { margin-left: auto; }
  .pc-limit { display: none; }
  .pc-foot .pc-error:empty { display: none; }
  .pc-foot .pc-error { flex-basis: 100%; text-align: left; }
}
.pc-chip b { white-space: nowrap; }
@media (max-width: 1180px) { .pc-chip { flex-wrap: wrap; justify-content: center; padding: 4px 2px; text-align: center; } .pc-chip > span:not(.pc-nothumb) { flex: 0 0 100%; justify-content: center; order: 3; } .pc-chip small, .pc-chip i { display: none; } .pc-chip img, .pc-chip .pc-nothumb { width: 100%; max-width: 44px; height: 44px; } .pc-chip.failed, .pc-chip.review { border-color: var(--red); } .pc-chip.published { border-color: var(--green); } }
