@charset "UTF-8";

.tqc-main-layout,
.tqc-input-col,
.tqc-result-col,
.tqc-input-section,
.tqc-input-grid,
.tqc-input-group,
.tqc-input,
.tqc-chip-group,
.tqc-btn-row,
.tqc-support-grid,
.tqc-support-card,
.tqc-table-section,
.tqc-table-wrap,
.tqc-reference,
.tqc-disclaimer,
.tqc-input-unit-row,
.tqc-unit-chip {
    box-sizing: border-box;
    max-width: 100%;
}

.tqc-main-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tqc-input-col {
    position: sticky;
    top: 20px;
    min-width: 0;
}

.tqc-result-col {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.tqc-input-section,
.tqc-result-hero,
.tqc-support-card,
.tqc-table-section,
.tqc-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.tqc-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.tqc-input-title,
.tqc-table-title,
.tqc-reference-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tqc-input-title i,
.tqc-table-title i,
.tqc-reference-title i {
    color: #d4af37;
}

.tqc-intro,
.tqc-note,
.tqc-table-help,
.tqc-hero-subtext {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6a6258;
}

.tqc-input-grid,
.tqc-chip-section {
    display: grid;
    gap: 10px;
}

.tqc-input-group {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tqc-label,
.tqc-chip-title,
.tqc-support-label,
.tqc-hero-eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.tqc-input-unit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.tqc-input,
.tqc-input-group select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #d8d1c6;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tqc-input:hover,
.tqc-input-group select:hover {
    border-color: #d4c67a;
}

.tqc-input:focus,
.tqc-input-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.tqc-input[aria-invalid="true"] {
    border-color: #c65b49;
    box-shadow: 0 0 0 3px rgba(198, 91, 73, 0.12);
    background: #fff8f6;
}

.tqc-unit-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #ddd7cb;
    background: #f7f4ee;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.tqc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tqc-chip {
    min-height: 40px;
    border: 1px solid #ddd7cb;
    background: #f7f4ee;
    color: #5f5a56;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tqc-chip:hover,
.tqc-chip:focus-visible {
    border-color: #d4af37;
    color: #594f42;
    background: #fff;
    outline: none;
    transform: translateY(-1px);
}

.tqc-chip.active {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fff8e6 0%, #f4ead0 100%);
    color: #7a5d14;
}

.tqc-btn-row {
    display: grid;
    gap: 8px;
}

.tqc-btn-row .tool-btn {
    width: 100%;
    min-width: 0;
}

.tqc-btn-row.is-realtime .tool-btn {
    font-size: 14px;
    line-height: 1.35;
}

.tqc-result-hero {
    padding: 20px;
    background: linear-gradient(135deg, #fffdf7 0%, #f7f0df 100%);
    border-color: #eadfb8;
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
    display: grid;
    gap: 8px;
}

.tqc-hero-eyebrow {
    color: #8a6b18;
}

.tqc-hero-value {
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #2d2a26;
    word-break: break-word;
}

.tqc-support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tqc-support-card {
    padding: 16px;
    display: grid;
    gap: 6px;
}

.tqc-support-card.is-highlight {
    background: linear-gradient(135deg, #fff9ec 0%, #f9f2e0 100%);
    border-color: #eadfb8;
}

.tqc-support-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.35;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.tqc-table-section {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.tqc-table-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tqc-table-wrap {
    overflow-x: auto;
}

.tqc-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.tqc-table th,
.tqc-table td {
    border-bottom: 1px solid #eee7db;
    padding: 10px 8px;
    text-align: left;
    font-size: 13px;
    color: #2d2a26;
    vertical-align: middle;
}

.tqc-table th {
    font-weight: 600;
}

.tqc-copy-btn {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #ddd7cb;
    border-radius: 999px;
    background: #f7f4ee;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tqc-copy-btn:hover,
.tqc-copy-btn:focus-visible {
    border-color: #d4af37;
    background: #fff;
    color: #7a5d14;
    outline: none;
}

.tqc-copy-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.tqc-copy-btn.is-copied {
    border-color: #59ab79;
    background: rgba(89, 171, 121, 0.12);
    color: #2f7d52;
}

.tqc-section {
    padding: 18px;
}

.tqc-reference-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #4e483f;
    font-size: 14px;
    line-height: 1.6;
}

.tqc-disclaimer {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.6;
}

.tqc-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .tqc-main-layout {
        grid-template-columns: 1fr;
    }

    .tqc-input-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .tqc-support-grid {
        grid-template-columns: 1fr;
    }

    .tqc-table {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .tqc-main-layout,
    .tqc-input-col,
    .tqc-result-col,
    .tqc-input-section,
    .tqc-table-section,
    .tqc-section {
        max-width: 100%;
        overflow-x: hidden;
    }

    .tqc-input-section,
    .tqc-result-hero,
    .tqc-support-card,
    .tqc-table-section,
    .tqc-section {
        padding: 16px;
    }

    .tqc-hero-value {
        font-size: 24px;
    }

    .tqc-input:not([type="radio"]):not([type="checkbox"]),
    .tqc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tqc-input,
    .tqc-chip,
    .tqc-copy-btn,
    .tqc-btn-row .tool-btn {
        transition: none !important;
    }

    .tqc-chip:hover,
    .tqc-chip:focus-visible {
        transform: none !important;
    }
}
