/* 시험 준비 도구(체크리스트·기상 시각 계산기) 공용 — 접두사 pt- */

.pt {
    max-width: 720px;
    margin: 0 auto;
}

/* display를 준 요소(.pt-chips·.pt-btn 등)는 브라우저 기본 [hidden] 규칙을 덮어쓴다 */
.pt [hidden] {
    display: none !important;
}

.pt-basis {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted-color);
}

.pt-basis a,
.pt-src a {
    color: var(--primary-color);
}

/* ── 칩 ── */
.pt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.pt-chip {
    min-height: 36px;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface-color);
    color: var(--text-secondary-color);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.pt-chip:hover {
    border-color: var(--primary-light);
    background: var(--tint-orange-bg);
    color: var(--primary-dark);
}

.pt-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.pt-chip:focus-visible,
.pt-btn:focus-visible,
.pt-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ── 버튼·링크 ── */
.pt-btn,
.pt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.pt-btn:hover,
.pt-link:hover {
    border-color: var(--primary-light);
    background: var(--tint-brand-bg);
}

.pt-btn .material-icons,
.pt-link .material-icons {
    font-size: 18px;
}

.pt-link[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── 체크리스트 ── */
.pt-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pt-progress-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    overflow: hidden;
}

.pt-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary-color);
    transition: width 0.2s;
}

.pt-progress-text {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary-color);
}

/* 추가 입력과 초기화를 한 줄에 둔다 — 초기화는 맨 오른쪽 */
.pt-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.pt-toolbar .pt-input {
    flex: 1;
    min-width: 0;
}

.pt-toolbar .pt-btn {
    flex: none;
    padding: 0 12px;
}

.pt-group-title {
    margin: 24px 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.pt-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 항목 하나가 타일 하나. 드롭다운(.more-menu-dropdown)이 잘리지 않게 overflow는 건드리지 않는다 */
.pt-tile {
    margin-bottom: 8px;
    padding: 4px 8px 4px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    transition: border-color 0.15s;
}

.pt-tile:has(input:checked) {
    border-color: var(--primary-light);
    background: var(--tint-brand-bg);
}

.pt-tile-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pt-check {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 6px 0;
    cursor: pointer;
}

.pt-check input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.pt-check-text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

/* 체크 표시를 색에만 맡기지 않는다 — 취소선과 흐림도 함께 */
.pt-check input:checked + .pt-check-text {
    text-decoration: line-through;
    color: var(--text-muted-color);
    font-weight: 500;
}

/* 설명 펼침 버튼 */
.pt-toggle {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-muted-color);
    cursor: pointer;
}

.pt-toggle:hover {
    background: var(--tint-orange-bg);
    color: var(--primary-dark);
}

.pt-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.pt-toggle .material-icons {
    transition: transform 0.2s;
}

.pt-toggle[aria-expanded="true"] .material-icons {
    transform: rotate(180deg);
}

.pt-detail {
    padding: 0 6px 12px 34px;
}

.pt-bullets {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary-color);
}

.pt-extra,
.pt-src {
    margin: 8px 0 0;
    font-size: 13px;
}

.pt-extra a {
    color: var(--primary-color);
    font-weight: 600;
}

.pt-src a {
    color: var(--text-muted-color);
}

.pt-foot {
    margin-top: 24px;
}

/* ── 입력 ── */
.pt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.pt-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary-color);
}

.pt-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    /* 입력칸은 웹폰트를 쓰지 않는다. 본문 서체(Noto Serif KR)는 글자 조각을 필요할 때 내려받아서, 처음 치는 글자마다 서체가 바뀌며 화면이 깜빡인다 */
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    font-size: 16px; /* iOS 확대 방지 */
}

.pt-input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.pt-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted-color);
}

.pt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ── 계산 결과 ── */
.pt-result {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
}

.pt-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-step {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.pt-step:last-child {
    border-bottom: 0;
}

.pt-step-time {
    min-width: 92px;
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pt-step-name {
    font-size: 15px;
    color: var(--text-secondary-color);
}

.pt-step.is-wake .pt-step-time {
    color: var(--primary-color);
}

.pt-day {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted-color);
}

.pt-empty {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted-color);
}

.pt-maps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 767px) {
    .pt-chip { min-height: 44px; }
    .pt-grid { grid-template-columns: 1fr; }
    .pt-step-time { font-size: 22px; min-width: 84px; }
}

/* ── 기상 시각 계산기 ── */
.pt-maps {
    margin-top: 4px;
}

/* 브랜드 색 — 글자색은 대비를 위해 어두운 색으로 둔다(카카오 #191919, 네이버 그린 위 흰 글자는 대비 2.4:1이라 제외) */
.pt-link--kakao {
    border-color: #FEE500;
    background: #FEE500;
    color: #191919;
    font-weight: 600;
}

.pt-link--naver {
    border-color: #03C75A;
    background: #03C75A;
    color: #062B16;
    font-weight: 600;
}

.pt-link--kakao:hover,
.pt-link--naver:hover {
    border-color: transparent;
    filter: brightness(0.94);
}

.pt-link--kakao:hover { background: #FEE500; }
.pt-link--naver:hover { background: #03C75A; }

.pt-guide {
    display: flex;
    gap: 8px;
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--tint-brand-bg);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary-color);
}

.pt-guide .material-icons {
    flex: none;
    font-size: 18px;
    color: var(--primary-color);
}

.pt-guide a {
    color: var(--primary-color);
    font-weight: 600;
}

.pt-btn--sm {
    align-self: flex-start;
    min-height: 36px;
    font-size: 13px;
}

.pt-check--inline {
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
}

.pt-check--inline input {
    margin-top: 0;
}

.pt-warn {
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 1px solid #d32f2f;
    border-radius: 10px;
    background: #ffebee;
    color: #b71c1c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .pt-warn {
        background: #3b1a1a;
        color: #ff8a80;
    }
}

:root[data-theme="dark"] .pt-warn {
    background: #3b1a1a;
    color: #ff8a80;
}

.pt-hint + .pt-field {
    margin-top: 16px;
}
