.resources-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.resources-toolbar h2{font-size:18px;margin:0 0 5px}.resources-toolbar p,.resources-preview-note{color:var(--muted);font-size:12px;margin:0}.resources-section{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;margin-bottom:16px}.resources-section>h3{font-size:13px;padding:13px 16px;margin:0;background:color-mix(in srgb,var(--panel) 65%,var(--surface));border-bottom:1px solid var(--line)}.resources-section>h3 span{color:var(--muted);font-weight:650;margin-left:7px}.resource-row{padding:14px 16px;display:flex;align-items:flex-start;gap:12px;border-bottom:1px solid var(--line)}.resource-row:last-child{border-bottom:0}.resource-kind{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:var(--panel);color:var(--accent);font-size:19px}.resource-info{flex:1;min-width:0}.resource-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13px}.resource-title a{color:var(--text);font-weight:650;text-decoration:none;overflow-wrap:anywhere}.resource-title a:hover{text-decoration:underline}.resource-info p{font-size:12px;white-space:pre-wrap;margin:7px 0;line-height:1.5;overflow-wrap:anywhere}.resource-info small{display:block;color:var(--muted);font-size:11px;margin-top:6px}.resource-badge,.resource-milestones span{font-size:10px;border-radius:5px;background:var(--panel);color:var(--muted);padding:3px 6px}.resource-milestones{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.resource-pin{border:0;background:transparent;color:var(--muted);font-size:23px;padding:1px 5px;line-height:1}.resource-pin[aria-pressed=true]{color:var(--accent)}.resources-empty{padding:16px;color:var(--muted);font-size:12px;margin:0}.resource-editor{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--text);overflow:auto}.resource-editor::backdrop{background:rgba(40,31,26,.4)}.resource-editor header,.resource-editor footer{display:flex;align-items:center;gap:10px}.resource-editor header{justify-content:space-between}.resource-editor h2{font-size:23px;margin:6px 0 14px}.resource-editor label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted);font-weight:600;margin:12px 0}.resource-editor input:not([type=checkbox]),.resource-editor textarea,.resource-editor select{width:100%;box-sizing:border-box;border:1px solid var(--line);background:var(--surface);color:var(--text);padding:10px;border-radius:8px;font:inherit}.resource-editor textarea{resize:vertical}.resource-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.resource-editor fieldset{border:1px solid var(--line);border-radius:9px;display:flex;flex-wrap:wrap;gap:4px 18px;margin:12px 0;padding:10px 13px;max-height:150px;overflow:auto}.resource-editor legend{font-size:12px;color:var(--muted)}.resource-editor .resource-check{flex-direction:row;align-items:center;font-weight:650;margin:4px 0;gap:7px;color:var(--text)}.resource-editor input[type=checkbox]{accent-color:var(--accent)}.resource-editor footer{margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}.resource-editor footer span{flex:1}.resource-editor [data-resource-delete]{color:var(--accent)}.resource-errors{font-size:12px;color:var(--accent)}.resource-editor [hidden]{display:none!important}@media(max-width:600px){.resources-toolbar{align-items:flex-start}.resources-toolbar p{max-width:220px}.resource-row{flex-wrap:wrap}.resource-info{flex-basis:calc(100% - 44px)}.resource-row>.control-button{margin-left:auto}.resource-form-grid{grid-template-columns:1fr;gap:0}.resource-editor{padding:18px}.resource-editor footer{flex-wrap:wrap}.resource-editor footer span{display:none}}

.resource-editor header>button{min-height:34px;border:1px solid var(--line);border-radius:8px;padding:6px 10px;background:var(--panel);color:var(--text);font:inherit;font-size:12px}.resource-editor header>button{font-size:20px}.resource-editor button:focus-visible,.resource-editor textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.resources-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}.resources-grid .resources-section{margin-bottom:0}.resources-preview-note{margin-top:16px}.resource-pin,.resource-row>.control-button{align-self:center;flex-shrink:0;min-height:32px}.resource-pin{display:grid;place-items:center;width:32px;padding:5px}.resource-pin svg{display:block;width:22px;height:22px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.resource-pin .pin-head{fill:none}.resource-pin .pin-stem{fill:none}.resource-pin[aria-pressed=true] .pin-head{fill:currentColor}.resource-pin:hover{color:var(--accent)}@media(max-width:1050px){.resources-grid{grid-template-columns:1fr}}

.resource-editor header .eyebrow{color:var(--accent)}.resource-editor input:not([type=checkbox]),.resource-editor textarea{font-weight:650}

/* One scroll area for fields, with actions outside it. */
.resource-editor{padding:0;overflow:hidden;max-height:var(--mobile-dialog-height,calc(100dvh - 32px))}
.resource-editor>form{display:flex;flex-direction:column;max-height:inherit;min-height:0}
.resource-editor header{flex:none;padding:22px 22px 0}
.resource-editor-body{min-height:0;overflow-y:auto;padding:0 22px 12px;scroll-padding-block:12px;-webkit-overflow-scrolling:touch;overscroll-behavior-y:auto}
.resource-editor footer{flex:none;margin:0;padding:12px 22px;background:var(--surface);border-top:1px solid var(--line)}
@media(max-width:700px){
 .resource-editor header{padding:16px 16px 0}.resource-editor-body{padding-inline:16px}.resource-editor footer{padding:12px 16px max(12px,env(safe-area-inset-bottom))}
 .resource-editor textarea{resize:none;overflow-y:hidden;min-height:80px}
 .resource-editor fieldset{max-height:none;overflow:visible}
}

.resource-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none;margin-left:auto;align-self:center}
.resource-actions .resource-pin{min-height:36px;height:36px;width:36px;flex:none}
@media(max-width:600px){.resource-actions{flex-basis:100%;padding-top:2px}.resource-actions>.control-button{margin-left:0}}

.resource-editor footer>button{font-family:inherit;font-size:12px;font-weight:700;min-height:36px}.resource-editor footer>[data-resource-delete]{color:var(--accent)}

/* Resource state actions stay beside Close, clear of the scrollable fields. */
.resource-editor header>div:first-child{min-width:0}.resource-editor-tools{display:flex;align-items:center;gap:6px;flex:none;align-self:flex-start}
.resource-editor-tools>button{display:grid;place-items:center;flex:none;width:36px;height:36px;min-height:36px;padding:7px;border:1px solid var(--line);border-radius:9px;background:var(--surface-elevated,var(--panel));color:var(--muted);font:inherit;line-height:1;cursor:pointer}
.resource-editor-tools>.resource-editor-close{font-size:22px;padding:0}.resource-editor-tools>.resource-editor-toggle[aria-pressed="true"]{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 10%,var(--surface))}
.resource-editor-tools>.resource-editor-toggle:hover,.resource-editor-tools>.resource-editor-close:hover{color:var(--accent);border-color:var(--accent)}
.resource-editor-toggle svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.resource-editor-toggle .pin-head,.resource-done-toggle .done-box{fill:none}.resource-editor-toggle[aria-pressed="true"] .pin-head,.resource-done-toggle[aria-pressed="true"] .done-box{fill:currentColor}
.resource-done-toggle .done-check{opacity:0}.resource-done-toggle[aria-pressed="true"] .done-check{opacity:1;stroke:var(--surface)}
@media(max-width:350px){.resource-editor-tools{gap:4px}.resource-editor header{gap:7px}.resource-editor header h2{font-size:21px}}

/* Keep full footer labels together on standard phone widths. */
@media(min-width:370px) and (max-width:600px){.resource-editor footer{gap:8px}.resource-editor footer>button{padding-inline:10px}}
.resource-done-toggle .done-check{opacity:1}
