:root {
    --tasru-ink: #12333d;
    --tasru-muted: #5f7178;
    --tasru-primary: #2990b3;
    --tasru-secondary: #39c4cf;
    --tasru-accent: #2ae8e6;
    --tasru-primary-deep: #176a87;
    --tasru-cream: #f6fcfd;
    --tasru-peach: #e8fafc;
    --tasru-line: #cfecef;
    --tasru-shadow: 0 14px 36px rgb(16 84 105 / 10%);
}

body.fi-body {
    color: var(--tasru-ink);
    background:
        radial-gradient(circle at 78% 2%, rgb(42 232 230 / 13%), transparent 28rem),
        linear-gradient(180deg, #fbfeff 0, #f4fafb 42rem);
}

.fi-topbar > nav {
    border-bottom-color: rgb(57 196 207 / 18%);
    background: rgb(255 255 255 / 88%);
    box-shadow: 0 8px 28px rgb(16 84 105 / 6%);
    backdrop-filter: blur(16px);
}

.fi-sidebar {
    border-right-color: var(--tasru-line);
    background: linear-gradient(180deg, #fbfeff 0%, #f0fbfc 100%);
}

.fi-sidebar-header {
    border-bottom: 1px solid var(--tasru-line);
    background: transparent;
}

.fi-sidebar-item-button {
    min-height: 2.8rem;
    border-radius: 0.85rem;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.fi-sidebar-item-button:hover {
    transform: translateX(2px);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    color: var(--tasru-primary-deep);
    background: linear-gradient(135deg, #e8f9fb, #dffbfc);
    box-shadow: inset 3px 0 0 var(--tasru-primary);
}

.fi-main {
    padding-bottom: 7rem;
}

.fi-page-header-main-ctn {
    gap: 0.65rem;
}

.fi-header-heading {
    color: var(--tasru-ink);
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.025em;
}

.fi-breadcrumbs-item-label {
    color: #267e99;
}

.fi-section {
    overflow: hidden;
    border: 1px solid rgb(177 220 226 / 78%);
    border-radius: 1.15rem;
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--tasru-shadow);
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.fi-section:hover {
    box-shadow: 0 18px 44px rgb(16 84 105 / 13%);
}

.fi-section-header {
    position: relative;
    padding-block: 1.25rem;
    background: linear-gradient(110deg, #fbfeff 0%, #eafafb 100%);
}

.fi-section-header::before {
    position: absolute;
    inset: 1rem auto 1rem 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, var(--tasru-accent), var(--tasru-primary));
    content: '';
}

.fi-section-header-heading {
    color: var(--tasru-ink);
    font-size: 1.05rem;
    font-weight: 750;
}

h3.fi-section-header-heading {
    color: var(--tasru-primary-deep);
    font-size: 1rem;
    font-weight: 750;
}

.fi-section-header:has(h3.fi-section-header-heading) {
    padding-block: 1rem;
    background: #f6fcfd;
}

.fi-section-header:has(h3.fi-section-header-heading)::before {
    inset-block: 0.95rem;
    width: 3px;
    background: var(--tasru-primary);
}

h4.fi-section-header-heading,
.tasru-heading-h4 {
    color: #405e68;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.fi-section-header:has(h4.fi-section-header-heading) {
    padding-block: 0.85rem;
    background: #fff;
}

.fi-section-header:has(h4.fi-section-header-heading)::before {
    display: none;
}

.tasru-heading-h4 {
    padding: 0.55rem 0.75rem;
    border-inline-start: 3px solid var(--tasru-secondary);
    border-radius: 0 0.45rem 0.45rem 0;
    background: #f1fafb;
    line-height: 1.55;
}

h5.fi-section-header-heading,
.tasru-heading-h5 {
    color: #48636c;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.fi-section-header-description {
    color: var(--tasru-muted);
    line-height: 1.7;
}

.fi-section-content-ctn {
    border-top-color: rgb(207 236 239 / 85%);
}

.fi-section-content {
    padding: clamp(1.25rem, 2vw, 1.75rem);
}

.tasru-profile-section {
    border-color: rgb(41 144 179 / 34%);
    background:
        radial-gradient(circle at 92% 12%, rgb(42 232 230 / 18%), transparent 19rem),
        rgb(255 255 255 / 96%);
}

.tasru-profile-section .fi-section-header {
    background: linear-gradient(115deg, #eafafb 0%, #fbfeff 62%, #ddfbfc 100%);
}

.tasru-profile-section .fi-section-content > .grid {
    align-items: center;
}

.tasru-profile-section .fi-fo-file-upload {
    max-width: 10rem;
}

.tasru-profile-section .fi-fo-file-upload .filepond--root {
    margin-bottom: 0;
}

.tasru-profile-section .fi-fo-file-upload .filepond--drop-label {
    min-height: 7.5rem;
    border-width: 2px;
    background: linear-gradient(145deg, #fbfeff, #defbfc);
    box-shadow: 0 10px 28px rgb(16 84 105 / 12%);
}

.fi-fo-field-wrp-label label,
.fi-fo-field-wrp-label span {
    color: #374151;
    font-weight: 650;
}

.fi-input-wrp {
    min-height: 2.85rem;
    border: 1px solid #8fbec7;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 1px 3px rgb(16 84 105 / 8%);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.fi-input-wrp:hover {
    border-color: #4f9bb0;
}

.fi-input-wrp:focus-within {
    border-color: var(--tasru-primary);
    box-shadow: 0 0 0 4px rgb(57 196 207 / 16%);
}

.fi-input-wrp.fi-disabled,
.fi-input-wrp:has(:disabled) {
    border-color: #b8d2d7;
    background: #f8fafc;
}

.fi-fo-field-wrp-helper-text,
.fi-fo-field-wrp-hint {
    color: var(--tasru-muted);
    line-height: 1.65;
}

.fi-fo-file-upload .filepond--drop-label {
    min-height: 8.5rem;
    border: 1.5px dashed var(--tasru-secondary);
    border-radius: 1rem;
    background: linear-gradient(145deg, #fbfeff, #e7fbfc);
}

.fi-fo-file-upload .filepond--drop-label:hover {
    background: #dffbfc;
}

/*
 * イベント画像のFilePond初期化中はブラウザ標準のファイル入力を隠し、
 * 完了まで画像入力の準備中であることを表示する。
 */
.tasru-event-image-upload .fi-fo-file-upload:not(:has(.filepond--root)) {
    position: relative;
    display: grid;
    width: min(150px, 100%);
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 2px solid #b9dce2;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #f7feff, #e5f7f9);
}

.tasru-event-image-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
    width: 1.65rem;
    height: 1.65rem;
    border: 3px solid #b8dce3;
    border-top-color: var(--tasru-primary);
    border-radius: 9999px;
    content: '';
    animation: tasru-event-image-loading-spin 0.8s linear infinite;
}

.tasru-event-image-upload .fi-fo-file-upload:not(:has(.filepond--root))::after {
    position: absolute;
    top: calc(50% + 1.25rem);
    left: 50%;
    width: 100%;
    padding: 0 0.5rem;
    color: #376673;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    content: '画像入力を準備中…';
    transform: translateX(-50%);
}

.tasru-event-image-upload .fi-fo-file-upload:not(:has(.filepond--root)) input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.tasru-event-image-upload.tasru-event-image-initialization-failed .fi-fo-file-upload:not(:has(.filepond--root))::before,
.tasru-image-file-upload.tasru-event-image-initialization-failed .fi-fo-file-upload:not(:has(.filepond--root))::before {
    border: 0;
    color: #b42318;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    content: '!';
    animation: none;
}

.tasru-event-image-upload.tasru-event-image-initialization-failed .fi-fo-file-upload:not(:has(.filepond--root))::after,
.tasru-image-file-upload.tasru-event-image-initialization-failed .fi-fo-file-upload:not(:has(.filepond--root))::after {
    top: calc(50% + 0.75rem);
    color: #b42318;
    content: '画像を表示できませんでした';
}

.tasru-event-image-retry {
    position: absolute;
    right: 0.75rem;
    bottom: 0.55rem;
    left: 0.75rem;
    z-index: 2;
    border: 1px solid #b42318;
    border-radius: 0.6rem;
    background: #fff;
    padding: 0.25rem 0.5rem;
    color: #b42318;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

@keyframes tasru-event-image-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tasru-event-image-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
        animation: none;
    }
}

/* イベント画像は、未登録時の「＋」と登録後のサムネイルを同じ正方形にする。 */
.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] {
    position: relative;
    min-height: 150px;
    margin-bottom: 0;
    background: transparent;
    overflow: hidden;
    transition: height 180ms ease;
}

.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label {
    position: absolute !important;
    top: var(--tasru-event-add-top, 0) !important;
    left: var(--tasru-event-add-left, 0) !important;
    z-index: 5;
    width: min(150px, 100%);
    height: 150px !important;
    min-height: 150px;
    padding: 0;
    border-width: 2px;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
    box-shadow: 0 12px 30px rgb(16 84 105 / 12%);
    opacity: 1 !important;
    visibility: visible;
    transform: none !important;
    transition:
        top 180ms ease,
        left 180ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label label {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--tasru-primary-deep);
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.tasru-event-image-upload.tasru-event-image-converting .filepond--drop-label label,
.tasru-event-image-upload.tasru-event-image-conversion-failed .filepond--drop-label label,
.tasru-image-file-upload.tasru-event-image-converting .filepond--drop-label label,
.tasru-image-file-upload.tasru-event-image-conversion-failed .filepond--drop-label label {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    font-size: 0;
    text-align: center;
}

.tasru-event-image-upload.tasru-event-image-converting .filepond--drop-label label,
.tasru-image-file-upload.tasru-event-image-converting .filepond--drop-label label {
    pointer-events: none;
}

.tasru-event-image-upload.tasru-event-image-converting .filepond--drop-label label::before,
.tasru-image-file-upload.tasru-event-image-converting .filepond--drop-label label::before {
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid #b8dce3;
    border-top-color: var(--tasru-primary);
    border-radius: 9999px;
    content: '';
    animation: tasru-event-image-loading-spin 0.8s linear infinite;
}

.tasru-event-image-upload.tasru-event-image-converting .filepond--drop-label label::after,
.tasru-image-file-upload.tasru-event-image-converting .filepond--drop-label label::after {
    color: #376673;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    content: 'HEIC画像をJPEGに変換しています…';
}

.tasru-event-image-upload.tasru-event-image-conversion-failed .filepond--drop-label label::before,
.tasru-image-file-upload.tasru-event-image-conversion-failed .filepond--drop-label label::before {
    color: #b42318;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    content: '!';
}

.tasru-event-image-upload.tasru-event-image-conversion-failed .filepond--drop-label label::after,
.tasru-image-file-upload.tasru-event-image-conversion-failed .filepond--drop-label label::after {
    color: #b42318;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    content: 'HEIC画像を変換できませんでした。再度選択してください';
}

.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    width: min(150px, calc(100% - 0.5rem));
    border-radius: 1.25rem;
    overflow: hidden;
}

.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--item-panel {
    border-radius: 1.25rem;
}

/* アップロード完了後も、FilePond の緑色レイヤーで元画像を着色しない。 */
.tasru-event-image-upload .filepond--image-preview-overlay-success,
.tasru-image-gallery-repeater .filepond--image-preview-overlay-success {
    display: none !important;
}

.tasru-event-image-upload [data-filepond-item-state*='processing-complete'] .filepond--item-panel,
.tasru-image-gallery-repeater [data-filepond-item-state*='processing-complete'] .filepond--item-panel {
    background-color: #263238 !important;
}

.tasru-event-image-upload .filepond--image-preview-wrapper,
.tasru-image-gallery-repeater .filepond--image-preview-wrapper {
    z-index: 2 !important;
}

/* ドラッグ中は追加タイルを固定し、FilePondの並び替え計算を安定させる。 */
.tasru-event-image-upload.tasru-event-image-dragging .filepond--drop-label {
    pointer-events: none;
    transition: none !important;
}

/* FilePond の画像一覧を先頭に置き、「＋」は登録済み画像の末尾へ移動する。 */
.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid']:has(.filepond--item) .filepond--list-scroller {
    transform: translate3d(0, 0, 0) !important;
}

.tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'].tasru-event-image-limit-reached .filepond--drop-label {
    display: none !important;
}

@media (max-width: 420px) {
    .tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'],
    .tasru-event-image-upload .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label {
        width: 100%;
        height: auto !important;
        min-height: 0;
        aspect-ratio: 1;
    }
}

/* 施設タイプは画面幅に応じて折り返し、列数を固定しない。 */
.tasru-facility-type-grid {
    container-name: tasru-facility-types;
    container-type: inline-size;
}

.tasru-facility-type-grid > .fi-sc {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 0.4rem 0.75rem !important;
}

.tasru-facility-type-grid .fi-fo-field-label-content {
    white-space: nowrap;
}

@container tasru-facility-types (max-width: 136rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 119rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 102rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 85rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 68rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 50rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@container tasru-facility-types (max-width: 32rem) {
    .tasru-facility-type-grid > .fi-sc {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* 設備の有無カードは、各1枚が約500px以上になるよう自動で折り返す。 */
.tasru-equipment-presence-grid {
    container-name: tasru-equipment-presence;
    container-type: inline-size;
}

.tasru-equipment-presence-grid > .fi-sc {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 31.25rem), 1fr)) !important;
}

/* 備考のない有無カードは、項目名とスイッチが重ならない幅で最大4列にする。 */
.tasru-service-presence-grid > .fi-sc {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22.5rem), 1fr)) !important;
}

/* 備考のない有無カードは、同じ高さにして項目名を改行させない。 */
.tasru-presence-card-without-note {
    height: 6rem;
}

.tasru-presence-card-without-note .tasru-presence-card-label {
    white-space: nowrap;
    font-size: 0.88rem !important;
}

.tasru-wifi-speed-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.tasru-presence-card-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tasru-speed-test-control {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tasru-speed-test-button {
    flex: none;
    cursor: pointer;
    border: 1px solid #2990b3;
    border-radius: 9999px;
    background: #fff;
    padding: 0.18rem 0.55rem;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f6f86;
}

.tasru-speed-test-button:disabled {
    cursor: not-allowed;
    border-color: #b8c4cc;
    background: #eef2f4;
    color: #7b8991;
    opacity: 0.7;
}

.tasru-speed-test-control small {
    white-space: nowrap;
    font-size: 0.62rem;
    font-weight: 700;
    color: #0f6f86;
}

.tasru-wifi-speed-fields label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.tasru-wifi-speed-fields label > span {
    white-space: nowrap;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1.2;
}

.tasru-wifi-speed-fields input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 1.9rem;
    border: 1px solid #9fc5d1;
    border-radius: 0.48rem;
    background: #fff;
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
    color: #263b45;
    outline: none;
}

.tasru-wifi-speed-fields input:disabled {
    cursor: not-allowed;
    background: #eef2f4;
    opacity: 0.58;
}

/* 施設・プラン画像も、登録画像の末尾に正方形の追加タイルを表示する。 */
.tasru-image-gallery-repeater .fi-fo-repeater-items {
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, calc(150px + 1.8rem)), calc(150px + 1.8rem))
    ) !important;
    align-items: start;
    gap: 0.5rem;
}

.tasru-image-gallery-repeater .fi-fo-repeater-item {
    width: min(calc(150px + 1.8rem), 100%);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #b7d8de;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 12px 30px rgb(16 84 105 / 10%);
}

.tasru-image-gallery-repeater .fi-fo-repeater-item-content {
    padding: 0.9rem;
}

.tasru-image-gallery-repeater .fi-fo-repeater-item-content > .fi-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

.tasru-image-gallery-repeater .fi-fo-file-upload {
    position: relative;
    width: 150px;
    max-width: 100%;
}

/*
 * FilePondの初期化中はブラウザ標準のファイル入力をそのまま見せない。
 * 初期化が完了すると .filepond--root が追加され、このプレースホルダーは
 * 自動的に消える。画像未選択の場合も通るため、画像読込中とは表現しない。
 */
.tasru-image-gallery-repeater .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root)) {
    display: grid;
    width: 150px;
    max-width: 100%;
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 2px solid #b9dce2;
    border-radius: 0.75rem;
    color: #376673;
    background: linear-gradient(145deg, #f7feff, #e5f7f9);
}

.tasru-image-gallery-repeater .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
    width: 1.65rem;
    height: 1.65rem;
    border: 3px solid #b8dce3;
    border-top-color: var(--tasru-primary);
    border-radius: 9999px;
    content: '';
    animation: tasru-image-loading-spin 0.8s linear infinite;
}

.tasru-image-gallery-repeater .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::after {
    position: absolute;
    top: calc(50% + 1.25rem);
    left: 50%;
    width: 100%;
    padding: 0 0.5rem;
    color: #376673;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    content: '画像入力を準備中…';
    transform: translateX(-50%);
}

.tasru-image-gallery-repeater .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root)) input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

@keyframes tasru-image-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tasru-image-gallery-repeater .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
        animation: none;
    }
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root {
    width: 150px;
    max-width: 100%;
    height: 150px !important;
    min-height: 150px;
    margin-bottom: 0;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--drop-label {
    height: 150px !important;
    min-height: 150px;
    border-width: 2px;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root:not(:has(.filepond--item)) .filepond--drop-label {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Repeaterは1画像につき1カード。追加操作はカード外の「画像を追加」から行う。 */
.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root:has(.filepond--item) .filepond--drop-label {
    display: none !important;
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root:has(.filepond--item) .filepond--list-scroller {
    height: 150px !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: translate3d(0, 0, 0) !important;
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root .filepond--item {
    width: 100% !important;
    height: 150px !important;
    margin: 0 !important;
}

.tasru-image-gallery-repeater .fi-fo-file-upload .filepond--root:has(.filepond--item) .filepond--list,
.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root:has(.filepond--item) .filepond--list {
    left: 0 !important;
    width: 100% !important;
    height: 150px !important;
}

/*
 * サムネイルとその他を分けた画像欄でも、従来どおり画像タイルは
 * 150px四方に固定する。セクション自体は横幅を使い、その他画像は
 * その中で複数の正方形タイルとして折り返す。
 */
@media (min-width: 64rem) {
    /*
     * Filament の6分割グリッドの1列をそのまま使うと、サイドバーを
     * 表示した一般的な画面幅ではサムネイル欄が100px前後まで縮む。
     * FilePond はその実幅を基準にプレビューを生成するため、画像が
     * 細長い黒いカードに見える。両欄にタイル＋余白が収まる幅を確保し、
     * 幅が足りない場合は縦に折り返す。施設画像とプラン画像で共通とする。
     */
    .tasru-split-image-gallery > .fi-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)) !important;
    }

    .tasru-split-image-gallery > .fi-grid > .fi-grid-col {
        grid-column: auto !important;
    }

    /* 作業カフェ・バーの設備画像には、左側のサムネイル列を確保しない。 */
    .tasru-split-image-gallery.tasru-equipment-image-gallery > .fi-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root)) {
    display: grid;
    width: 150px;
    max-width: 100%;
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 2px solid #b9dce2;
    border-radius: 0.75rem;
    color: #376673;
    background: linear-gradient(145deg, #f7feff, #e5f7f9);
}

.tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
    width: 1.65rem;
    height: 1.65rem;
    border: 3px solid #b8dce3;
    border-top-color: var(--tasru-primary);
    border-radius: 9999px;
    content: '';
    animation: tasru-image-loading-spin 0.8s linear infinite;
}

.tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::after {
    position: absolute;
    top: calc(50% + 1.25rem);
    left: 50%;
    width: 100%;
    padding: 0 0.5rem;
    color: #376673;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    content: '画像入力を準備中…';
    transform: translateX(-50%);
}

.tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root)) input[type='file'] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.tasru-split-image-gallery .filepond--root[data-style-panel-layout='grid'] {
    position: relative;
    width: 100%;
    min-height: 150px;
    margin-bottom: 0;
    background: transparent;
}

/* 複数画像欄では追加タイルを通常フローから外し、FilePond の画像座標と重ならないようにする。 */
.tasru-split-image-gallery .tasru-direct-other-images-zone .filepond--root[data-style-panel-layout='grid'] {
    overflow: hidden;
    transition: height 180ms ease;
}

.tasru-split-image-gallery .tasru-direct-other-images-zone .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label {
    position: absolute !important;
    top: var(--tasru-event-add-top, 0) !important;
    left: var(--tasru-event-add-left, 0) !important;
    z-index: 5;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition:
        top 180ms ease,
        left 180ms ease,
        opacity 120ms ease;
}

.tasru-split-image-gallery .tasru-direct-other-images-zone .filepond--root[data-style-panel-layout='grid'].tasru-event-image-limit-reached .filepond--drop-label {
    display: none !important;
}

.tasru-split-image-gallery .tasru-direct-other-images-zone .tasru-image-file-upload.tasru-event-image-dragging .filepond--drop-label {
    pointer-events: none;
    transition: none !important;
}

.tasru-split-image-gallery .tasru-direct-other-images-zone .filepond--root[data-style-panel-layout='grid']:has(.filepond--item) .filepond--list-scroller {
    transform: translate3d(0, 0, 0) !important;
}

/* サムネイル欄は、追加前も追加後も150px四方から広がらない。 */
.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root[data-style-panel-layout='grid'] {
    width: min(150px, 100%);
    height: 150px !important;
}

/*
 * FilePond adds a tile margin and briefly scales a newly selected item while
 * reading it. In the single thumbnail field that exposes the white root as a
 * second, larger card and makes the preview look broken. The field cannot be
 * reordered, so it is safe to keep its only item flush with the 150px root.
 */
.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root[data-style-panel-layout='grid']:has(.filepond--item) {
    background: #263238;
}

.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root[data-style-panel-layout='grid']:has(.filepond--item) .filepond--list-scroller {
    height: 150px !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: translate3d(0, 0, 0) !important;
}

.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    width: 100% !important;
    height: 150px !important;
    margin: 0 !important;
}

.tasru-split-image-gallery .tasru-thumbnail-image-zone .filepond--root[data-style-panel-layout='grid'] .filepond--item[data-filepond-item-state~='busy'] {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) !important;
}

.tasru-split-image-gallery .filepond--root[data-style-panel-layout='grid'] .filepond--drop-label {
    width: min(150px, 100%);
    height: 150px !important;
    min-height: 150px;
    padding: 0;
    border-width: 2px;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
}

.tasru-split-image-gallery .filepond--root[data-style-panel-layout='grid'] .filepond--item {
    width: min(150px, calc(100% - 0.5rem));
    border-radius: 0.75rem;
    overflow: hidden;
}

.tasru-split-image-gallery .filepond--root[data-style-panel-layout='grid'] .filepond--item-panel {
    border-radius: 0.75rem;
}

.tasru-split-image-gallery .filepond--image-preview-overlay-success {
    display: none !important;
}

.tasru-split-image-gallery [data-filepond-item-state*='processing-complete'] .filepond--item-panel {
    background-color: #263238 !important;
}

.tasru-split-image-gallery .filepond--image-preview-wrapper {
    z-index: 2 !important;
}

.tasru-heic-preview {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: inherit;
    background: #263238;
}

.tasru-heic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tasru-image-file-upload .filepond--item.tasru-image-preview-missing::after,
.tasru-event-image-upload .filepond--item.tasru-image-preview-missing::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 2.5rem 0.75rem 0.75rem;
    border-radius: inherit;
    color: #fff;
    background: #263238;
    content: 'プレビューを表示できません';
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.tasru-image-file-upload .filepond--item.tasru-image-preview-missing .filepond--file-action-button,
.tasru-event-image-upload .filepond--item.tasru-image-preview-missing .filepond--file-action-button {
    z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
    .tasru-split-image-gallery .tasru-image-file-upload .fi-fo-file-upload:not(:has(.filepond--root))::before {
        animation: none;
    }
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add {
    position: relative;
    width: min(150px, 100%);
    height: 150px;
    list-style: none;
}

.tasru-image-gallery-repeater .tasru-image-repeater-native-add {
    display: none !important;
}

.tasru-image-gallery-repeater .tasru-image-repeater-file-trigger {
    position: absolute;
    z-index: 5;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.tasru-image-gallery-repeater.tasru-image-repeater-uploading .tasru-image-repeater-file-trigger {
    pointer-events: none;
}

.tasru-image-gallery-repeater .fi-fo-repeater-item.tasru-image-repeater-pending {
    position: relative;
    min-height: 150px;
    opacity: 0.72;
    pointer-events: none;
}

.tasru-image-gallery-repeater .fi-fo-repeater-item.tasru-image-repeater-pending::after {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    border-radius: inherit;
    color: var(--tasru-primary-deep);
    background: rgb(247 254 255 / 88%);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    content: '画像を読み込んでいます…';
}

.tasru-image-gallery-repeater .fi-fo-repeater-item.tasru-image-repeater-failed {
    opacity: 1;
    pointer-events: auto;
}

.tasru-image-gallery-repeater.tasru-image-repeater-uploading .tasru-image-repeater-add-tile::before {
    font-size: 1.8rem;
    content: '↻';
    animation: tasru-image-upload-spin 1s linear infinite;
}

.tasru-image-gallery-repeater.tasru-image-repeater-uploading .tasru-image-repeater-add-tile::after {
    content: '画像を準備しています…';
}

.tasru-image-gallery-repeater.tasru-image-repeater-upload-failed .tasru-image-repeater-add-tile::before {
    color: #c53030;
    font-size: 2rem;
    content: '!';
}

.tasru-image-gallery-repeater.tasru-image-repeater-upload-failed .tasru-image-repeater-add-tile::after {
    color: #9b2c2c;
    content: '画像を読み込めませんでした。再度選択してください';
}

@keyframes tasru-image-upload-spin {
    to {
        transform: rotate(360deg);
    }
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile > .fi-fo-repeater-add {
    width: 100%;
    height: 100%;
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    border: 2px dashed #70c7d1;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
    box-shadow: 0 12px 30px rgb(16 84 105 / 12%);
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile::before {
    color: var(--tasru-primary-deep);
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
    content: '+';
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile::after {
    color: var(--tasru-primary-deep);
    font-size: 0.95rem;
    font-weight: 750;
    content: '画像を追加';
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile .tasru-add-action,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add .tasru-add-action {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    border: 2px dashed #70c7d1;
    border-radius: 1.25rem;
    color: transparent;
    background: linear-gradient(145deg, #f7feff, #dcf8fa);
    box-shadow: 0 12px 30px rgb(16 84 105 / 12%);
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile .tasru-add-action::before,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add .tasru-add-action::before {
    color: var(--tasru-primary-deep);
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
    content: '+';
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile .tasru-add-action::after,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add .tasru-add-action::after {
    color: var(--tasru-primary-deep);
    font-size: 0.95rem;
    font-weight: 750;
    content: '画像を追加';
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile .tasru-add-action:hover,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add .tasru-add-action:hover,
.tasru-image-gallery-repeater .tasru-image-repeater-add-tile:hover .tasru-add-action,
.tasru-image-gallery-repeater .tasru-image-repeater-standalone-add:hover .tasru-add-action {
    border-color: var(--tasru-primary);
    background: #cff2f5;
    box-shadow: 0 15px 34px rgb(41 144 179 / 18%);
}

.tasru-image-gallery-repeater .tasru-image-repeater-add-tile:hover {
    border-color: var(--tasru-primary);
    background: #cff2f5;
    box-shadow: 0 15px 34px rgb(41 144 179 / 18%);
}

.tasru-image-gallery-repeater .tasru-image-repeater-limit-reached .tasru-image-repeater-add-tile,
.tasru-image-gallery-repeater .tasru-image-repeater-limit-reached > .fi-fo-repeater-add {
    display: none;
}

@media (max-width: 420px) {
    .tasru-image-gallery-repeater .tasru-image-repeater-add-tile,
    .tasru-image-gallery-repeater .tasru-image-repeater-standalone-add,
    .tasru-image-gallery-repeater .fi-fo-repeater-item {
        width: 100%;
    }

    .tasru-image-gallery-repeater .tasru-image-repeater-add-tile,
    .tasru-image-gallery-repeater .tasru-image-repeater-standalone-add {
        height: auto;
        aspect-ratio: 1;
    }
}

.fi-ac-btn-action,
.fi-btn {
    min-height: 2.7rem;
    border-radius: 0.75rem;
    font-weight: 700;
}

.fi-btn.tasru-add-action {
    border: 1px solid #8ccbd3;
    color: var(--tasru-primary-deep);
    background: #e3f6f8;
    box-shadow: 0 4px 12px rgb(41 144 179 / 12%);
}

.fi-btn.tasru-add-action:hover {
    border-color: var(--tasru-primary);
    color: #0d566d;
    background: #d4f1f4;
    box-shadow: 0 6px 16px rgb(41 144 179 / 18%);
}

.tasru-opening-hours-presets {
    padding: 0.9rem 1rem;
    border: 1px solid #b8dbe0;
    border-radius: 0.9rem;
    background: #f7fcfd;
}

.tasru-opening-hours-presets::before {
    display: block;
    margin-bottom: 0.65rem;
    color: #405e68;
    font-size: 0.85rem;
    font-weight: 700;
    content: 'まとめて設定';
}

.fi-btn.tasru-hours-preset-action {
    min-width: 5.5rem;
    border: 1px solid #86c8d1;
    color: var(--tasru-primary-deep);
    background: #dff4f6;
    box-shadow: 0 3px 10px rgb(41 144 179 / 12%);
}

.fi-btn.tasru-hours-preset-action > .fi-icon {
    color: var(--tasru-primary-deep) !important;
}

.fi-btn.tasru-hours-preset-action:hover {
    border-color: var(--tasru-primary);
    background: #cdeef1;
}

.tasru-opening-hours-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.55rem;
    padding: 0.15rem 0.1rem 0.55rem;
}

.tasru-opening-hours-calendar-help,
.tasru-opening-hours-calendar-error {
    grid-column: 1 / -1;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.5;
}

.tasru-opening-hours-calendar-help {
    color: #617781;
}

.tasru-opening-hours-calendar-error {
    color: #dc2626;
    font-weight: 700;
}

.tasru-opening-hours-calendar-day {
    min-height: 11.5rem;
    overflow: hidden;
    border: 1px solid #c8dfe3;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 4px 12px rgb(16 84 105 / 8%);
}

.tasru-opening-hours-calendar-weekday {
    padding: 0.5rem;
    text-align: center;
    color: #315d69;
    background: #e9f7f8;
    font-size: 0.9rem;
    font-weight: 800;
}

.tasru-opening-hours-calendar-day-saturday .tasru-opening-hours-calendar-weekday {
    color: #1b62a1;
    background: #e9f3ff;
}

.tasru-opening-hours-calendar-day-sunday .tasru-opening-hours-calendar-weekday {
    color: #b53e4b;
    background: #fff0f2;
}

.tasru-opening-hours-calendar-times {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.55rem 0.45rem 0.65rem;
}

.tasru-opening-hours-calendar-all-day {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 1.7rem;
    border-radius: 0.45rem;
    color: #315d69;
    background: #eff9fa;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.tasru-opening-hours-calendar-all-day input {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: var(--tasru-primary);
}

.tasru-opening-hours-calendar-slot {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e3eff1;
}

.tasru-opening-hours-calendar-input-label {
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr);
    align-items: center;
    gap: 0.2rem;
    color: #617781;
    font-size: 0.68rem;
    font-weight: 700;
}

.tasru-opening-hours-calendar-input {
    width: 100%;
    min-width: 0;
    border: 1px solid #a9cdd3;
    border-radius: 0.42rem;
    padding: 0.3rem 0.2rem;
    color: #173f4c;
    background: #fff;
    font-size: 0.72rem;
    line-height: 1.2;
}

.tasru-opening-hours-calendar-input:focus {
    border-color: var(--tasru-primary);
    outline: 2px solid rgb(57 196 207 / 20%);
    outline-offset: 1px;
}

.tasru-opening-hours-calendar-label-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
}

.tasru-opening-hours-calendar-input-label-next-day .tasru-opening-hours-calendar-label-text::after {
    width: max-content;
    border-radius: 9999px;
    padding: 0.06rem 0.3rem;
    color: #8a4b08;
    background: #fff0c9;
    font-size: 0.55rem;
    font-weight: 800;
    line-height: 1.25;
    content: '翌日';
}

.tasru-opening-hours-calendar-add,
.tasru-opening-hours-calendar-remove {
    border: 0;
    color: #0d647a;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.tasru-opening-hours-calendar-add:hover,
.tasru-opening-hours-calendar-remove:hover {
    text-decoration: underline;
}

.tasru-opening-hours-calendar-remove {
    align-self: flex-end;
    color: #b53e4b;
}

.fi-btn.tasru-hours-preset-action:hover > .fi-icon,
.fi-btn.tasru-hours-preset-action:focus-visible > .fi-icon {
    color: #0d566d !important;
}

.fi-btn.fi-color-primary {
    color: #073945;
    background: linear-gradient(135deg, var(--tasru-accent), var(--tasru-secondary));
    box-shadow: 0 8px 18px rgb(41 144 179 / 23%);
}

.fi-btn.fi-color-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--tasru-primary), var(--tasru-primary-deep));
    box-shadow: 0 10px 24px rgb(41 144 179 / 30%);
    transform: translateY(-1px);
}

.fi-form-actions {
    border: 1px solid rgb(177 220 226 / 82%);
    border-radius: 1rem;
    background: rgb(255 255 255 / 90%);
    box-shadow: 0 12px 30px rgb(16 84 105 / 12%);
    backdrop-filter: blur(14px);
}

.tasru-tab-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgb(57 196 207 / 42%);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgb(255 255 255 / 96%), rgb(42 232 230 / 8%));
    box-shadow: 0 10px 26px rgb(41 144 179 / 10%);
}

.tasru-tab-navigation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: fit-content;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgb(41 144 179 / 45%);
    border-radius: 0.75rem;
    color: #0d566d;
    background: #e7f8fa;
    font-weight: 700;
    transition: 150ms ease;
}

.tasru-tab-navigation-button:hover,
.tasru-tab-navigation-button:focus-visible {
    border-color: var(--tasru-primary-deep);
    color: #fff;
    background: var(--tasru-primary-deep);
    box-shadow: 0 6px 16px rgb(41 144 179 / 25%);
}

.tasru-tab-navigation-button-next {
    justify-self: end;
}

.tasru-tab-navigation-progress {
    min-width: 4.5rem;
    text-align: center;
    color: #55727a;
    font-size: 0.875rem;
    font-weight: 700;
}

.tasru-tag-suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tasru-tag-suggestion-button {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgb(41 144 179 / 45%);
    border-radius: 9999px;
    color: #0d566d;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    transition: 150ms ease;
}

.tasru-tag-suggestion-button:hover:not(:disabled),
.tasru-tag-suggestion-button:focus-visible:not(:disabled) {
    border-color: var(--tasru-primary-deep);
    color: #fff;
    background: var(--tasru-primary-deep);
}

.tasru-tag-suggestion-button:disabled {
    border-color: rgb(41 144 179 / 22%);
    color: #66858e;
    background: #e7f8fa;
    cursor: default;
    opacity: 0.72;
}

@media (max-width: 640px) {
    .tasru-tab-navigation {
        grid-template-columns: 1fr 1fr;
    }

    .tasru-tab-navigation-progress {
        display: none;
    }

    .tasru-tab-navigation-button {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .fi-main-ctn {
        background: transparent;
    }

    .fi-page {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .fi-sc-component {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .fi-main {
        padding-bottom: 5rem;
    }

    .fi-section {
        border-radius: 0.95rem;
    }

    .fi-section-content {
        padding: 1rem;
    }

    .tasru-profile-section .fi-fo-file-upload {
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
button.fi-btn[data-tasru-action-processing] {
    cursor: wait;
    opacity: 0.7;
    pointer-events: none;
}

.tasru-image-upload-busy .filepond--drop-label {
    cursor: wait;
    opacity: 0.65;
    pointer-events: none;
}

.tasru-app-version {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
    white-space: nowrap;
}
/* Only the selected plan's form is rendered; summaries remain lightweight. */
.tasru-plan-editor-help { margin-bottom: .75rem; font-size: .875rem; color: #64748b; }
.tasru-plan-item-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.tasru-plan-error { color: #dc2626; font-size: .875rem; }
.tasru-plan-repeater .fi-fo-repeater-item-header { flex-wrap: wrap; gap: .75rem; }

/* Compact headings retain an accessible name and native hover explanation. */
.tasru-table-icon-heading { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; }
.tasru-table-heading-icon { width: 1.25rem; height: 1.25rem; }
.tasru-table-icon-heading:focus-visible { outline: 2px solid var(--tasru-primary); outline-offset: 2px; border-radius: .25rem; }

/* Match the section heights, including labels, help and multiple image rows. */
.tasru-facility-image-gallery > .fi-grid { align-items: stretch; }
.tasru-facility-image-gallery > .fi-grid > .fi-grid-col > .fi-sc-component,
.tasru-facility-image-gallery .tasru-thumbnail-image-zone,
.tasru-facility-image-gallery .tasru-other-images-zone,
.tasru-facility-image-gallery .tasru-thumbnail-image-zone > .fi-section,
.tasru-facility-image-gallery .tasru-other-images-zone > .fi-section { height: 100%; }

.tasru-plan-repeater > .fi-fo-repeater-items { display: flex; flex-direction: column; gap: 1.25rem; }
.tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item {
    width: 100%;
    border: 2px solid #9ac7d2;
    border-radius: .9rem;
    overflow: hidden;
    background: #f0f7fa;
    box-shadow: 0 3px 10px rgb(16 84 105 / 10%);
}
.tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-header { background: #e4f0f5; padding: 1rem; }
.tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item[data-plan-active='true'] { border-color: #176a87; box-shadow: 0 0 0 2px rgb(23 106 135 / 16%); }
.tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item[data-plan-active='true'] > .fi-fo-repeater-item-header { background: #c7e9f0; border-bottom: 2px solid #176a87; }
.tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content { background: #fff; }
.tasru-plan-item-actions .fi-icon-btn { min-width: 2.75rem; min-height: 2.75rem; }

/* The slot reserves the measured height; the real submit actions stay in form. */
.tasru-facility-footer-slot { min-height: 6rem; }
.tasru-facility-footer {
    position: fixed;
    bottom: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    box-sizing: border-box;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
    border: 1px solid #9ac7d2;
    border-bottom: 0;
    border-radius: .9rem .9rem 0 0;
    background: #fff;
    box-shadow: 0 -6px 24px rgb(16 84 105 / 14%);
}
.tasru-facility-footer .tasru-tab-navigation { flex: 1 1 26rem; gap: .5rem; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.tasru-facility-footer .tasru-tab-navigation-button { padding: .55rem .75rem; font-size: .875rem; }
.tasru-facility-footer .tasru-tab-navigation-button:first-child { grid-column: 1; }
.tasru-facility-footer .tasru-tab-navigation-progress { grid-column: 2; }
.tasru-facility-footer .tasru-tab-navigation-button-next { grid-column: 3; }
.tasru-facility-footer-actions { flex: 0 1 auto; }
.tasru-facility-footer-actions .fi-ac { gap: .5rem; }
html:has(.tasru-facility-footer-slot) { scroll-padding-bottom: 15rem; }
form:has(.tasru-facility-footer-slot) input,
form:has(.tasru-facility-footer-slot) textarea,
form:has(.tasru-facility-footer-slot) select { scroll-margin-bottom: 15rem; }
@media (max-width: 640px) {
    .tasru-facility-footer { padding-inline: .5rem; gap: .5rem; }
    .tasru-facility-footer .tasru-tab-navigation { flex-basis: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .tasru-facility-footer .tasru-tab-navigation-button-next { grid-column: 2; }
    .tasru-facility-footer-actions { width: 100%; }
    .tasru-facility-footer-actions .fi-ac { justify-content: flex-end; }
}
.dark .tasru-facility-footer { background: #182b34; border-color: #527b8c; }
.dark .tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-header { background: #263e4a; }
.dark .tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item[data-plan-active='true'] > .fi-fo-repeater-item-header { background: #225369; }
.dark .tasru-plan-repeater > .fi-fo-repeater-items > .fi-fo-repeater-item > .fi-fo-repeater-item-content { background: #182b34; }

/* Facility -> type -> plan workspace. */
.tasru-facility-workspace { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tasru-facility-targets { display: flex; flex-direction: column; gap: .5rem; position: sticky; top: 5rem; }
.tasru-workspace-label { font-size: .8rem; font-weight: 600; color: #55717e; margin: .4rem 0; }
.tasru-facility-targets button { text-align: left; padding: .8rem; border: 1px solid #d7e4e9; border-radius: .65rem; background: white; }
.tasru-facility-targets button small { display: block; font-size: .75rem; margin-top: .3rem; color: #526873; }
.tasru-facility-targets button[aria-current="page"], .tasru-workspace-panes button[aria-pressed="true"] { background: #e8f5fa; border-color: #2990b3; box-shadow: inset 3px 0 #2990b3; color: #165a73; }
.tasru-facility-editor { min-width: 0; }
.tasru-workspace-header { margin-bottom: 1rem; }
.tasru-workspace-header h2, .tasru-plan-editor-heading h3 { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.tasru-workspace-note { font-size: .85rem; line-height: 1.6; color: #526873; }
.tasru-workspace-panes { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.tasru-workspace-panes button { padding: .65rem 1rem; border: 1px solid #d7e4e9; border-radius: .5rem; font-weight: 600; }
.tasru-workspace-scope { background: #eef7fa; border-left: 3px solid #2990b3; padding: .9rem; margin-bottom: 1rem; font-size: .85rem; line-height: 1.6; }
.tasru-workspace-errors { padding: 1rem; border: 2px solid #b42318; border-radius: .5rem; margin-bottom: 1rem; }
.tasru-workspace-errors button { text-align: left; color: #b42318; text-decoration: underline; margin-top: .4rem; }
.tasru-plan-editor-heading { display: grid; gap: .7rem; margin: 1rem 0; }
.tasru-facility-workspace button:focus-visible { outline: 3px solid #2990b3; outline-offset: 3px; }
.dark .tasru-facility-targets button { background: #182b34; border-color: #527b8c; }
.dark .tasru-facility-targets button[aria-current="page"], .dark .tasru-workspace-panes button[aria-pressed="true"], .dark .tasru-workspace-scope { background: #225369; color: #fff; }
.dark .tasru-workspace-note, .dark .tasru-workspace-label, .dark .tasru-facility-targets button small { color: #b9d4df; }
@media (max-width: 900px) {
    .tasru-facility-workspace { grid-template-columns: minmax(0, 1fr); }
    .tasru-facility-targets { position: static; display: flex; flex-direction: row; flex-wrap: wrap; }
    .tasru-facility-targets > p { width: 100%; }
    .tasru-facility-targets button { flex: 1 1 10rem; }
}

/* Connected facility-type tabs. */
.tasru-type-tabs { display: flex; align-items: end; gap: .25rem; overflow-x: auto; padding: .25rem .25rem 0; border-bottom: 1px solid #9abfce; }
.tasru-type-tabs [role="tab"] { flex: 0 0 auto; padding: .75rem 1rem; border: 1px solid #b8d1dc; border-bottom: 0; border-radius: .6rem .6rem 0 0; background: #e7eff3; color: #345663; }
.tasru-type-tabs [aria-selected="true"] { background: #fff; color: #165a73; font-weight: 700; box-shadow: inset 0 3px #2990b3; padding-bottom: .9rem; }
.tasru-type-panel { border: 1px solid #9abfce; border-top: 0; border-radius: 0 0 .75rem .75rem; padding: 1rem; background: #fff; min-width: 0; }
.tasru-type-panel:not([role="tabpanel"]) { border-top: 1px solid #9abfce; border-radius: .75rem; }
.dark .tasru-type-panel, .dark .tasru-type-tabs [aria-selected="true"] { background: #182b34; color: #e3f3fa; }
.dark .tasru-type-tabs [role="tab"]:not([aria-selected="true"]) { background: #263e4a; color: #b9d4df; }

.tasru-type-settings { display: flex; align-self: stretch; flex: 0 0 auto; }
.tasru-type-settings .tasru-type-add-tab {
    min-width: 3.25rem; padding: .75rem 1rem; border: 1px solid #b8d1dc; border-bottom: 0;
    border-radius: .6rem .6rem 0 0; background: #e7eff3; color: #345663;
    box-shadow: none; font-size: 1.2rem; line-height: 1.4;
}
.tasru-type-settings .tasru-type-add-tab:hover { background: #d4e7ef; }
.tasru-facility-editor { --type-hue: 205; --type-accent: hsl(var(--type-hue) 48% 38%); --type-tint: hsl(var(--type-hue) 55% 96%); }
.tasru-facility-editor[data-type-tone="wkc"] { --type-hue: 28; }
.tasru-facility-editor[data-type-tone="cws"] { --type-hue: 160; }
.tasru-facility-editor[data-type-tone="vto"] { --type-hue: 240; }
.tasru-facility-editor[data-type-tone="wkb"] { --type-hue: 310; }
.tasru-facility-editor[data-type-tone="wkv"] { --type-hue: 85; }
.tasru-facility-editor[data-type-tone="svo"] { --type-hue: 190; }
.tasru-facility-editor[data-type-tone="cfr"] { --type-hue: 270; }
.tasru-facility-editor[data-type-tone="suo"] { --type-hue: 225; }
.tasru-facility-editor[data-type-tone="shh"] { --type-hue: 15; }
.tasru-facility-editor[data-type-tone="tdo"] { --type-hue: 45; }
.tasru-facility-editor .tasru-type-tabs { border-color: var(--type-accent); }
.tasru-facility-editor .tasru-type-tabs [aria-selected="true"] { background: var(--type-tint); color: var(--type-accent); border-color: var(--type-accent); box-shadow: inset 0 3px var(--type-accent); }
.tasru-facility-editor .tasru-type-panel { background: var(--type-tint); border-color: var(--type-accent); }
.tasru-facility-editor .tasru-workspace-scope { background: var(--type-tint); border-color: var(--type-accent); }
.tasru-type-choice-buttons .fi-btn { min-height: 5.5rem; flex-direction: column; gap: .5rem; white-space: normal; text-align: center; padding: .8rem; }
.tasru-type-choice-buttons .fi-icon { width: 1.8rem; height: 1.8rem; }
.tasru-input-mode-buttons .fi-btn { min-height: 3.5rem; white-space: normal; text-align: center; }
.dark .tasru-facility-editor { --type-accent: hsl(var(--type-hue) 55% 72%); --type-tint: hsl(var(--type-hue) 25% 17%); }
.dark .tasru-type-settings .tasru-type-add-tab { background: #263e4a; color: #dceaf1; border-color: #527b8c; }

/* Keep selection cards distinct from the application's primary action buttons. */
.tasru-type-choice-buttons, .tasru-input-mode-buttons { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; columns: auto !important; }
@media (min-width: 768px) { .tasru-type-choice-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tasru-type-choice-buttons .fi-btn, .tasru-input-mode-buttons .fi-btn {
    display: flex; position: relative; width: 100%; justify-content: center;
    background: #fff !important; color: #345663 !important; border: 1px solid #b8cdd7;
    box-shadow: none !important;
}
.tasru-type-choice-buttons .fi-btn .fi-icon, .tasru-input-mode-buttons .fi-btn .fi-icon { color: currentColor !important; }
.tasru-type-choice-buttons input:checked + .fi-btn, .tasru-input-mode-buttons input:checked + .fi-btn {
    background: #e6f3f8 !important; border-color: #247998; color: #155a73 !important;
    box-shadow: inset 0 0 0 1px #247998 !important;
}
.tasru-type-choice-buttons input:checked + .fi-btn::after, .tasru-input-mode-buttons input:checked + .fi-btn::after { content: '✓'; position: absolute; top: .3rem; right: .5rem; font-weight: 700; }
.tasru-type-choice-buttons input:focus-visible + .fi-btn, .tasru-input-mode-buttons input:focus-visible + .fi-btn { outline: 3px solid #2990b3; outline-offset: 2px; }
.tasru-type-tabs [role="tab"], .tasru-type-settings .tasru-type-add-tab { height: 3.25rem; }
.dark .tasru-type-choice-buttons .fi-btn, .dark .tasru-input-mode-buttons .fi-btn { background: #182b34 !important; color: #dceaf1 !important; }
.dark .tasru-type-choice-buttons input:checked + .fi-btn, .dark .tasru-input-mode-buttons input:checked + .fi-btn { background: #225369 !important; color: #fff !important; border-color: #7ec7e3; }

/* Language visibility follows the editor across facility and plan panes. */
.tasru-workspace-heading-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.tasru-workspace-heading-row h2 { min-width: 0; }
.tasru-language-buttons { display: flex; gap: .4rem; flex-shrink: 0; }
.tasru-language-buttons button {
    min-width: 2.75rem; min-height: 2.5rem; padding: .4rem .65rem;
    border: 1px solid #b8cdd7; border-radius: .5rem; background: #fff; color: #526873; font-weight: 700;
}
.tasru-language-buttons button[aria-pressed="true"] {
    background: #e1f6fb; border-color: #2990b3; color: #155a73; box-shadow: 0 0 0 1px #2990b3, 0 0 .6rem #2990b333;
}
.tasru-language-buttons button[data-language="jp"]:disabled { opacity: 1; cursor: default; }
.dark .tasru-language-buttons button { background: #182b34; color: #b9d4df; }
.dark .tasru-language-buttons button[aria-pressed="true"] { background: #225369; color: #fff; border-color: #7ec7e3; }

.tasru-operating-types { padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid #c8dce5; border-radius: .65rem; background: #fff; }
.tasru-operating-types-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; }
.tasru-operating-type-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.tasru-operating-type-badges > span { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .6rem; background: #eef5f8; border-radius: .4rem; font-size: .85rem; }
.tasru-operating-type-icon { width: 1.15rem; height: 1.15rem; }
.tasru-operating-type-badges p { font-size: .85rem; color: #526873; }
.dark .tasru-operating-types { background: #182b34; border-color: #527b8c; }
.dark .tasru-operating-type-badges > span { background: #263e4a; }
.dark .tasru-operating-type-badges p { color: #b9d4df; }

.tasru-operating-type-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; margin-top: .75rem; }
.tasru-operating-type-buttons > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 5rem; padding: .65rem; border: 1px solid #c8dce5; border-radius: .5rem; background: #fff; color: #345663; font-size: .8rem; }
.tasru-operating-type-buttons > button:disabled { cursor: wait; }
.tasru-operating-type-buttons .tasru-operating-type-icon { width: 1.6rem; height: 1.6rem; }
.tasru-operating-type-buttons > button[aria-pressed="true"] { background: #e6f3f8; border-color: #247998; box-shadow: inset 0 0 0 1px #247998; color: #155a73; }
.tasru-operating-type-check { position: absolute; top: .2rem; right: .45rem; font-weight: 700; }
.tasru-operating-type-confirm { margin-top: .75rem; padding: .8rem; border: 1px solid #b66a28; border-radius: .5rem; font-size: .85rem; }
.tasru-operating-type-confirm > div { display: flex; gap: .75rem; margin-top: .6rem; }
.tasru-operating-type-confirm button { padding: .5rem .75rem; border: 1px solid #9aaab2; border-radius: .4rem; }
.dark .tasru-operating-type-buttons > button { background: #182b34; color: #dceaf1; }
.dark .tasru-operating-type-buttons > button[aria-pressed="true"] { background: #225369; color: #fff; border-color: #7ec7e3; }


.tasru-facility-shared { margin-bottom: 1.25rem; }
.tasru-management-link-heading { margin-top: 1.5rem; margin-bottom: .8rem; }
.tasru-management-link-heading h3 { font-size: 1rem; font-weight: 700; }

.tasru-local-dialog { margin: auto; width: min(32rem, calc(100vw - 2rem)); padding: 1.5rem; border: 0; border-radius: .75rem; background: #fff; color: #243e48; box-shadow: 0 20px 60px #0004; }
.tasru-local-dialog::backdrop { background: #0008; }
.tasru-local-dialog h2 { font-size: 1.15rem; font-weight: 700; margin: .75rem 0; }
.tasru-local-dialog p, .tasru-local-dialog label { display: block; margin: .8rem 0; font-size: .9rem; }
.tasru-local-dialog select { display: block; width: 100%; margin-top: .5rem; padding: .5rem; border: 1px solid #9aaab2; border-radius: .4rem; }
.tasru-local-warning { width: 2rem; height: 2rem; color: #b87516; }
.tasru-local-dialog-actions, .tasru-local-mode-options { display: flex; gap: .75rem; margin-top: 1rem; }
.tasru-local-dialog-actions { justify-content: flex-end; }
.tasru-local-dialog button { padding: .6rem .9rem; border: 1px solid #9aaab2; border-radius: .4rem; cursor: pointer; }
.tasru-local-dialog button.tasru-local-primary, .tasru-local-mode-options button[aria-pressed="true"] { background: #247998; border-color: #247998; color: white; }
.tasru-local-dialog button:focus-visible { outline: 3px solid #53a9c9; outline-offset: 2px; }
.tasru-type-add-tab > svg { width: 1.3rem; height: 1.3rem; }
.dark .tasru-local-dialog { background: #182b34; color: #dceaf1; }

.tasru-railway-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .75rem; border-bottom: 1px solid #9aaab255; }
.tasru-railway-row button { border: 1px solid #9aaab2; border-radius: .35rem; padding: .3rem .6rem; }
