/* Use the site's surfaces, choice buttons and semantic ink in every theme. */
.concept-creator-page.wrap { width: min(1600px, calc(100% - 64px)); padding: 34px 0 54px; }
.concept-creator-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.concept-creator-heading .page-intro { margin: 0; padding: 16px 20px; }
.concept-creator-heading h1 { margin: 0 0 9px; font-size: 34px; line-height: 1.2; color: var(--theme-heading-ink, var(--theme-ink)); text-shadow: none; }
.concept-creator-heading p { margin: 0; color: var(--theme-muted-ink); font-size: 14px; line-height: 1.7; }
.concept-creator-grid { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.concept-creator-form { align-self: start; }
.concept-creator-preview { position: static; min-width: 0; }
.concept-creator-form, .concept-creator-preview { padding: 24px; }
.concept-form-label { display: block; margin: 0 0 10px; color: var(--theme-heading-ink, var(--theme-ink)); font-weight: 700; font-size: 15px; }
#conceptPromptLabel { font-size: 18px; }
.concept-tier-fieldset { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.concept-tier-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.concept-tier-choices .choice-button { min-width: 0; width: 100%; font: inherit; text-align: left; cursor: pointer; }
.concept-tier-choices .choice-main { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 8px 6px; font-size: 15px; white-space: normal; }
.concept-tier-choices .choice-button, .concept-idea-toolbar .choice-button { flex-direction: row; }
.concept-tier-choices .choice-price, .concept-idea-toolbar .choice-price { border-top: 0; border-left: 2px solid var(--theme-edge); padding: 8px; font-size: 14px; gap: 4px; }
.concept-tier-count { flex-shrink: 0; font-size: 14px; line-height: 1.25; font-weight: 700; white-space: nowrap; }
html:not(.custom-theme) .concept-tier-choices .choice-button.active { background: linear-gradient(#4d7228, #36551c); }
.concept-editing-source { display: flex; align-items: start; gap: 12px; padding: 14px; margin-bottom: 20px; color: var(--theme-ink); }
.concept-editing-source img { width: 100px; height: auto; border: 2px solid var(--theme-edge); }
.concept-editing-source > div { min-width: 0; }
.concept-editing-source p { font-size: 13px; line-height: 1.6; margin: 6px 0 10px; overflow-wrap: anywhere; }
.concept-editing-source button, .concept-version-info button { padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.concept-version-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; color: var(--theme-muted-ink); font-size: 13px; line-height: 1.6; }
.concept-version-info span { min-width: 0; overflow-wrap: anywhere; }
.concept-version-info button { flex-shrink: 0; }
.concept-recent-item.is-current { border-color: #79a849; box-shadow: inset 0 0 0 1px #abd17f; }
.concept-library-nav, .orders-kind-tabs { margin-bottom: 24px; }
.concept-library-tabs { margin-bottom: 16px; }
.concept-recent-item, .concept-preview-slot { transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.concept-preview-slot:not(:disabled) { cursor: zoom-in; }
.concept-recent-item:focus-visible { outline: 3px solid var(--theme-selected-border, #83c262); outline-offset: 3px; }
@media (hover: hover) {
  .concept-recent-item:hover, .concept-preview-slot:not(:disabled):hover { transform: translateY(-2px); border-color: var(--theme-selected-border, #83c262); box-shadow: 0 4px 0 var(--theme-shadow, #29342c); }
  .concept-recent-item.is-current:hover { border-color: #79a849; }
}
.concept-recent-item:active, .concept-preview-slot:not(:disabled):active { transform: translateY(1px); box-shadow: inset 2px 2px var(--theme-control-shadow, #27302a); }
@media (prefers-reduced-motion: reduce) {
  .concept-recent-item, .concept-preview-slot { transition: none; }
  .concept-recent-item:hover, .concept-recent-item:active, .concept-preview-slot:hover, .concept-preview-slot:active { transform: none; }
}
.concept-image-tabs .choice-button { min-height: 44px; flex-direction: row; font-family: inherit; font-size: 14px; }
html:not(.custom-theme) .concept-image-tabs .choice-button.active { background: linear-gradient(#4d7228, #36551c); }
.concept-creator-form textarea {
  width: 100%; min-width: 0; padding: 12px; border: 3px solid var(--theme-field-border, #0f1415);
  background: var(--theme-field-background, #171c1d); color: var(--theme-ink); font: inherit; box-sizing: border-box;
  box-shadow: inset 2px 2px var(--theme-control-shadow, #080d0e), inset -2px -2px var(--theme-control-highlight, #3c4845);
}
.concept-creator-form textarea { display: block; resize: vertical; min-height: 150px; line-height: 1.65; }
.concept-creator-form textarea::placeholder { color: var(--theme-placeholder-ink, #9eaca0); opacity: 1; }
.concept-creator-form textarea:focus-visible { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 2px; }
.concept-prompt-editor { border: 3px solid var(--theme-field-border, #0f1415); background: var(--theme-field-background, #171c1d); box-shadow: inset 2px 2px var(--theme-control-shadow, #080d0e), inset -2px -2px var(--theme-control-highlight, #3c4845); }
.concept-prompt-editor:focus-within { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 2px; }
.concept-prompt-editor #conceptCreatorPrompt { border: 0; background: transparent; box-shadow: none; outline: none; }
.concept-form-help { margin: 8px 0 12px; color: var(--theme-muted-ink); font-size: 13px; line-height: 1.7; }
.concept-prompt-tools { display: flex; align-items: flex-end; gap: 8px; padding: 0 10px 10px; }
.concept-prompt-tools > .prompt-clear-button { margin-left: auto; }
.concept-idea-toolbar { display: flex; flex: 1; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.concept-idea-toolbar .choice-button { flex: 0 1 auto; min-width: 0; min-height: 34px; max-width: 100%; padding: 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.concept-idea-toolbar .choice-main { padding: 7px 6px; white-space: normal; }
.concept-idea-toolbar .choice-price { padding: 5px; font-size: 12px; }
.concept-undo-idea, #conceptClearGuide { min-height: 40px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.concept-undo-idea { margin-top: 10px; }
.concept-design-guide { margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--theme-edge-light); }
.concept-design-guide summary { cursor: pointer; color: var(--theme-heading-ink, var(--theme-ink)); font-size: 14px; font-weight: 700; line-height: 1.7; }
#conceptClearGuide { margin-top: 14px; }
.concept-reference-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
#conceptAddReference { display: inline-flex; align-items: center; gap: 7px; }
#conceptAddReference .pixel-icon { width: 18px; height: 18px; flex-shrink: 0; }
.concept-reference-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.concept-reference-toolbar button { min-height: 36px; padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.concept-reference-toolbar small { color: var(--theme-muted-ink); font-size: 13px; }
.concept-reference-help { margin: 10px 0 0; color: var(--theme-muted-ink); font-size: 13px; line-height: 1.7; }
.concept-reference-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.concept-reference { position: relative; width: 76px; height: 64px; border: 2px solid var(--theme-edge); transition: border-color .14s ease, box-shadow .14s ease; }
.concept-reference-preview { display: block; width: 100%; height: 100%; min-height: 0; border: 0; padding: 0; background: transparent; box-shadow: none; cursor: zoom-in; }
.concept-reference img { display: block; width: 100%; height: 100%; object-fit: cover; }
.concept-reference-remove { position: absolute; z-index: 1; right: 2px; top: 2px; display: grid; place-items: center; width: 20px; height: 20px; min-height: 0; padding: 0; font-family: inherit; font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .14s ease; }
.concept-reference:is(:hover, :focus-within) { border-color: var(--theme-selected-border, #83c262); box-shadow: 0 0 0 2px var(--theme-selected-border, #83c262); }
.concept-reference:is(:hover, :focus-within) .concept-reference-remove { opacity: 1; pointer-events: auto; }
.concept-reference-preview:focus-visible { outline: none; }
.concept-reference-remove:focus-visible { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 2px; }
@media (hover: none) {
  .concept-reference-remove { width: 24px; height: 24px; opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .concept-reference, .concept-reference-remove { transition: none; }
}
.concept-design-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px 14px; }
.concept-design-field { display: flex; flex-direction: column; align-self: start; min-width: 0; gap: 8px; }
.concept-design-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.concept-design-fields label { min-width: 0; font-size: 14px; font-weight: 700; color: var(--theme-muted-ink); }
.concept-word-open { min-height: 30px; padding: 4px 9px; font: inherit; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.concept-design-fields textarea { min-height: 100px; padding: 9px; font-size: 14px; font-weight: 400; }
.concept-word-dialog { width: min(900px, calc(100% - 32px)); height: min(800px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 22px; }
.concept-word-dialog[open] { display: grid; grid-template-rows: auto auto auto auto minmax(100px, 1fr) auto; gap: 12px; }
.concept-word-dialog::backdrop { background: #101717bb; }
.concept-word-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.concept-word-dialog h2 { margin: 0; color: var(--theme-heading-ink, var(--theme-ink)); font-size: 22px; }
.concept-word-dialog > .concept-form-help { margin: 0; }
.concept-word-dialog button { font-family: inherit; cursor: pointer; }
.concept-word-dialog button:disabled { opacity: .55; cursor: default; }
.concept-word-dialog > header button, .concept-word-actions button { min-height: 40px; padding: 8px 14px; font-size: 14px; font-weight: 700; }
#conceptWordSearch { width: 100%; min-width: 0; padding: 10px 12px; border: 2px solid var(--theme-field-border, #0f1415); background: var(--theme-field-background, #171c1d); color: var(--theme-ink); font: inherit; }
#conceptWordSearch::placeholder { color: var(--theme-placeholder-ink, #9eaca0); opacity: 1; }
.concept-word-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.concept-word-categories button { min-height: 34px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
#conceptWordDialog .concept-word-categories .active { border-color: var(--theme-selected-border, #83c262); box-shadow: inset 0 0 0 1px var(--theme-selected-border, #83c262); }
.concept-word-results { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 6px 4px 2px; scrollbar-width: thin; }
.concept-word-results section + section { margin-top: 18px; }
.concept-word-results h3 { margin: 0 0 10px; font-size: 14px; color: var(--theme-heading-ink, var(--theme-ink)); }
.concept-word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.concept-word-option { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px; text-align: left; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.concept-word-check { display: grid; place-items: center; width: 16px; height: 16px; flex-shrink: 0; border: 2px solid var(--theme-edge); font-size: 12px; line-height: 1; }
#conceptWordDialog .concept-word-option.is-selected { border-color: var(--theme-selected-border, #83c262); box-shadow: inset 0 0 0 1px var(--theme-selected-border, #83c262); }
.concept-word-option:hover { filter: brightness(1.07); }
.concept-word-dialog :is(button,input):focus-visible { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 2px; }
.concept-word-dialog > footer { border-top: 2px solid var(--theme-edge-light); padding-top: 12px; min-width: 0; }
.concept-word-selection-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.concept-word-selection-head button { padding: 5px 8px; font-size: 12px; }
.concept-word-selected { height: 42px; overflow: auto; margin: 8px 0; font-size: 13px; line-height: 1.6; color: var(--theme-muted-ink); }
.concept-word-error { margin: 8px 0; color: var(--theme-ink); font-size: 13px; font-weight: 700; }
.concept-word-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 600px) {
  .concept-word-dialog { width: calc(100% - 20px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); padding: 14px; }
  .concept-word-dialog[open] { gap: 10px; }
  .concept-word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .concept-word-categories { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 5px; scrollbar-width: thin; }
  .concept-word-categories button { flex-shrink: 0; }
  .concept-word-dialog h2 { font-size: 20px; }
}
.concept-creator-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 2px solid var(--theme-edge-light); }
.concept-creator-footer p { margin: 0; color: var(--theme-muted-ink); font-size: 13px; line-height: 1.7; }
.concept-creator-footer p b { margin-right: 4px; font-size: 24px; color: var(--theme-heading-ink, var(--theme-ink)); }
.concept-creator-footer .primary-button { width: auto; flex-shrink: 0; margin-left: auto; padding: 13px 18px; min-height: 72px; white-space: nowrap; }
.concept-creator-footer .generate-button-copy strong { font-size: 18px; line-height: 1.5; }
.concept-creator-footer .generate-button-copy small { font-size: 14px; line-height: 1.5; }
.concept-creator-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.concept-creator-preview h2 { margin: 0; color: var(--theme-heading-ink, var(--theme-ink)); font-size: 18px; }
.concept-creator-preview small { color: var(--theme-muted-ink); font-size: 13px; line-height: 1.6; }
.concept-preview-slot {
  display: block; width: 100%; aspect-ratio: 3/2; border: 3px solid var(--theme-edge); padding: 0;
  background: var(--theme-inset-background); background-size: var(--theme-inset-size); color: var(--theme-muted-ink); font: inherit;
  box-shadow: inset 2px 2px var(--theme-control-shadow, #202b26), inset -2px -2px var(--theme-control-highlight, #728278);
  cursor: pointer; overflow: hidden;
}
.concept-preview-slot:disabled { color: var(--theme-muted-ink); opacity: 1; cursor: default; filter: none; }
.concept-preview-slot:focus-visible { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 3px; }
.concept-preview-slot.has-image { aspect-ratio: auto; }
.concept-preview-slot img { display: block; width: 100%; height: auto; }
.concept-preview-stage { position: relative; touch-action: pan-y pinch-zoom; user-select: none; }
.concept-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.concept-preview-controls { display: flex; flex-shrink: 0; gap: 0; }
.concept-preview-arrow { display: grid; place-items: center; width: 44px; height: 40px; padding: 0 0 4px; font-family: inherit; font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; }
.concept-preview-controls button + button { margin-left: -2px; }
.concept-preview-arrow:focus-visible { outline: 2px solid var(--theme-selected-border, #83c262); outline-offset: 3px; }
.concept-preview-caption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; color: var(--theme-muted-ink); font-size: 14px; line-height: 1.7; }
.concept-preview-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--theme-muted-ink); }
.concept-preview-stage > .concept-preview-title, .concept-detail-preview > .concept-preview-title { margin-bottom: 10px; }
.concept-detail-preview { margin-top: 18px; }
#conceptPreviewPage { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.concept-creator-preview progress { width: 100%; height: 8px; accent-color: var(--theme-selected-border, #83c262); margin-bottom: 13px; }
.concept-creator-activity { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.concept-creator-activity progress { flex: 1; min-width: 0; width: auto; margin: 0; }
.concept-creator-activity > img { display: block; flex: none; width: 48px; height: 40px; object-fit: contain; }
.concept-preview-waiting { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; aspect-ratio: 3/2; padding: 16px; border: 3px solid var(--theme-edge); background: var(--theme-inset-background); color: var(--theme-ink); }
.concept-preview-waiting > img { display: block; width: min(48%, 256px); height: auto; }
.concept-preview-waiting > strong { font-size: 18px; line-height: 1.6; }
.concept-creator-result-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 18px; margin-bottom: 14px; }
.concept-primary-actions, .concept-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.concept-primary-actions > *, .concept-secondary-actions > * { font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.concept-primary-actions > * { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.concept-secondary-actions { justify-content: flex-end; gap: 8px; margin-left: auto; }
.concept-secondary-actions > * { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 10px; font-size: 13px; }
.concept-creator-result-note { padding: 10px 12px; border-left: 3px solid var(--theme-edge); background: var(--theme-inset-background); color: var(--theme-ink); line-height: 1.7; font-size: 14px; }
.concept-recent { margin-top: 28px; padding: 24px; }
.concept-recent > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.concept-recent h2 { margin: 0; font-size: 18px; color: var(--theme-heading-ink, var(--theme-ink)); }
.concept-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; font-size: 14px; color: var(--theme-muted-ink); }
.concept-recent-item { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: left; padding: 12px; cursor: pointer; min-width: 0; min-height: 0; border: 4px solid var(--theme-edge); color: var(--theme-ink); font: inherit; }
.concept-recent-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; font-size: 14px; color: var(--theme-ink); }
.concept-recent-pagination button { min-height: 38px; padding: 7px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.concept-recent-pagination button:disabled { opacity: .5; cursor: default; }
.concept-recent-cover { display: block; width: 100%; flex: none; border: 2px solid var(--theme-edge); background: var(--theme-inset-background); overflow: hidden; }
.concept-recent-cover > img { display: block; width: 100%; height: auto; object-fit: contain; }
.concept-recent-cover:not(:has(> img)) { display: grid; place-items: center; aspect-ratio: 5/2; }
.concept-recent-caption { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.concept-recent-author { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--theme-ink); }
.concept-author-avatar { width: 44px; height: 44px; flex: none; image-rendering: pixelated; }
.concept-author-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 15px; }
.concept-author-action { flex: none; color: var(--theme-muted-ink); font-size: 13px; }
.concept-recent-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; overflow-wrap: anywhere; color: var(--theme-ink); }
.concept-recent-author + .concept-recent-description { border-top: 1px solid var(--theme-edge); padding-top: 8px; }
.concept-image-tabs { display: flex; gap: 8px; align-items: center; padding: 10px 18px; }
.concept-image-tabs .choice-main { padding: 9px 16px; }
.concept-image-actions a { padding: 9px 12px; text-decoration: none; font-size: 13px; }
#conceptImageDialog[open] { grid-template-rows: auto auto auto minmax(0, 1fr); }
#conceptImageDialog > header { grid-row: 1; }
#conceptImageTabs { grid-row: 2; padding: 0; }
#conceptImageHint { grid-row: 3; align-self: start; }
#conceptLargeImage { grid-row: 4; }
@media (max-width: 760px) {
  .concept-tier-choices { grid-template-columns: 1fr; }
  .concept-idea-toolbar { align-items: flex-start; flex-direction: column; }
  .concept-creator-page.wrap { width: min(100% - 34px, 680px); padding-top: 24px; }
  .concept-creator-heading { align-items: start; flex-wrap: wrap; gap: 12px; }
  .concept-creator-heading .page-intro { width: 100%; padding: 14px 16px; }
  .concept-creator-heading h1 { font-size: 28px; }
  .concept-creator-grid { grid-template-columns: 1fr; gap: 18px; }
  .concept-creator-form, .concept-creator-preview, .concept-recent { padding: 18px; }
  .concept-primary-actions { width: 100%; }
  .concept-secondary-actions > * { min-height: 40px; }
  .concept-recent-grid { grid-template-columns: 1fr; }
  .concept-creator-preview small { max-width: 65%; text-align: right; }
  .concept-creator-footer { display: grid; grid-template-columns: 1fr; }
  .concept-creator-footer .primary-button { width: 100%; margin-left: 0; padding: 12px; }
  .concept-design-fields { grid-template-columns: 1fr; }
  .concept-image-actions { flex-wrap: wrap; }
}
