*, *::before, *::after {
    box-sizing: border-box;
}

.airg-card {
    --airg-bg: #ffffff;
    --airg-fg: #111827;
    --airg-sub: #6b7280;
    --airg-primary: #0ea5e9;
    --airg-primary-press: #0284c7;
    --airg-border: #e5e7eb;
    --airg-ring: rgba(14, 165, 233, .25);

    background: var(--airg-bg);
    color: var(--airg-fg);
    border: 1px solid var(--airg-border);
    border-radius: 16px;
    padding: 20px;
    max-width: 820px;
    margin: 24px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

@media (max-width: 640px) {
    .airg-card {
        margin: 16px 12px;
        padding: 16px;
    }
}

.airg-header {
    margin-bottom: 14px;
}

.airg-header h3 {
    margin: 0 0 4px;
    font-size: 20px;
    letter-spacing: .2px;
}

.airg-sub {
    margin: 0;
    color: var(--airg-sub);
    font-size: 13px;
}

.airg-field {
    margin-bottom: 14px;
}

.airg-field label {
    display: block;
    font-size: 12px;
    color: var(--airg-sub);
    margin-bottom: 6px;
}

.airg-field input[type="text"] {
    width: 90%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--airg-border);
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    transition: box-shadow .16s, border-color .16s;
}

.airg-field input:focus {
    border-color: var(--airg-primary);
    box-shadow: 0 0 0 6px var(--airg-ring);
}

.airg-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
}

.airg-btn {
    appearance: none;
    border: 0;
    background: linear-gradient(180deg, var(--airg-primary), var(--airg-primary-press));
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .06s ease;
}

.airg-btn:active {
    transform: translateY(1px);
}

.airg-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.airg-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #cfe7f5;
    border-top-color: #0ea5e9;
    display: none;
    animation: airgspin 0.9s linear infinite;
}

.airg-spinner.on {
    display: inline-block;
}

@keyframes airgspin {
    to {
        transform: rotate(360deg);
    }
}

.airg-output {
    background: #f8fafc;
    border: 1px dashed #dbeafe;
    border-radius: 12px;
    padding: 14px;
    min-height: 72px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.8;
    font-size: 15px;
}

.airg-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(24px, env(safe-area-inset-bottom));
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    font-size: 13px;
    z-index: 999999;
}

.airg-toast.interactive {
    pointer-events: auto;
}

.airg-toast.show {
    opacity: 1;
    transform: translate(-50%, -6px);
}

#airg-output {
    position: relative;
}

#airg-copybtn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

#airg-copybtn:hover {
    background: #f9fafb;
}

#airg-copybtn:active {
    transform: translateY(1px);
}

#airg-copybtn.airg-copybtn--emph {
    background: linear-gradient(180deg, #22d3ee, #06b6d4);
    /* アクセント */
    color: #0c1222;
    border-color: transparent;
    font-weight: 700;
    padding: 8px 12px;
    /* 少し大きめ */
    box-shadow: 0 8px 20px rgba(6, 182, 212, .35);
    transform: translateY(0);
    /* 初期 */
    animation: airgPulse 1.4s ease-in-out infinite;
    outline: none;
}

#airg-copybtn.airg-copybtn--emph:hover {
    filter: brightness(1.05);
}

#airg-copybtn.airg-copybtn--emph:focus {
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .35), 0 8px 20px rgba(6, 182, 212, .35);
}

@keyframes airgPulse {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-1px) scale(1.03);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    #airg-copybtn.airg-copybtn--emph {
        padding: 10px 14px;
        font-size: 13px;
    }
}