.prototype-hero{padding-bottom:28px}
.prototype-banner{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:18px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.prototype-banner strong{color:var(--accent-dark)}
.prototype-shell{padding-top:24px}
.prototype-context{display:grid;grid-template-columns:1.15fr .85fr;gap:22px;align-items:start}
.prototype-context strong{display:block;font-size:1.16rem;margin:.2rem 0}
.prototype-return-settings{padding-left:20px;border-left:4px solid var(--accent)}
.prototype-remember{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.prototype-remember input{width:21px;height:21px;margin-top:2px;accent-color:var(--accent-dark);flex:0 0 auto}
.prototype-remember span{display:block}
.prototype-remember small{display:block;margin-top:3px;color:var(--muted);font-weight:600;line-height:1.35}
.prototype-saved-context{margin:10px 0 0}
.prototype-view-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0 16px}
.prototype-tab{min-height:48px;padding:10px 22px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:inherit;font-weight:850;cursor:pointer}
.prototype-tab.is-active,.prototype-tab[aria-selected="true"]{background:var(--accent-dark);color:#fff;border-color:var(--accent-dark)}
.prototype-view{margin-top:10px}
.prototype-toolbar{display:grid;grid-template-columns:minmax(190px,260px) minmax(190px,1fr) minmax(220px,1fr);gap:18px;align-items:end}
.prototype-toolbar-crop{grid-template-columns:minmax(220px,380px) 1fr}
.prototype-toolbar select,.prototype-toolbar input[type="search"]{width:100%;min-height:50px;margin-top:7px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:inherit}
.prototype-active-context{padding:13px 15px;border-left:4px solid var(--accent);border-radius:10px;background:var(--soft)}
.prototype-active-context strong{display:block;margin-top:4px}
.prototype-how-to-read{display:flex;gap:12px 20px;align-items:center;flex-wrap:wrap;margin:18px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:.92rem}
.prototype-how-to-read>strong{color:var(--accent-dark)}
.prototype-how-to-read>span{display:inline-flex;gap:7px;align-items:center}
.prototype-section-heading{margin-top:26px}
.prototype-quick-list{display:grid;gap:8px}
.prototype-quick-row{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,2.4fr);gap:10px 18px;padding:13px 16px;border:1px solid var(--line);border-radius:13px;background:#fff}
.prototype-quick-heading{align-self:start}
.prototype-quick-row h3{margin:2px 0 0;font-size:1.12rem;line-height:1.2}
.prototype-quick-meta{display:grid;gap:6px}
.prototype-window-line{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start}
.prototype-window-line .status{justify-self:start;margin-top:1px;white-space:nowrap}
.prototype-window-detail{display:grid;grid-template-columns:minmax(145px,.85fr) minmax(150px,1.15fr);gap:8px 14px;align-items:baseline}
.prototype-window-action{font-weight:780}
.prototype-window-phrase{font-weight:760;color:var(--accent-dark)}
.prototype-row-actions{grid-column:2;display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:1px}
.prototype-text-button{appearance:none;border:0;background:transparent;padding:3px 0;color:var(--accent-dark);font:inherit;font-weight:820;text-decoration:underline;text-underline-offset:3px;cursor:pointer;text-align:left}
.prototype-text-button:hover,.prototype-text-button:focus-visible{color:var(--ink)}
.prototype-empty{padding:15px 17px;border:1px dashed var(--line);border-radius:12px;background:var(--soft)}
.coming-soon-heading{display:flex;justify-content:space-between;gap:22px;align-items:end;margin-top:38px}
.coming-soon-heading>div{max-width:760px}
.prototype-coming-open{margin:0;white-space:nowrap}
.prototype-crop-heading{margin:26px 0 12px}
.prototype-action-group{margin:12px 0;padding:16px;border:1px solid var(--line);border-radius:13px;background:#fff}
.prototype-action-group h3{margin-top:0}
.prototype-window-chips{display:flex;gap:8px;flex-wrap:wrap}
.prototype-window-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:var(--soft)}
.prototype-window-chip strong{color:var(--accent-dark)}
.prototype-evidence{margin-top:14px}
.prototype-evidence summary{cursor:pointer;font-weight:850;color:var(--accent-dark)}
.prototype-evidence-compact{margin:0}
.prototype-evidence-compact summary{font-size:.92rem}
.prototype-evidence-body{margin-top:9px;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fbfcfa;max-width:720px}
.prototype-row-actions .prototype-evidence-body{position:relative;z-index:1}
.prototype-year-legend{display:flex;gap:10px 18px;flex-wrap:wrap;margin:14px 0 8px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--soft);font-size:.9rem}
.prototype-year-legend span{white-space:nowrap}
.prototype-year-controls{display:none;align-items:center;justify-content:space-between;gap:12px;margin:15px 0}
.prototype-year-controls .button{margin:0}
.prototype-year-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}
.prototype-year-table{width:100%;border-collapse:collapse;min-width:980px}
.prototype-year-table th,.prototype-year-table td{padding:9px 7px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);text-align:center;vertical-align:middle}
.prototype-year-table th:first-child,.prototype-year-table td:first-child{position:sticky;left:0;z-index:2;text-align:left;background:#fff;min-width:190px}
.prototype-year-table thead th{position:sticky;top:0;z-index:3;background:var(--soft);font-weight:850}
.prototype-year-table thead th:first-child{z-index:4}
.prototype-year-table tr:last-child td{border-bottom:0}
.prototype-month-cell{font-size:.8rem;font-weight:800}
.prototype-month-cell.ideal{background:#edf5ef}
.prototype-month-cell.marginal{background:#fbf3df}
.prototype-month-cell.mixed{background:#eef1f7}
.prototype-selected-month{box-shadow:inset 0 0 0 1px #d5e2da}
.prototype-year-table thead .prototype-selected-month{background:#e4efe7}
.prototype-cell-short{display:none}
.prototype-coarse-note{display:block;margin-top:4px;font-size:.76rem;color:var(--muted);font-weight:650}
.prototype-evidence-boundary{padding-bottom:8px}
.prototype-boundary-details summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none}
.prototype-boundary-details summary::-webkit-details-marker{display:none}
.prototype-boundary-details summary::after{content:'+';margin-left:auto;font-size:1.35rem;font-weight:800;color:var(--accent-dark)}
.prototype-boundary-details[open] summary::after{content:'−'}
.prototype-boundary-body{padding-top:12px}
.prototype-boundary-body p:last-child{margin-bottom:0}

@media(max-width:900px){
  .prototype-toolbar{grid-template-columns:1fr 1fr}
  .prototype-active-context{grid-column:1/-1}
}

@media(max-width:760px){
  .prototype-hero{padding-bottom:22px}
  .prototype-context{grid-template-columns:1fr;gap:14px}
  .prototype-return-settings{padding-left:14px}
  .prototype-view-tabs{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:repeat(3,1fr);margin:16px -6px 14px;padding:8px 6px;background:rgba(250,252,249,.96);backdrop-filter:blur(8px)}
  .prototype-tab{padding:10px 8px}
  .prototype-toolbar,.prototype-toolbar-crop{grid-template-columns:1fr}
  .prototype-active-context{grid-column:auto}
  .prototype-how-to-read{display:grid;gap:8px;margin-top:14px}
  .prototype-quick-row{grid-template-columns:1fr;gap:7px;padding:12px 14px}
  .prototype-quick-row h3{font-size:1.08rem}
  .prototype-window-detail{grid-template-columns:1fr;gap:2px}
  .prototype-row-actions{grid-column:1;gap:14px}
  .prototype-evidence-body{max-width:none}
  .coming-soon-heading{display:block;margin-top:32px}
  .prototype-coming-open{margin-top:10px;width:100%}
  .prototype-window-chips{display:grid}
  .prototype-window-chip{border-radius:12px;align-items:flex-start}
  .prototype-year-controls{display:grid;grid-template-columns:1fr 1fr}
  .prototype-year-controls span{grid-column:1/-1;grid-row:1;text-align:center;font-weight:800}
  .prototype-year-controls button{width:100%}
  .prototype-year-wrap{overflow:visible}
  .prototype-year-table{min-width:0;table-layout:fixed}
  .prototype-year-table th,.prototype-year-table td{padding:9px 5px;font-size:.78rem}
  .prototype-year-table th:first-child,.prototype-year-table td:first-child{position:sticky;left:0;min-width:126px;width:126px}
  .prototype-year-table .prototype-hide-mobile{display:none}
  .prototype-month-cell{font-size:.76rem}
  .prototype-cell-full{display:none}
  .prototype-cell-short{display:inline}
  .prototype-text-button{font-size:.92rem}
}

@media(max-width:420px){
  .prototype-year-table th:first-child,.prototype-year-table td:first-child{min-width:116px;width:116px}
  .prototype-year-table th,.prototype-year-table td{padding:8px 4px;font-size:.74rem}
  .prototype-year-legend{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}
}

@media print{
  .prototype-banner,.prototype-view-tabs,.prototype-year-controls,.prototype-toolbar,.prototype-return-settings,.prototype-how-to-read,.prototype-row-actions{display:none!important}
  .prototype-view[hidden]{display:none!important}
  .prototype-year-wrap{overflow:visible}
  .prototype-year-table{min-width:0;font-size:8pt}
  .prototype-cell-full{display:inline}
  .prototype-cell-short{display:none}
  .prototype-evidence[open]{display:block}
}

/* Owner iPhone review fixes: preserve location selection and prevent action/window text collisions. */
.prototype-location{display:grid;gap:16px}
.prototype-location-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.prototype-location-summary strong,.prototype-location-heading>strong{display:block;font-size:1.16rem;margin:.2rem 0}
.prototype-location-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:12px}
.prototype-location-fields input,.prototype-location-fields select{width:100%;min-height:48px;margin-top:7px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:inherit}
.prototype-location-fields input[readonly]{background:var(--soft);color:var(--muted)}
.prototype-location .prototype-return-settings{margin-top:14px;padding:14px 0 0;border-left:0;border-top:1px solid var(--line)}
.prototype-window-detail{display:flex;flex-wrap:wrap;gap:2px .34em;align-items:baseline;min-width:0}
.prototype-window-action,.prototype-window-phrase{font-size:.94rem;line-height:1.32}
.prototype-window-action::after{content:' ·';font-weight:600;color:var(--muted)}
.prototype-window-phrase{min-width:0}
@media(max-width:760px){
  .prototype-location-fields{grid-template-columns:1fr;gap:8px}
  .prototype-location-summary{display:grid;gap:8px}
  .prototype-window-line{grid-template-columns:minmax(84px,auto) minmax(0,1fr);gap:8px}
  .prototype-window-detail{display:block}
  .prototype-window-action,.prototype-window-phrase{display:inline;font-size:.9rem;line-height:1.3}
  .prototype-window-phrase{margin-left:.32em}
  .prototype-window-line .status{font-size:.78rem;padding:5px 9px}
  .prototype-quick-row{padding:11px 13px}
}

/* Ensure the HTML hidden state wins over author display rules. */
.prototype-location-summary[hidden],
#prototype-location-form[hidden]{display:none!important}

/* Final owner-tested CROP/YEAR mobile refinements. */
.prototype-year-mobile-tools,.prototype-year-mobile-legend{display:none}
.prototype-year-show-all{display:inline-flex;align-items:center;gap:6px;font-weight:760;white-space:nowrap}
.prototype-year-show-all input{width:18px;height:18px;accent-color:var(--accent-dark)}
@media(max-width:760px){
  .prototype-year-legend{display:none}
  .prototype-year-mobile-tools{position:sticky;top:68px;z-index:18;display:block;margin:10px -2px 8px;padding:8px;background:rgba(250,252,249,.97);border:1px solid var(--line);border-radius:12px;backdrop-filter:blur(8px)}
  .prototype-year-controls{display:grid;grid-template-columns:minmax(88px,.8fr) minmax(120px,1.3fr) minmax(88px,.8fr);gap:7px;align-items:center;margin:0}
  .prototype-year-controls span{grid-column:auto;grid-row:auto;font-size:.78rem;line-height:1.15}
  .prototype-year-controls .button{min-height:40px;padding:7px 9px;font-size:.82rem}
  .prototype-year-mobile-legend{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;margin-top:6px;padding:5px 3px 1px;font-size:.76rem}
  #prototype-year-visible-count{margin-left:auto;color:var(--muted);font-weight:720}
}
