/* =========================================================
   Presentation studio (pages/portal/studio.html)
   Ministry identity: navy #00344b, mint #00ceb7.
========================================================= */

.std-page {
  --s-navy: #00344b;
  --s-mint: #00ceb7;
  --s-teal: #0b7a6f;
  --s-ink: #10303d;
  --s-mute: #5b707a;
  --s-line: #e3e9eb;
  --s-paper: #f4f7f8;
  --s-warn: #8a5a00;
  background: var(--s-paper);
  color: var(--s-ink);
}

.std-page [hidden] { display: none !important; }

.std-btn,
.std-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.std-btn { border: 0; background: var(--s-navy); color: #fff; font-weight: 700; }
.std-btn:disabled { opacity: .45; cursor: default; }
.std-btn-ghost { border: 1px solid #c9d6da; background: #fff; color: var(--s-navy); font-weight: 600; }
.std-btn-ghost:hover { border-color: var(--s-navy); }
.std-btn:focus-visible, .std-btn-ghost:focus-visible, .std-page button:focus-visible { outline: 3px solid rgba(0, 206, 183, .5); outline-offset: 2px; }

.std-link { border: 0; background: none; padding: 0; color: var(--s-teal); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.std-link.is-danger { color: #a3352a; }
.std-muted { color: var(--s-mute); font-size: 13px; margin: 0; }

/* ---------- Step 1 ---------- */

.std-start { padding: 48px 24px 72px; }
.std-start-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  grid-template-areas: "crumb crumb" "h1 types" "lead types" "note types" "name types" "saved types" ". types";
  grid-template-rows: auto auto auto auto auto auto 1fr;
  column-gap: 56px;
  align-content: start;
}
.std-crumb { grid-area: crumb; display: flex; gap: 8px; font-size: 13px; color: var(--s-mute); margin-bottom: 24px; }
.std-crumb a { color: var(--s-teal); }
.std-start h1 { grid-area: h1; margin: 0 0 14px; font-size: 38px; line-height: 1.35; color: var(--s-navy); }
.std-start-lead { grid-area: lead; margin: 0 0 18px; font-size: 16px; line-height: 1.9; color: #4a606b; }
.std-start-note { grid-area: note; margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; background: #fff6e8; color: var(--s-warn); font-size: 14px; }
.std-start-name { grid-area: name; display: grid; gap: 10px; }
.std-start-name label { font-size: 14px; font-weight: 700; color: var(--s-navy); }
.std-start-name input { height: 52px; border: 1px solid #c9d6da; border-radius: 10px; padding: 0 16px; font-family: inherit; font-size: 16px; color: var(--s-ink); }
.std-start-name input:focus { outline: 0; border-color: var(--s-navy); box-shadow: 0 0 0 3px rgba(0, 52, 75, .12); }
.std-start-name .std-btn { height: 54px; font-size: 16px; }
.std-start .std-link { grid-area: saved; justify-self: start; margin-top: 14px; }

.std-types { grid-area: types; grid-row: 2 / -1; display: grid; gap: 12px; align-content: start; }
.std-type {
  display: block; width: 100%; text-align: start; border: 0; cursor: pointer;
  background: #fff; border-radius: 14px; padding: 20px 22px 16px;
  box-shadow: 0 0 0 1px var(--s-line); font-family: inherit; color: inherit;
  transition: box-shadow .15s ease;
}
.std-type:hover { box-shadow: 0 0 0 1px #b7c6cb; }
.std-type.is-on { box-shadow: 0 0 0 2px var(--s-navy), 0 18px 40px -26px rgba(0, 52, 75, .6); }
.std-type-head { display: flex; align-items: center; gap: 14px; }
.std-radio { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; border: 2px solid #b7c6cb; box-sizing: border-box; }
.std-type.is-on .std-radio { border: 6px solid var(--s-navy); }
.std-type-text { flex: 1; display: grid; gap: 3px; }
.std-type-text strong { font-size: 18px; color: var(--s-navy); }
.std-type-text small { font-size: 14px; color: var(--s-mute); }
.std-type-count { font-size: 13px; color: var(--s-mute); }
.std-type-spine { display: flex; gap: 4px; margin-top: 16px; }
.std-type-spine span { flex: 1; min-width: 0; }
.std-type-spine i { display: block; height: 6px; border-radius: 3px; background: #d5dfe2; }
.std-type.is-on .std-type-spine i { background: var(--s-navy); }
.std-type-spine em { display: block; margin-top: 7px; font-style: normal; font-size: 12px; color: #6b7f88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.std-type.is-on .std-type-spine em { color: var(--s-ink); }

/* ---------- Step 2 ---------- */

.std-app { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-height)); padding-bottom: 112px; }

.std-top { background: #fff; border-bottom: 1px solid var(--s-line); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 32px; }
.std-deck-name { display: flex; flex-direction: column-reverse; min-width: 260px; flex: 1; }
.std-deck-name input { border: 0; border-bottom: 1.5px dashed transparent; padding: 2px 0; font-family: inherit; font-size: 20px; font-weight: 700; color: var(--s-navy); background: transparent; max-width: 520px; }
.std-deck-name input:hover, .std-deck-name input:focus { outline: 0; border-bottom-color: #b7c6cb; }
.std-deck-name small { font-size: 12.5px; color: var(--s-mute); }
.std-top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.std-sections { background: var(--s-navy); padding: 16px 32px 18px; display: flex; align-items: stretch; gap: 12px; }
.std-sections-label { color: rgba(255, 255, 255, .7); font-size: 13px; align-self: center; white-space: nowrap; }
.std-section-tabs { flex: 1; display: flex; gap: 6px; overflow-x: auto; }
.std-tab {
  flex: 1 1 0; min-width: 110px; text-align: start; border: 0; cursor: pointer;
  border-radius: 8px; padding: 11px 13px; background: rgba(255, 255, 255, .08); color: #fff; font-family: inherit;
}
.std-tab:hover { background: rgba(255, 255, 255, .16); }
.std-tab.is-empty { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .32); }
.std-tab.is-on { background: #fff; color: var(--s-navy); box-shadow: none; }
.std-tab-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.std-tab-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.std-tab-count { font-size: 12px; opacity: .75; }
.std-tab.is-on .std-tab-count { color: var(--s-teal); opacity: 1; }
.std-tab-dots { display: flex; gap: 4px; margin-top: 9px; min-height: 7px; }
.std-tab-dots i { width: 20px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.std-tab.is-on .std-tab-dots i { background: var(--s-mint); }
.std-add-section { border: 1.5px dashed rgba(255, 255, 255, .4); background: transparent; color: #fff; border-radius: 8px; padding: 0 14px; font-family: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }

.std-body { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); }

.std-filters { background: #fff; border-inline-end: 1px solid var(--s-line); padding: 26px 22px; display: flex; flex-direction: column; gap: 24px; }
.std-filter h2 { margin: 0 0 10px; font-size: 14px; color: var(--s-navy); }
.std-checks { display: grid; gap: 2px; }
.std-check { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13.5px; color: #33505b; cursor: pointer; }
.std-check input { width: 16px; height: 16px; accent-color: var(--s-navy); margin: 0; }
.std-check span { flex: 1; }
.std-check em { font-style: normal; font-size: 12px; color: #7d9099; }
.std-steps { display: flex; gap: 6px; }
.std-steps button { width: 42px; height: 38px; border: 1px solid #c9d6da; border-radius: 8px; background: #fff; font-family: inherit; font-size: 14px; color: var(--s-ink); cursor: pointer; }
.std-steps button.is-on { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }
.std-steps button:disabled { opacity: .35; cursor: default; }

.std-main { padding: 28px 32px 40px; min-width: 0; }
.std-main-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.std-main-title { display: flex; align-items: baseline; gap: 12px; margin-inline-end: auto; }
.std-main-title h1 { margin: 0; font-size: 26px; color: var(--s-navy); }
.std-main-title span { font-size: 13px; color: var(--s-mute); }
.std-scope { display: flex; padding: 4px; background: #e7eef0; border-radius: 10px; }
.std-scope button { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; font-family: inherit; font-size: 13px; color: #4a606b; cursor: pointer; }
.std-scope button.is-active { background: #fff; color: var(--s-navy); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 52, 75, .15); }
.std-search input { height: 42px; width: 280px; max-width: 100%; border: 1px solid #c9d6da; border-radius: 10px; padding: 0 14px; font-family: inherit; font-size: 14px; box-sizing: border-box; }
.std-search input:focus { outline: 0; border-color: var(--s-navy); }
.std-select { height: 42px; border: 1px solid #c9d6da; border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: 13.5px; background: #fff; color: var(--s-ink); }
.std-filters-toggle { display: none; }

.std-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
.std-card { display: flex; flex-direction: column; gap: 10px; }
.std-card-img { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: 0 0 0 1px var(--s-line), 0 14px 30px -22px rgba(0, 52, 75, .5); }
.std-card.is-added .std-card-img { box-shadow: 0 0 0 2px var(--s-mint); }
.std-card-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.std-card-noimg { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; color: var(--s-mute); font-size: 13px; }
.std-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 4px; background: var(--s-navy); color: #fff; font-size: 12px; font-weight: 700; }
.std-in { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 14px; background: var(--s-mint); color: var(--s-navy); font-size: 12px; font-weight: 700; }
.std-card-row { display: flex; align-items: flex-start; gap: 12px; }
.std-card-row > div { flex: 1; min-width: 0; }
.std-card h3 { margin: 0; font-size: 15px; color: var(--s-navy); line-height: 1.5; }
.std-card p { margin: 2px 0 0; font-size: 12.5px; color: var(--s-mute); }
.std-add { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--s-navy); background: #fff; color: var(--s-navy); font-size: 21px; font-weight: 600; cursor: pointer; font-family: inherit; }
.std-add:hover { background: var(--s-navy); color: #fff; }
.std-add.is-added { border-color: transparent; background: #e3f7f3; color: var(--s-teal); }
.std-add.is-added:hover { background: #fdecea; color: #a3352a; }
.std-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 56px 20px; border: 1.5px dashed #c9d6da; border-radius: 12px; background: #fff; text-align: center; color: var(--s-mute); }
.std-empty strong { color: var(--s-navy); font-size: 17px; }

.std-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 104px; background: #fff; border-top: 1px solid var(--s-line); box-shadow: 0 -12px 30px -20px rgba(0, 52, 75, .4); display: flex; align-items: center; gap: 18px; padding: 0 32px; }
.std-dock-info { display: grid; min-width: 150px; }
.std-dock-info strong { color: var(--s-navy); font-size: 15px; }
.std-dock-info span { color: var(--s-mute); font-size: 12.5px; }
.std-strip { flex: 1; display: flex; gap: 14px; overflow-x: auto; align-items: center; padding: 4px 0; }
.std-strip-group { display: grid; gap: 4px; cursor: pointer; flex-shrink: 0; }
.std-strip-label { font-size: 11.5px; color: var(--s-mute); white-space: nowrap; }
.std-strip-group.is-on .std-strip-label { color: var(--s-navy); font-weight: 700; }
.std-strip-items { display: flex; gap: 4px; }
.std-strip-items img { height: 48px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--s-line); }
.std-strip-ph { display: flex; align-items: center; justify-content: center; height: 48px; aspect-ratio: 16 / 9; padding: 0 4px; box-sizing: border-box; border-radius: 3px; background: var(--s-paper); font-size: 9px; color: var(--s-mute); overflow: hidden; }
.std-strip-empty { display: flex; align-items: center; justify-content: center; height: 48px; aspect-ratio: 16 / 9; border: 1.5px dashed #b7c6cb; border-radius: 3px; color: var(--s-mute); }

/* ---------- Modals ---------- */

.std-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; }
.std-modal.is-open { display: flex; }
.std-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 25, 36, .62); }
.std-close { position: absolute; top: 14px; left: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--s-navy); font-size: 22px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.std-close.is-inline { position: static; box-shadow: none; border: 1px solid var(--s-line); }

.std-preview { position: relative; width: min(1100px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.std-preview-stage { position: relative; background: var(--s-paper); display: flex; align-items: center; justify-content: center; padding: 28px; }
.std-preview-stage img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--s-line), 0 24px 40px -28px rgba(0, 52, 75, .6); }
.std-nav { position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 0; background: #fff; color: var(--s-navy); font-size: 22px; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.std-nav.is-prev { right: 10px; }
.std-nav.is-next { left: 10px; }
.std-nav:disabled { opacity: .3; cursor: default; }
.std-preview-info { padding: 32px 26px 26px; display: flex; flex-direction: column; gap: 12px; }
.std-preview-kicker { font-size: 13px; color: var(--s-teal); font-weight: 700; }
.std-preview-info h2 { margin: 0; font-size: 21px; color: var(--s-navy); }
.std-preview-info p { margin: 0; font-size: 13.5px; color: var(--s-mute); line-height: 1.8; }
.std-preview-info .std-btn { height: 50px; margin-top: auto; }
.std-preview-info .std-btn.is-added { background: #e3f7f3; color: var(--s-teal); }
.std-preview-note { font-size: 12.5px !important; }

.std-review, .std-saved { position: relative; width: min(1320px, 100%); max-height: 100%; background: var(--s-paper); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.std-saved { width: min(560px, 100%); background: #fff; }
.std-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 22px 28px; background: #fff; border-bottom: 1px solid var(--s-line); }
.std-review-head > div:first-child { flex: 1; min-width: 240px; }
.std-review-head h2 { margin: 0; font-size: 22px; color: var(--s-navy); }
.std-review-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--s-mute); }
.std-file { display: grid; gap: 2px; font-size: 11.5px; color: var(--s-mute); }
.std-file input { height: 40px; width: 240px; border: 1px solid #c9d6da; border-radius: 9px; padding: 0 12px; font-family: inherit; font-size: 14px; }
.std-review-body { padding: 22px 28px 28px; overflow: auto; }
.std-review-summary { margin: 0 0 16px; font-size: 14px; color: var(--s-navy); font-weight: 600; }
.std-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.std-col { width: 210px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 0 0 1px #dbe4e7; }
.std-col header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.std-col-num { font-size: 13px; color: #8aa0a8; }
.std-col h3 { margin: 0; flex: 1; font-size: 15px; color: var(--s-navy); }
.std-col header em { font-style: normal; font-size: 12px; color: var(--s-mute); }
.std-col-list { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.std-slide { position: relative; margin: 0; cursor: grab; }
.std-slide img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px #dfe7ea; background: #fff; }
.std-slide figcaption { margin-top: 5px; font-size: 12px; color: var(--s-ink); line-height: 1.5; }
.std-slide.is-dragging { opacity: .4; }
.std-slide.is-missing img { opacity: .4; }
.std-slide.is-missing figcaption { color: #a3352a; }
.std-remove { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: #a3352a; font-size: 16px; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); opacity: 0; }
.std-slide:hover .std-remove, .std-remove:focus-visible { opacity: 1; }
.std-col-add { aspect-ratio: 16 / 9; border: 1.5px dashed #b7c6cb; border-radius: 6px; background: transparent; color: var(--s-mute); font-family: inherit; font-size: 13px; cursor: pointer; }
.std-col-add:hover { border-color: var(--s-navy); color: var(--s-navy); }

.std-saved-list { list-style: none; margin: 0; padding: 16px 24px 24px; display: grid; gap: 10px; }
.std-saved-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 10px; }
.std-saved-list li > div { flex: 1; display: grid; }
.std-saved-list strong { color: var(--s-navy); font-size: 15px; }
.std-saved-list small { color: var(--s-mute); font-size: 12.5px; }

.std-toast { position: fixed; left: 50%; bottom: 124px; z-index: 3000; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 10px; background: #0d2f3d; color: #fff; font-size: 14px; transition: opacity .2s ease, transform .2s ease; }
.std-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.std-toast.is-error { background: #8f2a20; }

/* ---------- Narrow screens ---------- */

@media (max-width: 1100px) {
  .std-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .std-preview { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .std-start-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "crumb" "h1" "lead" "note" "types" "name" "saved"; }
  .std-types { grid-row: auto; margin-bottom: 20px; }
  .std-body { grid-template-columns: 1fr; }
  .std-filters { display: none; border: 0; border-bottom: 1px solid var(--s-line); }
  .std-filters.is-open { display: flex; }
  .std-filters-toggle { display: inline-flex; height: 42px; align-items: center; padding: 0 14px; border: 1px solid #c9d6da; border-radius: 10px; background: #fff; font-family: inherit; }
  .std-sections { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .std-start { padding: 28px 16px 56px; }
  .std-start h1 { font-size: 28px; }
  .std-type { padding: 16px 16px 14px; min-width: 0; }
  .std-type-spine em { display: none; }
  .std-grid { grid-template-columns: 1fr; }
  .std-top, .std-sections, .std-main, .std-dock { padding-inline: 16px; }
  .std-dock-info { display: none; }
}
.std-start-note .std-link { display: block; margin-top: 6px; padding: 0; }

/* ---------- Add / edit a section ---------- */
.std-section-dialog { width: min(680px, 100%); }
.std-section-form { display: grid; gap: 18px; padding: 22px 28px 24px; overflow-y: auto; }
.std-field { display: grid; gap: 8px; }
.std-field > span { color: var(--s-navy); font-size: 14px; font-weight: 700; }
.std-field > span small { color: var(--s-mute); font-weight: 500; }
.std-field input { height: 48px; padding: 0 14px; border: 1px solid #c9d6da; border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--s-ink); }
.std-field input:focus { outline: 0; border-color: var(--s-navy); box-shadow: 0 0 0 3px rgba(0, 52, 75, .12); }
.std-cat-groups { display: grid; gap: 12px; max-height: 340px; overflow-y: auto; padding: 4px 2px; }
.std-cat-group strong { display: block; margin-bottom: 6px; color: var(--s-mute); font-size: 12.5px; }
.std-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.std-cat-chip { height: 32px; padding: 0 12px; border: 1px solid #d7e3e6; border-radius: 999px; background: #fff; color: var(--s-navy); font-family: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.std-cat-chip small { color: #8a9ca4; font-size: 11px; }
.std-cat-chip:hover { border-color: #00ceb7; }
.std-cat-chip.is-on { border-color: var(--s-navy); background: var(--s-navy); color: #fff; }
.std-cat-chip.is-on small { color: rgba(255, 255, 255, .7); }
.std-section-foot { display: flex; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--s-line); }
.std-section-foot > span { flex: 1; }
.std-link.is-danger { color: #a3271b; }
.std-section-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #fff6e3; color: #6b4300; font-size: 13.5px; }
.std-section-hint .std-link { padding: 0; font-weight: 700; }
.std-tab-edit { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-inline-start: 4px; border-radius: 50%; background: rgba(0, 52, 75, .08); color: var(--s-navy); font-size: 13px; line-height: 1; cursor: pointer; }
.std-tab-edit:hover, .std-tab-edit:focus-visible { background: var(--s-navy); color: #fff; outline: none; }

/* One-click section types */
.std-section-dialog { width: min(760px, 100%); }
.std-type-search input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #c9d6da; border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--s-ink); background: #fbfcfd; }
.std-type-search input:focus { outline: 0; border-color: var(--s-navy); background: #fff; box-shadow: 0 0 0 3px rgba(0, 52, 75, .1); }
.std-type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 360px; overflow-y: auto; padding: 2px; }
.std-type-tile { display: grid; justify-items: start; gap: 4px; padding: 14px; border: 1px solid #dfe8ea; border-radius: 12px; background: #fff; color: var(--s-ink); font-family: inherit; text-align: start; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.std-type-tile:hover, .std-type-tile:focus-visible { outline: none; border-color: var(--s-mint); box-shadow: 0 8px 20px rgba(0, 52, 75, .1); transform: translateY(-2px); }
.std-type-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px; background: #eaf8f5; color: var(--s-teal); font-size: 17px; }
.std-type-name { color: var(--s-navy); font-size: 14.5px; font-weight: 700; }
.std-type-tile small { color: var(--s-mute); font-size: 12px; }
.std-type-tile.is-empty small { color: #a7b5ba; }
.std-type-tile.is-on { border-color: var(--s-navy); background: #f2f7f9; box-shadow: inset 0 0 0 1px var(--s-navy); }
.std-type-tile.is-on .std-type-icon { background: var(--s-navy); color: var(--s-mint); }
.std-type-none { grid-column: 1 / -1; margin: 0; padding: 18px; border: 1px dashed #c9d6da; border-radius: 12px; color: var(--s-mute); font-size: 13.5px; text-align: center; }
#std-section-custom { font-weight: 700; }

/* Reorder sections */
.std-tab[draggable="true"] { cursor: grab; }
.std-tab.is-dragging { opacity: .45; }
.std-tab.is-drop-target { box-shadow: inset 0 0 0 2px var(--s-mint), 0 0 0 3px rgba(0, 206, 183, .35); }
.std-move { display: inline-flex; gap: 6px; }
.std-move .std-btn-ghost { height: 36px; padding: 0 12px; font-size: 13px; }
.std-move .std-btn-ghost:disabled { opacity: .35; cursor: default; }

/* Deck header: type, «تغيير النوع» and the autosave state */
.std-deck-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.std-type-change {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--s-teal, #169c8c); font-family: inherit; font-size: 12.5px; font-weight: 600;
}
.std-type-change:hover { text-decoration: underline; }
.std-saved-state {
  display: inline-flex; align-items: center; gap: 4px;
  padding-inline-start: 10px; border-inline-start: 1px solid #dfe7ea;
  color: var(--s-mute, #7a8c94); font-size: 12px;
}
.std-saved-state.is-saved { color: #0b7d6f; }
.std-saved-state svg { width: 14px; height: 14px; }
