html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Pretendard', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(216, 180, 254, 0.45), transparent 34rem),
        radial-gradient(circle at top left, rgba(251, 207, 232, 0.45), transparent 30rem),
        #f8fafc;
    color: #0f172a;
}

.gacha-page {
    padding: 88px 0 48px;
}

.gacha-container {
    width: min(100% - 28px, 900px);
    margin: 0 auto;
}

.gacha-header {
    text-align: center;
    margin-bottom: 20px;
}

.gacha-header h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.2rem);
    letter-spacing: -0.04em;
    color: #4c1d95;
}

.gacha-header p {
    margin: 10px auto 0;
    max-width: 680px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.65;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
}

.panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 22px;
    margin: 18px 0;
    box-shadow: 0 18px 45px rgba(76, 29, 149, 0.08);
    backdrop-filter: blur(16px);
}

.panel-title,
.panel-title-row {
    font-weight: 900;
    color: #4c1d95;
    letter-spacing: -0.02em;
}

.panel-title { font-size: 18px; }

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-hint {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.ticket-field {
    display: grid;
    gap: 8px;
    margin: 16px 0 14px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.ticket-field input {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ticket-field input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

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

.recruit-btn {
    min-height: 62px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 10px 12px;
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.1);
    transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}

.recruit-btn span,
.recruit-btn small { display: block; }
.recruit-btn small { margin-top: 3px; font-size: 10px; font-weight: 700; opacity: .88; }
.recruit-btn.single { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.recruit-btn.ten { background: linear-gradient(135deg, #db2777, #e11d48); }
.recruit-btn.reset { background: linear-gradient(135deg, #475569, #334155); }
.recruit-btn:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.04); }
.recruit-btn:not(:disabled):active { transform: translateY(0); }
.recruit-btn:disabled { cursor: not-allowed; opacity: .42; box-shadow: none; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-top: 16px;
}

.stat-card {
    padding: 12px 8px;
    border: 1px solid #ede9fe;
    border-radius: 13px;
    background: #faf7ff;
    text-align: center;
}

.stat-card strong {
    display: block;
    color: #5b21b6;
    font-size: 19px;
    line-height: 1.2;
}

.stat-card span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

.stage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.empty-state {
    padding: 30px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}

.stage-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.stage-head strong {
    color: #334155;
    font-size: 13px;
}

.stage-head span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.stage-head .passed { color: #15803d; }
.stage-head .stopped { color: #b91c1c; }

.candidate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.candidate {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 11px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 11px;
}

.candidate.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.candidate.fail {
    opacity: .72;
}

.candidate-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-weight: 800;
}

.candidate-status {
    white-space: nowrap;
    font-weight: 900;
}

.candidate.success .candidate-status { color: #15803d; }
.candidate.fail .candidate-status { color: #94a3b8; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.summary-item {
    padding: 13px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
}

.summary-item span {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

.summary-item strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    font-size: 17px;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.prob-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #fff;
    font-size: 12px;
}

.prob-table th,
.prob-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
}

.prob-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

.prob-table td:first-child {
    text-align: left;
    color: #334155;
    font-weight: 800;
}

.prob-table tr:last-child td { border-bottom: 0; }

.hero-pool-panel details summary {
    cursor: pointer;
    color: #4c1d95;
    font-size: 14px;
    font-weight: 900;
}

.hero-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.hero-chip {
    padding: 6px 9px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 800;
}

.hero-chip.latest {
    border-color: #f9a8d4;
    background: #fdf2f8;
    color: #be185d;
}

.contact-panel {
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.contact-panel a {
    color: #7c3aed;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 680px) {
    .gacha-page { padding-top: 76px; }
    .gacha-container { width: min(100% - 20px, 900px); }
    .panel { padding: 16px; border-radius: 16px; margin: 12px 0; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .recruit-btn.reset { grid-column: 1 / -1; min-height: 48px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .candidate-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .panel-title-row { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 390px) {
    .gacha-header p { font-size: 13px; }
    .action-grid { grid-template-columns: 1fr; }
    .recruit-btn.reset { grid-column: auto; }
}


/* 2026-10-09 · recruitment UI clarity and mobile ergonomics */
body.recruit-page .gacha-page { padding-top: 78px; }
body.recruit-page .gacha-container { max-width: 940px; }
body.recruit-page .gacha-header {
    box-sizing: border-box;
    padding: 16px 8px 18px;
    margin-bottom: 8px;
}
body.recruit-page .gacha-header h1 {
    font-size: clamp(1.8rem, 4.4vw, 2.5rem);
    line-height: 1.22;
}
body.recruit-page .gacha-header p {
    margin-top: 10px;
    font-size: 13px;
}
body.recruit-page .panel {
    padding: clamp(16px, 2.7vw, 23px);
    margin: 15px 0;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(76, 29, 149, .055);
}
body.recruit-page h2.panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}
body.recruit-page .recruit-panel {
    margin-top: 11px;
    border-color: #ddd6fe;
    background: linear-gradient(180deg, #fcfaff 0%, #fff 55%);
}
body.recruit-page .recruit-heading {
    align-items: center;
    margin-bottom: 16px;
}
.recruit-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #7c3aed;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
}
.recruit-cost-hint {
    flex-shrink: 0;
    padding: 6px 9px;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    background: #f5f3ff;
    color: #5b21b6;
    font-size: 11px;
    font-weight: 800;
}
.recruit-ticket-layout {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.1fr);
    align-items: end;
    gap: 14px;
}
body.recruit-page .ticket-field { margin: 0; }
body.recruit-page .ticket-field span,
.ticket-preset-caption {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}
body.recruit-page .ticket-field input {
    min-height: 47px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.ticket-preset-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.ticket-preset {
    min-width: 0;
    min-height: 47px;
    padding: 9px 4px;
    border: 1px solid #ddd6e7;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.ticket-preset:hover {
    color: #6d28d9;
    border-color: #a78bfa;
    background: #faf5ff;
}
.ticket-preset.is-active {
    color: #5b21b6;
    border-color: #a78bfa;
    background: #ede9fe;
}
body.recruit-page .ticket-help {
    margin: 10px 0 16px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}
body.recruit-page .ticket-help.is-warning { color: #9a3412; }
body.recruit-page .recruit-btn {
    min-height: 61px;
    box-shadow: none;
    border-radius: 11px;
}
body.recruit-page .recruit-btn.reset {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
}
body.recruit-page .recruit-btn.reset:not(:disabled):hover { background: #f1f5f9; }
body.recruit-page .recruit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    filter: grayscale(.15);
}
body.recruit-page .stats-grid { gap: 10px; margin-top: 15px; }
body.recruit-page .stat-card {
    min-width: 0;
    padding: 14px 9px;
    background: #f8f7fe;
    border-color: #e9e5fc;
}
body.recruit-page .stat-card strong {
    color: #4c1d95;
    font-size: clamp(19px, 2.7vw, 23px);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
body.recruit-page .stat-card span { margin-top: 5px; font-size: 11px; }
body.recruit-page .ticket-preset:focus-visible,
body.recruit-page .recruit-btn:focus-visible,
body.recruit-page .ticket-field input:focus-visible,
body.recruit-page .recruit-source summary:focus-visible,
body.recruit-page .hero-pool-panel summary:focus-visible {
    outline: 3px solid #a78bfa;
    outline-offset: 3px;
}
.recruit-source {
    margin: 11px 0 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
}
.recruit-source > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 17px;
    cursor: pointer;
    list-style: none;
}
.recruit-source summary::-webkit-details-marker { display: none; }
.recruit-source > summary strong {
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
}
.recruit-source > summary small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}
.recruit-disclosure-arrow {
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    transition: transform .2s ease;
}
.recruit-source[open] .recruit-disclosure-arrow { transform: rotate(180deg); }
.recruit-source-body {
    padding: 0 13px 13px;
}
.recruit-source-body > .data-status { margin: 8px 0; }
.last-recruit-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid #ddd6fe;
    border-radius: 11px;
    background: #faf5ff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.last-recruit-summary[hidden] { display: none !important; }
.last-recruit-caption {
    font-size: 11px;
    font-weight: 750;
    color: #6d28d9;
}
.last-recruit-summary strong {
    margin-left: auto;
    color: #4c1d95;
    font-size: 17px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}
body.recruit-page .stage-list { margin-top: 12px; }
body.recruit-page .stage-card { border-radius: 13px; }
body.recruit-page .stage-head { flex-wrap: wrap; }
body.recruit-page .stage-head strong {
    color: #312e81;
    line-height: 1.5;
}
body.recruit-page .stage-head .passed { color: #15803d; }
body.recruit-page .stage-head .stopped { color: #b91c1c; }
.stage-progress {
    position: relative;
    overflow: hidden;
    height: 7px;
    margin: 12px 14px 2px;
    border-radius: 999px;
    background: #e2e8f0;
}
.stage-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: #16a34a;
    border-radius: inherit;
}
.stage-progress-fill.stopped { background: #f59e0b; }
.stage-progress-target {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #312e81;
    transform: translateX(-1px);
}
body.recruit-page .candidate-grid { gap: 8px; }
body.recruit-page .candidate {
    min-height: 44px;
    border-radius: 9px;
    font-size: 12px;
}
body.recruit-page .candidate.success {
    background: #f0fdf4;
    border-color: #86efac;
}
body.recruit-page .candidate.fail {
    background: #f8fafc;
    opacity: .72;
}
body.recruit-page .candidate-name { font-size: 12px; }
body.recruit-page .summary-grid { gap: 10px; }
body.recruit-page .summary-item { border-radius: 10px; background: #fff; }
body.recruit-page .summary-item strong { font-variant-numeric: tabular-nums; }
body.recruit-page .table-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c4b5fd #f8fafc;
}
body.recruit-page .prob-table thead th { position: sticky; top: 0; }
body.recruit-page .hero-pool-panel summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
body.recruit-page .hero-pool-panel details[open] summary span {
    transform: rotate(180deg);
}
@media (max-width: 680px) {
    body.recruit-page .gacha-page { padding-top: 75px; }
    body.recruit-page .gacha-header { padding: 12px 3px; }
    body.recruit-page .gacha-header h1 { font-size: clamp(1.6rem, 6.1vw, 2rem); }
    body.recruit-page .gacha-container { width: min(100% - 18px, 900px); }
    body.recruit-page .panel { padding: 14px; margin: 12px 0; }
    body.recruit-page .recruit-heading { align-items: flex-start; }
    .recruit-cost-hint { font-size: 10px; }
    .recruit-ticket-layout { grid-template-columns: 1fr; gap: 11px; }
    body.recruit-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    body.recruit-page .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    body.recruit-page .recruit-btn.reset { grid-column: 1 / -1; min-height: 45px; }
    body.recruit-page .candidate-grid { grid-template-columns: 1fr; }
    body.recruit-page .candidate { min-height: 43px; }
    body.recruit-page .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .last-recruit-summary strong { margin-left: 0; }
}
@media (max-width: 390px) {
    body.recruit-page .recruit-heading { flex-direction: column; gap: 8px; }
    body.recruit-page .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.recruit-page .recruit-btn.reset { grid-column: 1 / -1; }
    .ticket-preset-buttons { gap: 5px; }
    .ticket-preset { font-size: 11px; }
    .last-recruit-summary { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    body.recruit-page .ticket-preset,
    body.recruit-page .recruit-btn,
    .recruit-disclosure-arrow { transition: none; }
}
