.choices {
    margin-bottom: 1rem;
}
.choices__inner {
    min-height: calc(2.25rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff !important;
    border: 1px solid #ced4da;
    border-radius: 0.25rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.is-open .choices__inner {
    border-radius: 0.25rem 0.25rem 0 0 !important;
}
/* .choices__input {
    background-color: transparent !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
} */
.choices__list--multiple .choices__item {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    margin: 0.2rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0.2rem;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-wrap: auto;
}
.choices__list--multiple .choices__item.is-highlighted {
    background-color: #e2e6ea;
    border-color: #bbbfc3;
}
.choices[data-type*="select-multiple"] .choices__button {
    border: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23495057' d='M8 8.707l3.646 3.647a.5.5 0 0 0 .708-.708L8.707 8l3.647-3.646a.5.5 0 0 0-.708-.708L8 7.293 4.354 3.646a.5.5 0 1 0-.708.708L7.293 8l-3.647 3.646a.5.5 0 0 0 .708.708L8 8.707z'/%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    padding: 0;
    margin: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.choices[data-type*="select-multiple"] .choices__button:hover {
    opacity: 0.75;
}
.choices__list--dropdown {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0 0 0.25rem 0.25rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    margin-top: -1px;
    background-color: #fff;
}
.choices__list--dropdown .choices__item--selectable {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #212529;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #f8f9fa;
    color: #212529;
}
.choices.is-focused .choices__inner {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.choices__list--dropdown .choices__item {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    color: #212529;
}
.choices__list--dropdown .choices__item:hover {
    background-color: #f8f9fa;
}
.choices__placeholder {
    opacity: 0.65;
}
/* Fix placeholder and input */
.choices__input {
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    background-color: transparent !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    margin-top: 2px !important;
}
.choices__inner:has(.choices__list--multiple:empty) .choices__input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}
.choices__list--dropdown {
    display: none;
}
.choices.is-focused .choices__list--dropdown {
    display: block;
}
.choices {
    margin-bottom: 1rem;
}
.choices__inner {
    min-height: calc(2.25rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff !important;
    border: 1px solid #ced4da;
    border-radius: 0.25rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.is-open .choices__inner {
    border-radius: 0.25rem 0.25rem 0 0 !important;
}
/* .choices__input {
    background-color: transparent !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
} */
.choices__list--multiple .choices__item {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    margin: 0.2rem;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: 0.2rem;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-wrap: auto;
}
.choices__list--multiple .choices__item.is-highlighted {
    background-color: #e2e6ea;
    border-color: #bbbfc3;
}
.choices[data-type*="select-multiple"] .choices__button {
    border: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23495057' d='M8 8.707l3.646 3.647a.5.5 0 0 0 .708-.708L8.707 8l3.647-3.646a.5.5 0 0 0-.708-.708L8 7.293 4.354 3.646a.5.5 0 1 0-.708.708L7.293 8l-3.647 3.646a.5.5 0 0 0 .708.708L8 8.707z'/%3E%3C/svg%3E");
    background-size: 10px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    padding: 0;
    margin: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.choices[data-type*="select-multiple"] .choices__button:hover {
    opacity: 0.75;
}
.choices__list--dropdown {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0 0 0.25rem 0.25rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    margin-top: -1px;
    background-color: #fff;
}
.choices__list--dropdown .choices__item--selectable {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #212529;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #f8f9fa;
    color: #212529;
}
.choices.is-focused .choices__inner {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.choices__list--dropdown .choices__item {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    color: #212529;
}
.choices__list--dropdown .choices__item:hover {
    background-color: #f8f9fa;
}
.choices__placeholder {
    opacity: 0.65;
}
/* Fix placeholder and input */
.choices__input {
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    background-color: transparent !important;
    margin-bottom: 0 !important;
}
.choices__inner:has(.choices__list--multiple:empty) .choices__input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}
.choices__list--dropdown {
    display: none;
}
.choices.is-focused .choices__list--dropdown {
    display: block;
}
.flatpickr-calendar-custom {
    z-index: 1 !important;
}
.custom-file-label:after{
    content: "参照";
}
.custom-file-input {
    cursor: pointer;
}

.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 85px; /* Space for the "参照" button */
}

.custom-file-label:hover::after {
	content: attr(data-title);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	padding: 5px 10px;
	background: rgba(0, 0, 0, 0.8);
	color: white;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	z-index: 1000;
}
.form-check-input, .form-check-label {
    cursor: pointer;
}

/* --- Styles for article detail page (moved from inline in blade) --- */
.article-container { width: 80%; margin: 0 auto; }
@media (max-width: 768px) {
    .article-container { width: 95%; }
}
.article-container .hsec2_items { display: block; }
.article-container .hsec2_left {
    width: 100%;
    margin: 0 0 18px 0;
    text-align: unset;
    display: block;
    padding: 0;
    box-sizing: border-box;
}
.article-container .hsec2_left img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0;
    box-sizing: border-box;
}
.article-container .article-title,
.article-container .article-cats a,
.article-container .article-date,
.article-container .article-body,
.article-container .related-articles h3,
.article-container .article-nav a { color: #000 !important; }
.article-container .article-body { max-width: 100%; }

/* End article detail page styles */

/* Ensure any links or nested elements inside the article body are black as well */
.article-container .article-body,
.article-container .article-body * {
    color: #000 !important;
}
.article-container .article-body a {
    color: #000 !important;
    text-decoration: none; /* keep link look neutral; remove if you want underlines */
}
.article-container .related-articles a {
    color: #000 !important;
}

/* Category chip: keep the background blue but make the category text white */
.article-container .article-cats a {
    color: #fff !important;
}
.article-container .article-cats a:hover {
    color: #fff !important;
}

/* spacing between category chip and title */
.article-container .article-meta {
    margin-bottom: 8px;
}
.article-container .article-cats {
    display: inline-block;
    padding: 4px 8px; /* keep chip padding if not already set */
    border-radius: 2px;
    margin-bottom: 10px; /* ensure gap to title */
}
.article-container .article-title {
    margin-top: 6px;
}

/* Center the article thumbnail: neutralize floats and center the figure and image */
.article-container .hsec2_left {
    float: none !important;
    display: block;
    margin: 0 auto 18px auto; /* bottom spacing kept */
    text-align: center;
}
.article-container .hsec2_left img {
    display: inline-block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Set article content font size to 15px for paragraphs, lists, and inline content */
.article-container .article-body,
.article-container .article-body p,
.article-container .article-body li,
.article-container .article-body span,
.article-container .article-body td,
.article-container .article-body th {
    font-size: 15px !important;
    line-height: 1.7; /* keep readable spacing */
}

/* Add vertical spacing between H2 (.article-title) and the article paragraphs
   (scoped to article pages via .article-container). */
.article-container .article-title {
    margin-bottom: 54px; /* increased further: 36px * 1.5 */
}
.article-container .article-body {
    margin-top: 36px; /* increased further: 24px * 1.5 */
}

/* Spacing for headings inside article pages */
.article-container .article-body h2 {
    margin-top: 72px; /* 48px * 1.5 */
    margin-bottom: 36px; /* 24px * 1.5 */
}
.article-container .article-body h3 {
    margin-top: 54px; /* 36px * 1.5 */
    margin-bottom: 30px; /* 20px * 1.5 */
    font-weight: 700; /* make h3 bold */
    position: relative; /* needed for underline pseudo-element */
}

/* Thin, lighter blue underline for H3 (scoped to article pages). This mirrors
   the H2 underline but at half the thickness and with a lighter color. */
.article-container .article-body h3:after {
    content: '';
    position: absolute;
    left: 0;
    /* place slightly below the h3 text block; adjust bottom if needed */
    bottom: -8px;
    width: 36px; /* match the visual length used elsewhere (adjustable) */
    height: 3px; /* roughly half or less than typical H2 bars (e.g., 6-7px) */
    background: rgba(0,50,175,0.55); /* lighter blue */
    border-radius: 2px;
}

/* Paragraph spacing: increase gap between <p> elements inside article body */
.article-container .article-body p {
    margin-bottom: 1.5em; /* roughly 1.5x default paragraph gap */
}

/* Article-detail specific override: make the right column fill the article container
   (the container itself is set to 80% width of the viewport). This overrides
   global rules (e.g., .hsec2_right { width:600px }) so the blue area becomes
   centered and wide only on the article detail page. */
.article-container .hsec2_right {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Ensure any inner floats are cleared so content flows correctly */
.article-container .hsec2_items::after {
    content: "";
    display: block;
    clear: both;
}