/* =========================================================
   A. Kato — 絵画ポートフォリオ
   ちぎり和紙 × 絵画 × 手書き風スクリプト見出しのデザイン
   ========================================================= */

:root {
  --paper:      #f3efe6;   /* 生成りの紙 */
  --paper-deep: #e9e3d6;
  --ink:        #2a2722;   /* 文字色 */
  --ink-soft:   #6f6657;
  --line:       #d8cfbe;

  --navy:       #1f2c39;   /* ヒーローの暗部 */
  --navy-deep:  #16212b;
  --green:      #434d3c;   /* About 深緑 */
  --green-deep: #39422f;

  --accent:     #c2764e;   /* オレンジ（差し色・アンダーライン・サイン） */
  --accent-soft:#d8927a;   /* ピンク寄り */
  --blue-blot:  #5d7a96;

  --serif-en: "Cormorant Garamond", serif;
  --serif-jp: "Shippori Mincho", serif;
  --script:   "Yellowtail", cursive;

  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--serif-jp);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: 500; line-height: 1.4; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.paper-grain {
  position: fixed; inset: 0; z-index: -3;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.018) 0, transparent 0.6px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,0.022) 0, transparent 0.6px),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,0.018) 0, transparent 0.6px);
  background-size: 3px 3px, 4px 4px, 5px 5px;
  pointer-events: none;
}

/* ---------- 共通パーツ ---------- */
.script-h {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--ink);
  position: relative;
  display: inline-block;
  padding-bottom: 0.25em;
  line-height: 1;
}
.script-h::after {
  content: "";
  position: absolute; left: 0.1em; bottom: 0;
  width: 1.6em; height: 6px;
  background: var(--accent);
  border-radius: 6px 8px 5px 7px / 6px 5px 8px 6px;
  opacity: 0.85;
}
.script-h--light { color: #f3efe6; }
.script-h--light::after { background: var(--accent); }

.link-arrow {
  font-family: var(--serif-en);
  letter-spacing: 0.22em;
  font-size: 0.95rem;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.7em;
  position: relative;
}
.link-arrow::after {
  content: "→";
  transition: transform .35s var(--ease);
}
.link-arrow:hover::after { transform: translateX(6px); }
.link-arrow--light { color: #f3efe6; }

.view-all {
  font-family: var(--serif-en);
  letter-spacing: 0.18em; font-size: 0.78rem; text-transform: uppercase;
  color: var(--ink-soft);
  align-self: flex-end;
}
.view-all:hover { color: var(--accent); }

.btn {
  display: inline-block; text-align: center;
  font-family: var(--serif-jp);
  font-size: 1rem; letter-spacing: 0.12em;
  padding: 0.85em 2.6em; border-radius: 2px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; transition: background .35s var(--ease), color .35s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }

/* ちぎり和紙の境界 */
.edge { position: absolute; left: 0; width: 100%; line-height: 0; z-index: 2; pointer-events: none; }
.edge svg { width: 100%; height: clamp(36px, 5vw, 64px); display: block; }
.edge--bottom { bottom: -1px; }
.edge--top { top: 1px; transform: translateY(-100%); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(243, 239, 230, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.brand__name { font-family: var(--serif-en); font-size: 1.6rem; letter-spacing: 0.14em; }
.site-header.is-over-hero .brand__name,
.site-header.is-over-hero .nav a { color: #f5f1e9; }
.site-header.is-scrolled .brand__name,
.site-header.is-scrolled .nav a { color: var(--ink); }

.header-right { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.2rem); }
.nav { display: flex; gap: clamp(1.2rem, 2.6vw, 2.4rem); }

/* 言語切替プルダウン */
.lang-switch { position: relative; display: inline-flex; }
.lang-switch::after {
  content: "▾"; position: absolute; right: 0.7em; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: 0.7em; color: inherit; opacity: 0.8;
}
.lang-switch select {
  font-family: var(--serif-en); font-size: 0.82rem; letter-spacing: 0.08em;
  color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 0.4em 1.9em 0.4em 0.9em;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  transition: border-color .3s var(--ease), opacity .3s var(--ease);
}
.lang-switch select:hover { opacity: 0.78; }
.lang-switch select option { color: #1f1b19; }
.site-header.is-over-hero .lang-switch { color: #f5f1e9; }
.site-header.is-over-hero .lang-switch select { border-color: rgba(245,241,233,0.55); }
.site-header.is-scrolled .lang-switch { color: var(--ink); }
.site-header.is-scrolled .lang-switch select { border-color: var(--line); }
.nav a {
  font-family: var(--serif-en);
  font-size: 1.02rem; letter-spacing: 0.08em;
  position: relative; padding-bottom: 4px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: currentColor; transition: width .35s var(--ease);
}
.nav a:hover::after { width: 100%; }
.nav-toggle { display: none; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 100vh;                    /* 古いブラウザ用フォールバック */
  min-height: 100svh;                   /* 小さいビューポート基準（iOSの下端余白を防ぐ） */
  display: flex; align-items: center;
  padding: 0 clamp(1.5rem, 7vw, 7rem);
  overflow: hidden;
}
.hero__carousel { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
/* 作品が無いときの絵画風プレースホルダ */
.hero__slide--placeholder {
  background:
    radial-gradient(120% 80% at 70% 18%, #36506b 0%, transparent 55%),
    radial-gradient(90% 60% at 20% 30%, #2a3b4d 0%, transparent 60%),
    linear-gradient(180deg, #1b2733 0%, #243341 46%, #46583f 60%, #5d6b48 100%);
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(20,28,36,0.72) 0%, rgba(20,28,36,0.34) 45%, rgba(20,28,36,0.12) 100%),
    linear-gradient(0deg, rgba(20,28,36,0.45) 0%, transparent 40%);
}
.hero__content { position: relative; z-index: 3; max-width: 640px; color: #f5f1e9; }
.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  letter-spacing: 0.06em; line-height: 1.32;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
  margin-bottom: 1.2rem;
}
.hero__lead {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: 0.05em; line-height: 1.9;
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero__dots {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  bottom: clamp(3.5rem, 8vw, 6rem);
  display: flex; gap: 0.7rem;
}
.hero__dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(245,241,233,0.45); transition: background .3s var(--ease), transform .3s var(--ease);
}
.hero__dot.is-active { background: #f5f1e9; transform: scale(1.25); }

/* ---------- News / Works 2カラム ---------- */
.feature {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.5rem, 5vw, 3rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.block-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem;
}
.block-head--center { justify-content: center; margin-bottom: 1.2rem; }

/* Info（お知らせ） */
.news-list { border-top: 1px solid var(--line); }
.news-item {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline;
  gap: 1.2rem; padding: 1.2rem 0.2rem;
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.news-item__date { font-family: var(--serif-en); font-size: 0.95rem; letter-spacing: 0.06em; color: var(--ink-soft); white-space: nowrap; }
.news-item__title { font-size: 0.98rem; }
.news-item:hover { background: rgba(255,255,255,0.4); }
.news-empty { color: var(--ink-soft); padding: 1.2rem 0; }

/* Blog */
.blog-list { border-top: 1px solid var(--line); }
.blog-post { padding: 1.6rem 0.2rem; border-bottom: 1px solid var(--line); }
.blog-post__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 0.6rem; }
.blog-post__date { font-family: var(--serif-en); font-size: 0.9rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.blog-post__title { font-size: 1.15rem; font-weight: 600; }
.blog-post__body { margin: 0; color: var(--ink); line-height: 1.95; }

/* Works */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.filter {
  font-family: var(--serif-jp); font-size: 0.85rem; letter-spacing: 0.06em;
  padding: 0.4em 1.1em; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: all .3s var(--ease);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.8rem);
}
.work-card { cursor: pointer; }
.work-card__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; background: var(--paper-deep);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.work-card__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work-card:hover .work-card__frame img { transform: scale(1.05); }
.work-card__ph { width: 100%; height: 100%; }
.work-card__title { margin-top: 0.7rem; font-size: 1.02rem; letter-spacing: 0.03em; }
.work-card__meta { font-family: var(--serif-en); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.works-empty { grid-column: 1 / -1; color: var(--ink-soft); text-align: center; padding: 2rem 0; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- About（深緑） ---------- */
.about {
  position: relative;
  background: var(--green);
  color: #f0ece1;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.5rem, 5vw, 3rem);
  margin-top: clamp(2rem, 5vw, 4rem);
}
.about__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about__text p { color: rgba(240,236,225,0.86); margin: 1.4rem 0 2rem; max-width: 30em; }
.about__art { position: relative; min-height: 230px; }
.about__paint { position: absolute; inset: 0; width: 100%; height: 100%; }
.signature {
  position: absolute; right: 8%; bottom: 6%;
  font-family: var(--script); font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--accent); transform: rotate(-4deg);
}

/* ---------- Contact ---------- */
.contact {
  max-width: 560px; margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 2rem);
  text-align: center;
}
.contact .block-head--center { margin-bottom: 0.8rem; }
.contact__desc { color: var(--ink-soft); margin-bottom: 1.5rem; font-size: 0.95rem; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; text-align: left;
}
.contact-form input, .contact-form textarea { padding: 0.6em 0.85em; }
.contact-form .field { gap: 0.35rem; }
.contact-form .field label { font-size: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
/* グリッド内で入力欄がはみ出さないように */
.field input, .field textarea, .field select,
.content-field, .content-field input, .content-field textarea, .content-field select {
  width: 100%; max-width: 100%; min-width: 0;
}
.field label { font-size: 0.9rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font-family: var(--serif-jp); font-size: 1rem; color: var(--ink);
  padding: 0.8em 1em; border: 1px solid var(--line); border-radius: 2px;
  background: rgba(255,255,255,0.5); transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: #fff;
}
.contact-form .btn { justify-self: start; }
.form-note { min-height: 1.4em; color: var(--accent); font-size: 0.95rem; margin: 0.6rem 0 0; }
.form-note.is-error { color: #b23b2a; }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.8rem clamp(1.5rem, 5vw, 4rem);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto;
}
.site-footer .brand__name { color: var(--ink); }
.footer-nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); justify-content: center; flex-wrap: wrap; }
.footer-nav a { font-family: var(--serif-en); letter-spacing: 0.1em; font-size: 0.9rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 1.1rem; justify-content: flex-end; }
.footer-social a { color: var(--ink-soft); display: inline-flex; transition: color .3s var(--ease); }
.footer-social a:hover { color: var(--accent); }
.copyright {
  grid-column: 1 / -1; text-align: center; margin: 0;
  font-family: var(--serif-en); font-size: 0.82rem; letter-spacing: 0.08em; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}

/* ---------- プライバシー等の文章ページ ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(6rem, 12vw, 9rem) clamp(1.25rem, 5vw, 3rem) clamp(4rem, 8vw, 7rem); }
.legal__head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.legal__title { font-family: var(--script); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0.3rem 0 0.6rem; }
.legal__updated { font-family: var(--serif-en); font-style: italic; color: var(--ink-soft); margin: 0; }
.legal__section { margin-bottom: 2.4rem; }
.legal__section h2 { font-size: 1.2rem; letter-spacing: 0.04em; margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.legal__section p, .legal__section ul { color: var(--ink-soft); }
.legal__section ul { padding-left: 1.3em; margin: 0 0 1em; list-style: disc; }
.legal__section li { margin-bottom: 0.4em; }
.legal__section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal__back { text-align: center; margin-top: 3rem; }

/* ---------- ライトボックス ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(18, 22, 27, 0.94); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s var(--ease);
}
.lightbox[hidden] { display: none; } /* 閉じている間はレイアウトから外す（iOSの下端余白対策） */
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure { margin: 0; max-width: 880px; width: 100%; transform: scale(0.96); transition: transform .5s var(--ease); }
.lightbox.is-open .lightbox__figure { transform: scale(1); }
.lightbox__image { width: 100%; max-height: 76vh; object-fit: contain; background: var(--paper-deep); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7); }
.lightbox__image--ph { aspect-ratio: 4 / 3; }
.lightbox__caption { color: var(--paper); text-align: center; padding-top: 1.2rem; }
.lightbox__caption h3 { font-size: 1.4rem; letter-spacing: 0.04em; }
.lightbox__caption p { font-family: var(--serif-en); font-style: italic; opacity: 0.82; margin: 0.3rem 0 0; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: transparent; border: none; color: var(--paper);
  cursor: pointer; line-height: 1; opacity: 0.7; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: 1.4rem; right: 1.8rem; font-size: 2.6rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 0 1rem; }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.15); }
.lightbox__nav--prev { left: clamp(0.5rem, 3vw, 2rem); }
.lightbox__nav--next { right: clamp(0.5rem, 3vw, 2rem); }

/* =========================================================
   ダッシュボード
   ========================================================= */
.admin-body { background: var(--paper); }
.admin-wrap { max-width: 980px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 2rem) 5rem; }
.admin-header { display: flex; flex-direction: column; gap: 1.1rem; padding-bottom: 1.4rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.admin-topbar { display: flex; align-items: center; gap: 0.8rem; }
.admin-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.admin-body .admin-avatar { border-color: #4a4339; }
.admin-sitename { flex: 1; text-align: center; font-family: var(--serif-en); font-size: 1.2rem; letter-spacing: 0.08em; color: var(--ink); }
.admin-body .admin-sitename { color: #f3efe6; }
.admin-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.admin-bell { position: relative; flex-shrink: 0; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease); }
.admin-bell:hover { background: rgba(0,0,0,0.04); border-color: var(--accent); color: var(--accent); }
.admin-bell svg { width: 21px; height: 21px; }
.admin-body .admin-bell { border-color: #4a4339; color: #ece7dd; }
.admin-body .admin-bell:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); color: var(--accent); }
.bell-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e0352b; color: #fff; font-size: 0.68rem; font-family: var(--serif-en); font-weight: 600; display: flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 0 0 2px var(--paper); }
.bell-badge[hidden] { display: none; } /* 未読0のときは非表示（.bell-badgeのdisplay:flexがUA既定を上書きするため明示） */
.admin-body .bell-badge { box-shadow: 0 0 0 2px #3a352e; }
.admin-header h1 { font-family: var(--serif-en); font-size: 1.8rem; letter-spacing: 0.06em; }
.admin-header .muted { color: var(--ink-soft); font-size: 0.9rem; }
.admin-shortcuts-label { font-family: var(--serif-en); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.7rem; }
.btn--sm { font-size: 0.82rem; padding: 0.5em 1.1em; letter-spacing: 0.05em; }
.news-row__body { color: var(--ink-soft); font-size: 0.86rem; margin-top: 0.4rem; white-space: pre-wrap; max-height: 4.6em; overflow: hidden; }
.admin-body .news-row__body { color: #b3a999; }

.login-box { max-width: 380px; margin: 12vh auto 0; background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: 4px; padding: 2.4rem 2rem; text-align: center; }
.login-box h1 { font-family: var(--serif-en); font-size: 1.8rem; margin-bottom: 0.4rem; letter-spacing: 0.06em; }
.login-box p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.6rem; }
.login-box input { width: 100%; font-family: var(--serif-jp); font-size: 1rem; padding: 0.8em 1em; border: 1px solid var(--line); border-radius: 2px; background: #fff; margin-bottom: 1rem; }
.login-box input:focus { outline: none; border-color: var(--accent); }
.login-box .btn { width: 100%; }

.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.admin-tab { position: relative; font-family: var(--serif-jp); font-size: 0.95rem; letter-spacing: 0.06em; padding: 0.5em 1.3em; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; transition: all .3s var(--ease); }
.tab-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: #d6453a; color: #fff; border-radius: 999px;
  font-family: var(--serif-en); font-weight: 600; font-size: 0.72rem; line-height: 1;
  box-shadow: 0 0 0 2px #1e1b17;
}
.tab-badge[hidden] { display: none; }
.admin-tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.admin-panel { display: none; }
.admin-panel.is-active { display: block; }

.upload-form, .news-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; background: rgba(255,255,255,0.5); border: 1px solid var(--line); border-radius: 4px; padding: 1.8rem; margin-bottom: 2.5rem; }
.upload-form .field--full, .news-form .field--full { grid-column: 1 / -1; }
.upload-form h2, .news-form h2 { grid-column: 1 / -1; font-size: 1.2rem; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.admin-card { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #fff; }
.admin-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.admin-card__body { padding: 0.7rem 0.8rem; }
.admin-card__title { font-size: 0.98rem; }
.admin-card__meta { font-size: 0.8rem; color: var(--ink-soft); }
.admin-card__del { display: block; width: 100%; font-family: var(--serif-jp); font-size: 0.85rem; padding: 0.5em; border: none; border-top: 1px solid var(--line); background: transparent; color: #b23b2a; cursor: pointer; }
.admin-card__del:hover { background: rgba(178,59,42,0.08); }

.msg, .news-row { border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,0.55); padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.msg__head, .news-row__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.msg__name { font-size: 1.05rem; }
.msg__email { color: var(--accent); font-size: 0.9rem; }
.msg__date, .news-row__date { color: var(--ink-soft); font-size: 0.82rem; font-family: var(--serif-en); }
.msg__text { color: var(--ink-soft); white-space: pre-wrap; margin: 0.5rem 0 0.8rem; }
.msg__del, .news-row__del { font-family: var(--serif-jp); font-size: 0.82rem; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.3em 1em; color: var(--ink-soft); cursor: pointer; }
.msg__del:hover, .news-row__del:hover { border-color: #b23b2a; color: #b23b2a; }
.msg__head-right { display: flex; align-items: center; gap: 0.7rem; }
.msg__star { background: transparent; border: none; cursor: pointer; padding: 0; line-height: 1; font-size: 1.2rem; color: var(--ink-soft); transition: color .2s var(--ease), transform .2s var(--ease); }
.msg__star:hover { transform: scale(1.15); }
.msg__star.is-on { color: #e0a73c; }
.msg.is-important { border-left: 3px solid #e0a73c; }

.content-form { max-width: 720px; }
.content-group { border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,0.45); padding: 1.4rem 1.5rem; margin-bottom: 1.4rem; }
.content-group h3 { font-size: 1.05rem; letter-spacing: 0.04em; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.content-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.content-field:last-child { margin-bottom: 0; }
.content-field label { font-size: 0.9rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.content-field input, .content-field textarea { font-family: var(--serif-jp); font-size: 1rem; color: var(--ink); padding: 0.7em 0.9em; border: 1px solid var(--line); border-radius: 2px; background: #fff; width: 100%; resize: vertical; }
.content-field input:focus, .content-field textarea:focus { outline: none; border-color: var(--accent); }

.admin-note { min-height: 1.4em; color: var(--accent); font-size: 0.92rem; margin-top: 0.5rem; }
.admin-note.is-error { color: #b23b2a; }
.admin-empty { color: var(--ink-soft); text-align: center; padding: 2rem; }

/* Looker Studio 埋め込み */
.looker-frame { width: 100%; height: 80vh; min-height: 480px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.admin-body .looker-frame { border-color: #463f35; }

/* =========================================================
   ダッシュボード：ダークテーマ
   ・ログイン画面：少し暗く / ログイン後：さらに暗く
   ========================================================= */
.admin-body { background: #3a352e; color: #ece7dd; }
.admin-body.is-authed { background: #1e1b17; }
.admin-body .paper-grain { display: none; }

.admin-body .login-box { background: rgba(30,27,23,0.92); border-color: #4a4339; }
.admin-body .login-box h1 { color: #f3efe6; }
.admin-body .login-box p { color: #b3a999; }
.admin-body .login-box input { background: #2c2824; border-color: #4a4339; color: #ece7dd; }

.admin-body .admin-header { border-color: #463f35; }
.admin-body .admin-header h1 { color: #f3efe6; }
.admin-body .admin-header .muted { color: #b3a999; }

.admin-body .admin-tab { border-color: #4a4339; color: #c0b6a6; }
.admin-body .admin-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.admin-body .muted { color: #b3a999; }
.admin-body h2, .admin-body h3 { color: #f3efe6; }
.admin-body .upload-form, .admin-body .news-form, .admin-body .content-group { background: #2a2622; border-color: #463f35; }
.admin-body .content-group h3 { border-color: #463f35; }
.admin-body label, .admin-body .field label, .admin-body .content-field label { color: #b3a999; }
.admin-body input, .admin-body textarea, .admin-body select,
.admin-body .field input, .admin-body .field textarea, .admin-body .field select,
.admin-body .content-field input, .admin-body .content-field textarea {
  background: #332e29; border-color: #4a4339; color: #ece7dd;
}
.admin-body input:focus, .admin-body textarea:focus, .admin-body select:focus { border-color: var(--accent); background: #3a342e; }
.admin-body select option { color: #1f1b19; }

.admin-body .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.admin-body .btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.admin-body .admin-card { background: #2a2622; border-color: #463f35; }
.admin-body .admin-card__title { color: #ece7dd; }
.admin-body .admin-card__meta { color: #b3a999; }

.admin-body .msg, .admin-body .news-row { background: #2a2622; border-color: #463f35; }
.admin-body .msg__name { color: #ece7dd; }
.admin-body .msg__text { color: #c8bfb1; }
.admin-body .news-row > div { color: #ece7dd; }
.admin-body .news-row__date, .admin-body .msg__date { color: #b3a999; }
.admin-body .admin-empty { color: #b3a999; }
.admin-body .msg__del, .admin-body .news-row__del { border-color: #4a4339; color: #c0b6a6; }
.admin-body .msg__star { color: #8a8073; }
.admin-body .msg__star.is-on { color: #e6b34a; }
.admin-body .msg.is-important { border-left-color: #e6b34a; }

/* 作品カードの操作ボタン（編集 / 削除） */
.admin-card__actions { display: flex; border-top: 1px solid var(--line); }
.admin-body .admin-card__actions { border-color: #463f35; }
.admin-card__edit, .admin-card__del {
  flex: 1; width: auto; border: none; border-top: none;
  font-family: var(--serif-jp); font-size: 0.85rem; padding: 0.55em; cursor: pointer;
  background: transparent;
}
.admin-card__edit { color: var(--accent); border-right: 1px solid var(--line); }
.admin-body .admin-card__edit { border-color: #463f35; }
.admin-card__edit:hover { background: rgba(194,118,78,0.14); }

/* 編集モーダル */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(8,6,4,0.72); backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal__box {
  width: min(460px, 100%); background: #2a2622; border: 1px solid #463f35;
  border-radius: 6px; padding: 1.8rem; color: #ece7dd;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
.modal__box h2 { color: #f3efe6; margin-bottom: 1.2rem; font-size: 1.2rem; }
.modal__box .content-field { margin-bottom: 1rem; }
.modal__actions { display: flex; gap: 0.8rem; justify-content: flex-end; margin-top: 1.2rem; }
.btn--ghost { background: transparent; border: 1px solid #4a4339; color: #ece7dd; }
.admin-body .btn--ghost { background: transparent; color: #ece7dd; }
.admin-body .btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: #5a5346; }

/* ---------- 専用ページ（works / info / blog / artist / contact） ---------- */
body.subpage .site-header { background: rgba(243, 239, 230, 0.92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
body.subpage .brand__name, body.subpage .nav a { color: var(--ink); }
body.subpage .lang-switch { color: var(--ink); }
body.subpage .lang-switch select { border-color: var(--line); }
.page-wrap { padding-top: clamp(90px, 12vh, 130px); padding-bottom: clamp(2rem, 5vw, 4rem); min-height: 56vh; }
body.subpage .about { margin-top: clamp(1.5rem, 5vw, 4rem); }
.page-wrap > .feature { padding-top: clamp(1rem, 3vw, 2.5rem); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .about__inner { grid-template-columns: 1fr; }
  .about__art { min-height: 180px; order: -1; }
  .works-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(72vw, 320px);
    flex-direction: column; justify-content: center; gap: 1.8rem; padding: 2rem;
    background: var(--paper); box-shadow: -10px 0 40px -20px rgba(0,0,0,0.4);
    transform: translateX(100%); transition: transform .45s var(--ease);
  }
  .nav.is-open { transform: translateX(0); }
  .site-header.is-over-hero .nav a, .nav a { color: var(--ink); }
  .nav a { font-size: 1.25rem; }
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; width: 30px; background: transparent; border: none; cursor: pointer; z-index: 60; }
  .nav-toggle span { height: 2px; background: currentColor; color: #f5f1e9; transition: transform .35s var(--ease), opacity .35s var(--ease); }
  .site-header.is-scrolled .nav-toggle span { color: var(--ink); }
  .nav-toggle[aria-expanded="true"] span { color: var(--ink); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form { grid-template-columns: 1fr; }
  .upload-form, .news-form { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 560px) {
  /* ダッシュボードの作品一覧をスマホでは2列（各カードを画面の約半分）に */
  .admin-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .admin-card__title { font-size: 0.92rem; }
  .admin-card__meta { font-size: 0.74rem; }
  .admin-card__edit, .admin-card__del { font-size: 0.8rem; padding: 0.55em 0.2em; }

  /* ダッシュボードのトップ：横スクロールのショートカット（添付写真の構成） */
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 0.55rem; padding-bottom: 0.5rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: 0 0 auto; white-space: nowrap; }
  /* 「サイトを見る」「ログアウト」は隣同士で少し小さく */
  .admin-actions .btn { font-size: 0.68rem; padding: 0.42em 0.6em; letter-spacing: 0; }
  .admin-header h1 { font-size: 1.55rem; }
  /* ベルを足しても1行に収まるよう各要素をコンパクトに */
  .admin-topbar { gap: 0.45rem; }
  .admin-sitename { font-size: 0.95rem; white-space: nowrap; }
  .admin-avatar { width: 38px; height: 38px; }
  .admin-bell { width: 34px; height: 34px; }
  .admin-bell svg { width: 18px; height: 18px; }
  .bell-badge { min-width: 16px; height: 16px; font-size: 0.62rem; }
}

@media (max-width: 420px) {
  .works-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
