.skullportal-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.5fr) minmax(0,1fr);gap:1rem;align-items:start;margin:1rem 0}
.skullportal-grid.skullportal-layout-left,
.skullportal-grid.skullportal-layout-centre,
.skullportal-grid.skullportal-layout-right{grid-template-columns:minmax(0,1fr)}
.skullportal-grid.skullportal-layout-left-centre{grid-template-columns:minmax(0,1fr) minmax(0,2.5fr)}
.skullportal-grid.skullportal-layout-centre-right{grid-template-columns:minmax(0,2.5fr) minmax(0,1fr)}
.skullportal-grid.skullportal-layout-left-right{grid-template-columns:repeat(2,minmax(0,1fr))}
.skullportal-column{min-width:0;display:flex;flex-direction:column;gap:1rem}
.skullportal-card{min-width:0;overflow-wrap:anywhere}
.skullportal-card .windowbg{padding:1rem;overflow-wrap:anywhere}
.skullportal-card .cat_bar h3{margin:0}
.skullportal-placeholder{padding:.75rem;opacity:.7}
.skullportal-admin-table{width:100%;border-collapse:collapse}
.skullportal-admin-table td,.skullportal-admin-table th{padding:.7rem;border-bottom:1px solid #ddd;text-align:left}
.skullportal-form label{display:block;font-weight:bold;margin:.65rem 0 .25rem}
.skullportal-form input[type=text],.skullportal-form input[type=number],.skullportal-form select,.skullportal-form textarea{width:100%;max-width:100%;box-sizing:border-box}
.skullportal-form textarea{min-height:12rem}
.skullportal-actions{display:flex;flex-wrap:wrap;gap:.5rem}
@media(max-width:900px){.skullportal-grid.skullportal-layout-left-centre-right{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}.skullportal-grid.skullportal-layout-left-centre-right .skullportal-column[data-column=right]{grid-column:1/-1}}
@media(max-width:640px){.skullportal-grid{display:flex;flex-direction:column}.skullportal-column{width:100%}}

/* Forum content layout. Only occupied sidebars take up horizontal space. */
.skullportal-forum-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:start;margin:1rem 0}
.skullportal-forum-layout.has-left{grid-template-columns:minmax(12rem,1fr) minmax(0,4fr)}
.skullportal-forum-layout.has-right{grid-template-columns:minmax(0,4fr) minmax(12rem,1fr)}
.skullportal-forum-layout.has-left.has-right{grid-template-columns:minmax(11rem,1fr) minmax(0,4fr) minmax(11rem,1fr)}
.skullportal-forum-main,.skullportal-forum-sidebar{min-width:0}
.skullportal-forum-sidebar,.skullportal-forum-main{display:flex;flex-direction:column;gap:1rem}
@media(max-width:900px){.skullportal-forum-layout.has-left.has-right{grid-template-columns:minmax(0,1fr) minmax(0,3fr)}.skullportal-forum-layout.has-left.has-right>.skullportal-forum-sidebar:last-child{grid-column:1/-1}}
@media(max-width:640px){.skullportal-forum-layout,.skullportal-forum-layout.has-left,.skullportal-forum-layout.has-right,.skullportal-forum-layout.has-left.has-right{display:flex;flex-direction:column}.skullportal-forum-layout>*{width:100%}}

/* Welcome/member panel: inherits the active forum theme colours. */
.skullportal-welcome{display:flex;flex-direction:column;gap:.75rem;min-width:0}
.skullportal-member-panel{display:flex;align-items:center;gap:.85rem;min-width:0}
.skullportal-member-avatar img{width:64px;height:64px;max-width:none;object-fit:cover;border-radius:50%}
.skullportal-member-details{min-width:0;overflow-wrap:anywhere}
.skullportal-member-name{font-weight:700}
.skullportal-member-rank,.skullportal-member-posts{font-size:.9em}
.skullportal-member-stars img{max-height:18px;width:auto}
.skullportal-welcome-content{overflow-wrap:anywhere}
.skullportal-member-links{display:flex;gap:.75rem;flex-wrap:wrap}

/* Block-specific configuration: hidden content never consumes layout space. */
#skullportal-content-fields[hidden],#skullportal-welcome-fields[hidden]{display:none}
#skullportal-welcome-fields{margin:.8rem 0;padding:.75rem;border:1px solid currentColor;border-radius:.3rem}
.skullportal-form .skullportal-option{display:inline-flex;align-items:center;gap:.35rem;margin:.4rem 1rem .4rem 0;font-weight:normal}

/* A bottom row spans the available portal or forum width. */
.skullportal-bottom{display:flex;flex-direction:column;gap:1rem;min-width:0;margin:1rem 0}
/* Apply only explicitly selected properties; inherit all other theme styling. */
.skullportal-card.sp-custom-border{border:1px solid var(--sp-border)}
.skullportal-card.sp-custom-radius{border-radius:var(--sp-radius);overflow:hidden}
.skullportal-card.sp-custom-header-bg .cat_bar,
.skullportal-card.sp-custom-header-bg .catbg{background:var(--sp-header-bg)}
.skullportal-card.sp-custom-header-text .catbg{color:var(--sp-header-text)}
.skullportal-card.sp-custom-body-bg .windowbg{background:var(--sp-body-bg)}
.skullportal-card.sp-custom-body-text .windowbg{color:var(--sp-body-text)}
.skullportal-style-settings{margin:1rem 0;padding:1rem;border:1px solid #999;border-radius:4px}
.skullportal-form .skullportal-colour-input{max-width:16rem}

/* Keep optional block colours out of the way during normal editing. */
.skullportal-style-settings{margin:1rem 0;border:1px solid var(--border-color,#ccc);border-radius:5px;padding:.5rem 1rem}
.skullportal-style-settings>summary{cursor:pointer;font-weight:bold;padding:.3rem 0}
.skullportal-style-fields{padding:.8rem 0}

/* RC10 administrative block organiser: accessible buttons alongside drag and drop. */
.skullportal-sort-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}.skullportal-sort-column{border:1px solid var(--border-color,#aaa);padding:.7rem;min-width:0;border-radius:.4rem}.skullportal-sort-list{list-style:none;margin:0;padding:0;min-height:4rem}.skullportal-sort-item{padding:.65rem;margin:.35rem 0;background:var(--windowbg,#eee);border:1px solid var(--border-color,#bbb);border-radius:.3rem;cursor:grab}.skullportal-sort-item:focus-within{outline:2px solid currentColor}.skullportal-sort-controls{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.35rem}.skullportal-sort-controls select{max-width:100%}.skullportal-inline-form{display:inline-block}.skullportal-preset{padding:1rem;margin:1rem 0}.skullportal-preview-banner{padding:.75rem;margin:1rem 0;border:2px dashed currentColor}.skullportal-sort-controls button{min-width:2rem;min-height:2rem}@media(max-width:850px){.skullportal-sort-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:500px){.skullportal-sort-grid{grid-template-columns:minmax(0,1fr)}}@media(prefers-reduced-motion:reduce){.skullportal-sort-item{scroll-behavior:auto}}

/* 1.1.0: independent rows, compact empty lanes, explicit spanning bands. */
.sp-grid-row{display:flex;flex-direction:column;gap:1rem;margin:1rem 0;min-width:0}
.sp-grid-band{display:grid;gap:1rem;align-items:start;min-width:0;margin:.5rem 0}
.sp-grid-band>*{min-width:0}
.sp-block-heading{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.sp-block-heading>a{color:inherit;text-decoration:underline;text-underline-offset:.15em}
.sp-collapse{margin-inline-start:auto;color:inherit;background:transparent;border:1px solid currentColor;border-radius:.3rem;min-width:1.9rem;min-height:1.9rem;cursor:pointer;font-size:1.15em}
.sp-collapse[hidden],.skullportal-card .windowbg[hidden]{display:none!important}
.sp-width-grid,.skullportal-sort-grid.sp-nine-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.sp-width-grid>div{min-width:0;padding:.65rem;border:1px solid var(--border-color,#aaa);border-radius:.35rem}
.sp-disabled-zone{grid-column:1/-1;border-style:dashed}
.sp-presets,.sp-surface-tabs{display:flex;flex-wrap:wrap;gap:.4rem}
.skullportal-admin-table{overflow-wrap:anywhere}
@media(max-width:760px){.sp-grid-band{display:flex;flex-direction:column}.sp-grid-band>*{width:100%}.sp-width-grid,.skullportal-sort-grid.sp-nine-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.sp-width-grid,.skullportal-sort-grid.sp-nine-grid{grid-template-columns:minmax(0,1fr)}.skullportal-admin-table{display:block;overflow-x:auto}}
