* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #000; color: #fff; font-family: sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
.print-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 18px;
    flex-wrap: wrap;
}

.print-size-label {
    color: var(--text-med);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.print-scale-btn {
    min-width: 52px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(230, 57, 70, 0.45);
    background: rgba(38, 38, 38, 0.9);
    color: var(--text-high);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.print-scale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(255, 140, 66, 0.35);
}

.print-scale-btn.active {
    background: var(--gradient-lava);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 18px rgba(230, 57, 70, 0.35);
}
.main-wrapper { max-width: 650px; margin: 40px auto; padding: 20px; }

.submit-content { background: #111; padding: 30px; border-radius: 15px; border: 1px solid #222; }
.section-title { color: #ff4500; margin-bottom: 20px; text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #ffa500; }
select, input { width: 100%; padding: 12px; background: #222; border: 1px solid #333; color: #fff; border-radius: 8px; }

.btn-select-axis, .btn-confirm, .btn-cancel {
    background: linear-gradient(to right, #ff4500, #ff8c00);
    color: #fff; border: none; padding: 14px; border-radius: 8px;
    cursor: pointer; width: 100%; font-weight: bold; margin-bottom: 10px;
    transition: transform 0.2s, filter 0.2s; font-size: 1rem;
}

.btn-cancel { background: #333; }
.btn-select-axis:hover, .btn-confirm:hover { filter: brightness(1.2); transform: translateY(-2px); }

.preview-status {
    margin-top: 20px;
    color: #ffa500;
    text-align: center;
    display: none;
}

.card-picker-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.88);
    padding: 28px;
}

.card-picker-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-picker-panel {
    width: min(1180px, 100%);
    height: min(88vh, 900px);
    background: #111;
    border: 1px solid #333;
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.card-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.card-picker-header h3 {
    color: #ff8c00;
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.card-picker-header p {
    color: #bbb;
    font-size: 0.95rem;
}

.modal-close-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #444;
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-close-btn:hover {
    background: #ff4500;
    border-color: #ff4500;
}

.card-grid {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 18px;
}

.card-grid::-webkit-scrollbar { width: 8px; }
.card-grid::-webkit-scrollbar-track { background: #222; border-radius: 99px; }
.card-grid::-webkit-scrollbar-thumb { background: #ff4500; border-radius: 99px; }

.print-card {
    position: relative;
    border: 1px solid #2d2d2d;
    border-radius: 12px;
    background: #181818;
    padding: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.print-card:hover,
.print-card.is-selected {
    border-color: #ff8c00;
    box-shadow: 0 0 18px rgba(255, 69, 0, 0.28);
}

.print-card:hover {
    transform: translateY(-3px);
}

.print-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 63 / 88;
    border-radius: 9px;
    overflow: hidden;
    background: linear-gradient(135deg, #262626, #3a2418);
}

.print-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.print-card.is-missing {
    opacity: 0.45;
    pointer-events: none;
}

.print-card-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.print-card:hover .print-card-actions,
.print-card.is-selected .print-card-actions {
    opacity: 1;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #ff4500;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.08);
}

.qty-badge {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 17px;
    background: #111;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-card-no {
    margin-top: 8px;
    text-align: center;
    color: #ddd;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.card-picker-footer {
    display: flex;
    gap: 14px;
    padding-top: 18px;
}

.card-picker-footer .btn-cancel,
.card-picker-footer .btn-confirm {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .card-picker-modal { padding: 14px; }
    .card-picker-panel { height: 92vh; padding: 16px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 12px; }
    .card-picker-footer { flex-direction: column; }
}
