:root {
    --bg: #f0ede8;
    --surface: #faf9f6;
    --card: #ffffff;
    --text: #1a1714;
    --muted: #8a8279;
    --border: #e2ddd8;
    --green: #2d6a4f;
    --green-light: #d8f3dc;
    --red: #c1121f;
    --red-light: #ffe8e9;
    --blue: #1d4e89;
    --blue-light: #dbeafe;
    --amber: #b45309;
    --amber-light: #fef3c7;
    --accent: #6d4c41;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.retro-name-input {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    background: var(--bg);
    color: var(--text);
    width: 220px;
}

.retro-name-input:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.header-spacer {
    flex: 1;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.phase-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.phase-btn.active {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

.phase-btn:hover:not(.active) {
    border-color: var(--text);
    color: var(--text);
}

.phase-divider {
    width: 24px;
    height: 1px;
    background: var(--border);
}

main {
    padding: 24px;
}

.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-height: calc(100vh - 180px);
}

@media (max-width: 900px) {
    .board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .board {
        grid-template-columns: 1fr;
    }
}

.column {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.col-title {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.col-count {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
}

.column-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 200px;
}

.column-body.drag-over {
    background: var(--bg);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s;
    position: relative;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.card.dragging {
    opacity: 0.4;
}

.card-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.1s;
}

.card-action-btn:hover {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s;
}

.vote-btn:hover,
.vote-btn.voted {
    background: var(--amber-light);
    border-color: var(--amber);
    color: var(--amber);
}

.add-card-area {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-card-textarea {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    color: var(--text);
    width: 100%;
    min-height: 60px;
}

.add-card-textarea::placeholder {
    color: var(--muted);
}

.add-card-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-primary {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    background: var(--text);
    color: white;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.8;
}

.btn-ghost {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-ghost:hover {
    border-color: var(--text);
    color: var(--text);
}

.add-card-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    width: 100%;
    transition: all 0.15s;
}

.add-card-trigger:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--surface);
    border-radius: 14px;
    padding: 24px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.modal-input {
    width: 100%;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--bg);
    color: var(--text);
    margin-bottom: 14px;
}

.modal-input:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.timer-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.timer-display {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text);
    min-width: 72px;
    transition: color 0.3s;
}

.timer-display.warning {
    color: #ef4444;
}

.timer-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.timer-preset {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.timer-preset:hover {
    border-color: var(--text);
    color: var(--text);
}

.timer-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.timer-btn:hover {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

.timer-btn.running {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.timer-spacer {
    flex: 1;
}

.rank-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--amber-light);
    color: var(--amber);
    border: 1px solid var(--amber);
}

.rank-badge.top {
    background: #fef9c3;
    color: #92400e;
    border-color: #fcd34d;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

.sync-dot.syncing {
    background: #f59e0b;
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.sync-label {
    font-size: 11px;
    color: var(--muted);
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

.share-url {
    font-family: monospace;
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    word-break: break-all;
    color: var(--muted);
    margin-bottom: 12px;
}

.btn-share {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--green);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* DISCUSS LAYOUT */
.discuss-layout {
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

.discuss-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: sticky;
    top: 160px;
    max-height: calc(100vh - 180px);
}

.discuss-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.discuss-sidebar-header h3 {
    font-family: 'Fraunces', serif;
    font-size: 14px;
    font-weight: 700;
    flex: 1;
}

.discuss-progress {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.discuss-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

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

.discuss-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.discuss-item:hover {
    background: var(--bg);
}

.discuss-item.active {
    background: var(--bg);
    border-left-color: var(--accent);
}

.discuss-item.done {
    opacity: 0.45;
}

.discuss-item.done .discuss-item-text {
    text-decoration: line-through;
}

.discuss-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.15s;
    cursor: pointer;
}

.discuss-check:hover {
    border-color: var(--green);
}

.discuss-item.done .discuss-check {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

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

.discuss-item-text {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.discuss-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.discuss-vote-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--amber-light);
    color: var(--amber);
}

.discuss-rank-num {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.discuss-rank-num.top {
    color: var(--amber);
}

.progress-bar-wrap {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 16px 10px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.discuss-board {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-content: start;
}

@media (max-width: 1200px) {
    .discuss-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ACTION ITEMS */
.actions-layout {
    max-width: 860px;
    margin: 0 auto;
}

.actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.actions-header h2 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 700;
}

.actions-header p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.action-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: box-shadow 0.15s;
}

.action-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.action-item.done-item {
    opacity: 0.55;
}

.action-item.done-item .action-text {
    text-decoration: line-through;
    color: var(--muted);
}

.action-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.action-check:hover {
    border-color: var(--green);
    background: var(--green-light);
}

.action-item.done-item .action-check {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

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

.action-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 6px;
}

.action-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-assignee {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: #f3ede8;
    border-radius: 12px;
    padding: 2px 8px;
}

.action-due {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--muted);
}

.action-due.overdue {
    color: var(--red);
    font-weight: 600;
}

.action-source {
    font-size: 11px;
    color: var(--muted);
    background: var(--bg);
    border-radius: 8px;
    padding: 2px 7px;
    border: 1px solid var(--border);
}

.action-delete-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.1s;
    flex-shrink: 0;
}

.action-item:hover .action-delete-btn {
    opacity: 1;
}

.action-delete-btn:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

/* Add action form */
.add-action-form {
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: 16px;
}

.add-action-form textarea {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    color: var(--text);
    width: 100%;
    min-height: 60px;
}

.add-action-form textarea::placeholder {
    color: var(--muted);
}

.add-action-fields {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.add-action-fields input {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
    background: var(--bg);
    color: var(--text);
    flex: 1;
    min-width: 120px;
}

.add-action-fields input:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.add-action-btns {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 10px;
}

.actions-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
    font-size: 14px;
}

.actions-empty .emoji {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-card {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 20px 8px;
}