/* 今のアプリ（konchu-zukan）の css/themes.css から持ち込み（④-2）。#loginPage → .auth-page、#settingsPage を淡くする対象に追加 */
/* ===== 背景セット（森・古本・青空） =====
   <html data-theme="mori|furuhon|aozora"> で切り替える。
   色の名前（--drawer など）は style.css と同じ。ここで上書きすると全体の色が変わる。 */

/* ----- 3セット共通 ----- */
html[data-theme] { color-scheme: light; }            /* スマホのダークモードでも、選んだ背景の色のままにする */
html[data-theme] .map { background: #D2DBD8; }

/* 背景の絵：ページの後ろに固定して、スクロールしても動かないようにする */
.page::before {
  content: "";
  position: fixed;
  left: 0; right: 0; top: 0;
  height: 100vh; height: 100lvh;
  height: var(--bg-h, 100lvh);   /* スクロールで画面の高さが変わっても、背景の大きさが変わらないように（index.html で決める） */
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
}

/* 背景の絵の上に直接のる文字を読みやすくする（文字のまわりに背景色のふちを付ける） */
html[data-theme] .page:not(#coverPage) .back { background: rgba(255, 255, 255, .85); border-radius: 14px; padding: 3px 12px; color: var(--ink); }
html[data-theme] .page:not(#coverPage) .back { border: 1.5px solid var(--moss); }   /* 「← 戻る」「← 表紙に戻る」に枠を付けて見やすく */
html[data-theme] .page:not(#coverPage) :is(.tally, .page-title, .lead, .chapter-head h2, .chapter-head p, .chapter-head .cnt, .family, .msg, .private, .legend, .year-head, h3.sec, .detail-name, .detail-sci, .to-species, dl.facts, .form > label, .form .row > label, .form > div > .sub, .form .id-box > .sub, .timeline, .log-hint) {
  /* 文字のすぐ後ろに、背景色のぼかしを重ねる（文字の背景） */
  text-shadow: 0 0 1px var(--halo), 0 0 3px var(--halo), 0 0 6px var(--halo), 0 0 12px var(--halo);   /* 4枚まで（多いとスクロールが重くなる） */
}
/* 森は両端の葉が濃いので、ぼかしを少し増やす（7枚） */
html[data-theme="mori"] .page:not(#coverPage) :is(.tally, .page-title, .lead, .chapter-head h2, .chapter-head p, .chapter-head .cnt, .family, .msg, .private, .legend, .year-head, h3.sec, .detail-name, .detail-sci, .to-species, dl.facts, .form > label, .form .row > label, .form > div > .sub, .form .id-box > .sub, .timeline, .log-hint) {
  text-shadow: 0 0 1px var(--halo), 0 0 2px var(--halo), 0 0 4px var(--halo), 0 0 6px var(--halo), 0 0 9px var(--halo), 0 0 13px var(--halo), 0 0 18px var(--halo);
}

/* 表紙以外のページは、文字が乗る背景の絵を少し淡くする（一番上に半透明の色を重ねる） */
html[data-theme] :is(#zukanPage, #mapPage, #recordPage, #detailPage, #speciesPage, #diaryPage, #settingsPage)::after {
  content: ""; position: fixed; left: 0; right: 0; top: 0;
  height: 100vh; height: 100lvh;
  height: var(--bg-h, 100lvh);
  z-index: -1; pointer-events: none;
  background: var(--wash);
}

#coverPage .wrap > .rb-row { flex-wrap: wrap; gap: 6px; }

/* スクロールでアドレスバーが縮んでも、写真や地図の大きさが変わらないようにする
   （画面の向きごとに1回だけ決めた高さ --bg-h を基準にする。index.html で決める） */
.gallery .main { max-height: 60svh; max-height: calc(var(--bg-h, 100svh) * .6); }
.main-map { height: min(68svh, 640px); height: min(calc(var(--bg-h, 100svh) * .68), 640px); }
.page { min-height: 100svh; }

/* 図鑑の一覧の「○○科」の見出しを少し大きく（章の見出しと標本ラベルのあいだの大きさ） */
.family { font-size: 19px; font-weight: 500; color: var(--ink); }

/* 「わたしの」の文字の大きさ（名前が長いと app.js が --os で小さくする） */
.owner-btn { font-size: calc(var(--owner-size, 1em) * var(--os, 1)); }

/* 表紙の上の「背景をかえる」ボタン */
#coverPage .wrap > .rb-row { justify-content: space-between; }
#coverPage .rb-row .rb-toggle { margin-left: auto; }
.theme-btn { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 3px 12px; font-size: 13px; cursor: pointer; color: var(--ink-soft); }

/* 背景をえらぶ画面 */
#themeDlg { border: 1px solid var(--line); border-radius: 6px; padding: 20px 18px 16px; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); }
#themeDlg::backdrop { background: rgba(20, 25, 22, .45); }
#themeDlg h3 { font-family: var(--mincho); font-size: 19px; margin: 0 0 12px; }
.theme-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.theme-list button { border: 3px solid transparent; background: none; padding: 3px; border-radius: 8px; cursor: pointer; display: grid; gap: 4px; justify-items: center; color: var(--ink); }
.theme-list button:focus:not(:focus-visible) { outline: none; }   /* 開いたときに最初の見本に枠が出ないように（今の背景の印も付けない） */
.theme-list img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.theme-list span { font-size: 15px; font-weight: 700; }
#themeDlg .private { margin: 0 0 6px; }
#themeDlg .actions { justify-content: flex-end; margin-top: 0; }


/* ===================== 森 ===================== */
html[data-theme="mori"] {
  --drawer: #F3E8D1; --paper: #FBF8EE; --ink: #2B2A1F; --ink-soft: #48463A;
  --line: #B9B293; --moss: #3F5A2A; --pin: #A63A2A; --field: #F6F0DF;
  --halo: #FCF8EC;
  --sheet: rgba(251, 248, 238, .93);
  --wash: rgba(243, 232, 209, .6);
}
/* ページ：紙の質感と、両端の植物画 */
html[data-theme="mori"] .page::before {
  background:
    url(../images/mori-left.webp) left top / auto 100% no-repeat,
    url(../images/mori-right.webp) right top / auto 100% no-repeat,
    #F3E8D1 url(../images/mori-paper.jpg) 0 0 / 320px 320px repeat;
}
/* 表紙：植物画を画面いっぱいに（スマホの縦長画面のとき） */
html[data-theme="mori"] #coverPage::before,
html[data-theme="mori"] .auth-page::before,
html[data-theme="mori"] #closedPage::before {
  background: #F3E8D1 url(../images/mori-cover.jpg) center top / 100% 100% no-repeat;
}
/* 横長の画面（パソコンなど）では、絵がのびすぎないようにページと同じ背景にする */
@media (min-aspect-ratio: 3/4) {
  html[data-theme="mori"] #coverPage::before,
  html[data-theme="mori"] .auth-page::before,
  html[data-theme="mori"] #closedPage::before {
    background:
      url(../images/mori-left.webp) left top / auto 100% no-repeat,
      url(../images/mori-right.webp) right top / auto 100% no-repeat,
      #F3E8D1 url(../images/mori-paper.jpg) 0 0 / 320px 320px repeat;
  }
}
html[data-theme="mori"] .cover-book {
  background: rgba(251, 247, 234, .84);
  border-color: #A99F7C;
  outline-color: rgba(255, 255, 255, .7);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(60, 50, 20, .10);
}
html[data-theme="mori"] .cover-nav button { box-shadow: 0 2px 0 #B9B293; border-color: #8F8664; }
html[data-theme="mori"] .index { background: rgba(243, 232, 209, .95); }


/* ===================== 古本 ===================== */
html[data-theme="furuhon"] {
  --drawer: #E9DCC0; --paper: #FBF6E8; --ink: #2A2418; --ink-soft: #483D2A;
  --line: #A8996E; --moss: #1D3A26; --pin: #9A3324; --field: #F3EAD3;
  --gold: #E4C67E; --cream: #E9DCB8; --leather: #15241A; --leather2: #1D3124; --goldline: #A88C4A;
  --halo: #F8F1DF;
  --sheet: rgba(251, 246, 232, .93);
  --wash: rgba(233, 220, 192, .4);
}
/* ページ：古い紙と、右上・左下の葉 */
html[data-theme="furuhon"] .page::before {
  background:
    url(../images/furuhon-leaf-tr.webp) right top / 190px auto no-repeat,
    url(../images/furuhon-leaf-bl.webp) left bottom / 200px auto no-repeat,
    #E9DCC0 url(../images/furuhon-paper.jpg) 0 0 / 320px 320px repeat;
}
html[data-theme="furuhon"] .page-title { color: var(--moss); border-bottom: 3px double var(--goldline); display: block; width: fit-content; padding-bottom: 2px; }   /* 下線は文字の幅だけ。「← 戻る」の下に置く */
html[data-theme="furuhon"] .viewmode button[aria-pressed="true"] { background: var(--moss); color: var(--gold); }
html[data-theme="furuhon"] .index { background: rgba(233, 220, 192, .95); }

/* 表紙・ログイン・非公開のページ：深い緑の革 */
html[data-theme="furuhon"] #coverPage::before,
html[data-theme="furuhon"] .auth-page::before,
html[data-theme="furuhon"] #closedPage::before { background: var(--leather); }
html[data-theme="furuhon"] #coverPage,
html[data-theme="furuhon"] .auth-page,
html[data-theme="furuhon"] #closedPage { color: var(--cream); }

/* 表紙の本：画像の金の枠に合わせて、文字と写真を置く */
html[data-theme="furuhon"] #coverPage .cover-book {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0 -12px;                        /* スマホでは本を少し大きく見せる */
  padding: calc(28.6% + 7.4px) 14% 0;
  border: 0; outline: 0; border-radius: 0;
  background: url(../images/furuhon-cover.webp) center / 100% 100% no-repeat;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  color: var(--gold);
}
html[data-theme="furuhon"] #coverPage .cover-kicker {
  position: absolute; left: 0; right: 0; top: 13.2%;
  margin: 0; font-size: 3.9cqw; letter-spacing: .3em; color: var(--gold);
}
/* 本の中の配置（下から順に決める）
   写真6枚：本の下から --grid-bottom の位置
   採集者：写真の上に1行分あけて置く
   昆虫図鑑：「雄大の」と「採集者」のちょうど真ん中 */
html[data-theme="furuhon"] #coverPage .cover-book {
  --grid-bottom: 28.4%;
  --grid-h: calc((56cqw - 3.6cqw) / 3 * 2 + 1.8cqw);   /* 写真2段分の高さ */
  --line: 9cqw;                                         /* 1行分の高さ（採集者の行の高さ。ふりがな込み） */
  --coll-top: calc(var(--grid-bottom) + var(--grid-h) + var(--line) * 2);   /* 本の下から、採集者の上端まで */
}
html[data-theme="furuhon"] #coverPage .cover-title {
  position: absolute; left: 0; right: 0; top: 20.8%;
  bottom: var(--coll-top);
  margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  font-size: 13cqw; line-height: 1.3; color: var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --owner-size: .62em;
}
html[data-theme="furuhon"] #coverPage .cover-title br { display: none; }
html[data-theme="furuhon"] #coverPage .cover-title::after { content: ""; height: 4.5cqw; flex: none; }   /* 「昆虫図鑑」を「雄大の」と「採集者」の見た目の真ん中に置くための調整 */
html[data-theme="furuhon"] #coverPage .owner-btn { text-decoration-color: var(--goldline); line-height: 1.25; }
html[data-theme="furuhon"] #coverPage .cover-collector {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--grid-bottom) + var(--grid-h) + var(--line));
  margin: 0; height: var(--line); display: flex; align-items: flex-end; justify-content: center; font-size: 4.8cqw; line-height: 1.5; color: var(--cream);
}
html[data-theme="furuhon"] #coverPage .cover-collector .btn { color: var(--cream); }
html[data-theme="furuhon"] #coverPage .cover-box { position: absolute; left: 0; right: 0; bottom: var(--grid-bottom); max-width: 56cqw; gap: 1.8cqw; margin: 0 auto; }
html[data-theme="furuhon"] #coverPage .cover-box .cell { background: #2A3D2E; border: 1px solid var(--goldline); }
html[data-theme="furuhon"] #coverPage .cover-stats {
  position: absolute; left: 0; right: 0; top: 78.6%;
  margin: 0; font-size: 4.3cqw; color: var(--cream);
}

/* 表紙のボタンなど（革の上） */
html[data-theme="furuhon"] #coverPage .rb-toggle,
html[data-theme="furuhon"] #coverPage .theme-btn { background: rgba(16, 30, 20, .85); border-color: #8A7339; color: var(--gold); }
html[data-theme="furuhon"] .cover-nav button { background: var(--leather2); border-color: var(--goldline); color: var(--cream); }
html[data-theme="furuhon"] .cover-nav svg { color: var(--gold); }
html[data-theme="furuhon"] .cover-nav strong { color: var(--gold); }
html[data-theme="furuhon"] .cover-nav small { color: var(--cream); }
html[data-theme="furuhon"] .cover-record { background: var(--gold); color: var(--leather); }
html[data-theme="furuhon"] #coverPage .msg { color: var(--cream); }
html[data-theme="furuhon"] .share-box { background: var(--leather2); border-color: var(--goldline); color: var(--cream); }
html[data-theme="furuhon"] .share-box h3 { color: var(--gold); }
html[data-theme="furuhon"] .share-box .private,
html[data-theme="furuhon"] .share-box .share-status { color: #CFC3A0; }
html[data-theme="furuhon"] .share-box .btn { background: transparent; border-color: var(--gold); color: var(--gold); }
html[data-theme="furuhon"] .share-box .btn.primary { background: var(--gold); color: var(--leather); }
html[data-theme="furuhon"] .share-box .btn.danger { border-color: #E8907F; color: #E8907F; }
html[data-theme="furuhon"] .share-link { background: var(--leather); border-color: var(--goldline); color: var(--cream); }
html[data-theme="furuhon"] #coverPage .btn.ghost,
html[data-theme="furuhon"] .auth-page .btn.ghost { color: #CFC3A0; }
html[data-theme="furuhon"] .viewer .viewer-note { color: #CFC3A0; }

/* ログイン・非公開のページの本 */
html[data-theme="furuhon"] .auth-page .cover-book,
html[data-theme="furuhon"] #closedPage .cover-book { background: var(--leather2); border-color: var(--goldline); outline-color: rgba(228, 198, 126, .35); color: var(--gold); }
html[data-theme="furuhon"] .auth-page .cover-kicker,
html[data-theme="furuhon"] #closedPage .cover-kicker { color: var(--cream); }
html[data-theme="furuhon"] .login-form label { color: var(--cream); }
/* 革の背景のページでも、入力した文字は黒っぽい墨色ではっきり見せる（金色を引き継がない） */
html[data-theme="furuhon"] :is(.auth-page, #coverPage, #closedPage) :is(input, select, textarea) { color: #2B2418; -webkit-text-fill-color: #2B2418; caret-color: #2B2418; text-shadow: none; }
html[data-theme="furuhon"] :is(.auth-page, #coverPage, #closedPage) :is(input, textarea)::placeholder { color: #8A8170; -webkit-text-fill-color: #8A8170; }
html[data-theme="furuhon"] .auth-page .msg,
html[data-theme="furuhon"] .closed-msg { color: var(--cream); }
html[data-theme="furuhon"] .auth-page .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--leather); }


/* ===================== 青空 ===================== */
html[data-theme="aozora"] {
  --drawer: #F4F9EE; --paper: #FFFFFF; --ink: #24331F; --ink-soft: #3C4B37;
  --line: #CFDCC4; --moss: #2F6A22; --pin: #C2452F; --field: #F3F7EE;
  --halo: #FFFFFF;
  --sheet: rgba(255, 255, 255, .92);
  --wash: rgba(244, 249, 238, .45);
  --mincho: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  --gothic: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
}
/* ページ：上に青空と葉、下に向かって明るい無地 */
html[data-theme="aozora"] .page::before {
  background:
    url(../images/aozora-top.webp) center top / 100% auto no-repeat,
    linear-gradient(180deg, #F4F9EE 0%, #F7FAF2 100%);
}
/* 表紙：明るい森の絵を画面いっぱいに */
html[data-theme="aozora"] #coverPage::before,
html[data-theme="aozora"] .auth-page::before,
html[data-theme="aozora"] #closedPage::before {
  background: #CFE6F5 url(../images/aozora-cover.webp) center top / cover no-repeat;
}
html[data-theme="aozora"] .cover-book {
  background: rgba(255, 255, 255, .88);
  border: 0; outline: 0;
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(30, 60, 20, .18);
}
html[data-theme="aozora"] .cover-title { font-weight: 900; color: var(--moss); }
html[data-theme="aozora"] .cover-box .cell { border-radius: 12px; }
html[data-theme="aozora"] .cover-nav button { background: rgba(255, 255, 255, .94); border: 0; border-radius: 18px; box-shadow: 0 3px 10px rgba(30, 60, 20, .18); }
html[data-theme="aozora"] .cover-nav strong { font-weight: 900; color: var(--moss); }
html[data-theme="aozora"] .cover-record { border-radius: 28px; box-shadow: 0 4px 0 #1F4A16; }
html[data-theme="aozora"] .share-box { background: rgba(255, 255, 255, .92); border: 0; border-radius: 18px; }
html[data-theme="aozora"] #coverPage .rb-toggle,
html[data-theme="aozora"] #coverPage .theme-btn { background: rgba(255, 255, 255, .92); border: 0; box-shadow: 0 2px 6px rgba(30, 60, 20, .15); font-weight: 700; color: var(--moss); }
html[data-theme="aozora"] #coverPage .cover-foot .btn.ghost,
html[data-theme="aozora"] #coverPage .msg:not(:empty),
html[data-theme="aozora"] .viewer .viewer-note { background: rgba(255, 255, 255, .85); border-radius: 14px; padding: 4px 14px; display: inline-block; }
html[data-theme="aozora"] #coverPage .msg:empty { display: none; }
html[data-theme="aozora"] .viewer #coverPage .viewer-note { display: table; margin: 24px auto 0; }
html[data-theme="aozora"] .auth-page .login-form { background: rgba(255, 255, 255, .9); border-radius: 18px; padding: 16px; }
html[data-theme="aozora"] .closed-msg { color: var(--ink); }
html[data-theme="aozora"] .btn { border-radius: 999px; }
html[data-theme="aozora"] .viewmode { border-radius: 999px; }
html[data-theme="aozora"] .label { border-radius: 8px; }
html[data-theme="aozora"] .specimen .photo { border-radius: 10px; }
html[data-theme="aozora"] .index { background: rgba(244, 249, 238, .95); }

/* 日付と時刻は、スマホでも横に並べる（時刻はなくてもよい） */
.form .row.dt { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.form input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 2.75em; text-align: left; }
.form input[type="time"]::-webkit-date-and-time-value { text-align: left; }

/* 観察日記：何日目か、編集・削除のボタン */
/* 観察日記の1件：「何日目」→ 日付と出来事 → メモ → 写真 → 編集・削除（写真の右下） */
.timeline .dayno { font-size: 18px; font-weight: 700; color: var(--moss); line-height: 1.4; letter-spacing: .02em; }
.timeline .log-when { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; }
.timeline .log-when time { font-size: 17px; }
.timeline .log-when .tag { font-size: 15px; margin-left: 0; }
.timeline .txt { margin-top: 6px; }
.timeline .log-media { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 100%; margin-top: 8px; }
.timeline .log-media img { margin-top: 0; width: auto; max-width: 100%; max-height: 380px; border-radius: 4px; }
.timeline .log-acts { display: inline-flex; gap: 10px; }
.timeline .log-btn { font: inherit; font-size: 14px; line-height: 1.2; padding: 6px 10px; min-width: 5em; text-align: center; border: 2px solid var(--moss); border-radius: 8px; background: var(--paper); color: var(--moss); cursor: pointer; text-shadow: none; }
.timeline .log-btn.fill { background: var(--moss); color: #fff; }   /* 編集は塗りつぶし、削除は枠だけ */
.timeline .log-btn.fill rt { color: rgba(255, 255, 255, .85); }
.timeline .log-btn.danger { border-color: var(--pin); color: var(--pin); }   /* 削除は赤い文字と赤い枠 */
.diary-row .sub.keep { color: var(--moss); font-weight: 700; }

/* 右下に固定するボタン（観察日記を書く） */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20; border-radius: 28px; padding: 14px 22px; box-shadow: 0 4px 14px rgba(0,0,0,.28); font-weight: 700; }
#logPage .wrap { padding-bottom: 110px; }

/* 観察日記を書く画面（ダイアログ） */
.log-dlg { border: 1px solid var(--line); border-radius: 8px; padding: 18px 16px 14px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); color: var(--ink); }
.log-dlg::backdrop { background: rgba(20, 25, 22, .45); }
.log-dlg h3 { font-family: var(--mincho); font-size: 19px; margin: 0 0 4px; }
.log-dlg .log-who { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }
.log-dlg .form input, .log-dlg .form select, .log-dlg .form textarea { color: var(--ink); -webkit-text-fill-color: var(--ink); }
.log-dlg .log-form { border: 0; padding: 0; background: none; box-shadow: none; margin: 0; }
#diaryPage .lead-note { font-size: .9em; color: var(--ink-soft); }

/* 観察日記の画面の上の部分 */
.log-head { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 12px; margin: 4px 0 22px; }
.log-head img, .log-head .ph { width: 96px; height: 72px; object-fit: cover; border-radius: 2px; background: var(--field); display: block; }
.log-head strong { font-family: var(--mincho); font-size: 18px; }
.log-head .sub { display: block; font-size: 13.5px; margin-top: 2px; }
.log-head .sub.keep { color: var(--moss); font-weight: 700; }
.log-head .linkish { display: inline-block; margin-top: 8px; font-size: 14px; }
.to-log { margin: 4px 0 18px; }

/* 図鑑のカードの文字を一回り大きく（名前・回数・日付） */
.label { font-size: 13px; }
.label .jp { font-size: 17px; }
/* 図鑑の集計（例：20種 20件の記録、6都道府県で採集）も一回り大きく */
.tally { font-size: 16px; }
/* 目の説明（例：カブトムシ・クワガタ・テントウムシのなかま）も一回り大きく */
.chapter-head p { font-size: 15px; }
.chapter-head .cnt { font-size: 19px; font-weight: 700; }   /* 目ごとの種の数（例：3種） */
@media (max-width: 600px) {
  .label { font-size: 12.5px; }
  .label .jp { font-size: 16px; }
  .chapter-head p { font-size: 14px; }
}

/* 表紙の3つのボタンの下の数（例：20種、飼育中 1匹、15地点）を一回り大きく。
   ボタンの名前（採集地マップ）は、幅の狭いスマホではみ出すため大きさを変えない */
.cover-nav small { font-size: 15.5px; }
@media (max-width: 600px) { .cover-nav small { font-size: 15px; } }

/* 写真の上の赤い丸（虫ピンの飾り）は表示しない（表紙の写真・図鑑のカード） */
.cover-box .cell::before, .specimen .pin { display: none; }

/* 記録の詳細：編集・削除は右上（「← 戻る」と同じ行） */
.page-head.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.head-acts { display: flex; gap: 8px; }
.head-acts .btn { padding: 7px 14px; font-size: 14px; line-height: 1.3; margin: 0; text-shadow: none; }
.head-acts .btn.danger { background: var(--paper); }

/* 古本：「図鑑を見せる」のリンクの欄は暗い革の色なので、文字は明るいクリーム色
   （入力欄を墨色にする設定がここにもかかって、文字が見えなくなっていたのを直す） */
html[data-theme="furuhon"] #coverPage .share-link { color: var(--cream); -webkit-text-fill-color: var(--cream); }

/* 地図：拡大したときに敷く国土地理院の地図と、出典の表示 */
.map .tiles { pointer-events: none; }
.map .tiles image { image-rendering: auto; }
.map .map-attr { display: none; position: absolute; right: 4px; bottom: 4px; font-size: 10px; line-height: 1.3; padding: 1px 5px; background: rgba(255, 255, 255, .85); color: #333; border-radius: 3px; text-decoration: none; text-shadow: none; }
.map.tiled .map-attr { display: block; }
.map .map-attr rt { display: none; }

/* 採集地マップ：選んだ点と、点を押したときのカード（2026-10-24） */
.map .pts circle.sel { stroke: var(--ink); stroke-width: 3; }
.map-wrap { position: relative; }
.map-card { position: absolute; left: 8px; right: 8px; bottom: 24px; z-index: 5; max-width: 420px; margin: 0 auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); padding: 12px 12px 12px; text-shadow: none; }
.map-card[hidden] { display: none; }
.map-card .mc-close { position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; border: 0; background: none;
  color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.map-card .mc-one { display: flex; gap: 12px; align-items: center; padding-right: 28px; }
.map-card .mc-photo { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--line);
  display: flex; align-items: center; justify-content: center; }
.map-card .mc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-card .mc-photo .noimg { font-size: 10px; color: var(--ink); opacity: .7; }
.map-card .mc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.map-card .mc-text strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-card .mc-open { display: block; width: 100%; margin-top: 10px; padding: 10px; font-size: 15px; border-radius: 6px; cursor: pointer; }
.map-card .mc-head { margin: 0 32px 8px 2px; font-weight: 700; font-size: 14px; }
.map-card .mc-list { max-height: 210px; overflow-y: auto; display: grid; gap: 6px; }
.map-card .mc-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 6px; text-align: left;
  background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; font: inherit; }
.map-card .mc-row .mc-photo { width: 44px; height: 44px; }
.map-card .mc-row .mc-text strong { font-size: 15px; }
.map-card .mc-go { margin-left: auto; font-size: 20px; opacity: .6; padding: 0 4px; }
