.devices-page {
    display: grid;
    gap: 28px;
}

.devices-intro {
    padding: clamp(16px, 3vw, 28px);
    border: 2px solid var(--color-green);
    line-height: 1.9;
}

.device-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: clamp(14px, 2vw, 22px);
}

.device-card {
    display: grid;
    align-content: start;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    border: 2px dashed var(--color-green);
    border-radius: 12px;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}

.device-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-green-hover);
}

.device-card > img {
    display: block;
    width: 100%;
    height: clamp(170px, 24vw, 280px);
    object-fit: cover;
}

.device-card-body {
    display: grid;
    gap: 12px;
    padding: clamp(12px, 2vw, 18px);
}

.device-card h2 {
    font-size: clamp(11px, 1.4vw, 16px);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.device-description {
    display: -webkit-box;
    overflow: hidden;
    font-size: clamp(9px, 1vw, 11px);
    line-height: 1.8;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.device-card time,
.device-page time {
    font-size: 9px;
    line-height: 1.8;
    opacity: .75;
}

.device-empty {
    grid-column: 1 / -1;
    padding: 20px;
    border: 2px dashed var(--color-green);
    line-height: 1.8;
}

.device-back-link {
    color: inherit;
    line-height: 1.8;
}

.device-cover {
    display: block;
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    justify-self: center;
    border: 1px dashed var(--color-green);
    border-radius: 10px;
}

.device-page .comment-form button {
    justify-self: start;
    padding: 10px 14px;
    color: var(--color-green);
    background: #000;
    border: 1px solid var(--color-green);
    border-radius: 8px;
    cursor: pointer;
}

.device-page .comment-form button:hover {
    color: #000;
    background: var(--color-green);
}

@media (max-width: 600px) {
    .devices-page { gap: 20px; }
    .devices-intro { font-size: 9px; }
    .device-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
    .device-card h2 { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .device-card { transition: none; }
}
