:root {
  --paper: #fcfbf9;
  --surface: #ffffff;
  --ink: #2c2927;
  --muted: #8a817b;
  --soft-muted: #aaa19b;
  --line: #e9e3de;
  --accent: #b54f1f;
  --accent-dark: #8b3715;
  --accent-soft: #fff5ed;
  --preview-bg: #f2e9e2;
  --shadow: 0 10px 28px rgba(73, 50, 36, .055);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { min-width: 320px; min-height: 100vh; margin: 0; padding: 0 0 68px; color: var(--ink); background: radial-gradient(circle at 8% 0%, #fff 0, var(--paper) 42%, #fbf8f5 100%); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, select { color: inherit; font: inherit; }
button { border: 0; }
a { color: inherit; text-decoration: none; }

.selection-toast { position: fixed; z-index: 30; top: 20px; left: 50%; max-width: min(520px, calc(100% - 32px)); padding: 11px 18px; border: 1px solid #e6c6b1; border-radius: 11px; color: var(--accent-dark); background: #fffaf6; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: .2s ease; }
.selection-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.selection-toast.is-error { color: #982d25; border-color: #efc8c2; background: #fff6f4; }

.selection-shell { width: min(1540px, calc(100% - 48px)); margin: 0 auto; padding-top: 20px; }
.selection-intro { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 12px; }
.selection-intro-copy { min-width: 0; width: 100%; flex: 1; }
.selection-product-return { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 8px; color: var(--accent-dark); font-size: 13px; text-decoration: none; }
.selection-product-return[hidden] { display: none; }
.selection-product-return:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.selection-intro-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.selection-intro-top h1 { flex-shrink: 0; }
.selection-intro h1 { margin: 0; font-size: clamp(24px, 2vw, 31px); line-height: 1.2; letter-spacing: .015em; }
.selection-intro p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.selection-production-guide { min-width: 0; margin: 0; color: #754b33; font-size: 12px; line-height: 1.5; }
.selection-guide-label { margin-right: 8px; color: var(--accent-dark); font-weight: 700; white-space: nowrap; }
.selection-production-guide strong { color: var(--accent-dark); }
.selection-workspace { display: grid; grid-template-columns: minmax(350px, .86fr) minmax(620px, 1.64fr); gap: 20px; height: calc(100vh - 135px); height: calc(100dvh - 135px); min-height: 650px; }
.selection-preview, .selection-results { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); }
.selection-preview { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; padding: 14px; }
.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 3px 12px; color: #514942; font-size: 13px; font-weight: 700; }
.preview-header__hint { color: var(--soft-muted); font-size: 11px; font-weight: 400; }
.preview-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 500px; overflow: hidden; border: 1px solid #eee1d7; border-radius: 12px; background: linear-gradient(145deg, #f7eee8, var(--preview-bg)); }
.preview-stage::after { position: absolute; inset: 15px; border: 1px solid rgba(255, 255, 255, .44); border-radius: 8px; content: ""; pointer-events: none; }
.preview-stage img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
.preview-empty { position: relative; z-index: 1; display: grid; justify-items: center; gap: 9px; color: #a5978d; text-align: center; }
.preview-empty svg { width: 54px; height: 54px; stroke-width: 1.15; }
.preview-empty strong { color: #6e6259; font-size: 15px; }
.preview-empty span { font-size: 12px; }
.preview-caption { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; }
.preview-caption p { margin: 11px 0 0; color: #665b53; font-size: 12px; text-align: center; }
.preview-caption__line { width: 24px; height: 1px; margin-top: 11px; background: #d9c8bb; }

.selection-results { display: flex; flex-direction: column; min-height: 0; }
.results-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 14px 18px 0; border-bottom: 1px solid #eee8e3; }
.results-header > .image-storage-notice { min-width: 0; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.results-header > .image-storage-notice strong { font-weight: 500; }
.results-header > .image-storage-notice.is-near, .results-header > .image-storage-notice.is-full { background: transparent; }
.results-tabs { display: flex; align-self: stretch; gap: 4px; }
.results-tab { position: relative; align-self: stretch; min-width: 86px; padding: 0 16px 1px; color: #716964; background: transparent; font-size: 14px; cursor: pointer; }
.results-tab::after { position: absolute; right: 13px; bottom: -1px; left: 13px; height: 2px; border-radius: 2px; background: transparent; content: ""; }
.results-tab:hover { color: var(--accent); }
.results-tab.is-active { color: var(--accent-dark); font-weight: 700; }
.results-tab.is-active::after { background: var(--accent); }
.results-header-actions { display: inline-flex; grid-column: 3; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fffdfb; }
.layout-button { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 28px; border-radius: 6px; color: #9b9189; background: transparent; cursor: pointer; }
.layout-button:hover, .layout-button.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.layout-button svg { width: 16px; height: 16px; stroke-width: 1.8; }

.results-toolbar { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 12px 18px; border-bottom: 1px solid #f0ebe7; }
#showLocalImagesButton { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
#showLocalImagesButton[hidden] { display: none; }
.toolbar-select, .toolbar-filter { display: inline-flex; align-items: center; gap: 7px; height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #706862; background: #fff; font-size: 12px; }
.toolbar-select { position: relative; }
.toolbar-select svg, .toolbar-filter svg { width: 15px; height: 15px; stroke-width: 1.7; }
.toolbar-select svg:last-child { width: 13px; height: 13px; margin-left: 1px; pointer-events: none; }
.toolbar-select select { max-width: 105px; padding: 0 0 0 1px; border: 0; outline: 0; appearance: none; color: inherit; background: transparent; cursor: pointer; }
.toolbar-date select { max-width: 93px; }
.toolbar-filter-wrap { position: relative; }
.toolbar-filter { cursor: pointer; }
.toolbar-filter:hover, .toolbar-filter[aria-pressed="true"] { border-color: #dfb79c; color: var(--accent-dark); background: var(--accent-soft); }
.filter-menu { position: absolute; z-index: 12; top: calc(100% + 7px); left: 0; min-width: 132px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 9px 22px rgba(73, 50, 36, .14); }
.filter-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 31px; padding: 0 8px; border-radius: 6px; color: #716862; background: transparent; font-size: 12px; text-align: left; cursor: pointer; }
.filter-menu button:hover, .filter-menu button.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.filter-menu button svg { width: 14px; height: 14px; color: var(--accent); opacity: 0; }
.filter-menu button.is-active svg { opacity: 1; }
.filter-menu[hidden] { display: none; }

.results-body { display: grid; grid-template-columns: 178px minmax(0, 1fr); min-height: 0; overflow: hidden; flex: 1; }
.series-sidebar { min-height: 0; padding: 18px 10px 14px 14px; overflow: auto; border-right: 1px solid #eee8e3; background: linear-gradient(180deg, #fff 0%, #fffdfb 100%); }
.series-sidebar__title { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 10px; color: #9a9088; font-size: 11px; }
.series-sidebar__count { color: #b7ada5; }
.series-list { display: grid; gap: 3px; }
.series-item { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 0 9px; border-left: 2px solid transparent; border-radius: 8px; color: #625b55; background: transparent; text-align: left; cursor: pointer; }
.series-item:hover { color: var(--accent-dark); background: #fff8f3; }
.series-item.is-active { border-left-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); font-weight: 700; }
.series-item svg { width: 18px; height: 18px; stroke-width: 1.6; }
.series-item span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.series-item strong { min-width: 18px; color: #a59b94; font-size: 11px; font-weight: 500; text-align: right; }
.series-item.is-active strong { color: var(--accent); }
.new-series-button { display: flex; align-items: center; gap: 8px; width: calc(100% - 9px); margin: 15px 0 0 9px; padding: 12px 0 0; border-top: 1px solid #eee8e3; color: #8d837c; background: transparent; font-size: 12px; text-align: left; cursor: pointer; }
.new-series-button:hover { color: var(--accent-dark); }
.new-series-button svg { width: 17px; height: 17px; }

.selection-list { display: grid; align-content: start; gap: 0; min-width: 0; min-height: 0; padding: 16px 17px 28px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.selection-group { min-width: 0; }
.selection-group + .selection-group { margin-top: 24px; }
.selection-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.selection-group-head h3 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 16px; font-weight: 600; }
.selection-group-head span { color: #978d86; font-size: 11px; }
.selection-group-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.selection-list.is-list .selection-group-grid { grid-template-columns: 1fr; }
.selection-loading, .selection-empty { display: flex; grid-column: 1 / -1; align-items: center; justify-content: center; gap: 10px; min-height: 300px; color: #938880; font-size: 13px; line-height: 1.7; text-align: center; }
.selection-loading span { width: 18px; height: 18px; border: 2px solid #e6d9cf; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.selection-empty { display: grid; align-content: center; justify-items: center; padding: 30px; }
.selection-empty::before { width: 42px; height: 42px; margin-bottom: 12px; border: 1px dashed #d6c4b7; border-radius: 12px; background: #fff9f5; content: ""; }

.selection-card { position: relative; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.selection-card:hover { border-color: #dcc0ad; box-shadow: 0 5px 14px rgba(91, 58, 37, .06); transform: translateY(-1px); }
.selection-card:has(input:checked) { border-color: #cf916e; box-shadow: 0 0 0 2px rgba(181, 79, 31, .09); }
.selection-card-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 7px; }
.selection-card-head strong { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.selection-card-head span { flex: 0 0 auto; color: #a0958d; font-size: 9px; }
.selection-card-menu-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.selection-card-menu-wrap > summary { list-style: none; }
.selection-card-menu-wrap > summary::-webkit-details-marker { display: none; }
.selection-card-menu { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border-radius: 6px; color: #887d75; background: transparent; cursor: pointer; }
.selection-card-menu:hover, .selection-card-menu-wrap[open] .selection-card-menu { color: var(--accent-dark); background: var(--accent-soft); }
.selection-card-menu svg { width: 15px; height: 15px; }
.selection-card-menu-popover { position: absolute; z-index: 10; top: 28px; right: 0; min-width: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgba(73, 50, 36, .13); }
.selection-card-menu-popover button { display: block; width: 100%; padding: 7px 10px; border-radius: 5px; color: #a43d2b; background: transparent; font-size: 12px; text-align: center; cursor: pointer; }
.selection-card-menu-popover button:hover { background: #fff2ef; }
.selection-card-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.selection-card-images.is-single { grid-template-columns: 1fr; }
.selection-image { position: relative; min-width: 0; padding: 2px; overflow: hidden; border: 1px solid #e9dfd8; border-radius: 8px; background: #f8f3ef; cursor: pointer; }
.selection-image:hover { border-color: #c98762; }
.selection-image img { display: block; width: 100%; height: 82px; object-fit: cover; border-radius: 5px; background: #eee6df; }
.selection-image small { display: block; margin-top: 3px; color: #81766e; font-size: 9px; text-align: center; }
.selection-check { position: relative; z-index: 2; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid rgba(165, 146, 132, .62); border-radius: 6px; background: rgba(255, 255, 255, .9); cursor: pointer; }
.selection-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.selection-check::after { width: 10px; height: 6px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; opacity: 0; transform: rotate(-45deg) translate(1px, -1px); }
.selection-check:has(input:checked) { border-color: var(--accent); background: var(--accent); }
.selection-check:has(input:checked)::after { opacity: 1; }
.selection-options { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin-top: 8px; }
.selection-option { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 7px; border: 1px solid #eee4dc; border-radius: 6px; color: #756b63; background: #fffdfb; font-size: 10px; cursor: pointer; }
.selection-option:has(input:checked) { border-color: #e4b99e; color: var(--accent-dark); background: var(--accent-soft); }
.selection-option input { margin: 0; accent-color: var(--accent); }
.selection-card-note { display: block; color: #9c9189; font-size: 9px; }
.selection-list.is-list .selection-card { display: grid; grid-template-columns: minmax(140px, 210px) minmax(0, 1fr); column-gap: 13px; }
.selection-list.is-list .selection-card-head { grid-column: 1 / -1; }
.selection-list.is-list .selection-card-images { align-self: start; }
.selection-list.is-list .selection-options { align-self: end; margin-top: 0; }

.selection-footer { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: minmax(130px, 260px) minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 58px; padding: 8px max(24px, calc((100vw - 1540px) / 2)); border-top: 1px solid #e6ddd6; background: rgba(255, 253, 251, .96); box-shadow: 0 -8px 24px rgba(70, 47, 32, .06); backdrop-filter: blur(14px); }
.selection-footer-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.selection-footer-count strong { font-size: 14px; }
.selection-footer-count span { color: var(--muted); font-size: 11px; }
.selection-footer-actions { display: flex; align-items: center; gap: 9px; }
.secondary-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.secondary-button { border: 1px solid #ead7ca; color: var(--accent-dark); background: #fffaf6; }
.secondary-button:hover { background: var(--accent-soft); }
.primary-button { min-width: 190px; border: 0; color: #fff; background: linear-gradient(105deg, #b95a28, #8a3614); box-shadow: 0 6px 13px rgba(123, 51, 17, .15); }
.primary-button:hover { background: linear-gradient(105deg, #a84b1d, #79300f); }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.primary-button svg { width: 17px; height: 17px; }

@media (max-width: 1180px) {
  .selection-footer { grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto; gap: 12px; }
  .selection-footer-actions { gap: 6px; }
  .selection-footer .secondary-button { padding-inline: 12px; }
  .selection-footer .primary-button { min-width: 160px; padding-inline: 14px; }
  .selection-workspace { grid-template-columns: minmax(300px, .8fr) minmax(560px, 1.2fr); }
  .results-body { grid-template-columns: 158px minmax(0, 1fr); }
  .series-item { padding-inline: 6px; }
  .selection-list { padding-inline: 12px; }
  .selection-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .results-header { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .results-tabs { min-height: 40px; }
  .results-header-actions { grid-column: 2; grid-row: 1; }
  .results-header > .image-storage-notice { grid-column: 1 / -1; grid-row: 2; padding-bottom: 8px; }
  .selection-workspace { grid-template-columns: minmax(255px, .76fr) minmax(0, 1.24fr); }
  .results-body { grid-template-columns: 142px minmax(0, 1fr); }
  .series-sidebar { padding-left: 9px; }
  .selection-list { padding-inline: 10px; }
  .selection-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body { padding-bottom: 134px; }
  .selection-shell { width: calc(100% - 28px); padding-top: 16px; }
  .selection-intro { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 14px; }
  .selection-workspace { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .selection-preview, .selection-results { min-height: 0; }
  .selection-preview { min-height: 440px; }
  .preview-stage { min-height: 330px; }
  .results-body { grid-template-columns: 150px minmax(0, 1fr); min-height: 520px; overflow: visible; }
  .series-sidebar { overflow: visible; }
  .selection-list { overflow: visible; }
  .selection-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .selection-production-guide { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 560px) {
  .selection-intro h1 { font-size: 24px; }
  .selection-intro p { font-size: 12px; }
  .results-header { min-height: 58px; padding-inline: 10px; }
  .results-tab { min-width: 72px; padding-inline: 10px; font-size: 12px; }
  .results-header-actions { transform: scale(.9); transform-origin: right center; }
  .results-toolbar { flex-wrap: wrap; min-height: 100px; padding: 10px; }
  .toolbar-date select { max-width: 86px; }
  .results-body { grid-template-columns: 1fr; }
  .series-sidebar { border-right: 0; border-bottom: 1px solid #eee8e3; padding: 10px 10px 9px; }
  .series-sidebar__title { display: none; }
  .series-list { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
  .series-item { flex: 0 0 auto; grid-template-columns: 19px auto auto; min-height: 34px; padding: 0 8px; border: 1px solid transparent; }
  .series-item.is-active { border: 1px solid #eed1bd; }
  .series-item svg { width: 15px; height: 15px; }
  .series-item span { font-size: 11px; }
  .new-series-button { display: none; }
  .selection-list { padding: 14px 10px 23px; }
  .selection-group-grid { grid-template-columns: 1fr; }
  .selection-list.is-list .selection-card { display: block; }
  .selection-list.is-list .selection-options { margin-top: 8px; }
  .selection-footer { grid-template-columns: 1fr; gap: 6px; padding: 9px 13px; }
  .selection-footer-actions { grid-row: 2; }
  .selection-production-guide { grid-row: 3; }
  .selection-footer-actions { width: 100%; }
  .secondary-button { flex: 0 0 auto; }
  .primary-button { flex: 1; min-width: 0; }
}

/* Shared navigation destinations, scoped to the photo selection page. */
.selection-site-nav { display: flex; flex: 1 1 760px; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 24px; min-width: 0; max-width: 100%; min-height: 32px; }
.selection-site-nav > a { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; min-height: 32px; color: #68605a; font-size: 13px; white-space: nowrap; }
.selection-site-nav > a:hover, .selection-site-nav > a.is-active { color: var(--accent); }
.selection-site-nav > a.is-active { font-weight: 600; }
.selection-site-nav > a.is-active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: var(--accent); content: ""; }
.selection-site-nav > .selection-site-help { gap: 5px; min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink); }
.selection-site-help svg { width: 18px; height: 18px; }
.selection-site-nav > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1000px) {
  .selection-site-nav { justify-content: flex-start; gap: 8px 20px; }
}
@media (max-width: 540px) {
  .selection-site-nav { justify-content: flex-start; gap: 18px; }
}

.selection-help-dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 26px; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #30201633; }
.selection-help-dialog::backdrop { background: #21191166; }
.selection-help-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.selection-help-heading h2 { margin: 0; font-size: 22px; }
.selection-help-heading > button { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: #eee7e1; font-size: 24px; cursor: pointer; }
.selection-help-dialog p, .selection-help-dialog li { font-size: 14px; line-height: 1.8; }
.selection-help-dialog p { margin: 8px 0; }
.selection-help-dialog section { margin-top: 22px; }
.selection-help-dialog h3 { margin: 0 0 10px; font-size: 16px; }
.selection-help-dialog ol, .selection-help-dialog ul { padding-left: 22px; }
.selection-help-notice { padding: 16px; border: 1px solid #e7b58f; border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.selection-help-notice strong { color: var(--accent-dark); }
.selection-help-hint { color: #786b62; }
.selection-help-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.selection-help-modes article { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.selection-help-modes h4 { margin: 0; font-size: 15px; }
.selection-help-modes h4 span { display: inline-block; color: #786b62; font-size: 11px; font-weight: 400; }
.selection-help-modes button { padding: 8px 0; color: var(--accent-dark); background: transparent; cursor: pointer; font-weight: 600; }
.selection-help-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 540px) { .selection-help-dialog { padding: 18px; } .selection-help-modes { grid-template-columns: 1fr; } }

.selection-group-select { color: #786b62; font-size: 12px; white-space: nowrap; }

.selection-footer-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) { body { padding-bottom: 210px; } .selection-footer-actions > button { min-width: 0; } }

.selection-select-visible { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #68605a; font-size: 12px; white-space: nowrap; cursor: pointer; }
.selection-select-visible input, .selection-group-select input { accent-color: var(--accent); }
.selection-group-select { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 820px) { .selection-select-visible { margin-left: auto; } }

.selection-footer .secondary-button, .selection-footer .primary-button { height: 36px; }

.next-step-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 24px; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #30201633; }
.next-step-dialog::backdrop { background: #21191166; }
.next-step-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.next-step-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.next-step-heading h2 { margin: 0; font-size: 19px; }
.next-step-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.next-step-heading p strong { color: var(--accent-dark); font-size: 14px; }
.next-step-heading > button { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: #eee7e1; font-size: 24px; line-height: 1; cursor: pointer; }
.next-step-categories { margin-top: 18px; }
.next-step-category { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.next-step-category { margin-bottom: 12px; }
.next-step-category-toggle { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 0 0 12px; border-bottom: 1px dashed var(--line); text-align: left; background: transparent; cursor: pointer; }
.next-step-category-name { font-size: 16px; font-weight: 700; }
.next-step-category-hint { color: var(--soft-muted); font-size: 12px; }
.next-step-category-toggle svg { width: 15px; height: 15px; margin-left: auto; align-self: center; color: var(--soft-muted); transition: transform .18s ease; }
.next-step-category.is-open .next-step-category-toggle svg { transform: rotate(180deg); }
.next-step-category-toggle.is-direct:hover { border-bottom-color: #dfbaa1; }
.next-step-category-toggle.is-direct:hover .next-step-category-name { color: var(--accent); }
.next-step-category.is-open .next-step-category-toggle { border-bottom-color: transparent; }
.next-step-options { display: grid; gap: 10px; margin-top: 12px; padding-left: 14px; border-left: 2px solid #f1e3d9; }
.next-step-options[hidden] { display: none; }
.next-step-placeholder { margin: 0; padding: 13px 15px; border: 1px dashed #e3d5c9; border-radius: 11px; color: #8a817b; background: #fdfaf7; font-size: 12px; line-height: 1.7; }
.next-step-option { display: grid; gap: 5px; width: 100%; padding: 13px 15px; border: 1px solid #ead7ca; border-radius: 11px; text-align: left; background: #fffaf6; cursor: pointer; transition: .16s ease; }
.next-step-option:hover { border-color: #dfbaa1; background: var(--accent-soft); }
.next-step-option strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.next-step-option strong em { padding: 2px 7px; border-radius: 999px; color: var(--accent-dark); background: #fbe2d0; font-size: 11px; font-style: normal; font-weight: 700; }
.next-step-option span { color: #786b62; font-size: 12px; line-height: 1.6; }
.next-step-option.is-featured { border-color: #e0a97f; background: linear-gradient(105deg, #fff4ea, #fffaf6); }
.next-step-option.is-featured:hover { background: linear-gradient(105deg, #ffeddf, #fff6ee); }
@media (max-width: 540px) { .next-step-dialog { padding: 18px; } }
