/* Planner + install UI — mobile-first, big tap targets */
.sr { position: absolute; left: -9999px; }
.planner-page input, .planner-page select, .planner-page textarea { font-size: 16px; min-height: 44px; }
.planner-page textarea { min-height: 80px; }
.planner-page .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
.pl-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: space-between; }
.pl-head h1 { margin: 0; }
.pl-for { font-weight: 500; color: var(--muted); font-size: 1rem; }
.pl-person select { max-width: 260px; }
.pl-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #e6edf3; padding: 4px; border-radius: 12px; margin: .75rem 0; }
.pl-tabs a { text-align: center; padding: .7rem .2rem; border-radius: 9px; color: var(--navy); font-weight: 600; font-size: .95rem; }
.pl-tabs a.on { background: #fff; box-shadow: var(--shadow); color: var(--teal-2); text-decoration: none; }
.pl-tabs a:hover { text-decoration: none; }
.pl-nav { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.pl-nav .btn { min-width: 48px; font-size: 1.4rem; padding: 0 .8rem; }
.pl-nav-label { flex: 1; text-align: center; display: flex; flex-direction: column; }
.pl-switch { display: flex; gap: .5rem; margin-bottom: 1rem; }
.pl-switch a { flex: 1; text-align: center; padding: .7rem; border: 2px solid var(--border); border-radius: 10px; color: var(--navy); font-weight: 600; background: #fff; }
.pl-switch a.on { border-color: var(--teal); color: var(--teal-2); background: #eefaf8; }
.pl-switch a:hover { text-decoration: none; }
.pl-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .pl-grid.daily { grid-template-columns: 1.1fr 1fr; align-items: start; } .pl-sched { position: sticky; top: 76px; } }
.pl-add-row { display: flex; gap: .5rem; }
.pl-add-row input { flex: 1; }
.pl-more { margin: .5rem 0 1rem; }
.pl-more summary, .pl-hist summary { cursor: pointer; color: var(--teal-2); padding: .4rem 0; font-weight: 600; }
.pl-more label, .pl-details label { display: block; font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.pl-more textarea, .pl-more input, .pl-details input, .pl-details textarea, .pl-details select { width: 100%; }
.pl-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .25rem; max-height: 200px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: .4rem; }
.pl-checks label { display: flex; align-items: center; gap: .4rem; color: var(--text); font-size: .95rem; margin: 0; min-height: 40px; }
.pl-checks input { min-height: auto; width: 20px; height: 20px; }
.pl-inline { display: flex !important; align-items: center; gap: .5rem; color: var(--text) !important; font-size: .95rem !important; min-height: 44px; }
.pl-inline input { width: 22px !important; height: 22px; min-height: auto !important; }
.pl-list { list-style: none; margin: 0; padding: 0; }
.pl-task { border: 1px solid var(--border); border-radius: 12px; margin-bottom: .5rem; background: #fff; transition: box-shadow .15s, border-color .15s; }
.pl-task.picked { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26,155,142,.25); }
.pl-task.done .pl-t { text-decoration: line-through; color: var(--muted); }
.pl-task.carried { opacity: .65; }
.pl-row { display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem; }
.pl-row form { margin: 0; }
.pl-check { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--teal); background: #fff; color: #fff; font-size: 1.3rem; font-weight: 700; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; }
.pl-task.done .pl-check { background: var(--ok); border-color: var(--ok); }
.pl-check.carried { border-color: var(--muted); color: var(--muted); }
.pl-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-t { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.pl-plus, .pl-pick { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: #f4f7fa; font-size: 1.35rem; cursor: pointer; flex: none; color: var(--navy); }
.pl-pick { font-size: 1.1rem; }
.pl-plus[aria-expanded="true"] { background: var(--navy); color: #fff; }
.pl-details { padding: .25rem .75rem .75rem; border-top: 1px dashed var(--border); }
.pl-sub { border-top: 1px solid #edf1f5; margin-top: .75rem; padding-top: .25rem; }
.pl-sub h4 { margin: .4rem 0 0; font-size: .95rem; }
.pl-hist ul { font-size: .82rem; padding-left: 1rem; }
.pl-empty { text-align: center; color: var(--muted); padding: 1.5rem 0; }
.pl-hint { margin-top: -.25rem; }
.pl-legend { font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.lg { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.lg.plan { background: #e0f2f1; border: 2px dashed var(--teal); }
.lg.log { background: var(--ok); }
.pl-cal { position: relative; margin-left: 52px; border-left: 1px solid var(--border); }
.pl-hour { position: absolute; left: 0; right: 0; height: 64px; border-top: 1px solid #e6edf3; cursor: pointer; }
.pl-hour:hover { background: #f3fbfa; }
.pl-hour span { position: absolute; left: -52px; top: -.55rem; font-size: .75rem; color: var(--muted); width: 46px; text-align: right; }
.pl-block { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 2px 8px; font-size: .82rem; text-align: left; overflow: hidden; cursor: pointer; z-index: 2; line-height: 1.25; font-family: inherit; }
.pl-block.plan { background: #e0f2f1; border: 2px dashed var(--teal); color: var(--navy); }
.pl-block.log { background: var(--ok); border: 1px solid #14653a; color: #fff; }
.pl-now { position: absolute; left: -6px; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.pl-now::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.pl-summary { font-size: 1.05rem; background: #eefaf8; border-left: 4px solid var(--teal); padding: .75rem; border-radius: 6px; }
.pl-summary.ai::after { content: ' ✨'; }
.pl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
@media (min-width: 700px) { .pl-tiles { grid-template-columns: repeat(6, 1fr); } }
.pl-tiles div { background: #f4f7fa; border-radius: 10px; padding: .6rem; text-align: center; display: flex; flex-direction: column; }
.pl-tiles b { font-size: 1.25rem; color: var(--navy); }
.pl-tiles span { font-size: .78rem; color: var(--muted); }
.pl-rlist { list-style: none; padding: 0; margin: 0 0 .5rem; }
.pl-rlist li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid #edf1f5; }
.pl-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.pl-actions form { margin: 0; }
.pl-foot { text-align: center; margin-top: 1.5rem; font-size: 1rem; }
.pl-approval { border-bottom: 1px solid var(--border); padding: .5rem 0 1rem; }
.pl-approve-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.pl-approve-form input { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; }
.kpi-good { color: var(--ok); font-weight: 700; }
.kpi-bad { color: var(--red); font-weight: 700; }
.pl-inline-form { margin: 0 0 .5rem; }
.pl-inline-form .btn { width: 100%; }
/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(11,31,51,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; animation: up .18s ease-out; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet input, .sheet select { width: 100%; font-size: 16px; min-height: 44px; }
.big-steps li { margin: .5rem 0; font-size: 1.05rem; }
/* Install button */
.install-bar { text-align: center; margin: 1rem auto 0; padding: 0 1rem; }
.install-bar[hidden] { display: none; }
.install-btn { min-height: 48px; font-size: 1rem; padding: .6rem 1.2rem; border-radius: 24px; }
@media print { .topbar, .pl-tabs, .pl-switch, .pl-nav .btn, .pl-actions, .install-bar, .footer-note, .pl-foot { display: none !important; } }
