/* Layout primitives supplied by the original site's form and grid libraries. */
body { background-image: none }
#wrapper { min-width: 0 }
[hidden], #header .dropmenu [hidden] { display: none !important }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
#wrapper :focus-visible { outline: 2px solid #145c9a; outline-offset: 2px }
button, summary { cursor: pointer }
button, input, select { font-family: inherit }
.col-md-12 { width: 100% }
.cont-data { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px }
.cont-data > .col-md-3.left { width: auto; float: none; display: flex }
.contents-top .inner .cont-data > .col-md-3 .contents-box { width: 100%; margin-inline: 0 }
.inner .top-info .contents-box { display: flex; align-items: center }
.top-info h2 { flex-shrink: 0 }
.inner .contents-info p { padding: 0 25px 30px }
.notice { padding: 12px 25px; background: #fff5da; color: #633800 }
.errorlist { color: #a32030; padding-left: 1.5em }

/* Masthead and dropdowns */
#header .head-menu { display: flex; justify-content: space-between; align-items: center; background: white }
#header .head-menu h1 { margin-top: 0 }
#header .head-menu > ul { display: flex; align-items: stretch; width: auto }
#header .head-menu > ul > li { display: flex; align-items: stretch; max-width: none }
#header .head-menu .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    padding: 0 22px;
    background: white;
    color: #32343d;
    font-size: 12px;
}
#header .head-menu .drop .menu-toggle { padding-right: 42px }
#header .head-menu .drop::after { pointer-events: none }
#header .head-menu .menu-toggle:hover { background: #eee }
#header .head-menu .menu-toggle img { width: 30px; height: 30px; border-radius: 50% }
#header .head-menu .dropmenu li ul {
    top: 100%;
    right: 0;
    height: auto;
    min-width: 195px;
    background: white;
    color: #222;
    box-shadow: 0 5px 10px #0002;
}
#header .head-menu .dropmenu li ul li { border-left: 0; border-bottom: 1px solid #eee }
#header .head-menu .dropmenu li ul li a { height: auto; padding: 12px; text-align: left }
.drop-area { padding: 12px }
.drop-area label { display: block; text-align: left; margin-bottom: 4px }
#header .head-menu .location-submit { min-width: 0; width: 80%; margin-top: 8px; padding: 4px; background: #f7931e }
#header .head-menu .logout button {
    min-width: 0;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #f7931e;
    color: white;
    font-size: 9px;
}
#header .head-menu .logout .fa { display: block; font-size: 24px; margin-bottom: 3px }

/* Search controls and results */
.search-wrap .series-filters { display: grid; grid-template-columns: minmax(290px, 1.5fr) 1fr 1fr auto; width: 100% }
.series-filters fieldset { border: 0; min-width: 0 }
.search-wrap .series-filters .searh-box { min-width: 0; margin: 0 }
.series-filters .searh-period .period-date { display: flex; align-items: center; gap: 6px; float: none }
.series-filters .searh-period .period-date input { width: auto; min-width: 0; padding: 3px }
.search-wrap .select-switch { display: flex }
.search-wrap .select-switch input { display: block }
.search-wrap .select-switch label { cursor: pointer }
.search-wrap .select-switch input:focus-visible + label,
.series-menu #myTab input:focus-visible + label { outline: 2px solid #145c9a }
.search-wrap .filter-submit { align-self: end }
.search-wrap .filter-submit button { min-width: 90px; background: #22a173 }
.inner .contents-menu { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap }
.inner .contents-menu #myTab { display: flex; flex-wrap: wrap; align-items: stretch; width: auto; padding: 0; list-style: none }
.inner .contents-menu #myTab li { display: flex; align-items: center; padding: 0; width: auto }
.inner .contents-menu #myTab a,
.inner .contents-menu #myTab label {
    display: block;
    padding: 19px clamp(10px, 2vw, 38px);
    color: #064d38;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}
.inner .contents-menu #myTab .active a,
.inner .contents-menu #myTab input:checked + label { color: #fff }
.inner .contents-menu #myTab .fa:before { margin-right: 6px }
.inner .contents-menu .result-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: auto;
    margin: 0;
    padding: 12px 20px;
    gap: 7px;
}
.inner .contents-menu .result-actions dt { float: none; width: auto; padding: 0; margin: 0 }
.result-actions button.link-btn-print { cursor: pointer; background: transparent }
.series-block h3 { margin: 20px 40px 0 }
.series-block .chart { position: relative; height: clamp(310px, 36vw, 550px); padding-top: 0; margin-top: 55px }
.inner .series-block .content-scroll { overflow: auto }
.content-scroll table.data { display: table; border-collapse: collapse; white-space: nowrap }
.content-scroll table.data thead { display: table-header-group; float: none }
.content-scroll table.data tbody { display: table-row-group }
.content-scroll table.data tr { display: table-row }
.content-scroll table.data tr th,
.content-scroll table.data tr td,
.content-scroll table.data tr th:first-child { display: table-cell; padding: 9px 20px; border-bottom: 1px solid #ddd; text-align: center; font-size: 13px }
.content-scroll table.data thead tr th { border-bottom: 1px solid #58666e }
.content-scroll table.data tbody th, .content-scroll table.data tbody tr:nth-child(odd) { background: #f7fafc }
.series-block > p { padding: 12px 40px }

/* Settings and forecast */
.form-group .submit, .form-horizontal .submit { text-align: center; margin-top: 22px }
.setting-field { display: flex; align-items: center; gap: 12px; padding: 16px 10px; border-bottom: 1px solid #dedede }
.setting-field:last-of-type { border-bottom: 0 }
.setting-field .control-label { flex: 0 1 24%; min-width: 160px }
.setting-field .col-md-1 { flex: 0 0 150px }
.setting-field select { appearance: auto }
.label-danger { color: #ae4154; font-size: 12px }
.settings-link { margin-top: 18px; text-align: center }
.settings-link a { text-decoration: underline }
.table { width: 100%; border-collapse: collapse }
.table th, .table td { padding: 10px 20px; text-align: left; border-bottom: 1px solid #ddd }
.table thead th { background: #22b573; color: white }
.table tbody th { width: 28%; font-weight: normal }
.table-striped tbody tr:nth-child(odd) { background: #f7fafc }
.table-hover tbody tr:hover { background: #e8f5f1 }
.data-m input, input[type="search"] { width: 100%; padding: 5px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px }
.account-form input { max-width: 360px; display: block }

/* Login and location selection */
.login-wrap.user { min-height: 100vh; height: auto; background: url(../img/login_bg_user.jpg) center / cover no-repeat }
.login-wrap .cont-box { max-width: 100% }
.login-wrap.user .cont-box { padding-bottom: 80px }
.login-wrap .info-box p { color: inherit }
.login-wrap.master { display: grid; grid-template-columns: 7fr 5fr; min-height: 100vh }
.login-wrap.master .bg { background: url(../img/login_bg_master.jpg) center / cover no-repeat }
.login-wrap.master .master-list { padding: 0; margin-top: 16px; height: min(480px, 60vh) }
.login-wrap.master .master-pane { min-width: 0 }

@media (min-width: 768px) {
    .contents-wrap .inner > .col-md-9.left { width: 75% }
    .contents-wrap .inner > .col-md-3.left { width: 25% }
    #header .pc-menu-wrap .pnav ul li a { padding-inline: clamp(20px, 2.7vw, 40px) }
}
@media (max-width: 1023px) {
    .cont-data { gap: 14px }
    .series-filters .searh-period .period-date { flex-wrap: wrap }
}
@media (max-width: 767px) {
    #header .head-menu { padding: 0 0 0 8px }
    #header .head-menu h1 { width: clamp(85px, 29vw, 200px); margin-right: 0 }
    #header .head-menu .menu-toggle { padding-inline: 8px }
    #header .head-menu .drop .menu-toggle { padding-right: 20px; font-size: 10px }
    #header .head-menu .drop::after { right: 5px; top: 23px }
    #header .head-menu .account-name, #header .pc-menu-wrap .top-date { display: none }
    #header .pc-menu-wrap .pnav ul { display: flex; justify-content: space-evenly }
    #header .pc-menu-wrap .pnav ul li, #header .pc-menu-wrap .pnav ul li:first-child {
        display: block; width: auto; height: auto; margin: 0;
    }
    #header .pc-menu-wrap .pnav ul li a { padding: 26px 10px; background: #2f323e; font-size: 13px }
    #header .pc-menu-wrap .pnav ul li a.active { background: #22a173 }
    .contents-top .inner .cont-data { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-inline: 12px }
    .contents-top .inner .cont-data > .col-md-3 .contents-box { min-width: 0 }
    .series-filters .searh-period .period-date input { max-width: 100% }
    .search-wrap .series-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 }
    .search-wrap .series-filters .searh-box { display: block; width: auto; padding: 10px }
    .search-wrap .series-filters .searh-box:first-of-type { grid-column: 1 / -1 }
    .inner .contents-menu #myTab a, .inner .contents-menu #myTab label { padding: 11px 9px; font-size: 12px }
    .inner .contents-menu .result-actions { padding: 8px 9px }
    .inner .contents-menu .result-actions dt > * { min-width: 0; margin: 0; padding: 5px 9px; font-size: 11px }
    .series-block .chart { margin: 30px 12px 0 }
    .inner .series-block .content-scroll { margin: 0 12px }
    .setting-field { flex-wrap: wrap }
    .setting-field .control-label { flex-basis: 100% }
    .table th, .table td { padding: 7px 10px }
    .login-wrap.master { display: block }
    .login-wrap.master .bg { display: none }
}
@media print {
    #header, #footer, .page-top, .search-wrap, .result-actions { display: none !important }
    .contents-wrap, .contents-top .inner .cont-data { background: none; padding-bottom: 0 }
    .series-block { break-inside: avoid }
}
/* Fit the dashboard controls and cards within the original spacing. */
.inner .contents-menu .result-actions dt > * {
    width: auto;
    min-width: 0;
    height: auto;
    padding: 12px 17px;
    border-radius: 24px;
    border: 1px solid #fff;
    color: #fff;
}
.inner .contents-menu .result-actions dt > *:hover {
    background: #fff;
    color: #186748;
}
.contents-top .inner .cont-data .col-md-3 h1 { font-size: clamp(13px, 1.34vw, 19px) }
.contents-top .inner .cont-data .col-md-3 dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 5px;
    align-items: center;
}
.contents-top .inner .cont-data .col-md-3 dl dt,
.contents-top .inner .cont-data .col-md-3 dl dd { width: auto; margin: 0; padding: 0 }
.contents-top .inner .cont-data .col-md-3 dl dd { text-align: right; overflow-wrap: anywhere }
.contents-top .inner .cont-data .col-md-3 dl dd span { font-size: clamp(16px, 1.9vw, 28px); padding: 0 }
.contents-top .inner .cont-data .col-md-3 .link-btn-next { width: min(170px, 90%); min-width: 0 }
@media (max-width: 767px) {
    .contents-wrap .contents-top { margin-top: 0 }
    .contents-top .inner .cont-data .col-md-3 dl { padding: 12px; grid-template-columns: 1fr }
    .contents-top .inner .cont-data .col-md-3 dl dd { text-align: left }
    .inner .contents-menu .result-actions dt > * { padding: 5px 9px }
    .login-wrap.user .cont-box { width: min(420px, 100%) }
}
.contents-top .inner .cont-data .col-md-3 dl::after,
.contents-top .inner .top-info .contents-box::after { display: none }
.contents-top .inner .cont-data .col-md-3 dl { padding-bottom: 15px }
#header .head-menu > ul > li { width: auto }
#header .head-menu .account-name { overflow-wrap: anywhere }
@media (max-width: 767px) {
    #header .head-menu .user .menu-toggle::after { content: '\f107'; font-family: FontAwesome }
}
.result-actions button.link-btn-print::before { content: '\f02f' }
@media (max-width: 767px) {
    #header .head-menu #location-menu { right: auto; left: 0 }
    .login-wrap .login-logo { max-width: 100% }
    .inner .content-second { margin-inline: 16px }
}
/* The source stylesheet collapses nested items until hover. The button owns visibility here. */
#header .head-menu .dropmenu li ul li {
    height: auto !important;
    overflow: visible !important;
}
#header .head-menu .drop-area select {
    appearance: auto;
    color: #176a50;
    border-color: #22a173;
    border-radius: 18px;
}
#header .head-menu .drop-area .location-submit { border-color: #f7931e; color: #fff }
#today .series-block h3 {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.search-wrap .select-switch.w-l label { width: auto; min-width: 78px }
@media (max-width: 420px) {
    .search-wrap .select-switch.w-l label { min-width: 0; padding-inline: 4px; font-size: 12px }
    #header .head-menu .drop .menu-toggle { padding-left: 5px }
    .page-title-wrap .pankuzu { right: 10px; font-size: 10px }
}

/* 12/2 修正：現行CSSの「左右端のカードを細くする」指定を打ち消す */
.contents-top .inner .cont-data > .col-md-3.left,
.contents-top .inner .cont-data > .col-md-3.left:first-child,
.contents-top .inner .cont-data > .col-md-3.left:last-child { width: auto; min-width: 0 }
/* 12/2 修正：右上のお名前が縦書きにならないように */
#header .head-menu ul li.user { max-width: none }
#header .head-menu .account-name { white-space: nowrap; overflow-wrap: normal }

/* 12/2 変更：グラフ下の表を横向き（時刻が列）に。提案時の形 */
.content-scroll table.data { width: 100% }
.content-scroll table.data tr th,
.content-scroll table.data tr td,
.content-scroll table.data tr th:first-child { padding: 9px 10px; border: 1px solid #e3e8ec }
.content-scroll table.data thead tr th { background: #f1f4f6; border-bottom: 1px solid #c9d1d7; text-align: right }
.content-scroll table.data thead tr th:first-child,
.content-scroll table.data tbody th { text-align: center; font-weight: 600 } /* 12/4 左上の見出しも行名（中央）にそろえる（佐藤さん指示） */
.content-scroll table.data tbody td { text-align: right; font-variant-numeric: tabular-nums }
.content-scroll table.data tbody th, .content-scroll table.data tbody tr:nth-child(odd) { background: #fff }
/* Overlay the summary cards on the landscape like the original (floats did not add their height). */
@media (min-width: 768px) {
    .contents-top .inner .cont-data { padding-bottom: 0; grid-template-rows: auto 1fr; row-gap: 0 }
    .contents-top .inner .cont-data::before { content: ""; grid-column: 1 / -1; grid-row: 1 / 3; padding-bottom: 53% }
    .contents-top .inner .cont-data > .col-md-3 { grid-row: 1 }
    .contents-top .inner .cont-data > .col-md-3:nth-child(1) { grid-column: 1 }
    .contents-top .inner .cont-data > .col-md-3:nth-child(2) { grid-column: 2 }
    .contents-top .inner .cont-data > .col-md-3:nth-child(3) { grid-column: 3 }
    .contents-top .inner .cont-data > .col-md-3:nth-child(4) { grid-column: 4 }
}
/* Bar/line switch beside the print and CSV buttons (saved to the person's general settings). */
.inner .contents-menu .result-actions dt > form.chart-style-switch,
.inner .contents-menu .result-actions dt > form.chart-style-switch:hover {
    display: inline-flex; padding: 0; overflow: hidden; background: transparent; color: #fff;
}
.chart-style-switch button {
    padding: 12px 15px; border: 0; background: transparent; color: #fff; font-size: inherit; cursor: pointer;
}
.chart-style-switch button + button { border-left: 1px solid #fff }
.chart-style-switch button:hover { background: rgba(255, 255, 255, .2) }
.chart-style-switch button.active { background: #fff; color: #186748; font-weight: 600 }
@media (max-width: 767px) {
    .chart-style-switch button { padding: 5px 9px; font-size: 11px }
}
/* 12/3 追加：パワコン別でエリアが変わる行の上に太い線（現行にはない。佐藤さん指示） */
.content-scroll table.data tbody tr.area-start > th,
.content-scroll table.data tbody tr.area-start > td { border-top: 2px solid #58666e }
/* 12/3 追加：アイコン画像の変更（現行にはない。佐藤さん指示） */
#header .head-menu .menu-toggle img { object-fit: cover }
.icon-setting { margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid #ddd }
.icon-setting-title { font-size: 15px; margin: 0 0 10px }
#wrapper .icon-setting .icon-preview { width: 100px; height: 100px; max-width: none; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 10px; border: 1px solid #ddd }
.icon-setting form { display: inline-flex; gap: 8px; align-items: center; margin: 0 12px 8px 0; flex-wrap: wrap }
.icon-setting .icon-note { font-size: 12px; color: #58666e; margin: 4px 0 0 }
/* 月別：PCの全画面で12か月分が横スクロールなしで収まるよう余白を詰める */
.content-scroll table.data.period-monthly tr th,
.content-scroll table.data.period-monthly tr td,
.content-scroll table.data.period-monthly tr th:first-child { padding: 9px 6px; font-size: 12px }
.content-scroll table.data.period-monthly tbody th { min-width: 0 }
/* グラフで指した日（時刻）の列 */
.content-scroll table.data tr > .is-focus { background: #e5f3fd }

/* エラー画面（エラーメールアドレス設定・エラー履歴・エラーチェック条件） */
.alert-form th { width: 220px }
.alert-form select, .alert-condition select { display: inline-block; width: auto }
.alert-condition { border: 1px solid #ddd; padding: 12px 16px; margin-bottom: 16px }
.alert-condition legend { font-size: 15px; font-weight: bold; width: auto; border: 0; padding: 0 6px; margin: 0 }
.alert-condition input[type=number], .alert-condition input[type=text] { display: inline-block; width: 90px }
.alert-area-row { margin: 6px 0 }
.alert-area-location { display: inline-block; min-width: 160px; font-weight: bold }
/* 対象エリアのボタン：選ぶと緑（現行画面と同じ） */
.area-toggle { position: relative; display: inline-block; margin: 2px 4px; cursor: pointer; font-weight: normal }
.area-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px }
.area-toggle span { display: inline-block; padding: 4px 12px; border: 1px solid #ccc; border-radius: 3px; background: #f5f5f5 }
.area-toggle input:checked + span { background: #5cb85c; border-color: #4cae4c; color: #fff }
.area-toggle input:focus-visible + span { outline: 2px solid #337ab7 }
.alert-active label { margin-right: 16px; font-weight: normal }
.alert-history td { text-align: left; vertical-align: top }
.alert-history .alert-body { min-width: 320px }
.alert-pager { text-align: center; margin: 12px 0 }
.alert-pager > * { margin: 0 8px }
/* 12/4 追加：表を横にスライドしても左端の項目名（発電所・エリア・パワコン）を固定（佐藤さん指示） */
.content-scroll table.data tr > th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 #c9d1d7 }
.content-scroll table.data thead tr > th:first-child { z-index: 3 }
@media (max-width: 767px) {
    .content-scroll table.data tr > th:first-child { max-width: 45vw; white-space: normal; word-break: break-all }
}
/* 12/4 追加：重ね表示では日ごとの見出しをやめ、表の左上の日付を大きく太く（佐藤さん指示） */
.content-scroll table.data thead tr th.day-label { font-size: 16px; font-weight: bold; color: #333; text-align: center; white-space: nowrap }
.series-overlay + .series-block, .series-block + .series-block { margin-top: 16px }
/* 12/4 追加：棒グラフ｜折れ線の切替を「印刷」「CSVダウンロード」と同じ高さに（現行CSSの送信ボタン最小幅200pxを打ち消す。佐藤さん指摘「大きすぎる」） */
.inner .contents-menu .result-actions dt > form.chart-style-switch button { min-width: 0; margin: 0; padding: 0 16px; font-size: 14px; line-height: 38px; border-radius: 0 }
/* 12/4 追加：メニューのアイコンが☒になる→アイコン用の文字（FontAwesome）を指定 */
.inner [class*="col-md-"] .nav-list-icon li a:before { font-family: FontAwesome; width: 18px; text-align: center }
/* 12/4 追加（案A）：ホーム下のユーザー欄を、パソコンでは横長の帯に（左に名前、右にメニュー4列） */
@media (min-width: 768px) {
    .inner .col-md-12 .contents-box.user-band { display: flex; align-items: stretch; overflow: hidden; padding-bottom: 0 }
    .inner .user-band .user-info { flex: 0 0 220px; width: 220px; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center }
    .inner .user-band .user-info dt { width: 56px; height: 56px }
    .inner .user-band .user-info dd { margin-top: 8px; font-size: 14px }
    .inner .user-band .nav-list-icon { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 }
    .inner [class*="col-md-"] .user-band .nav-list-icon li { border-bottom: 1px solid #e8e7e3; border-left: 1px solid #e8e7e3 }
    .inner [class*="col-md-"] .user-band .nav-list-icon li:nth-child(n+5) { border-bottom: none }
    .inner [class*="col-md-"] .user-band .nav-list-icon li a { display: flex; align-items: center; height: 100%; padding: 14px 14px }
}
/* 12/4 追加：スマホ表示の修正（佐藤さんのスマホ画面の指摘4点） */
.legend-toggle, .table-name-prefix { display: none }
.content-scroll table.data .name-short { display: none }
@media (max-width: 767px) {
    /* ①LOGOUTボタンが下のメニューに10px重なる（ボタンの上余白10px）→余白をなくしロゴの行に収める */
    #header .head-menu .logout form { height: 60px }
    #header .head-menu .logout button { margin: 0; width: 60px; height: 60px }
    /* ②検索欄：項目名が入力欄・ボタンに重なる→項目名を上、入力欄・ボタンを下の2段に */
    .search-wrap .series-filters { grid-template-columns: minmax(0, 1fr) }
    .search-wrap .series-filters .searh-box { padding: 10px 14px }
    .search-wrap .searh-box .searh-title,
    .search-wrap .series-filters fieldset legend { position: static; display: block; margin: 0 0 8px; font-size: 14px }
    .searh-box .searh-period .select-wrap { margin-left: 0; width: min(200px, 100%) }
    .series-filters .searh-period .period-date { padding-left: 0; flex-wrap: nowrap }
    .series-filters .searh-period .period-date input { width: auto; flex: 1 1 0 }
    .series-filters fieldset .select-switch { padding-left: 0 }
    .search-wrap .filter-submit { align-self: auto }
    /* ③グラフの色の説明（凡例）は最初は隠し、ボタンで出し入れ */
    .legend-toggle {
        display: block; margin: 16px 12px 0 auto; padding: 4px 12px; border: 1px solid #22a173; border-radius: 14px;
        background: #fff; color: #186748; font-size: 12px;
    }
    .legend-toggle + .chart { margin-top: 8px }
    /* ④表：行名が1文字ずつ縦に並び行が高くなる→左の列に最低幅を持たせ、発電所名は表の上に1回だけ */
    .content-scroll table.data tr > th:first-child { min-width: 7.5em; max-width: 45vw; word-break: normal; overflow-wrap: anywhere }
    .content-scroll table.data thead tr > th:first-child { white-space: nowrap }
    .content-scroll table.data .name-short { display: inline }
    .content-scroll table.data .name-full {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }
    .table-name-prefix { display: block; margin: 12px 12px 6px; font-size: 13px; font-weight: 600; color: #333 }
}
/* 12/4 追加：日付の見出しとグラフの間の余白（55px）を詰める（佐藤さん指示） */
.series-block h3 + .chart,
.series-block h3 + .legend-toggle { margin-top: 12px }
.series-block h3 + .legend-toggle + .chart { margin-top: 8px }
/* 12/4 追加：スマホの検索欄で「グラフ表示」の右が空く→「表示データ」と「表示」ボタンを同じ行に並べる（佐藤さん指示） */
@media (max-width: 767px) {
    .search-wrap .series-filters { grid-template-columns: auto auto minmax(0, 1fr); align-items: end }
    .search-wrap .series-filters .searh-box { padding: 10px 8px; border-bottom: 0 }
    .search-wrap .series-filters .searh-box:first-of-type { padding-inline: 14px; border-bottom: 1px solid #f4f3ef }
    .search-wrap .series-filters .searh-box:nth-of-type(2) { padding-left: 14px }
    .search-wrap .series-filters .select-switch label { padding-inline: 8px; font-size: 12px }
    .search-wrap .filter-submit { justify-self: end; padding-right: 14px }
    .search-wrap .filter-submit button {
        min-width: 0; width: auto; height: 40px; line-height: 40px; padding: 0 18px; font-size: 13px; border-radius: 20px;
    }
}
/* 12/4 変更：切替を押したらすぐ表示するので「表示」ボタンは出さない（JSが動かないときだけ出る）。
   パソコンでは現行どおり各欄を中身の幅にして左寄せ（佐藤さん指示） */
.search-wrap .series-filters.auto-submit .filter-submit { display: none }
@media (min-width: 768px) {
    .search-wrap .series-filters { display: flex; flex-wrap: wrap; align-items: stretch }
    .search-wrap .series-filters .searh-box { flex: 0 0 auto; width: auto; padding-right: 40px }
}
/* 12/4 追加：スマホのメニュー文字がHOMEだけ中央・他は下寄り（HOMEだけ行の高さ0）→全部を同じ高さで中央に（佐藤さん指示） */
@media (max-width: 767px) {
    #header .pc-menu-wrap .pnav ul li a,
    #header .pc-menu-wrap .pnav ul li:first-child a { height: 54px; padding: 0 10px; line-height: 54px }
}
/* 12/4 追加（案B）：スマホだけ、LOGOUTの左に≡ボタン。開くとロケーション選択とユーザーメニュー（現行にはない。佐藤さん指示） */
#header .head-menu .sp-menu { display: none }
@media (max-width: 767px) {
    #header .head-menu ul li.sp-menu { display: flex; position: absolute; top: 0; right: 60px; width: 60px; height: 60px }
    #header .head-menu .sp-menu .menu-toggle { width: 60px; height: 60px; padding: 0; justify-content: center; font-size: 22px; color: #2f323e }
    #header .head-menu .sp-menu .menu-toggle[aria-expanded="true"] { background: #eee }
    #header .head-menu .sp-menu .menu-toggle[aria-expanded="true"] .fa-bars::before { content: "\f00d" }
    #header .head-menu .dropmenu li.sp-menu > ul {
        position: absolute; top: 60px; right: -60px; width: 100vw; min-width: 0; z-index: 20; display: block;
    }
    #header .head-menu .dropmenu li.sp-menu > ul[hidden] { display: none }
    #header .head-menu .sp-menu .sp-menu-location .drop-area { padding: 12px 16px }
    #header .head-menu .sp-menu .sp-menu-location select { width: 100%; padding: 6px 8px }
    #header .head-menu .sp-menu .location-submit { width: auto; min-width: 0; padding: 4px 24px }
    #header .head-menu .dropmenu li.sp-menu ul li a { padding: 14px 16px; font-size: 14px }
}
@media (max-width: 767px) {
    #header .head-menu .dropmenu li.sp-menu > ul > li { display: block; width: 100%; height: auto; max-width: none; text-align: left }
    #header .head-menu .dropmenu li.sp-menu > ul > li > a { width: auto; height: auto; line-height: 1.4 }
    #header .head-menu .sp-menu .drop-area label { display: block }
    #header .head-menu .sp-menu .location-submit { display: inline-block; margin-top: 8px }
}
/* phone: icon buttons centered like the save button */
@media (max-width: 767px) {
  #wrapper .icon-setting form { display: flex; flex-direction: column; align-items: center; margin: 0 0 12px }
  #wrapper .icon-setting form input[type=file] { align-self: flex-start }
}
/* お知らせ詳細の小窓（現行の .modal-info と同じ見た目：幅90%・背景を暗く） */
dialog.info-dialog { position: fixed; inset: 0; margin: auto; width: 90%; max-width: 960px; height: fit-content; max-height: 90vh; padding: 0; border: 0; background: transparent; overflow: visible }
dialog.info-dialog::backdrop { background: rgba(0, 0, 0, .7) }
dialog.info-dialog .contents-box.modal-content { margin: 0 !important; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 6px }
dialog.info-dialog .head-style-underline { margin: 0; padding: 24px 26px 14px }
dialog.info-dialog .modal-body { margin: 20px 26px; font-size: 14px; line-height: 1.8; word-break: break-word }
dialog.info-dialog .info-date { color: #888; margin-bottom: 10px }
dialog.info-dialog .link-more-pdf { margin-top: 10px }
dialog.info-dialog .modal-footer { padding: 0 26px 26px; text-align: center }
.login-wrap .info-box dl dd.showModal a { display: block; color: inherit; text-decoration: none }
.login-wrap .info-box dl dd.showModal:hover a { text-decoration: underline }
.contents-top .top-info a.infoBtn span { padding-right: 20px }
@media (max-width: 767px) {
  dialog.info-dialog { width: 94% }
  dialog.info-dialog .head-style-underline { padding: 18px 16px 10px; font-size: 18px }
  dialog.info-dialog .modal-body { margin: 14px 16px }
  dialog.info-dialog .modal-footer { padding: 0 16px 18px }
  .inner .contents-info ul li a { padding: 18px 40px 18px 16px }
  .inner .contents-info ul li a span { display: block; padding-right: 0 }
}
/* 12/5 追加：棒グラフ｜折れ線の切替を「印刷」「CSVダウンロード」「最新データ表示」と同じ大きさに（佐藤さん指摘：スマホで切替だけ大きい）。
   PC は高さ40px・文字12px、スマホは高さ26px・文字11px にそろえる（印刷ボタンだけ14pxだったのも12pxに） */
.inner .contents-menu .result-actions dt > button.link-btn-print,
.inner .contents-menu .result-actions dt > form.chart-style-switch button { font-size: 12px }
@media (max-width: 767px) {
    .inner .contents-menu .result-actions dt > button.link-btn-print,
    .inner .contents-menu .result-actions dt > form.chart-style-switch button { font-size: 11px }
    .inner .contents-menu .result-actions dt > form.chart-style-switch button { padding: 0 9px; line-height: 24px }
}
/* 12/5 追加：管理者がお客様の設定を見ているときの表示（現行にはない） */
.alert-page .acting-group { margin: 0 0 16px; padding: 10px 14px; background: #fff7e0; border-left: 4px solid #f39800; color: #58666e; font-size: 13px }
/* 12/5 追加：エラー設定画面をスマホでも見やすく（佐藤さん指摘「追加の画面の表示が見にくい」）
   ・リンクのボタン（追加・戻る・編集）が文字だけに見えていた→「保存」と同じ丸いボタンに
   ・表の見出しが1文字ずつ縦に折れる→折り返さず、はみ出す分は表だけ横に動かせる
   ・入力欄の項目名（メールアドレス等）を1行に／黄色の帯の文字が左の線に付いていた */
.alert-page a.btn { display: inline-block; padding: 8px 24px; border-radius: 22px; font-size: 13px; line-height: 1.5; text-align: center; text-decoration: none }
.alert-page a.btn-primary { min-width: 120px; background: #fb888a; border: 1px solid #fb888a; color: #fff }
.alert-page a.btn-primary:hover { background: #fff; color: #fb888a }
.alert-page a.btn-default { min-width: 100px; background: #fff; border: 1px solid #b5bcc0; color: #58666e }
.alert-page a.btn-default:hover { background: #f3f5f6 }
.alert-page .submit { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap }
.alert-page .alert-table th, .alert-page .alert-form th { white-space: nowrap }
.inner .content-second p.acting-group { padding: 10px 14px }
@media (max-width: 767px) {
    .alert-page .alert-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch }
    .alert-page .alert-table th, .alert-page .alert-table td { padding: 8px 10px }
    .alert-page .alert-table td { white-space: nowrap }
    .alert-page .alert-table td[colspan] { white-space: normal }
    .alert-page .alert-form th { width: 1%; padding: 8px 10px }
    .alert-page .alert-form td { padding: 8px 10px }
    .alert-page .alert-form input[type=email], .alert-page .alert-form input[type=text] { width: 100%; max-width: 100% }
    .alert-page a.btn-default.btn, .alert-page .alert-table .btn { min-width: 0; padding: 5px 14px }
    .alert-page .submit .btn { min-width: 120px }
}
/* 上の補足：現行CSSの方が強かった3か所を、より強い指定で上書き */
.inner .col-md-12 .content-second.form-group p.acting-group { padding: 10px 14px; margin-bottom: 16px }
.inner .col-md-12 .alert-page .form-group.submit > .btn { margin: 0; min-width: 120px; padding: 8px 24px }
@media (max-width: 767px) {
    .inner .alert-page table.data-m tbody tr td, .inner .alert-page table.data-m tr th { min-width: 0; padding: 8px 10px }
}
.inner .col-md-12 .content-second.form-group p.acting-group { padding: 10px 14px !important }
/* 12/5 追加：スマホでは一覧表を1件ずつのカードに（横にはみ出さない。項目名を左に小さく出す。現行にはない） */
@media (max-width: 767px) {
    .inner .alert-page table.sp-cards { display: block; overflow: visible; border: 0 }
    .inner .alert-page table.sp-cards thead { display: none }
    .inner .alert-page table.sp-cards tbody { display: block }
    .inner .alert-page table.sp-cards tbody tr { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 12px; padding: 6px 0; border: 1px solid #ccc; border-radius: 6px; background: #fff }
    .inner .alert-page table.sp-cards tbody tr:nth-child(odd) { background: #f7fafc }
    .inner .alert-page table.sp-cards tbody tr td { display: flex; gap: 10px; flex: 1 1 100%; min-width: 0; padding: 4px 12px; border: 0; white-space: normal; word-break: break-all }
    .inner .alert-page table.sp-cards tbody tr td[data-label]::before { content: attr(data-label); flex: 0 0 7.5em; color: #22b573; white-space: nowrap; font-size: 12px; font-weight: bold }
    .inner .alert-page table.sp-cards tbody tr td.sp-action { flex: 0 0 auto; padding-top: 8px }
    .inner .alert-page table.sp-cards tbody tr td[colspan] { display: block }
}
/* 表の中の「編集」「削除」を同じ大きさに（削除だけ現行CSSの最小幅170pxで大きかった） */
.inner .col-md-12 .alert-page .alert-table .btn { min-width: 80px; margin: 0; padding: 5px 16px; font-size: 13px; line-height: 1.5; border-radius: 22px }

/* ロケーション画面のエリア一覧：パワコン台数を右に表示（現行にない追加） */
.inner [class*="col-md-"] .content-second .nav-list-icon li.area-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px }
.inner [class*="col-md-"] .content-second .nav-list-icon li.area-row .area-pcs { color: #22b573; font-weight: bold; white-space: nowrap }

/* ロケーションエリア設定（現行のお客様画面と同じ形：緑の見出し行＋エリア表＋設定は小窓） */
.area-settings .area-location-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 18px; background: #22b573; color: #fff }
.area-settings .area-location-name { font-weight: bold; font-size: 15px }
.area-settings .btn-outline-white { padding: 4px 16px; border: 1px solid #fff; border-radius: 20px; background: transparent; color: #fff; font-size: 12px; cursor: pointer }
.area-settings .btn-outline-white:hover { background: #fff; color: #22b573 }
.area-settings .btn-set { padding: 2px 22px; border: 1px solid #22b573; border-radius: 20px; background: #fff; color: #22b573; font-size: 12px; cursor: pointer }
.area-settings .btn-set:hover { background: #22b573; color: #fff }
.inner .col-md-12 .area-settings table.area-table { margin-bottom: 0; border-bottom: 6px solid #22b573 }
.inner .col-md-12 .area-settings table.area-table th { white-space: nowrap; font-weight: normal }
.inner .col-md-12 .area-settings p.area-back { margin-top: 24px }
dialog.settings-dialog .head-style-underline small { display: block; margin-top: 4px; font-size: 13px; color: #58666e; font-weight: normal }
dialog.settings-dialog fieldset { border: 0; min-width: 0 }
dialog.settings-dialog .set-row { display: flex; align-items: flex-start; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid #e8e7e3 }
dialog.settings-dialog .set-row > label { flex: 0 0 13em; padding-top: 6px; font-weight: normal }
dialog.settings-dialog .set-input { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1; min-width: 0 }
dialog.settings-dialog .set-input input { width: 260px; max-width: 100%; padding: 5px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px }
dialog.settings-dialog .circuit-row:nth-child(odd) { background: #f1f4f7 }
dialog.settings-dialog .circuit-row { padding: 10px 16px; border: 0 }
dialog.settings-dialog .req { color: #fb888a; font-size: 12px }
dialog.settings-dialog .set-help, dialog.settings-dialog .set-note { flex-basis: 100%; color: #888; font-size: 12px; margin: 4px 0 0 }
dialog.settings-dialog .set-note { margin-top: 14px }
dialog.settings-dialog .errorlist { flex-basis: 100%; margin: 0; padding: 0; list-style: none; color: #e60012; font-size: 12px }
dialog.settings-dialog .modal-footer { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap }
dialog.settings-dialog .modal-footer .btn { min-width: 140px; padding: 8px 24px; border-radius: 22px; font-size: 13px }
dialog.settings-dialog .modal-footer .btn-default { background: #fff; border: 1px solid #fb888a; color: #fb888a }
dialog.settings-dialog .modal-footer .btn-primary { background: #fb888a; border: 1px solid #fb888a; color: #fff }
dialog.settings-dialog fieldset:disabled input { background: #f5f5f5; color: #555 }
@media (max-width: 767px) {
    dialog.settings-dialog .set-row { flex-direction: column; gap: 4px }
    dialog.settings-dialog .set-row > label { flex: none; padding-top: 0 }
    dialog.settings-dialog .set-input input { width: 100% }
    dialog.settings-dialog .circuit-row { padding: 8px 10px }
    .inner .col-md-12 .area-settings table.area-table { border-bottom: 0 }
}
/* 現行CSSの .btn の左右余白（154px）を打ち消して「閉じる」「保存」を並べる／表の見出し行は現行どおり白地 */
dialog.settings-dialog .modal-footer .btn { margin: 0 !important; float: none }
.inner .col-md-12 .area-settings table.area-table thead th { background: #fff !important; color: #333 !important; border-bottom: 1px solid #ddd }
@media (max-width: 767px) {
    /* スマホ：入力欄の右に単位・※必須を並べる */
    dialog.settings-dialog .set-input input { flex: 1 1 140px; width: auto }
}
/* ロケーション詳細設定：地図（現行どおり「地図で緯度経度を設定する」→住所検索＋地図） */
dialog.settings-dialog .set-label { flex: 0 0 13em; padding-top: 6px }
dialog.settings-dialog select { width: 260px; max-width: 100%; padding: 5px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; background: #fff }
dialog.settings-dialog .btn-map { padding: 7px 22px; border: 0; border-radius: 22px; background: #fb888a; color: #fff; font-size: 13px; cursor: pointer }
dialog.settings-dialog .map-box { flex-basis: 100%; margin-top: 6px }
dialog.settings-dialog .map-search { display: flex; gap: 8px; margin: 6px 0 }
dialog.settings-dialog .map-search input { flex: 1 1 auto; width: auto }
dialog.settings-dialog .btn-search { padding: 5px 26px; border: 0; border-radius: 20px; background: #22b573; color: #fff; font-size: 13px; cursor: pointer }
dialog.settings-dialog .map-canvas { width: 100%; height: 340px; border: 1px solid #ccc }
dialog.settings-dialog .map-msg { min-height: 1.4em; margin: 0; color: #22b573; font-size: 12px }
dialog.settings-dialog .map-credit { margin: 4px 0 0; color: #888; font-size: 11px }
@media (max-width: 767px) {
    dialog.settings-dialog .set-label { flex: none; padding-top: 0 }
    dialog.settings-dialog select { width: 100% }
    dialog.settings-dialog .map-canvas { height: 260px }
}

/* 月別：基準発電量の出典（気象庁ホームページを加工して作成）。表の下に小さく */
.baseline-source { margin: 8px 15px 0; font-size: 11px; line-height: 1.6; color: #666; }
