* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color: #202124;
    background: #f6f8fb;
    font-family: Arial, "Malgun Gothic", sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
}

.shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.panel {
    width: min(100%, 420px);
    padding: 32px;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(32, 33, 36, 0.08);
}

.eyebrow {
    margin: 0 0 12px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
}

.copy {
    margin: 16px 0 24px;
    color: #5f6368;
    font-size: 16px;
    line-height: 1.65;
}

.login-buttons,
.occurrence-grid {
    display: grid;
    gap: 12px;
}

.google-button,
.naver-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 0 18px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #202124;
    background: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.naver-button {
    border-color: #03c75a;
    color: #ffffff;
    background: #03c75a;
}

.naver-button:hover {
    border-color: #02b351;
    background: #02b351;
}

.google-button:hover {
    background: #f8fafd;
    border-color: #c8d7f0;
}

.google-mark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    background: #4285f4;
    font-weight: 700;
}

.naver-mark {
    font-size: 20px;
    font-weight: 900;
}

.secondary-link {
    color: #1a73e8;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 480px) {
    .panel {
        padding: 24px;
    }

    h1 {
        font-size: 24px;
    }
}

.rotation-page {
    background: #f6f8fb;
}

.rotation-shell {
    width: min(100% - 32px, 900px);
    margin: 0 auto;
    padding: 32px 0;
}

.rotation-header,
.occurrence-heading,
.dialog-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.rotation-header-actions,
.dialog-actions {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.primary-button,
.secondary-button,
.danger-button,
.danger-outline-button,
.occurrence-actions button {
    border: 1px solid #1a73e8;
    border-radius: 4px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button,
.occurrence-actions button {
    color: #fff;
    background: #1a73e8;
}

.secondary-button {
    color: #1a73e8;
    background: #fff;
}

.notification-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notification-count {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
    background: #d93025;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}

.danger-button {
    border-color: #c5221f;
    color: #fff;
    background: #c5221f;
}

.danger-outline-button {
    border-color: #c5221f;
    color: #c5221f;
    background: #fff;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.full-button {
    width: 100%;
}

.rotation-tabs {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.rotation-tab {
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 16px;
    background: #fff;
    cursor: pointer;
}

.rotation-tab.is-active {
    border-color: #1a73e8;
    color: #1a73e8;
    font-weight: 700;
}

.rotation-status {
    min-height: 24px;
    margin: 18px 0 10px;
    color: #5f6368;
    font-size: 14px;
}

.occurrence-card {
    padding: 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
}

.occurrence-card h2,
.rotation-dialog h2 {
    margin: 0;
}

.occurrence-heading p,
.assignee-line,
.due-line,
.attention-line {
    margin: 6px 0 0;
    color: #5f6368;
    font-size: 13px;
}

.status-badge,
.inactive-badge {
    padding: 4px 8px;
    border: 1px solid #dadce0;
    font-size: 11px;
}

.occurrence-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.occurrence-actions button {
    font-size: 12px;
}

.rotation-dialog {
    width: min(100% - 32px, 500px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 24px;
}

.rotation-dialog-wide {
    width: min(100% - 32px, 700px);
}

.rotation-dialog::backdrop {
    background: rgba(32, 33, 36, 0.4);
}

.rotation-dialog label {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
}

.rotation-dialog fieldset {
    margin: 16px 0;
    border: 1px solid #dadce0;
}

.member-check-list,
.chore-management-list {
    display: grid;
    gap: 8px;
}

.member-check-list label,
.rotation-dialog .choice-option {
    display: grid;
    grid-template-columns: auto 1fr;
    margin: 0;
    border-radius: 4px;
    font-weight: 400;
}

.member-check-list label {
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.member-check-list label:hover,
.rotation-dialog .choice-option:hover {
    background: #f6f8fb;
}

.rotation-dialog input:not([type="checkbox"]):not([type="radio"]),
.rotation-dialog select,
.rotation-dialog textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font: inherit;
}

.rotation-dialog input[type="checkbox"],
.rotation-dialog input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.rotation-dialog .choice-option {
    align-items: start;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
}

.choice-copy {
    display: grid;
    gap: 4px;
}

.choice-copy small {
    color: #5f6368;
    font-weight: 400;
    line-height: 1.45;
}

.icon-button {
    border: 1px solid #dadce0;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
}

.form-help {
    margin: 6px 0;
    color: #5f6368;
    font-size: 12px;
    line-height: 1.5;
}

.dialog-actions {
    justify-content: space-between;
    margin-top: 18px;
}

.dialog-divider {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid #dadce0;
}

.notification-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 12px;
}

.notification-stat {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #f8fafd;
}

.notification-stat span {
    color: #5f6368;
    font-size: 12px;
}

.notification-stat strong {
    color: #1a73e8;
    font-size: 24px;
}

.notification-stat-total {
    border-color: #1a73e8;
    background: #eef4fd;
}

.notification-actions {
    justify-content: flex-end;
}

.notification-section + .notification-section {
    margin-top: 24px;
}

.notification-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.notification-section-heading code,
.api-endpoint-note code {
    color: #5f6368;
    font-size: 11px;
}

.notification-empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed #dadce0;
    color: #5f6368;
    text-align: center;
}

.api-endpoint-note {
    margin: 24px 0 0;
    color: #5f6368;
    font-size: 12px;
}

.rotation-dialog h3,
.rotation-dialog h4,
.workflow-card h3 {
    margin: 0;
}

.chore-management-list {
    margin-top: 12px;
}

.workflow-list {
    display: grid;
    gap: 10px;
}

.workflow-card {
    padding: 14px;
    border: 1px solid #dadce0;
    border-radius: 4px;
}

.workflow-card .occurrence-heading p,
.workflow-meta,
.chore-management-meta {
    margin: 5px 0 0;
    color: #5f6368;
    font-size: 12px;
}

.workflow-reason {
    margin: 10px 0;
    white-space: pre-wrap;
}

.chore-management-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
}

.management-row-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.inactive-badge {
    flex: 0 0 auto;
    color: #5f6368;
    background: #f6f8fb;
}

@media (max-width: 600px) {
    .rotation-header {
        flex-direction: column;
    }

    .rotation-header-actions,
    .dialog-actions {
        width: 100%;
    }

    .rotation-header-actions button,
    .dialog-actions button {
        flex: 1 1 auto;
    }

    .chore-management-row {
        align-items: stretch;
        flex-direction: column;
    }

    .management-row-actions button {
        flex: 1 1 auto;
    }

    .notification-summary-grid {
        grid-template-columns: 1fr;
    }

    .notification-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
