/* 共有ポップアップ（site.css の Tailwind ビルドに未含みのスタイル） */
.share-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-modal.is-open {
    display: flex;
}

.share-modal.is-open .share-modal__backdrop {
    animation: share-backdrop-in 0.22s ease-out forwards;
}

.share-modal.is-open .share-modal__panel {
    animation: share-panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes share-backdrop-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes share-panel-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.share-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.share-modal__panel {
    position: relative;
    width: 100%;
    max-width: 26rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(165deg, #1f2937 0%, #111827 55%, #0f172a 100%);
    border: 1px solid rgba(74, 222, 128, 0.25);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 48px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(34, 197, 94, 0.08);
}

.share-modal__close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.share-modal__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.share-modal__header {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    padding-right: 2rem;
    margin-bottom: 1.125rem;
}

.share-modal__header-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #4ade80;
}

.share-modal__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f9fafb;
    letter-spacing: 0.01em;
}

.share-modal__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #9ca3af;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.share-modal__url-block {
    margin-bottom: 1rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.share-modal__url-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.share-modal__url-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.share-modal__url {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-all;
    color: #d1d5db;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 0.375rem;
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.share-modal__url-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #052e16;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

.share-modal__url-copy:hover {
    filter: brightness(1.08);
}

.share-modal__url-copy:active {
    transform: scale(0.98);
}

.share-modal__section-label {
    margin: 0 0 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.share-modal__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.share-modal__grid-span {
    grid-column: 1 / -1;
}

.share-modal__chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(75, 85, 99, 0.55);
    border-radius: 0.5rem;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.1s;
}

.share-modal__chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(107, 114, 128, 0.8);
    transform: translateY(-1px);
}

.share-modal__chip-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.share-modal__chip-label {
    text-align: left;
    line-height: 1.25;
}

.share-modal__chip--x .share-modal__chip-icon {
    background: #000;
    color: #fff;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.share-modal__chip--line .share-modal__chip-icon {
    background: #06c755;
    color: #fff;
    font-size: 0.625rem;
    letter-spacing: -0.02em;
}

.share-modal__chip--facebook .share-modal__chip-icon {
    background: #1877f2;
    color: #fff;
    font-size: 1.125rem;
    font-family: Georgia, serif;
}

.share-modal__chip--reddit .share-modal__chip-icon {
    background: #ff4500;
    color: #fff;
}

.share-modal__chip--discord .share-modal__chip-icon {
    background: #5865f2;
    color: #fff;
}

.share-modal__chip--discord .share-modal__chip-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.share-modal__toast {
    min-height: 0;
    margin: 0.75rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: transparent;
    text-align: center;
    border-radius: 0.5rem;
    transition:
        min-height 0.2s,
        padding 0.2s,
        color 0.2s,
        background 0.2s;
}

.share-modal__toast.is-visible {
    min-height: 2.25rem;
    padding: 0.5rem 0.75rem;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.share-modal__dismiss {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.share-modal__dismiss:hover {
    color: #e5e7eb;
    border-color: #6b7280;
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 380px) {
    .share-modal__grid {
        grid-template-columns: 1fr;
    }

    .share-modal__grid-span {
        grid-column: auto;
    }

    .share-modal__url-copy span {
        display: none;
    }
}
