/* 웹유틸 공통 컴포넌트. 개별 도구의 동작은 각 스크립트에서 처리한다. */
.wt-shell { padding-block: 28px 64px; }
.wt-ad { width: 100%; min-width: 0; margin-block: 28px; padding-block: 16px; text-align: center; }
.wt-ad-label { margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.wt-shell :where(fieldset) { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.wt-shell :where(legend) { padding: 0; margin-bottom: 6px; font-size: 16px; }
.wt-nav { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.wt-nav-top { margin-block: 12px; }
.wt-nav-title { flex: none; padding-block: 6px; color: var(--accent-ink); font-size: 12px; font-weight: 700; line-height: 22px; }
.wt-nav-items { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.wt-nav-link { flex: none; padding: 6px 9px; border: 0; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; line-height: 22px; white-space: nowrap; text-decoration: none; }
.wt-nav-link[aria-current], .wt-nav-link:hover { background: var(--alt); color: var(--heading); }
.wt-nav-link[aria-current] { background: var(--heading); color: #fff; font-weight: 700; }
.wt-nav-toggle { flex: none; padding: 6px 0 6px 6px; border: 0; background: transparent; color: var(--heading); font-size: 12px; line-height: 22px; white-space: nowrap; }
.wt-panel { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 24px; min-width: 0; }
.wt-panel-title { margin-bottom: 18px; font-size: 21px; color: var(--heading); }
.wt-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.wt-guide-card { padding: 20px; background: var(--alt); border: 1px solid var(--border-soft); border-radius: var(--r-md); min-width: 0; }
.wt-guide-title { font-size: 18px; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.wt-guide-text { margin-block: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.wt-guide-list { list-style: disc; padding-left: 24px; margin-block: 12px; line-height: 1.9; }
.wt-guide-steps { list-style: decimal; padding-left: 24px; margin-block: 12px; line-height: 1.9; }
.wt-guide-table-wrap { width: 100%; overflow-x: auto; margin-block: 20px; }
.wt-guide-table { width: 100%; border-collapse: collapse; text-align: left; }
.wt-guide-cell { padding: 12px; border-bottom: 1px solid var(--border); }
.wt-guide-th { background: var(--alt); color: var(--heading); font-weight: 700; }
.wt-guide-example { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 12px 0 0; color: var(--heading); }
.wt-guide-link { color: var(--accent-ink); text-decoration: underline; }
.wt-guide-source { font-size: 13px; color: var(--muted); margin-top: 20px; }
@media (max-width: 767px) { .wt-guide-grid { grid-template-columns: minmax(0, 1fr); } }
.wt-note { color: var(--muted); font-size: 14px; margin-block: 12px; }
.wt-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
.wt-field { display: grid; gap: 8px; min-width: 0; }
.wt-label { font-weight: 700; color: var(--heading); }
.wt-input { width: 100%; min-height: 46px; border: 1px solid var(--border-strong); border-radius: var(--r-field); background: var(--surface); color: var(--text); padding: 10px 12px; font: inherit; }
.wt-textarea { resize: vertical; min-height: 260px; }
.wt-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; }
.wt-button { min-height: 44px; padding: 9px 18px; border: 1px solid var(--accent); border-radius: var(--r-field); background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.wt-button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.wt-button-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--heading); }
.wt-button-secondary:hover { color: var(--heading); background: var(--alt); border-color: var(--heading); }
.wt-button:disabled { opacity: .55; cursor: default; }
.wt-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-block: 20px; }
.wt-stat { padding: 16px; background: var(--alt); border-radius: var(--r-md); }
.wt-stat-label { display: block; font-size: 14px; color: var(--muted); }
.wt-stat-value { display: block; color: var(--heading); font-size: 30px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wt-status { margin-top: 12px; color: var(--heading); }
.wt-status:empty { display: none; }
.wt-status:not(:empty) { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--heading); border-radius: var(--r-md); background: var(--alt); color: var(--heading); font-size: 14px; font-weight: 700; line-height: 1.6; text-align: left; }
.wt-status:not(:empty)::before { content: ''; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background-color: var(--heading); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='4' r='1.25' fill='white'/%3E%3Cpath d='M8 7v5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 14px; }
.wt-status.wt-success:not(:empty) { border-color: rgb(31 122 61 / 24%); border-left-color: var(--success); background: rgb(31 122 61 / 8%); }
.wt-status.wt-success:not(:empty)::before { background-color: var(--success); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.wt-status.wt-error:not(:empty) { border-color: rgb(179 38 30 / 22%); border-left-color: var(--danger); background: rgb(179 38 30 / 7%); color: var(--danger); }
.wt-status.wt-error:not(:empty)::before { background-color: var(--danger); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12.5' r='1.1' fill='white'/%3E%3C/svg%3E"); }
.wt-error { color: var(--danger); }
.wt-help { border-top: 1px solid var(--border); padding-block: 16px; }
.wt-help > :where(summary) { cursor: pointer; color: var(--heading); font-weight: 700; min-height: 30px; }
.wt-help > :where(p) { margin-top: 12px; }
.wt-option { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.wt-option :where(input) { width: 20px; height: 20px; accent-color: var(--accent); }
.wt-range { width: 100%; min-height: 44px; accent-color: var(--accent); }
.wt-password { display: block; min-height: 80px; padding: 18px 20px; border: 2px solid var(--accent); border-radius: var(--r-md); background: linear-gradient(135deg, var(--surface), var(--accent-soft)); color: var(--heading); font: 22px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; white-space: pre-wrap; user-select: all; }
.wt-password-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.wt-password-privacy { display: inline-flex; align-items: center; gap: 12px; }
.wt-password-privacy::before { content: ''; width: 1px; height: 12px; background: var(--border-strong); }
.wt-results { display: grid; gap: 12px; margin-top: 20px; }
.wt-result-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.wt-result-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wt-result-code { font-family: ui-monospace, monospace; white-space: pre-wrap; }
.wt-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px 24px; }
.wt-category { padding: 8px 12px; background: var(--alt); color: var(--heading); border-radius: var(--r-sm); text-decoration: none; }
.wt-characters { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.wt-character { min-width: 0; min-height: 48px; font-family: inherit; line-height: 1.4; font-size: 23px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--heading); cursor: pointer; }
.wt-character:hover, .wt-character:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.wt-copy-feedback { position: fixed; top: 84px; left: 50%; display: flex; align-items: center; gap: 10px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 48px); padding: 13px 18px; border: 1px solid rgb(255 255 255 / 18%); border-radius: var(--r-md); background: var(--band); box-shadow: var(--shadow-float); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.5; }
.wt-copy-feedback::before { content: ''; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background-color: var(--success); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 15px; }
.wt-copy-feedback.wt-error { background: var(--danger); color: #fff; }
.wt-copy-feedback.wt-error::before { background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v6' fill='none' stroke='%23b3261e' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12.5' r='1.1' fill='%23b3261e'/%3E%3C/svg%3E"); }
.wt-copy-feedback:empty { display: none; }
.wt-drop { display: grid; place-items: center; gap: 12px; padding: 32px 24px; border: 2px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--alt); text-align: center; }
.wt-drop-active { border-color: var(--accent); background: var(--accent-soft); }
.wt-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.wt-progress { width: 100%; accent-color: var(--accent); }
.wt-delivery-panel { padding: 40px; }
.wt-delivery-heading { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 32px; }
.wt-delivery-heading .wt-panel-title { margin: 0; font-size: 26px; }
.wt-delivery-symbol { width: 36px; height: 36px; flex: 0 0 36px; color: var(--heading); }
.wt-delivery-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; }
.wt-delivery-panel #trackingForm { max-width: 920px; margin-inline: auto; }
.wt-delivery-fields .wt-input { min-height: 58px; padding: 14px 16px; font-size: 17px; }
.wt-delivery-panel .wt-note { margin-top: 18px; }
.wt-delivery-status { text-align: center; }
.wt-shell #zipLink:not([hidden]) { display: table; margin: 16px auto 0; }
.wt-delivery-result { padding: 0; overflow: hidden; }
.wt-delivery-result > .wt-panel-title { margin: 0; padding: 24px 28px; border-bottom: 1px solid var(--border); background: var(--alt); }
.wt-delivery-result #resultContainer { padding: 28px; }
.wt-delivery-summary { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid rgb(31 122 61 / 22%); border-radius: var(--r-md); background: rgb(31 122 61 / 8%); }
.wt-delivery-summary-label { flex: none; padding: 5px 11px; border-radius: var(--r-pill); background: var(--success); color: #fff; font-size: 13px; font-weight: 700; }
.wt-delivery-summary-value { color: var(--heading); font-size: 20px; line-height: 1.4; }
.wt-delivery-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.wt-delivery-info-item { min-width: 0; padding: 16px 18px; border: 1px solid var(--border-soft); border-radius: var(--r-md); background: var(--alt); }
.wt-delivery-info :where(dt) { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.wt-delivery-info :where(dd) { margin: 0; color: var(--heading); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.wt-timeline { position: relative; margin: 30px 0 0; padding: 4px 0 0 12px; }
.wt-timeline::before { content: ''; position: absolute; top: 16px; bottom: 28px; left: 18px; width: 2px; background: var(--border); }
.wt-timeline-item { position: relative; display: grid; grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr); gap: 24px; padding: 0 0 26px 38px; }
.wt-timeline-item::before { content: ''; position: absolute; top: 8px; left: 0; width: 14px; height: 14px; border: 3px solid var(--surface); border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 1px var(--border); }
.wt-timeline-item:last-child { padding-bottom: 0; }
.wt-timeline-item:last-child::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wt-timeline-time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.wt-timeline-detail { min-width: 0; }
.wt-timeline-location { display: block; margin-bottom: 3px; color: var(--heading); font-size: 16px; }
.wt-timeline-description { color: var(--text); line-height: 1.7; overflow-wrap: anywhere; }
@media (min-width: 768px) {
    .wt-actions > .wt-button, .wt-shell #zipLink, .wt-shell .wt-lotto .btn.btn-lg { min-height: 56px; min-width: 180px; padding: 14px 30px; font-size: 18px; }
    .wt-delivery-panel #trackingSubmit { min-width: 220px; }
}
@media (min-width: 992px) {
    .wt-delivery-panel #trackingForm { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.35fr) auto; align-items: end; gap: 18px 24px; max-width: 1040px; }
    .wt-delivery-fields { display: contents; }
    .wt-delivery-panel .wt-actions { grid-column: 3; grid-row: 1; align-self: end; flex-wrap: nowrap; margin: 0; }
    .wt-delivery-panel .wt-note { grid-column: 1 / -1; grid-row: 2; margin: 0; }
}
@media (max-width: 767px) {
    .wt-grid, .wt-settings { grid-template-columns: 1fr; }
    .wt-panel { padding: 20px; }
    .wt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wt-stat:first-child { grid-column: 1 / -1; }
    .wt-nav { gap: 8px; }
    .wt-password { font-size: 18px; padding: 14px; }
    .wt-password-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
    .wt-password-privacy { gap: 0; }
    .wt-password-privacy::before { display: none; }
    .wt-delivery-result > .wt-panel-title { padding: 20px; }
    .wt-delivery-result #resultContainer { padding: 20px; }
    .wt-delivery-summary { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px; }
    .wt-delivery-summary-value { font-size: 18px; }
    .wt-delivery-info { grid-template-columns: 1fr; }
    .wt-timeline-item { grid-template-columns: 1fr; gap: 4px; padding-left: 34px; }
    .wt-timeline::before { left: 16px; }
    .wt-timeline-item::before { left: 0; }
    .wt-delivery-heading { gap: 10px; margin-bottom: 24px; }
    .wt-delivery-heading .wt-panel-title { font-size: 23px; }
    .wt-delivery-fields { grid-template-columns: 1fr; gap: 20px; }
    .wt-delivery-fields .wt-input { min-height: 52px; font-size: 16px; padding: 12px; }
    .wt-delivery-panel #trackingSubmit { min-width: 160px; }
    .wt-copy-feedback { top: 76px; width: calc(100% - 32px); max-width: 520px; }
}
@media print { .wt-nav, .wt-copy-feedback { display: none; } }
