/**
 * Paper AI Chat Styles
 *
 * Light theme consistent with AIDB site design (paper-frontend.css).
 * Covers archive listing, single chat page, shortcode embed.
 */

/* ============================================
   Common
   ============================================ */

.aidb-pchat-outer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    line-height: 1.8;
    color: #1a1a1a;
}

.aidb-pchat-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.aidb-pchat-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6366f1;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* Link Buttons */
.aidb-pchat-link-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 0.2s;
    cursor: pointer;
    background: #6366f1;
    color: #fff;
    border: none;
}

.aidb-pchat-link-btn:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}

.aidb-pchat-link-btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.aidb-pchat-link-btn--secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

.aidb-pchat-link-btn--primary {
    background: #6366f1;
    color: #fff;
}

.aidb-pchat-link-btn--primary:hover {
    opacity: 0.85;
    color: #fff;
}

.aidb-pchat-link-btn--twitter {
    background: #000;
    color: #fff;
}

.aidb-pchat-link-btn--twitter:hover {
    opacity: 0.85;
    color: #fff;
}

/* ============================================
   Archive / Listing Page
   ============================================ */

.aidb-pchat-archive-header {
    text-align: center;
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-archive-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.4;
}

.aidb-pchat-archive-desc {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.6;
}

/* Tier Badges */
.aidb-pchat-tier-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.aidb-pchat-tier-premium {
    background: #eef2ff;
    color: #6366f1;
    border: 1px solid #c7d2fe;
}

.aidb-pchat-tier-free {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.aidb-pchat-tier-visitor {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.aidb-pchat-tier-visitor a {
    color: #6366f1;
    text-decoration: none;
}

.aidb-pchat-tier-visitor a:hover {
    text-decoration: underline;
}

/* Card Grid */
.aidb-pchat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.aidb-pchat-card {
    display: block;
    padding: 20px 32px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
}

.aidb-pchat-card:last-child {
    border-bottom: none;
}

.aidb-pchat-card:hover {
    background: #f9fafb;
    text-decoration: none;
    color: inherit;
}

.aidb-pchat-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.aidb-pchat-card-license {
    display: inline-block;
    padding: 2px 8px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.aidb-pchat-card-date {
    font-size: 12px;
    color: #9ca3af;
}

.aidb-pchat-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.4;
}

.aidb-pchat-card-title-en {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 8px;
    line-height: 1.4;
}

.aidb-pchat-card-summary {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.6;
}

.aidb-pchat-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aidb-pchat-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.aidb-pchat-card-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 3px;
    font-size: 11px;
}

.aidb-pchat-card-qa-count {
    font-size: 12px;
    color: #6366f1;
    font-weight: 500;
    white-space: nowrap;
}

/* Pagination */
.aidb-pchat-pagination {
    padding: 20px 32px 32px;
    text-align: center;
}

.aidb-pchat-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.aidb-pchat-pagination li {
    display: inline-block;
}

.aidb-pchat-pagination a,
.aidb-pchat-pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.aidb-pchat-pagination a:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.aidb-pchat-pagination .current {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* Empty State */
.aidb-pchat-empty {
    text-align: center;
    padding: 60px 32px;
    color: #9ca3af;
}

/* ============================================
   Single Paper Chat Page
   ============================================ */

/* Breadcrumb */
.aidb-pchat-breadcrumb {
    font-size: 13px;
    padding: 16px 32px;
    color: #9ca3af;
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-breadcrumb a {
    color: #6366f1;
    text-decoration: none;
}

.aidb-pchat-breadcrumb a:hover {
    text-decoration: underline;
}

.aidb-pchat-breadcrumb-sep {
    margin: 0 8px;
    color: #d1d5db;
}

/* Header */
.aidb-pchat-single-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-single-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.4;
}

.aidb-pchat-single-title-en {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 12px;
    line-height: 1.4;
}

.aidb-pchat-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #6b7280;
}

.aidb-pchat-meta-label {
    font-weight: 600;
    color: #4b5563;
    margin-right: 4px;
}

.aidb-pchat-authors-toggle {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    margin-left: 4px;
    font-weight: 500;
}

.aidb-pchat-authors-toggle:hover {
    text-decoration: underline;
}

.aidb-pchat-license-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.aidb-pchat-single-tags {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.aidb-pchat-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 3px;
    font-size: 12px;
}

/* Summary Points */
.aidb-pchat-summary {
    background: #fafafa;
    padding: 16px 20px;
    border-left: 3px solid #6366f1;
    border-radius: 0 4px 4px 0;
    margin-bottom: 16px;
}

.aidb-pchat-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #6366f1;
    display: inline-block;
}

.aidb-pchat-summary-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.aidb-pchat-summary-list li {
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
}

.aidb-pchat-summary-list li:last-child {
    margin-bottom: 0;
}

/* Links Row */
.aidb-pchat-single-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   Chat Section
   ============================================ */

.aidb-pchat-chat-section {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aidb-pchat-section-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.6;
}

.aidb-pchat-remaining {
    color: #6366f1;
    font-size: 13px;
    font-weight: 500;
}

.aidb-pchat-remaining a {
    color: #6366f1;
    text-decoration: none;
}

.aidb-pchat-remaining a:hover {
    text-decoration: underline;
}

/* Suggested Questions */
.aidb-pchat-suggestions {
    margin-bottom: 16px;
}

.aidb-pchat-suggestions-label {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 8px;
}

.aidb-pchat-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aidb-pchat-suggestion-btn {
    display: inline-block;
    padding: 7px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.3;
}

.aidb-pchat-suggestion-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #6366f1;
}

.aidb-pchat-suggestion-btn:active {
    transform: scale(0.97);
}

/* Chat Input */
.aidb-pchat-input-area {
    margin-bottom: 16px;
}

.aidb-pchat-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.aidb-pchat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aidb-pchat-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aidb-pchat-input::placeholder {
    color: #9ca3af;
}

.aidb-pchat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.aidb-pchat-send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
    font-size: 16px;
}

.aidb-pchat-send-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.aidb-pchat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.aidb-pchat-send-icon {
    font-size: 16px;
}

.aidb-pchat-limit-msg {
    font-size: 13px;
    color: #dc2626;
    margin: 8px 0 0;
}

/* Upgrade hint for free members */
.aidb-pchat-upgrade-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0;
}

.aidb-pchat-upgrade-hint a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.aidb-pchat-upgrade-hint a:hover {
    text-decoration: underline;
}

/* Login Prompt */
.aidb-pchat-login-prompt {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}

.aidb-pchat-login-prompt p {
    color: #6b7280;
    margin: 0 0 16px;
    font-size: 14px;
}

.aidb-pchat-login-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Live Response */
.aidb-pchat-live-response {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.aidb-pchat-live-q {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #6366f1;
}

.aidb-pchat-live-a {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
}

.aidb-pchat-error-text {
    color: #dc2626 !important;
}

/* Thinking Animation */
.aidb-pchat-thinking {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.aidb-pchat-thinking span {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: aidb-pchat-dot 1.4s infinite ease-in-out both;
}

.aidb-pchat-thinking span:nth-child(1) {
    animation-delay: -0.32s;
}

.aidb-pchat-thinking span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes aidb-pchat-dot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Q&A Section
   ============================================ */

.aidb-pchat-qa-section {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-qa-count {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
}

.aidb-pchat-qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aidb-pchat-qa-item {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    transition: border-color 0.2s;
}

.aidb-pchat-qa-item:hover {
    border-color: #d1d5db;
}

/* Q&A Delete Button */
.aidb-pchat-qa-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.aidb-pchat-qa-item:hover .aidb-pchat-qa-delete {
    opacity: 1;
}

.aidb-pchat-qa-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.aidb-pchat-qa-new {
    animation: aidb-pchat-fade-in 0.5s ease-out;
    border-color: #c7d2fe;
}

@keyframes aidb-pchat-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aidb-pchat-qa-question,
.aidb-pchat-qa-answer {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.aidb-pchat-qa-question {
    margin-bottom: 10px;
}

.aidb-pchat-qa-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #374151;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.aidb-pchat-qa-icon-a {
    background: #eef2ff;
    color: #6366f1;
}

.aidb-pchat-qa-text {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    flex: 1;
}

.aidb-pchat-qa-question .aidb-pchat-qa-text {
    font-weight: 600;
    color: #111827;
}

.aidb-pchat-qa-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
    padding-left: 34px;
}

.aidb-pchat-qa-empty {
    text-align: center;
    padding: 32px 20px;
    color: #9ca3af;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.aidb-pchat-qa-empty p {
    margin: 0;
    font-size: 14px;
}

/* Share Section */
.aidb-pchat-share {
    text-align: center;
    padding: 24px 32px 32px;
}

/* ============================================
   Premium Gate Page
   ============================================ */

.aidb-pchat-gate {
    padding: 48px 32px;
    text-align: center;
}

.aidb-pchat-gate-inner {
    max-width: 480px;
    margin: 0 auto;
}

.aidb-pchat-gate-message {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.6;
}

.aidb-pchat-gate-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.6;
}

.aidb-pchat-gate-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ============================================
   Inline Gate (Non-Premium Users)
   ============================================ */

.aidb-pchat-gate-inline {
    margin-bottom: 16px;
}

.aidb-pchat-gate-inline .aidb-pchat-input-row {
    opacity: 0.5;
    pointer-events: none;
    margin-bottom: 0;
}

.aidb-pchat-gate-inline-message {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 12px;
}

.aidb-pchat-gate-inline-message p {
    font-size: 14px;
    color: #374151;
    margin: 0 0 14px;
    line-height: 1.6;
    font-weight: 500;
}

.aidb-pchat-gate-limits {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
}

/* Locked suggestion buttons (non-premium) */
.aidb-pchat-suggestion-btn--locked {
    cursor: default;
    opacity: 0.7;
}

.aidb-pchat-suggestion-btn--locked:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #4b5563;
}

/* Gate highlight animation (when suggestion clicked) */
.aidb-pchat-gate-highlight {
    animation: aidb-pchat-gate-pulse 0.6s ease-in-out 2;
}

@keyframes aidb-pchat-gate-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2);
    }
}

/* ============================================
   Block Embed (metadata header + chat widget)
   ============================================ */

.aidb-pchat-block {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    color: #1a1a1a;
}

.aidb-pchat-block-header {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    padding: 20px 24px;
}

.aidb-pchat-block-header-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.4;
}

.aidb-pchat-block-header-title-en {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 12px;
    line-height: 1.4;
}

/* Research institution — prominent box below the title */
.aidb-pchat-block-affil {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: #eef2ff;
    border-left: 3px solid #6366f1;
    border-radius: 6px;
}

.aidb-pchat-block-affil-label {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 0.03em;
}

.aidb-pchat-block-affil-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

/* First-page overview from the PDF */
.aidb-pchat-block-overview {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 14px;
}

.aidb-pchat-block-header-meta {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.6;
}

.aidb-pchat-block-header-meta th {
    text-align: left;
    color: #6b7280;
    font-weight: 600;
    padding: 3px 12px 3px 0;
    white-space: nowrap;
    vertical-align: top;
    width: 40px;
}

.aidb-pchat-block-header-meta td {
    color: #374151;
    padding: 3px 0;
    line-height: 1.5;
}

.aidb-pchat-block-header-meta a {
    color: #6366f1;
    text-decoration: none;
    word-break: break-all;
}

.aidb-pchat-block-header-meta a:hover {
    text-decoration: underline;
}

/* Make the shortcode widget seamless below the header */
.aidb-pchat-block .aidb-pchat-shortcode {
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* ============================================
   Shortcode Embed (Card Layout)
   ============================================ */

.aidb-pchat-shortcode {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 28px 0;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    overflow: hidden;
}

/* Compact Header (click to expand) */
.aidb-pchat-sc-compact {
    padding: 20px 24px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.15s;
}

.aidb-pchat-sc-compact:hover {
    background: #f9fafb;
}

.aidb-pchat-sc-compact .aidb-pchat-sc-title-en {
    margin: 0 0 4px;
    padding-right: 24px;
}

.aidb-pchat-sc-compact .aidb-pchat-sc-title-ja {
    margin: 0;
    padding-right: 24px;
}

.aidb-pchat-sc-expand-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 14px;
    color: #9ca3af;
    transition: transform 0.25s ease;
}

/* Collapsed state: body hidden */
.aidb-pchat-sc--collapsed .aidb-pchat-sc-body {
    display: none;
}

/* Expanded state */
.aidb-pchat-sc--expanded .aidb-pchat-sc-body {
    display: block;
}

.aidb-pchat-sc--expanded .aidb-pchat-sc-compact {
    border-bottom: 1px solid #e5e7eb;
}

.aidb-pchat-sc--expanded .aidb-pchat-sc-expand-icon {
    transform: rotate(180deg);
}

/* Paper Info */
.aidb-pchat-sc-info {
    padding: 16px 24px 0;
}

.aidb-pchat-sc-title-en {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 6px;
    line-height: 1.5;
}

.aidb-pchat-sc-title-ja {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.5;
}

.aidb-pchat-sc-date {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* Key Points */
.aidb-pchat-sc-points {
    padding: 16px 24px;
    margin: 16px 24px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.aidb-pchat-sc-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aidb-pchat-sc-points-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.aidb-pchat-sc-points-list li:last-child {
    margin-bottom: 0;
}

.aidb-pchat-sc-points-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
}

.aidb-pchat-sc-ai-note {
    font-size: 11px;
    color: #9ca3af;
    margin: 4px 24px 0;
}

/* Chat Section */
.aidb-pchat-sc-chat {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

.aidb-pchat-sc-chat-label {
    font-size: 13px;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.aidb-pchat-shortcode-remaining {
    font-size: 12px;
    color: #6366f1;
    font-weight: 500;
    margin: 6px 0 0;
}

.aidb-pchat-limit-note {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    margin-left: 4px;
}

/* External Links */
.aidb-pchat-sc-links {
    display: flex;
    gap: 0;
    border-top: 1px solid #e5e7eb;
}

.aidb-pchat-sc-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #e5e7eb;
}

.aidb-pchat-sc-link:last-child {
    border-right: none;
}

.aidb-pchat-sc-link:hover {
    background: #f3f4f6;
    color: #6366f1;
    text-decoration: none;
}

.aidb-pchat-sc-link-icon {
    font-size: 15px;
    line-height: 1;
}

/* Related Articles */
.aidb-pchat-sc-related {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.aidb-pchat-sc-related-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aidb-pchat-sc-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aidb-pchat-sc-related-list li {
    margin-bottom: 4px;
}

.aidb-pchat-sc-related-list li:last-child {
    margin-bottom: 0;
}

.aidb-pchat-sc-related-list a {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    line-height: 1.6;
}

.aidb-pchat-sc-related-list a:hover {
    text-decoration: underline;
}

/* Detail Page Link */
.aidb-pchat-sc-detail {
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.aidb-pchat-sc-detail-link {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: background 0.15s;
}

.aidb-pchat-sc-detail-link:hover {
    background: #eef2ff;
    text-decoration: none;
}

/* Shortcode Teaser (non-premium) */
.aidb-pchat-shortcode-teaser {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

.aidb-pchat-shortcode-teaser-inner {
    text-align: center;
}

.aidb-pchat-shortcode-teaser-title {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 8px;
}

.aidb-pchat-shortcode-teaser-desc {
    font-size: 14px;
    color: #92400e;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 640px) {
    .aidb-pchat-outer {
        padding: 10px;
    }

    .aidb-pchat-archive-header {
        padding: 20px 16px;
    }

    .aidb-pchat-archive-title {
        font-size: 20px;
    }

    .aidb-pchat-breadcrumb {
        padding: 12px 16px;
    }

    .aidb-pchat-single-header {
        padding: 20px 16px;
    }

    .aidb-pchat-single-title {
        font-size: 20px;
    }

    .aidb-pchat-single-meta {
        flex-direction: column;
        gap: 6px;
    }

    .aidb-pchat-card {
        padding: 16px;
    }

    .aidb-pchat-card-title {
        font-size: 15px;
    }

    .aidb-pchat-chat-section,
    .aidb-pchat-qa-section {
        padding: 20px 16px;
    }

    .aidb-pchat-suggestion-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .aidb-pchat-input {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .aidb-pchat-qa-item {
        padding: 12px 16px;
    }

    .aidb-pchat-qa-delete {
        opacity: 1;
    }

    .aidb-pchat-single-links {
        flex-direction: column;
    }

    .aidb-pchat-link-btn {
        text-align: center;
    }

    .aidb-pchat-login-btns {
        flex-direction: column;
    }

    .aidb-pchat-share {
        padding: 20px 16px 24px;
    }

    .aidb-pchat-pagination {
        padding: 16px;
    }

    .aidb-pchat-shortcode {
        margin: 16px 0;
    }

    .aidb-pchat-sc-compact {
        padding: 16px;
    }

    .aidb-pchat-sc-compact .aidb-pchat-sc-title-ja {
        font-size: 15px;
    }

    .aidb-pchat-sc-expand-icon {
        top: 16px;
        right: 16px;
    }

    .aidb-pchat-sc-info {
        padding: 12px 16px 0;
    }

    .aidb-pchat-sc-title-ja {
        font-size: 16px;
    }

    .aidb-pchat-sc-points {
        margin: 12px 16px 0;
        padding: 12px 16px;
    }

    .aidb-pchat-sc-chat {
        padding: 16px;
    }

    .aidb-pchat-sc-related {
        padding: 12px 16px;
    }

    .aidb-pchat-shortcode-teaser {
        padding: 16px;
        margin: 16px 0;
    }

    .aidb-pchat-gate-inline-message {
        padding: 16px;
    }

    .aidb-pchat-block {
        margin: 16px 0;
    }

    .aidb-pchat-block-header {
        padding: 16px;
    }

    .aidb-pchat-block-header-title {
        font-size: 16px;
    }
}
