.r4-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.5rem 0}.r4-heading h1{margin:0}.r4-form{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}.r4-main{min-width:0}.r4-section{margin-bottom:20px;padding:22px;animation:none}.r4-section h2{display:flex;align-items:center;gap:12px;margin:0 0 8px}.r4-section>p{margin-bottom:20px}.r4-section fieldset{border:0;padding:0;min-width:0;margin:20px 0}.r4-section legend{font-weight:600;margin-bottom:12px}.r4-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.r4-tiles legend{grid-column:1/-1}.r4-tile{position:relative;display:flex!important;align-items:flex-start;gap:10px;border:1px solid var(--border);background:var(--surface-soft);border-radius:14px;padding:13px;min-height:76px;cursor:pointer;margin:0!important}.r4-tile input{position:absolute!important;opacity:0;width:1px!important;height:1px!important}.r4-tile:focus-within{outline:3px solid var(--accent);outline-offset:3px}.r4-tile strong{display:block;font-size:.94rem}.r4-tile small{display:block;color:var(--muted);font-size:.8rem;line-height:1.4;margin-top:4px}.r4-tile-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:9px;background:var(--surface);color:var(--muted)}.r4-tile-check{display:none;position:absolute;right:6px;top:6px;width:15px;height:15px}.r4-tile:has(input:checked){background:var(--accent-soft);border-color:var(--accent);color:var(--text)}.r4-tile:has(input:checked) .r4-tile-icon{background:var(--accent);color:var(--on-accent)}.r4-tile:has(input:checked) .r4-tile-check{display:block}.r4-tile[data-auto-added]{border-style:dashed}.r4-piece{border:1px solid var(--border);border-radius:12px;padding:15px;margin:12px 0;background:var(--surface-soft)}.r4-piece h4{margin:0 0 10px}.r4-section label{margin-bottom:14px}.r4-date-rule{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:12px 0}.r4-date-rule>label:first-child{flex:1 1 180px}.r4-not-final{display:flex!important;align-items:center;gap:8px;min-height:44px}.r4-date-status{margin-bottom:20px;white-space:nowrap}.r4-section input[type=checkbox],.r4-section input[type=radio]{width:18px;min-height:18px;height:18px;margin-right:6px;accent-color:var(--accent)}.r4-chips{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}.r4-chips button,.r4-chips label{display:flex;align-items:center;border-radius:999px;min-height:40px;margin:0;padding:8px 12px;background:var(--surface-soft);color:var(--text);border:1px solid var(--border)}.r4-chips label:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}.r4-quantity{display:flex;gap:10px;align-items:center}.r4-quantity input{width:90px}.r4-quantity button{min-width:44px;min-height:44px}.r4-included{color:var(--muted)}.r4-empty{border:1px dashed var(--border);border-radius:14px;padding:30px;text-align:center;color:var(--muted)}.r4-summary{position:sticky;top:20px;padding:22px;max-height:calc(100vh - 40px);overflow:auto}.r4-summary h2{margin:0 0 16px}.r4-summary [data-live-summary]>section{border-bottom:1px solid var(--border);padding:10px 0}.r4-summary h3{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:0 0 8px}.r4-summary p{margin:6px 0}.r4-summary ul{padding-left:20px;margin:8px 0}.r4-summary [type=submit]{width:100%;margin-top:12px;justify-content:center}.r4-summary [data-remaining]{background:var(--surface-soft);padding:12px;border-radius:10px}.r4-summary [data-remaining] button{display:block;background:none;border:0;padding:5px 0;color:var(--text);text-decoration:underline;text-align:left}.r4-save-actions{display:flex;justify-content:space-between;gap:10px;margin-top:12px}.text-button{border:0!important;background:none!important;color:var(--text)!important;padding:6px 0;text-decoration:underline}.r4-form [hidden]{display:none!important}.r4-form :is(input,textarea,select,button){scroll-margin-top:100px}.r4-form [aria-invalid=true]{outline:2px solid var(--danger,#bc3c35)}.r4-field-error{color:var(--danger,#bc3c35);font-size:.85rem}.r4-occurrence{border:1px solid var(--border)!important;border-radius:12px;padding:16px!important}.r4-form [role=listbox]{list-style:none;padding:6px;border:1px solid var(--border);border-radius:10px;background:var(--surface);max-height:240px;overflow:auto}.r4-form [role=option]{padding:10px;cursor:pointer;display:flex;gap:10px;align-items:center}.r4-form [role=option][aria-selected=true]{background:var(--accent-soft)}.r4-client-initials{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--surface-soft)}
@keyframes r4-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:1150px){.r4-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1019px){.r4-form{display:block}.r4-summary{position:static;max-height:none}.r4-form.r4-enhanced{padding-bottom:85px}.r4-enhanced .r4-summary:not(.is-open){display:none}.r4-enhanced .r4-summary.is-open{position:fixed;z-index:120;inset:10vh 12px 85px;overflow:auto;box-shadow:0 0 0 100vmax rgb(0 0 0 / .5)}.r4-bottom-bar:not([hidden]){display:flex;position:fixed;bottom:0;left:0;right:0;z-index:110;gap:8px;align-items:center;justify-content:space-between;padding:12px;background:var(--surface);border-top:1px solid var(--border)}.r4-bottom-bar span{font-size:.8rem}.r4-bottom-bar button{font-size:.8rem;padding:10px}.r4-heading{align-items:flex-start;flex-direction:column}.r4-section{padding:16px}.r4-date-rule{align-items:center}.r4-date-status{margin-bottom:10px}}
@media(max-width:420px){.r4-tiles{grid-template-columns:1fr}.r4-section .grid-two{grid-template-columns:1fr}.r4-tile{min-height:64px}.r4-bottom-bar [data-view-summary]{max-width:100px}}
@media(prefers-reduced-motion:reduce){.r4-section{animation:none}}

.r4-bottom-bar{display:none}.r4-section label:has(>input:is([type=checkbox],[type=radio])){display:flex;align-items:center;gap:8px}.r4-summary [data-close-summary]{display:none}@media(max-width:1019px){.r4-summary.is-open [data-close-summary]{display:inline-flex}}

.r4-enhanced .r4-section{animation:r4-rise 220ms ease both}@media(prefers-reduced-motion:reduce){.r4-enhanced .r4-section{animation:none}}

@media(max-width:600px){.r4-bottom-bar button{white-space:normal;line-height:1.25;min-height:44px}.r4-bottom-bar [data-view-summary]{max-width:none;flex:1}.r4-bottom-bar [type=submit]{flex:1}.r4-bottom-bar [data-bottom-status]{max-width:80px;flex:0 1 80px}}

/* R23: the prototype's shared follow-up block, compact cards and joined count. */
.r4-piece-block{display:flex;gap:12px;padding:14px;margin:12px 0;background:var(--surface-soft);border-radius:var(--radius-lg)}
.r4-followup-icon{flex:0 0 16px;color:var(--accent-text)}.r4-followup-icon .portal-icon{width:16px;height:16px}.r4-followup-body{flex:1;min-width:0}.r4-followup-body>h3{margin:0 0 8px;font-size:var(--text-sm);font-weight:600}.r4-piece-cards{display:grid;gap:12px;min-width:0}
.r4-section fieldset.r4-pieces{margin:0;min-width:0}.r4-section fieldset.r4-design{display:grid;gap:8px;padding:12px;border:1px solid var(--border-card);border-radius:var(--radius-md);background:var(--surface)}
.r4-design-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.r4-design-head>strong{display:flex;align-items:center;gap:8px;font-size:var(--text-sm);font-weight:600}.r4-design-head .portal-icon{width:16px;height:16px}
.r4-quantity{display:inline-flex;align-items:center;gap:0;border:1px solid var(--border-field);border-radius:var(--radius-md);overflow:hidden;flex:none}.r4-quantity button{width:34px;min-width:34px;height:32px;min-height:32px;padding:0;border:0;border-radius:0;background:var(--surface);color:var(--text);font-weight:700}.r4-quantity button:disabled{color:var(--muted);opacity:.5;cursor:default}.r4-quantity output{min-width:40px;line-height:32px;text-align:center;font-size:var(--text-sm);font-weight:700;border-inline:1px solid var(--border);display:none}.r4-enhanced .r4-quantity output{display:block}.r4-enhanced .r4-quantity input{display:none}.r4-form:not(.r4-enhanced) .r4-quantity button{display:none}.r4-quantity input{width:80px}
.r4-section .r4-piece{display:grid;grid-template-columns:72px minmax(0,1.6fr) minmax(0,1fr);gap:8px;align-items:center;border:0;border-radius:0;padding:0;margin:0;background:none;min-width:0}.r4-section .r4-piece label{margin:0;min-width:0}.r4-piece-label,.r4-piece-format [data-same-format-hint]{font-size:var(--text-xs);color:var(--muted)}.r4-piece-label{font-weight:600}.r4-piece :is(input,select){min-width:0;width:100%;height:40px;min-height:40px;padding:8px 12px;font-size:var(--text-sm)}.r4-section .r4-video-piece{grid-template-columns:72px minmax(0,1fr) minmax(0,1fr);padding-bottom:4px}.r4-video-piece>.r4-piece-detail{grid-column:2/-1}.r4-piece>[data-piece-date]{grid-column:1/-1}.r4-section .r4-same-size{margin:0;font-size:var(--text-xs)}.r4-single-block{display:block;background:none;padding:0}.r4-single .r4-design-head{margin-bottom:8px}
@media(max-width:640px){.r4-section .r4-piece,.r4-section .r4-video-piece{grid-template-columns:minmax(0,1fr)}.r4-video-piece>.r4-piece-detail{grid-column:1}.r4-piece :is(input,select){font-size:16px}.r4-piece-block{padding:12px;gap:8px}.r4-quantity button{min-height:44px;width:44px}.r4-quantity output{line-height:44px}}

.r4-design .r4-piece textarea{height:40px;min-height:40px;resize:vertical;padding:8px 12px;font-size:var(--text-sm)}@media(max-width:640px){.r4-design .r4-piece textarea{font-size:16px}}

.r4-design-head .r4-quantity{margin-left:auto}.r4-from-footage{font-size:var(--text-xs)}.r4-piece-hint{font-size:var(--text-xs);margin:8px 0 0}.r4-section .r4-video-no-kind{grid-template-columns:72px minmax(0,1fr)}.r4-form [data-item-dates]{display:grid;gap:var(--space-2)}
@media(max-width:640px){.r4-section .r4-video-no-kind{grid-template-columns:minmax(0,1fr)}.r4-quantity button{width:34px;min-height:32px;height:32px}.r4-quantity output{line-height:32px}}

/* R28: request-only follow-ups and readable, quiet date states. */
.round4-intake .r4-service-followup{padding:var(--space-3);border:1px solid var(--border-card);border-radius:var(--radius-md);background:var(--surface-raised);display:grid;gap:var(--space-2)}
.round4-intake .r4-date-status[data-state="unknown"],.round4-intake .r4-date-rule:has(input[type=date]:placeholder-shown) .r4-date-status{background:var(--surface-soft);color:var(--text)}
.round4-intake .attachment-dropzone{position:relative}
.round4-intake #attachmentFiles{position:absolute;opacity:0;inset:0;width:100%;height:100%;cursor:pointer}
.round4-intake .attachment-dropzone:focus-within{outline:2px solid var(--accent-text);outline-offset:3px}
.round4-intake .attachment-file-list,.round4-intake .attachment-error{position:relative;z-index:1}
@media(max-width:639px){.round4-intake .r4-design-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.round4-intake .r4-design-head .r4-quantity{width:auto;flex:none}}

.round4-intake .r4-date-status.badge-neutral{background:var(--surface-soft);color:var(--text);border-color:var(--border)}

.round4-intake .r4-date-state{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}.round4-intake .r4-date-state .r4-date-status{margin-bottom:0}

.r4-mobile-label{display:none}@media(max-width:639px){.round4-intake .r4-design-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.round4-intake .r4-design-head>strong{grid-row:1;grid-column:1;min-width:0;overflow-wrap:anywhere}.round4-intake .r4-design-head .r4-quantity{grid-row:1;grid-column:2;margin:0}.round4-intake .r4-from-footage{grid-column:1/-1}.r4-mobile-label{display:block;font-size:var(--text-xs);font-weight:600}}
