/* ダーツ得点計算ツール 専用スタイル（他ツールとは共用しない） */

.pt-drt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0 1.1rem;
}

.pt-drt-tab {
    padding: 0.4rem 0.95rem;
    border: 1px solid #ccd3da;
    border-radius: 62.5rem;
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.pt-drt-tab.is-active {
    background: var(--pt-blue);
    border-color: transparent;
    color: #fff;
}

.pt-drt-panel-box {
    padding: 0.9rem;
    border: 1px solid var(--pt-green-border);
    border-radius: 1rem;
    background: linear-gradient(160deg, #eef6ff 0%, var(--pt-green-bg) 100%);
    margin-bottom: 1rem;
}

/* ---- ダーツボード ---- */
.pt-drt-board-wrap {
    max-width: 24rem;
    margin: 0 auto 0.75rem;
}

.pt-drt-board-svg {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pt-drt-seg {
    stroke: #8b9299;
    stroke-width: 0.8;
    cursor: pointer;
}

.pt-drt-seg:hover {
    filter: brightness(1.35);
}

.pt-drt-seg.is-hit {
    animation: pt-drt-hit 0.35s ease-out;
}

@keyframes pt-drt-hit {
    0% { filter: brightness(2.2); }
    100% { filter: brightness(1); }
}

.pt-drt-num {
    fill: #333;
    font-size: 15px;
    font-weight: 700;
    pointer-events: none;
}

/* ---- 1本ごとの入力結果 ---- */
.pt-drt-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.pt-drt-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem 0.2rem;
    border: 1px dashed #ccd3da;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.6);
    min-height: 4rem;
}

.pt-drt-slot.is-filled {
    border-style: solid;
    border-color: var(--pt-blue-light);
    background: #fff;
}

.pt-drt-slot__no {
    font-size: 0.68rem;
    color: #888;
}

.pt-drt-slot__label {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--pt-blue);
}

.pt-drt-slot__value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
}

.pt-drt-total-panel {
    padding: 0.7rem 0.9rem;
    border: 1px solid #e0e4e8;
    border-radius: 0.8rem;
    background: #fff;
    text-align: center;
    margin-bottom: 0.6rem;
}

.pt-drt-total-label {
    font-size: 0.78rem;
    color: #666;
    font-weight: 700;
}

.pt-drt-total-value {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--pt-green-dark);
    line-height: 1.3;
}

.pt-drt-note {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #a1272a;
    font-weight: 700;
    min-height: 1.1rem;
}

.pt-drt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pt-drt-btn {
    padding: 0.45rem 1rem;
    border-radius: 62.5rem;
    border: 1px solid var(--pt-blue);
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.pt-drt-btn:hover:not(:disabled) {
    background: var(--pt-green-bg);
}

.pt-drt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pt-drt-btn--primary {
    background: linear-gradient(90deg, var(--pt-blue-light), var(--pt-teal));
    border-color: transparent;
    color: #fff;
}

.pt-drt-btn--primary:hover:not(:disabled) {
    background: linear-gradient(90deg, var(--pt-blue-light), var(--pt-teal));
    filter: brightness(1.08);
}

/* ---- 数字ボタン入力 ---- */
.pt-drt-subheading {
    margin: 0.9rem 0 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
}

.pt-drt-mult {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.pt-drt-mult-btn {
    flex: 1 1 0;
    padding: 0.4rem 0.3rem;
    border: 1px solid #ccd3da;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.pt-drt-mult-btn.is-active {
    background: var(--pt-blue);
    border-color: transparent;
    color: #fff;
}

.pt-drt-number-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
}

.pt-drt-num-btn {
    padding: 0.5rem 0;
    border: 1px solid #ccd3da;
    border-radius: 0.5rem;
    background: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

.pt-drt-num-btn:hover {
    background: var(--pt-green-bg);
}

.pt-drt-num-btn:active {
    transform: scale(0.94);
}

.pt-drt-num-btn--wide {
    grid-column: span 2;
    font-size: 0.78rem;
}

.pt-drt-num-btn.is-miss {
    color: #888;
}

/* ---- ゼロワン ---- */
.pt-drt-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    align-items: flex-end;
    margin-bottom: 0.7rem;
}

.pt-drt-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #333;
}

.pt-drt-field select,
.pt-drt-field input {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ccd3da;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    min-width: 5.5rem;
}

.pt-drt-toggle {
    display: flex;
    gap: 0.3rem;
}

.pt-drt-toggle-btn {
    padding: 0.35rem 0.85rem;
    border: 1px solid #ccd3da;
    border-radius: 62.5rem;
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.pt-drt-toggle-btn.is-active {
    background: var(--pt-blue);
    border-color: transparent;
    color: #fff;
}

.pt-drt-remaining {
    text-align: center;
    padding: 0.7rem;
    border: 1px solid #e0e4e8;
    border-radius: 0.8rem;
    background: #fff;
    margin-bottom: 0.7rem;
}

.pt-drt-remaining__label {
    font-size: 0.78rem;
    color: #666;
    font-weight: 700;
}

.pt-drt-remaining__value {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--pt-green-dark);
}

.pt-drt-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
}

.pt-drt-checkbox-row[hidden] {
    display: none;
}

.pt-drt-checkbox-row input {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
}

.pt-drt-message {
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.pt-drt-message[hidden] {
    display: none;
}

.pt-drt-message.is-error {
    background: #fff5f5;
    border: 1px solid #a1272a;
    color: #a1272a;
}

.pt-drt-message.is-bust {
    background: #fff5f5;
    border: 1px solid #a1272a;
    color: #a1272a;
}

.pt-drt-message.is-win {
    background: #e6f7ee;
    border: 1px solid var(--pt-green);
    color: var(--pt-green-dark);
}

.pt-drt-hint {
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    background: #fff8e1;
    border: 1px solid #f0d78c;
    color: #6b4a00;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.pt-drt-hint[hidden] {
    display: none;
}

.pt-drt-table-wrap {
    overflow-x: auto;
    margin-bottom: 0.9rem;
}

.pt-drt-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.82rem;
}

.pt-drt-table th,
.pt-drt-table td {
    border: 1px solid #e0e4e8;
    padding: 0.3rem 0.5rem;
    text-align: center;
}

.pt-drt-table thead th {
    background: #f2f5f8;
}

.pt-drt-table tr.is-bust td {
    background: #fff5f5;
    color: #a1272a;
    font-weight: 700;
}

.pt-drt-table tr.is-win td {
    background: #e6f7ee;
    color: var(--pt-green-dark);
    font-weight: 700;
}

.pt-drt-table tr.is-impossible th,
.pt-drt-table tr.is-impossible td {
    background: #f5f5f5;
    color: #999;
}

.pt-drt-table tr.is-highlight th,
.pt-drt-table tr.is-highlight td {
    background: #ffe9a8;
    color: #333;
}

.pt-drt-x {
    display: inline-block;
    padding: 0 0.3rem;
    border-radius: 0.3rem;
    background: #a1272a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
}

.pt-drt-checkout-table-wrap {
    max-height: 32rem;
    overflow: auto;
    margin-bottom: 0.9rem;
    border: 1px solid #e0e4e8;
    border-radius: 0.6rem;
}

.pt-drt-checkout-table-wrap .pt-drt-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ---- カウントアップ ---- */
.pt-drt-cu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.pt-drt-cu-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
}

.pt-drt-cu-field input {
    width: 100%;
    padding: 0.35rem 0.3rem;
    border: 1px solid #ccd3da;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    text-align: center;
}

.pt-drt-cu-field input.is-invalid {
    border-color: #a1272a;
    background: #fff5f5;
}

.pt-drt-cu-result {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.pt-drt-cu-box {
    padding: 0.6rem;
    border: 1px solid #e0e4e8;
    border-radius: 0.8rem;
    background: #fff;
    text-align: center;
}

.pt-drt-cu-box__label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
}

.pt-drt-cu-box__value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--pt-green-dark);
    line-height: 1.3;
}

.pt-drt-cu-progress {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    color: #555;
    font-weight: 700;
}

.pt-drt-cu-band {
    padding: 0.6rem 0.8rem;
    border-radius: 0.6rem;
    background: #e6f7ee;
    border: 1px solid var(--pt-green-border);
    color: var(--pt-green-dark);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.pt-drt-cu-band[hidden] {
    display: none;
}

/* ---- 静的な得点表 ---- */
.pt-drt-score-table {
    max-width: 30rem;
}

@media (max-width: 30rem) {
    .pt-drt-cu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pt-drt-number-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
