.t2i-page { margin:0; background:#f6f4ed; color:#252d2b; font:16px/1.75 system-ui,sans-serif; }
.t2i-page * { box-sizing:border-box; }
.t2i-page :where(a) { color:#344f43; text-underline-offset:4px; }
.t2i { max-width:1040px; margin:45px auto; padding:0 24px 160px; }.t2i h1 { font-size:clamp(27px,4vw,46px); line-height:1.4; font-weight:500; }
.t2i .eyebrow { font-size:12px; letter-spacing:.22em; color:#90634b; }.t2i .t2i-toolbar { background:#e8ebe3; padding:18px; border-radius:8px; }.t2i-toolbar p,.t2i-footnote { font-size:13px; }
.t2i label { display:grid; gap:6px; margin:12px 0; font-size:14px; font-weight:550; }.t2i input,.t2i select,.t2i textarea,.t2i button { font:inherit; color:inherit; max-width:100%; min-width:0; }
.t2i input,.t2i select,.t2i textarea { width:100%; min-height:44px; padding:10px; border:1px solid #9eaaa0; border-radius:4px; background:#fffef9; }.t2i textarea { resize:vertical; }.t2i select[multiple] { min-height:120px; }
.t2i button { cursor:pointer; min-height:44px; padding:10px 18px; border:1px solid #647669; background:#fffef9; border-radius:4px; }.t2i button:disabled { opacity:.55; cursor:default; }
.t2i :focus-visible { outline:3px solid #a65336; outline-offset:3px; }.t2i .accordion-trigger { margin:24px 0 0; padding:16px 18px; border:1px solid #c9cec2; border-radius:6px; cursor:pointer; font-size:18px; background:#e9ede4; }.t2i .accordion-trigger::after { content:' ＋'; float:right; }.t2i .accordion-trigger.active::after { content:' −'; }
.t2i .accordion-content { padding:16px 20px; border:1px solid #d2d5cb; border-top:0; overflow:visible; max-height:none!important; }.t2i [hidden] { display:none!important; }
.t2i .grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 20px; }.t2i fieldset { border:1px solid #d1d4c8; margin:14px 0; padding:10px 14px; min-width:0; }.t2i legend { padding:0 8px; font-size:15px; }
.t2i .attribute-note { font-size:12px; color:#765d36; }.t2i .selection { padding-bottom:12px; border-bottom:1px solid #deded4; }.t2i .generate-btn-group { display:flex; flex-wrap:wrap; gap:10px; margin:28px 0; }#generate-image { background:#2c473b; color:white; }
.t2i details { margin:16px 0; }.t2i summary { cursor:pointer; padding:12px 4px; min-height:44px; overflow-wrap:anywhere; }.t2i legend,.t2i p { overflow-wrap:anywhere; }.t2i .image-panel { padding:10px; border:1px solid #c9cec2; border-radius:6px; }.t2i #image-persistence { padding:12px; border:1px solid #c9cec2; background:#fffdf7; }.t2i #image-persistence button,.t2i #image-ai-continue button { margin:4px; }.t2i input[type=checkbox] { width:24px; min-height:24px; margin-right:10px; }.t2i #image-edit-candidates label { display:flex; align-items:center; min-height:44px; }.t2i #image-edit-candidates pre { max-height:180px; background:#eeeee5; padding:10px; }
.t2i #image-inactive-attributes pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow:auto; }
.t2i .result-area>label { font-size:20px; }.t2i .result-area pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:450px; overflow:auto; font-size:13px; }.t2i #t2i-errors { padding:16px; border:2px solid #a34335; margin:18px 0; white-space:pre-wrap; overflow-wrap:anywhere; }.t2i #t2i-status { color:#80533a; margin:12px 0; }
@media(min-width:1200px){.t2i{margin-right:270px;margin-left:max(24px,calc((100vw - 1200px)/2));}}
@media(max-width:600px){.t2i{padding:0 16px 180px;margin-top:25px;}.t2i .grid{grid-template-columns:1fr;}.t2i .accordion-content{padding:12px;}.t2i .accordion-trigger{font-size:16px;padding:15px 12px;}}
.t2i .image-multichoice { border-radius:6px; padding:8px; }
.t2i .image-multichoice details { margin:4px 0; }
.t2i .image-choice-selected { margin:4px 0; font-size:13px; max-height:6rem; overflow:auto; }
.t2i .image-choice-list { max-height:16rem; overflow:auto; overscroll-behavior:contain; padding:5px; border:1px solid #c9cec2; border-radius:4px; }
.t2i .image-choice-list label { display:flex; align-items:center; gap:10px; min-height:44px; margin:3px 0; padding:7px; border:1px solid transparent; border-radius:4px; cursor:pointer; }
.t2i .image-choice-list input[type=checkbox] { flex:0 0 22px; width:22px; height:22px; min-height:22px; margin:0; padding:0; accent-color:#2c473b; }
.t2i .image-choice-list span { min-width:0; overflow-wrap:anywhere; }
.t2i .image-choice-list .is-selected { background:#e0ecdf; border-color:#647669; }
.t2i .classification-note { font-size:13px; }
.t2i .classification-note.is-conflict { border-left:3px solid #a34335; padding:8px; background:#fff0e6; }
.t2i .classification-reason { font-size:11px; font-weight:400; overflow-wrap:anywhere; }
.t2i .classification-unavailable { opacity:.65; cursor:not-allowed; }
@media(max-width:600px){
 .t2i .image-choice-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .t2i .image-choice-list label { display:grid; position:relative; grid-template-columns:minmax(0,1fr); min-height:48px; margin:0; padding:8px 20px; border:2px solid #9eaaa0; background:#fffef9; text-align:center; }
 .t2i .image-choice-list input[type=checkbox] { position:absolute; width:1px; height:1px; min-height:0; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; }
 .t2i .image-choice-list label.is-selected { background:#d6e7d3; border-color:#2c473b; }
 .t2i .image-choice-list label.is-selected::after { content:'✓' / ''; position:absolute; right:5px; top:5px; font-weight:700; line-height:1; }
 .t2i .image-choice-list label:focus-within { outline:3px solid #a65336; outline-offset:1px; }
 .t2i-page.has-generator-floating-nav #main { padding-bottom:calc(180px + env(safe-area-inset-bottom)); }
 .t2i :is(input,textarea,select,.image-choice-list label) { scroll-margin-top:16px; scroll-margin-bottom:calc(140px + env(safe-area-inset-bottom)); }
 .t2i-page:has(.t2i :is(input,textarea,select,[contenteditable="true"]):focus) .generator-floating-nav { visibility:hidden; pointer-events:none; }
}

.t2i .creative-expression-list { max-height:20rem; overflow:auto; overscroll-behavior:contain; }
@media(max-width:600px){
 .t2i-page .generator-floating-nav button { min-height:48px; padding:6px; }
}

/* Common pose/expression helpers; panel controls are unchanged. */
.t2i .input-hint-options { max-height:18rem; overflow:auto; overscroll-behavior:contain; }
.t2i .input-hint-note { font-size:.875rem; }
.t2i .input-hint-warning:not(:empty) { padding:.5rem; border-left:3px solid #a56b00; }
.t2i .input-hints :is(label,select,textarea) { max-width:100%; overflow-wrap:anywhere; }

/* Output comparison is local presentation state, outside Document v1. */
.t2i .output-comparison { margin:1rem 0; padding:1rem; border:1px solid #9eaaa0; overflow-wrap:anywhere; }
.t2i .output-comparison textarea { box-sizing:border-box; width:100%; min-width:0; font-family:inherit; }
.t2i #image-output-limit-warning:not(:empty) { border-left:3px solid #a56b00; padding:.5rem; background:#fff4dd; }
.t2i .output-style-controls { min-width:0; }

/* T2I-only subject tabs; stored subject IDs and quantities are unchanged. */
.t2i #image-subject-switcher { margin-bottom:18px; }
.t2i .image-subject-tabs { display:flex; gap:8px; overflow-x:auto; padding:4px; max-width:100%; }
.t2i .image-subject-tabs [role=tab] { flex:0 0 auto; min-height:48px; }
.t2i .image-subject-tabs [aria-selected=true] { background:#2c473b; color:#fff; border-color:#2c473b; }
.t2i #image-subject-switcher>button { margin:8px 8px 0 0; }
.t2i #image-subject-add-dialog { width:min(92vw,520px); max-height:85vh; overflow:auto; border:1px solid #647669; border-radius:8px; padding:24px; background:#fffef9; color:#252d2b; }
.t2i #image-subject-add-dialog::backdrop { background:rgb(20 30 24 / 55%); }
.t2i #image-subject-add-dialog h2 { font-size:20px; }
.t2i #image-subject-add-dialog button { display:block; width:100%; min-height:48px; margin:10px 0; white-space:normal; }
.t2i #image-legacy-quantity { padding:0 8px; border:1px solid #d1d4c8; }
.t2i #image-output-compatibility { font-size:14px; }
.t2i #image-advisory-warnings { background:#fff4dd; border-left:3px solid #a56b00; padding:10px 16px; overflow-wrap:anywhere; }

/* Toggle state is independent for each subject and is also exposed to AT. */
.t2i .image-hint-suggestions button[aria-pressed=true] { background:#2c473b; color:#fff; border-color:#2c473b; box-shadow:inset 0 0 0 2px #fff; }
.t2i .image-hint-suggestions button:focus-visible { outline:3px solid #a65336; outline-offset:2px; }

/* Selection -> detail -> apply -> edit: presentation only. */
#prompt-form .generator-workflow-note { font-size:.875rem;line-height:1.6;margin:.5rem 0 .75rem;overflow-wrap:anywhere; }
#prompt-form .generator-workflow-selection { font-size:.9rem;font-weight:600;line-height:1.5;margin:.4rem 0;overflow-wrap:anywhere; }
.t2i #image-cloud-projects,
.t2i .image-cloud-guest { margin: 16px 0; text-align: center; }
.t2i .image-cloud-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.t2i .image-cloud-actions button { min-height: 44px; margin: 0; }
.t2i #image-cloud-create,
.t2i #image-cloud-refresh { color: #fff; border: 0; border-radius: 5px; padding: 10px 20px; }
.t2i #image-cloud-create { background: #a64e0b; }
.t2i #image-cloud-refresh { background: #1b713f; }
.t2i #image-cloud-library { margin: 12px 0 0; padding: 12px; border: 1px solid #ddd; background: #fff; text-align: left; }
.t2i #image-cloud-library select { display: block; width: 100%; min-width: 0; margin: 6px 0 12px; }
.t2i #image-cloud-library .image-cloud-actions { justify-content: flex-start; }
