.public-readonly main{max-width:1440px}
.public-readonly .topbar{margin-bottom:14px}
.readonly-banner{display:flex;align-items:center;gap:12px;margin:0 0 22px;padding:14px 16px;border:1px solid #bfe8dc;border-radius:16px;background:#eefaf6;color:#164f43}
.readonly-banner .readonly-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:12px;background:#18a384;color:#fff;font-size:.78rem;font-weight:800}
.readonly-banner div{display:grid;gap:2px;min-width:0}
.readonly-banner strong{font-size:1rem}
.readonly-banner small{color:#4f746b;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
.public-readonly .schedule-grid{display:block}
.public-readonly .readonly-schedule-card{width:100%;padding:0;overflow:hidden}
.public-readonly .readonly-schedule-card .card-head{padding:20px 22px 14px}
.public-readonly .readonly-schedule-card .table-wrap{border-radius:0}
.public-readonly .readonly-schedule-card table{min-width:0}
.public-readonly .readonly-schedule-card th:first-child{width:150px}
.public-readonly .readonly-schedule-card th:last-child{width:220px}
.name-chips{display:flex;flex-wrap:wrap;gap:7px}
.name-chip{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;background:#e7f7f2;color:#0d6f5a;font-weight:700;line-height:1.2}
.name-chip.unresolved{background:#fff3d8;color:#895f00}
.schedule-day td{vertical-align:top}
.schedule-note.empty{display:none!important}
.public-readonly #refreshScheduleBtn{display:none!important}
.public-readonly .bottom-nav{grid-template-columns:1fr}
.public-readonly .bottom-nav button{font-size:1.25rem}
.public-readonly .bottom-nav small{font-size:.75rem;font-weight:700}
#readonlyMonthSelect{width:250px;min-height:46px;padding:0 42px 0 14px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--navy);font:inherit;font-weight:700}
.readonly-source-table{display:none!important}
.pr-calendar{padding:0 20px 22px}
.today-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:18px 20px;border-radius:18px;background:linear-gradient(135deg,#0d765f,#18a384);color:#fff}
.today-summary>div:first-child{display:grid;gap:2px}
.today-summary small{color:#d9fff4;font-weight:700}
.today-summary strong{font-size:1.35rem}
.today-people{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.calendar-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:16px;background:#fff}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px}
.calendar-weekdays{position:sticky;top:0;z-index:1;background:#eef5f4;border-bottom:1px solid var(--line)}
.calendar-weekdays strong{padding:11px 8px;text-align:center;color:#476068;font-size:.82rem}
.calendar-day{min-height:132px;padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}
.calendar-day:nth-child(7n){border-right:0}
.calendar-day.empty{background:#f8fafb}
.calendar-day.today{background:#effbf7;box-shadow:inset 0 0 0 2px var(--teal)}
.calendar-day header{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}
.calendar-day header strong{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;color:var(--navy)}
.calendar-day.today header strong{background:var(--teal);color:#fff}
.calendar-day header span{color:var(--muted);font-size:.72rem;font-weight:700}
.calendar-people{display:grid;gap:5px}
.calendar-person{display:inline-flex;align-items:center;gap:7px;min-width:0;padding:5px 8px;border:0;border-radius:999px;background:#e7f7f2;color:#0d6f5a;font:inherit;font-size:.8rem;font-weight:700;text-align:left}
.calendar-person>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-person.unresolved{background:#fff3d8;color:#895f00}
.photo-trigger{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.photo-trigger:hover,.photo-trigger:focus-visible{transform:translateY(-1px);box-shadow:0 0 0 3px rgba(16,135,108,.16);outline:none}
.pr-photo{flex:0 0 30px;width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.85);background:#fff}
.pr-photo-fallback{display:grid;place-items:center;background:#bde9dc;color:#0d765f;font-weight:800}
.calendar-person.compact{padding:3px 6px}
.calendar-person.compact .pr-photo{flex-basis:24px;width:24px;height:24px}
.pr-photo-lightbox{width:min(92vw,620px);max-width:none;padding:0;border:0;border-radius:24px;background:#101715;color:#fff;box-shadow:0 30px 90px rgba(0,0,0,.5);overflow:hidden}
.pr-photo-lightbox::backdrop{background:rgba(3,10,9,.82);backdrop-filter:blur(5px)}
.pr-photo-lightbox>img{display:block;width:100%;height:min(72vh,650px);object-fit:contain;background:#08100e}
.pr-photo-lightbox>strong{display:block;padding:14px 56px 16px 20px;font-size:1.1rem}
.photo-lightbox-close{position:absolute;z-index:1;top:12px;right:12px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(0,0,0,.66);color:#fff;font-size:1.8rem;line-height:1;cursor:pointer;box-shadow:0 2px 12px rgba(0,0,0,.3)}
.photo-lightbox-close:focus-visible{outline:3px solid #79e3c8;outline-offset:2px}

@media(max-width:760px){
  .public-readonly main{padding:18px 14px 88px}
  .public-readonly .topbar{align-items:center;margin-bottom:12px}
  .public-readonly .topbar h1{font-size:1.45rem}
  .readonly-banner{align-items:flex-start;margin-bottom:18px;padding:13px 14px}
  .readonly-banner .readonly-icon{flex-basis:38px;height:38px}
  .public-readonly #scheduleView .section-head{gap:12px;margin-bottom:14px}
  .public-readonly #scheduleView .section-head h2{font-size:1.12rem;line-height:1.45;margin:0}
  .public-readonly .schedule-actions{display:block;width:100%}
  .public-readonly .schedule-actions input{width:100%;min-width:0}
  #readonlyMonthSelect{width:100%}
  .pr-calendar{padding:0 12px 16px}
  .today-summary{align-items:flex-start;flex-direction:column;padding:16px}
  .today-summary strong{font-size:1.16rem}
  .today-people{justify-content:flex-start}
  .calendar-scroll::before{content:'เลื่อนซ้าย–ขวาเพื่อดูทั้งเดือน';display:block;padding:8px 12px;background:#fff7df;color:#7c5a00;font-size:.75rem;font-weight:700}
  .calendar-grid{grid-template-columns:repeat(7,minmax(108px,1fr));min-width:756px}
  .calendar-day{min-height:122px;padding:8px}
  .calendar-weekdays strong{padding:9px 5px;font-size:.74rem}
  .public-readonly .readonly-schedule-card .card-head{padding:17px 16px 10px}
  .public-readonly .readonly-schedule-card .card-head{display:grid;gap:8px}
  .public-readonly .readonly-schedule-card .card-head>span{line-height:1.5}
  .public-readonly .readonly-schedule-card table,.public-readonly .readonly-schedule-card tbody{display:block;width:100%}
  .public-readonly .readonly-schedule-card .table-wrap{overflow:hidden}
  .public-readonly .readonly-schedule-card thead{display:none}
  .public-readonly .schedule-day{display:grid;grid-template-columns:1fr;gap:9px;padding:16px;border-top:1px solid var(--line)}
  .public-readonly .schedule-day:first-child{border-top:0}
  .public-readonly .schedule-day td{display:block;padding:0!important;border:0!important}
  .public-readonly .schedule-day,.public-readonly .schedule-day td,.public-readonly .name-chips{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
  .public-readonly .name-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .public-readonly .schedule-day td:first-child{color:var(--navy);font-size:.96rem}
  .public-readonly .schedule-day td:nth-child(2){grid-column:1}
  .public-readonly .schedule-day td:last-child{grid-column:1;color:var(--muted);font-size:.82rem}
  .name-chip{display:flex;justify-content:center;text-align:center;font-size:.82rem;min-height:30px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
