/**
* 共通スタイルシート
*/
/* ローディングスピナー */
#auth-loading {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s;
}
#auth-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

/* スピナーアニメーション */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0D3B91;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* メインコンテンツ */
body {
  /*opacity: 0;*/
  transition: opacity 0.3s;
}
body.ready {
  opacity: 1;
}

/* PC版非表示 */
@media (min-width: 901px) {
    .sp-header-user, .sp-hamburger-btn, .sp-hamburger-menu, .p-filter-title,
    .p-footer-pcview {
        display: none !important;
    }
}

/* サイドメニュー全体 */

.p-sidemenu {
    padding: 0 0 1px 0;
}

.p-sidemenu__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 上部メインメニュー */

.p-sidemenu__list:not(.p-sidemenu__list--sub) {
    padding: 20px 0 8px;
}

.p-sidemenu__item {
    /* 各メニュー項目のスタイル */
    margin:0 15px;
}

.p-sidemenu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: var(--color-text-base);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-s);
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.p-sidemenu__subtext {
    font-size: var(--font-size-xxs);
    color: var(--color-text-sub);
    margin-left: auto;
}

/* ホバー時の挙動（任意） */

.p-sidemenu__item:not(.is-active) .p-sidemenu__link:hover {
    background: #f0f2f5;
}

.p-sidemenu__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.p-sidemenu__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* アクティブなメニュー項目 */

.p-sidemenu__item.is-active .p-sidemenu__link {
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    padding: 11px 20px;
}

.p-sidemenu__item.is-active .p-sidemenu__link .p-sidemenu__icon svg {
    color: #FFF;
}
.p-sidemenu__item--sub {
    margin: 0 35px;
}
.p-sidemenu__item--sub.is-active .p-sidemenu__link {
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    padding: 11px 10px;
}

/* 区切り線 */

.p-sidemenu__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 16px 0;
}

/* 下部サブメニュー */
.p-sidemenu__list--sub .p-sidemenu__link {
    font-weight: var(--font-weight-medium);
    padding: 10px;
}

.p-sidemenu__list--sub .p-sidemenu__icon {
    display: none; /* 下部メニューはアイコンなし */
}

.p-sidemenu__list--sub {
    margin: 0 0 24px;
    list-style: none;
}

.p-sidemenu__list--sub .p-sidemenu__item {
    margin-left: 35px;
}

/* --- レイアウト(l-) --- */

.l-container {
    max-width: var(--width-container);
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}


.l-header {
    background: var(--color-background-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 10;
}


.l-header__inner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.l-main {
    padding-top: 40px;
    padding-bottom: 40px;
}


.l-main__inner {
    display: flex;
    gap: var(--space-gutter);
    align-items: flex-start;
    justify-content: center;
    flex: 1;
}


.l-sidebar {
    width: var(--width-sidebar);
    flex-shrink: 0;
    min-width: var(--width-sidebar);
}


.l-content {
    min-width: var(--width-main);
}


.l-footer {
    background: var(--color-background-white);
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
    margin-top: auto;
}

.l-main__inner > .l-content {
  flex: 1 1 0;
  min-width: 0;
}

.l-content .c-card,
.l-content .p-settings {
  width: 100%;
  box-sizing: border-box;
}

/* --- コンポーネント(c-) --- */

.c-card {
    background: var(--color-background-white);
    /*border-radius: var(--radius-card);*/
}

/* --- コンポーネント(c-) 追加 --- */

.c-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--font-size-xxs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-sub);
    background: var(--color-tag-bg);
    border-radius: 4px;
    margin-top: 4px;
}


.c-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    vertical-align: middle;
}
.c-toggle-switch__input {
    opacity: 0;
    width: 0;
    height: 0;
}
.c-toggle-switch__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-toggle-off);
    transition: .3s;
    border-radius: 26px;
}
.c-toggle-switch__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.c-toggle-switch__input:checked + .c-toggle-switch__slider {
    background: var(--color-primary);
}
.c-toggle-switch__input:checked + .c-toggle-switch__slider:before {
    transform: translateX(22px);
}


.c-button {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 12px 36px;
    font-family: var(--font-family-base);
    font-size: var(--font-size-m);
    font-weight: var(--font-weight-bold);
    color: #fff;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s, opacity 0.2s;
}
.c-button:hover {
    background: #002266;
    opacity: 0.92;
}

.c-link-outline{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 20px;
  font-size: var(--font-size-base);
  border: 1px solid #222;
  border-radius: 2px;
  background: #fff;
}
.c-link-outline:hover{ background: #f7f7f7; }

/* --- 汎用チェック（色 #039） --- */
.c-check{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.c-check__input{
  position:absolute;
  opacity:0;
  width:1px; height:1px; 
  overflow:hidden; clip:rect(0,0,0,0); /* 視覚的に隠す（アクセシブル） */
}
.c-check__box{
  width: 20px; height: 20px;
  border: 1px solid #222;
  border-radius: 1px;
  background: #fff;  /* 常に白背景 */
  position: relative;
  display:inline-block;
  box-sizing: border-box;
  transition: border-color .2s ease;
}

/* チェックマーク */
.c-check__input:checked + .c-check__box::after{
  content:"";
  position:absolute;
  left:5px; top:1px;
  width:8px; height:14px;
  border-right:3px solid #039;  /* 色は枠線と同じ */
  border-bottom:3px solid #039;
  transform: rotate(45deg);
  border-radius:2px;   /* 少し角を丸める */
  animation: checkmark .2s ease forwards;
}
.c-check__label{ font-size:14px; color:#333; }

/* --- プロジェクト(p-) --- */
.p-section__header {
    padding: 20px 32px 5px;
    border-bottom: 1px solid #222;
}

.p-section__top-header {
    padding: 0;
    border-bottom: 1px solid #222;
}

.p-section__title {
    margin: 0 0 16px 0;
    font-size: var(--font-size-l);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.02em;
}

.p-section__title--sub {
    margin: 0 0 24px 0;
    font-size: var(--font-size-m);
    font-weight: var(--font-weight-bold);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.p-section__description {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-sub);
}

.p-section__subscription-section {
    padding: 20px 35px;
}

#p-section__mainform { position: relative; }

/* --- pagination --- */
.c-pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.c-pagination span,
.c-pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin: 0 5px;
    text-decoration: none;
    color: #333;
    box-sizing: border-box;
}
.c-pagination .c-pagination__current {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #333;
    background: #333;
    color: #fff;
    margin: 0 5px;
    box-sizing: border-box;
}
.c-pagination .c-pagination__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin: 0 5px;
    background: #fff;
    color: #333;
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
    vertical-align: middle;
    box-sizing: border-box;
}
.c-pagination .c-pagination__arrow.disabled {
    color: #ccc;
    border-color: #eee;
    pointer-events: none;
    background: #f7f7f7;
}
.c-pagination .c-pagination__ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 20px;
    height: 32px;
    line-height: 32px;
    margin: 0 5px;
    color: #999;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 18px;
    vertical-align: middle;
    box-sizing: border-box;
}

.p-filter-area {
    background-color: #eee;
    display: flex;
    padding: 24px;
    border-radius: 4px;
    flex-wrap: wrap;
    margin: 0 0 30px;
    flex-direction: column;
}
.p-filter-labels {
    display: flex;
    gap: 25px;
    margin-bottom: 4px;
}

.p-filter-labels label {
    font-weight: bold;
    min-width: 240px;
}
.p-filter-row {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.p-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-filter-group label {
    font-weight: bold;
}

.p-custom-select-wrapper {
    position: relative;
    width: 240px;
}

/* select */
.c-select-wrapper {
    position: relative;
    display: inline-block;
    width: 240px;
}

.c-custom-select {
    appearance: none;
    width: 100%;
    height: 38px;
    padding: 8px 44px 8px 12px;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin: 0;
}

.p-custom-select:focus {
    outline: none;
    border-color: #888;
}

.c-select-arrow {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 38px;
    height: 36px;
    background-color: #e5e5e5;
    border: 1px solid #ccc;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c-select-arrow::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

input[type="text"] {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 38px;
    width: 240px;
    box-sizing: border-box;
}

.c-btn-submit {
    padding: 8px 16px;
    background-color: #0D3B91;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    height: 38px;
    cursor: pointer;
}

.c-btn-submit:hover {
    background-color: #0a2f74;
}

.c-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.c-filter-buttons button {
    padding: 6px 14px;
    background: #fff;
    border-radius: 9999px;
    cursor: pointer;
    border: none;
    text-decoration: underline;
}

.c-filter-buttons .active {
    background: #0D3B91;
    color: white;
}

/* --- ヘッダー(l-header, p-header) --- */

.l-header__inner {
    justify-content: space-between;
    padding:0;
}


.l-header__right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.l-header__left {
    display: flex;
    align-items: center;
    gap: 2px;
}


.p-header-logo {
    display: block;
    height: 32px;
}
.p-header-logo svg {
    display: block;
    height: 100%;
    width: 150px;
    fill: #231815;
}


.p-header-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    margin-left: 12px;
}


.p-global-nav {
    display: flex;
    gap: 32px;
}


.p-global-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-s);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-base);
    text-decoration: none;
    padding: 4px 0;
}

.p-global-nav__icon {
    width: 8px;
    stroke: var(--color-text-base);
    stroke-width: 2px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Impressサイトアイコン一覧 --- */
/* サイトメニューオーバーレイのスクロール対応 */
.p-sites-menu {
    max-height: 80vh;
    overflow-y: auto;
}
ul.site-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 20px;
  width: 100%;
}

ul.site-icons.watch {
    border-bottom: rgba(51,51,51,0.3) 3px solid;
    padding: 20px 35px 40px;
}

ul.site-icons.cm {
    padding: 10px 35px 40px;
}

ul.site-icons > li {
    text-align: center;
    height: 100px;
    font-size: 12px;
    line-height: 16px;
    margin: 10px;
    overflow: hidden;
    list-style: none;
}

ul.site-icons a {
    display: block;
    width: 62px;
    margin: 0 auto;
    color: #333;
    text-decoration: none;
}

ul.site-icons a>span {
    display: block;
    width: 62px;
    height: 62px;
    margin: 0 auto 5px;
    border-radius: 4px;
}

ul.site-icons>li.headline>a>span {
    background: url('/assets/img/logo/headline.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.clw>a>span {
    background: url('/assets/img/logo/clw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.pcw>a>span {
    background: url('/assets/img/logo/pcw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.dcw>a>span {
    background: url('/assets/img/logo/dcw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.ah>a>span {
    background: url('/assets/img/logo/ah.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.avw>a>span {
    background: url('/assets/img/logo/avw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.gmw>a>span {
    background: url('/assets/img/logo/gmw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.ktw>a>span {
    background: url('/assets/img/logo/ktw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.iw>a>span {
    background: url('/assets/img/logo/iw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.wf>a>span {
    background: url('/assets/img/logo/wf.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.kdw>a>span {
    background: url('/assets/img/logo/kdw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.car>a>span {
    background: url('/assets/img/logo/car.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.trw>a>span {
    background: url('/assets/img/logo/trw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.ctw>a>span {
    background: url('/assets/img/logo/ctw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.video>a>span {
    background: url('/assets/img/logo/video.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.ntp>a>span {
    background: url('/assets/img/logo/ntp.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    background-color: #fff;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.sng>a>span {
    background: url('/assets/img/logo/sng.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    background-color: #fff;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.dkr>a>span {
    background: url('/assets/img/logo/dkr.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    background-color: #f7f7ef;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.grf>a>span {
    background: url('/assets/img/logo/grf.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.qfr>a>span {
    background: url('/assets/img/logo/qfr.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.pth>a>span {
    background: url('/assets/img/logo/pth.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.ipw>a>span {
    background: url('/assets/img/logo/ipw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.hbw>a>span {
    background: url('/assets/img/logo/hbw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.grw>a>span {
    background: url('/assets/img/logo/grw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
}

ul.site-icons>li.kit>a>span {
    background: url('/assets/img/logo/kit.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    border: 1px solid rgba(100,100,100,0.3);
}

ul.site-icons>li.mgw>a>span {
    background: url('/assets/img/logo/mgw.svg') 0 0 no-repeat;
    background-size: 62px 62px;
    border: 1px solid rgba(100,100,100,0.3);
}


.p-user-icon {
    display: block;
    width: 40px;
    height: 40px;
}

.p-pagetop {
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    text-decoration: underline;
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.p-pagetop-icon {
    width: 13px;
    height: 12px;
}

.p-pagetop-icon svg {
    display: block;
}

/* --- フッター(l-footer, p-footer) --- */

.l-footer {
    padding: 32px 0;
    margin-top: auto;
}


.l-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}


.p-footer-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 5px;
}


.p-footer-nav__item {
    position: relative;
    padding: 0 5px;
}

/* 疑似要素で区切り線を追加 */

.p-footer-nav__item:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -5px;
    top: 0;
    color: var(--color-text-base);
}

.p-footer-nav__link {
    color: var(--color-text-base);
    font-size: var(--font-size-xs);
    text-decoration: underline;
}

.p-footer-logo img {
    display: block;
    height: 32px;
}


.p-copyright {
        margin: 0;
        font-size: 11px;
        font-weight: var(--font-weight-light);
        color: #888;
}

/* --- レスポンシブベース --- */
@media (max-width: 1200px) {
    .l-container {
        max-width: 100%;
        padding: 0;
    }
    .l-header__inner, .l-footer__inner {
        max-width: 98vw;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 900px) {
    .p-global-nav__pc-sites, .p-global-nav__pc-category {
        display: none !important;
    }
    /* スマホ版カテゴリリンクSVGだけ右寄せ */
    .p-global-nav__sp-category, .p-global-nav__sp-sites {
        display: block;
        position: relative;
        padding: 0;
    }
    .p-global-nav__sp-category-inner,
    .p-global-nav__sp-sites-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 100%;
    }
    .p-global-nav__sp-category-text,
    .p-global-nav__sp-sites-text {
        flex: 1 1 auto;
        text-align: center;
        width: 100%;
        font-size: var(--font-size-base);
    }
    .p-global-nav__sp-category-svg,
    .p-global-nav__sp-sites-svg {
        flex: 0 0 auto;
        margin-left: auto;
        display: inline-flex;
        align-items: center;
    }
    .p-global-nav__sp-category-svg .p-global-nav__icon,
    .p-global-nav__sp-sites-svg .p-global-nav__icon {
        margin-left: 0;
        vertical-align: middle;
        display: inline;
    }
    /* ハンバーガーメニュー上部：ユーザー名・ID・アイコンを左寄せ横並び */
    .sp-hamburger-menu__close-row {
        display: flex;
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
        padding-right: 75px;
        margin-bottom: 16px;
    }
    .sp-hamburger-menu__user-inline {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-right: 25px;
    }
    .sp-hamburger-menu__user-inline .fukidashi-user-name,
    .sp-hamburger-menu__user-inline .fukidashi-user-id {
        font-size: var(--font-size-base);
        color: #333;
        font-weight: bold;
    }
    .sp-hamburger-menu__user-inline .fukidashi-user-icon {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sp-hamburger-menu__close {
        margin-left: auto;
    }
    /* ログアウトボタンを右端に寄せる */
    .sp-hamburger-menu__nav-logout {
        display: flex;
        justify-content: flex-end;
    }
    .p-sidemenu__item.is-active .p-sidemenu__link {
        background: unset;
        color: unset;
    }
    .p-sidemenu__item.is-active .p-sidemenu__link .p-sidemenu__icon svg {
        color:unset;
    }
    .p-sidemenu__list:not(.p-sidemenu__list--sub) > li {
        border-bottom: #ccc solid 1px;
    }
    .p-sidemenu__list:not(.p-sidemenu__list--sub) > li:last-of-type {
        border-bottom: none;
    }
    .p-header-logo svg {
        width:150px;
        height: auto;
    }
    .p-section__header {
        padding: 15px 20px 0;
    }
    .l-main__inner {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    .l-sidebar {
        width: 100%;
        min-width: 0;
        margin-bottom: 24px;
        display: none;
    }
    .l-content {
        width: 100%;
        min-width: 0;
    }
    .l-header__inner {
        padding: 0 30px;
    }
    .l-header__right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .l-header__right nav.p-global-nav {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 5px;
    }
    .l-header__right .sp-header-user {
        flex: 0 0 auto;
        min-width: 0;
    }
    .sp-hamburger-menu__nav > nav.p-global-nav {
        display: flex;
        gap: 10px;
        margin-bottom: 25px;
    }
    .sp-hamburger-menu__nav > nav.p-global-nav > a {
        /*flex: 1 1 0;*/
        text-align: center;
        padding: 15px;
        font-size: var(--font-size-base);
        border: 1px solid #222;
        border-radius: 4px;
        display: unset;
    }
    .p-sidemenu__list--sub .p-sidemenu__item {
        margin-left: 25px;
    }
    .sp-hamburger-menu__nav .p-sidemenu__list--sub li > a {
        padding: 5px;
    }
    .p-section__title-sub-row {
        margin-bottom: 18px;
    }
    .p-section__listlink {
        font-size: 13px;
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    /* 右端寄せボタン風ログアウト */
    .sp-hamburger-menu__nav-logout {
        display: flex;
        justify-content: flex-end;
    }
    .sp-hamburger-menu__nav-right-btn {
        margin-left: auto;
        min-width: 120px;
        border: 1px solid #222;
        border-radius: 4px;
        background: #fff;
        font-weight: bold;
        text-align: center;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
        transition: background 0.2s, color 0.2s;
        display: inline-block;
    }
    .sp-hamburger-menu__nav-right-btn:hover {
        background: #f5f5f5;
        color: #093986;
        border-color: #093986;
    }
    .l-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }
    .l-header__left, .l-header__right {
        flex-direction: column;
        align-items: center;
        padding: 10px 0 0;
        gap: 10px;
    }
    .p-header-logo {
        height: 24px;
    }
    .p-header-title {
        font-size: var(--font-size-xxxs);
        margin-left: 6px;
    }
    .p-global-nav {
        gap: 12px;
        flex-direction: row;
    }
    .l-main {
        padding-top: 16px;
        padding-bottom: 24px;
    }
    .l-main__inner {
        flex-direction: column;
        gap: 0;
    }
    .l-sidebar {
        display: none;
    }
    .l-content {
        width: 100%;
        min-width: 0;
    }
    .c-card {
        /*border-radius: var(--radius-card);*/
    }
    .c-tag {
        font-size: var(--font-size-xxs);
        padding: 2px 8px;
        border-radius: 4px;
        margin-top: 2px;
    }
    .c-toggle-switch {
        width: 36px;
        height: 20px;
    }
    .c-toggle-switch__slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        top: 3px;
    }
    .c-toggle-switch__input:checked + .c-toggle-switch__slider:before {
        transform: translateX(12px);
    }
    .c-button {
        width: 100%;
        padding: 12px 0;
        font-size: var(--font-size-m);
        border-radius: 6px;
    }
    .l-footer {
        padding: 16px 0;
        margin-top: 24px;
    }
    .l-footer__inner {
        gap: 12px;
    }
    .p-footer-logo img {
        height: 24px;
    }
    .p-section__subscription-section {
        padding: 12px 16px;
    }
    .p-global-nav__pc-category,
    .p-global-nav__pc-sites {
        display: none !important;
    }
    .l-header__right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
    .l-header__right nav.p-global-nav {
        /*flex: 1 1 auto;
        min-width: 0;*/
        justify-content: flex-end;
    }
    .l-header__right .sp-header-user {
        flex: 0 0 auto;
        min-width: 0;
    }
    .l-header__right nav.p-global-nav,
    .l-header__right .sp-header-user {
        height: 48px;
        display: flex;
        align-items: center;
    }
    .sp-hamburger-menu .p-sidemenu__list {
        border: #222 1px solid;
        background: #fff;
        border-radius: 4px;
    }
    .sp-hamburger-menu .p-sidemenu__icon {
        display: unset;
    }
    .sp-hamburger-menu .p-sidemenu__list--sub {
        border:none;
        margin: 10px 0;
    }
    .sp-hamburger-menu .p-sidemenu__divider {
        border:none;
        margin:0;
    }
    .sp-hamburger-menu .p-sidemenu__list--sub > li {
        margin-bottom: 2px;
    }
}

/* --- PC用吹き出し --- */
/* ユーザーアイコン吹き出し用 */
/* 親要素（.p-user-icon）にrelativeを指定 */
.p-user-icon {
    position: relative;
}
.user-fukidashi {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 12px;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 24px 32px 20px 32px;
    min-width: 260px;
    min-height: 240px;
    display: none;
    border: 1px solid #b5b5b5;
    text-align: center;
}
.user-fukidashi.active {
    display: block;
}
.user-fukidashi::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 16px solid #fff;
    z-index: 1;
}
.user-fukidashi::after {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 18px solid #b5b5b5;
    z-index: 0;
}
.user-fukidashi .fukidashi-user {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #b5b5b5;
    padding: 10px 0 20px;
}
.user-fukidashi .fukidashi-user-icon {
    width: 36px;
    height: 36px;
    background: #333;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}
.user-fukidashi .fukidashi-user-name {
    color: #333;
}
.user-fukidashi .fukidashi-user-id {
    color: #333;
    margin-left: 8px;
    font-weight: 500;
}
.user-fukidashi .fukidashi-link {
    color: #0d3b91;
    font-weight: 500;
    text-decoration: underline;
    margin-bottom: 15px;
    cursor: pointer;
}
.user-fukidashi .fukidashi-logout {
    color: #0d3b91;
    font-weight: 500;
    text-decoration: underline;
    display: inline-block;
    cursor: pointer;
}

/* --- SP用ハンバーガーメニュー・フキダシ --- */
@media (max-width: 900px) {
    .l-header__right {
        display: flex;
        align-items: center;
    }
    .sp-hamburger-btn {
        display: inline-flex;
        align-items: center;
        background: none;
        border: none;
        padding: 0 0 0 8px;
        cursor: pointer;
        height: 40px;
    }
    .sp-header-user {
        display: flex;
        align-items: center;
    }
    .sp-header-user .user-fukidashi {
        position: static;
        margin-right: 8px;
    }
    .sp-header-user .user-fukidashi.active {
        display: block;
    }
    .sp-header-user .user-fukidashi {
        display: none;
    }
    .sp-hamburger-menu {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    .sp-hamburger-menu.open {
        display: block;
    }
    .sp-hamburger-menu__panel {
        background: #fff;
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0; left: 0;
        box-shadow: none;
        overflow-y: auto;
        padding: 27px 0 0 0;
        max-width: none;
        z-index: 1001;
    }
    .sp-hamburger-menu__close {
        position: absolute;
        top: 19px;
        right: 18px;
        background: none;
        border: none;
        font-size: 2rem;
        color: #333;
        cursor: pointer;
    }
    .sp-hamburger-menu__user {
        margin-bottom: 16px;
        padding: 0 24px;
    }
    .sp-hamburger-menu__nav {
        padding: 24px;
    }
    .sp-hamburger-menu__nav-logout {
        padding: 0 24px 16px 24px;
    }
    .sp-hamburger-menu__nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .sp-hamburger-menu__nav li {
        margin: 6px 0;
    }
    .sp-hamburger-menu__nav a {
        color: #222;
        text-decoration: none;
        font-size: var(--font-size-base);
        padding: 8px 20px;
    }
    .p-sidemenu__list:not(.p-sidemenu__list--sub){
        padding: 0;
        border: #222 1px solid;
        border-radius: 4px;
    }
    .sp-hamburger-menu__nav-right-btn {
        border: #222 1px solid;
        border-radius: 4px;
        font-size: var(--font-size-base);
    }
    #user-fukidashi {
        min-width: 200px;
        padding: 10px 10px 20px;
        min-height: auto;
    }
    #user-fukidashi .fukidashi-user {
        margin-bottom: 10px;
        padding: 15px 10px;
    }
}

/* --- パンくず（不要になった会員登録用）念のため残しておく ---*/
.c-breadcrumb {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 18px;
}
.c-breadcrumb ol {
    display: flex;
    gap: 0;
    font-size: 13px;
    color: #909090;
    font-weight: 700;
    list-style: none;
    padding: 0;
    margin: 0;
}
.c-breadcrumb li {
    display: flex;
    align-items: center;
}
.c-breadcrumb li:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin: 0 8px;
    vertical-align: middle;
    /* CSS三角形（右向き） */
    border-top: 0.32em solid transparent;
    border-bottom: 0.32em solid transparent;
    border-left: 0.45em solid #bbb;
}
.c-breadcrumb .is-active {
    color: var(--blue);
}

#fixed-button{
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    padding: 11px 30px;
    font-size: var(--font-size-base);
}

/* Myブックマーク見出し右端リンク用 */
.p-section__title-sub-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 12px;
}
.p-section__title-sub-row .p-section__title--sub {
    margin: 0;
    flex: 1;
    border: none;
    padding-bottom: 0;
}
.p-section__listlink {
    font-size: 14px;
    color: #0D3B91;
    text-decoration: underline;
    margin-left: 16px;
    font-weight: bold;
}
@media (max-width: 900px) {
    .p-section__title-sub-row {
        margin-bottom: 18px;
        padding-bottom: 8px;
    }
    .p-section__listlink {
        font-size: 13px;
        margin-left: 10px;
    }
}

/* Myブックマーク絞り込みフォームのレスポンシブ対応 */
@media (max-width: 900px) {
    .p-filter-area {
        padding: 20px 15px;
        flex-direction: column;
        font-size: 13px;
        gap: 12px;
    }
    .p-filter-labels {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    .p-filter-labels label {
        min-width: 0;
        font-size: 13px;
        margin-bottom: 2px;
    }
    .p-filter-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .p-custom-select-wrapper,
    .p-custom-text-wrapper {
        width: 100%;
        min-width: 0;
        margin-bottom: 8px;
    }
    .p-custom-select-wrapper {
        width: 240px;
        max-width: 100%;
    }
    .c-custom-select {
        width: 100%;
        min-width: 0;
        font-size: 13px;
        height: 36px;
    }
    .c-select-arrow {
        height: 36px;
        width: 36px;
        right: 0;
        top: 0;
    }
    .p-custom-text-wrapper input[type="text"] {
        font-size: 13px;
        height: 36px;
    }
    .c-btn-submit {
        font-size: 13px;
        height: 36px;
        margin-top: 6px;
    }
    .p-filter-row {
        flex-direction: column;
        gap: 10px;
    }
    .p-filter-row .p-filter-group {
        max-width: 100%;
    }
    .p-custom-text-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    /* 絞り込みタイトル矢印の位置・サイズ調整 */
    .p-filter-title {
        position: relative;
        display: flex;
        align-items: center;
        font-weight: bold;
        font-size: var(--font-size-base);
        padding: 10px 15px;
        margin:0;
        border-bottom: 1px solid #ccc;
        background: #eee;
    }
    .c-filter-title__arrow {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .c-filter-title__arrow svg {
        width: 14px;
        height: 8px;
        display: block;
    }
}

/** フッターSP版max-width:900px リンクリストを2列に **/
@media (max-width: 900px) {
    .p-footer-nav__list {
        gap: 0;
        border-radius: 4px;
        border: 1px solid #ccc;
    }
    .p-footer-nav__item {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #ccc;
    }
    .p-footer-nav__link {
        text-decoration: none;
    }
    .p-footer-nav__item:not(:last-child)::after {
        content: none;
    }
    /* 奇数番目: 左右にborder */
    .p-footer-nav__item:nth-child(odd) {
        border-right: 1px solid #ccc;
    }
    /* 偶数番目: 右端にだけborder */
    .p-footer-nav__item:nth-child(even) {
        border-left: none;
    }
    /* 最後と最後から2番目だけborder-bottom:none */
    .p-footer-nav__item:last-child,
    .p-footer-nav__item:nth-last-child(2) {
        border-bottom: none;
    }
    
    /* PC版でみるボタンの装飾 */
    .p-footer-pcview__btn svg {
        display: block;
        height: 1.3em;
        width: auto;
        vertical-align: middle;
    }
    .p-footer-pcview {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
    }
    .p-footer-pcview__btn {
        width: 100%;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #fff;
        padding: 12px;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: var(--font-size-s);
    }
    .p-footer-pcview__btn:hover {
        background: #f5f5f5;
    }
    
    /* PC/スマホ切り替えボタンの排他表示 */
    .p-footer-pcview__btn { display: none; }
    .p-footer-pcview--show-desktop #btn-force-desktop { display: flex; }
    .p-footer-pcview--show-mobile  #btn-force-mobile  { display: flex; }
}

/* --- トースト通知 --- */
/* 画面上部中央固定（デスクトップ・モバイル共通） */
.c-toast-layer{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  z-index: 9999; pointer-events: none;
  width: max-content;
  max-width: min(480px, calc(100vw - 32px));
}
@media (max-width: 640px){
  .c-toast-layer{
    left: 16px; right: 16px;
    width: auto; transform: none;
  }
}

/* トーストの見た目（淡色＋大きめ角丸） */
.c-toast{
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  max-width: min(520px, 90vw);
  border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  background: #fff; border: 1px solid #eef1f4; color: #111827; font-size: .95rem; line-height: 1.35;
}
.c-toast.success{ background:#f0fdf4; border-color:#dcfce7; color:#166534 }
.c-toast.info   { background:#eff6ff; border-color:#dbeafe; color:#1e40af }
.c-toast.error  { background:#fef2f2; border-color:#fee2e2; color:#991b1b }

.c-toast__icon{ display:inline-grid; place-items:center; width:22px; height:22px }
.c-toast__close{
  margin-left:auto; border:none; background:transparent; cursor:pointer;
  font-size:16px; line-height:1; color:inherit; opacity:.6
}
.c-toast__close:hover{ opacity:1 }

/* アニメーション（Alpineのx-transitionクラス）: フェードのみ */
.t-enter{ transition: opacity .18s ease }
.t-enter-start{ opacity: 0 }
.t-enter-end{   opacity: 1 }
.t-leave{ transition: opacity .16s ease }
.t-leave-start{ opacity: 1 }
.t-leave-end{   opacity: 0 }

@media (prefers-reduced-motion: reduce){
  .t-enter, .t-leave{ transition: none }
}

/* --- インラインバリデーション（共通） --- */

/* フィールド直下エラーテキスト */
.c-field-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: #b91c1c;
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 4px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}
.c-field-error::before {
  content: "⚠";
  font-style: normal;
  flex-shrink: 0;
}

/* エラー状態の入力枠（type を問わず適用） */
.c-input--error,
.c-input--error[type="text"],
.c-input--error[type="password"],
.c-input--error[type="email"] {
  border-color: #e53e3e !important;
  background-color: #fff5f5 !important;
}

/* フォーム上部エラーサマリー */
.c-error-summary {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #991b1b;
  font-size: .9rem;
}
.c-error-summary__title {
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.c-error-summary__list {
  margin: 0;
  padding-left: 1.4em;
}
.c-error-summary__list li + li {
  margin-top: 2px;
}
/* サマリー内リンク */
.c-error-summary a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 2px;
}
.c-error-summary a:hover {
  opacity: .8;
}

/* ===== ログイン前 =================== */
body#logged-out {
  background: #fff;
}

/* ヘッダー＆フッター（logged-out版の密度感に合わせる） */
#logged-out .l-logged-out-header { border-bottom: 1px solid #e6e6e6; box-shadow: 0 2px 8px rgba(0,0,0,.03); }
#logged-out .l-logged-out-header__inner {
  max-width: 900px;
  padding: 18px 12px;
  gap: 14px;
}
#logged-out .c-logged-out-header__logo svg { height: 28px; }
#logged-out .l-logged-out-header__title { font-size: 16px; font-weight: 700; color: #222; }

/* logged-out状態ヘッダー・フッター専用調整 */
.l-logged-out-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 0;
}
.l-logged-out-header__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 25px 20px;
}
.c-logged-out-header__logo {
    display: flex;
    align-items: center;
    height: 40px;
}
.c-logged-out-header__logo svg {
    height: 32px;
    width: auto;
    display: block;
}
.c-logged-out-header__title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #222;
    letter-spacing: 0.04em;
}
@media (max-width: 900px) {
    .l-logged-out-header__inner, .l-logged-out-footer__inner {
        max-width: 98vw;
        padding-left: 8px;
        padding-right: 8px;
    }
    .l-logged-out-header__inner {
        height: 52px;
        gap: 10px;
    }
    .c-logged-out-header__logo svg {
        height: 24px;
    }
    .c-logged-out-header__title {
        font-size: var(--font-size-xs);
    }
}

.p-setting-form-block {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.setting-label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}
.setting-input {
  margin-bottom: 12px;
  max-width: 220px;
  vertical-align: middle;
  line-height: 1.5;
}
.setting-link-row {
  margin-top: 8px;
  text-align: right;
}
.c-setting-link {
  color: #005bac;
  text-decoration: underline;
  font-size: 0.95em;
}
.setting-birthday-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.setting-label,
.setting-input-desc {
  align-items: center;
}
.setting-label {
  min-width: 90px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}
.setting-label-icon {
  font-size: 1.2em;
  margin-right: 2px;
}
.setting-input-desc {
  color: #888;
  font-size: 0.95em;
  margin-left: 8px;
}
@media (max-width: 600px) {
  .setting-birthday-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .setting-label {
    margin-bottom: 2px;
  }
  .setting-input-desc {
    margin-left: 0;
    margin-top: 2px;
  }
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* モーダル関連 */
.sites-menu-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  padding: 18px;
  display: none;
  margin-top: 24px;
}
.sites-menu-modal.active {
  display: block;
}
.sites-menu-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 9998;
  display: none;
}
.sites-menu-modal-overlay.active {
  display: block;
}
.sites-menu-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.6em;
    color: #333;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 900px) {
  .sites-menu-modal {
    width: 96vw;
    max-width: 98vw;
    min-width: 0;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 18px 8px 32px 8px;
    border-radius: 10px;
    box-sizing: border-box;
    position: fixed;
    overflow-y: auto;
    max-height: 90vh;
  }
  .sites-menu-modal-close {
    top: 12px;
    right: 12px;
  }
  ul.site-icons.watch,
  ul.site-icons.cm {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px 10px;
  }
}

