.tool-page .container {
    max-width: 640px;
    padding-top: 2rem;
}

.tool-back {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
}

.tool-back a {
    color: var(--gold-bright, #8a6f3f);
    text-decoration: none;
    font-weight: 600;
}

.tool-back a:hover { text-decoration: underline; }

.pdf-card {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.45rem 1.35rem 1.6rem;
    box-shadow: 0 10px 32px rgba(26, 23, 18, 0.06);
}

.pdf-drop {
    border: 2px dashed rgba(179, 147, 89, 0.55);
    border-radius: 14px;
    padding: 1.7rem 1rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pdf-drop:hover,
.pdf-drop.is-over,
.pdf-drop:focus-visible {
    background: rgba(179, 147, 89, 0.10);
    border-color: var(--gold);
}

.pdf-drop-title {
    margin: 0;
    font-weight: 700;
    color: var(--text-color);
}

.pdf-drop-hint {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.pdf-list {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.pdf-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.pdf-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0ebe0;
}

.pdf-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pdf-meta strong {
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-meta span {
    color: var(--muted);
    font-size: 0.8rem;
}

.pdf-actions {
    display: flex;
    gap: 0.3rem;
}

.pdf-icon-btn {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-color);
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.pdf-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdf-icon-btn.is-danger { color: var(--danger, #c45c5c); }

.pdf-status {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    min-height: 1.4em;
}

.pdf-status[data-kind="ok"] { color: var(--success, #3d9b6e); font-weight: 600; }
.pdf-status[data-kind="error"] { color: var(--danger, #c45c5c); font-weight: 600; }

.pdf-bar {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}

.pdf-btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.15rem;
    cursor: pointer;
    background: var(--gold);
    color: #1a140c;
    flex: 1;
    min-width: 140px;
}

.pdf-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pdf-btn-ghost {
    background: transparent;
    color: var(--gold-bright, #8a6f3f);
    border: 1px solid rgba(179, 147, 89, 0.45);
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .pdf-item { grid-template-columns: 48px 1fr; }
    .pdf-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
