/* ===== 案A：ミニマル・ネイビー ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ===== 海モチーフ パレット =====
       深海（ヘッダー・サイドバー）→ ラグーン（アクセント）→ 砂浜（背景）の3層。
       役割色は dataviz バリデータで色覚多様性・可読性を検証済み。 */

    /* 深海 */
    --deep-1: #06283a;
    --deep-2: #041e2c;
    --deep-3: #0c3a50;
    --deep-ink: #cfe4ec;
    --deep-ink-muted: #7fa3b5;

    /* ラグーン（アクセント） */
    --accent: #0d7ea6;
    --accent-strong: #0a6b8f;
    --accent-tint: #e8f4f8;
    --accent-tint-2: #d4e9f0;

    /* 砂浜・波打ち際（面と線） */
    --bg: #e9f1f4;
    --surface: #ffffff;
    --surface-2: #f7fbfc;
    --surface-3: #eef6f8;
    --border: #d2e2e8;
    --border-2: #bfd6de;

    /* 文字 */
    --ink: #10353f;
    --ink-2: #3f6070;
    --ink-3: #6e93a3;
    --ink-4: #93aeb9;

    /* 状態色（役割色とは別枠） */
    --good: #0f8f5f;
    --danger: #b5392b;
    --danger-tint: #fbf0ee;
    --today: #00b4d8;
    --neutral-bar: #8fa8b3;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    background: var(--bg);
    font-size: 13px;
    color: var(--ink);
}

/* Header */
.header {
    background: var(--deep-1);
    border-bottom: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--deep-ink-muted);
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}

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

.logo {
    width: 30px;
    height: 30px;
    background: var(--deep-1);
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 被写体が中央 55% ほどなので少し寄せる */
    scale: 1.5;
}

.brand-name {
    font-size: 10px;
    color: var(--ink-3);
    line-height: 1.2;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

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

.btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--deep-ink);
    transition: all 0.15s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
}

/* App body */
.app-body {
    display: flex;
    margin-top: 52px;
    min-height: calc(100vh - 52px);
    position: relative;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 52px;
    left: -280px;
    width: 260px;
    height: calc(100vh - 52px);
    background: var(--deep-2);
    color: #fff;
    transition: left 0.25s ease;
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--deep-ink-muted);
    letter-spacing: 0.5px;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

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

.new-project-btn {
    margin: 12px;
    padding: 9px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: background 0.15s;
}

.new-project-btn:hover {
    background: var(--accent-strong);
}

.project-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 16px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.12s;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.project-item.proj-current {
    background: rgba(13, 126, 166, 0.25);
    border-left: 3px solid var(--accent);
    padding-left: 7px;
}

.project-item.proj-done {
    opacity: 0.5;
}

.project-item.proj-done:hover {
    opacity: 0.75;
}

.project-item-info {
    flex: 1;
    min-width: 0;
}

.project-item-name {
    font-size: 13px;
    color: var(--accent-tint-2);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-item.proj-done .project-item-name {
    text-decoration: line-through;
    color: var(--ink-3);
}

.project-item-sub {
    font-size: 11px;
    color: var(--ink-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.12s;
}

.project-item:hover .proj-actions {
    opacity: 1;
}

.proj-complete-btn {
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
}

.proj-complete-btn:hover {
    color: var(--good);
    background: rgba(15, 143, 95, 0.15);
}

.project-item-del {
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
}

.project-item-del:hover {
    color: var(--danger);
    background: rgba(181, 57, 43, 0.15);
}

.proj-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.dot-active {
    background: var(--today);
    box-shadow: 0 0 4px rgba(0, 180, 216, 0.6);
}

.dot-done {
    background: var(--ink-2);
}

.proj-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-2);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 8px 10px 4px;
}

.proj-empty {
    font-size: 12px;
    color: var(--ink-2);
    padding: 4px 10px 8px;
    font-style: italic;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 140;
}

.sidebar-overlay.show {
    display: block;
}

/* Main */
.main {
    flex: 1;
    padding: 16px 20px;
    min-width: 0;
}

/* Section */
.section {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(6, 40, 58, 0.06);
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.form-group label {
    font-size: 11px;
    color: var(--ink-3);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    color: var(--ink);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 126, 166, 0.1);
}

.form-group.small {
    flex: 0 0 140px;
}

.period-badge {
    background: var(--accent-tint);
    color: var(--accent);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
}

.progress-bar-wrap {
    background: var(--bg);
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text-right {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

/* Two column */
.two-col {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.two-col .section {
    flex: 1;
    margin-bottom: 0;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Assignee */
.assignee-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.assignee-name-input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    width: 90px;
    outline: none;
}

.assignee-name-input:focus {
    border-color: var(--accent);
}

.role-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    flex: 1;
    outline: none;
    background: #fff;
}

.assignee-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-4);
    font-size: 16px;
    padding: 2px 4px;
}

.delete-btn:hover {
    color: var(--danger);
}

.new-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.new-name-input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    width: 90px;
    outline: none;
}

.new-role-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    flex: 1;
    outline: none;
    background: #fff;
    color: var(--ink-3);
}

.add-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: var(--accent-strong);
}

/* Role */
.role-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.role-card:hover {
    background: var(--bg);
}

.role-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.role-label {
    font-size: 11px;
    color: var(--ink-2);
    font-weight: 600;
}

.role-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.role-name-input {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    flex: 1;
    outline: none;
}

.color-pick {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    padding: 2px;
}

/* Gantt */
.gantt-section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(6, 40, 58, 0.06);
}

.gantt-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--surface-3);
    background: var(--surface-2);
}

.gantt-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gantt-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.nav-btn,
.today-btn {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ink-2);
    transition: all 0.12s;
}

.nav-btn:hover,
.today-btn:hover {
    background: var(--accent-tint);
    border-color: var(--accent);
    color: var(--accent);
}

.week-range-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-icon-btn {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.cal-icon-btn:hover {
    background: var(--accent-tint);
    border-color: var(--accent);
}

.calendar-picker {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(6, 40, 58, 0.14);
    z-index: 300;
    padding: 12px;
    min-width: 240px;
}

.calendar-picker.open {
    display: block;
}

.cal-year-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-2);
    margin: 8px 0 4px;
}

.cal-year-label:first-child {
    margin-top: 0;
}

.cal-months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.cal-month-btn {
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ink);
    transition: background 0.12s;
}

.cal-month-btn:hover {
    background: var(--accent-tint);
    color: var(--accent);
}

.cal-month-btn.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* Gantt table */
.gantt-wrap {
    overflow-x: auto;
}

.gantt-table {
    width: 100%;
    border-collapse: collapse;
}

.gantt-table th {
    background: var(--surface-2);
    border-bottom: 1px solid var(--surface-3);
    padding: 7px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--ink-2);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gantt-table td {
    border-bottom: 1px solid var(--bg);
    padding: 6px 8px;
    vertical-align: middle;
    white-space: nowrap;
}

.gantt-table tr:hover td {
    background: var(--accent-tint);
}

.drag-handle {
    color: var(--ink-4);
    cursor: grab;
    font-size: 16px;
}

.task-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

.task-name {
    font-size: 13px;
    color: var(--ink);
}

.task-name.done {
    text-decoration: line-through;
    color: var(--ink-4);
}

.date-input {
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
    outline: none;
    background: #fff;
    color: var(--ink);
}

.date-input:focus {
    border-color: var(--accent);
}

.assignee-multi {
    position: relative;
}

.assignee-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 6px;
    min-height: 30px;
    cursor: pointer;
    background: #fff;
    min-width: 130px;
}

.assignee-tags:hover {
    border-color: var(--accent);
}

.tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.placeholder {
    color: var(--ink-4);
    font-size: 12px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(6, 40, 58, 0.12);
    z-index: 100;
    min-width: 200px;
    padding: 6px 0;
    display: none;
}

.dropdown.open {
    display: block;
}

.dropdown-title {
    padding: 6px 12px 4px;
    font-size: 11px;
    color: var(--ink-3);
    font-weight: 600;
}

.dropdown-item {
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--accent-tint);
}

.dropdown-item input[type=checkbox] {
    accent-color: var(--accent);
}

.item-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.gantt-bar {
    position: absolute;
    height: 22px;
    top: 7px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: grab;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.15s;
    min-width: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gantt-bar:hover {
    opacity: 0.85;
}

.gantt-bar.done {
    opacity: 0.35;
}

.gantt-bar .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
}

.month-header {
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    background: var(--surface-2);
    color: var(--ink-2);
    letter-spacing: 0.5px;
}

.day-header {
    text-align: center;
    font-size: 11px;
    color: var(--ink-4);
    width: 24px;
    min-width: 24px;
    max-width: 24px;
}

.day-header.today {
    color: var(--accent);
    font-weight: 700;
}

.day-header.weekend {
    color: var(--ink-4);
}

.day-cell {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    border-right: 1px solid var(--bg);
    padding: 0;
    position: relative;
}

.day-cell.today-col {
    background: rgba(13, 126, 166, 0.04);
}

.day-cell.weekend-col {
    background: var(--surface-2);
}

.add-task-row td {
    padding: 8px 16px;
}

.add-task-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.add-task-btn:hover {
    text-decoration: underline;
}

.legend-bar {
    padding: 10px 16px;
    border-top: 1px solid var(--surface-3);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--ink-3);
    flex-wrap: wrap;
    background: var(--surface-2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 340px;
    box-shadow: 0 8px 40px rgba(6, 40, 58, 0.2);
}

.modal h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ink);
}

.modal textarea {
    width: 100%;
    height: 200px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-family: monospace;
    outline: none;
    resize: vertical;
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 3px;
}

.sidebar ::-webkit-scrollbar-track {
    background: var(--deep-2);
}

.sidebar ::-webkit-scrollbar-thumb {
    background: var(--deep-3);
}
/* ===== Icons (inline SVG / currentColor) ===== */
.icon {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.14em;
}

/* Icon + label buttons */
.nav-btn,
.new-project-btn,
.sidebar-title,
.proj-section-label,
.delete-btn,
.proj-complete-btn,
.project-item-del,
.sidebar-toggle,
.cal-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.proj-section-label {
    gap: 5px;
}

/* Context sizes */
.btn .icon,
.nav-btn .icon,
.add-task-btn .icon,
.gantt-title .icon {
    width: 14px;
    height: 14px;
}

.new-project-btn .icon,
.sidebar-title .icon {
    width: 15px;
    height: 15px;
}

.sidebar-toggle .icon,
.add-btn .icon {
    width: 18px;
    height: 18px;
}

.user-icon .icon {
    width: 16px;
    height: 16px;
}

.cal-icon-btn .icon {
    width: 15px;
    height: 15px;
    display: block;
}

.delete-btn .icon,
.sidebar-close .icon {
    width: 15px;
    height: 15px;
}

.proj-complete-btn .icon,
.project-item-del .icon {
    width: 14px;
    height: 14px;
}

.proj-section-label .icon {
    width: 12px;
    height: 12px;
}

/* Status colors for the project list section labels */
.proj-section-label .icon-active {
    display: inline-flex;
    color: var(--good);
}

.proj-section-label .icon-done {
    display: inline-flex;
    color: var(--accent);
}

.role-del {
    display: inline-flex;
    align-items: center;
    color: var(--ink-4);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}

.role-del .icon {
    width: 13px;
    height: 13px;
}

.role-del:hover {
    color: var(--danger);
    background: rgba(181, 57, 43, 0.12);
}

/* ===== Demo bar (portfolio) ===== */

/* ポートフォリオ用のデモであることを伝える、ページ内の注意書き */
.demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-2);
    background: var(--surface-2, #f6f8fa);
    font-size: 12px;
    color: var(--text-2, #5b6b76);
}

.demo-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

.demo-note .icon {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.demo-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    border: 1px solid var(--border-2);
    background: #fff;
    color: var(--ink-2);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.12s;
}

.demo-btn .icon {
    width: 13px;
    height: 13px;
}

.demo-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-tint);
}

.demo-btn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-tint);
}

/* ===== 担当者リストの見出し ===== */
.assignee-head {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--ink-3);
    margin-bottom: 6px;
}

.ah-name { width: 90px; }
.ah-role { flex: 1; }
.ah-preview { width: 70px; }
.ah-act { width: 30px; }

.suffix-sama {
    padding-bottom: 8px;
    color: var(--ink-3);
    white-space: nowrap;
}

.progress-label {
    font-size: 12px;
    color: var(--ink-3);
}

/* ===== レスポンシブ ===== */

/* タブレット：担当者と役割を縦積みに */
@media (max-width: 1024px) {
    .two-col {
        flex-direction: column;
    }

    .two-col .section {
        margin-bottom: 0;
    }

    .form-row {
        flex-wrap: wrap;
    }

    .form-group {
        min-width: 180px;
    }
}

/* ヘッダーが詰まる幅：ボタンをアイコンのみにする */
@media (max-width: 900px) {
    .header {
        padding: 0 12px;
    }

    .header-right {
        gap: 6px;
    }

    .header-right .btn {
        padding: 7px 9px;
    }

    .btn-label {
        /* 読み上げには残しつつ見た目だけ隠す */
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .header-right .btn .icon {
        width: 16px;
        height: 16px;
    }

    .app-title {
        font-size: 14px;
    }
}

/* スマートフォン */
@media (max-width: 720px) {
    .main {
        padding: 12px 12px 24px;
    }

    .section {
        padding: 12px;
    }

    .form-group.small {
        flex: 1 1 140px;
    }

    .demo-bar {
        padding: 10px 12px;
        font-size: 11px;
    }

    .demo-actions {
        width: 100%;
    }

    .demo-btn {
        flex: 1;
        justify-content: center;
    }

    /* ガントの操作列を2段に */
    .gantt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .gantt-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .week-range-wrap {
        order: -1;
        width: 100%;
    }

    /* 担当者行を縦積みにして入力欄を潰さない */
    .assignee-head {
        display: none;
    }

    .assignee-row,
    .new-row {
        flex-wrap: wrap;
        gap: 6px;
        padding-bottom: 8px;
        border-bottom: 1px dashed var(--border);
    }

    .assignee-name-input,
    .new-name-input {
        flex: 1 1 100%;
        width: auto;
    }

    .role-input-row {
        flex-wrap: wrap;
    }

    .role-name-input {
        flex: 1 1 100%;
    }

    .modal {
        min-width: 0;
        width: calc(100vw - 32px);
        padding: 18px;
    }

    /* ガント表は横スクロール。指で動かせるようにする */
    .gantt-wrap {
        -webkit-overflow-scrolling: touch;
    }

    /* 狭い画面では並べ替えハンドルと連番を省き、
       チェックと工程名を左に固定して横スクロールしても見失わないようにする */
    .gantt-table th:nth-child(1),
    .gantt-table td:nth-child(1),
    .gantt-table th:nth-child(3),
    .gantt-table td:nth-child(3) {
        display: none;
    }

    .gantt-table th:nth-child(2),
    .gantt-table td:nth-child(2) {
        position: sticky;
        left: 0;
        z-index: 5;
        background: var(--surface);
        padding-left: 10px;
    }

    .gantt-table th:nth-child(4),
    .gantt-table td:nth-child(4) {
        position: sticky;
        left: 34px;
        z-index: 5;
        background: var(--surface);
        width: 150px;
        min-width: 150px;
        max-width: 150px;
        box-shadow: 1px 0 0 var(--border);
    }

    /* thead の th は z-index:10 なので、固定列はそれより上に置く */
    .gantt-table thead th:nth-child(2),
    .gantt-table thead th:nth-child(4) {
        background: var(--surface-2);
        z-index: 20;
    }

    .gantt-table td:nth-child(4) .task-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gantt-table tr:hover td:nth-child(2),
    .gantt-table tr:hover td:nth-child(4) {
        background: var(--accent-tint);
    }
}

/* 極小幅 */
@media (max-width: 420px) {
    .header {
        padding: 0 8px;
    }

    .header-right .btn {
        padding: 6px 7px;
    }

    .user-icon {
        display: none;
    }

    .demo-actions {
        flex-wrap: wrap;
    }

    .demo-btn {
        flex: 1 1 100%;
    }
}


/* ============================================================
   ポートフォリオへ戻る導線
   （このページ内の .demo-bar は別物なので名前を分けている）
   ============================================================ */




/* ============================================================
   ポートフォリオへ戻る導線（5ページ共通）
   ============================================================ */

.pf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 24px);
  background: #021522;
  border-bottom: 1px solid rgba(154, 229, 238, .22);
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .2em;
  color: rgba(226, 243, 250, .66);
  line-height: 1.6;
}

.pf-bar a {
  color: #9ae5ee;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s ease;
}

.pf-bar a:hover { color: #fff; }
.pf-bar a:focus-visible { outline: 2px solid #cbf5ff; outline-offset: 4px; }


@media (max-width: 640px) {
  .pf-bar { font-size: 10px; letter-spacing: .1em; }
}

/* 上の戻る導線を固定し、アプリのヘッダーと本文をその分だけ下げる */
.pf-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.header { top: 39px; }

.app-body { margin-top: 91px; }

@media (max-width: 640px) {
    .header { top: 37px; }
    .app-body { margin-top: 89px; }
}
