
#showcase { position: relative; padding-top: 96px; padding-bottom: 60px; }
.showcase-shell { width: calc(100% - 2 * var(--news-right-gutter)); margin: auto; }
.showcase-layout { position: relative; min-height: calc(100svh - 156px); display: grid; grid-template-columns: var(--showcase-sidebar-width) minmax(0,1fr); gap: var(--news-right-gutter); }
.showcase-sidebar { align-self: start; position: sticky; top: 88px; padding-right: var(--news-right-gutter); max-height: calc(100svh - 170px); overflow: auto; }
.showcase-sidebar h1 { font-size: 23px; margin: 0 0 24px; letter-spacing: 0; }
.showcase-sidebar details { margin-bottom: 8px; }
.showcase-sidebar summary { display: flex; align-items: center; justify-content: space-between; list-style: none; padding: 10px 4px; color: var(--secondary); cursor: pointer; font-size: 16px; }
.showcase-sidebar details[open] summary { color: var(--ink); }
.showcase-sidebar a { display: block; padding: 8px 12px; margin: 2px 0; font-size: 14px; color: var(--muted); border-radius: 4px; }
.showcase-sidebar a:hover { color: #e5e2dc; background: rgba(255,255,255,.045); }
.showcase-sidebar a[aria-current] { background: rgba(188,164,132,.14); color: #fff; }
.showcase-content { min-width: 0; }
.showcase-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 14px; }
.showcase-heading h2 { font-size: 22px; font-weight: 500; }
.showcase-tabs, .showcase-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.showcase-tabs { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.showcase-tabs a { font-size: 14px; padding: 7px 10px; border-radius: 4px; color: var(--secondary); }
.showcase-tabs a[aria-current] { background: rgba(188,164,132,.14); color: #fff; }
.showcase-tabs a:hover, .showcase-tags a:hover { color: #e5e2dc; background: rgba(255,255,255,.045); }
.showcase-tags { margin-top: 14px; }
.showcase-tags a { padding: 5px 9px; font-size: 14px; color: var(--muted); border-radius: 4px; }
.showcase-tags a[aria-current] { color: #fff; background: rgba(188,164,132,.14); }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 28px 20px; margin-top: 24px; }
.showcase-card { min-width: 0; }
.showcase-preview { display: block; position: relative; width: 100%; padding: 0; aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--rule); border-radius: 7px; background: #242320; }
.showcase-preview img { width: 100%; height: 100%; object-fit: cover; }
.showcase-preview.document > img { object-fit: contain; padding: 12px; }
.showcase-type { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: #eae7e0; background: rgba(10,10,10,.75); border-radius: 6px; }
.showcase-preview:hover { border-color: rgba(188,164,132,.5); }
.showcase-card h3 { margin: 12px 0 6px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.showcase-card p { color: var(--muted); font-size: 12px; line-height: 16px; }
.showcase-card small { display: inline-block; margin-top: 7px; color: var(--timestamp); font-size: 11px; }
.showcase-dialog { width: min(960px,calc(100% - 40px)); max-height: 90svh; padding: 20px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); background: #1a1917; }
.showcase-dialog::backdrop { background: rgba(0,0,0,.8); }
.showcase-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.showcase-dialog button { padding: 6px 10px; background: transparent; border: 1px solid var(--rule); border-radius: 5px; }
.showcase-dialog img { width: 100%; max-height: 65svh; object-fit: contain; }
.showcase-dialog p { color: var(--muted); font-size: 13px; margin-top: 14px; }
@media(max-width:1100px) { .showcase-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:899px) { #showcase { padding-top: 132px; } .showcase-shell { width: calc(100% - 2 * var(--news-right-gutter)); } .showcase-layout { gap: var(--news-right-gutter); grid-template-columns: var(--showcase-sidebar-width) minmax(0,1fr); } }
@media(min-width:600px) and (max-width:899px) { #showcase { padding-top: 96px; } }
@media(max-width:640px) { .showcase-layout { display: block; } .showcase-sidebar { position: static; max-height: none; border: 0; padding: 0; margin-bottom: 24px; } .showcase-sidebar h1 { margin-bottom: 14px; } .showcase-sidebar details { display: inline-block; vertical-align: top; width: 48%; } .showcase-heading .news-search { width: 100%; } .showcase-grid { gap: 24px 12px; } }

.showcase-type img { width: 16px; height: 16px; padding: 0; object-fit: contain; }
@media(max-width:380px) { .showcase-grid { grid-template-columns: 1fr; } }

.showcase-sidebar summary::-webkit-details-marker { display: none; }
.showcase-sidebar .menu-arrow { flex: none; width: 16px; height: 16px; margin-left: 8px; transition: transform .18s ease-in-out; }
.showcase-sidebar details[open] .menu-arrow { transform: rotate(180deg); }
@media(prefers-reduced-motion:reduce) { .showcase-sidebar .menu-arrow { transition: none; } }

.showcase-sidebar summary {
  padding: 12px 16px; border-radius: 6px;
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
.showcase-sidebar summary:hover { background: rgba(255,255,255,.045); color: #e5e2dc; }
.showcase-sidebar details.is-active > summary { background: rgba(188,164,132,.14); color: #fff; }
.showcase-sidebar details > a { margin: 8px 0 0; padding: 12px 16px 12px 28px; }
.showcase-sidebar details[open] > summary { color: var(--secondary); }
.showcase-sidebar details[open] > summary:hover { color: #e5e2dc; }
.showcase-sidebar details.is-active > summary,
.showcase-sidebar details.is-active > summary:hover,
.showcase-sidebar a[aria-current]:hover,
.showcase-tabs a[aria-current]:hover,
.showcase-tags a[aria-current]:hover { color: #fff; background: rgba(188,164,132,.14); }

.showcase-sidebar summary:hover,
.showcase-sidebar details[open] > summary:hover,
.showcase-sidebar a:hover,
.showcase-tabs a:hover,
.showcase-tags a:hover { color: #dfc297; background: rgba(188,164,132,.14); }
.showcase-sidebar details.is-active > summary:hover,
.showcase-sidebar a[aria-current]:hover,
.showcase-tabs a[aria-current]:hover,
.showcase-tags a[aria-current]:hover { color: #fff; }
.showcase-card-heading { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.showcase-card-heading h3 { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showcase-card-heading .tag { flex: none; }
.showcase-card > p { margin-top: 4px; }
body.showcase-page { --news-right-gutter: 32px; --showcase-sidebar-width: clamp(188px, 16vw, 256px); }
@media(max-width:899px) { body.showcase-page { --news-right-gutter: 32px; } }

.pagination button[aria-current] { color: var(--accent); border-color: rgba(198,173,134,.5); }
body.showcase-page:has(.pagination) { --footer-height: 60px; }
@media(max-width:720px) { body.showcase-page:has(.pagination) { --footer-height: 84px; } }

.showcase-sidebar details[open] { background: rgba(188,164,132,.035); border-radius: 6px; }
.showcase-dialog:fullscreen { width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; padding: 24px; }
.showcase-dialog:fullscreen img { max-height: calc(100svh - 150px); }
@media(min-width:900px) { .showcase-grid { grid-template-columns: repeat(8,minmax(0,1fr)); gap: 24px 12px; } }

.showcase-layout::before { content: ''; position: absolute; top: 0; bottom: 0; left: var(--showcase-sidebar-width); width: 1px; background: var(--rule); pointer-events: none; }
@media(min-width:641px) and (max-width:899px) {
  .showcase-layout { min-height: calc(100svh - 156px); }
  .showcase-layout::before { left: var(--showcase-sidebar-width); }
}
@media(max-width:640px) { .showcase-layout::before { display: none; } }

.showcase-toolbar { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.showcase-toolbar .showcase-tabs { flex: 1; min-width: 0; border: 0; padding: 0; }
.showcase-toolbar .news-search { flex: 0 1 300px; }
.showcase-actions, .showcase-new-slot { display: flex; align-items: center; gap: 8px; }
.management-primary, .management-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px;
  font-size: 13px; line-height: 20px; color: var(--ink); background: rgba(188,164,132,.045);
}
.management-primary { background: rgba(188,164,132,.17); border-color: rgba(188,164,132,.3); }
.management-primary:hover, .management-secondary:hover { background: rgba(188,164,132,.24); border-color: rgba(188,164,132,.4); color: white; }
.showcase-card { position: relative; }
.card-edit { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; position: absolute; right: 8px; top: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; background: rgba(15,15,15,.85); }
.card-edit img { width: 14px; height: 14px; }
.management-dialog {
  width: min(440px,calc(100% - 32px)); max-height: calc(100svh - 40px); overflow: auto;
  margin: auto; padding: 32px; border: 1px solid rgba(188,164,132,.22); border-radius: 14px;
  color: var(--ink); background: radial-gradient(ellipse at 40% 0,rgba(188,164,132,.1),transparent 55%),#1b1a18;
  box-shadow: 0 24px 90px rgba(0,0,0,.45);
}
.management-dialog::backdrop { background: rgba(5,5,5,.72); backdrop-filter: blur(6px); }
.management-dialog h2 { font-size: 24px; font-weight: 500; margin: 8px 0 10px; }
.dialog-close { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; padding: 0; }
.dialog-close:hover { background: rgba(255,255,255,.06); }
.login-dialog > .dialog-close { position: absolute; right: 16px; top: 16px; }
.login-brand img { width: 102px; opacity: .8; margin-bottom: 28px; }
.login-eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .15em; }
.dialog-description { color: var(--muted); font-size: 13px; line-height: 20px; }
.management-form { display: grid; gap: 18px; margin-top: 28px; }
.management-form label { display: grid; gap: 8px; color: var(--secondary); font-size: 12px; }
.management-form input, .management-form textarea, .management-form select { width: 100%; min-width: 0; border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; background: #161614; color: var(--ink); font: inherit; line-height: 20px; }
.management-form select { font-size: 13px; }
.management-form textarea { resize: vertical; }
.management-form input:focus-visible, .management-form textarea:focus-visible { outline: none; border-color: rgba(188,164,132,.55); }
.field-with-icon { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: 6px; background: #161614; padding: 0 12px; }
.field-with-icon:focus-within { border-color: rgba(188,164,132,.55); }
.field-with-icon input { border: 0; background: transparent; padding-inline: 10px; font-size: 14px; }
.field-with-icon input:focus-visible { outline: none; }
.password-toggle { display: grid; place-items: center; background: transparent; border: 0; width: 24px; height: 28px; padding: 0; }
.login-dialog .management-primary { min-height: 44px; justify-content: center; margin-top: 8px; }
.prototype-note { font-size: 11px; line-height: 18px; color: #90897e; margin-top: 18px; }
.editor-dialog { width: min(620px,calc(100% - 32px)); }
.editor-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.editor-dialog h2 { margin-bottom: 0; }
.editor-columns { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.upload-field { padding: 14px; border: 1px dashed var(--rule); border-radius: 6px; }
.upload-field input { padding: 4px; font-size: 11px; }
.upload-name { overflow-wrap: anywhere; font-size: 11px; }
.cover-check { max-height: 100px; object-fit: contain; }
.uploaded-media { display: block; width: 100%; height: 65svh; border: 0; }
@media(max-width:900px) { .showcase-toolbar { flex-wrap: wrap; } .showcase-toolbar .showcase-tabs { flex-basis: 100%; } .showcase-toolbar .news-search { flex: 1; } }
@media(max-width:480px) { .management-dialog { padding: 24px; } .editor-columns { grid-template-columns: 1fr; } }

.showcase-card-heading { min-width: 0; max-width: 100%; overflow: hidden; }
.showcase-card-heading h3 { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 24px; }
.showcase-card > p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-with-icon input { flex: 1; width: 0; }
.field-with-icon > img, .password-toggle { flex: none; }

.editor-dialog { position: relative; }
.editor-dialog header { min-height: 28px; padding-right: 40px; }
.editor-dialog header h2 { margin: 0; line-height: 28px; }
.editor-dialog > header > .dialog-close { position: absolute; right: 24px; top: 24px; }
.management-field { display: grid; gap: 8px; font-size: 12px; color: var(--secondary); }
.type-select { position: relative; min-width: 0; }
.type-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: #161614; color: var(--ink); font-size: 13px; }
.type-trigger[aria-expanded=true] { border-color: rgba(188,164,132,.5); }
#type-options { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0; padding: 4px; border: 1px solid var(--rule); border-radius: 6px; background: #25231f; box-shadow: 0 8px 24px #0006; }
#type-options button { display: block; width: 100%; padding: 8px; text-align: left; border: 0; border-radius: 4px; background: transparent; color: var(--secondary); font-size: 13px; }
#type-options button:hover, #type-options button:focus-visible { background: rgba(188,164,132,.14); color: #dfc297; outline: none; }
#type-options button[aria-selected=true] { color: #fff; background: rgba(188,164,132,.14); }
.upload-field { position: relative; cursor: pointer; grid-template-columns: 20px minmax(0,1fr); align-items: center; }
.upload-field input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; overflow: hidden; }
.upload-field:focus-within { border-color: var(--accent); }
.upload-field .upload-name, .upload-field .cover-check { grid-column: 2; }
.upload-field::after { content: '+'; display: none; }

.showcase-layout[hidden], .category-management[hidden] { display: none; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-options { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 156px; padding: 5px; border: 1px solid var(--rule); border-radius: 7px; background: #25231f; box-shadow: 0 10px 30px #0006; }
.account-options button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: 4px; text-align: left; color: var(--secondary); font-size: 13px; }
.account-options button:hover { background: rgba(188,164,132,.14); color: white; }
.category-management { padding-bottom: 24px; }
.category-top, .category-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.category-heading { margin-top: 28px; }
.category-heading h1 { font-size: 24px; margin: 0; }
.category-heading p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.category-count { color: var(--timestamp); font-size: 12px; margin: 22px 0 12px; }
.category-table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; }
.category-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.category-table-wrap th { padding: 12px 16px; color: #eee2cb; font-weight: 500; background: rgba(188,164,132,.22); border-bottom: 1px solid rgba(188,164,132,.32); white-space: nowrap; }
.category-table-wrap td { padding: 12px 16px; color: var(--secondary); }
.category-table-wrap tbody tr + tr { border-top: 1px solid var(--rule); }
.category-table-wrap tbody tr:hover { background: rgba(188,164,132,.03); }
.category-name { display: flex; align-items: center; gap: 8px; padding-left: calc(var(--category-level) * 20px); white-space: nowrap; color: var(--ink); }
.category-name small { color: var(--timestamp); font-size: 10px; margin-left: 4px; }
.tree-toggle, .tree-spacer { width: 20px; height: 20px; flex: none; }
.tree-toggle { display: grid; place-items: center; padding: 0; background: transparent; border: 0; }
.tree-toggle img { width: 16px; height: 16px; }
.tree-toggle[aria-expanded=false] img { transform: rotate(-90deg); }
.category-row-actions { white-space: nowrap; }
.category-row-actions button { color: var(--accent); background: transparent; border: 0; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.category-row-actions button:hover { background: rgba(188,164,132,.12); color: white; }
.category-editor { position: relative; }
.category-editor header { padding-right: 28px; }
.category-editor h2 { font-size: 22px; margin: 0; }
.category-editor .dialog-close { position: absolute; top: 24px; right: 24px; }
.category-editor fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.category-editor legend { padding: 0; font-size: 12px; line-height: 20px; color: var(--secondary); margin: 0; }
.category-editor fieldset label { display: inline-flex; align-items: center; gap: 6px; }
.category-editor input[type=radio] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #bca484; }
.category-parent { font-size: 12px; color: var(--muted); line-height: 20px; }
.category-error { font-size: 12px; color: #e0a88d; }
.confirm-actions { margin-top: 24px; }
@media(max-width:640px) { .category-heading { flex-wrap: wrap; } .category-heading .news-search { width: 100%; } .category-name { padding-left: calc(var(--category-level) * 12px); } }

.category-table-wrap tr.is-updated { background: rgba(188,164,132,.09); }
.category-table-wrap tr.is-updated .category-name { color: #fff; }

#showcase:has(.category-management:not([hidden])) { padding-bottom: calc(var(--footer-height) + 24px + env(safe-area-inset-bottom)); }

.category-name .category-level-tag { display: inline-flex; align-items: center; flex: none; margin-left: 4px; padding: 2px 6px; border: 1px solid var(--rule); border-radius: 4px; color: var(--accent); background: rgba(188,164,132,.06); font-size: 11px; line-height: 14px; font-weight: 400; }

@media (hover: hover) and (pointer: fine) {
  .card-edit { opacity: 0; transition: opacity .15s ease; }
  .showcase-card:hover .card-edit,
  .showcase-card:has(:focus-visible) .card-edit { opacity: 1; }
}

.management-form .upload-field { grid-template-columns: minmax(0,1fr); justify-items: center; align-content: center; min-height: 80px; padding: 20px 16px; text-align: center; }
.upload-prompt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 20px; }
.upload-prompt > img { width: 20px; height: 20px; flex: none; }
.upload-field .upload-name, .upload-field .cover-check { grid-column: 1; }
.upload-field .upload-name:empty { display: none; }
.category-table-wrap th:last-child { width: 1%; text-align: left; padding-left: 24px; }
.category-row-actions { width: 1%; text-align: right; }
.category-table-wrap th:nth-child(3), .category-table-wrap td:nth-child(3),
.category-table-wrap th:nth-child(4), .category-table-wrap td:nth-child(4) { white-space: nowrap; }

.category-table-wrap tr.is-expanded-group { background: rgba(188,164,132,.045); }
.category-table-wrap tr.is-expanded-group:hover { background: rgba(188,164,132,.075); }
.category-table-wrap tr.is-updated { background: rgba(188,164,132,.09); }

.category-scope-options { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.category-sort-field .prototype-note { margin: 8px 0 0; }
.category-error:empty { display: none; }

.resource-categories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.resource-select { position: relative; min-width: 0; }
.resource-select summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: #161614; color: var(--ink); cursor: pointer; list-style: none; }
.resource-select summary::-webkit-details-marker { display: none; }
.resource-select summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-select summary img { flex: none; }
.resource-select[inert] { opacity: .5; }
.resource-options { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; right: 0; max-height: 200px; overflow-y: auto; padding: 4px; border: 1px solid var(--rule); border-radius: 6px; background: #25231f; box-shadow: 0 8px 24px #0006; }
.resource-options button { display: block; width: 100%; border: 0; border-radius: 4px; padding: 8px; background: transparent; text-align: left; color: var(--secondary); font-size: 13px; }
.resource-options button:hover { background: rgba(188,164,132,.14); color: #dfc297; }
.resource-options button[aria-pressed=true] { background: rgba(188,164,132,.14); color: #fff; }
.resource-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
.resource-settings fieldset { min-width: 0; padding: 0; border: 0; margin: 0; }
.resource-settings legend { padding: 0; font-size: 12px; line-height: 20px; color: var(--secondary); }
.resource-radio { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.resource-radio label { display: inline-flex; align-items: center; gap: 6px; line-height: 20px; }
.resource-radio input[type=radio] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: #bca484; }
.resource-sort input { max-width: 160px; }
.resource-sort .prototype-note { margin: 8px 0 0; }
.management-form .compact-upload { min-height: 0; width: 100%; justify-self: start; justify-items: start; padding: 0; border: 0; text-align: left; }
.compact-upload .upload-prompt { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 6px; background: rgba(188,164,132,.06); }
.compact-upload:hover .upload-prompt { border-color: var(--accent); color: #dfc297; }
.compact-upload:focus-within .upload-prompt { outline: none; }
.compact-upload:has(input:focus-visible) .upload-prompt { border-color: var(--accent); background: rgba(188,164,132,.14); }
.compact-upload .cover-check { width: 96px; height: 54px; max-height: none; border: 1px solid var(--rule); border-radius: 4px; object-fit: cover; }
.compact-upload .cover-check[hidden] { display: none; }
.compact-upload .upload-name { max-width: 100%; }
@media(max-width:480px) { .resource-categories { grid-template-columns: 1fr; } .resource-settings { grid-template-columns: 1fr 1fr; } .resource-radio { gap: 12px; } }

.number-stepper { display: grid; grid-template-columns: minmax(0,1fr) 36px; grid-template-rows: repeat(2,minmax(0,1fr)); width: 176px; height: 44px; border: 1px solid var(--rule); border-radius: 6px; background: #161614; overflow: hidden; }
.number-stepper:focus-within { border-color: var(--accent); }
.number-stepper button { display: grid; place-items: center; grid-column: 2; width: 36px; height: 100%; min-height: 0; margin: 0; border: 0; border-left: 1px solid var(--rule); background: transparent; padding: 0; }
.number-stepper button[data-step="1"] { grid-row: 1; }
.number-stepper button[data-step="-1"] { grid-row: 2; border-top: 1px solid var(--rule); }
.number-stepper button[data-step="1"] img { transform: rotate(180deg); }
.number-stepper button:hover:not(:disabled) { background: rgba(188,164,132,.14); }
.number-stepper button:disabled { opacity: .3; cursor: default; }
.number-stepper button img { width: 20px; height: 20px; }
.management-form .number-stepper input { grid-area: 1 / 1 / 3 / 2; width: 100%; min-width: 0; max-width: none; padding: 0 12px; border: 0; border-radius: 0; text-align: left; appearance: textfield; -moz-appearance: textfield; }
.number-stepper input::-webkit-inner-spin-button, .number-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.showcase-tabs,.showcase-tags { align-items: center; flex-wrap: nowrap; }
.showcase-tabs.is-expanded,.showcase-tags.is-expanded { flex-wrap: wrap; }
.showcase-tabs > a,.showcase-tags > a { flex: none; white-space: nowrap; }
.showcase-tabs > [hidden],.showcase-tags > [hidden] { display: none; }
.menu-overflow-toggle { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 34px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.menu-overflow-toggle:hover { background: rgba(188,164,132,.14); }
.menu-overflow-toggle[aria-expanded=true] img { transform: rotate(180deg); }

.category-table-wrap tr[data-row-fold] { cursor: pointer; }

.category-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.category-heading-actions > span { margin-right: 8px; }
.category-heading-actions button { padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--accent); font-size: 12px; line-height: 20px; white-space: nowrap; }
.category-heading-actions button:hover { background: rgba(188,164,132,.14); color: #dfc297; }

.category-top .back-link { font-size: 14px; line-height: 20px; }

.category-heading-actions button { color: #e5c893; border: 1px solid rgba(188,164,132,.35); background: rgba(188,164,132,.12); padding: 4px 8px; }
.category-heading-actions button:hover { color: #fff0d1; border-color: rgba(188,164,132,.55); background: rgba(188,164,132,.24); }

.category-page-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.category-page-actions .is-current { color: white; background: rgba(188,164,132,.14); }
.category-page-actions button:disabled { opacity: .5; cursor: default; }
@media(max-width:640px) { .category-page-actions { width: 100%; justify-content: flex-start; } }

.category-heading-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 2px; font-size: 12px; line-height: 16px; }
.category-heading-actions button img { flex: none; width: 16px; height: 16px; }

.category-heading-actions button svg { flex: none; width: 16px; height: 16px; }
.category-page-actions [data-add-root] svg { flex: none; color: inherit; }

.card-share { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; position: absolute; right: 42px; top: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; background: rgba(15,15,15,.85); }
.card-share img { width: 17px; height: 17px; }
@media (hover:hover) and (pointer:fine) { .card-share { opacity: 0; transition: opacity .15s ease; } .showcase-card:hover .card-share,.showcase-card:has(:focus-visible) .card-share { opacity: 1; } }
.passcode-dialog { position: relative; }
.passcode-dialog header { padding-right: 32px; }
.passcode-dialog h2 { margin: 0; }
.passcode-dialog .dialog-close { position: absolute; right: 24px; top: 24px; }
.field-error { margin: 0; color: #e0a88d; font-size: 12px; line-height: 16px; }
.field-error:empty { display: none; }
.date-field { position: relative; }
.date-trigger { display: flex; align-items: center; min-width: 0; border: 1px solid var(--rule); border-radius: 6px; background: #161614; }
.management-form .date-trigger input { border: 0; flex: 1; width: 0; background: transparent; cursor: pointer; }
.date-trigger button { display: grid; place-items: center; width: 42px; height: 42px; flex: none; padding: 0; background: transparent; border: 0; }
.date-trigger button:hover { background: rgba(188,164,132,.14); }
.passcode-calendar { position: static; justify-self: end; width: min(300px,100%); padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: #25231f; box-shadow: 0 10px 24px #0008; z-index: 20; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.calendar-heading button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; }
.calendar-grid > span { text-align: center; font-size: 12px; line-height: 28px; color: var(--muted); }
.calendar-grid button { height: 32px; border: 0; padding: 0; border-radius: 4px; color: var(--ink); background: transparent; font-size: 12px; }
.calendar-grid button:hover:not(:disabled),.calendar-heading button:hover { color: #dfc297; background: rgba(188,164,132,.14); }
.calendar-grid button[aria-pressed=true] { color: white; background: rgba(188,164,132,.28); }
.calendar-grid button:disabled { opacity: .25; cursor: default; }
.passcode-inline { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.passcode-inline button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: none; border: 0; border-radius: 4px; background: transparent; }
.passcode-inline button:hover { background: rgba(188,164,132,.14); }
.passcode-inline input { width: min(200px,100%); min-width: 80px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 4px; background: #161614; color: var(--ink); font-size: 13px; }
.passcode-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.passcode-empty[hidden] { display: none; }
.passcode-management table { min-width: 780px; }

.management-dialog footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.management-dialog .management-primary, .management-dialog .management-secondary { padding: 0 16px; }

.showcase-dialog, .showcase-dialog:fullscreen { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #050505; }
.showcase-dialog::backdrop { background: #050505; }
.showcase-dialog header { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; margin: 0; padding: 16px 24px 24px; background: linear-gradient(#000b,transparent); pointer-events: none; }
.showcase-dialog header h3 { min-width: 0; font-size: 14px; line-height: 20px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showcase-dialog .preview-close { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 6px; height: 36px; padding: 0 16px; border: 1px solid #ffffff30; border-radius: 6px; background: #151515cc; color: #eee; font-size: 13px; line-height: 20px; pointer-events: auto; }
.showcase-dialog .preview-close:hover { background: #35312bcc; border-color: #bca48480; }
.showcase-dialog .preview-close img { width: 18px; height: 18px; max-height: none; }
.preview-stage { position: absolute; inset: 0; }
.showcase-dialog .preview-image, .showcase-dialog:fullscreen .preview-image, .showcase-dialog .uploaded-media { display: block; width: 100%; height: 100%; max-height: none; border: 0; object-fit: contain; background: #050505; }
.showcase-dialog .preview-image[hidden], .showcase-dialog .preview-note[hidden] { display: none; }
.showcase-dialog .preview-note { position: absolute; inset: auto 24px 20px; margin: 0; color: #aaa49a; font-size: 12px; line-height: 16px; text-align: center; }
@media(max-width:480px) { .showcase-dialog header { padding: 12px 16px 24px; } .showcase-dialog .preview-close { padding: 0 12px; } }

.showcase-dialog header { justify-content: space-between; padding: 16px 16px 24px; }
.showcase-dialog .preview-close { order: 0; width: 44px; height: 44px; padding: 0; }
.showcase-dialog .preview-close img { width: 24px; height: 24px; }
.showcase-dialog .preview-close span { display: none; }
@media(max-width:480px) { .showcase-dialog .preview-close { padding: 0; } }

.pdf-reader { position: absolute; inset: 76px 0 0; display: grid; grid-template-columns: 180px minmax(0,1fr); color: var(--ink); background: #10100f; }
.pdf-thumbnails { min-height: 0; overflow-y: auto; padding: 16px; border-right: 1px solid var(--rule); background: #191815; }
.pdf-sidebar-title { margin-bottom: 16px; font-size: 13px; line-height: 20px; color: var(--muted); }
.pdf-thumbnail-list { display: grid; gap: 12px; }
.showcase-dialog .pdf-thumbnail { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--secondary); font-size: 12px; line-height: 16px; }
.showcase-dialog .pdf-thumbnail:hover { background: rgba(188,164,132,.08); color: #dfc297; }
.showcase-dialog .pdf-thumbnail[aria-current] { border-color: var(--accent); background: rgba(188,164,132,.14); color: #fff; }
.pdf-thumbnail-paper { display: block; width: 100%; min-height: 80px; background: #fff; overflow: hidden; }
.pdf-thumbnail canvas { display: block; max-width: 100%; height: auto; margin: auto; }
.pdf-main { position: relative; display: grid; grid-template-rows: 52px minmax(0,1fr); min-width: 0; min-height: 0; }
.pdf-toolbar { display: flex; justify-content: center; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); }
.showcase-dialog .pdf-toolbar button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; }
.showcase-dialog .pdf-toolbar button:hover { background: rgba(188,164,132,.14); }
.showcase-dialog .pdf-toolbar img { width: 18px; height: 18px; max-height: none; }
.pdf-page-control { display: flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 13px; line-height: 20px; }
.pdf-page-control input { width: 48px; height: 32px; border: 1px solid var(--rule); border-radius: 4px; background: #1b1a18; color: white; text-align: center; font-size: 13px; }
.pdf-page-host { display: grid; place-items: center; overflow: auto; min-width: 0; min-height: 0; }
.pdf-page-host canvas { display: block; background: white; box-shadow: 0 2px 18px #0005; }
.showcase-dialog .pdf-status { position: absolute; top: 50%; left: 24px; right: 24px; margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.showcase-dialog .pdf-status[hidden] { display: none; }
@media(max-width:600px) { .pdf-reader { grid-template-columns: 104px minmax(0,1fr); } .pdf-thumbnails { padding: 8px; } .pdf-thumbnail-list { gap: 8px; } .showcase-dialog .pdf-thumbnail { padding: 4px; } .pdf-toolbar { gap: 4px; } }

.preview-exit-hint { position: absolute; z-index: 3; top: 16px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 144px); padding: 8px 16px; border: 1px solid rgba(188,164,132,.24); border-radius: 6px; background: #1b1a18eb; color: #eee2cb; font-size: 13px; line-height: 20px; text-align: center; pointer-events: none; }
.preview-exit-hint[hidden] { display: none; }

.showcase-dialog.is-pdf { background: var(--base); }
.showcase-dialog.is-pdf header { height: 76px; min-height: 76px; padding: 16px; background: rgba(188,164,132,.14); border-bottom: 1px solid var(--rule); }
.showcase-dialog.is-pdf .preview-close { background: rgba(188,164,132,.08); border-color: rgba(188,164,132,.25); }
.showcase-dialog.is-pdf .preview-close:hover { background: rgba(188,164,132,.2); border-color: var(--accent); }
.pdf-main { grid-template-rows: minmax(0,1fr) 60px; }
.pdf-page-host { grid-area: 1 / 1; }
.pdf-toolbar { grid-area: 2 / 1; border-bottom: 0; border-top: 1px solid var(--rule); background: rgba(188,164,132,.04); }

.showcase-dialog.is-pdf header { height: 60px; min-height: 60px; padding: 8px 16px; }
.pdf-reader { top: 60px; }
.pdf-main { grid-template-rows: minmax(0,1fr); }
.showcase-dialog.is-pdf .preview-exit-hint { top: 12px; padding: 6px 16px; }

.showcase-dialog.is-pdf { touch-action: pan-x pan-y; }
.pdf-page-host { display: flex; align-items: flex-start; justify-content: flex-start; padding: 12px; touch-action: pan-x pan-y; overscroll-behavior: contain; }
.pdf-page-host canvas { flex: none; margin: auto; }
.showcase-dialog .pdf-zoom-indicator { position: absolute; top: 12px; right: 16px; margin: 0; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 4px; background: #1b1a18e6; color: var(--ink); font-size: 12px; line-height: 16px; pointer-events: none; z-index: 1; }
.showcase-dialog .pdf-zoom-indicator[hidden] { display: none; }

.showcase-dialog .preview-close { position: relative; width: 36px; height: 36px; }
.showcase-dialog .preview-close::before { content: ""; position: absolute; inset: -4px; }
.showcase-dialog .preview-close img { width: 20px; height: 20px; }

.management-form input::placeholder, .management-form textarea::placeholder, .passcode-inline input::placeholder { color: var(--timestamp); opacity: 1; }

.showcase-card-heading h3 { flex: 1 1 auto; }

.showcase-dialog .preview-header-actions { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.showcase-dialog .preview-download { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border: 1px solid #ffffff30; border-radius: 6px; background: #151515cc; color: #eee; font-size: 13px; line-height: 20px; text-decoration: none; white-space: nowrap; }
.showcase-dialog .preview-download:hover { background: #35312bcc; border-color: #bca48480; color: #fff; }
.showcase-dialog .preview-download[hidden] { display: none; }
.showcase-dialog.is-pdf .preview-download { background: rgba(188,164,132,.08); border-color: rgba(188,164,132,.25); }
.showcase-dialog.is-pdf .preview-download:hover { background: rgba(188,164,132,.2); border-color: var(--accent); }
.showcase-card-heading > .tag:first-of-type { margin-left: auto; }

.card-share { right: 8px; }
.card-edit { right: 42px; }
.showcase-new-slot[hidden] { display: none; }

.showcase-sidebar { display: flex; flex-direction: column; height: calc(100svh - 180px); max-height: none; overflow: hidden; }
.showcase-sidebar > h1 { flex: none; }
.showcase-sidebar > nav { flex: 1; min-height: 0; overflow-y: auto; }
.sidebar-add-slot { flex: none; padding-top: 16px; }
.sidebar-add-slot[hidden] { display: none; }
.sidebar-add-category { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; border-radius: 6px; background: rgba(188,164,132,.08); box-shadow: inset 0 0 0 1px var(--rule); color: var(--secondary); font-size: 16px; line-height: inherit; text-align: left; }
.sidebar-add-category svg { flex: none; width: 16px; height: 16px; }
.sidebar-add-category:hover { background: rgba(188,164,132,.14); color: #dfc297; }
@media(max-width:640px) { .showcase-sidebar { height: auto; overflow: visible; } .showcase-sidebar > nav { flex: none; overflow: visible; } }

.tertiary-toolbar { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; }
.tertiary-toolbar .showcase-tags { flex: 1; min-width: 0; margin-top: 0; }
.tertiary-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.tertiary-actions svg { flex: none; width: 18px; height: 18px; }
.tertiary-toolbar[hidden],.tertiary-actions[hidden] { display: none; }
@media(max-width:899px) { .tertiary-toolbar { flex-wrap: wrap; } .tertiary-toolbar .showcase-tags { flex-basis: 100%; } .tertiary-actions { margin-left: auto; } }

/* Login belongs to the showcase content area; site navigation remains available. */
.showcase-auth-required #showcase,
.showcase-auth-required > .site-footer { display: none; }
.showcase-login-page { min-height: 100svh; box-sizing: border-box; padding: 96px 32px 32px; display: grid; place-items: center; }
.showcase-login-page[hidden] { display: none; }
.showcase-login-page .login-dialog { width: min(440px,100%); max-height: none; box-sizing: border-box; padding-bottom: 56px; margin: 0; transform: translateY(-24px); }
@media(max-width:480px) { .showcase-login-page { padding: 88px 24px 24px; } }

@media(max-height:650px) { .showcase-login-page .login-dialog { transform: none; } }
