/* /app/ と /mypage/ のパンくずホームリンクを非表示 */
.breadcrumb-home {
    display: none !important;
}

/* 未ログインユーザー向けデモヘッダー */
.hacktsu-demo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 8px 16px;
}

.demo-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-header-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.demo-logo-img {
    height: 28px;
    width: auto;
}

.demo-header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.demo-header-nav .btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
    white-space: nowrap;
}

.demo-header-nav .btn-ghost {
    background: transparent;
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
}

.demo-header-nav .btn-ghost:hover {
    background: #ff6b6b;
    color: #fff;
}

.demo-header-nav .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa94d 100%);
    color: #fff;
    border: none;
}

/* デモモード時のアプリ本体のマージン調整 */
.hacktsu-demo-header+#hacktsu-app {
    margin-top: 50px;
}

.hacktsu-demo-header+#hacktsu-app #main-header {
    top: 50px;
}

.header-role-badge {
    display: flex;
    align-items: center;
}

.role-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-card {
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid #eef0f5;
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.dashboard-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 200px));
    gap: 12px;
}

.dashboard-metric {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.metric-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.dashboard-action-list {
    display: grid;
    gap: 12px;
}

.dashboard-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f9fafb;
    border-radius: 14px;
    padding: 12px 14px;
}

.dashboard-action-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.dashboard-action-desc {
    font-size: 12px;
    color: #6b7280;
}

.dashboard-recent-list {
    display: grid;
    gap: 12px;
}

.dashboard-recent-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
}

.dashboard-recent-meta {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}

.dashboard-recent-text {
    font-size: 13px;
    color: #111827;
    line-height: 1.5;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.dashboard-empty {
    font-size: 13px;
    color: #6b7280;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
}

@media (max-width: 640px) {
    .dashboard-action {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }
}

.role-badge:focus .role-tooltip,
.role-badge:hover .role-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.role-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

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

.role-info-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    animation: fadeIn 0.2s ease;
    padding: 12px;
}

.role-info-modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: min(480px, calc(100vw - 24px));
    max-height: min(90vh, calc(100vh - 24px));
    max-height: min(88dvh, calc(100dvh - 24px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.role-info-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #111827;
}

.role-info-role {
    background: #fef3c7;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
    margin-bottom: 12px;
}

.role-info-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: #1f2937;
}

.role-info-facility {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}

.role-info-facility-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.role-info-facility-id-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.role-info-facility-id {
    flex: 1;
    font-size: 0.95rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-weight: 600;
    padding: 10px 12px;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    letter-spacing: 0.04em;
    text-align: center;
}

.role-info-copy-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.role-info-copy-btn:active {
    background: #2563eb;
}

.role-info-facility-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 6px;
}

/* Role/Ownership Section Styles */
.role-info-role-section {
    margin-bottom: 12px;
    text-align: center;
}

.role-info-role-label,
.role-info-perms-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.role-info-perms-section {
    margin-bottom: 12px;
}

.role-info-ownership {
    margin: 12px 0;
    padding: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 1px solid #fbbf24;
    text-align: center;
}

.role-info-ownership-label {
    font-size: 0.8rem;
    color: #92400e;
    margin-bottom: 8px;
    font-weight: 500;
}

.role-info-ownership-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.role-info-ownership-badge .ownership-icon {
    font-size: 1.2rem;
}

.role-info-ownership-badge .ownership-text {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
}

.role-info-ownership-desc {
    font-size: 0.75rem;
    color: #78350f;
}

/* Role info modal grid layout */
.role-info-grid {
    display: block;
}

.role-info-plan-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.role-info-plan-ctas .btn {
    width: auto;
    max-width: 100%;
    min-height: 38px;
}

.role-info-plan-note {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.45;
}

.role-info-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.role-info-actions .btn {
    width: 100%;
    max-width: none;
}

.role-info-mypage {
    width: 100% !important;
    max-width: none !important;
}

@media (min-width: 768px) {
    .role-info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        text-align: left;
        margin-bottom: 8px;
    }

    .role-info-col {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .role-info-plan-ctas {
        justify-content: flex-start;
    }

    .role-info-plan-note {
        text-align: left;
    }

    .role-info-actions {
        flex-direction: row;
        gap: 12px;
    }

    .role-info-actions .btn {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .role-info-modal-backdrop {
        align-items: flex-end;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    }

    .role-info-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
        max-height: min(92dvh, calc(100dvh - 8px));
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.25);
    }

    .role-info-plan-ctas {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .role-info-plan-ctas .btn {
        width: auto;
        min-width: min(74vw, 260px);
        max-width: 280px;
        align-self: center;
    }

    .role-info-plan-ctas .role-info-upgrade-btn,
    .role-info-plan-ctas .role-info-parent-pro-btn,
    .role-info-plan-ctas .role-info-addon-btn {
        flex: 0 1 auto;
        min-height: 34px;
        padding: 5px 12px;
        font-size: 0.78rem;
    }

    .role-info-plan-note {
        font-size: 0.72rem;
    }

    .role-info-actions .btn {
        min-height: 42px;
    }
}

@media (max-width: 390px),
(max-height: 700px) {
    .role-info-modal {
        width: min(460px, calc(100vw - 16px));
        padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    }

    .role-info-title {
        font-size: 0.95rem;
    }

    .role-info-list {
        gap: 4px;
        font-size: 0.84rem;
    }

    .role-info-ownership {
        padding: 10px;
    }

    .role-info-plan-ctas .btn {
        min-width: min(70vw, 240px);
        max-width: 250px;
        font-size: 0.76rem;
        padding: 4px 10px;
    }

    .role-info-facility-id {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .role-info-copy-btn {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

.share-settings-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-section {
    margin-bottom: 8px;
}

.share-section-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.share-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.share-facility-input {
    flex: 1;
    font-size: 1rem;
    padding: 14px 16px;
    min-height: 52px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 0.03em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.share-facility-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.share-facility-input::placeholder {
    color: #9ca3af;
    font-size: 0.9rem;
}

.share-add-btn {
    white-space: nowrap;
    padding: 14px 18px;
    min-height: 52px;
    font-size: 1rem;
}

.share-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
}

.share-empty {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .share-input-wrapper {
        flex-direction: column;
    }

    .share-add-btn {
        width: 100%;
    }
}

.role-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #111827;
    color: #f9fafb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.role-tooltip-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.role-permissions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.service-intro {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.service-intro-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #92400e;
}

.service-intro-steps {
    margin: 0;
    padding-left: 18px;
    color: #7c2d12;
    font-size: 0.92rem;
    display: grid;
    gap: 6px;
}

.ai-disclaimer-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 12px 0;
    background: #fff7ed;
    border-left: 4px solid #fb923c;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #7c2d12;
}

.ai-disclaimer-icon {
    font-size: 18px;
}

.ai-disclaimer-text strong {
    display: block;
    margin-bottom: 4px;
}

/* === DESIGN THEME === */
:root {
    --c-red: #E83447;
    --c-yellow: #FDCC28;
    --c-blue: #0285C9;
    --c-green: #AACD7B;
    --y: var(--c-yellow);
    --a: var(--c-blue);
    --r: var(--c-red);
    --accent-green: var(--c-green);
    --b: #2F2F2F;
    --g: #FFFFFF;
    --w: #FFF;
    --shadow-red: 6px 6px 0 0 var(--c-blue);
    --shadow-yellow: 6px 6px 0 0 var(--c-red);

    /* Guided Flow (お子さまプロフィール作成 → 保存 → 分析) */
    #hacktsu-app .guided-flow {
        padding: 12px 16px;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
    }

    #hacktsu-app .guided-flow-title {
        font-weight: 700;
        font-size: 0.95rem;
        margin-bottom: 8px;
        color: #1f2937;
    }

    #hacktsu-app .guided-flow-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    #hacktsu-app .guided-flow-step {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
        font-size: 0.85rem;
        color: #6b7280;
    }

    #hacktsu-app .guided-flow-step-number {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        background: #e5e7eb;
        color: #6b7280;
        flex-shrink: 0;
    }

    #hacktsu-app .guided-flow-step.is-active {
        border-color: #0285c9;
        background: #eef6ff;
        color: #0f172a;
        font-weight: 600;
    }

    #hacktsu-app .guided-flow-step.is-active .guided-flow-step-number {
        background: #0285c9;
        color: #fff;
    }

    #hacktsu-app .guided-flow-step.is-done {
        border-color: #16a34a;
        background: #ecfdf3;
        color: #166534;
    }

    #hacktsu-app .guided-flow-step.is-done .guided-flow-step-number {
        background: #16a34a;
        color: #fff;
    }

    #hacktsu-app .guided-flow-note {
        margin-top: 8px;
        font-size: 0.8rem;
        color: #6b7280;
    }

    --shadow-blue: 6px 6px 0 0 var(--c-yellow);
    --shadow-green: 6px 6px 0 0 var(--c-blue);
    --radius-card: 22px;
    --radius-soft: 16px;
    --font: "M PLUS Rounded 1c",
    sans-serif
}

body {
    font-family: var(--font);
    background: var(--g);
    color: var(--b);
    margin: 0;
    padding: 0 0 50px;
    line-height: 1.6;
    --card-accent: var(--c-yellow);
    --card-shadow: var(--shadow-yellow)
}

/* Header & Tab Nav Style */
header {
    background: var(--w);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-blue);
    transition: transform 0.3s ease
}

header.nav-hidden {
    transform: translateY(-100%)
}

.user-bar {
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem
}

.tab-nav {
    display: flex;
    width: 100%;
    background: var(--w);
    position: relative;
    z-index: 200
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    color: #aaa;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    transition: all 0.2s
}

.tab-item:hover {
    background: #fcfcfc
}

.tab-item.active {
    color: var(--b);
    border-bottom-color: var(--y)
}

.tab-icon {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 2px
}

/* === HEADER TOP - Target Selector === */
.header-top {
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.header-target-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.target-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.target-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    flex: 1;
    min-width: 80px;
}

.header-select {
    display: none;
}

.dropdown-icon {
    display: none;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.header-points-hud {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-points-hud[data-tooltip]:hover::after,
.header-points-hud[data-tooltip]:focus-within::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #111827;
    color: #fff;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1200;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.points-hud-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
    color: #1e3a8a;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 10px;
    cursor: default;
}

.points-hud-main-btn.is-clickable {
    cursor: pointer;
}

.points-hud-label {
    color: #1d4ed8;
    font-size: 0.72rem;
}

.points-hud-balance {
    color: #1e40af;
    font-size: 0.84rem;
}

.points-hud-free {
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
}

.points-hud-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f59e0b;
    background: #fff7ed;
    color: #b45309;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.points-hud-buy-btn:hover {
    background: #ffedd5;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #eef2ff;
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.header-link:hover {
    background: #e0e7ff;
    color: #1e3a8a;
}

.header-user-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font);
}

.header-user-select:hover {
    border-color: #999;
}

@media (max-width: 768px) {
    .header-top {
        padding: 10px 12px;
        gap: 8px;
    }

    .header-target-selector {
        min-width: 150px;
        gap: 6px;
    }

    .target-icon {
        font-size: 1.2rem;
    }

    .target-name {
        font-size: 0.8rem;
    }
}

#hacktsu-app .container {
    box-sizing: border-box;
    width: 100%;
    padding: 28px clamp(28px, 4vw, 96px);
    max-width: 1200px;
    margin: 0 auto
}

@media (max-width: 600px) {
    #hacktsu-app .container {
        padding-left: 28px;
        padding-right: 28px
    }
}

.view {
    display: none;
    animation: f .3s
}

.view.active {
    display: block
}

@keyframes f {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

/* ✅ AI生成中のスピナーアニメーション */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.card {
    --card-accent: var(--c-yellow);
    --card-shadow: var(--shadow-yellow);
    background: var(--w);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--card-accent)
}

.profile-card {
    --card-accent: var(--c-yellow);
    --card-shadow: var(--shadow-yellow);
    background: var(--w);
    border: 2px solid var(--card-accent);
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--b)
}

.p-icon {
    width: 60px;
    height: 60px;
    background: var(--w);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 3px solid var(--b);
    flex-shrink: 0
}

.tag {
    font-size: .7rem;
    padding: 4px 8px;
    background: var(--w);
    color: var(--card-accent);
    border-radius: 10px;
    font-weight: 700;
    margin-right: 5px;
    border: 1px solid var(--card-accent)
}

textarea {
    width: 100%;
    max-width: 680px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius-soft);
    box-sizing: border-box;
    font-family: inherit;
    margin-top: 10px;
    resize: none
}

textarea:focus {
    border-color: var(--y);
    outline: 0
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform .1s;
    box-sizing: border-box;
    text-decoration: none;
    max-width: 100%
}

.btn:active {
    transform: scale(.98)
}

.btn-p {
    background: var(--c-blue);
    color: #fff;
    border: 2px solid var(--c-blue);
    font-size: 1rem
}

.btn-l {
    background: var(--w);
    border: 2px solid var(--c-blue);
    color: var(--c-blue);
    margin-bottom: 15px
}

.btn-l:hover {
    border-color: var(--c-blue)
}

.log {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    position: relative;
    padding-left: 15px
}

.log::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    bottom: 15px;
    width: 6px;
    border-radius: 0 4px 4px 0
}

.type-observation::before {
    background: var(--y)
}

.type-voice::before {
    background: var(--a)
}

.type-plan::before {
    background: var(--r)
}

.meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    color: #666;
    margin-bottom: 8px;
    flex-wrap: wrap
}

.auth {
    font-weight: 700;
    color: var(--b)
}

.icon {
    font-size: 1.2rem;
    margin-right: 4px
}

.rg {
    display: flex;
    gap: 8px;
    margin-bottom: 10px
}

.rl {
    padding: 6px 12px;
    background: #eee;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer
}

input[type=radio] {
    display: none
}

input[type=radio]:checked+.rl {
    background: var(--y);
    color: var(--b)
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -100px);
    background: var(--b);
    color: var(--y);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    transition: .4s;
    z-index: 9999
}

.toast.show {
    transform: translate(-50%, 0)
}

.demo-cta {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    border-radius: 16px;
    padding: 20px;
}

.demo-sample-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.demo-sample-tab {
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-sample-tab:hover {
    border-color: #667eea;
    background: #f8faff;
}

.demo-sample-tab.active {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

.demo-cta-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.demo-cta-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.demo-cta-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.parent-share-gate {
    border: 2px solid #f59e0b;
    background: #fff7ed;
}

.parent-share-gate-title {
    font-weight: 800;
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 6px;
}

.parent-share-gate-desc {
    font-size: 0.9rem;
    color: #7c4a18;
    line-height: 1.6;
}

.parent-share-gate-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.parent-share-gate-meta {
    font-size: 0.85rem;
    color: #92400e;
}

.expand-toggle {
    margin-left: 6px;
    border: none;
    background: none;
    color: #2563eb;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.expand-toggle:hover {
    text-decoration: underline;
}

/* Chat Demo Notice */
.chat-demo-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fff7ec 0%, #fff3e0 100%);
    border: 2px solid #ffa94d;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.chat-demo-notice-icon {
    font-size: 32px;
}

.chat-demo-notice-text {
    flex: 1;
    font-size: 0.9rem;
    color: #6b4b2a;
    line-height: 1.5;
}

.chat-demo-notice-text strong {
    color: #d35400;
}

.demo-mode input,
.demo-mode textarea,
.demo-mode select {
    pointer-events: none;
    opacity: 0.6;
}

.demo-mode button:not(.demo-cta-button):not(.demo-sample-tab):not(.db-nav-btn):not(.subview-back-btn),
.demo-mode .btn:not(.demo-cta-button):not(.demo-sample-tab):not(.db-nav-btn):not(.subview-back-btn) {
    display: none !important;
}

select {
    font-size: 1rem;
    font-weight: 800;
    border: none;
    background: 0 0;
    border-bottom: 2px solid #333
}

/* DB Styles */
.db-sec {
    margin-bottom: 20px
}

.db-h {
    font-size: .95rem;
    font-weight: 800;
    border-left: 4px solid var(--card-accent);
    padding-left: 10px;
    margin-bottom: 10px;
    background: var(--w);
    padding: 5px 10px;
    border-radius: var(--radius-soft);
    border: 1px solid var(--card-accent)
}

.cycle-vision-card {
    border: 2px solid #e0e7ff;
    background: #f8faff;
    margin-bottom: 18px;
}

.cycle-vision-header {
    margin-bottom: 12px;
}

.cycle-vision-title {
    font-size: 1rem;
    font-weight: 800;
    color: #4338ca;
}

.cycle-vision-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.cycle-vision-body {
    display: grid;
    gap: 14px;
}

.cycle-vision-block {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.cycle-vision-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.cycle-vision-block textarea {
    width: 100%;
    border: 1px solid #d6d6e7;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.cycle-vision-spiral {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === 発掘ビジュアライザー === */
#hacktsu-app .exc-card {
    border: 2px solid #c7d2fe;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
    margin-bottom: 18px;
    padding: 1.25rem;
    border-radius: 16px;
}

#hacktsu-app .exc-header {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

#hacktsu-app .exc-goal {
    text-align: center;
}

#hacktsu-app .exc-goal-label {
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 600;
}

#hacktsu-app .exc-goal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1f2937;
    margin-top: 4px;
}

#hacktsu-app .exc-progress {
    max-width: 300px;
    margin: 0 auto;
}

#hacktsu-app .exc-progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

#hacktsu-app .exc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 999px;
    transition: width 0.5s ease;
}

#hacktsu-app .exc-progress-label {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-top: 4px;
}

#hacktsu-app .exc-layers {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#hacktsu-app .exc-layer {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

#hacktsu-app .exc-layer.is-active {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

#hacktsu-app .exc-layer.is-completed {
    background: #f0fdf4;
    border-color: #86efac;
}

#hacktsu-app .exc-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#hacktsu-app .exc-layer-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
}

#hacktsu-app .exc-layer-status {
    font-size: 0.7rem;
    color: #64748b;
}

#hacktsu-app .exc-layer-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hacktsu-app .exc-layer-dots {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

#hacktsu-app .exc-phase-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
}

#hacktsu-app .exc-phase-dot.is-active {
    background: #60a5fa;
}

#hacktsu-app .exc-phase-dot.is-completed {
    background: #22c55e;
}

#hacktsu-app .exc-layer-connector {
    font-size: 1rem;
    color: #c7d2fe;
    padding: 4px 0;
}

#hacktsu-app .exc-treasure {
    margin-top: 12px;
    text-align: center;
}

#hacktsu-app .exc-treasure-icon {
    font-size: 2rem;
}

#hacktsu-app .exc-treasure-label {
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 600;
    margin-top: 4px;
}

#hacktsu-app .exc-rewards {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #c7d2fe;
}

#hacktsu-app .exc-rewards-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-align: center;
}

#hacktsu-app .exc-rewards-list {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

#hacktsu-app .exc-reward {
    font-size: 1.5rem;
}

#hacktsu-app .exc-reward-empty {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* === 発掘レイヤー詳細カード === */
#hacktsu-app .exc-detail-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 1.25rem;
    border-radius: 12px;
}

#hacktsu-app .exc-detail-header {
    text-align: center;
    margin-bottom: 16px;
}

#hacktsu-app .exc-detail-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
}

#hacktsu-app .exc-detail-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 4px;
}

#hacktsu-app .exc-phases {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#hacktsu-app .exc-phase {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

#hacktsu-app .exc-phase.is-active {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

#hacktsu-app .exc-phase.is-completed {
    background: #f0fdf4;
    border-color: #86efac;
}

#hacktsu-app .exc-phase.is-locked {
    opacity: 0.6;
}

#hacktsu-app .exc-phase-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

#hacktsu-app .exc-phase-icon {
    font-size: 1rem;
}

#hacktsu-app .exc-phase-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
}

#hacktsu-app .exc-phase-status {
    font-size: 0.75rem;
    color: #64748b;
}

#hacktsu-app .exc-phase-body {
    margin-top: 10px;
}

#hacktsu-app .exc-phase-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
}

#hacktsu-app .exc-phase-arrow {
    font-size: 0.9rem;
    color: #c7d2fe;
    padding: 4px 0;
    text-align: center;
}

#hacktsu-app .exc-locked-msg {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

#hacktsu-app .exc-practice-stats {
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 8px;
}

#hacktsu-app .exc-practice-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

#hacktsu-app .exc-log-type {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: #fff;
}

#hacktsu-app .exc-ai-suggestion {
    font-size: 0.8rem;
    color: #6366f1;
    background: #eef2ff;
    padding: 8px 10px;
    border-radius: 8px;
    margin-top: 8px;
}

#hacktsu-app .exc-reflect-fields {
    display: grid;
    gap: 10px;
}

#hacktsu-app .exc-reflect-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

#hacktsu-app .exc-reflect-field textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
}

#hacktsu-app .exc-detail-actions {
    margin-top: 16px;
    text-align: center;
}

#hacktsu-app .exc-analysis {
    font-size: 0.85rem;
    color: #374151;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.6;
}

#hacktsu-app .exc-no-data {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

/* === 発掘成功モーダル === */
#hacktsu-app .exc-success-overlay,
.exc-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#hacktsu-app .exc-success-modal,
.exc-success-modal {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #fbbf24;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 320px;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#hacktsu-app .exc-success-sparkles,
.exc-success-sparkles {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

#hacktsu-app .exc-success-icon,
.exc-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

#hacktsu-app .exc-success-title,
.exc-success-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 8px;
}

#hacktsu-app .exc-success-reward,
.exc-success-reward {
    font-size: 1rem;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 16px;
}

/* === 今日やってみよう UI === */
#hacktsu-app .try-practice-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 16px;
    padding: 16px;
}

#hacktsu-app .try-header {
    margin-bottom: 20px;
}

#hacktsu-app .try-goal {
    margin-bottom: 12px;
}

#hacktsu-app .try-goal-label {
    font-size: 0.85rem;
    color: #0369a1;
    font-weight: 600;
}

#hacktsu-app .try-goal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0c4a6e;
    margin-top: 4px;
}

#hacktsu-app .try-progress {
    margin-top: 12px;
}

#hacktsu-app .try-progress-bar {
    height: 8px;
    background: #bae6fd;
    border-radius: 4px;
    overflow: hidden;
}

#hacktsu-app .try-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9 0%, #3b82f6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

#hacktsu-app .try-progress-label {
    font-size: 0.8rem;
    color: #0369a1;
    margin-top: 6px;
    text-align: right;
}

#hacktsu-app .try-section {
    margin-bottom: 16px;
}

#hacktsu-app .try-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

#hacktsu-app .try-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0;
}

#hacktsu-app .try-assessment-note {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #9a3412;
}

/* === 研磨スタイル選択 === */
#hacktsu-app .polish-style-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#hacktsu-app .polish-selector-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

#hacktsu-app .polish-style-options {
    display: flex;
    gap: 4px;
}

#hacktsu-app .polish-style-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 0.75rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

#hacktsu-app .polish-style-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

#hacktsu-app .polish-style-btn.is-active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

#hacktsu-app .polish-style-btn .polish-icon {
    font-size: 0.85rem;
}

#hacktsu-app .polish-style-btn .polish-label {
    font-weight: 600;
}

#hacktsu-app .try-journey-accordion {
    border: 2px dashed #7dd3fc;
    border-radius: 12px;
    background: #f0f9ff;
    margin-bottom: 16px;
}

#hacktsu-app .try-journey-summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 700;
    color: #0c4a6e;
    display: flex;
    align-items: center;
    gap: 10px;
}

#hacktsu-app .try-journey-summary::-webkit-details-marker {
    display: none;
}

#hacktsu-app .try-journey-summary::after {
    content: "▼";
    font-size: 0.75rem;
    color: #0284c7;
    transition: transform 0.2s ease;
}

#hacktsu-app .try-journey-accordion[open] .try-journey-summary::after {
    transform: rotate(180deg);
}

#hacktsu-app .try-journey-summary-title {
    white-space: nowrap;
}

#hacktsu-app .try-journey-summary-preview {
    font-size: 0.8rem;
    color: #0369a1;
    font-weight: 600;
    margin-left: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#hacktsu-app .try-journey-accordion[open] .try-journey-summary-preview {
    display: none;
}

#hacktsu-app .try-journey-body {
    padding: 0 14px 14px;
}

#hacktsu-app .try-milestones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#hacktsu-app .try-action-card {
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}

#hacktsu-app .try-action-card.is-selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

#hacktsu-app .try-action-card.is-locked {
    border-color: #e2e8f0;
    background: #f8fafc;
    opacity: 0.85;
}

#hacktsu-app .try-action-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

#hacktsu-app .try-action-main {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

#hacktsu-app .try-action-main:disabled {
    cursor: not-allowed;
}

#hacktsu-app .try-action-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#hacktsu-app .try-action-remaining {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

#hacktsu-app .try-action-toggle {
    min-height: 44px;
    padding: 8px 12px;
    border: 2px solid #0284c7;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0c4a6e;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

#hacktsu-app .try-action-toggle:hover {
    border-color: #0369a1;
    background: #bae6fd;
}

#hacktsu-app .try-action-detail {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
    line-height: 1.5;
}

#hacktsu-app .try-action-detail-remaining {
    font-size: 0.76rem;
    color: #475569;
    font-weight: 700;
    margin-bottom: 6px;
}

#hacktsu-app .try-expanded-remaining {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 700;
    margin-top: 4px;
    margin-bottom: 10px;
}

#hacktsu-app .try-show-more-btn {
    min-height: 44px;
}

#hacktsu-app .try-milestone-item {
    width: 100%;
}

#hacktsu-app .try-milestone-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

#hacktsu-app .try-milestone-btn:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

#hacktsu-app .try-milestone-btn.is-selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

#hacktsu-app .try-milestone-btn.is-locked {
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.8;
}

#hacktsu-app .try-milestone-btn.is-locked .try-milestone-title {
    text-decoration: line-through;
    color: #94a3b8;
}

#hacktsu-app .try-milestone-btn.is-locked .try-milestone-remaining {
    color: #94a3b8;
}

#hacktsu-app .try-milestone-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

#hacktsu-app .try-milestone-remaining {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    margin-left: 8px;
}

#hacktsu-app .try-no-milestones {
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.9rem;
    text-align: center;
}

#hacktsu-app .try-expanded-card {
    background: #fff;
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

#hacktsu-app .try-expanded-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 12px;
}

#hacktsu-app .try-expanded-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 12px;
}

#hacktsu-app .try-result-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

#hacktsu-app .try-result-buttons.is-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

#hacktsu-app .try-result-btn {
    width: 100%;
    padding: 10px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9rem;
    min-height: 44px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hacktsu-app .try-result-btn:hover {
    border-color: #94a3b8;
}

#hacktsu-app .try-result-btn.is-selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    font-weight: 600;
}

#hacktsu-app .try-result-btn[data-try-result="good"].is-selected {
    border-color: #22c55e;
    background: #dcfce7;
}

#hacktsu-app .try-result-btn[data-try-result="neutral"].is-selected {
    border-color: #f59e0b;
    background: #fef3c7;
}

#hacktsu-app .try-result-btn[data-try-result="bad"].is-selected {
    border-color: #ef4444;
    background: #fee2e2;
}

#hacktsu-app .try-result-btn[data-try-result="success"].is-selected {
    border-color: #22c55e;
    background: #dcfce7;
}

#hacktsu-app .try-result-btn[data-try-result="partial"].is-selected {
    border-color: #f59e0b;
    background: #fef3c7;
}

#hacktsu-app .try-result-btn[data-try-result="fail"].is-selected {
    border-color: #ef4444;
    background: #fee2e2;
}

#hacktsu-app .try-result-btn[data-try-result="skip"].is-selected {
    border-color: #64748b;
    background: #e2e8f0;
}

#hacktsu-app .try-free-text {
    margin-bottom: 12px;
}

#hacktsu-app .try-free-text label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

#hacktsu-app .try-free-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
}

#hacktsu-app .try-expanded-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

#hacktsu-app .try-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

#hacktsu-app .try-quick-actions .btn {
    min-height: 44px;
}

#hacktsu-app .try-detail-block {
    border-top: 1px dashed #bfdbfe;
    margin-top: 8px;
    padding-top: 10px;
}

#hacktsu-app .try-suggestion-note {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 3px;
}

#hacktsu-app .try-more-btn {
    margin-top: 8px;
}

#hacktsu-app .try-tag-btn.is-suggested {
    border-style: dashed !important;
    border-color: #94a3b8 !important;
}

#hacktsu-app .try-rewards-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #7dd3fc;
}

#hacktsu-app .try-rewards-label {
    font-size: 0.85rem;
    color: #0369a1;
    margin-bottom: 8px;
}

#hacktsu-app .try-rewards-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#hacktsu-app .try-reward {
    font-size: 1.5rem;
}

#hacktsu-app .try-reward-empty {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

/* ── 記録入力パネル（モバイル: BottomSheet / PC: SidePanel） ── */
#hacktsu-app .try-record-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1099;
    opacity: 0;
    transition: opacity .3s ease;
}

#hacktsu-app .try-record-overlay.is-open {
    display: block;
    opacity: 1;
}

#hacktsu-app .try-record-panel {
    position: fixed;
    z-index: 1100;
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
    overflow-y: auto;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    /* モバイル: BottomSheet */
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
}

#hacktsu-app .try-record-panel.is-open {
    transform: translateY(0);
}

#hacktsu-app .try-record-panel-inner {
    padding: 20px 16px 28px;
}

#hacktsu-app .try-record-panel-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 8px auto 0;
}

#hacktsu-app .try-record-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 4px;
}

/* パネル内部の展開カードスタイルを再利用 */
#hacktsu-app .try-record-panel .try-expanded-card {
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    background: transparent;
}

/* PC: SidePanel */
@media (min-width: 1024px) {
    #hacktsu-app .try-record-overlay.is-open {
        background: rgba(0, 0, 0, .18);
    }

    #hacktsu-app .try-record-panel {
        left: auto;
        right: 0;
        top: 0;
        bottom: 0;
        max-height: none;
        width: 420px;
        border-radius: 16px 0 0 16px;
        transform: translateX(100%);
        box-shadow: -4px 0 24px rgba(0, 0, 0, .10);
    }

    #hacktsu-app .try-record-panel.is-open {
        transform: translateX(0);
    }

    #hacktsu-app .try-record-panel-handle {
        display: none;
    }

    #hacktsu-app .try-record-panel-inner {
        padding: 28px 24px 32px;
    }
}

/* 旧UIスタイルは維持（互換性） */
#hacktsu-app .cycle-intro-card {
    border: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    margin-bottom: 18px;
    padding: 1.25rem;
    border-radius: 12px;
}

#hacktsu-app .cycle-intro-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}

#hacktsu-app .cycle-intro-sub {
    margin-top: 6px;
    font-size: 0.88rem;
    color: #64748b;
}

#hacktsu-app .cycle-intro-steps {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

#hacktsu-app .cycle-intro-step {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}

#hacktsu-app .cycle-intro-icon {
    font-size: 1.2rem;
}

#hacktsu-app .cycle-intro-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

#hacktsu-app .cycle-intro-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
}

#hacktsu-app .cycle-intro-benefits {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

#hacktsu-app .cycle-intro-benefit {
    font-size: 0.85rem;
    color: #334155;
}

#hacktsu-app .cycle-spiral-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    margin-bottom: 18px;
    padding: 1.25rem;
    border-radius: 12px;
}

#hacktsu-app .cycle-spiral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

#hacktsu-app .cycle-spiral-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
}

#hacktsu-app .cycle-spiral-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

#hacktsu-app .cycle-spiral-visual {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#hacktsu-app .cycle-spiral-node {
    border: 2px solid #c7d2fe;
    background: #ffffff;
    border-radius: 18px;
    padding: 10px 12px;
    width: 110px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#hacktsu-app .cycle-spiral-node::after {
    content: "";
    position: absolute;
    right: -14px;
    top: 50%;
    width: 14px;
    height: 2px;
    background: #e5e7eb;
}

#hacktsu-app .cycle-spiral-node.is-last::after {
    display: none;
}

#hacktsu-app .cycle-spiral-node.is-active {
    border-color: #6366f1;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

#hacktsu-app .cycle-spiral-node.is-completed {
    background: #eef2ff;
}

#hacktsu-app .cycle-spiral-node-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4338ca;
}

#hacktsu-app .cycle-spiral-node-dots {
    display: flex;
    gap: 4px;
}

#hacktsu-app .cycle-spiral-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
}

#hacktsu-app .cycle-spiral-dot.is-active {
    background: #60a5fa;
}

#hacktsu-app .cycle-spiral-dot.is-completed {
    background: #22c55e;
}

#hacktsu-app .cycle-spiral-current {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

#hacktsu-app .cycle-spiral-current-title {
    font-weight: 700;
    color: #1f2937;
}

#hacktsu-app .cycle-spiral-current-phase {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4338ca;
}

#hacktsu-app .cycle-spiral-current-hypothesis {
    font-size: 0.9rem;
    color: #475569;
    background: #ffffff;
    border: 1px dashed #cbd5f5;
    padding: 8px 10px;
    border-radius: 8px;
}

#hacktsu-app .cycle-spiral-phases {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

#hacktsu-app .cycle-spiral-phase {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 8px 10px;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    text-align: left;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#hacktsu-app .cycle-spiral-phase.is-active {
    border-color: #6366f1;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}

#hacktsu-app .cycle-spiral-phase-icon {
    font-size: 1rem;
}

#hacktsu-app .cycle-spiral-phase-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

#hacktsu-app .cycle-spiral-phase-status {
    font-size: 0.75rem;
    color: #64748b;
}

.cycle-doc-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    margin-top: 18px;
    padding: 1.25rem;
    border-radius: 8px;
}

.cycle-doc-header {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.cycle-doc-intro {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cycle-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cycle-doc-block {
    margin-top: 1.5rem;
}

.cycle-doc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cycle-doc-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.cycle-doc-block textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    resize: vertical;
    background: #fafafa;
    line-height: 1.7;
}

.spiral-step {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.spiral-line {
    width: 24px;
    height: 2px;
    background: #c7d2fe;
}

.spiral-label {
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 700;
    margin-left: 8px;
}

.db-row {
    display: flex;
    margin-bottom: 8px;
    font-size: .9rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px
}

.db-lbl {
    font-weight: 700;
    width: 110px;
    flex-shrink: 0;
    color: #666
}

.db-val {
    flex: 1;
    white-space: pre-wrap
}

.db-box {
    background: var(--w);
    border: 1px solid var(--card-accent);
    padding: 12px;
    border-radius: var(--radius-soft);
    font-size: .9rem;
    margin-bottom: 10px
}

.edit-actions {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid var(--c-blue);
    box-shadow: var(--shadow-blue);
    z-index: 1200
}

@media (max-width: 600px) {
    .edit-actions {
        width: calc(100% - 24px);
        justify-content: center;
        padding: 10px 12px
    }
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    background: var(--w);
    color: var(--card-accent);
    border: 1px solid var(--card-accent)
}

.bg-blue {
    background: var(--w);
    color: var(--card-accent);
    border-color: var(--card-accent)
}

.bg-red {
    background: var(--w);
    color: var(--card-accent);
    border-color: var(--card-accent)
}

.bg-green {
    background: var(--w);
    color: var(--card-accent);
    border-color: var(--card-accent)
}

.plan-meta {
    background: var(--w);
    padding: 8px;
    border-radius: 6px;
    font-size: .85rem;
    margin-bottom: 10px;
    border: 1px solid var(--card-accent)
}

/* Milestone & Filter Styles */
.ms-card {
    --card-accent: var(--c-blue);
    --card-shadow: var(--shadow-blue);
    background: var(--w);
    border: 2px solid var(--card-accent);
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow)
}

.ideal-self-block {
    background: var(--w);
    border: 1px solid var(--card-accent);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow)
}

.ideal-self-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--card-accent);
    letter-spacing: 0.12em;
    margin-bottom: 6px
}

.ideal-self-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b)
}

.next-goal {
    text-align: center;
    padding: 10px;
    background: var(--w);
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-accent)
}

.ng-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--card-accent);
    letter-spacing: 0.1em;
    margin-bottom: 5px
}

.ideal-self-label {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 8px
}

.ng-content {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b)
}

.next-step-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: var(--b)
}

.next-step-select label {
    font-weight: 700
}

.ms-list {
    position: relative;
    padding-left: 20px;
    border-left: 2px dashed var(--card-accent);
    margin-left: 10px
}

.ms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.ms-header-actions {
    display: flex;
    align-items: center;
    gap: 8px
}

.ms-collapse-btn {
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    color: var(--b);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    transition: background .2s, border-color .2s
}

.ms-collapse-btn:hover {
    background: #fff5f6;
    border-color: rgba(232, 52, 71, 0.35)
}

.ms-edit-btn {
    border: none;
    background: transparent;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .2s
}

.ms-edit-btn:hover {
    background: rgba(0, 0, 0, 0.05)
}

.ms-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px
}

.short-plan-card {
    --card-accent: var(--c-red);
    --card-shadow: var(--shadow-red);
    border: 2px solid var(--card-accent);
    background: var(--w);
    display: none
}

.goal-pill {
    display: inline-block;
    background: var(--w);
    color: var(--card-accent);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--card-accent)
}

.short-plan-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--b);
    text-align: center;
    padding: 10px 5px
}

.short-plan-note {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    border-top: 1px dashed var(--card-accent);
    padding-top: 8px
}

.ideal-longterm {
    margin: 10px 6px 0;
    background: var(--w);
    border: 1px dashed var(--card-accent);
    border-radius: var(--radius-soft);
    padding: 8px 12px;
    color: var(--b)
}

.ideal-longterm summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--card-accent)
}

.ideal-longterm ul {
    margin: 8px 0 0 18px;
    padding: 0;
    font-size: 0.9rem
}

.ideal-longterm li {
    margin-bottom: 6px
}

.ai-eval-card {
    --card-accent: var(--c-green);
    --card-shadow: var(--shadow-green);
    border: 2px solid var(--card-accent);
    background: var(--w)
}

.ai-eval-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px
}

.ai-eval-title {
    font-weight: 800;
    font-size: 1rem
}

.ai-eval-status {
    font-size: 0.85rem;
    color: #777
}

.ai-eval-btn.is-loading {
    position: relative
}

.ai-eval-btn.is-blank {
    color: transparent;
    background: #e5e5e5;
    border-color: #e0e0e0;
    cursor: default;
    pointer-events: none
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--w);
    animation: spin 0.8s linear infinite;
    display: inline-block
}

.ms-dot {
    position: absolute;
    left: -26px;
    top: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--card-accent)
}

.ms-item.done .ms-dot {
    background: var(--card-accent);
    box-shadow: 0 0 0 2px var(--card-accent)
}

.ms-date {
    font-size: 0.75rem;
    color: #999;
    font-weight: 700;
    margin-bottom: 2px
}

.ms-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4
}

.ms-item.done .ms-title {
    color: #999;
    text-decoration: line-through
}

.hanamaru {
    position: absolute;
    top: -10px;
    right: 0;
    font-size: 2rem;
    opacity: 0.8;
    transform: rotate(-15deg);
    pointer-events: none
}

.ms-item.done {
    opacity: 0.7
}

.ms-edit-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: rgba(0, 0, 0, 0);
    transition: bottom .3s ease;
    z-index: 1000;
    pointer-events: none;
    --card-accent: var(--c-blue);
    --card-shadow: var(--shadow-blue)
}

.ms-edit-panel.is-open {
    bottom: 0;
    background: rgba(2, 133, 201, 0.2);
    pointer-events: auto
}

.ms-edit-inner {
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    box-shadow: var(--shadow-blue);
    max-height: 70vh;
    overflow-y: auto
}

.ms-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    margin-bottom: 12px
}

.ms-edit-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer
}

.ms-edit-body {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.ms-edit-row {
    border: 1px solid var(--card-accent);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.ms-edit-row input[type="text"],
.ms-edit-row input[type="date"],
.ms-edit-row textarea {
    width: 100%;
    border: 1px solid var(--card-accent);
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
    font-size: 0.9rem
}

.ms-edit-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.85rem
}

.ms-edit-add {
    border: 1px dashed var(--card-accent);
    background: var(--w);
    padding: 8px;
    border-radius: 10px;
    font-weight: 700;
    margin: 12px 0;
    width: 100%;
    cursor: pointer
}

.ms-edit-actions {
    display: flex;
    gap: 10px
}

/* Accordion for Evidence */
.ms-acc {
    margin-top: 5px;
    width: 100%
}

.ms-sum {
    cursor: pointer;
    color: var(--card-accent);
    background: var(--w);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--card-accent);
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.2s;
    list-style: none
}

.ms-sum::-webkit-details-marker {
    display: none
}

.ms-sum:hover {
    background: var(--w);
    border-color: var(--card-accent)
}

.ms-sum::before {
    content: "▶ ";
    font-size: 0.6rem;
    color: #999;
    margin-right: 4px
}

.ms-acc[open] .ms-sum::before {
    content: "▼ "
}

.ms-ev {
    background: var(--w);
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--card-accent);
    margin-top: 8px;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.5;
    white-space: pre-wrap
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
    background: var(--w);
    padding: 10px;
    border-radius: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--c-yellow);
    box-shadow: var(--shadow-yellow)
}

.filter-date {
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 6px;
    font-family: inherit
}

.filter-types {
    display: flex;
    gap: 10px
}

.ft-lbl {
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer
}

/* Data Mgmt & Demo Style */
.file-box {
    display: block;
    border: 2px dashed var(--card-accent);
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin: 0 auto 20px;
    cursor: pointer;
    background: var(--w);
    transition: all .2s
}

.file-box:hover {
    border-color: var(--card-accent);
    background: var(--w);
    transform: scale(1.01)
}

.file-ico {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px
}

.text-demo * {
    color: #999 !important;
    border-color: #ccc !important;
}

.text-demo .db-h {
    background: #f5f5f5 !important;
    border-left-color: #bbb !important;
}

.text-demo .badge {
    background: #eee !important;
    color: #aaa !important;
}

.text-demo .hanamaru {
    filter: grayscale(100%);
    opacity: 0.5;
}

/* Hint Box & Select */
.hint-box {
    background: var(--w);
    border: 1px solid var(--card-accent);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--b);
    animation: f 0.5s
}

.hint-icon {
    font-size: 1.2rem
}

.ms-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: var(--radius-soft);
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: #333
}

/* === Editing Mode === */
.hacktsu-db-editing #hacktsu-app #main-header {
    display: none;
}

@media print {

    .nav,
    .btn-p,
    .filter-box,
    .file-box {
        display: none !important
    }

    body {
        padding: 0
    }

    .card {
        box-shadow: none;
        border: none
    }
}

/* === AI CHAT TAB === */
.chat-link-card {
    --card-accent: var(--c-blue);
    --card-shadow: var(--shadow-blue);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-link-title {
    font-size: 1rem;
    font-weight: 800;
}

.chat-link-desc {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.chat-link-button {
    align-self: flex-start;
}

.chat-link-result {
    font-size: 0.9rem;
    line-height: 1.6;
}

.chat-card-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.chat-card {
    --card-accent: var(--c-blue);
    --card-shadow: var(--shadow-blue);
}

#hacktsu-app #chat-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    height: var(--chat-height, 60vh);
    min-height: 0;
    max-height: none;
    border-radius: 12px;
}

.home-empty {
    --card-accent: var(--c-red);
    --card-shadow: var(--shadow-red);
}

#ai-latest-card {
    --card-accent: var(--c-green);
    --card-shadow: var(--shadow-green);
}

/* === Bottom Nav for Mobile/Tablet === */
@media (max-width: 1023px) {
    body {
        padding-bottom: 90px;
    }

    #hacktsu-app .container {
        padding-bottom: 110px;
    }

    .tab-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        box-shadow: var(--shadow-blue);
        border-top: 1px solid #eee;
    }

    .tab-item {
        border-bottom: 0;
        border-top: 3px solid transparent;
        padding: 10px 0 8px;
    }

    .tab-item.active {
        border-bottom-color: transparent;
        border-top-color: var(--y);
    }
}

@media (min-width: 1024px) {
    #hacktsu-app {
        display: flex;
        min-height: 100vh;
        align-items: stretch
    }

    #hacktsu-app #main-header {
        position: sticky;
        top: 0;
        height: 100vh;
        flex: 0 0 260px;
        width: 260px;
        border-right: 2px solid var(--c-yellow);
        box-shadow: var(--shadow-yellow);
        align-self: flex-start
    }

    /* デスクトップ時: header-top はコンテンツ上部に移動済みのため非表示 */
    #hacktsu-app #main-header .header-top {
        display: none;
    }

    #hacktsu-app .tab-nav {
        flex-direction: column;
        padding: 24px 16px;
        gap: 8px
    }

    #hacktsu-app .tab-item {
        flex: 0 0 auto;
        text-align: left;
        justify-content: flex-start;
        display: flex;
        gap: 10px;
        border-bottom: 0;
        border-left: 4px solid transparent;
        border-radius: 14px;
        padding: 12px 14px
    }

    #hacktsu-app .tab-item.active {
        border-left-color: var(--y);
        background: var(--w);
        box-shadow: var(--shadow-yellow)
    }

    #hacktsu-app .tab-icon {
        display: inline-block;
        margin: 0
    }
}

/* === Cocoon Header/Footer Hide on App Page === */
.hacktsu-app-page #header-container,
.hacktsu-app-page .header-container,
.hacktsu-app-page #footer,
.hacktsu-app-page .footer,
.hacktsu-app-page .mobile-menu-buttons,
.hacktsu-app-page #go-to-top {
    display: none !important;
}

/* === Cocoon Layout Reset for App Page === */
.hacktsu-app-page #content,
.hacktsu-app-page #main,
.hacktsu-app-page .main,
.hacktsu-app-page .content,
.hacktsu-app-page .content-in,
.hacktsu-app-page .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hacktsu-app-page #sidebar,
.hacktsu-app-page .sidebar {
    display: none !important;
}

.hacktsu-app-page #hacktsu-app {
    width: 100%;
    margin: 0 auto;
}

/* === Desktop Responsive Enhancements (≥1024px) === */

/* Content header bar — ロールバッジ・児童セレクトのデスクトップ配置 */
.content-header-bar {
    display: none;
}

@media (min-width: 1024px) {
    .content-header-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        margin-bottom: 8px;
        border-bottom: 1px solid #e5e7eb;
    }

    .content-header-bar .header-actions {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .content-header-bar .header-points-hud {
        gap: 8px;
    }

    .content-header-bar .points-hud-main-btn {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .content-header-bar .points-hud-buy-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .content-header-bar .header-user-select {
        min-width: 200px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .content-header-bar .role-badge-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    /* ボタンのデスクトップ適応 */
    #hacktsu-app .btn {
        width: auto;
        min-width: 180px;
        max-width: 400px;
    }

    /* フルワイドを維持すべきボタン */
    #hacktsu-app .ai-confirm-actions .btn,
    #hacktsu-app .upgrade-cta-btn,
    #hacktsu-app .upgrade-close-btn,
    #hacktsu-app .db-danger-zone-btn {
        width: 100%;
        max-width: none;
    }

    /* フォーム入力のデスクトップ幅制限 */
    #hacktsu-app input[type="text"],
    #hacktsu-app input[type="email"],
    #hacktsu-app input[type="number"],
    #hacktsu-app input[type="url"],
    #hacktsu-app input[type="tel"],
    #hacktsu-app select {
        max-width: 680px;
    }

    /* edit-actions のサイドバーオフセット */
    .edit-actions {
        left: calc(50% + 130px);
    }

    /* トースト通知のサイドバーオフセット */
    .toast {
        left: calc(50% + 130px);
    }

    /* ロール・アップグレードモーダル — PC向け拡張 */
    .role-info-modal {
        padding: 28px 32px;
    }

    .role-info-modal .role-info-facility-id-wrapper {
        gap: 12px;
    }

    .role-info-modal .role-info-list {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
    }

    .role-info-modal .role-info-perms-section {
        text-align: left;
    }

    /* アップグレードモーダル — PC向け拡張 */
    .upgrade-modal {
        width: min(760px, 90vw);
        padding: 28px;
    }

    .upgrade-plan-card {
        padding: 18px 14px;
    }

    .upgrade-plan-features {
        font-size: 0.85rem;
    }
}

/* ── サイクルタブ デスクトップ2カラム ── */
@media (min-width: 1024px) {
    #hacktsu-app .cycle-desktop-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }

    #hacktsu-app .cycle-desktop-col-main,
    #hacktsu-app .cycle-desktop-col-side {
        min-width: 0;
    }
}

/* モバイルでは1カラム（grid未適用のまま） */

/* ── DBプロフィール デスクトップ2カラム ── */
@media (min-width: 1024px) {
    #hacktsu-app .db-desktop-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }

    #hacktsu-app .db-desktop-col-left,
    #hacktsu-app .db-desktop-col-right {
        min-width: 0;
    }
}

/* === Cycle Tab === */

/* Cycle Wizard Stepper */
#hacktsu-app .cycle-wizard-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

#hacktsu-app .cycle-wizard-step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#hacktsu-app .cycle-wizard-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eee;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #999;
    transition: all 0.2s ease;
}

#hacktsu-app .cycle-wizard-step-item.active .cycle-wizard-step-number {
    background: var(--c-blue);
    border-color: var(--c-blue);
    color: #fff;
    transform: scale(1.1);
}

#hacktsu-app .cycle-wizard-step-item.completed .cycle-wizard-step-number {
    background: var(--c-green);
    border-color: var(--c-green);
    color: #fff;
}

#hacktsu-app .cycle-wizard-step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-align: center;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hacktsu-app .cycle-wizard-step-item.active .cycle-wizard-step-label {
    color: var(--c-blue);
    font-weight: 900;
}

#hacktsu-app .cycle-wizard-step-item.completed .cycle-wizard-step-label {
    color: var(--c-green);
}

/* Wizard Step Container */
#hacktsu-app .cycle-wizard-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#hacktsu-app .cycle-wizard-step-content {
    display: none;
    animation: fadeInWizard 0.3s ease;
}

#hacktsu-app .cycle-wizard-step-content.active {
    display: block;
}

@keyframes fadeInWizard {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wizard Step Card */
#hacktsu-app .cycle-wizard-step-card {
    background: #fff;
    border: 2px solid var(--c-blue);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-blue);
}

#hacktsu-app .cycle-wizard-question {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b);
    margin-bottom: 16px;
    line-height: 1.5;
}

#hacktsu-app .cycle-wizard-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius-soft);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    margin-bottom: 16px;
    box-sizing: border-box;
    font-weight: 700;
}

#hacktsu-app .cycle-wizard-input:focus {
    border-color: var(--c-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 133, 201, 0.1);
}

#hacktsu-app .cycle-wizard-action-list,
#hacktsu-app .cycle-wizard-choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

#hacktsu-app .cycle-wizard-action-btn,
#hacktsu-app .cycle-wizard-choice-btn,
#hacktsu-app .cycle-wizard-status-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #d7e6f3;
    background: #fff;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hacktsu-app .cycle-wizard-action-btn:hover:not(:disabled),
#hacktsu-app .cycle-wizard-choice-btn:hover:not(:disabled),
#hacktsu-app .cycle-wizard-status-btn:hover:not(:disabled) {
    border-color: var(--c-blue);
    box-shadow: 0 6px 16px rgba(2, 133, 201, 0.12);
    transform: translateY(-1px);
}

#hacktsu-app .cycle-wizard-action-btn.is-selected,
#hacktsu-app .cycle-wizard-choice-btn.is-selected,
#hacktsu-app .cycle-wizard-status-btn.is-selected {
    border-color: var(--c-blue);
    background: #eef7ff;
    color: var(--b);
}

#hacktsu-app .cycle-wizard-status-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

#hacktsu-app .cycle-wizard-memo {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7e6f3;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 12px;
    resize: vertical;
}

#hacktsu-app .cycle-wizard-memo:focus {
    outline: none;
    border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(2, 133, 201, 0.1);
}

#hacktsu-app .cycle-wizard-action-note {
    font-size: 0.85rem;
    color: #666;
}

/* AI Proposal Display */
#hacktsu-app .cycle-wizard-ai-proposal {
    background: #f0f5ff;
    border: 2px dashed var(--c-blue);
    border-radius: var(--radius-soft);
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}

#hacktsu-app .cycle-wizard-ai-proposal.show {
    display: block;
    animation: slideInProposal 0.3s ease;
}

@keyframes slideInProposal {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 16px;
    }

    to {
        opacity: 1;
        max-height: 500px;
        padding: 16px;
    }
}

#hacktsu-app .cycle-wizard-ai-proposal-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--c-blue);
    margin-bottom: 10px;
}

#hacktsu-app .cycle-wizard-ai-proposal-content {
    font-size: 0.95rem;
    color: var(--b);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Wizard Navigation */
#hacktsu-app .cycle-wizard-nav {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

#hacktsu-app .cycle-wizard-nav-prev {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--c-blue);
    background: #fff;
    color: var(--c-blue);
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hacktsu-app .cycle-wizard-nav-prev:hover:not(:disabled) {
    background: #f0f5ff;
}

#hacktsu-app .cycle-wizard-nav-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#hacktsu-app .cycle-wizard-nav-next {
    flex: 1;
    padding: 14px;
    border: none;
    background: var(--c-blue);
    color: #fff;
    border-radius: 50px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hacktsu-app .cycle-wizard-nav-next:hover:not(:disabled) {
    background: #0275aa;
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

#hacktsu-app .cycle-wizard-nav-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#hacktsu-app .cycle-empty {
    text-align: center;
    color: #777;
    font-weight: 700;
}

#hacktsu-app .cycle-nav-card {
    --card-accent: var(--c-yellow);
    --card-shadow: var(--shadow-yellow);
}

#hacktsu-app .cycle-nav-title {
    font-weight: 800;
    letter-spacing: 0.16em;
    text-align: center;
    color: var(--b);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

#hacktsu-app .cycle-phase-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

#hacktsu-app .cycle-phase-btn {
    flex: 1;
    height: 44px;
    border-radius: 14px;
    border: 2px solid #eee;
    background: var(--w);
    font-weight: 800;
    color: #888;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}

#hacktsu-app .cycle-phase-btn.active {
    background: var(--c-blue);
    border-color: var(--c-blue);
    color: #fff;
    box-shadow: var(--shadow-blue);
    transform: translateY(-2px);
}

#hacktsu-app .cycle-phase-label {
    margin-top: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
}

#hacktsu-app .cycle-card {
    --card-accent: var(--c-blue);
    --card-shadow: var(--shadow-blue);
}

#hacktsu-app .cycle-section-title {
    font-weight: 800;
    border-left: 4px solid var(--card-accent);
    padding-left: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

#hacktsu-app .cycle-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    font-size: 0.85rem;
}

#hacktsu-app .cycle-profile-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px;
    font-weight: 700;
}

#hacktsu-app .cycle-profile-item span {
    display: block;
    font-size: 0.7rem;
    color: #777;
    margin-bottom: 6px;
}

#hacktsu-app .cycle-suggestion {
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow-yellow);
}

#hacktsu-app .cycle-suggestion+.cycle-suggestion {
    margin-top: 12px;
}

#hacktsu-app .cycle-suggestion-title {
    font-weight: 800;
    margin-bottom: 6px;
}

#hacktsu-app .cycle-suggestion-rationale {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

#hacktsu-app .cycle-suggestion-steps {
    margin: 0 0 10px 18px;
    padding: 0;
    font-size: 0.8rem;
    color: #555;
}

#hacktsu-app .cycle-milestones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#hacktsu-app .cycle-milestone {
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

#hacktsu-app .cycle-milestone[data-cycle-toggle="1"] {
    cursor: pointer;
}

#hacktsu-app .cycle-milestone-next {
    border-color: var(--c-yellow);
    box-shadow: var(--shadow-yellow);
}

#hacktsu-app .cycle-milestone.done {
    opacity: 0.6;
    text-decoration: line-through;
}

#hacktsu-app .cycle-milestone-dot {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #eee;
    border: 2px solid #ddd;
    margin-top: 2px;
    flex-shrink: 0;
}

#hacktsu-app .cycle-milestone-title {
    font-weight: 800;
    font-size: 0.9rem;
}

#hacktsu-app .cycle-milestone-date {
    font-size: 0.75rem;
    color: #777;
    margin-top: 4px;
}

#hacktsu-app .cycle-milestone.done .cycle-milestone-dot {
    background: var(--c-blue);
    border-color: var(--c-blue);
}

#hacktsu-app .cycle-mood-grid {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

#hacktsu-app .cycle-mood-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 14px;
    border: 2px solid #eee;
    background: #f7f7f7;
    font-weight: 800;
    color: #777;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

#hacktsu-app .cycle-mood-btn.active {
    background: var(--c-yellow);
    border-color: var(--c-yellow);
    color: var(--b);
    transform: translateY(2px);
}

#hacktsu-app .cycle-log {
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

#hacktsu-app .cycle-log+.cycle-log {
    margin-top: 10px;
}

#hacktsu-app .cycle-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 6px;
    font-weight: 700;
}

#hacktsu-app .cycle-log-mood {
    display: inline-flex;
    gap: 3px;
}

#hacktsu-app .cycle-log-mood span {
    width: 6px;
    height: 6px;
    background: var(--c-yellow);
    border-radius: 2px;
    display: inline-block;
}

#hacktsu-app .cycle-range {
    width: 100%;
    margin: 6px 0 8px;
}

#hacktsu-app .cycle-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #777;
    font-weight: 700;
}

/* --- New AI Chat UI Styles --- */

/* Overall chat container for layout */
.hacktsu-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Adjust as needed, e.g., 80vh for full height */
    max-width: 800px;
    /* Limit chat width */
    margin: 0 auto;
    /* Center the chat */
    background-color: #f7f9fc;
    /* Light background for chat area */
    border-radius: var(--radius-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Chat Welcome/Onboarding Area */
.chat-welcome {
    background: linear-gradient(135deg, var(--c-blue), #66aaff);
    /* Gentle blue gradient */
    color: var(--w);
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.1);
}

.chat-welcome-avatar {
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1;
}

.chat-welcome h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--c-blue);
}

.chat-welcome p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.chat-example-prompts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.chat-example-prompts button {
    background: rgba(255, 255, 255, 0.2);
    color: var(--w);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-weight: 600;
}

.chat-example-prompts button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--w);
}

/* Chat Messages Display Area */
.hacktsu-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Chat Message Bubble (Base) */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
}

.chat-message.user {
    margin-left: auto;
    flex-direction: row-reverse;
    /* User message on right */
}

.chat-message.ai {
    margin-right: auto;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message.user .chat-avatar {
    background-color: var(--c-blue);
    /* User avatar color */
    color: var(--w);
}

.chat-message.ai .chat-avatar {
    background-color: var(--c-green);
    /* AI avatar color */
    color: var(--w);
}

.chat-bubble {
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.6;
    font-size: 1rem;
    word-wrap: break-word;
    white-space: pre-wrap;
    /* Preserve line breaks */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-message.user .chat-bubble {
    background-color: var(--c-blue);
    /* User bubble color */
    color: var(--w);
    border-bottom-right-radius: 4px;
    /* Pointy edge for user */
}

.chat-message.ai .chat-bubble {
    background-color: var(--w);
    /* AI bubble color */
    color: var(--b);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    /* Pointy edge for AI */
}

/* Thinking Indicator */
.chat-thinking-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.dot-flashing {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    color: #999;
    animation: dotFlashing 1s infinite linear alternate;
    animation-delay: 0.5s;
}

.dot-flashing::before,
.dot-flashing::after {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
    left: -12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    color: #999;
    animation: dotFlashing 1s infinite linear alternate;
}

.dot-flashing::before {
    animation-delay: 0s;
}

.dot-flashing::after {
    left: 12px;
    animation-delay: 1s;
}

@keyframes dotFlashing {
    0% {
        background-color: #999;
    }

    50%,
    100% {
        background-color: #eee;
    }
}

/* Chat Input Area */
.hacktsu-chat-input-area {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background-color: var(--w);
    gap: 10px;
    align-items: flex-end;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

#hacktsu-chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    /* Limit input height */
    overflow-y: auto;
    margin-top: 0;
    /* Override default textarea margin */
}

#hacktsu-chat-input:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 2px rgba(2, 133, 201, 0.2);
    outline: none;
}

#hacktsu-chat-send-btn {
    background-color: var(--c-blue);
    color: var(--w);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    padding: 0;
}

#hacktsu-chat-send-btn svg {
    width: 24px;
    height: 24px;
}

#hacktsu-chat-send-btn:hover {
    background-color: #026bb4;
}

#hacktsu-chat-send-btn:active {
    transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-welcome h2 {
        font-size: 1.5rem;
    }

    .chat-welcome p {
        font-size: 0.9rem;
    }

    .chat-example-prompts button {
        font-size: 0.85rem;
        padding: 8px 15px;
    }

    .hacktsu-chat-input-area {
        padding: 10px 15px;
    }

    #hacktsu-chat-input {
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    #hacktsu-chat-send-btn {
        width: 40px;
        height: 40px;
    }

    .chat-message {
        max-width: 90%;
    }
}

/* === CHAT QUOTA BAR === */
.chat-quota-bar {
    margin: 0 16px 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
}

.chat-quota-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.chat-quota-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e40af;
}

.chat-quota-text {
    font-size: 0.82rem;
    color: #374151;
    font-weight: 500;
}

.chat-quota-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.quota-dot {
    font-size: 1.1rem;
    line-height: 1;
}

.quota-dot.used {
    color: #3b82f6;
}

.quota-dot.available {
    color: #d1d5db;
}

.chat-quota-line-hint {
    font-size: 0.82rem;
    color: #15803d;
    background: #f0fdf4;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 4px;
}

.chat-quota-line-linked {
    font-size: 0.82rem;
    color: #166534;
    background: #f0fdf4;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .chat-quota-bar {
        margin: 0 10px 8px;
        padding: 10px 12px;
    }

    .chat-quota-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* === DISCLAIMER MODAL === */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disclaimer-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.disclaimer-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: disclaimerSlideIn 0.3s ease-out;
}

@keyframes disclaimerSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.disclaimer-modal-icon {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 8px;
}

.disclaimer-modal-content h3 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 18px;
    color: #1f2937;
}

.disclaimer-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.disclaimer-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #e5e7eb;
}

.disclaimer-item-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-item strong {
    display: block;
    font-size: 0.92rem;
    color: #111827;
    margin-bottom: 4px;
}

.disclaimer-item p {
    font-size: 0.84rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.disclaimer-accept-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
}

/* 免責フッター（チャットエリア下部に常時表示） */
.chat-disclaimer-footer {
    padding: 8px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.chat-disclaimer-footer p {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.disclaimer-detail-link {
    background: none;
    border: none;
    color: var(--c-blue);
    cursor: pointer;
    font-size: 0.78rem;
    text-decoration: underline;
    padding: 0;
    margin-left: 4px;
}

/* === HOME consent settings === */
.home-research-consent-banner {
    margin-bottom: 12px;
    border: 1px solid #fcd34d;
    background: linear-gradient(135deg, #fffbeb 0%, #fff7d6 100%);
}

.research-banner-title {
    font-weight: 800;
    color: #92400e;
    margin-bottom: 6px;
}

.research-banner-desc {
    color: #6b4f1f;
    font-size: 0.9rem;
    line-height: 1.6;
}

.research-banner-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.home-consent-settings-card {
    margin-bottom: 12px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
}

.consent-settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.consent-settings-title {
    font-weight: 800;
    color: #1f2937;
}

.consent-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.consent-settings-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
}

.consent-settings-label {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.consent-settings-value {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.consent-settings-meta {
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .consent-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* === LINE連携セクション === */
.line-link-section {
    padding: 0 16px 8px;
}

.line-link-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.line-link-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.line-link-qr {
    flex-shrink: 0;
}

.line-link-qr img {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.line-link-info {
    flex: 1;
    min-width: 0;
}

.line-link-lead {
    font-size: 0.92rem;
    color: #1f2937;
    line-height: 1.6;
    margin: 0 0 8px;
}

.line-link-id {
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0 0 4px;
}

.line-link-url {
    font-size: 0.85rem;
    color: #06c755;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.line-link-url:hover {
    text-decoration: underline;
}

.line-link-howto {
    margin: 10px 0;
    background: #f0fdf4;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #bbf7d0;
}

.line-link-howto summary {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #166534;
    cursor: pointer;
    list-style: none;
}

.line-link-howto summary::before {
    content: '▸ ';
}

.line-link-howto[open] summary::before {
    content: '▾ ';
}

.line-link-howto ol {
    padding: 0 14px 12px 32px;
    margin: 0;
    font-size: 0.84rem;
    color: #15803d;
    line-height: 1.6;
}

.line-link-howto ol li {
    margin-bottom: 4px;
}

.line-link-actions {
    text-align: center;
    margin: 12px 0 8px;
}

.btn-line {
    background: #06c755;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-line:hover {
    background: #05a847;
}

.btn-line:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.line-link-result {
    margin-top: 8px;
    text-align: center;
}

.line-link-result .link-code-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 2px solid #06c755;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 8px 0;
}

.line-link-result .link-code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 800;
    color: #166534;
    letter-spacing: 0.15em;
}

.line-link-result .copy-code-btn {
    background: #06c755;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.line-link-result .copy-code-btn:hover {
    background: #05a847;
}

.line-link-result .link-code-hint {
    font-size: 0.82rem;
    color: #4b5563;
    margin-top: 6px;
    line-height: 1.5;
}

/* 連携済みバッジ */
.line-linked-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.88rem;
    color: #166534;
    font-weight: 600;
}

.line-linked-icon {
    font-size: 1.2rem;
}

.btn-xs {
    font-size: 0.75rem;
    padding: 3px 8px;
    margin-left: auto;
}

/* LINE未連携時のプロモバナー */
.line-promo-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 8px 16px 0;
    font-size: 0.82rem;
    color: #1e40af;
}

/* LINE連携カード折りたたみ（連携済み時） */
.line-link-card.linked {
    padding: 12px 14px;
}

.line-link-card.linked .line-link-header,
.line-link-card.linked .line-link-howto,
.line-link-card.linked .line-link-actions,
.line-link-card.linked .line-link-result {
    display: none;
}

/* モバイル最適化 */
@media (max-width: 480px) {
    .line-link-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .line-link-qr img {
        width: 100px;
        height: 100px;
    }

    .disclaimer-modal-content {
        padding: 20px 16px 18px;
        margin: 10px;
    }

    .disclaimer-item {
        padding: 10px;
    }

    .chat-example-prompts {
        padding: 8px 12px;
    }
}

/* チャットプロンプトUIの改善（ウェルカム外に移動対応） */
.hacktsu-chat-container>.chat-example-prompts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f7f9fc;
}

.hacktsu-chat-container>.chat-example-prompts button {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.hacktsu-chat-container>.chat-example-prompts button:hover {
    background: #eff6ff;
    border-color: var(--c-blue);
    color: var(--c-blue);
}

/* ウェルカムセクションのコンパクト化 */
.chat-welcome {
    padding: 20px 16px 14px;
}

.chat-welcome-avatar {
    font-size: 2.5rem;
    margin-bottom: 6px;
}

.chat-welcome p {
    margin: 0 auto 8px;
    font-size: 0.92rem;
}


.db-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.db-row:last-child {
    border-bottom: none;
}

.db-row input[type="text"],
.db-row input[type="date"],
.db-row textarea {
    padding: 8px 12px;
    border: 1px solid var(--c-blue);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.95rem;
}

.db-row textarea {
    resize: vertical;
    min-height: 60px;
}

.db-row .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-p {
    background: var(--c-blue);
    color: white;
}

.btn-p:hover {
    background: #0266a0;
    opacity: 0.9;
}

.btn-l {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-l:hover {
    background: #d1d5db;
}

/* Edit button (pencil icon) */
.db-val button[onclick*="startInlineEdit"] {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 2px 6px;
    font-size: 1.2rem;
}

.db-val button[onclick*="startInlineEdit"]:hover {
    opacity: 1;
}

/* Inline editing active state */
.db-row[data-editing="true"] {
    background: #f9fafb;
    padding: 12px 0;
}

/* Icon preview */
#inline-edit-icon-preview {
    font-size: 2rem;
    border: 2px solid #eee;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .db-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .db-row input[type="text"],
    .db-row input[type="date"],
    .db-row textarea,
    .db-row select {
        width: 100%;
        margin-top: 8px;
    }
}

/* === Chat AI Message Styles (my-ai-chat.js 互換) === */
/* Chat Controls Bar (削除ボタンなど常時表示) */
.chat-controls-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    gap: 8px;
}

.chat-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.chat-clear-btn:hover {
    background: #e5e7eb;
}

.chat-clear-btn:active {
    background: #d1d5db;
}

#hacktsu-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#hacktsu-chat-messages .message {
    margin: 12px 0;
    padding: 12px;
    max-width: 80%;
    border-radius: 8px;
    clear: both;
    box-sizing: border-box;
    line-height: 1.65;
    word-break: break-word;
}

#hacktsu-chat-messages .message.user {
    background: #dcf8c6;
    float: right;
    text-align: left;
    margin-right: 0;
}

#hacktsu-chat-messages .message.assistant {
    background: #f6f7f9;
    float: left;
    text-align: left;
    margin-left: 8px;
    color: #2b2b2b;
}

#hacktsu-chat-messages .message .text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

#hacktsu-chat-messages .message .meta {
    margin-top: 6px;
    font-size: 12px;
    color: #777;
    text-align: right;
}

#hacktsu-chat-messages .message.user .meta {
    text-align: right;
}

#hacktsu-chat-messages .message.assistant .meta {
    text-align: left;
}

/* ローディングスピナー */
.ai-loading {
    font-style: italic;
    color: #666;
    display: inline-flex;
    align-items: center;
}

.ai-loading .spinner {
    margin-left: 8px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* === Log Type Selector (記録タイプ選択) === */
.log-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.log-type-btn {
    padding: 16px 12px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
}

.log-type-btn:hover {
    border-color: #0285C9;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(2, 133, 201, 0.1);
}

.log-type-btn.active {
    border-color: #0285C9;
    background: #0285C9;
    color: #fff;
}

.log-type-btn .icon {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}

.log-type-btn .label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.log-type-btn .hint {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
    line-height: 1.2;
}

.log-type-btn.active .hint {
    color: rgba(255, 255, 255, 0.8);
}

/* === AI Evaluation Info Card === */
.ai-eval-info {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.ai-info-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.ai-info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ai-info-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.ai-info-section ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.ai-info-section li {
    margin-bottom: 4px;
}

.ai-info-warning {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0 0 0;
}

.ai-info-warning h4 {
    color: #856404;
}

.ai-info-warning p {
    margin: 0;
    font-size: 0.85rem;
    color: #856404;
}

/* === Onboarding Tooltip === */
.onboarding-tooltip {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 360px;
    padding: 0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-inner {
    padding: 16px;
}

.onboarding-tooltip h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0285C9;
}

.onboarding-tooltip p {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.tooltip-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-s {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-s:not(.btn-ghost) {
    background: #0285C9;
    color: #fff;
}

.btn-s:not(.btn-ghost):hover {
    background: #026aaa;
}

.btn-ghost {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
}

.btn-ghost:hover {
    background: #e5e5e5;
}

/* Guided Flow - Today Tasks */
#hacktsu-app .flow-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

#hacktsu-app .flow-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 14px;
}

#hacktsu-app .flow-step {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
}

#hacktsu-app .flow-step.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #ffd54f;
}

#hacktsu-app .flow-step.completed {
    background: rgba(76, 175, 80, 0.22);
    border-left-color: #4caf50;
}

#hacktsu-app .flow-step.pending {
    opacity: 0.6;
}

#hacktsu-app .flow-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

#hacktsu-app .flow-step.completed .flow-number {
    background: #4caf50;
}

#hacktsu-app .flow-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

#hacktsu-app .flow-content p {
    margin: 4px 0 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

#hacktsu-app .flow-content .btn {
    background: #fff;
    color: #5b4fb7;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

#hacktsu-app .flow-content .btn:hover {
    background: #f3f4f6;
}

#hacktsu-app .flow-done {
    color: #d1fae5;
}

#hacktsu-app .flow-pending {
    color: rgba(255, 255, 255, 0.7);
}

/* AI Story Card */
#hacktsu-app .ai-result-story {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
}

#hacktsu-app .ai-result-header {
    text-align: center;
    margin-bottom: 20px;
}

#hacktsu-app .ai-result-header h3 {
    margin: 8px 0 0;
    font-size: 1.2rem;
}

#hacktsu-app .ai-result-emoji {
    font-size: 32px;
}

#hacktsu-app .ai-result-section {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

#hacktsu-app .ai-result-section.highlight {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

#hacktsu-app .ai-section-icon {
    font-size: 36px;
}

#hacktsu-app .ai-section-content h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}

#hacktsu-app .ai-ideal-text,
#hacktsu-app .ai-next-text {
    font-size: 1rem;
    line-height: 1.6;
    margin: 6px 0;
    font-weight: 600;
}

#hacktsu-app .ai-result-fallback {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    font-size: 28px;
    animation: confetti-fall 3s ease-out;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* === Kids Tab === */
#hacktsu-app .kids-card {
    background: linear-gradient(135deg, #fff7e6 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    box-shadow: 8px 8px 0 0 #f97316;
}

#hacktsu-app .kids-empty {
    font-weight: 700;
    text-align: center;
    color: #92400e;
}

#hacktsu-app .kids-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

#hacktsu-app .kids-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #b45309;
}

#hacktsu-app .kids-points {
    background: #fff;
    border-radius: 16px;
    padding: 10px 16px;
    border: 2px dashed #f59e0b;
    text-align: center;
    min-width: 110px;
}

#hacktsu-app .kids-points-label {
    font-size: 0.7rem;
    color: #92400e;
    font-weight: 700;
}

#hacktsu-app .kids-points-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f97316;
}

#hacktsu-app .kids-points-value span {
    font-size: 0.9rem;
    margin-left: 4px;
}

#hacktsu-app .kids-goals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

#hacktsu-app .kids-goal {
    background: #fff;
    border: 2px solid #fcd34d;
    border-radius: 18px;
    padding: 12px 14px;
    font-weight: 700;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    box-shadow: 4px 4px 0 0 #f59e0b;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#hacktsu-app .kids-goal:hover:not(.is-locked) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 6px 6px 0 0 #f97316;
}

#hacktsu-app .kids-goal.is-done {
    background: #ecfccb;
    border-color: #84cc16;
    box-shadow: 4px 4px 0 0 #65a30d;
}

#hacktsu-app .kids-goal.is-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

#hacktsu-app .kids-goal-icon {
    font-size: 1.3rem;
}

#hacktsu-app .kids-goal-points {
    font-size: 0.8rem;
    color: #b45309;
    background: #fef3c7;
    padding: 4px 8px;
    border-radius: 999px;
}

#hacktsu-app .kids-add {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
}

#hacktsu-app .kids-add input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 2px solid #fcd34d;
    font-weight: 600;
}

#hacktsu-app .kids-readonly {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #92400e;
}

/* === Kids Celebration Animation === */
.kids-celebration {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(255, 249, 196, 0.9), rgba(255, 255, 255, 0.2));
    z-index: 9999;
    animation: kids-celebration-fade 2s ease forwards;
    pointer-events: none;
}

.kids-celebration-burst {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(#f97316, #facc15, #34d399, #60a5fa, #f97316);
    animation: kids-burst 1s ease-out forwards;
}

.kids-celebration-text {
    margin-top: 16px;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ef4444;
    text-shadow: 0 4px 0 #fde68a;
    animation: kids-pop 0.6s ease-out;
}

.kids-celebration-stars {
    margin-top: 12px;
    font-size: 1.4rem;
    animation: kids-stars 1.5s ease-out;
}

@keyframes kids-burst {
    0% {
        transform: scale(0.2) rotate(0deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.1) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes kids-pop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes kids-stars {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }

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

@keyframes kids-celebration-fade {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Welcome Onboarding */
.onboarding-welcome-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.onboarding-welcome-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.onboarding-welcome-card h2 {
    margin: 8px 0;
    font-size: 1.4rem;
}

.onboarding-welcome-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.onboarding-welcome-emoji {
    font-size: 40px;
}

.onboarding-welcome-steps {
    text-align: left;
    margin: 16px 0 20px;
    display: grid;
    gap: 10px;
}

.onboarding-welcome-steps div {
    background: #f3f4f6;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.onboarding-welcome-steps span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0285c9;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* AI評価進捗アニメーション（縦棒グラフ） */
.ai-eval-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    transition: opacity 0.3s ease-out;
}

.ai-eval-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* AI分析 実行確認モーダル */
.ai-confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    animation: fadeIn 0.2s ease;
}

.ai-confirm-modal {
    background: #fff;
    border-radius: 18px;
    padding: 24px 22px;
    width: min(360px, 90vw);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ai-confirm-icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.ai-confirm-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #111827;
}

.ai-confirm-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 18px;
}

.ai-confirm-polish {
    margin-bottom: 16px;
    padding: 12px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    text-align: left;
}

.ai-confirm-polish-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.ai-confirm-polish-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ai-polish-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-polish-btn:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.ai-polish-btn.is-active {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.ai-confirm-polish-note {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 8px;
}

.ai-confirm-limit-note {
    margin-bottom: 14px;
    padding: 8px 10px;
    background: #fffbeb;
    color: #7c2d12;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: left;
}

.ai-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ai-confirm-actions .btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.ai-eval-title {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ai-eval-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    margin: 0 auto 30px;
    gap: 12px;
    padding: 0 10px;
}

.ai-eval-bar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ai-eval-bar-track {
    width: 100%;
    max-width: 60px;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ai-eval-bar-fill {
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    position: relative;
    transition: height 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-eval-bar-pulse {
    animation: aiEvalPulse 0.9s ease-in-out infinite;
}

.ai-eval-bar-check {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 24px;
    height: 24px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.ai-eval-bar-label {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    margin-top: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-eval-message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    text-align: center;
    min-height: 24px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.ai-eval-complete {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 800;
    animation: pulse 0.6s ease-in-out;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    top: -10px;
    opacity: 0;
    animation: confettiFall 2s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(400px) rotate(720deg);
    }
}

@keyframes aiEvalPulse {

    0%,
    100% {
        filter: brightness(1);
        transform: translateY(0);
    }

    50% {
        filter: brightness(1.15);
        transform: translateY(-2px);
    }
}

/* アセスメントシート（ウィザード） */
.assessment-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.assessment-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.assessment-title {
    font-weight: 800;
    font-size: 1rem;
}

.assessment-sub {
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

.assessment-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.assessment-status {
    background: #eef2ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.assessment-stepper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.assessment-step {
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    appearance: none;
    width: 100%;
}

.assessment-step:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

.assessment-summary {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.assessment-summary-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
}

.db-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.db-group-header {
    font-weight: 800;
    font-size: 1rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
}

.db-group-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.db-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 18px;
}

.db-accordion>summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.db-accordion>summary::-webkit-details-marker {
    display: none;
}

.db-accordion>summary::after {
    content: "▼";
    font-size: 0.75rem;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.db-accordion[open]>summary::after {
    transform: rotate(180deg);
}

.db-accordion-body {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Nested accordion items inside accordion body */
.db-accordion-item {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.db-accordion-item>summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
}

.db-accordion-item>summary::-webkit-details-marker {
    display: none;
}

.db-accordion-item>summary::after {
    content: "▼";
    font-size: 0.65rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.db-accordion-item[open]>summary::after {
    transform: rotate(180deg);
}

.db-accordion-item[open]>summary {
    border-bottom: 1px solid #e5e7eb;
}

.db-accordion-item-body {
    padding: 14px;
    background: #fff;
}

/* UI微調整: アコーディオン見出しの色味とホバー */
.db-accordion>summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
}

.db-accordion>summary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.db-accordion-item>summary {
    background: #f9fafb;
}

.db-accordion-item>summary:hover {
    background: #f3f4f6;
}

/* UI微調整: 強み・課題の編集欄 */
.edit-block-strength-row,
.edit-block-challenge-row {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.edit-block-lbl-inp,
.edit-block-desc-inp {
    border-color: #d1d5db;
    border-radius: 8px;
}

.edit-block-lbl-inp[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.edit-block-desc-inp:focus,
.edit-block-lbl-inp:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* UI微調整: 基本情報のセレクト */
.ms-select {
    border-color: #d1d5db;
    border-radius: 8px;
}

/* UI微調整: 保存/キャンセルボタン */
.btn.btn-p {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #fff;
    font-weight: 700;
}

.btn.btn-p:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn.btn-l:hover {
    background: #f9fafb;
}

.assessment-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.assessment-view-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1023px) {
    .assessment-view-header {
        top: 64px;
    }
}

.assessment-back {
    background: none;
    border: none;
    font-weight: 700;
    color: #4338ca;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
}

.assessment-back:hover {
    background: #eef2ff;
}

.assessment-view-title {
    font-weight: 800;
    font-size: 1rem;
}

.assessment-view-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #666;
}

.assessment-view-sub {
    color: #666;
    font-size: 0.85rem;
    padding: 0 16px;
}

.assessment-view-body {
    padding: 0 16px 16px;
}

.assessment-step span {
    font-weight: 800;
    color: #374151;
}

.assessment-step.active {
    background: #ede9fe;
    color: #4c1d95;
}

.assessment-step.done {
    background: #dcfce7;
    color: #166534;
}

.assessment-screen {
    background: #fafafa;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.assessment-screen-title {
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assessment-section {
    font-weight: 800;
    font-size: 0.95rem;
    color: #111827;
    padding: 8px 10px;
    background: #f3f4f6;
    border-radius: 10px;
}

.assessment-progress {
    color: #6b7280;
    font-size: 0.8rem;
}

.assessment-field {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assessment-details {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.assessment-details-toggle {
    list-style: none;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assessment-details-toggle::-webkit-details-marker {
    display: none;
}

.assessment-details-toggle::before {
    content: "▶";
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.assessment-details[open] .assessment-details-toggle::before {
    transform: rotate(90deg);
}

.assessment-details-body {
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    display: grid;
    gap: 10px;
}

.assessment-detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assessment-detail-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}

.assessment-detail-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
    min-height: 1.5em;
    height: 2em;
}

.assessment-field.has-error {
    border-color: #fca5a5;
    background: #fff5f5;
}

.assessment-label {
    font-weight: 700;
    font-size: 0.9rem;
}

.assessment-required {
    margin-left: 6px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
}

.assessment-required.required {
    background: #fee2e2;
    color: #b91c1c;
}

.assessment-required.optional {
    background: #e5e7eb;
    color: #4b5563;
}

.assessment-helper {
    color: #6b7280;
    font-size: 0.8rem;
}

.assessment-error {
    color: #dc2626;
    font-size: 0.8rem;
}

.assessment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assessment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 44px;
}

.assessment-option:hover {
    background: #e5e7eb;
}

.assessment-option:has(input:checked) {
    background: #eef2ff;
    border: 1px solid #6366f1;
}

.assessment-option input {
    accent-color: #6366f1;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.assessment-option span {
    flex: 1;
    cursor: pointer;
}

.assessment-input,
.assessment-textarea,
.assessment-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

.assessment-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.assessment-actions-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.assessment-nav-left,
.assessment-nav-right {
    flex: 0 0 auto;
}

.assessment-nav-left .btn-placeholder {
    display: inline-block;
    width: 80px;
}

.assessment-actions-save {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 完了率バッジ */
.completion-badge {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 6px;
}

.completion-badge.complete {
    color: #16a34a;
}

.completion-badge.partial {
    color: #f59e0b;
}

.completion-badge.empty {
    color: #9ca3af;
}

#hacktsu-app .profile-ai-flow {
    margin: 8px 0 14px;
}

#hacktsu-app .profile-ai-flow-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#hacktsu-app .profile-ai-flow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #475569;
}

#hacktsu-app .profile-ai-flow-step.is-current {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

#hacktsu-app .profile-ai-flow-step.is-complete {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #166534;
}

#hacktsu-app .profile-ai-flow-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#hacktsu-app .profile-ai-flow-step.is-current .profile-ai-flow-icon {
    background: #2563eb;
    color: #fff;
}

#hacktsu-app .profile-ai-flow-step.is-complete .profile-ai-flow-icon {
    background: #16a34a;
    color: #fff;
}

#hacktsu-app .profile-ai-flow-label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

#hacktsu-app .profile-completion-panel {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

#hacktsu-app .profile-completion-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e3a8a;
}

#hacktsu-app .profile-completion-meta {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #475569;
}

#hacktsu-app .profile-completion-optional {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

#hacktsu-app .profile-completion-note {
    margin-top: 4px;
    font-size: 0.76rem;
    color: #9a3412;
}

#hacktsu-app .profile-ai-card {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

#hacktsu-app .profile-ai-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1e3a8a;
}

#hacktsu-app .profile-ai-card-copy {
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #475569;
}

#hacktsu-app .profile-ai-card-btn {
    width: 100%;
    min-height: 44px;
}

#hacktsu-app .profile-ai-card-note {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #9a3412;
}

#hacktsu-app .profile-required-missing {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
    animation: profileRequiredPulse 0.9s ease 2;
}

@keyframes profileRequiredPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.32);
    }

    100% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

.profile-guard-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 16px;
}

.profile-guard-modal {
    width: min(420px, 92vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
    padding: 16px;
}

.profile-guard-modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.profile-guard-modal-body {
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
}

.profile-guard-modal-actions {
    margin-top: 14px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
}

.profile-guard-modal-btn {
    min-height: 44px;
}

@media (max-width: 767px) {
    #hacktsu-app .profile-ai-flow-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #hacktsu-app .profile-ai-flow-step:last-child {
        grid-column: 1 / -1;
    }

    #hacktsu-app .profile-ai-flow-step {
        min-height: 44px;
    }

    #hacktsu-app .profile-ai-flow-label {
        white-space: normal;
        line-height: 1.3;
    }
}

.assessment-locked {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    padding: 12px;
    border-radius: 12px;
    color: #6b7280;
    font-size: 0.9rem;
}

.assessment-locked-notice {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.85rem;
}

.assessment-history-card {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.assessment-history-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.assessment-history-empty {
    color: #6b7280;
    font-size: 0.85rem;
}

.assessment-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assessment-history-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.assessment-history-item summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assessment-history-item summary::-webkit-details-marker {
    display: none;
}

.assessment-history-item-version {
    font-weight: 800;
    color: #312e81;
}

.assessment-history-item-time {
    color: #6b7280;
    font-size: 0.8rem;
}

.assessment-history-item-body {
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    color: #374151;
    font-size: 0.85rem;
    display: grid;
    gap: 6px;
}

/* ここから: Cycle「登山型」進捗UI */
.mountain-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 16px 8px;
    background: linear-gradient(180deg, #eef5ff 0%, #ffffff 60%);
    border-radius: 18px;
    border: 1px solid #eef2f7;
    box-shadow: 0 12px 26px rgba(32, 64, 110, 0.08);
}

.mountain-summit {
    text-align: center;
    margin-bottom: 14px;
}

.summit-icon {
    font-size: 2.6rem;
}

.summit-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-top: 4px;
}

.summit-sub {
    font-size: 0.8rem;
    color: #4b5563;
    margin-top: 4px;
}

.mountain-track {
    width: min(520px, 100%);
    margin: 6px auto 14px;
}

.mountain-track-bar {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.mountain-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 999px;
}

.mountain-track-label {
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
    margin-top: 6px;
}

.mountain-path {
    width: min(420px, 100%);
    display: grid;
    gap: 10px;
    margin: 6px 0 10px;
    position: relative;
}

.mountain-path::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: #d1d5db;
    transform: translateX(-50%);
    z-index: 0;
}

.mountain-camp {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px 14px;
    text-align: center;
}

.mountain-camp.is-done {
    border-color: #22c55e;
    background: #ecfdf3;
}

.mountain-camp.is-current {
    border-color: #3b82f6;
    background: #e0ecff;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.25);
}

.mountain-camp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.camp-icon {
    font-size: 1.1rem;
}

.camp-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

.camp-status {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #4b5563;
}

.camp-progress {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.camp-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.camp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 999px;
}

.camp-progress-label {
    font-size: 0.72rem;
    color: #4b5563;
}

.mountain-dots {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mountain-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #cbd5f5;
    background: #f1f5ff;
}

.mountain-dot.is-done {
    border-color: #2563eb;
    background: #2563eb;
}

.mountain-start {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.start-icon {
    font-size: 1.6rem;
}

.start-label {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ここまで: Cycle「登山型」進捗UI */

/* ここから: 発掘サイクル達成度 */
.exc-progress-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.08);
}

.exc-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.exc-progress-title {
    font-weight: 700;
    color: #1f2937;
}

.exc-progress-value {
    font-weight: 700;
    color: #2563eb;
}

.exc-progress-bar {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.exc-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 999px;
}

.exc-progress-meta {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #6b7280;
}

.exc-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.exc-progress-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.exc-progress-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.exc-progress-result {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: #374151;
}

.exc-progress-recent {
    margin-top: 14px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
}

.exc-progress-recent-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.exc-progress-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    color: #4b5563;
    padding: 4px 0;
}

.exc-progress-row-title {
    font-weight: 600;
}

.exc-progress-row-meta {
    text-align: right;
    color: #6b7280;
}

.exc-progress-empty {
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
    padding: 10px 0;
}

.exc-progress-cta {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.exc-progress-cta-note {
    font-size: 0.78rem;
    color: #6b7280;
}

.ai-eval-link.is-highlight,
.ai-eval-btn.is-highlight {
    position: relative;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    animation: aiPulse 1.6s ease-in-out infinite;
}

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

    50% {
        transform: scale(1.02);
    }

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

/* ここまで: 発掘サイクル達成度 */

/* ここから: 招待コードで紐付け */
.invite-code-section {
    margin-top: 12px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
}

.invite-code-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0369a1;
}

.invite-code-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
}

.invite-code-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.invite-code-display {
    background: #fff;
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    padding: 12px;
}

.invite-code-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
}

.invite-code-value-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.invite-code-value {
    flex: 1;
    font-size: 1.1rem;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-weight: 700;
    text-align: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0369a1;
    letter-spacing: 0.08em;
}

.invite-code-expires {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 6px;
}

.invite-code-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

.invite-linked {
    font-size: 0.85rem;
    color: #16a34a;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: #f0fdf4;
    border-radius: 8px;
}

.join-invite-section {
    margin-top: 16px;
    padding: 16px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 12px;
}

.join-invite-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #a16207;
}

.join-invite-desc {
    font-size: 0.85rem;
    color: #78716c;
    margin-bottom: 12px;
}

.join-invite-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.join-invite-input {
    flex: 1;
    min-width: 180px;
    font-size: 1rem;
    font-family: 'SF Mono', 'Monaco', monospace;
    text-transform: uppercase;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    letter-spacing: 0.08em;
}

.join-invite-input:focus {
    border-color: #f59e0b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ここまで: 招待コードで紐付け */

/* ここから: Cycle「今日やってみよう」回転UI */
.try-wheel {
    position: relative;
    width: min(320px, 78vw);
    height: min(320px, 78vw);
    margin: 10px auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #ffffff 0%, #f5f7fb 55%, #eef1f7 70%, #e6ebf3 100%);
    box-shadow: 0 10px 30px rgba(42, 58, 89, 0.12);
    display: grid;
    place-items: center;
    overflow: visible;
}

.try-wheel::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(77, 93, 122, 0.08);
}

.try-wheel-center {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #2d3a56;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    max-width: 70%;
}

.try-wheel-center span {
    display: block;
    font-size: 12px;
    color: #6a7791;
    font-weight: 500;
    margin-top: 4px;
}

.try-wheel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform:
        rotate(calc(var(--try-angle))) translate(calc(var(--try-radius))) rotate(calc(var(--try-angle) * -1));
    transform-origin: center;
    z-index: 3;
    min-width: 72px;
    max-width: 96px;
    padding: 8px 10px;
    border-radius: 16px;
    border: 1px solid rgba(105, 123, 162, 0.22);
    background: #ffffff;
    color: #2f3c55;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(44, 61, 92, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.try-wheel-item.is-selected {
    background: #4c6fff;
    color: #ffffff;
    border-color: #4c6fff;
    box-shadow: 0 10px 18px rgba(76, 111, 255, 0.35);
}

.try-wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid #4c6fff;
    filter: drop-shadow(0 4px 6px rgba(76, 111, 255, 0.35));
    z-index: 4;
}

@media (max-width: 600px) {
    .try-wheel {
        width: min(280px, 86vw);
        height: min(280px, 86vw);
    }

    .try-wheel-item {
        min-width: 64px;
        max-width: 86px;
        font-size: 11px;
    }
}

/* ここまで: Cycle「今日やってみよう」回転UI */

/* ===== サブビュー遷移システム ===== */

/* サブビュースライドアニメーション */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.subview-enter {
    animation: slideInRight 0.25s ease-out forwards;
}

.subview-exit {
    animation: slideOutLeft 0.2s ease-in forwards;
}

/* サブビューヘッダー */
.subview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.subview-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.subview-back-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.subview-back-btn:active {
    transform: scale(0.97);
}

.subview-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
    flex: 1;
}

/* お子さま追加ボタン（空状態CTA用） */
.db-add-child-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border: 2px dashed var(--c-blue, #3b82f6);
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.db-add-child-btn:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-color: var(--c-blue, #3b82f6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.db-add-child-btn:active {
    transform: scale(0.98);
}

.db-add-child-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-blue, #3b82f6);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
}

.db-add-child-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--c-blue, #3b82f6);
}

.db-add-child-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #dbeafe;
    color: var(--c-blue, #3b82f6);
    white-space: nowrap;
}

/* 空状態UI */
.db-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.db-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.db-empty-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.db-empty-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.db-empty-state .db-add-child-btn {
    margin: 0 auto;
}

/* トップメニューナビボタン */
.db-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.db-nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.db-nav-btn:hover {
    border-color: var(--c-blue);
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.db-nav-btn:active {
    transform: scale(0.98);
}

.db-nav-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: #e5e7eb;
    background: #f9fafb;
}

.db-nav-btn.is-disabled:hover {
    border-color: #e5e7eb;
    box-shadow: none;
    background: #f9fafb;
}

.db-nav-btn.is-disabled:active {
    transform: none;
}

.db-nav-btn.is-disabled .db-nav-icon {
    background: #f3f4f6;
    filter: grayscale(0.6);
}

.db-nav-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
}

.db-nav-content {
    flex: 1;
    min-width: 0;
}

.db-nav-label {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.db-nav-desc {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-nav-arrow {
    font-size: 1.2rem;
    color: #9ca3af;
    flex-shrink: 0;
}

/* サブビューコンテナ */
.db-subview {
    display: none;
}

.db-subview.active {
    display: block;
}

.subview-body {
    padding: 0 4px 24px;
}

/* デスクトップではサブビューなしでスクロール許可 */
@media (min-width: 1025px) {
    .db-nav-menu {
        display: none;
    }

    .db-subview-desktop-always {
        display: block !important;
    }
}

/* デンジャーゾーン（設定・管理セクション内） */
.db-danger-zone {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid #fca5a5;
    border-radius: 14px;
    background: #fef2f2;
}

.db-danger-zone-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
}

.db-danger-zone-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.db-danger-zone-btn {
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
}

.db-danger-zone-btn:hover {
    background: #b91c1c !important;
}

.db-danger-zone-btn:active {
    transform: scale(0.98);
}

/* 設定・管理ナビボタンのアイコン背景（オレンジ系） */
.db-nav-btn:last-child .db-nav-icon {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
}

/* ===========================
   HOME DASHBOARD LAYOUT
   =========================== */

#hacktsu-app #home-try-root {
    margin: 0 0 16px;
}

#hacktsu-app #v-cycle #ai-next-card {
    margin-bottom: 16px;
}

/* --- モバイル（デフォルト: 縦積み） --- */
#hacktsu-app .home-dashboard-grid {
    display: block;
}

#hacktsu-app .home-col-left,
#hacktsu-app .home-col-right {
    display: block;
}

/* --- デスクトップ: 2カラムグリッド --- */
@media (min-width: 1025px) {
    #hacktsu-app .home-dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }

    #hacktsu-app .home-col-left,
    #hacktsu-app .home-col-right {
        min-width: 0;
    }

    /* デスクトップではナビメニュー非表示 */
    #hacktsu-app #home-nav-menu {
        display: none !important;
    }

    #hacktsu-app #v-cycle.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }

    #hacktsu-app #v-cycle.active #ai-next-card {
        margin-bottom: 0;
    }

    #hacktsu-app #v-cycle.active #cycle-root {
        min-width: 0;
    }
}

/* --- 週間サマリーカード --- */
#hacktsu-app .dashboard-summary-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1px solid #d0ddf5;
    border-radius: 14px;
    padding: 16px 12px;
    margin-bottom: 16px;
}

#hacktsu-app .dashboard-summary-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 12px;
}

#hacktsu-app .dashboard-summary-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

#hacktsu-app .summary-stat {
    flex: 1;
}

#hacktsu-app .summary-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e3a5f;
    line-height: 1.2;
}

#hacktsu-app .summary-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
}

/* --- ホームナビメニュー（モバイル用） --- */
#hacktsu-app #home-nav-menu {
    margin-top: 8px;
    margin-bottom: 16px;
}

/* ==================================================================
   発掘サイクル v2 - 新UI スタイル
   ================================================================== */

/* --- 自由記述 daily-note ボタン --- */
#hacktsu-app .try-milestone-btn.is-daily-note {
    border: 2px dashed #a5b4fc;
    background: #eef2ff;
    color: #4338ca;
}

#hacktsu-app .try-milestone-btn.is-daily-note:hover {
    background: #e0e7ff;
}

#hacktsu-app .try-milestone-btn.is-daily-note.is-selected {
    border-color: #6366f1;
    background: #c7d2fe;
}

/* --- 気分スライダー --- */
#hacktsu-app .mood-slider-section {
    margin: 12px 0;
}

#hacktsu-app .mood-slider-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#hacktsu-app .mood-slider-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

#hacktsu-app .mood-slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hacktsu-app .mood-slider-btn:hover {
    transform: scale(1.1);
    border-color: #a5b4fc;
}

#hacktsu-app .mood-slider-btn.is-active {
    border-color: #6366f1;
    background: #eef2ff;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* --- 履歴アイテム構造 --- */
#hacktsu-app .try-history-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: flex-start;
}

#hacktsu-app .try-history-item:last-child {
    border-bottom: none;
}

#hacktsu-app .try-history-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

#hacktsu-app .try-history-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#hacktsu-app .try-history-meta {
    flex: 1;
    min-width: 0;
}

#hacktsu-app .try-history-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

#hacktsu-app .try-history-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

#hacktsu-app .try-history-comment {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
    word-break: break-word;
}

/* --- 著者バッジ --- */
#hacktsu-app .history-author-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    white-space: nowrap;
}

#hacktsu-app .history-author-badge.is-staff {
    background: #dbeafe;
    color: #1d4ed8;
}

#hacktsu-app .history-author-badge.is-parent {
    background: #fef3c7;
    color: #92400e;
}

/* --- ゴーストボタン（スキップ） --- */
#hacktsu-app .btn-ghost {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

#hacktsu-app .btn-ghost:hover {
    background: #f9fafb;
    color: #374151;
}

/* --- 保存アニメーション --- */
@keyframes justSaved {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.08);
    }

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

#hacktsu-app .try-milestone-btn.just-saved {
    animation: justSaved 0.4s ease;
}

/* --- 研磨スタイル ポポバー --- */
#hacktsu-app .try-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#hacktsu-app .try-section-actions {
    position: relative;
}

#hacktsu-app .try-polish-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
}

#hacktsu-app .try-polish-toggle:hover {
    background: #f3f4f6;
}

#hacktsu-app .polish-popover {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 12px;
    min-width: 200px;
}

#hacktsu-app .polish-popover-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

#hacktsu-app .polish-popover-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#hacktsu-app .polish-pop-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    color: #374151;
}

#hacktsu-app .polish-pop-btn:hover {
    background: #f3f4f6;
}

#hacktsu-app .polish-pop-btn.is-active {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

/* --- デスクトップ履歴カード --- */
#hacktsu-app .cycle-history-desktop-card {
    margin-top: 12px;
}

#hacktsu-app .cycle-history-header {
    padding: 12px 16px;
}

#hacktsu-app .cycle-history-desktop-body {
    padding: 0 16px 16px;
}

/* --- 道しるべ textarea --- */
#hacktsu-app .cycle-vision-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

#hacktsu-app .cycle-vision-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* --- 展開カード daily-note --- */
#hacktsu-app .try-expanded-card.is-daily-note {
    border: 2px solid #a5b4fc;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
}

#hacktsu-app .try-expanded-card.is-daily-note .try-expanded-title {
    color: #4338ca;
}

/* --- AI評価レート制限通知 --- */
#hacktsu-app .ai-rate-limit-notice {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

#hacktsu-app .ai-eval-limit-note {
    margin-top: 8px;
    padding: 7px 10px;
    background: #fffbeb;
    color: #7c2d12;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* ============================
 * Upgrade Modal
 * ============================ */
.points-purchase-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11020;
    padding: 16px;
}

.points-purchase-modal {
    position: relative;
    width: min(900px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
    border-radius: 16px;
    border: 1px solid #fed7aa;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.26);
    padding: 20px;
}

.points-purchase-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.points-purchase-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #111827;
    margin-bottom: 8px;
}

.points-purchase-summary {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a8a;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.points-purchase-recommend {
    color: #92400e;
    font-size: 0.84rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.points-purchase-instant {
    color: #047857;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.points-purchase-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.points-pack-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
}

.points-pack-card.is-recommended {
    border: 2px solid #fb923c;
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.2);
}

.points-pack-card.is-best-value {
    background: #fffbeb;
}

.points-pack-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.points-pack-points {
    font-size: 1.05rem;
    font-weight: 900;
    color: #111827;
}

.points-pack-price {
    font-size: 0.92rem;
    font-weight: 800;
    color: #b45309;
}

.points-pack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.points-pack-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 800;
}

.points-pack-badge.is-recommended {
    background: #ffedd5;
    color: #c2410c;
}

.points-pack-badge.is-best-value {
    background: #ecfccb;
    color: #3f6212;
}

.points-pack-badge.is-discount {
    background: #dbeafe;
    color: #1d4ed8;
}

.points-pack-cta {
    min-height: 38px;
}

.points-pack-fallback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .points-purchase-pack-grid {
        grid-template-columns: 1fr;
    }
}

.upgrade-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    animation: fadeIn 0.2s ease;
    padding: 16px;
}

.upgrade-modal {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: min(760px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.upgrade-modal-header {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
    color: #111827;
}

.upgrade-plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.upgrade-plan-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: left;
    transition: border-color 0.2s;
}

.upgrade-plan-card.featured {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
}

.upgrade-plan-card.current {
    opacity: 0.7;
}

.upgrade-plan-badge {
    display: inline-block;
    background: #6366f1;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.upgrade-plan-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 4px;
}

.upgrade-plan-price {
    margin-bottom: 8px;
}

.upgrade-price-value {
    font-weight: 800;
    font-size: 1.3rem;
    color: #111827;
}

.upgrade-price-unit {
    font-size: 0.8rem;
    color: #6b7280;
}

.upgrade-plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.78rem;
    color: #374151;
    line-height: 1.7;
}

.upgrade-plan-features li.dim {
    color: #9ca3af;
}

.upgrade-plan-current-badge {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
}

.upgrade-cta-btn {
    display: block;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.upgrade-addon-section {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
}

.upgrade-addon-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #166534;
    margin-bottom: 4px;
}

.upgrade-addon-desc {
    font-size: 0.85rem;
    color: #15803d;
    margin-bottom: 8px;
}

.upgrade-addon-btn {
    font-size: 0.82rem;
}

.upgrade-close-btn {
    width: 100%;
    margin-top: 4px;
}

/* Upgrade button in parent share gate */
.upgrade-gate-btn {
    font-size: 0.85rem;
}

/* Chat upgrade button */
.chat-upgrade-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: 600;
}

.chat-upgrade-btn:hover {
    background: #4f46e5;
}

/* Plan badge in role info modal */
.role-info-plan-section {
    margin-bottom: 12px;
    text-align: center;
}

.role-info-plan-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.role-info-plan-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.role-info-plan-badge.plan-free {
    background: #f3f4f6;
    color: #6b7280;
}

.role-info-plan-badge.plan-pro {
    background: #eef2ff;
    color: #6366f1;
}

.role-info-plan-badge.plan-parent-pro {
    background: #fff7ed;
    color: #c2410c;
}

.role-info-upgrade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 0.82rem;
    color: #6366f1;
    background: transparent;
    border: 1px solid #6366f1;
    border-radius: 8px;
    padding: 6px 14px;
    min-height: 38px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.35;
}

.role-info-upgrade-btn:hover {
    background: #eef2ff;
}

.role-info-plan-ctas .role-info-upgrade-btn.btn-s:not(.btn-ghost) {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.role-info-plan-ctas .role-info-upgrade-btn.btn-s:not(.btn-ghost):hover {
    background: #eef2ff;
}

.role-info-parent-pro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 0.82rem;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fb923c;
    border-radius: 8px;
    padding: 6px 14px;
    min-height: 38px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.35;
}

.role-info-parent-pro-btn:hover {
    background: #ffedd5;
}

.role-info-plan-ctas .role-info-upgrade-btn,
.role-info-plan-ctas .role-info-parent-pro-btn,
.role-info-plan-ctas .role-info-addon-btn {
    flex: 0 1 auto;
}

.role-info-addon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 6px 14px;
    min-height: 38px;
    font-weight: 600;
    line-height: 1.35;
}

.role-info-addon-btn:hover {
    background: #ffedd5;
}

.role-info-plan-ctas .role-info-addon-btn.btn-s:not(.btn-ghost) {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #f59e0b;
}

.role-info-plan-ctas .role-info-addon-btn.btn-s:not(.btn-ghost):hover {
    background: #ffedd5;
}

@media (max-width: 400px) {
    .upgrade-plan-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .upgrade-plan-cards {
        grid-template-columns: 1fr;
    }
}
