.ipt-gtx-tool {
    --ipt-navy: #13233f;
    --ipt-text: #39475c;
    --ipt-muted: #667085;
    --ipt-border: #e4e9ef;
    --ipt-blue: #2563eb;
    --ipt-soft-blue: #eef5ff;
    --ipt-soft-green: #eaf8f2;
    --ipt-soft-yellow: #fff8dc;
    --ipt-soft-purple: #f5efff;
    --ipt-soft-gray: #f7f8fa;
    box-sizing: border-box;
    width: 100%;
    max-width: 820px;
    margin: 28px auto;
    padding: 28px;
    border: 1px solid var(--ipt-border);
    border-radius: 24px;
    background: #fff;
    color: var(--ipt-navy);
    box-shadow: 0 10px 34px rgba(20, 35, 60, .07);
    font-family: inherit;
}

.ipt-gtx-tool * { box-sizing: border-box; }
.ipt-gtx-tool button, .ipt-gtx-tool input { font-family: inherit; }

.ipt-badge {
    display: inline-flex;
    padding: 7px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--ipt-soft-green);
    color: #16856b;
    font-size: 13px;
    font-weight: 800;
}

.ipt-hero {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ipt-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 17px;
    background: var(--ipt-soft-blue);
    font-size: 29px;
}

.ipt-hero h2 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: clamp(25px, 5vw, 34px) !important;
    line-height: 1.25 !important;
    color: var(--ipt-navy) !important;
}

.ipt-hero p {
    margin: 0 !important;
    color: var(--ipt-muted);
    font-size: 15px;
    line-height: 1.75;
}

.ipt-search-box {
    padding: 20px;
    border-radius: 18px;
    background: #f8fafc;
}

.ipt-search-box label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 800;
}

.ipt-search-row {
    display: flex;
    gap: 8px;
}

.ipt-search-row input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 15px;
    border: 1.5px solid #d8e0e8;
    border-radius: 13px;
    outline: 0;
    background: #fff;
    color: var(--ipt-navy);
    font-size: 16px;
}

.ipt-search-row input:focus {
    border-color: var(--ipt-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.ipt-search-row button {
    flex: 0 0 auto;
    min-width: 88px;
    height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    background: var(--ipt-blue);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
}

.ipt-search-row button:hover { filter: brightness(.96); }

.ipt-quick-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
}

.ipt-quick-wrap > span {
    margin-right: 2px;
    color: var(--ipt-muted);
    font-size: 12px;
    font-weight: 700;
}

.ipt-quick-wrap button {
    padding: 7px 10px;
    border: 1px solid #dde4eb;
    border-radius: 999px;
    background: #fff;
    color: #455268;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.ipt-quick-wrap button:hover {
    border-color: #a8c5f7;
    color: var(--ipt-blue);
}

.ipt-result {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #dde5ee;
    border-radius: 19px;
    background: #fff;
}

.ipt-result-head { margin-bottom: 16px; }

.ipt-result-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f5f8;
    color: #58667a;
    font-size: 11px;
    font-weight: 800;
}

.ipt-result h3 {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--ipt-navy) !important;
    font-size: 23px !important;
    line-height: 1.35 !important;
}

.ipt-result-head p {
    margin: 0 !important;
    color: var(--ipt-muted);
    font-size: 14px;
    line-height: 1.65;
}

.ipt-match-list {
    display: grid;
    gap: 11px;
}

.ipt-match {
    padding: 17px;
    border: 1px solid transparent;
    border-radius: 15px;
}

.ipt-tone-green { background: var(--ipt-soft-green); border-color: #b8e4d6; }
.ipt-tone-blue { background: var(--ipt-soft-blue); border-color: #bdd4fb; }
.ipt-tone-yellow { background: var(--ipt-soft-yellow); border-color: #efdb91; }
.ipt-tone-purple { background: var(--ipt-soft-purple); border-color: #d8c5f8; }
.ipt-tone-gray { background: var(--ipt-soft-gray); border-color: #dce2e8; }

.ipt-match-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.ipt-line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 57px;
    padding: 5px 9px;
    border-radius: 8px;
    background: #18243b;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .2px;
}

.ipt-line-A { background: #9c2635; }
.ipt-line-B { background: #2859a6; }
.ipt-line-C { background: #28755d; }
.ipt-line-D { background: #9c3f7d; }
.ipt-line-E { background: #7a5938; }
.ipt-line-F { background: #4e7747; }

.ipt-status-pill {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #405066;
    font-size: 11px;
    font-weight: 800;
}

.ipt-match h4 {
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: var(--ipt-navy) !important;
    font-size: 17px !important;
    line-height: 1.45 !important;
}

.ipt-match p {
    margin: 0 !important;
    color: var(--ipt-text);
    font-size: 14px;
    line-height: 1.7;
}

.ipt-match-note {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.66);
    color: #4b596c;
    font-size: 12px;
    line-height: 1.6;
}

.ipt-match-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(42, 58, 80, .14);
}

.ipt-source-link {
    color: #485d78 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-size: 11px;
    font-weight: 700;
}

.ipt-updated {
    color: #7d8999;
    font-size: 10px;
}

.ipt-unknown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ipt-unknown-grid > div {
    padding: 12px;
    border-radius: 12px;
    background: #f7f8fa;
    text-align: center;
}

.ipt-unknown-grid span,
.ipt-unknown-grid strong { display: block; }
.ipt-unknown-grid span { margin-bottom: 4px; color: var(--ipt-muted); font-size: 11px; }
.ipt-unknown-grid strong { color: var(--ipt-navy); font-size: 13px; }

.ipt-lines-area { margin-top: 18px; }

.ipt-lines-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 17px;
    border: 1px solid #dbe5ef;
    border-radius: 15px;
    background: #fff;
    color: var(--ipt-navy);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 800;
}

.ipt-lines-toggle:hover { background: #f8fbff; border-color: #bcd2f5; }
.ipt-lines-arrow { color: var(--ipt-blue); font-size: 20px; font-weight: 500; }

.ipt-lines-panel {
    display: grid;
    gap: 9px;
    margin-top: 9px;
    padding: 14px;
    border-radius: 15px;
    background: #f8fafc;
}

.ipt-line-summary {
    padding: 13px;
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    background: #fff;
}

.ipt-line-summary-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 7px;
}

.ipt-line-summary-head strong { color: var(--ipt-navy); font-size: 13px; }
.ipt-line-summary p { margin: 0 0 8px !important; color: var(--ipt-text); font-size: 12px; line-height: 1.65; }

.ipt-tip,
.ipt-warning {
    margin-top: 18px;
    padding: 15px 16px;
    border-radius: 14px;
}

.ipt-tip { background: #fff9eb; }
.ipt-warning { background: #f5f7fa; }
.ipt-tip strong, .ipt-warning strong { font-size: 13px; }
.ipt-tip p, .ipt-warning p { margin: 5px 0 0 !important; color: #5e6673; font-size: 12px; line-height: 1.65; }

.ipt-meta {
    margin-top: 17px;
    color: #8a94a3;
    text-align: center;
    font-size: 11px;
    line-height: 1.65;
}

.ipt-gtx-error {
    padding: 16px;
    border: 1px solid #f0b9b9;
    border-radius: 12px;
    background: #fff0f0;
    color: #8a3131;
}

@media (max-width: 600px) {
    .ipt-gtx-tool {
        margin: 18px 0;
        padding: 19px 15px;
        border-radius: 19px;
    }

    .ipt-hero { gap: 10px; }
    .ipt-hero-icon { flex-basis: 46px; width: 46px; height: 46px; border-radius: 14px; font-size: 23px; }
    .ipt-hero h2 { font-size: 24px !important; }
    .ipt-search-box { padding: 15px; }
    .ipt-search-row { flex-direction: column; }
    .ipt-search-row button { width: 100%; }
    .ipt-result { padding: 17px 14px; }
    .ipt-unknown-grid { grid-template-columns: 1fr; }
    .ipt-unknown-grid > div { display: flex; align-items: center; justify-content: space-between; text-align: left; }
    .ipt-unknown-grid span { margin: 0; }
    .ipt-match-meta { align-items: flex-start; flex-direction: column; }
}

/* v0.1.1: 쉬운 말 + 확정/계획 그룹 구분 */
.ipt-match-group + .ipt-match-group {
    margin-top: 20px;
}

.ipt-group-head {
    margin: 0 0 10px;
    padding: 0 2px;
}

.ipt-group-head h4 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: var(--ipt-navy) !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}

.ipt-group-head p {
    margin: 0 !important;
    color: var(--ipt-muted);
    font-size: 12px;
    line-height: 1.55;
}

.ipt-group-certain .ipt-group-head {
    padding-left: 10px;
    border-left: 3px solid #45a982;
}

.ipt-group-pending .ipt-group-head {
    padding-left: 10px;
    border-left: 3px solid #b89ae9;
}

.ipt-group-reference .ipt-group-head {
    padding-left: 10px;
    border-left: 3px solid #aab4c0;
}

@media (max-width: 600px) {
    .ipt-group-head h4 { font-size: 15px !important; }
    .ipt-group-head p { font-size: 11px; }
}


/* v0.2.3: 모바일 가독성 마감
 * GTX 숏코드가 있는 페이지에만 적용되어 다른 글/페이지에는 영향을 주지 않습니다.
 */
@media (max-width: 600px) {
    /* 페이지 제목과 본문: 한 글자만 다음 줄로 떨어지는 현상과 과한 본문 크기 완화 */
    .ipt-gtx-page .entry-title,
    .ipt-gtx-page .wp-block-post-title {
        font-size: 30px !important;
        line-height: 1.25 !important;
        letter-spacing: -0.025em !important;
        margin-bottom: 22px !important;
        word-break: keep-all;
    }

    .ipt-gtx-page .entry-content > p {
        font-size: 17px !important;
        line-height: 1.72 !important;
        margin-bottom: 15px !important;
        word-break: keep-all;
    }

    .ipt-gtx-page .entry-content > h2 {
        font-size: 23px !important;
        line-height: 1.35 !important;
        margin-top: 32px !important;
        margin-bottom: 13px !important;
        word-break: keep-all;
    }

    .ipt-gtx-page .entry-content > h3 {
        font-size: 19px !important;
        line-height: 1.4 !important;
        margin-top: 24px !important;
        margin-bottom: 10px !important;
        word-break: keep-all;
    }

    .ipt-gtx-page .wp-block-shortcode {
        margin-top: 14px !important;
        margin-bottom: 28px !important;
    }

    /* 도구 본체: 모바일에서는 더 조밀하고 읽기 쉽게 */
    .ipt-gtx-tool {
        margin: 10px 0 22px;
        padding: 16px 12px;
        border-radius: 18px;
        box-shadow: 0 7px 24px rgba(20, 35, 60, .06);
    }

    .ipt-badge {
        padding: 6px 10px;
        margin-bottom: 14px;
        font-size: 12px;
    }

    .ipt-hero {
        gap: 9px;
        margin-bottom: 18px;
    }

    .ipt-hero-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 21px;
    }

    .ipt-hero h2 {
        font-size: 21px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
        word-break: keep-all;
    }

    .ipt-hero p {
        font-size: 14px;
        line-height: 1.62;
        word-break: keep-all;
    }

    .ipt-search-box {
        padding: 13px;
        border-radius: 15px;
    }

    .ipt-search-box label {
        margin-bottom: 7px;
        font-size: 13px;
    }

    .ipt-search-row {
        gap: 7px;
    }

    .ipt-search-row input,
    .ipt-search-row button {
        height: 50px;
    }

    .ipt-search-row input {
        padding: 0 13px;
        font-size: 16px;
        border-radius: 12px;
    }

    .ipt-search-row button {
        min-width: 0;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 15px;
    }

    .ipt-quick-wrap {
        gap: 6px;
        margin-top: 12px;
    }

    .ipt-quick-wrap > span {
        width: 100%;
        margin: 0 0 1px;
        font-size: 11px;
    }

    .ipt-quick-wrap button {
        padding: 6px 9px;
        font-size: 12px;
    }

    .ipt-result {
        margin-top: 14px;
        padding: 15px 12px;
        border-radius: 16px;
    }

    .ipt-result h3 {
        font-size: 21px !important;
    }

    .ipt-result-head p,
    .ipt-match p {
        font-size: 14px;
        line-height: 1.65;
    }

    .ipt-match {
        padding: 14px 12px;
        border-radius: 13px;
    }

    .ipt-match h4 {
        font-size: 16px !important;
    }

    .ipt-line-badge,
    .ipt-status-pill {
        font-size: 11px;
    }

    .ipt-source-link {
        font-size: 11px;
    }

    .ipt-updated {
        font-size: 10px;
    }

    .ipt-lines-toggle {
        padding: 13px 14px;
        font-size: 13px;
        border-radius: 13px;
    }

    .ipt-lines-panel {
        padding: 11px;
    }

    .ipt-tip,
    .ipt-warning {
        margin-top: 14px;
        padding: 13px 14px;
    }

    .ipt-meta {
        margin-top: 14px;
        font-size: 10.5px;
    }
}

@media (max-width: 380px) {
    .ipt-gtx-page .entry-title,
    .ipt-gtx-page .wp-block-post-title {
        font-size: 28px !important;
    }

    .ipt-gtx-page .entry-content > p {
        font-size: 16.5px !important;
    }

    .ipt-hero h2 {
        font-size: 20px !important;
    }
}


/* v0.2.4: 모바일 검색 입력창 터치·가독성 강화 */
@media (max-width: 600px) {
    .ipt-search-box label {
        margin-bottom: 9px;
        font-size: 14px;
        line-height: 1.4;
    }

    .ipt-search-row input {
        width: 100%;
        min-height: 58px;
        height: 58px;
        padding: 0 16px;
        border-width: 1.5px;
        border-radius: 14px;
        font-size: 17px;
        line-height: 1.2;
        font-weight: 500;
    }

    .ipt-search-row input::placeholder {
        color: #7c8798;
        font-size: 15px;
        font-weight: 400;
        opacity: 1;
    }

    .ipt-search-row button {
        min-height: 56px;
        height: 56px;
        font-size: 16px;
        border-radius: 14px;
    }
}

@media (max-width: 380px) {
    .ipt-search-row input {
        min-height: 56px;
        height: 56px;
        font-size: 16.5px;
    }

    .ipt-search-row input::placeholder {
        font-size: 14.5px;
    }
}
