@charset "utf-8";

:root {
    --main-theme: #71b2bc;
    --sub-theme: #aaa;
    --body-bg: #ffffff;
    --text-dark-color: #1b1b1b;
    --text-light-color: #fff;
}

/*------------------------------------------------------ */

/* リセットCSS */

html {
    scroll-behavior: smooth;
}

* {
    position: relative;
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}

body {
    line-height: 1.8em;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-weight: 300;
    background-color: var(--body-bg);
    color: var(--text-dark-color);
}

ol,
ul {
    margin: 1em;
}

li {
    margin: 0.4em 1em;
    line-height: 1.6em;
}

li::marker {
    color: var(--main-theme);
}

a {
    text-decoration: none;
    color: var(--main-theme);
    transition: color 0.3s;
}

a:hover {
    color: var(--text-dark-color);
}

p {
    line-height: 1.8em;
    margin: 16px 0;
}

mark {
    color: inherit;
    background-color: rgb(0 0 0 / 0);
    background-image: linear-gradient(rgba(0, 0, 0, 0) 60%, var(--sub-theme) 60%);
}

::selection {
    background-color: var(--main-theme);
    color: var(--body-bg);
}

hr {
    margin: 64px;
    margin-inline: auto;
    width: 70%;
    border: none;
    border-top: 1px solid rgb(0 0 0 /0.1);
}

button {
    margin: 0 4px;
    padding: 8px 16px;
    border: none;
    cursor: pointer;

    background-color: var(--main-theme);
    color: var(--text-light-color);
    transition: background-color 0.3s;
}

img {
    max-width: 100%;
}

.clause {
    display: inline-block;
}

header {
    margin: 1em;
    margin-inline: auto;
    padding: 0 1em;
    max-width: 800px;
}

table {
    margin-bottom: 1em;
    width: 100%;
    table-layout: auto;

    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 0.2em;
    text-align: center;
    border: 1px solid #ccc;
}

thead {
    background: #eee;
}

/* -------------------------------------------------------------- */

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', Meiryo,
        sans-serif;
    color: #1b1b1b;
    background: #f9f9f9;
}

h1 {
    margin: 2em 0;
    text-align: center;
}

#control-panel {
    margin: 1em;
    text-align: center;

    #updateButton,
    #expandAllButton,
    #collapseAllButton {
        margin: 0 0.5em;
        padding: 0.5em 2em;

        transition: background-color 0.3s ease;
        color: var(--text-dark-color);
        background-color: #eee;
        border: none;
        font-size: 1rem;
    }
}

:where(#updateButton, #expandAllButton, #collapseAllButton):hover {
    background-color: #ccc;
}

#record-container {
    margin-inline: auto;
    max-width: 900px;
}

/* アコーディオン --------------------------------------------------- */
.accordion-item {
    margin: 1em;

    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em 1em;

    cursor: pointer;
    font-weight: bold;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.accordion-header:hover {
    background-color: #e0e0e0;
}

.accordion-header .toggle-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease-in-out;
}

.accordion-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.accordion-content {
    background-color: #fff;
}

.accordion-content.hidden {
    display: none;
}

/* 年・月ヘッダー */
.year-header {
    background-color: #d9edf7;
    color: #31708f;
}

.month-header {
    background-color: #dff0d8;
    color: #3c763d;
}

.small-btn {
    width: 100%;
    margin: 0;

    color: #1b1b1b;
    background: #eee;
}

/* ポップアップ ------------------------------------------------- */
#popup-detail {
    display: none;
    position: fixed;
    padding: 1rem;
    top: auto;
    left: auto;
    max-width: 300px;
    max-height: 80vh;

    overflow-y: auto;
    z-index: 9999;

    border-radius: 6px;
    background: #fff;
    border: 1px solid #888;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 0.25rem 0.4rem;
        border: 1px solid #ddd;
        text-align: center;
    }
}

#popup-close-btn {
    position: absolute;
    padding: 0 6px;
    top: 4px;
    right: 6px;
    z-index: 5;

    cursor: pointer;

    line-height: 1;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 3px;
    color: #fff;
    background: #f44;
}

.gender-male {
    font-weight: bold;
    color: navy;
}

.gender-female {
    font-weight: bold;
    color: firebrick;
}

.gender-other {
    font-weight: bold;
    color: rgb(0 0 0 / 0.5);
}
