/* Shared workspace styling; loaded after each demo's component stylesheet. */
.tool-page .container { padding-top: 28px; }
.tool-header { margin-bottom: 30px; }
.tool-header .breadcrumb { margin-bottom: 24px; }
.tool-header .breadcrumb a { font-size: .85rem; }
.tool-header h1 { font: 500 clamp(2.2rem, 4vw, 3.25rem)/1.15 var(--font-display); letter-spacing: -.035em; margin-bottom: 16px; }
.tool-description { max-width: 48rem; font-size: 1.12rem; }
.demo-notice { background: #edf0e6; color: var(--text-muted); border-left: 3px solid #718c64; border-radius: 0 8px 8px 0; padding: 14px 18px; margin-top: 22px; font-size: .9rem; line-height: 1.6; max-width: 64rem; }
.demo-notice strong { color: var(--primary); }
.tool-layout, .playground-layout, .summarizer-layout, .assistant-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tool-page main > div, .tool-page main > section { min-width: 0; }
.tool-page :is(.input-section, .results-section, .prompt-section, .response-section, .writing-section, .feedback-section, .output-section, .setup-section, .character-section, .difficulty-section, .level-section) { min-width: 0; box-shadow: none; border-radius: 12px; padding: 24px; }
.tool-page :is(.input-header, .results-header, .prompt-header, .response-header, .writing-header, .feedback-header, .output-header) { gap: 14px; margin-bottom: 20px; align-items: start; }
.tool-page main h2 { font: 500 1.35rem/1.3 var(--font-display); letter-spacing: -.02em; }
.tool-page main > :is(div, section) > h2 { margin-bottom: 20px; }
.tool-page main h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.tool-page main h4 { font-size: .97rem; font-weight: 600; }
.tool-page :is(.setup-section, .character-section, .difficulty-section, .level-section, .educational-info, .prompt-templates, .conversation-history, .tool-resources) > h2 { margin-bottom: 20px; }
.tool-page .btn { min-height: 40px; padding: 8px 13px; font-size: .86rem; }
.tool-page :is(.input-controls, .prompt-controls, .response-controls, .output-controls, .export-controls, .writing-controls, .feedback-controls, .conversation-controls) { gap: 7px; flex-wrap: wrap; }
.tool-page textarea { font: 1rem/1.65 var(--font-body); border-width: 1px !important; background: #fdfcf8; border-color: #cdd3c6; border-radius: 8px; }
.tool-page textarea::placeholder { color: #747c72; opacity: 1; }
.tool-page :is(textarea, input, select):focus { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
.tool-page :is(textarea, input, select):focus-visible { outline: 3px solid #ab542d; outline-offset: 3px; }
.tool-page select { min-height: 40px; max-width: 100%; background: #f4f5ee; }
.tool-page :is(.text-stats, .writing-stats, .analysis-metrics, .text-info) { font-size: .8rem; gap: 12px; }
.tool-page :is(.results-tabs, .analysis-tabs, .feedback-tabs, .comparison-tabs, .prompt-categories) { gap: 5px; flex-wrap: wrap; overflow: visible; }
.tool-page :is(.tab-btn, .category-btn) { font-size: .82rem; min-height: 38px; padding: 8px 12px; border-radius: 6px; }
.tool-page :is(.tab-btn, .category-btn).active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tool-page :is(.response-status, .summary-status, .feedback-status) { font-size: .95rem; color: var(--text-muted); line-height: 1.6; padding: 28px 22px; background: #f6f6f0; border: 1px dashed #cdd3c6; border-radius: 8px; }
.tool-page :is(.ai-response, .summary-text, .feedback-content, .message-text, .history-prompt, .history-response, .keyword-list) { overflow-wrap: anywhere; }
.tool-page :is(.metric-card, .overview-summary, .analysis-summary, .word-frequency, .score-breakdown, .comp-summary) { box-shadow: none; }
.tool-page .metric-value { overflow-wrap: anywhere; }
.tool-page .metric-card { padding: 16px; border-radius: 8px; }
.tool-page .overview-grid { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-page :is(.scenario-card, .language-card, .character-card, .difficulty-card, .level-card, .template-card) { background: #f9f9f3; box-shadow: none; transition: border-color .15s, background .15s; }
.tool-page :is(.scenario-card, .language-card, .character-card, .difficulty-card, .level-card, .template-card):hover { transform: none; box-shadow: none; background: #edf1e7; }
.tool-page :is(.scenario-card, .language-card, .character-card, .difficulty-card, .level-card, .template-card):focus-visible { outline: 3px solid #ab542d; outline-offset: 3px; }
.tool-page :is(.scenario-card, .language-card, .character-card, .difficulty-card, .level-card).selected { background: var(--primary-soft); border: 2px solid var(--primary); color: var(--text); }
.tool-page :is(.scenario-card, .language-card, .character-card, .difficulty-card, .level-card).selected :is(h3, h4, p) { color: var(--primary); }
.tool-page .template-category > h3 { color: var(--primary); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.tool-page .template-card h4 { margin-bottom: 6px; }
.tool-page :is(.scenario-card, .language-card, .template-card) h3 { margin-bottom: 7px; }
.tool-page :is(.scenario-icon, .language-flag) { font-size: 1.8rem; margin-bottom: 8px; }
.tool-page .simulator-setup, .tool-page .language-setup { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.tool-page .scenario-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.tool-page .language-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.tool-page :is(.educational-info, .writing-prompt, .template-preview, .prompt-optimization) { background: #edf0e6; border-radius: 12px; padding: 28px; border-color: var(--border); }
.tool-page .educational-info { margin-top: 36px; }
.tool-page :is(.info-card, .technique-card, .tip-card, .application, .practice, .resource-card, .template-category) { box-shadow: none; }
.tool-page :is(.info-card, .technique-card, .tip-card, .application, .practice, .resource-card, .template-category) h3 { margin-bottom: 10px; }
.tool-page .conversation-header { background: #edf0e6; color: var(--text); gap: 15px; flex-wrap: wrap; padding: 20px 24px; }
.tool-page .conversation-header :is(h2, h3, p) { color: var(--text); }
.tool-page :is(.conversation-display, .conversation-area) { border-radius: 10px; }
.tool-page .message { max-width: 100%; }
.tool-page .tool-resources { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border); }
.tool-page .tool-resources > p { max-width: 48rem; color: var(--text-muted); font-size: .97rem; }
.tool-page .practice-prompt { background: var(--surface); padding: 18px 22px; border: 1px solid var(--border); border-radius: 8px; margin: 18px 0; }
.tool-page .resource-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.tool-page .resource-list li { min-width: 0; }.tool-page .resource-list a { overflow-wrap: anywhere; }
.tool-page .notification { max-width: min(440px, calc(100vw - 32px)); }
.tool-page .footer { margin-top: 0; }
@media (max-width: 1000px) {
    .tool-page :is(.input-section, .results-section, .prompt-section, .response-section, .writing-section, .feedback-section, .output-section) { padding: 20px; }
    .tool-page :is(.tool-layout, .playground-layout, .summarizer-layout, .assistant-layout) { gap: 18px; }
}
@media (max-width: 800px) {
    .tool-page :is(.tool-layout, .playground-layout, .summarizer-layout, .assistant-layout) { grid-template-columns: minmax(0, 1fr); }
    .tool-page .tool-description { font-size: 1.05rem; }.tool-page .resource-list { grid-template-columns: 1fr; }
    .tool-page :is(.template-categories, .techniques-grid, .applications, .info-grid, .tips-grid, .practices-grid, .resources-grid, .comparison-grid, .optimization-tools, .keyword-analysis) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .tool-page .container { padding-top: 22px; }
    .tool-page #vocabWord { min-width: 0; width: 100%; flex-basis: 100%; }
    .tool-page .prompt-tips { min-width: 0; text-align: left; }
    .tool-page .overview-grid { grid-template-columns: 1fr; }
    .tool-header h1 { font-size: 2.25rem; }.tool-header .breadcrumb { margin-bottom: 20px; }
    .tool-page :is(.input-section, .results-section, .prompt-section, .response-section, .writing-section, .feedback-section, .output-section, .setup-section, .character-section, .difficulty-section, .level-section) { padding: 18px; }
    .tool-page :is(.input-controls, .prompt-controls, .response-controls, .output-controls, .export-controls, .writing-controls, .feedback-controls) { width: 100%; }
    .tool-page :is(.educational-info, .writing-prompt, .template-preview, .prompt-optimization) { padding: 20px; }
    .tool-page :is(.category-templates, .difficulty-options, .level-options, .character-grid, .summary-metrics, .structure-analysis, .stats-grid) { grid-template-columns: minmax(0, 1fr); }
    .tool-page :is(.input-container, .user-input-area) { min-width: 0; }.tool-page .input-container { flex-wrap: wrap; }
    .tool-page .option-group { flex-wrap: wrap; min-width: 0; }
    .tool-page .option-group select { width: 100%; min-width: 0; }
    .tool-page .input-container textarea { flex-basis: 100%; min-width: 0; }
    .tool-page .conversation-header { padding: 18px; }
    .tool-page .user-input-area { padding: 18px; }
    .tool-page .conversation-display { padding: 16px; }
    .tool-page :is(.message-content, .message-bubble) { max-width: 100%; min-width: 0; }
    .tool-page :is(.difficulty-card, .level-card) { min-width: 0; flex-basis: 100%; }
}
