body {
    background-color: #f5f5f5;
    margin: 0;
    padding-bottom: 6rem;
    font-family: "Noto Sans JP", sans-serif;
}

/* 旧レイアウト用（Figma 導入後は components/app_top_bar.php を使用） */
header.site-header {
    width: 100%;
    height: 70px;
    display: flex;
    padding: 18px 20px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.1);
}

.header-logo {
    width: 70px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #222;
}

.card {
    padding: 2rem;
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 400;
    color: #E17713;
    background-color: transparent;
    border: 1px solid #E17713;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.logout-btn:hover,
.logout-btn:focus {
    color: #fff;
    background-color: #E17713;
    border-color: #E17713;
    outline: none;
}

.row {
    gap: 12px;
}

.col {
    width: 11rem;
    height: 11rem;
    background-color: #ffffff;
    border-radius: 12px;
}

footer {
    height: 65px;
    padding: 1rem 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.home {
    width: 70px;
    height: 70px;
    margin-top: -18px;
    border-radius: 50%;
    background-color: #414141;
    color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(70, 70, 70, 0.838);
}

@media (min-width: 768px) {
    .container {
        padding: 3rem;
    }
}

/* --- Main Content Area（レガシー）---
 * App シェルの main は .frame-body__main を併用する。frames.css の上パディングを
 * 汎用 .main-content に上書きされないよう除外する。 */
.main-content:not(.frame-body__main) {
    padding: 25px 20px 0px 20px;
    margin: 0 auto;
}

/* --- Date Navigation --- */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

.date-nav-arrow {
    padding: 0 10px;
    cursor: pointer;
    color: #E17713;
    font-size: 28px;
}

.prev-day {
    margin-right: 10px;
}

.next-day {
    margin-left: 10px;
}

/* --- Section Title (1限, 2限など) --- */
.section-title {
    font-size: 18px;
    font-weight: 400;
    color: #24272A;
    margin-top: 20px;
    margin-bottom: 8px;
}

/* --- Kanban List (担当館のカードのリスト) --- */
.kanban-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-card {
    background-color: #fff;
    padding: 17px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: space-between;
}

.card-header {
    position: relative;
    align-items: center;
}

.card-title-area {
    display: flex;
    align-items: center;
    margin-right: 15px;
    min-width: 100px;
}

.kan_color {
    width: 3px;
    height: 13px;
    margin-right: 3px;
}

.duty-name {
    font-size: 14px;
    font-weight: 400;
    color: #222;
    margin-left: 3px;
    line-height: 1;
    margin: auto 0;
}

.total-members {
    font-size: 24px;
    font-weight: 400;
    color: #222;
    margin-left: 16px;
    line-height: 1;
}

.total-members small {
    font-size: 12px;
    font-weight: 400;
}

.gakunen-counts {
    display: flex;
    align-items: baseline;
    margin-right: 16px;
    font-weight: 400;
}

.gakunen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    font-size: 14px;
    color: #555;
}

.gakunen-label {
    color: #687078;
    font-size: 12px;
    font-weight: 400;
}

.gakunen-count {
    font-weight: 400;
    font-size: 16px;
}

.toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.card-header .toggle-icon svg {
    transition: transform 0.3s ease;
    display: inline-block;
    width: 23px;
    height: 11px;
}

.card-header .toggle-icon svg path {
    stroke: #E17713;
}

.card-header[aria-expanded="true"] .toggle-icon svg {
    transform: rotate(180deg);
}

.card-header[aria-expanded="false"] .toggle-icon svg {
    transform: rotate(0deg);
}

/* カードの中の詳細リスト */
.member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-list li {
    display: flex;
    align-items: center;
}

.member-list li.status-absent {
    opacity: 0.6;
}

.member-list li:last-child {
    border-bottom: none;
}

.member-name {
    flex-grow: 1;
    margin-right: 10px;
    font-size: 14px;
    color: #333;
}

.member-gakunen {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: 700;

    .status-absent & {
        opacity: 0.8;
    }
}

.member-gakunen.gakunen-4 {
    color: #687078;
}

.member-gakunen.gakunen-3 {
    color: #687078;
}

.member-gakunen.gakunen-2 {
    color: #687078;
}

.member-ban {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 700;

    .status-absent & {
        opacity: 0.8;
    }
}

/* 班の色分け */
.member-ban.ban-nishimoto {
    background-color: #F8FFE6;
    color: #687078;
    font-weight: 400;
}

.member-ban.ban-yoshida {
    background-color: #FFE6E6;
    color: #687078;
    font-weight: 400;
}

.member-ban.ban-furukawa {
    background-color: #E6ECFF;
    color: #687078;
    font-weight: 400;
}

.member-ban.ban-yagi {
    background-color: #FFF1E2;
    color: #687078;
    font-weight: 400;
}

.member-ban.ban-unset {
    background-color: #e9ecef;
    color: #687078;
    font-weight: 400;
}

/* Collapse / Expand Styles */
.card-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.card-collapse.expand {
    /* JSで max-height が auto に設定される場合、transitionendで調整 */
}

/* --- Alert Message Styles --- */
.error-message {
    padding-top: 80px;
    max-width: 500px;
    margin: 20px auto;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: .25rem;
    text-align: center;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* メンバー情報のレイアウト */
.member-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 2px solid rgba(159, 170, 181, 0.30);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.member-gakunen {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    white-space: nowrap;
}

.member-ban {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 700;
    white-space: nowrap;
}

/* 学年の色分け */
.gakunen-4 {
    font-size: 12px;
    font-weight: 400;
    background: #F8FFE6;
}

.gakunen-3 {
    font-size: 12px;
    font-weight: 400;
    background: #FFE6E6;
}

.gakunen-2 {
    font-size: 12px;
    font-weight: 400;
    background: #E6ECFF;
}

/* 欠勤状態 */
.status-absent {
    opacity: 0.5;
}

.member-status {
    font-size: 12px;
    color: #687078;
    margin-right: 8px;
    font-weight: 400;
    white-space: nowrap;
}

.member-name {
    flex-grow: 1;
    font-size: 12px;
    font-weight: 700;
    color: #687078;
}

/* 欠勤者全体のスタイル */
.member-item.status-absent {
    opacity: 0.6;
}

/* --- Figma frame-home / frame-body 上の main-content ---
 * 注: frame-page は body ではなくラッパー div に付与されている */
.frame-page {
    background: #ffffff;
    padding-bottom: 0;
}

.frame-page .frame-body__main.main-content {
    margin: 0 auto;
    max-width: 100%;
    padding: calc(var(--frame-top-h) + 8px + var(--frame-safe-top, 0px)) 16px 24px;
    padding-bottom: calc(var(--frame-bottom-h) + 24px);
}

.frame-page--portal .frame-body__main.main-content {
    padding-left: 16px;
    padding-right: 16px;
}

.frame-page .error-message {
    padding-top: 0;
}

.portal-demo-banner {
    margin: 0 0 1rem;
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    color: #8b4513;
    background: linear-gradient(135deg, #fdf2e7 0%, #fffdfb 100%);
    border: 1px solid rgba(225, 119, 19, 0.35);
    border-radius: 12px;
    text-align: center;
}

.portal-demo-banner code {
    font-size: 0.85em;
}

.portal-demo-banner--success {
    color: #14532d;
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border-color: rgba(22, 163, 74, 0.45);
}

/* --- 休み申請（Body フレーム · [Figma Body](https://www.figma.com/design/UyAqzKNkbPl2mW73NMo7iC/) 準拠） --- */
.leave-flash {
    margin: 0 0 1rem;
    padding: 12px 14px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.45;
    border-radius: 12px;
}

.leave-flash--success {
    color: #14532d;
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border: 1px solid rgba(22, 163, 74, 0.35);
}

.leave-flash--error {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid rgba(185, 28, 28, 0.35);
}

.leave-hero {
    margin-bottom: 20px;
}

.leave-main .leave-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #191c21;
}

.leave-main .leave-lead {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #424752;
}

.leave-panel {
    background: var(--frame-surface, #fff);
    border-radius: 20px;
    box-shadow: var(--frame-shadow-main, 0 4px 4px rgba(0, 0, 0, 0.04));
    border: 1px solid rgba(225, 119, 19, 0.1);
    padding: 22px 18px 26px;
    margin-bottom: 20px;
}

.leave-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leave-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leave-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e17713;
}

.leave-required {
    color: #b91c1c;
    font-weight: 800;
}

.leave-input,
.leave-textarea,
.leave-select {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 12px;
    font-size: 1rem;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    background: #efefef;
    color: #191c21;
    transition: box-shadow 0.15s ease;
}

.leave-select {
    cursor: pointer;
    appearance: none;
    padding-right: 40px;
    background-color: #efefef;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

.leave-input--readonly {
    background: #e8e8ea !important;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
}

.leave-input--readonly:focus {
    box-shadow: none;
}

.leave-textarea {
    min-height: 128px;
    resize: vertical;
    line-height: 1.55;
}

.leave-input:focus,
.leave-textarea:focus,
.leave-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(225, 119, 19, 0.35);
}

.leave-submit {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 14px;
    background: #e17713;
    cursor: pointer;
    transition: background 0.15s ease;
}

.leave-submit__icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.leave-submit:hover {
    background: #c9690f;
}

.leave-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 14px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fdf6ed 0%, #fffdfb 100%);
    border: 1px solid rgba(225, 119, 19, 0.2);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.leave-notice__icon {
    flex-shrink: 0;
    color: #e17713;
    font-size: 1.35rem;
    line-height: 1;
}

.leave-notice__title {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #191c21;
}

.leave-notice__text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #424752;
}

.leave-field--fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.leave-slot-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.leave-slot-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #efefef;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #191c21;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.leave-slot-option:has(input:focus-visible) {
    outline: 2px solid rgba(225, 119, 19, 0.45);
    outline-offset: 2px;
}

.leave-slot-option:has(input:checked) {
    background: rgba(225, 119, 19, 0.14);
    box-shadow: inset 0 0 0 2px rgba(225, 119, 19, 0.55);
}

.leave-slot-option input {
    margin: 0;
    accent-color: #e17713;
}

.leave-history {
    margin-top: 8px;
    padding-top: 8px;
}

.leave-history__title {
    margin: 0 0 14px;
    font-size: 1.125rem;
    font-weight: 800;
    color: #191c21;
    letter-spacing: 0.02em;
}

.leave-history__empty {
    margin: 0;
    padding: 16px 14px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 14px;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.leave-history__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leave-history__item {
    margin: 0;
    padding: 16px 14px 14px;
    background: var(--frame-surface, #fff);
    border-radius: 16px;
    border: 1px solid rgba(225, 119, 19, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.leave-history__meta {
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #9ca3af;
}

.leave-history__dl {
    margin: 0;
}

.leave-history__row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 6px 12px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    align-items: start;
}

.leave-history__row:last-child {
    margin-bottom: 0;
}

.leave-history__row dt {
    margin: 0;
    font-weight: 700;
    color: #6b7280;
}

.leave-history__row dd {
    margin: 0;
    color: #191c21;
    word-break: break-word;
}

/* 休み申請・送信前確認モーダル（form_check レイアウト） */
.leave-check-modal {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
}

.leave-check-modal__panel {
    max-width: 400px;
    text-align: left;
    padding: 22px 20px 24px;
}

.leave-check-modal__title {
    margin: 0 0 16px;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: left;
    color: #e17713;
}

.leave-check-modal__summary {
    padding: 16px 14px;
    border-radius: 14px;
    background: #f2f2f2;
    box-sizing: border-box;
}

.leave-check-modal__summary .leave-check-modal__dl {
    margin: 0;
}

.leave-check-modal__row {
    display: grid;
    grid-template-columns: 6.25rem 1fr;
    gap: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    align-items: start;
}

.leave-check-modal__row:last-child {
    margin-bottom: 0;
}

.leave-check-modal__summary .leave-check-modal__row dt {
    margin: 0;
    font-weight: 800;
    color: #191c21;
}

.leave-check-modal__summary .leave-check-modal__row dd {
    margin: 0;
    font-weight: 400;
    color: #191c21;
    word-break: break-word;
}

.leave-check-modal__dd--empty {
    min-height: 1.35em;
}

.leave-check-modal__question {
    margin: 20px 0 18px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: #191c21;
}

.leave-check-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.leave-check-modal__btn {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.leave-check-modal__btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.leave-check-modal__btn--primary {
    color: #fff;
    background: #e17713;
    box-shadow: 0 4px 14px rgba(225, 119, 19, 0.38);
}

.leave-check-modal__btn--primary:hover:not(:disabled) {
    background: #c9690f;
    color: #fff;
}

.leave-check-modal__btn--cancel {
    color: #e17713;
    background: #fff;
    border: 2px solid #e17713;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.leave-check-modal__btn--cancel:hover:not(:disabled) {
    background: #fffdfb;
}

/* --- リンク集（home フレームの暖色に統一 · 旧 Azure 青系は不使用） --- */
.archive-main .archive-eyebrow {
    margin: 0 0 4px;
    font-family: var(--frame-font-display, "Plus Jakarta Sans", sans-serif);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e17713;
}

.archive-main .archive-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #191c21;
}

.archive-main .archive-lead {
    margin: 0 0 24px;
    font-size: 0.875rem;
    color: #424752;
}

.archive-panel {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(225, 119, 19, 0.12);
    padding: 20px 18px 24px;
    margin-bottom: 20px;
}

.archive-panel__title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #191c21;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-panel__title .bi {
    color: #e17713;
}

.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    background: #fdf2e7;
    border-radius: 12px;
    border: 1px solid rgba(225, 119, 19, 0.15);
}

.archive-list__name {
    font-size: 0.8125rem;
    color: #333;
    word-break: break-all;
}

.archive-list__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #e17713;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.archive-list__btn:hover {
    background: #c9690f;
    color: #fff;
}

.archive-empty {
    margin: 0;
    font-size: 0.875rem;
    color: #424752;
}

.archive-back {
    margin: 0;
    text-align: center;
}

.archive-back__link {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e17713;
    text-decoration: none;
}

.archive-back__link:hover {
    text-decoration: underline;
}

/* --- Figma Home: 日付ナビ · 館タブ · メンバーリスト --- */
.app-top-bar__title--spacer {
    flex: 1;
    min-height: 1px;
}

.app-top-bar__end {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.app-top-bar__user {
    flex-shrink: 0;
}

.app-top-bar__avatar-img {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(225, 119, 19, 0.25);
}

.app-top-bar__avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-family: var(--frame-font-display, "Plus Jakarta Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--frame-main, #e17713);
    background: var(--frame-sub1, #fdf2e7);
    border: 1px solid rgba(225, 119, 19, 0.25);
}

/* ── 休み申請: ステータスバッジ ───────────────────── */
.leave-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}
.leave-status--pending {
    background: #fef9c3;
    color: #92400e;
    border: 1px solid #fde68a;
}
.leave-status--approved {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.leave-status--rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.leave-history__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── 休み申請: 承認ページ ───────────────────────── */
.leave-approval {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.leave-approval__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.leave-approval__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e17713;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.leave-approval__item--processed {
    opacity: 0.85;
}
.leave-approval__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.leave-approval__loading,
.leave-approval__empty {
    color: #6b7280;
    font-size: 0.9rem;
    padding: 24px 0;
    text-align: center;
}
.leave-approval__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.leave-approval__item {
    background: #fff;
    border: 1px solid rgba(225, 119, 19, 0.18);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.leave-approval__header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.leave-approval__name {
    font-weight: 700;
    font-size: 1rem;
    color: #111;
}
.leave-approval__email {
    font-size: 0.78rem;
    color: #6b7280;
}
.leave-approval__dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0;
}
.leave-approval__row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 8px;
}
.leave-approval__row dt {
    font-size: 0.78rem;
    color: #e17713;
    font-weight: 600;
}
.leave-approval__row dd {
    font-size: 0.88rem;
    color: #111;
    margin: 0;
}
.leave-approval__actions {
    display: flex;
    gap: 10px;
}
.leave-approval__btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.leave-approval__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.leave-approval__btn--approve {
    background: #22c55e;
    color: #fff;
}
.leave-approval__btn--approve:hover:not(:disabled) {
    background: #16a34a;
}
.leave-approval__btn--reject {
    background: #fff;
    color: #ef4444;
    border: 1.5px solid #ef4444;
}
.leave-approval__btn--reject:hover:not(:disabled) {
    background: #fee2e2;
}

.portal-date-nav {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.portal-date-nav__pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    min-height: 56px;
    padding: 8px 10px;
    box-sizing: border-box;
    background: #fff5eb;
    border: 1px solid rgba(225, 119, 19, 0.18);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(225, 119, 19, 0.06);
}

.portal-date-nav__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    font-size: 1.125rem;
    line-height: 1;
    color: #e17713;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.portal-date-nav__arrow:hover {
    background: rgba(225, 119, 19, 0.12);
    color: #d35400;
}

.portal-date-nav__arrow:focus-visible {
    outline: 2px solid #e17713;
    outline-offset: 2px;
}

.portal-date-nav__center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
}

.portal-date-nav__eyebrow {
    display: block;
    font-family: var(--frame-font-display, "Plus Jakarta Sans", sans-serif);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #e17713;
    line-height: 1.2;
    text-transform: none;
}

.portal-date-nav__eyebrow--today {
    letter-spacing: 0.2em;
}

.portal-date-nav__eyebrow--next {
    letter-spacing: 0.18em;
}

.portal-date-nav__date {
    display: block;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    color: #e17713;
    letter-spacing: 0.02em;
    line-height: 1.25;
}

.portal-hall-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.portal-hall-tabs__btn {
    flex: 0 0 auto;
    cursor: pointer;
    text-align: center;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    color: #424752;
    background: #efefef;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.portal-hall-tabs__btn:hover {
    background: #e8e8e8;
}

.portal-hall-tabs__btn--active {
    background: #e17713;
    color: #fff;
    border-color: #e17713;
}

.portal-hall-tabs__btn--active:hover {
    background: #e17713;
    color: #fff;
    border-color: #e17713;
}

.portal-member-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.portal-member-section__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #191c21;
}

.portal-member-section__badge {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fff;
    background: #e17713;
    border-radius: 999px;
}

.portal-member-empty {
    margin: 0;
    padding: 24px 16px;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.portal-member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-member-card-wrap {
    list-style: none;
}

button.portal-member-card {
    width: 100%;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.portal-member-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    padding: 8px 12px 8px 12px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.portal-member-card--full {
    padding-left: 14px;
    border-left: none;
}

.portal-member-card--full::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #e17713;
    border-radius: 16px 0 0 16px;
    pointer-events: none;
}

.portal-member-card__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: #fdf2e7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-member-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-member-card__initial {
    font-size: 1rem;
    font-weight: 700;
    color: #c45c26;
}

.portal-member-card__body {
    flex: 1;
    min-width: 0;
}

.portal-member-card__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #191c21;
    line-height: 1.25;
}

.portal-member-card__shift {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #c45c26;
    background: #fdf2e7;
    border-radius: 999px;
    white-space: nowrap;
}

.portal-sheet-alert {
    margin: 0 0 1rem;
    padding: 12px 14px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
}

/* メンバー詳細は常にビューポート中央（.app-modal の狭画面用 flex-end を上書き） */
.portal-member-modal {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
}

.portal-member-modal__panel {
    max-width: 400px;
}

.portal-member-modal__dl {
    margin: 0 0 1rem;
}

.portal-member-modal__row {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
    font-size: 0.875rem;
    align-items: start;
}

.portal-member-modal__row:last-child {
    margin-bottom: 0;
}

.portal-member-modal__row dt {
    margin: 0;
    font-weight: 700;
    color: #6b7280;
}

.portal-member-modal__row dd {
    margin: 0;
    color: #191c21;
    word-break: break-word;
}

/* --- スケルトン（ローディング） --- */
@keyframes portal-skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.portal-skeleton__pulse,
.leave-skeleton__pulse {
    background: linear-gradient(
        90deg,
        #ececec 0%,
        #f5f5f5 40%,
        #ececec 80%
    );
    background-size: 200% 100%;
    animation: portal-skeleton-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
}

.portal-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 40vh;
}

.portal-skeleton__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.portal-skeleton__line {
    display: block;
    border-radius: 8px;
}

.portal-skeleton__line--short {
    width: 56px;
    height: 14px;
}

.portal-skeleton__line--nav {
    width: min(100%, 280px);
    height: 40px;
    border-radius: 12px;
}

.portal-skeleton__line--title {
    width: 40%;
    height: 18px;
    margin-bottom: 4px;
}

.portal-skeleton__line--grow {
    flex: 1;
    height: 14px;
}

.portal-skeleton__tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.portal-skeleton__pill {
    width: 72px;
    height: 36px;
    border-radius: 999px;
}

.portal-skeleton__card {
    background: var(--frame-surface, #fff);
    border-radius: 20px;
    border: 1px solid rgba(225, 119, 19, 0.1);
    padding: 16px 14px 20px;
    box-shadow: var(--frame-shadow-main, 0 4px 4px rgba(0, 0, 0, 0.04));
}

.portal-skeleton__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(159, 170, 181, 0.2);
}

.portal-skeleton__row:last-child {
    border-bottom: none;
}

.portal-skeleton__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.leave-skeleton {
    margin-top: 4px;
}

.leave-skeleton__panel {
    background: var(--frame-surface, #fff);
    border-radius: 20px;
    border: 1px solid rgba(225, 119, 19, 0.1);
    padding: 22px 18px 26px;
    box-shadow: var(--frame-shadow-main, 0 4px 4px rgba(0, 0, 0, 0.04));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leave-skeleton__line {
    display: block;
    height: 12px;
    border-radius: 6px;
}

.leave-skeleton__line--label {
    width: 35%;
    max-width: 120px;
}

.leave-skeleton__line--field {
    width: 100%;
    height: 44px;
    border-radius: 12px;
}

.leave-skeleton__line--slots {
    width: 100%;
    height: 44px;
    border-radius: 12px;
}

.leave-skeleton__line--textarea {
    width: 100%;
    height: 96px;
    border-radius: 12px;
}

.leave-skeleton__btn {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border-radius: 14px;
}