/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #fafafa;
    --surface: #fff;
    --surface-raised: #f5f5f5;
    --border: #e8e8e8;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #999;
    --accent: #e63946;
    --accent-hover: #c5303c;
    --link: #2563eb;
    --link-hover: #1d4ed8;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 680px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --radius: 8px;
}

html { font-size: 17px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.header-top {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav {
    display: flex;
    gap: 1.25rem;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.header-nav a:hover {
    color: var(--accent);
    background: rgba(230, 57, 70, 0.05);
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo .logo-dot { color: var(--accent); }

.logo:hover { color: var(--accent); }

.header-tagline {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 0.625rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tagline-main {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.tagline-sep {
    font-size: 0.75rem;
    color: var(--border);
}

.tagline-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.lang-toggle {
    display: flex;
    gap: 0.125rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    background: var(--surface-raised);
    border-radius: 6px;
    padding: 2px;
}

.lang-toggle a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.lang-toggle a:hover {
    color: var(--text);
    background: var(--surface);
}

.lang-active {
    color: var(--text);
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background: var(--surface);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

/* Main */
main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

.article-content, .home {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Article content */
.article-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.035em;
}

.article-content h1 + p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.article-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.75rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
    transition: border-color 0.15s;
}

.article-content a:hover {
    border-color: var(--link);
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

.article-content em {
    font-style: italic;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.75rem 0;
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-sm);
}

.article-content blockquote p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content li strong {
    color: var(--text);
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.article-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--surface-raised);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.article-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Home page */
.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 3rem;
}

.home h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.05em;
    margin-bottom: 0.75rem;
    line-height: 1;
}
.home h1 .logo-dot { color: var(--accent); }

.home-headline {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.home-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.home-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.home-links {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: left;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.home-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.home-card-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.home-card-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.home-card .arrow {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.15s;
}

.home-card:hover .arrow {
    color: var(--accent);
}

/* Dictionary page */
.dictionary {
    max-width: 900px;
    margin: 0 auto;
}

.dictionary > h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 0.5rem;
}

.dictionary-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 3rem;
}

.dict-section {
    margin-bottom: 2.5rem;
}

.dict-section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.dict-terms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 2rem;
}

.dict-term {
    padding: 0.625rem 0;
}

.dict-term-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid transparent;
    transition: all 0.15s;
}

.dict-term-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.dict-term-hook {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 2rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-inner p { margin: 0; }

.footer-sep { color: var(--border); }

.footer-inner a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-inner a:hover {
    color: var(--accent);
}

/* Prompt Generator */
.prompt-generator {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.prompt-generator h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.05em;
    margin-bottom: 0.75rem;
    line-height: 1;
}
.prompt-generator h1 .logo-dot { color: var(--accent); }

.prompt-generator .home-desc {
    max-width: 520px;
    margin: 0 auto 2rem;
}

.prompt-generator .prompt-controls {
    text-align: left;
}

.prompt-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.control-group input,
.control-group select,
.control-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.15s;
    resize: vertical;
}

.control-group input:focus,
.control-group select:focus,
.control-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.char-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

.prompt-remark {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(255, 180, 50, 0.08);
    border-left: 3px solid rgba(255, 180, 50, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.examples-row {
    margin-top: 0.5rem;
}

.generate-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.btn-examples {
    width: 100%;
    padding: 0.625rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-examples:hover {
    border-color: var(--accent);
    background: #fef2f2;
}

.btn-generate {
    flex: 1;
    padding: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.3s;
}

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

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-copy-link {
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-copy-link:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}
.btn-copy-link.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.btn-generate.pulsate {
    animation: pulsate 0.8s ease-in-out 3;
}
@keyframes pulsate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(230, 57, 70, 0.4); }
}

.field-pulse {
    animation: fieldPulse 0.5s ease-in-out 1;
}
@keyframes fieldPulse {
    0% { box-shadow: none; }
    50% { box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.3); }
    100% { box-shadow: none; }
}

/* Guided form: slow continuous pulse for next active field */
.guide-pulse {
    animation: guidePulse 2s ease-in-out infinite;
}
@keyframes guidePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
    50% { box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25); }
}

/* Guided form: disabled/hidden control groups */
.control-group.step-hidden {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.5);
    transition: opacity 0.3s, filter 0.3s;
}
.control-group.step-visible {
    opacity: 1;
    pointer-events: auto;
    filter: none;
    transition: opacity 0.3s, filter 0.3s;
}
.generate-row.step-hidden {
    display: none;
}

/* Examples Modal */
.examples-modal {
    max-width: 540px;
}
.examples-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.example-link {
    display: block;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.example-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Web Search Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    position: relative;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    width: 2.25rem;
    height: 1.25rem;
    background: var(--border);
    border-radius: 0.625rem;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 0.875rem;
    height: 0.875rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-switch {
    background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(1rem);
}

.toggle-text {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-help {
    width: 1.375rem;
    height: 1.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    flex-shrink: 0;
}

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

.toggle-tooltip {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    display: none;
}

/* Prompt Output Modal */
.prompt-modal {
    max-width: 720px;
}

.prompt-modal .modal-header .modal-title {
    margin-bottom: 0.625rem;
}

.prompt-modal-buttons {
    display: flex;
    gap: 0.5rem;
}

.prompt-modal .modal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prompt-modal-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.prompt-modal-actions .prompt-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.btn-howto {
    padding: 0.375rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-howto:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

.howto-modal {
    max-width: 640px;
}
.howto-modal .modal-body {
    padding: 1rem 1.5rem;
}
.howto-modal .guide-item {
    margin-bottom: 0.5rem;
}

.btn-copy {
    padding: 0.375rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-copy:hover {
    background: var(--accent);
    color: #fff;
}

.btn-copy.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.prompt-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Guide Items (used in how-to modals) */
.guide-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.625rem;
}

.guide-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.guide-item div {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-item div strong {
    color: var(--text);
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

/* Picker Label Row */
.picker-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.picker-label-row label {
    margin-bottom: 0;
}

/* Picker Button */
.btn-picker {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-picker::after {
    content: '\25BC';
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

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

.btn-picker.placeholder {
    color: var(--text-muted);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Modal */
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    max-height: 80dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
}

.btn-modal-cancel,
.btn-modal-ok {
    padding: 0.5rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-modal-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-modal-cancel:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

.btn-modal-ok {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
}

.btn-modal-ok:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Radio Items in Picker Modal */
.modal-radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-radio-item {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg);
}

.modal-radio-item:hover {
    border-color: var(--text-muted);
}

.modal-radio-item.selected {
    border-color: var(--accent);
    background: #fef2f2;
}

.modal-radio-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.modal-radio-item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.25rem;
}

/* Help Modal Content */
.modal-help-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.btn-modal-close {
    padding: 0.5rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-modal-close:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

/* Real Life Check Button & Modal */
.reallife-cta {
    max-width: var(--max-width);
    margin: 2.5rem auto 0;
    text-align: center;
}

.btn-reallife {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-reallife:hover {
    background: var(--accent-hover);
}

.reallife-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.reallife-modal {
    max-width: 680px;
}

.reallife-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reallife-tabs {
    display: flex;
    gap: 0.125rem;
    background: var(--surface-raised);
    border-radius: 6px;
    padding: 2px;
}

.reallife-tab {
    padding: 0.25rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.reallife-tab:hover {
    color: var(--text);
}

.reallife-tab.active {
    color: var(--text);
    font-weight: 600;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.reallife-instruction {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.reallife-topic-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.55;
    margin-bottom: 1rem;
}

#reallifePromptText {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 60vh;
    overflow-y: auto;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    html { font-size: 16px; }
    main { padding: 2rem 1.25rem; }
    .header-top { padding: 0.625rem 1.25rem; }
    .header-tagline { padding: 0 1.25rem 0.5rem; }
    .header-right { gap: 0.75rem; }
    .header-nav { gap: 0.5rem; }
    .header-nav a { font-size: 0.75rem; padding: 0.2rem 0.35rem; }
    .tagline-main, .tagline-sub, .tagline-sep { font-size: 0.7rem; }
    .article-content h1 { font-size: 1.75rem; }
    .home { padding-top: 2rem; }
    .home h1 { font-size: 2.25rem; }
    .home-headline { font-size: 1.05rem; }
    .home-desc { font-size: 0.85rem; }
    .dict-terms { grid-template-columns: 1fr; }
    .dictionary > h1 { font-size: 1.75rem; }
    .control-row { grid-template-columns: 1fr; }
    .prompt-generator h1 { font-size: 2.25rem; }
    .modal { max-width: 100%; max-height: 85vh; max-height: 85dvh; }
    .prompt-modal-buttons { flex-wrap: wrap; }
    .btn-howto { font-size: 0.7rem; padding: 0.3rem 0.6rem; }
    .btn-examples { font-size: 0.85rem; }
    .prompt-modal-actions { flex-direction: column; align-items: stretch; }
    .prompt-modal-actions .prompt-hint { text-align: center; margin-bottom: 0.5rem; }
    .reallife-modal { max-width: 100%; }
    .modal-body { padding: 0.75rem 1rem; }
    .modal-header { padding: 1rem 1rem 0.625rem; }
    .modal-actions { padding: 0.625rem 1rem 1rem; }
    .modal-radio-item { padding: 0.625rem 0.75rem; }
    .modal-radio-item-title { font-size: 0.85rem; }
    .modal-radio-item-desc { font-size: 0.75rem; }
    .modal-radio-list { gap: 0.375rem; }
    footer { padding: 1rem 1.25rem; }
}
