/* ─────────  基本設定  ───────── */
/* フォント読み込み */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700&display=swap');


/* 最優先で Typekit のフォントを指定し、続いて Google フォント、その後システムフォント */
body {
    margin: 1rem;
    background: #fff;
    color: #222;

    font-family:
            /* ① Ten Mincho（インストール済みの明朝体） */
            'Ten Mincho',
            /* ② Noto Serif JP（源ノ明朝系のWebフォント） */
            'Noto Serif JP',
            /* ③ Hiragino Mincho ProN（macOS標準の明朝体） */
            'Hiragino Mincho ProN',
            /* ④ M PLUS Rounded 1c（Google Fonts の丸ゴシック） */
            'M PLUS Rounded 1c',
            /* ⑤ システムUIフォント群 */
            -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --gap: 1rem;
    --radius: 12px;
}

* {
    box-sizing: border-box
}


/* ポップアップのオーバーレイ */
#welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* ポップアップ本体 */
#welcome-modal {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 0.89em;
}

#welcome-modal h2 {
    margin-top: 0;
}

#welcome-modal button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#welcome-modal button:hover {
    background: #555;
}

@media(max-width:915px) {
#welcome-modal {
    max-width: 455px;
    font-size: 0.8rem;
    padding: 9%;
    background-color: rgba(255, 255, 255, 0.9);
}
}

/* ─────────  ヘッダー / ナビ  ───────── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #fff;
    box-shadow: 0 1px 3px #0002;
    position: sticky;
    top: 0;
    z-index: 3
        /* pop‑up より前面 */
}

header h1 {
    margin: 0;
    font-size: 2.0rem
}
btn-record{
 background:#000;
 color:#fff;
 border:none;
 padding:0.5rem 1rem;
 border-radius:4px;
 cursor:pointer;
 margin-left:1rem;
 font-size:0.9rem;
 " onclick=" location.href='{{ url_for(' record_cover') }}';
}
header a {
    color: #3c3e45;
    text-decoration: none;
    font-weight: 200;
    margin-left: 0.3em;
}
/* ───────── ヘッダー全体 ───────── */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* 小さい画面で折り返す */
    padding: 1rem;
    background: #fff;
}

/* タイトル */
header h1 {
    margin: 0;
    font-size: 1.6rem;
    flex: 1 1 auto;
    /* 幅をやや柔軟に */
}
header h1 a {
    position: relative;
    transition: opacity .25s ease;
}

header h1 a:hover {
    opacity: .6;
    /* 下線ではなく透過度を変化 */
}
/* ナビと認証リンクを右寄せグループに */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 1 auto;
}

/* モバイルではタイトルの下にナビを配置 */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-right {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
}

/* 右側（認証リンク） */
.auth-nav {
    display: flex;
    gap: 1rem;
    align-items: center
}

/* ─────── ドロップダウン付きメインナビ ─────── */
.main-nav {
    position: relative
}

.dropdown {
    display: inline-block;
    position: relative
}

.drop-btn {
    cursor: pointer;
    padding: .4rem .8rem;
    border-radius: 6px;
    background: #06c;
    color: #fff;
    transition: .2s;
}

.drop-btn:hover {
    background: #045aa5
}

.drop-list {
    list-style: none;
    margin: 0;
    padding: .4rem 0;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 140px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px #0003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: .2s;
}

.drop-list li {
    padding: 0 .8rem;
    line-height: 2rem
}

.drop-list li a {
    display: block;
    color: #333
}

.drop-list li a:hover {
    background: #06c1
}

.dropdown:hover .drop-list {
    opacity: 1;
    visibility: visible;
    transform: none
}



/* ─────────  フラッシュ  ───────── */
.flash {
    list-style: none;
    margin: 0;
    padding: .5rem;
    background: #e8e8e8;
}

/* ─────────  アップロードフォーム  ───────── */
.upload {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 1rem;
    background: #e8e8e8;
    border-radius: 8px;
    margin: 1rem
}

.guide {
    margin: .2rem 0;
    font-size: .85rem;
    color: #555
}
/* 10 色パレット */
.colors {
    display: flex;
    gap: .4rem
}

.colors label {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 2px #0002;
    background: var(--c)
}

.colors input {
    display: none
}

.colors input:checked+label,
.colors label:has(input:checked) {
    outline: 3px solid #06c
}

.info{
     margin-left: 1.5rem;
}

/* ─────────  ギャラリー  ───────── */
.gallery {
    column-count: 4;
    column-gap: .8rem;
    padding: .8rem 1rem;
}

@media(max-width:900px) {
    .gallery {
        column-count: 3
    }
}

@media(max-width:600px) {
    .gallery {
        column-count: 2
    }
}

.gallery figure {
    /* レイアウト */
    display: flex;
    flex-direction: column;
    position: relative;
    break-inside: avoid;
    margin: 0 0 .8rem;

    /* 見た目 */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;

    /* シャドウ */
    box-shadow: 0 6px 15px -6px var(--shadow, #0003);

    /* ホバー時のアニメーション */
    transition: transform .3s ease, box-shadow .3s ease;
}

.gallery img {
    display: block;
    width: 100%
}

.gallery figcaption {
    font-size: .8rem;
    padding: 2px 6px;
    background: #0008;
    color: #fff;
    text-align: right;
    pointer-events: auto
        /* 可クリック */
}

/* card */
.gallery figure {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 15px -6px var(--shadow, #0003);
    transition: transform .3s ease, box-shadow .3s ease;
}

.gallery figure:hover {
    transform: scale(1.0);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.2);
}
/* 色名バッジ */
.badge {
    background: #0007;
    color: #fff;
    font-size: .7rem;
    padding: 0 .4em;
    border-radius: 4px
}

.book-info {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.book-author {
    font-weight: 500;
}

.book-color {
    display: flex;
    align-items: center;
}

.book-color .swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: .25rem;
}

/* ① ポップアップ（感想） 60% 下エリアのみ覆う */
.gallery .hover {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90%;
    background: #000c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    font-size: .7rem;
    opacity: 0;
    transition: .3s;
    pointer-events: none
        /* リンクは生きる */
}

.gallery figure:hover .hover {
    opacity: 1
}



/* ② 投稿者アバターは非表示 */
.avatar-small {
    display: none
}

/* ─────────  プロフィール  ───────── */
.profile {
    padding: 1rem;
    background: var(--clr);
    color: var(--fg);
    text-align: center
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    margin-bottom: .5rem
}

/* ─────────  汎用フォーム  ───────── */
.reg {
    max-width: 360px;
    margin: 1rem auto;
    display: grid;
    gap: .6rem
}

.reg label {
    display: flex;
    flex-direction: column;
    font-size: .9rem
}

.error {
    color: #c00
}

/* ─────────  検索フォーム  ───────── */
.filter {
    display: flex;
    gap: .5rem;
    margin: 1rem 1rem
}

.filter select {
    padding: .3rem
}

/* ─────────  タブ & 行レイアウト  ───────── */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #ddd;
    margin: 0 0 1rem;
    padding: 0 1rem
}

.tabs a {
    padding: .4rem 1rem;
    color: #06c;
    text-decoration: none
}

.tabs a.on {
    font-weight: bold;
    border-bottom: 2px solid #06c
}

/* colour heading dot + row thumbnails */
.swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: .25rem
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .5rem 0
}

.row img {
    height: 229px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 8px -4px var(--shadow, #0003)
}

/* ─────────  About page  ───────── */
.about {
    max-width: 780px;
    margin: 1rem auto;
    padding: 0 1rem;
    line-height: 1.6
}

.about h2 {
    margin-top: 0
}

/* ─────────  レスポンシブ調整  ───────── */
@media(max-width:600px) {
    .auth-nav a {
        font-size: .9rem
    }
}
/* ─────────  nav/メニュー  ───────── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    margin-top: 0.7rem;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* 各要素の間隔をあける */
}
.main-nav>.menu,
.main-nav>div {
    display: flex;
    align-items: center;
    gap: .6rem;
}
/* メインナビ内のメニューも横並びに */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* ドロップダウン本体 */
.menu {
    position: relative
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    color: #0b0b0b;

    font-family:
            'Ten Mincho',
            /* Typekit で読み込んだフォント名 */
            'M PLUS Rounded 1c',
            /* Google Fonts */
            -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.menu-list {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    padding: .4rem 0;
    margin: 0;
    list-style: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px #0002;
    z-index: 9;
}

.menu-list li a {
    display: block;
    padding: .4rem 1.2rem;
    white-space: nowrap;
    text-decoration: none;
    color: #333;
    font-size: .9rem;
}

.menu-list li a:hover {
    background: #f5f5f5
}

/* ―― ホバー or フォーカスで開く ―― */
.menu:hover .menu-list,
.menu:focus-within .menu-list {
    display: block
}
/* ─────────  GALLERY 6‑COL GRID  ───────── */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    /* ≒6列@≥1100px */
    gap: 1rem;
    padding: 1rem;
}

/* レスポンシブ：3~4列へ */
@media(max-width:900px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr))
    }
}

@media(max-width:600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr))
    }
}


/* 画像ラッパ（感想オーバーレイ用） */
.thumb {
    position: relative
}

.thumb img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block
}

/* 感想オーバーレイ：下30px空け caption を隠さない */
.hover {
    position: absolute;
    inset: 0 0 30px 0;
    background: #000b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .8rem;
    text-align: center;
    font-size: .8rem;
    opacity: 0;
    transition: .25s ease;
}

figure:hover .hover {
    opacity: 1
}

/* caption */
.gallery figcaption {
    background: #fafafa;
    border-top: 1px solid #eee;
    padding: .45rem .6rem;
    font-size: .78rem;
    line-height: 1.4;
}
/* ───────── figcaption を左右ブロックに ───────── */
.gallery figure figcaption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    /* color: #0645ad;  ← ここを削除 */
}

/* 左右のブロック */
.gallery figure figcaption .info-left {
    display: flex;
    align-items: center;
    flex: 0;
    /* 左ブロックは伸びない */
}


/* 各要素に統一色を当てる */
.gallery figure figcaption .book-author,
.gallery figure figcaption .book-user,
.gallery figure figcaption .book-date {
    font-size: 0.85rem;
    white-space: nowrap;
    color: #0645ad;
    /* 日付も含めてこの色に */
}

/* badge (color name) */
.badge {
    background: #1119;
    color: #fff;
    font-size: .7rem;
    padding: 0 .4em;
    border-radius: 4px;
    margin-right: .25em
}

/* ─────────  MINIMAL THEME  ───────── */
html {
    scroll-behavior: smooth
}


header,
.menu-list {
    background: #fff
}

a {
    color: #0645ad;
    text-decoration: none
}

button {
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    background: #717586;
    color: #fff;
    cursor: pointer;
}

button:hover {
    opacity: .9
}

.btn-record{
    margin: 0.7rem 0.3rem 0.3rem 0.3rem;
}

/* ─────────  My‑page actions  ───────── */
.book-actions {
    display: flex;
    gap: .4rem;
    margin-top: .4rem
}

.book-actions a,
.book-actions button {
    font-size: .7rem;
    padding: .25rem .6rem;
    border-radius: 6px;
    border: 1px solid #8883;
    background: #fff;
    cursor: pointer;
    color: #444
}

.book-actions button {
    background: #e5393544;
    color: #b00;
    border: none
}

.book-actions a:hover,
.book-actions button:hover {
    opacity: .85
}
.site-footer {
    text-align: center;
    padding: 1rem;
    margin-top: 5%;
    font-size: .8rem;
    color: #666;
    background: #fafafa;
    border-top: 1px solid #eee;
}
/* style.css */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.breadcrumb li+li:before {
    content: "›";
    margin: 0 0.5em;
    color: #888;
}

.breadcrumb a {
    text-decoration: none;
    color: #06c;
    margin-left: 1.2rem;
}