@charset 'UTF-8';

/* =========================================================
   SNSアカウント詳細（instagram_detail.html / x_detail.html）
   ※ 更新ボタン（.refresh-btn）・.section はトレンド・詳細アナライズでも使用
   ========================================================= */

.section {
    width: 100%;
    display: none;
}

/* ---------- 更新ボタン（アイコンは ::before。JSが文言を書き換えるため） ---------- */
.refresh-btn-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.refresh-btn::before {
    content: 'refresh';
    font-family: 'Material Symbols Outlined';
    font-feature-settings: 'liga';
    font-weight: normal;
    font-size: 18px;
    line-height: 1;
    width: 18px;
    overflow: hidden;
    color: var(--accent-ink);
}

/* 旧マークアップのアイコン（span）は ::before と重複するため非表示 */
.refresh-btn .material-symbols-outlined {
    display: none;
}

.refresh-btn:hover:not(:disabled) {
    border-color: var(--accent);
}

.refresh-btn:disabled {
    background: var(--surface-2);
    color: var(--text-3);
    cursor: not-allowed;
}

.refresh-btn:disabled::before {
    color: var(--text-3);
}

.refresh-btn.is-loading::before {
    animation: spin 0.8s linear infinite;
}

#updated-at {
    margin: 0;
    font-family: var(--font-family-en);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

/* ---------- ページ見出し ---------- */
.detail-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
}

.crumb a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
}

.crumb a:hover {
    color: var(--accent-ink);
}

.crumb .material-symbols-outlined {
    font-size: 16px;
}

.crumb-current {
    color: var(--text);
}

.main-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.detail-page .page-head {
    margin-top: -8px;
}

.detail-page .page-head p,
.detail-page .page-head h2 {
    margin: 0;
}

.detail-page .top-title {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.4;
}

/* ---------- アカウント情報（ヒーロー） ---------- */
.hero {
    position: relative;
    box-sizing: border-box;
    padding: 26px 28px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(18, 181, 214, 0.14), transparent 70%);
    pointer-events: none;
}

#account-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-img {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-soft);
}

.account-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.userinfo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.username {
    font-size: 26px;
    font-weight: 900;
    word-break: break-all;
}

.attribute {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 100px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 700;
}

.attribute:empty {
    display: none;
}

/* 属性が未設定のとき（「属性を追加する」ボタンが表示されているとき）はオレンジ */
.account-meta:has(#set-attribute-btn[style*="inline-block"]) .attribute {
    background: rgba(251, 146, 60, 0.14);
    color: #C2410C;
}

[data-theme="dark"] .account-meta:has(#set-attribute-btn[style*="inline-block"]) .attribute {
    color: #FDBA74;
}

.paused-badge {
    display: none;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.paused-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9AA3AD;
}

.set-attribute-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--ink-contrast) !important;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* JSが表示時に inline-block を付けるため、アイコンと横並びを維持 */
.set-attribute-btn[style*="inline-block"] {
    display: inline-flex !important;
}

.set-attribute-btn::before {
    content: 'add';
    font-family: 'Material Symbols Outlined';
    font-feature-settings: 'liga';
    font-weight: normal;
    font-size: 18px;
    line-height: 1;
    width: 18px;
    overflow: hidden;
}

.set-attribute-btn:hover {
    background: var(--accent-ink);
    color: #fff !important;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.followers,
.media-count {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: var(--surface-2);
    font-family: var(--font-family-en);
    font-size: 15px;
    font-weight: 700;
}

.hero-pf {
    align-self: flex-start;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: #fff;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---------- 方向性・目標＋右側のリンク ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.section-card {
    box-sizing: border-box;
    padding: 24px 26px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

#goal-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

#goal-section h2 .material-symbols-outlined {
    color: var(--accent-ink);
}

.goal-description {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-2);
}

.goal-view {
    margin-top: 14px;
}

.goal-view-text {
    margin: 0;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-2);
    font-size: 14px;
    line-height: 2;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.goal-textarea {
    display: block;
    width: 100%;
    height: 150px;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.9;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.goal-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(18, 181, 214, 0.16);
}

.goal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.goal-save-btn {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    background: var(--ink);
    color: var(--ink-contrast);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.goal-save-btn:hover:not(:disabled) {
    background: var(--accent-ink);
    color: #fff;
}

.goal-save-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.goal-edit-btn,
.goal-cancel-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.goal-edit-btn {
    margin-top: 12px;
}

.goal-edit-btn:hover,
.goal-cancel-btn:hover {
    background: var(--surface-2);
}

.side-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-list .modal-long {
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.side-list .modal-long:hover {
    box-shadow: 0 14px 30px rgba(17, 20, 23, 0.07);
    transform: translateY(-2px);
}

.side-list .modal-long-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.side-list .modal-long-content p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.side-list .modal-long-content small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

/* 右端の「＞」 */
.side-list .modal-long-content .allow {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--surface-2);
    font-size: 0;
}

.side-list .modal-long-content .allow::after,
.ai-go::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 11px;
    width: 7px;
    height: 7px;
    border-top: 2px solid var(--text-2);
    border-right: 2px solid var(--text-2);
    transform: rotate(45deg);
}

.ml-ic {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 詳細アナライズへの導線（黒） */
.side-list .da-cta-link {
    margin: 0;
    background: #111417;
    border-color: #111417;
    color: #fff;
}

.da-cta-link .ml-ic {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.side-list .da-cta-link .modal-long-content small {
    color: rgba(255, 255, 255, 0.55);
}

.side-list .da-cta-link .modal-long-content .allow {
    background: var(--accent);
}

.side-list .da-cta-link .modal-long-content .allow::after {
    border-color: #111417;
}

[data-theme="dark"] .side-list .da-cta-link {
    background: #F2F4F6;
    border-color: #F2F4F6;
    color: #111417;
}

[data-theme="dark"] .da-cta-link .ml-ic {
    background: rgba(0, 0, 0, 0.06);
    color: #00768F;
}

[data-theme="dark"] .side-list .da-cta-link .modal-long-content small {
    color: rgba(0, 0, 0, 0.5);
}

/* AIのアカウント分析カード（SNS.pngは使わず、AIマークで表現） */
.ai-card {
    width: auto;
    margin: 0;
}

.ai-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 0;
}

.ai-mark {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #111417;
    color: var(--accent);
    font-family: var(--font-family-en);
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-mark::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--surface);
}

[data-theme="dark"] .ai-mark {
    background: #F2F4F6;
    color: #00768F;
}

.ai-tag {
    margin: 0;
    font-family: var(--font-family-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-3);
}

.ai-go {
    position: relative;
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--surface-2);
}

.ai-card .modal-nomal-content {
    padding-top: 14px;
}

/* ---------- 連携の管理 ---------- */
.pause-btn-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 18px 22px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

.pause-btn-area b {
    font-size: 15px;
    font-weight: 900;
}

.pause-btn-area p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

.pause-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid #FBCACA;
    background: transparent;
    color: #DC2626;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.pause-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.08);
}

.pause-btn.is-paused {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--ink-contrast);
}

.pause-btn.is-paused:hover:not(:disabled) {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: #fff;
}

.pause-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

[data-theme="dark"] .pause-btn:not(.is-paused) {
    border-color: rgba(248, 113, 113, 0.4);
    color: #F87171;
}

/* ---------- 方向性・目標の確認／完了ポップアップ ---------- */
.goal-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 20, 23, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.goal-confirm-modal {
    width: 460px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 30px 28px 24px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 40px 80px rgba(17, 20, 23, 0.3);
    animation: pop 0.3s ease both;
}

.gc-ic {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-ic--edit {
    background: rgba(251, 146, 60, 0.14);
    color: #C2410C;
}

.gc-ic--done {
    background: rgba(34, 197, 94, 0.14);
    color: #15803D;
}

.goal-confirm-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.95;
    color: var(--text);
}

.goal-confirm-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.goal-confirm-cancel-btn,
.goal-confirm-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    box-sizing: border-box;
    padding: 0 18px;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.goal-confirm-cancel-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.goal-confirm-cancel-btn:hover {
    background: var(--surface-2);
}

.goal-confirm-edit-btn {
    border: none;
    background: var(--ink);
    color: var(--ink-contrast) !important;
}

.goal-confirm-edit-btn:hover {
    background: var(--accent-ink);
    color: #fff !important;
}

/* 更新中はアイコンを回転させる（任意で refresh-btn に is-loading クラスを付ける場合） */
.refresh-btn.is-loading .material-symbols-outlined {
    animation: spin 0.8s linear infinite;
}


/* ---------- 投稿時間帯の傾向（詳細アナライズ「ベストタイム分析」の下部） ---------- */
/* PDF出力（ライト固定）でも正しい色になるよう、テーマ差分は変数で切り替える */
:root,
[data-theme="light"] {
    --ana-icon-filter: none;
    --post-time-night: #0B3B47;
}

[data-theme="dark"] {
    --ana-icon-filter: invert(1) brightness(1.4);
    --post-time-night: #2D6B7A;
}

.ana-icon {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ana-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: var(--ana-icon-filter);
}

.post-time-icon {
    background-color: var(--accent-soft);
}

.post-time-card {
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background-color: var(--surface-2);
}

.post-time-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-time-label {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    color: var(--text);
}

.post-time-bar {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 12px;
    margin-top: 12px;
    border-radius: 100px;
    overflow: hidden;
    background: var(--line-soft);
}

.post-time-segment {
    height: 100%;
}

.post-time-segment.morning,
.post-time-legend-dot.morning {
    background-color: #9EE3F0;
}

.post-time-segment.noon,
.post-time-legend-dot.noon {
    background-color: #12B5D6;
}

.post-time-segment.evening,
.post-time-legend-dot.evening {
    background-color: #00768F;
}

.post-time-segment.night,
.post-time-legend-dot.night {
    background-color: var(--post-time-night);
}

.post-time-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
}

.post-time-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
}

.post-time-legend-item b {
    font-family: var(--font-family-en);
    color: var(--text);
}

.post-time-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex-shrink: 0;
}

.post-time-empty {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-3);
}

/* ---------- AIのアカウント分析（CRDS-s）モーダル ---------- */
.modal-ai-summary {
    max-width: 860px;
}

.modal-ai-summary .modal-close {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: none;
}

.ai-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 40px;
    background: #111417;
    overflow: hidden;
}

.ai-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.ai-head>* {
    position: relative;
}

.ai-head .ai-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.ai-head .ai-mark::after {
    box-shadow: 0 0 0 2px #111417;
}

.ai-head .ai-tag {
    color: rgba(255, 255, 255, 0.6);
}

.ai-title {
    margin: 6px 0 0;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
}

.modal-ai-summary .modal-contents {
    padding: 26px 40px 36px;
}

#profile_summary {
    font-size: 14px;
    line-height: 2;
    color: var(--text-2);
    white-space: pre-wrap;
}

/* ---------- 最新投稿モーダル ---------- */
.modal-latest-posts {
    max-width: 960px;
    left: 50%;
    transform: translateX(-50%);
}

.modal-latest-posts .modal-contents {
    padding: 32px 36px 40px;
}

#latest-section h2 {
    margin: 8px 0 0;
    font-size: 22px;
    font-weight: 900;
}

#media-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.media-item {
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    overflow: hidden;
}

.media-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--surface-2);
}

.media-caption {
    padding: 12px 14px 0;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-date {
    padding: 6px 14px 14px;
    font-family: var(--font-family-en);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
}

/* Xの投稿一覧（縦に並べる） */
#media-container.x-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-item {
    display: flex;
    gap: 14px;
    box-sizing: border-box;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

.post-thumb {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.post-meta span {
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--surface-2);
    font-family: var(--font-family-en);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}

.post-date {
    padding-top: 8px;
    font-family: var(--font-family-en);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 1000px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    #media-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .detail-page {
        gap: 18px;
    }

    .detail-page .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .detail-page .top-title {
        font-size: 20px;
    }

    .hero {
        padding: 20px;
    }

    /* スマホではアイコン＋名前を横に、属性ボタン・数値は下段に全幅で並べる */
    #account-header {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        align-items: center;
        gap: 12px 14px;
    }

    .account-meta {
        display: contents;
    }

    .userinfo {
        padding-right: 40px;
        gap: 6px;
    }

    .set-attribute-btn,
    .stat-row {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .stat-row {
        justify-self: stretch;
        margin-top: 0;
    }

    .followers,
    .media-count {
        flex: 1;
        justify-content: center;
    }

    /* 詳細アナライズへの導線を先に表示 */
    .side-list {
        order: -1;
    }

    .profile-img {
        width: 64px;
        height: 64px;
    }

    .username {
        font-size: 20px;
    }

    .hero-pf {
        position: absolute;
        right: 0;
        top: 0;
        width: 34px;
        height: 34px;
        padding: 6px;
    }

    .followers,
    .media-count {
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .section-card {
        padding: 18px;
    }

    .pause-btn-area {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-latest-posts .modal-contents,
    .modal-ai-summary .modal-contents {
        padding: 24px 18px 32px;
    }

    .ai-head {
        padding: 24px 20px;
    }

    .ai-title {
        font-size: 20px;
    }

    #media-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
