html {
    background: #f5f5f5;
}

header {
    background: #6abfb0;
    padding: 15px 0;
    position: relative;
}

/* ===================================
   jnav - カスタムナビゲーション v2
   =================================== */

/* --- カスタムプロパティ --- */
:root {
    --jnav-bg: #171c61;
    --jnav-accent: #171c61;
    --jnav-text: #fff;
    --jnav-text-hover: #f0f0f0;
    --jnav-hover-bg: rgba(255, 255, 255, 0.3);
    --jnav-border-color: #ffffff;
    --jnav-radius: 4px;
}

/* --- ナビバー本体 --- */
.jnav {
    background: var(--jnav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.jnav-bar {
    height: 52px;
}

/* --- 共通リンク --- */
.jnav-link {
    color: var(--jnav-text);
    font-size: 15px;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--jnav-radius);
    white-space: nowrap;
    transition: background-color 0.2s;
}

.jnav-link:hover {
    background: var(--jnav-hover-bg);
    color: var(--jnav-text);
}

/* --- ロゴ --- */
.jnav-logo {
    flex-shrink: 0;
    color: #fff;
    font-size: 24px;
    font-family: 'Noto Serif JP', serif;
    font-style: italic;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.jnav-logo img {
    display: block;
    height: 28px;
}

/* --- ドロップダウン（PC のみ） --- */
.jnav-dropdown {
    position: relative;
}

.jnav-dropdown-trigger {
    color: var(--jnav-text);
    font-size: 15px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--jnav-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.jnav-dropdown-trigger::after {
    content: '';
    border: solid var(--jnav-text);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg) translateY(-25%);
    margin-left: 6px;
}

.jnav-dropdown:hover .jnav-dropdown-trigger {
    background: var(--jnav-hover-bg);
}

.jnav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    z-index: 200;
}

.jnav-dropdown:hover .jnav-dropdown-menu {
    display: block;
}

.jnav-dropdown-menu .jnav-link {
    display: block;
    color: #333;
    font-size: 14px;
    padding: 0.6rem 1rem;
}

.jnav-dropdown-menu .jnav-link:hover {
    background: #f5f5f5;
    color: #333;
}

/* --- アカウント / ログアウト --- */
.jnav-account,
.jnav-logout {
    color: var(--jnav-text);
    font-size: 13px;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--jnav-border-color);
    border-radius: var(--jnav-radius);
    white-space: nowrap;
    transition: all 0.2s;
}

a.jnav-account:hover,
.jnav-logout:hover {
    background: var(--jnav-hover-bg);
    color: var(--jnav-text);
}

/* ===================================
   モバイル版の差分
   =================================== */
.jnav-bar--mobile {
    display: none;
    height: 48px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jnav-bar--mobile::-webkit-scrollbar {
    display: none;
}

/* モバイルではリンクとボタンを少し小さく */
.jnav-bar--mobile .jnav-link {
    font-size: 13px;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
}

.jnav-bar--mobile .jnav-account,
.jnav-bar--mobile .jnav-logout {
    font-size: 12px;
    padding: 0.35rem 0.6rem;
}

/* ===================================
   レスポンシブ切り替え
   =================================== */
@media screen and (max-width: 1023px) {
    .jnav-bar--pc {
        display: none !important;
    }
    .jnav-bar--mobile {
        display: flex;
    }
}

@media screen and (min-width: 1024px) {
    .jnav-bar--pc {
        display: flex !important;
    }
    .jnav-bar--mobile {
        display: none !important;
    }
}

main {
    width: 100%;
    padding: 0px 10px;
    margin: 0 auto;
}

.flash {
    text-align: center;
    position: relative;
    margin: 10px 0 20px;
    animation: slideDown 0.7s ease-out;
}

.flash span.close {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 19px;
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

span.req {
    font-size: 8pt;
    color: #fff;
    background: #f33;
    border-radius: 6px;
    padding: 2px 4px;
    margin: 4px;
    vertical-align: middle;
    float: right;
}

::placeholder {
    color: #ccc;
}

.box:not(.narrow) {
    overflow-x: scroll;
}

.css_hidden {
    display: none;
}

.box.narrow {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.box.mid {
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.box:first-of-type {
    margin-top: 1.5rem;
}

div.table-container {
    max-height: 80vh;
    overflow-y: scroll;
}

table.list {
    width: auto;
    table-layout: auto;
}

table.list.fixed {
    width: 100%;
    table-layout: fixed;
}

table.list th,
table.list td {
    white-space: initial;
}

table.list tr:nth-child(2n + 1) {
    background: #fcfcfc;
}

table.list th {
    background: #f7f4ef;
    vertical-align: middle;
    font-weight: normal;
    text-align: center;
    padding: 7px;
    border: 1px solid #ccc;
    color: #333;
    font-size: 15px;
    position: sticky;
    top: 0;
    z-index: 90;
}

table.list td {
    font-weight: normal;
    text-align: center;
    padding: 6px;
    border: 1px solid #ccc;
    vertical-align: middle;
    font-size: 14px;
}

table.list th[size='50'] {
    width: 50px;
}

table.list th[size='75'] {
    width: 75px;
}

table.list th[size='100'] {
    width: 100px;
}

table.list th[size='125'] {
    width: 125px;
}

table.list th[size='150'] {
    width: 150px;
}

table.list th[size='175'] {
    width: 175px;
}

table.list th[size='200'] {
    width: 200px;
}

table.list th[size='225'] {
    width: 225px;
}

table.list th[size='250'] {
    width: 250px;
}

table.list th[size='275'] {
    width: 275px;
}

table.list th[size='300'] {
    width: 300px;
}

table.list th[size='325'] {
    width: 325px;
}

table.list th[size='350'] {
    width: 350px;
}

table.list th[size='375'] {
    width: 375px;
}

table.list th[size='400'] {
    width: 400px;
}

table.list th[size='425'] {
    width: 425px;
}

table.list th[size='450'] {
    width: 450px;
}

table.list th[size='500'] {
    width: 500px;
}

table.vertical td.left,
table.vertical th.left,
table.list td.left,
table.list th.left {
    text-align: left;
}

table.vertical td.right,
table.vertical th.right,
table.list td.right,
table.list th.right {
    text-align: right;
}

table.vertical {
    width: 100%;
    max-width: 700px;
    border: 1px solid #ccc;
}

table.vertical th {
    padding: 7px;
    background: #f7f4ef;
    vertical-align: middle;
    font-size: 15px;
    width: 40%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    text-align: left;
    font-weight: normal;
}

table.vertical td {
    padding: 7px;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
    border: 1px solid #ccc;
}

.data {
    background: #f0f0f0;
    padding: 10px;
}

.staff_role {
    padding: 8px;
}

.staff_role .control {
    display: flex;
    justify-content: center;
}

table.list th.sorting {
    background: #ffa;
}

/*報告書作成画面*/

.datetime_parent {
    position: relative;
}

.datetime_act {
    z-index: 10;
    position: absolute;
    right: 5px;
    top: 37px;
}

.clone {
    display: none;
    height: 0;
}

.photo_box {
    margin-bottom: 50px;
    background: #fff;
    padding-top: 1px;
}

.photo_frame,
.photo_canvas {
    display: block;
    width: 100%;
    max-height: 300px;
    margin-bottom: 10px;
    background: #ccc;
    color: #fff;
    text-align: center;
    font-size: 35px;
}

div.photo_frame {
    padding-top: 10px;
}

.button_wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.photo_box label.camera {
    width: 200px;
    display: block;
    margin: 0 auto;
}

.score {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #4af;
    width: 125px;
    height: 45px;
    font-size: 26px;
    background: #fff;
    position: sticky;
    bottom: 5px;
    left: 10px;
}

.mail {
    display: none;
}

.judge_wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 170px;
    margin: 0 auto;
}

.prev_judge_wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.prev_judge_wrap .judge {
    width: 30px;
    border: none;
    opacity: 0.7;
}

@media (max-width: 800px) {
    .judge_wrap {
        flex-direction: column;
        width: 75px;
        height: 120px;
    }

    table.list tr td {
        padding: 3px;
    }

    table.list tr td.is_text {
        padding: 3px;
        width: 80%;
        vertical-align: top;
        white-space: normal;
    }

    table.list td.is_judge {
        width: initial;
    }
}

.judge {
    display: block;
    width: 50px;
    font-size: 14px;
    background: #f0f0f0;
    padding: 5px 0;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #ccc;
    text-align: center;
}

.judge[jd='ok'].selected {
    background: #4af;
    color: #fff;
    display: block;
}

.judge[jd='ng'].selected {
    background: #f33;
    color: #fff;
    display: block;
}

.judge[jd='no'].selected {
    background: #888;
    color: #fff;
    display: block;
}

.prev_judge_wrap .judge {
    display: none;
}

.qs_comment {
    display: none;
    margin-top: 10px;
}

.page_jump {
    position: sticky;
    top: 48px;
    z-index: 100;
    box-shadow: 0 10px 10px #888;
    border-radius: 5px;
}

.box.is {
    overflow: visible;
    max-width: 1024px;
    margin: 10px auto;
}
td.left.is_text {
    white-space: normal;
}
table.list tr:nth-child(2n + 1) {
    background: #fff;
}

table.list tr.head td {
    background: #eee;
    font-size: 17px;
    font-weight: 600;
    padding: 8px;
}

button.question {
    border: 1px solid #ccc;
}

.kijun {
    font-size: 14px;
    color: #02ceaa;
}

.kijun.close {
    display: none;
}

/* 写真撮影 */
.notification.is-info {
    border: 1px solid #38f;
}

.box.inner_box {
    margin-bottom: 30px;
    border: 3px solid #666;
    padding: 5px;
    overflow: hidden;
}

.sample_text li {
    border: 1px solid #777;
    border-radius: 3px;
    padding: 5px;
    cursor: pointer;
    border-left: 5px solid #777;
}

.photo_frame {
    display: block;
    width: 100%;
}

.photo_canvas {
    display: none;
    width: 100%;
    border: 1px solid #ccc;
}

.data.due_date {
    background: #f33;
    color: #fff;
    font-size: 20px;
}

/* ============================================================
   exam_po 指摘事項／改善／修繕 共通スタイル
   （single / kaizen_photo / kaizen / repair の4テンプレート共通）
   2026/06 スマホ向けレイアウト：カード化・写真比率固定・
   カメラボタンをフロート化・before/after を色付き左ボーダーで対比
   ============================================================ */

/* --- カード本体 --- */
.po_card {
    max-width: 700px;
    margin: 0 auto 1.25rem;
    border: 1px solid #dcd8d0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.po_card .po_head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #eef6fc;
    border-bottom: 1px solid #cde3f5;
}
.po_card .po_head .tag {
    flex-shrink: 0;
}
.po_card .po_head .po_qs_text {
    font-size: 14px;
    line-height: 1.4;
    color: #1d6fa5;
    font-weight: 600;
}
/* repair はヘッダーに qs_text 直書き（タグ無し）。po_head 自体に文字色を当てる */
.po_card .po_head.is_plain {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #1d6fa5;
    font-weight: 600;
}
.po_card .po_body {
    padding: 12px;
}
.po_card .label {
    margin-bottom: 6px;
    font-size: 14px;
}
.po_card .po_hint {
    font-size: 11px;
    margin: 0 0 6px;
}

/* --- before/after 見出し行 --- */
.po_ba_label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}
.po_ba_label.is_before {
    color: #d0382f;
}
.po_ba_label.is_after {
    color: #1f9d6b;
}
.po_ba_label .tag {
    margin-left: 2px;
}
.po_block {
    margin-bottom: 14px;
}
.po_block.is_after {
    margin-bottom: 0;
}

/* --- 写真エリア：4:3 で高さ固定 --- */
.po_photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 10px;
}
/* before=赤 / after=緑 の左ボーダーで対比 */
.po_block.is_before .po_photo .photo_frame,
.po_block.is_before .po_photo .photo_canvas {
    border-left: 3px solid #f14668;
}
.po_block.is_after .po_photo .photo_frame,
.po_block.is_after .po_photo .photo_canvas {
    border-left: 3px solid #48c78e;
}
/* style.css 既定の .photo_frame / .photo_canvas を po_photo 内では上書き */
.po_photo .photo_frame,
.po_photo .photo_canvas {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0;
}
/* aspect-ratio 非対応の古い端末向けフォールバック */
@supports not (aspect-ratio: 4 / 3) {
    .po_photo {
        height: 240px;
    }
}

/* --- カメラボタン：写真右下のフロート丸ボタン --- */
.po_photo label.camera {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
/* Bulma の .button .icon:first-child:not(:last-child) が
   margin-left: calc(-.5em - 1px) / margin-right: .25em を当ててアイコンが
   左にずれるため、同等以上の詳細度で打ち消して中央寄せにする */
.po_photo label.camera .icon,
.po_photo label.camera .icon:first-child:not(:last-child),
.po_photo label.camera .icon:last-child:not(:first-child) {
    margin-left: 0;
    margin-right: 0;
}

/* --- 指摘コメント（kaizen：読み取り専用ブロック） --- */
.po_readonly_comment {
    background: #f7f4ef;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #555;
    white-space: pre-wrap;
}

/* --- EXIF注記帯（repair 専用） --- */
.po_exif_note {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    color: #946c00;
    border: 1px solid #f5e6b8;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    max-width: 700px;
    margin: 0 auto 1rem;
}

/* --- 保存メッセージ：普段は非表示、成功時のみ表示 --- */
.po_card ._message {
    display: none;
    margin: 8px 0 0;
    padding: 6px 10px;
    font-size: 13px;
}

/* --- フッター（kaizen_photo / single の削除ボタン等） --- */
.po_card .po_foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
/* single は削除のみ＝右寄せ */
.po_card .po_foot.is_end {
    justify-content: flex-end;
}
.po_card .po_foot .no-photo {
    background: #faf7f2;
    border: 1px solid #dcd8d0;
    color: #7b756e;
    font-size: 13px;
    height: auto;
    padding: 6px 10px;
}
.po_card .po_foot ._delete {
    background: none;
    border: none;
    color: #d0382f;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    height: auto;
}
.po_card .po_foot ._delete:hover {
    text-decoration: underline;
}

/* --- 終了時刻の行（repair） --- */
.po_time_row {
    position: relative;
}

/* ============================================================
   exam_po 共通ナビゲーション（_exam_po_nav.html）
   ============================================================ */
.po_nav_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: #3e8ed0; /* Bulma is-info 相当 */
    border-radius: 6px 6px 0 0;
}
.po_nav_head .po_nav_shop {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}
.po_nav_head .po_nav_shop_btn {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 12px;
    height: auto;
    padding: 5px 10px;
}
.po_nav_body {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #dcd8d0;
    border-top: none;
    border-radius: 0 0 6px 6px;
}
.po_nav_date_label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #7b756e;
    margin-bottom: 4px;
}
.po_nav_date {
    font-size: 16px;
    font-weight: 600;
    color: #363636;
    margin-bottom: 12px;
    background: none;
    padding: 0;
}
/* 改善報告書の提出期限（kaizen のみ） */
.po_nav_due {
    background: #f33;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 12px;
}
/* 検査メニュー：均等グリッド（列数はテンプレートから指定） */
.po_nav_menu {
    display: grid;
    gap: 8px;
}
.po_nav_menu.cols3 {
    grid-template-columns: repeat(3, 1fr);
}
.po_nav_menu.cols2 {
    grid-template-columns: repeat(2, 1fr);
}
.po_nav_menu .button {
    height: auto;
    padding: 8px 0;
    font-size: 13px;
    flex-direction: column;
    gap: 3px;
    white-space: normal;
}
.po_nav_menu .button .icon {
    margin: 0;
}

/* ============================================================
   exam_po 項目追加モーダル（_exam_po_modal.html）
   ============================================================ */
#add_po .modal-content {
    max-width: 500px;
}
