:root {
    color-scheme: light;
    --paper: #f4f2ec; --surface: #fcfbf8; --surface-raised: #e9e6de;
    --ink: #16221d; --muted: #647068; --line: #d9d7cf;
    --accent: #fe6847; --accent-dark: #d6472b; --success: #28775a; --danger: #b63e32;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 15% 6%, rgba(254,104,71,.08), transparent 22rem), var(--paper); font-size: 1rem; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.04em; }
h1 { font-size: clamp(2.7rem, 7vw, 6.5rem); }
h1:focus { outline: none; }
.home-intro { max-width: 760px; margin-block: clamp(2rem,10vh,8rem); }
.home-intro h1 { margin-bottom: 1rem; }
.home-intro > p { max-width: 620px; color: var(--muted); font-size: clamp(1.05rem,2vw,1.35rem); }
.eyebrow { margin-bottom: .45rem; color: var(--accent-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.store-hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-block: clamp(2rem,7vh,5rem) 2rem; }
.store-hero h1 { margin-bottom: 1rem; }
.store-hero > div:first-child > p:last-child { max-width: 670px; color: var(--muted); font-size: clamp(1.05rem,2vw,1.35rem); }
.store-hero .button-row { flex: 0 0 auto; }
.store-empty { margin-top: 1rem; }
.store-app-grid, .channel-sections, .target-sections, .store-release-list { display: grid; gap: 1rem; }
.store-app-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: rgba(252,251,248,.8); box-shadow: 0 18px 50px rgba(38,46,41,.05); }
.store-app-card > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.store-app-identity { display: flex; min-width: 0; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; }
.store-app-identity img { width: 72px; height: 72px; flex: 0 0 auto; border-radius: .9rem; object-fit: cover; }
.store-app-identity span { display: grid; min-width: 0; }
.store-app-identity strong { overflow-wrap: anywhere; font-size: 1.4rem; }
.store-app-identity small { color: var(--muted); }
.store-app-card > .store-release-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); padding: 1rem; }
.text-link { font-weight: 700; }
.channel-sections { gap: 1.25rem; }
.channel-section > .section-heading { align-items: end; margin-bottom: 1.25rem; }
.channel-section > .section-heading h2 { margin: 0; font-size: clamp(1.75rem,4vw,2.6rem); }
.channel-section > .section-heading > span { color: var(--muted); }
.target-sections { grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); align-items: start; }
.target-section { min-width: 0; }
.target-section > h3 { margin-bottom: .65rem; }
.release-history { margin-top: .75rem; }
.release-history summary { cursor: pointer; color: var(--accent-dark); font-weight: 700; }
.release-history .store-release-list { margin-top: .75rem; }
.channel-badge { display: inline-flex; width: fit-content; border-radius: 99px; padding: .28rem .6rem; color: #7a311f; background: #ffe1d8; font-size: .76rem; font-weight: 750; }
.release-page-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.8fr); align-items: start; gap: 1rem; }
.release-label-row { display: flex; max-width: 100%; align-items: center; flex-wrap: wrap; gap: .5rem; }
.release-label-row .channel-badge, .release-label-row .target-badge { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.release-label-row .build-label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.release-notes-panel pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.release-metadata { margin: 0 0 1.25rem; }
.release-metadata > div { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.release-metadata dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.release-metadata dd { min-width: 0; margin: .2rem 0 0; overflow-wrap: anywhere; }
.release-metadata code { font-size: .75rem; word-break: break-all; }
.download-panel > p { margin: 1rem 0 0; color: var(--muted); font-size: .85rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid transparent; border-radius: .75rem; padding: .7rem 1rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.button-primary { color: white; background: var(--ink); }
.button-primary:hover { background: #26372f; }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button-danger { color: white; background: var(--danger); }
.empty-state, .auth-card { max-width: 520px; margin: clamp(2rem,8vh,7rem) auto; padding: clamp(1.5rem,5vw,3rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: 0 18px 60px rgba(38,46,41,.07); }
.empty-state h1, .auth-card h1 { font-size: clamp(2.25rem,7vw,4rem); }
.empty-state p:not(.eyebrow), .auth-card > p { color: var(--muted); }
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label, .field-label { font-size: .85rem; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: .65rem; padding: .65rem .75rem; color: var(--ink); background: white; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid rgba(22,34,29,.1); }
.form-error, .form-success, .notice { border-radius: .65rem; padding: .75rem .9rem; }
.form-error { color: #802c25; background: #f9ddd8; }
.form-success { color: #19553f; background: #d9eee6; }
.notice { color: var(--ink); background: var(--surface-raised); }
.validation-message { color: var(--danger); font-size: .85rem; }
#blazor-error-ui { display: none; position: fixed; inset: auto 1rem 1rem 1rem; z-index: 1000; border-radius: .75rem; padding: .8rem 2.5rem .8rem 1rem; color: white; background: var(--danger); box-shadow: 0 14px 30px rgba(0,0,0,.2); }
#blazor-error-ui .dismiss { position: absolute; right: .75rem; cursor: pointer; }
.full-button { width: 100%; }
.field small, .optional { color: var(--muted); font-weight: 400; }
.page-heading, .app-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1, .app-heading h1 { margin-bottom: .5rem; font-size: clamp(2.5rem,6vw,5rem); }
.page-heading p, .app-heading p { color: var(--muted); }
.panel { padding: clamp(1.25rem,3vw,2rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.panel h2 { font-size: 1.45rem; }
.form-panel { margin-bottom: 2rem; }
.form-panel > p, .panel-empty { color: var(--muted); }
.two-columns, .three-columns { display: grid; gap: 1rem; }
.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 1rem; }
.app-card { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 1rem; min-height: 108px; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: var(--surface); text-decoration: none; }
.app-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.app-card img { width: 64px; height: 64px; border-radius: .8rem; object-fit: cover; }
.app-card h2 { margin-bottom: .35rem; font-size: 1.25rem; }
.app-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.empty-panel { padding: 4rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 1rem; }
.empty-icon { display: inline-grid; width: 3rem; height: 3rem; place-items: center; margin-bottom: 1rem; border-radius: 50%; color: white; background: var(--ink); font-size: 1.5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; color: var(--muted); font-size: .9rem; }
.app-heading, .app-card, .breadcrumbs { overflow-wrap: anywhere; }
.breadcrumbs a { color: inherit; }
.app-heading { justify-content: flex-start; margin-bottom: 2rem; }
.app-logo-large { width: 104px; height: 104px; border-radius: 1.4rem; object-fit: cover; box-shadow: 0 16px 36px rgba(22,34,29,.12); }
.admin-columns { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); align-items: start; gap: 1rem; }
.admin-side { display: grid; gap: 1rem; }
.admin-side hr { margin: 1.5rem 0; border: 0; border-top: 1px solid var(--line); }
[data-release-kind="build"] {
    --release-accent: #254fa9; --release-dark: #193a80; --release-icon-light: #b9d2ff;
    --release-wash: #eef4ff; --release-line: #c6d6ef;
}
[data-release-kind="resource"] {
    --release-accent: #954517; --release-dark: #703511; --release-icon-light: #ffca93;
    --release-wash: #fff2e5; --release-line: #e9cfb7;
}
.release-button, [data-release-kind] .button-primary { gap: .5rem; background: var(--release-accent); color: white; }
.release-button:hover, [data-release-kind] .button-primary:hover { background: var(--release-dark); }
[data-release-kind] .button-primary:disabled { opacity: .6; cursor: not-allowed; }
[data-release-kind] :is(a, button, summary, input, select, textarea):focus-visible,
[data-release-kind] .file-picker:has(input:focus-visible) { outline: 3px solid var(--release-accent); outline-offset: 2px; }
.target-badge, .status-badge, .tag-list span { display: inline-flex; width: fit-content; border-radius: 99px; padding: .28rem .6rem; font-size: .76rem; font-weight: 750; }
.target-badge, .tag-list span { color: var(--muted); background: var(--surface-raised); }
.status-badge { flex: 0 0 auto; color: #19553f; background: #d9eee6; overflow-wrap: normal; white-space: nowrap; word-break: keep-all; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.file-name { overflow-wrap: anywhere; }
.draft-editor { display: grid; grid-template-columns: minmax(0,2fr) minmax(260px,.75fr); align-items: start; gap: 1rem; }
.danger-panel { border-color: #e4b9b3; }
.danger-panel details { margin-top: 1rem; }
.danger-panel summary { cursor: pointer; font-weight: 700; }
.danger-panel form { margin-top: 1rem; }
.upload-panel { margin-bottom: 1rem; }
.publish-panel { margin-bottom: 1rem; border-color: #c9c2ae; background: linear-gradient(135deg, var(--surface), #fff8eb); }
.publish-panel .section-heading { align-items: flex-start; margin-bottom: 1rem; }
.publish-panel .section-heading p { margin: .35rem 0 0; color: var(--muted); }
.publication-review { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0 0 1.25rem; border-top: 1px solid var(--line); }
.publication-review > div { min-width: 0; padding: .8rem .65rem; border-bottom: 1px solid var(--line); }
.publication-review dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.publication-review dd { display: grid; min-width: 0; gap: .2rem; margin: .2rem 0 0; overflow-wrap: anywhere; }
.publication-review dd small { color: var(--muted); }
.publication-review code { font-size: .72rem; word-break: break-all; }
.publication-review .publication-notes, .publication-review [data-publish-artifact] { grid-column: 1 / -1; }
.publication-review .publication-notes dd { white-space: pre-wrap; }
.upload-heading, .upload-status-row, .artifact-card, .upload-workflow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.upload-heading { align-items: flex-start; margin-bottom: 1.25rem; }
.upload-heading h2, .upload-heading p { margin-top: 0; }
.upload-heading p, .upload-selection, .discard-file-summary { color: var(--muted); }
.upload-limit { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .65rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.artifact-card { align-items: flex-start; border: 1px solid var(--line); border-radius: .8rem; padding: .9rem; background: var(--paper); }
.artifact-card > div { display: grid; min-width: 0; gap: .2rem; }
.artifact-card strong, .artifact-card small, .artifact-card code { overflow-wrap: anywhere; }
.artifact-card small { color: var(--muted); }
.artifact-card code { font-size: .76rem; }
.upload-workflow { justify-content: flex-start; margin-top: 1rem; }
.file-picker { position: relative; overflow: hidden; }
.file-picker input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.file-picker.is-disabled { cursor: wait; opacity: .6; }
.draft-editor input[readonly] { color: var(--muted); background: var(--paper); cursor: not-allowed; }
.upload-selection { min-height: 1.5rem; margin: .65rem 0; overflow-wrap: anywhere; }
.upload-status { display: grid; gap: .45rem; }
.upload-status-row span, .upload-status small { color: var(--muted); }
.upload-status progress { inline-size: 100%; block-size: .8rem; accent-color: var(--ink); }
.upload-panel .form-error, .upload-panel .form-success { margin-bottom: 0; }
.discard-file-summary { overflow-wrap: anywhere; font-size: .9rem; }
.conflict-panel { margin-bottom: 1.25rem; padding: 1rem; border-left: 4px solid var(--accent); background: #fff0e9; }
.conflict-panel p { margin: .35rem 0 0; }
.saved-notes { margin-top: .8rem; }
.saved-notes span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.saved-notes pre { max-height: 12rem; overflow: auto; margin: 0; padding: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #efcfc5; border-radius: .5rem; background: white; font: inherit; }
@media (max-width: 800px) {
    .admin-columns, .draft-editor, .two-columns, .three-columns, .release-page-grid, .publication-review { grid-template-columns: minmax(0, 1fr); }
    .field, .field input { min-width: 0; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .app-heading { align-items: flex-start; }
    .app-logo-large { width: 78px; height: 78px; }
    .upload-heading, .artifact-card, .upload-status-row { align-items: stretch; flex-direction: column; }
    .upload-limit { align-self: flex-start; }
    .artifact-card .button, .upload-workflow .button { width: 100%; }
    .upload-workflow { align-items: stretch; flex-direction: column; }
    .publication-review .publication-notes, .publication-review [data-publish-artifact] { grid-column: auto; }
    .store-hero, .store-app-card > header { align-items: flex-start; flex-direction: column; }
    .store-hero .button-row { margin-top: 0; }
    .store-app-card > header > .text-link { align-self: flex-end; }
}
