.tr-container { max-width: 900px; margin-top: 40px; }

.tr-header { text-align: center; margin-bottom: 30px; }
.tr-header h1 { font-size: 2.2em; font-weight: 900; margin-bottom: 10px; color: var(--text-strong); }

.tr-notice {
    background: var(--c-indigo-bg);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 16px;
    padding: 18px 24px;
    text-align: center;
    font-size: 0.95em;
    color: var(--text-main);
    margin-bottom: 36px;
    line-height: 1.7;
    font-weight: 500;
}
.tr-notice strong { color: var(--c-indigo); font-weight: 900; }

.tr-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 32px;
}
@media (max-width: 640px) {
    .tr-selectors { grid-template-columns: 1fr; }
    .tr-arrow-wrap { text-align: center; padding: 4px 0; }
}

.tr-selector-block {
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    border-radius: 20px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.3s;
}
.tr-selector-block:focus-within { border-color: var(--c-indigo); }

.tr-selector-label {
    font-size: 0.9em;
    font-weight: 900;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tr-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.tr-role-badge.speaker { background: var(--c-blue-bg); color: var(--c-blue); border: 1px solid rgba(37,99,235,0.25); }
.tr-role-badge.listener { background: var(--c-purple-bg); color: var(--c-purple); border: 1px solid rgba(147,51,234,0.25); }

.tr-type-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-container);
    border: 2px solid var(--border-main);
    border-radius: 14px;
    padding: 14px 16px;
    min-height: 60px;
    transition: all 0.3s;
}
.tr-type-display.selected {
    border-color: var(--tc-border, var(--border-main));
    background: var(--tc-bg, var(--bg-container));
}
.tr-type-emoji { font-size: 1.6em; line-height: 1; flex-shrink: 0; }
.tr-type-name { font-weight: 900; color: var(--text-strong); font-size: 0.95em; flex: 1; }
.tr-type-code {
    font-size: 0.75em;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--tc-code, var(--text-muted));
    background: var(--tc-border, var(--border-main));
    padding: 3px 8px;
    border-radius: 8px;
    opacity: 0.8;
}

.tr-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-main);
    background: var(--bg-container);
    color: var(--text-main);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
    transition: border-color 0.2s;
    appearance: auto;
}
.tr-select:focus { outline: none; border-color: var(--c-indigo); }

.tr-mbti-select {
    font-size: 0.88em;
    color: var(--text-muted);
    border-style: dashed;
}
.tr-mbti-select:has(option[value=""]:not(:checked)) { color: var(--text-main); }

.tr-arrow-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
    gap: 6px;
}
.tr-arrow {
    font-size: 2em;
    color: var(--c-indigo);
    font-weight: 900;
    line-height: 1;
}
.tr-arrow-label {
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.tr-input-area { margin-bottom: 20px; }
.tr-input-label {
    display: block;
    font-weight: 900;
    color: var(--text-strong);
    margin-bottom: 10px;
    font-size: 1.05em;
}
.tr-textarea {
    width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    border: 2px solid var(--border-main);
    background: var(--bg-section);
    color: var(--text-main);
    font-size: 1.05em;
    line-height: 1.7;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    resize: vertical;
    transition: border-color 0.2s;
}
.tr-textarea:focus { outline: none; border-color: var(--c-indigo); background: var(--bg-container); }
.tr-textarea::placeholder { color: var(--text-light); font-weight: 500; }

.tr-char-count {
    text-align: right;
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 600;
}

#tr-btn:disabled {
    background: var(--bg-section);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: none;
}
#tr-btn:disabled:hover { transform: none; box-shadow: none; filter: none; }

#tr-result { margin-top: 40px; animation: fadeIn 0.5s ease; }

.tr-translation-box {
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 28px;
    border: 2px solid var(--border-main);
    background: var(--bg-container);
    transition: border-color 0.3s, background 0.3s;
    position: relative;
    overflow: hidden;
}
.tr-translation-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--border-main);
    transition: background 0.3s;
}
.tr-translation-box.tr-translation-changed {
    border-color: rgba(79, 70, 229, 0.4);
    background: var(--c-indigo-bg);
}
.tr-translation-box.tr-translation-changed::before {
    background: linear-gradient(90deg, var(--c-indigo), var(--c-blue));
}
.tr-translation-box.tr-translation-same {
    border-color: var(--border-main);
}

.tr-translation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.tr-translation-label {
    font-weight: 900;
    font-size: 1.05em;
    color: var(--text-strong);
}
.tr-translation-route {
    font-size: 0.88em;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    padding: 4px 12px;
    border-radius: 20px;
}

.tr-translation-text {
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.8;
    color: var(--text-strong);
    word-break: keep-all;
    white-space: pre-wrap;
}
.tr-translation-changed .tr-translation-text {
    color: var(--c-indigo);
}

.tr-translation-original {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(79, 70, 229, 0.15);
    font-size: 0.9em;
    color: var(--text-muted);
    word-break: keep-all;
}
.tr-original-label {
    flex-shrink: 0;
    font-weight: 900;
    font-size: 0.82em;
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    margin-top: 1px;
}

.tr-result-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.tr-result-title {
    font-size: 1.4em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0;
}

.tr-axis-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 900;
    letter-spacing: 0.3px;
}
.tr-badge.high { background: var(--c-red-bg); color: var(--c-red); border: 1px solid rgba(220,38,38,0.25); }
.tr-badge.medium { background: var(--c-orange-bg); color: var(--c-orange); border: 1px solid rgba(234,88,12,0.25); }
.tr-badge.low { background: var(--c-yellow-bg); color: var(--c-yellow); border: 1px solid rgba(217,119,6,0.25); }
.tr-badge.none { background: var(--c-green-bg); color: var(--c-green); border: 1px solid rgba(5,150,105,0.25); }

.tr-speaker-card {
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--c-blue);
}

.tr-speaker-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.tr-speaker-card-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tr-speaker-card-emoji { font-size: 2em; line-height: 1; flex-shrink: 0; }
.tr-speaker-card-name {
    font-weight: 900;
    font-size: 1.05em;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tr-speaker-code-badge {
    font-size: 0.75em;
    font-weight: 900;
    letter-spacing: 1px;
    background: var(--c-blue-bg);
    color: var(--c-blue);
    border: 1px solid rgba(37,99,235,0.25);
    padding: 2px 8px;
    border-radius: 8px;
}
.tr-speaker-card-group {
    font-size: 0.82em;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}
.tr-speaker-card-label {
    font-size: 0.78em;
    font-weight: 900;
    color: var(--c-blue);
    background: var(--c-blue-bg);
    border: 1px solid rgba(37,99,235,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.tr-speaker-comm {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-container);
    border-radius: 12px;
    border: 1px solid var(--border-main);
}
.tr-speaker-comm-item {
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.5;
}

.tr-speaker-intents { display: none; }
.tr-speaker-intents-title {
    font-weight: 900;
    font-size: 0.95em;
    color: var(--text-strong);
    margin-bottom: 10px;
}
.tr-speaker-intent-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--c-blue-bg);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: 12px;
    font-size: 0.93em;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.6;
    word-break: keep-all;
    margin-bottom: 8px;
}
.tr-speaker-intent-item:last-child { margin-bottom: 0; }
.tr-intent-icon { font-size: 1.1em; flex-shrink: 0; margin-top: 1px; }

.tr-conflict-intent {
    background: var(--c-blue-bg);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.tr-conflict-intent-label {
    font-size: 0.8em;
    font-weight: 900;
    color: var(--c-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.tr-conflict-intent-text {
    font-size: 0.93em;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.65;
    word-break: keep-all;
}

.tr-conflict-section-title {
    font-size: 0.8em;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 14px 0 10px 0;
}

.tr-no-conflict {
    background: var(--c-green-bg);
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: var(--c-green);
    margin-bottom: 24px;
}
.tr-no-conflict-icon { font-size: 2.5em; margin-bottom: 12px; }
.tr-no-conflict strong { font-size: 1.1em; font-weight: 900; display: block; margin-bottom: 8px; }
.tr-no-conflict p { margin: 0; font-size: 0.95em; color: var(--text-muted); font-weight: 500; }

.tr-section {
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}
.tr-section-title {
    font-weight: 900;
    color: var(--text-strong);
    font-size: 1.05em;
    margin-bottom: 16px;
}

.tr-annotated-text {
    font-size: 1.05em;
    line-height: 1.9;
    color: var(--text-main);
    font-weight: 600;
    word-break: keep-all;
}
.tr-highlight {
    background: rgba(220, 38, 38, 0.12);
    border-bottom: 2px solid var(--c-red);
    border-radius: 4px;
    padding: 1px 2px;
    cursor: help;
    position: relative;
}
.tr-highlight.medium {
    background: rgba(234, 88, 12, 0.12);
    border-bottom-color: var(--c-orange);
}
.tr-highlight.low {
    background: rgba(217, 119, 6, 0.1);
    border-bottom-color: var(--c-yellow);
}

.tr-conflict-card {
    border-radius: 16px;
    border: 1px solid var(--border-main);
    overflow: hidden;
    margin-bottom: 16px;
}
.tr-conflict-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.tr-conflict-head:hover { background: var(--bg-card); }
.tr-conflict-head.high { border-left: 4px solid var(--c-red); background: var(--c-red-bg); }
.tr-conflict-head.medium { border-left: 4px solid var(--c-orange); background: var(--c-orange-bg); }
.tr-conflict-head.low { border-left: 4px solid var(--c-yellow); background: var(--c-yellow-bg); }
.tr-conflict-icon { font-size: 1.4em; flex-shrink: 0; }
.tr-conflict-info { flex: 1; }
.tr-conflict-name { font-weight: 900; color: var(--text-strong); font-size: 1em; }
.tr-conflict-warning { font-size: 0.88em; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.tr-conflict-toggle { font-size: 1.2em; color: var(--text-muted); transition: transform 0.2s; }
.tr-conflict-toggle.open { transform: rotate(180deg); }

.tr-conflict-body { display: none; padding: 0 20px 20px 20px; background: var(--bg-container); }
.tr-conflict-body.open { display: block; }

.tr-patterns-found {
    margin-bottom: 16px;
    background: var(--bg-section);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-main);
}
.tr-patterns-found-label {
    font-size: 0.8em;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.tr-found-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.93em;
}
.tr-found-item:last-child { margin-bottom: 0; }
.tr-found-original {
    background: rgba(220, 38, 38, 0.1);
    color: var(--c-red);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 900;
    white-space: nowrap;
    flex-shrink: 0;
}
.tr-found-arrow { color: var(--text-muted); padding-top: 3px; flex-shrink: 0; }
.tr-found-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-suggestion-chip {
    background: var(--c-green-bg);
    color: var(--c-green);
    border: 1px solid rgba(5, 150, 105, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.tr-suggestion-chip:hover { background: var(--c-green); color: white; transform: translateY(-1px); }

.tr-style-tips { display: flex; flex-direction: column; gap: 10px; }
.tr-style-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-container);
    border-radius: 12px;
    border: 1px solid var(--border-main);
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-main);
    word-break: keep-all;
}
.tr-style-tip-icon { font-size: 1.1em; flex-shrink: 0; margin-top: 1px; }

.tr-mbti-section { border-color: rgba(79, 70, 229, 0.2); background: var(--c-indigo-bg); }
.tr-mbti-section .tr-section-title { color: var(--c-indigo); }
.tr-mbti-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    font-size: 0.92em;
    color: var(--text-main);
    font-weight: 500;
}
.tr-mbti-item:last-child { border-bottom: none; padding-bottom: 0; }
.tr-mbti-axis { font-weight: 900; color: var(--c-indigo); flex-shrink: 0; min-width: 50px; }

.tr-reset-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--bg-section);
    color: var(--text-muted);
    border: 2px solid var(--border-main);
    border-radius: 16px;
    font-size: 1em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    font-family: 'Pretendard', sans-serif;
}
.tr-reset-btn:hover { background: var(--bg-container); color: var(--text-strong); border-color: var(--c-indigo); }

.tr-same-type-notice {
    background: var(--c-blue-bg);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--c-blue);
}
.tr-same-type-notice strong { font-weight: 900; }

.tr-consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tr-consent-overlay.hidden {
    display: none;
}
.tr-consent-box {
    background: var(--bg-container);
    border: 1px solid var(--border-main);
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.25s ease;
}
.tr-consent-badge {
    display: inline-block;
    background: var(--c-indigo-bg);
    color: var(--c-indigo);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78em;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.tr-consent-title {
    font-size: 1.5em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0 0 22px 0;
}
.tr-consent-section {
    margin-bottom: 20px;
}
.tr-consent-section-title {
    font-size: 0.95em;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 8px;
}
.tr-consent-text {
    font-size: 0.93em;
    color: var(--text-main);
    line-height: 1.7;
    margin: 0 0 10px 0;
    word-break: keep-all;
}
.tr-consent-text strong {
    color: var(--c-indigo);
    font-weight: 800;
}
.tr-consent-collect-box {
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 8px;
}
.tr-consent-collect-label {
    font-size: 0.8em;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.tr-consent-collect-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tr-consent-collect-list li {
    font-size: 0.88em;
    color: var(--text-main);
    font-weight: 600;
}
.tr-consent-btns {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}
.tr-consent-btn-decline {
    flex: 1;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border-main);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.93em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.tr-consent-btn-decline:hover {
    border-color: var(--text-muted);
    color: var(--text-base);
    background: var(--bg-section);
}
.tr-consent-btn-agree {
    flex: 2;
    padding: 13px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--c-indigo) 0%, #7c3aed 100%);
    color: #fff;
    font-size: 0.93em;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    font-family: inherit;
    width: 100%;
}
.tr-consent-btn-agree:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.tr-consent-declined-icon {
    font-size: 2.5em;
    margin-bottom: 14px;
}
@media (max-width: 480px) {
    .tr-consent-box { padding: 28px 20px; }
    .tr-consent-btns { flex-direction: column; }
    .tr-consent-btn-decline, .tr-consent-btn-agree { flex: none; width: 100%; }
}
