body:has(.mag-curator-page) .mag-masthead { border-block-end: 1px solid var(--line); }
body:has(.mag-curator-page) .mag-masthead-row { height: auto; min-height: 58px; }
.mag-curator-page { --curator-forest: #0e3025; --curator-gold: #efc783; padding-block-start: 15px; }
.mag-curator-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    gap: clamp(14px, 4vw, 48px);
    align-items: center;
    min-height: 235px;
    padding: clamp(16px, 3.2vw, 43px);
    background: radial-gradient(ellipse at 2% 5%, #315446 0%, transparent 62%), linear-gradient(120deg, #10372b, #0b251c);
    border-radius: 13px;
    color: #fff6e6;
}
.mag-curator-hero:not(:has(.mag-curator-cover)) { grid-template-columns: minmax(0, 760px); }
.mag-curator-back { color: #ead9b9; font-size: 13px; font-weight: 700; }
.mag-curator-intro h1 {
    color: #fff7eb;
    margin: 7px 0;
    font-size: clamp(33px, 5vw, 58px);
    line-height: 1.2;
    text-align: right;
    overflow-wrap: anywhere;
}
.mag-curator-description { color: #f8efdf; margin: 8px 0; line-height: 1.9; max-width: 52ch; white-space: pre-line; overflow-wrap: anywhere; }
.mag-curator-meta, .mag-curator-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.mag-curator-meta { list-style: none; padding: 0; margin: 10px 0; color: #f0e2c9; font-size: 13px; }
.mag-curator-meta li + li { border-inline-start: 1px solid #fff4d85c; padding-inline-start: 12px; }
.mag-curator-meta span { color: var(--curator-gold); }
.mag-curator-primary,.mag-curator-secondary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 3px 11px;
    border: 1px solid var(--curator-gold);
    border-radius: 7px;
    color: #291d0b;
    background: var(--curator-gold);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}
.mag-curator-secondary { color: #fff6e8; background: #ffffff10; border-color: #fff1d16b; }
.mag-curator-primary:hover,.mag-curator-secondary:hover { text-decoration: underline; }
.mag-curator-cover {
    display: grid;
    direction: ltr;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    max-inline-size: 470px;
    gap: 9px;
}
.mag-curator-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    border-radius: 8px;
    border: 1px solid #f1c88573;
    background: #18382c;
    object-fit: cover;
    box-shadow: 0 9px 20px #0005;
}
.mag-curator-cover img:nth-child(2) { transform: translateY(5px); }
.mag-curator-owner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    margin-block: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--soft);
}
.mag-curator-owner dl { display: flex; gap: 14px; margin: 0; color: var(--ink); }
.mag-curator-owner dt { font-size: 11px; color: var(--muted); }
.mag-curator-owner dd { font-weight: 800; font-size: 20px; margin: 0; }
.mag-curator-owner summary { cursor: pointer; min-height: 40px; font-size: 13px; font-weight: 750; padding: 8px 0; }
.mag-curator-edit { display: grid; gap: 8px; margin-bottom: 10px; }
.mag-curator-edit label { display: grid; gap: 4px; font-size: 12px; }
.mag-curator-edit input,.mag-curator-edit textarea { width: 100%; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px; font: inherit; }
.mag-curator-edit .button { justify-self: start; }
.mag-curator-owner p { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.mag-curator-grid-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block: 18px 10px; }
.mag-curator-grid-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 30px); }
.mag-curator-grid-head a { font-size: 13px; }
.mag-curator-grid {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 14px;
}
.mag-curator-entry { min-inline-size: 0; display: flex; flex-direction: column; }
.mag-curator-grid > .notice { grid-column: 1 / -1; }
.mag-curator-remove {
    color: var(--muted);
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    min-height: 44px;
}
.mag-curator-remove:hover { color: #943d27; text-decoration: underline; }
.mag-community-sorts { display: flex; gap: 8px; margin-block: 6px 14px; }
.mag-community-sorts a { border: 1px solid var(--line); border-radius: 99px; padding: 5px 9px; font-size: 13px; }
.mag-community-sorts a[aria-current] { background: var(--soft); font-weight: 800; }
@media (max-width: 960px) { .mag-curator-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 640px) {
    .mag-curator-hero { grid-template-columns: minmax(0,1fr); gap: 13px; }
    .mag-curator-cover { max-width: 310px; }
    .mag-curator-owner { grid-template-columns: minmax(0,1fr); gap: 4px; }
    .mag-curator-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
}

@media (min-width: 641px) {
    .mag-curator-grid-short { grid-template-columns: repeat(auto-fit, minmax(0, 226px)); justify-content: center; }
}

.mag-list-picker { scroll-margin-block-start: 70px; }
.mag-list-picker h2 { margin: 0 0 11px; font-size: 19px; }
.mag-list-picker-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(158px,100%),1fr)); gap:9px; }
.mag-list-picker-grid > form { display:block; min-inline-size:0; }
.mag-list-picker-card,.mag-list-picker-new {
    width:100%; min-height:76px; padding:8px; border:1px solid var(--line); border-radius:9px;
    background:var(--soft); color:var(--ink); text-align:start; font:inherit;
}
.mag-list-picker-card { display:flex; gap:9px; align-items:center; cursor:pointer; }
.mag-list-picker-card:disabled { opacity:1; cursor:default; border-color:#b9a16e; }
.mag-list-picker-card:hover:not(:disabled), .mag-list-picker-new:hover { border-color:#aa874b; }
.mag-list-picker-card small { display:block; color:var(--muted); font-size:11px; }
.mag-list-picker-card strong { display:block; overflow-wrap:anywhere; font-size:13px; }
.mag-list-picker-cover { display:flex; flex:0 0 52px; height:56px; overflow:hidden; border-radius:5px; background:#254735; }
.mag-list-picker-cover img { width:0; flex:1 1 0; object-fit:cover; }
.mag-list-picker-new summary { display:flex; align-items:center; min-height:58px; gap:6px; cursor:pointer; font-weight:750; }
.mag-list-picker-new summary span { color:var(--accent); font-size:23px; }
.mag-list-picker-new form { display:grid; gap:5px; max-width:100%; }
.mag-list-picker-new input { width:100%; min-height:40px; }
.mag-creator-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px; padding:20px; margin-bottom:16px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
.mag-creator-heading h1 { margin:5px 0; font-size:clamp(23px,3vw,37px); }
.mag-creator-heading p { margin:0; color:var(--muted); }
.mag-curator-meta a { color:inherit; text-decoration:underline; text-underline-offset:3px; }

.mag-list-picker-cover { align-items:center; justify-content:center; color:#f1d5a0; }
.mag-list-picker-cover img { align-self:stretch; height:100%; }
.mag-list-picker-cover svg { width:21px; height:21px; }
