*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

/* Hallmark · genre: modern-minimal · macrostructure: Split Workbench · design-system: tokens.css · designed-as-app */

html,
	body {
  overflow-x: clip;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background:
			linear-gradient(180deg, var(--color-panel-solid), transparent 18rem),
			var(--color-paper);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
	select,
	input,
	textarea {
  font: inherit;
}

button,
	a,
	input,
	select,
	textarea,
	summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100% - var(--space-lg), 88rem);
  margin-inline: auto;
  padding-block: var(--space-lg);
}

.workspace-header,
	header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: end;
  padding: var(--space-sm) 0 var(--space-lg);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

.brand-block {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: var(--rule-thin) solid var(--color-rule-strong);
  border-radius: 0.9rem;
  background: var(--color-panel-solid);
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 800;
  text-decoration: none;
}

.eyebrow,
	.panel-kicker {
  margin: 0 0 var(--space-2xs);
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1,
	h2,
	h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-ink);
  font-style: normal;
}

h1 {
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: 0;
}

header p:not(.eyebrow) {
  max-width: 46rem;
  margin: var(--space-xs) 0 0;
  color: var(--color-muted);
  line-height: 1.7;
}

header > p:last-child {
  display: none;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-paper-2);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding-inline: var(--space-sm);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.nav-link.active,
	.nav-link:hover {
  background: var(--color-panel-solid);
  color: var(--color-ink);
}

.nav-link:focus-visible,
	button:focus-visible,
	input:focus-visible,
	select:focus-visible,
	textarea:focus-visible,
	summary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.text-layout,
	.main-content {
  display: grid;
  grid-template-columns: minmax(20rem, 0.92fr) minmax(0, 1.08fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.image-workbench {
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(22rem, 1.2fr) minmax(17rem, 0.88fr);
  gap: var(--space-md);
  align-items: start;
  margin-top: var(--space-lg);
}

.image-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.panel,
	.history-panel {
  min-width: 0;
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.panel {
  padding: var(--space-md);
}

.history-panel {
  margin-top: var(--space-md);
  padding: var(--space-md);
}

.input-panel,
	.image-summary-panel {
  background:
			linear-gradient(180deg, var(--color-panel-solid), var(--color-panel)),
			var(--color-panel);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
}

.panel-header .icon {
  display: none;
}

.panel-meta {
  color: var(--color-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.control-grid,
	.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: end;
  margin-top: var(--space-sm);
}

.control-stack {
  display: grid;
  gap: var(--space-sm);
}

.field-block {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.field-label,
	.tag-group h3 {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 760;
}

input,
	textarea,
	select {
  width: 100%;
  min-width: 0;
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background-color: var(--color-panel-solid);
  color: var(--color-ink);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.7);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

input,
	select {
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
}

select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding-right: 2.35rem;
  background-image:
			linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
			linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position:
			calc(100% - 1.15rem) 50%,
			calc(100% - 0.86rem) 50%;
  background-size: 0.34rem 0.34rem;
  background-repeat: no-repeat;
}

select option {
  background: var(--color-panel-solid);
  color: var(--color-ink);
}

textarea {
  min-height: 22rem;
  padding: var(--space-sm);
  resize: vertical;
  line-height: 1.72;
}

.image-summary-panel textarea {
  min-height: 31rem;
}

input::-moz-placeholder, textarea::-moz-placeholder {
  color: var(--color-muted);
  opacity: 0.72;
}

input::placeholder,
	textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.72;
}

input:focus,
	textarea:focus,
	select:focus {
  border-color: var(--color-accent);
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--space-sm);
}

button {
  cursor: pointer;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary,
	.btn-secondary {
  min-height: 2.75rem;
  padding-inline: var(--space-md);
  border: var(--rule-thin) solid var(--color-rule-strong);
}

.btn-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: var(--shadow-control);
}

.btn-primary:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
}

.btn-secondary {
  background: var(--color-panel-solid);
  color: var(--color-ink);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.inline-btn,
	.compact-btn {
  padding-inline: var(--space-sm);
}

.vertical-actions {
  flex-direction: column;
  align-items: stretch;
}

.workflow-panel,
	.diagnosis-preview,
	.workflow-result,
	.selected-tags,
	.summary-preview,
	.output-content,
	.streaming-output,
	.config-preview,
	.evaluation-item {
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: oklch(99.2% 0.004 84 / 0.64);
}

.workflow-panel,
	.diagnosis-preview,
	.workflow-result {
  margin-block: var(--space-sm);
  padding: var(--space-sm);
}

.compact-workflow {
  display: grid;
  gap: var(--space-sm);
}

.compact-diagnosis {
  background: transparent;
  border-style: dashed;
}

.optional-context summary {
  cursor: pointer;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.optional-context input {
  margin-top: var(--space-xs);
}

.strategy-strip,
	.diagnosis-checks,
	.micro-actions,
	.tag-list,
	.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.strategy-strip label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding-inline: var(--space-sm);
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-panel-solid);
  color: var(--color-ink-2);
  font-size: var(--text-xs);
  font-weight: 720;
}

.strategy-strip input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--color-accent);
}

.diagnosis-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.diagnosis-head span,
	.empty-state,
	.muted-text,
	.history-item-preview,
	.history-item-time,
	.config-preview p,
	.evaluation-item p,
	.evaluation-item li {
  color: var(--color-muted);
}

.diagnosis-checks span {
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 760;
}

.diagnosis-checks .is-ok {
  background: oklch(91% 0.045 172);
  color: oklch(35% 0.08 172);
}

.diagnosis-checks .is-missing {
  background: var(--color-warm-soft);
  color: oklch(42% 0.08 62);
}

.output-content {
  min-height: 22rem;
  padding: var(--space-sm);
  overflow-x: auto;
  line-height: 1.72;
}

.compact-output {
  max-height: 38rem;
}

.empty-state {
  display: grid;
  min-height: 9rem;
  place-items: center;
  text-align: center;
}

.tag-groups {
  display: grid;
  gap: var(--space-sm);
}

.image-tag-panel .tag-groups {
  max-height: 55rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.tag-group {
  border-top: var(--rule-thin) solid var(--color-rule);
  padding-top: var(--space-sm);
}

.tag-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.tag-list {
  margin-top: var(--space-xs);
}

.tag-chip,
	.selected-tag {
  flex: 0 0 auto;
  min-height: 2.15rem;
  padding-inline: 0.85rem;
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-panel-solid);
  color: var(--color-ink-2);
  font-size: var(--text-xs);
  font-weight: 720;
}

.tag-chip:hover {
  border-color: var(--color-accent-2);
  color: var(--color-ink);
}

.tag-chip.selected,
	.selected-tag {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.selected-tags {
  min-height: 3.1rem;
  align-items: center;
  padding: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.improved-prompt {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  border: var(--rule-thin) solid var(--color-accent);
  border-left-width: 0.3rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
}

.improved-prompt h3,
	.variant-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: var(--text-md);
  font-weight: 760;
}

.prompt-text,
	.code-block,
	.variant-card .prompt-text {
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-panel-solid);
  color: var(--color-ink);
  padding: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.72;
}

.code-block {
  margin-block: var(--space-sm);
  overflow-x: auto;
  font-family: var(--font-outlier);
}

.inline-code {
  border: var(--rule-thin) solid var(--color-warm);
  border-radius: 0.35rem;
  background: var(--color-warm-soft);
  color: oklch(42% 0.08 62);
  padding: 0.1rem 0.35rem;
  font-size: var(--text-sm);
}

.copy-btn {
  min-height: 2.35rem;
  margin-top: var(--space-xs);
  padding-inline: var(--space-sm);
  border: var(--rule-thin) solid var(--color-accent-2);
  background: var(--color-accent-2);
  color: var(--color-accent-ink);
}

.copy-btn:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.variant-card {
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-panel-solid);
  padding: var(--space-sm);
}

.variant-card .prompt-text {
  max-height: 16rem;
  overflow: auto;
  margin-bottom: var(--space-xs);
}

.score {
  margin-left: 0.4rem;
  color: var(--color-warm);
}

.evaluation-item {
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  border-left: 0.3rem solid var(--color-accent);
}

.history-list {
  max-height: 25rem;
  overflow-y: auto;
}

.history-toolbar {
  margin-bottom: var(--space-sm);
}

.history-item {
  cursor: pointer;
  border-bottom: var(--rule-thin) solid var(--color-rule);
  padding: var(--space-sm);
  transition: background-color var(--dur-short) var(--ease-out);
}

.history-item:hover {
  background: oklch(99.2% 0.004 84 / 0.62);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xs);
}

.history-item-title {
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 760;
}

.history-item-time {
  font-size: var(--text-xs);
}

.history-item-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
}

.history-actions {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-xs);
}

.history-actions button {
  min-height: 2rem;
  padding-inline: var(--space-xs);
  font-size: var(--text-xs);
}

.error-message {
  border-left-color: var(--color-danger);
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.\!toast {
  pointer-events: none !important;
  position: fixed !important;
  right: var(--space-sm) !important;
  bottom: var(--space-sm) !important;
  z-index: 50 !important;
  max-width: min(24rem, calc(100vw - var(--space-lg))) !important;
  transform: translateY(0.5rem) !important;
  border: var(--rule-thin) solid var(--color-rule) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--color-panel-solid) !important;
  box-shadow: var(--shadow-panel) !important;
  color: var(--color-ink) !important;
  opacity: 0 !important;
  padding: 0.7rem 0.9rem !important;
  font-size: var(--text-sm) !important;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out) !important;
}

.toast {
  pointer-events: none;
  position: fixed;
  right: var(--space-sm);
  bottom: var(--space-sm);
  z-index: 50;
  max-width: min(24rem, calc(100vw - var(--space-lg)));
  transform: translateY(0.5rem);
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-panel-solid);
  box-shadow: var(--shadow-panel);
  color: var(--color-ink);
  opacity: 0;
  padding: 0.7rem 0.9rem;
  font-size: var(--text-sm);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.\!toast.show {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.home-shell {
  width: min(100% - var(--space-lg), 78rem);
}

.home-header {
  align-items: center;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(17rem, 0.75fr);
  gap: var(--space-lg);
  align-items: end;
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

.home-intro {
  min-width: 0;
}

.home-intro h2 {
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 7.2rem);
  font-weight: 640;
  line-height: 0.95;
  letter-spacing: 0;
}

.home-intro p:not(.eyebrow) {
  max-width: 42rem;
  margin: var(--space-md) 0 0;
  color: var(--color-ink-2);
  font-size: var(--text-lg);
  line-height: 1.75;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  text-decoration: none;
}

.home-note {
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
  padding: var(--space-md);
}

.home-note h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.15;
}

.home-note p:not(.panel-kicker) {
  margin: var(--space-sm) 0 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.entry-card {
  position: relative;
  display: grid;
  min-height: 19rem;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  color: var(--color-ink);
  box-shadow: var(--shadow-panel);
  text-decoration: none;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  background: var(--color-panel-solid);
}

.entry-card:focus-visible {
  outline-color: var(--color-focus);
}

.entry-card-primary {
  background:
			linear-gradient(180deg, var(--color-accent-soft), var(--color-panel)),
			var(--color-panel);
}

.entry-card-disabled {
  opacity: 0.72;
}

.entry-card-disabled:hover {
  transform: none;
  border-color: var(--color-rule);
  background: var(--color-panel);
}

.entry-index {
  color: var(--color-muted);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 780;
}

.entry-card h2 {
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.1;
}

.entry-card p:not(.panel-kicker) {
  margin: 0;
  color: var(--color-ink-2);
  line-height: 1.72;
}

.entry-link {
  justify-self: start;
  border: var(--rule-thin) solid var(--color-rule-strong);
  border-radius: var(--radius-pill);
  padding: 0.55rem 0.9rem;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 780;
}

.home-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--space-lg);
  align-items: start;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: var(--rule-thin) solid var(--color-rule);
}

.home-flow h2 {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: 1.12;
}

.flow-list {
  display: grid;
  gap: var(--space-sm);
}

.flow-list div {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-top: var(--rule-thin) solid var(--color-rule);
}

.flow-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.flow-list strong {
  color: var(--color-ink);
  font-size: var(--text-sm);
}

.flow-list p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

@media (max-width: 68rem) {
  .text-layout,
		.main-content,
		.image-workbench,
		.image-result-grid,
		.variant-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-tag-panel {
    order: 1;
  }

  .image-summary-panel {
    order: 2;
  }

  .image-action-panel {
    order: 3;
  }

  .image-tag-panel .tag-groups {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .home-grid,
		.home-entry-grid,
		.home-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-entry-grid {
    gap: var(--space-sm);
  }

  .entry-card {
    min-height: 0;
  }
}

@media (max-width: 48rem) {
  .app-shell {
    width: min(100% - var(--space-md), 88rem);
    padding-block: var(--space-md);
  }

  .workspace-header,
		header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: var(--space-sm);
  }

  h1 {
    max-width: 11ch;
  }

  .home-intro h2 {
    max-width: 9ch;
    font-size: clamp(2.7rem, 18vw, 4.6rem);
  }

  .home-intro p:not(.eyebrow) {
    font-size: var(--text-md);
  }

  .top-nav {
    width: 100%;
  }

  .nav-link {
    flex: 1 1 0;
  }

  .control-grid,
		.workflow-grid,
		.template-row,
		.control-row {
    grid-template-columns: minmax(0, 1fr);
    flex-direction: column;
    align-items: stretch;
  }

  .panel,
		.history-panel {
    padding: var(--space-sm);
  }

  .panel-header {
    align-items: flex-start;
  }

  .panel-meta {
    display: none;
  }

  textarea,
		.image-summary-panel textarea {
    min-height: 18rem;
  }

  .flow-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xs);
  }
}

@media (max-width: 24rem) {
  .brand-block {
    display: grid;
  }

  .btn-group {
    display: grid;
  }

  .btn-primary,
		.btn-secondary,
		.copy-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
		*::before,
		*::after {
    transition-duration: 50ms !important;
    scroll-behavior: auto !important;
  }
}
