@charset "UTF-8";
/* 日程調整ツール — gjsscと同じデザイントークン・コンポーネント語彙に合わせてある */

:root {
    --accent: #403999;
    --accent-dark: #322c7a;
    --accent-soft: #ece9fb;
    --accent-line: #d9d4f3;

    --ink: #1c1b26;
    --ink-2: #4a4857;
    --muted: #8a8796;

    --bg: #ffffff;
    --panel: #ffffff;
    --line: #e8e6ef;
    --line-2: #f2f1f7;

    --ok: #1f9d63;
    --warn: #c98a12;
    --danger: #d0473f;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(28, 27, 38, .05), 0 8px 24px rgba(64, 57, 153, .06);
    --shadow-lg: 0 12px 40px rgba(64, 57, 153, .14);
    --transition: all 0.15s ease;

    /* main.js のインライン style が参照している旧変数名（削除すると崩れるため維持） */
    --primary-color: var(--accent);
    --primary-hover: var(--accent-dark);
    --card-bg: var(--panel);
    --card-border: var(--line);
    --text-main: var(--ink);
    --text-muted: var(--muted);
    --success: var(--ok);
    --warning: var(--warn);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.app-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

/* ---------- ヘッダー ---------- */
.top-navbar {
    background: rgba(255, 255, 255, .93);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: Outfit, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -.02em;
}

.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1201;
    border-radius: 4px;
    transition: background .15s;
}
.menu-toggle:hover { background: var(--line-2); }

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    background: var(--accent);
    height: 2.5px;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger {
    width: 24px;
    position: relative;
    margin: 0 auto;
}

.hamburger::before {
    position: absolute;
    top: -8px;
    width: 100%;
}

.hamburger::after {
    position: absolute;
    bottom: -8px;
    width: 100%;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    background: var(--accent);
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    background: var(--accent);
    transform: rotate(-45deg);
    bottom: 0;
}

/* ---------- サイドドロワー（gjsscの.side-drawerと同じ配色・挙動） ---------- */
.nav-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--accent);
    z-index: 1200;
    transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: none;
    padding-top: 76px;
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
    box-shadow: 8px 0 40px rgba(0, 0, 0, .28);
}

.nav-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    gap: 2px;
}

.nav-item {
    display: block;
    padding: 14px 28px;
    border-radius: 0;
    text-decoration: none;
    color: rgba(255, 255, 255, .85);
    transition: var(--transition);
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    border-left-color: #ffcd38;
}

.nav-item.active {
    background: transparent;
    color: #ffcd38;
    font-weight: 700;
    border-left-color: #ffcd38;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

/* ---------- カード（gjsscの.cardと同じ見た目） ---------- */
.glass-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease-out;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

h1 {
    font-family: Outfit, sans-serif;
    font-size: 1.7rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1.5rem;
}

p {
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    color: var(--ink-2);
    margin-bottom: 0.4rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(64, 57, 153, .12);
}

/* ---------- ボタン（gjsscの.btnと同じ語彙） ---------- */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    font-size: .92rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-secondary {
    background: var(--line-2);
    color: var(--ink);
}

.btn-secondary:hover {
    background: var(--line);
}

.date-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.date-item {
    display: flex;
    gap: 0.5rem;
    animation: slideIn 0.2s ease-out;
}

.remove-date {
    background: #fdf3f2;
    color: var(--danger);
    padding: 0.75rem;
}

.remove-date:hover {
    background: #fbe4e2;
}

/* ---------- 表（gjsscの.dtableと同じ見た目） ---------- */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid var(--line-2);
    border-right: 1px solid var(--line-2);
}

th {
    background: var(--line-2);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

th:last-child, td:last-child {
    border-right: none;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #ffffff;
    box-shadow: 2px 0 5px -2px rgba(28, 27, 38, .08);
}

tr:last-child td {
    border-bottom: none;
}

.vote-0 { color: var(--danger); font-weight: bold; }
.vote-1 { color: var(--warn); font-weight: bold; }
.vote-2 { color: var(--ok); font-weight: bold; }

/* Voting UI */
.vote-options {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.vote-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--line-2);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
}

.vote-btn.selected[data-val="0"] { border-color: var(--danger); background: #fdf2f1; color: var(--danger); }
.vote-btn.selected[data-val="1"] { border-color: var(--warn); background: #fff5e2; color: var(--warn); }
.vote-btn.selected[data-val="2"] { border-color: var(--ok); background: #edf9f2; color: var(--ok); }

.vote-list-item {
    border-radius: var(--radius-sm) !important;
}

/* Copy Link Area */
.share-area {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-area input {
    flex: 1;
    background: var(--line-2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------- カレンダー ---------- */
.calendar-wrapper {
    background: var(--line-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--ink-2);
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn-icon:hover {
    background: var(--line);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.calendar-grid .day-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    padding-bottom: 0.5rem;
}

.calendar-grid .day-cell {
    padding: 0.5rem 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.86rem;
    border: 2px solid transparent;
    color: var(--ink-2);
}

.calendar-grid .day-cell:not(.empty):not(.selected):hover {
    background: var(--accent-soft);
}

.calendar-grid .day-cell.selected {
    background: var(--accent);
    color: white;
    font-weight: bold;
}

.calendar-grid .day-cell.empty {
    cursor: default;
}

/* Selected Dates List */
.selected-dates-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selected-date-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--line-2);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    animation: slideIn 0.2s ease-out;
}

.selected-date-item span {
    font-weight: 600;
    color: var(--ink);
}

.selected-date-item select {
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    outline: none;
}

.empty-msg {
    color: var(--muted);
    font-style: italic;
}

/* Short Calendar Grid */
.short-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.short-day-cell {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--line);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.short-day-cell .day-of-week {
    font-size: 0.72rem;
    color: var(--muted);
}

.short-day-cell .day-num {
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--ink);
}

.short-day-cell:not(.selected):hover {
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

.short-day-cell.selected {
    background: var(--accent);
    border-color: var(--accent);
}

.short-day-cell.selected .day-num {
    color: #fff;
}

.short-day-cell.selected .day-of-week {
    color: rgba(255, 255, 255, .8);
}

/* Time Pills（gjsscの.chip/.switchと同じ語彙） */
.time-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-pill {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--line-2);
    color: var(--ink-2);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
    user-select: none;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.time-pill:not(.selected):hover {
    background: var(--line);
}

.time-pill.selected {
    background: var(--accent);
    color: white;
}

/* ---------- モーダル（gjsscのdialogと同じ見た目） ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 27, 38, .38);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--panel);
    border: 0;
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--muted);
    padding: 4px 8px;
}

.time-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.time-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.time-checkbox-label:hover {
    background: var(--line-2);
}

.time-checkbox-label input[type="checkbox"] {
    width: 1.3rem;
    height: 1.3rem;
    cursor: pointer;
    accent-color: var(--accent);
}

.foot {
    text-align: center;
    color: var(--muted);
    font-size: .82rem;
    padding: 16px 0 24px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.5rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    h1 {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .navbar-container {
        padding: 0.75rem 1rem 0.75rem 0;
    }

    .calendar-grid .day-cell, .short-day-cell {
        padding: 0.35rem;
        font-size: 0.85rem;
    }

    .short-day-cell .day-num {
        font-size: 1rem;
    }

    .short-day-cell .day-of-week {
        font-size: 0.65rem;
    }

    .calendar-header h3 {
        font-size: 1rem;
    }

    .btn {
        min-height: 46px;
    }

    th, td {
        padding: 0.7rem 0.5rem;
    }
}
