@charset "UTF-8";
/* 月刊ぴあん — 共通スタイル
   クラフト紙にマスキングテープで貼ったスクラップブック、という見立て。
   スマホ（375〜430px）を第一に組む。操作は親指の届く画面下部（ドック）に集約し、
   「よむ」はフルスクリーンビューア（横スワイプ＋ピンチ拡大）で行う。 */

:root{
  /* 紙 */
  --paper:#fffaf4;
  --card:#ffffff;
  --paper-warm:#f8f1e6;
  --line:#ece1d3;
  --ink:#4a453f;
  --ink-2:#867b70;
  --ink-3:#b3a89b;

  /* マステ7色（1色＝1つの意味に固定する） */
  --m-red:#e8857b;
  --m-orange:#f0a259;
  --m-yellow:#f4d06a;
  --m-green:#76c69f;
  --m-blue:#6bb2dd;
  --m-indigo:#8e84cf;
  --m-violet:#c78fc8;

  /* ページ種別ごとの色 */
  --c-cover:var(--m-violet);
  --c-schedule:var(--m-green);
  --c-subject:var(--m-blue);
  --c-meditation:var(--m-indigo);
  --c-main:var(--m-orange);
  --c-other:#d8ae3c;   /* 旧フォーマット（1枚に複数課題）の号 */

  --radius:16px;
  --dock-h:62px;
  --shadow-s:0 1px 2px rgba(120,105,90,.10), 0 3px 10px rgba(120,105,90,.07);
  --shadow-m:0 2px 4px rgba(120,105,90,.10), 0 10px 24px rgba(120,105,90,.10);

  --font-head:"Mochiy Pop One","Zen Maru Gothic","Hiragino Maru Gothic ProN",sans-serif;
  --font-body:"Zen Maru Gothic","Hiragino Maru Gothic ProN","BIZ UDPGothic",sans-serif;

  /* 紙の粒子感 */
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

/* 事業所ごとのテーマ色 */
body[data-brand="atelier"]{
  --brand:#ef8fae; --brand-d:#b8567a; --brand-soft:#ffe7ef;
  --brand-grad:linear-gradient(100deg,#ffd9e6,#ffe9d6);
}
body[data-brand="nijiiro"]{
  --brand:#9c8ddb; --brand-d:#65559f; --brand-soft:#eae5fb;
  --brand-grad:linear-gradient(100deg,#ffe1ec,#fff4d6,#e2f7ee,#dcefff,#e8e3fb);
}

*,*::before,*::after{box-sizing:border-box;}

html{
  scroll-behavior:smooth;
  scroll-padding-top:14px;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.85;
  letter-spacing:.02em;
  background:
    radial-gradient(circle at 8% 4%, #ffe9f1 0 14%, transparent 14%),
    radial-gradient(circle at 94% 9%, #def0ff 0 12%, transparent 12%),
    radial-gradient(circle at 90% 96%, #fff2d6 0 16%, transparent 16%),
    radial-gradient(circle at 4% 94%, #e2f7ee 0 14%, transparent 14%),
    var(--paper);
  background-attachment:fixed;
  overflow-x:hidden;
  /* 下部ドックのぶん、最後まで読めるよう余白を取る */
  padding-bottom:calc(var(--dock-h) + 26px + env(safe-area-inset-bottom,0px));
  /* 引っぱり更新と号切り替えスワイプの誤爆を防ぐ */
  overscroll-behavior-y:contain;
  -webkit-tap-highlight-color:transparent;
}
body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:var(--grain);
}

img{max-width:100%;}
a{color:var(--brand-d);}

:focus-visible{
  outline:3px solid var(--m-blue);
  outline-offset:2px;
  border-radius:6px;
}

.skip{
  position:absolute; left:-9999px; top:0;
  background:var(--card); padding:12px 18px; border-radius:0 0 12px 0;
  z-index:100; font-family:var(--font-head);
}
.skip:focus{left:0;}

.wrap{
  position:relative; z-index:1;
  width:100%; max-width:680px; margin:0 auto;
  padding:0 14px;
}

/* ══════════ 読みすすみバー（上端） ══════════ */
.progress{
  position:fixed; top:0; left:0; right:0; height:3px; z-index:70;
  background:linear-gradient(90deg,var(--brand),var(--m-yellow));
  transform-origin:0 0; transform:scaleX(0);
  pointer-events:none;
}

/* ══════════ ヘッダー ══════════ */
.site{padding:16px 0 0;}
.logo{
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin:0 0 12px;
  font-family:var(--font-head); font-size:19px; letter-spacing:.12em;
  color:var(--ink);
}
.logo .mark{
  display:inline-grid; place-items:center;
  width:34px; height:34px; border-radius:11px;
  background:var(--brand-grad);
  box-shadow:var(--shadow-s);
  font-size:17px; transform:rotate(-4deg);
}
.logo small{
  display:block; font-family:var(--font-body); font-size:10px;
  letter-spacing:.22em; color:var(--ink-3); line-height:1.2; margin-top:1px;
}

/* 事業所タブ */
.brands{display:flex; gap:8px; border-bottom:2px solid var(--line);}
.brands a{
  flex:1; min-height:56px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-decoration:none; text-align:center;
  font-family:var(--font-head); font-size:14.5px; letter-spacing:.02em;
  color:#a89d92; background:#f2ebe1;
  border:2px solid var(--line); border-bottom:none;
  border-radius:15px 15px 0 0;
  transition:background .2s ease-out, color .2s ease-out;
}
.brands a small{
  font-family:var(--font-body); font-size:9.5px; letter-spacing:.2em;
  margin-top:1px; opacity:.8;
}
.brands a[aria-current="page"]{
  color:var(--brand-d); background:var(--card);
  border-color:var(--brand);
  box-shadow:0 -3px 0 var(--brand) inset;
}
body[data-brand="nijiiro"] .brands a[aria-current="page"]{background:var(--brand-grad);}
.brands a:active{transform:translateY(1px);}

/* ══════════ 号の表紙まわり ══════════ */
.hero{padding:22px 0 6px; text-align:center;}
.hero-kicker{
  display:inline-block; margin:0 0 10px; padding:5px 16px;
  font-family:var(--font-head); font-size:12px; letter-spacing:.14em;
  color:#fff; background:var(--brand);
  border-radius:3px; transform:rotate(-1.4deg); opacity:.94;
  box-shadow:0 2px 5px rgba(120,105,90,.18);
}
.hero-title{
  margin:0; font-family:var(--font-head); font-weight:400;
  font-size:26px; letter-spacing:.06em; color:var(--ink);
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.hero-title .num{
  display:inline-grid; place-items:center;
  width:64px; height:64px; border-radius:50%;
  background:var(--m-yellow); color:#6b4f13;
  font-size:31px; line-height:1;
  box-shadow:0 4px 0 rgba(0,0,0,.06), 0 8px 18px rgba(190,160,80,.30);
  transform:rotate(-5deg);
}
.hero-title .num small{
  display:block; font-family:var(--font-body); font-size:11px; margin-top:2px;
}
.hero-catch{
  margin:14px 0 0; font-family:var(--font-head); font-weight:400;
  font-size:17px; line-height:1.65; color:var(--brand-d);
}
.hero-note{
  margin:16px auto 0; max-width:520px;
  display:flex; align-items:flex-start; gap:8px; text-align:left;
  padding:12px 16px; font-size:14px; line-height:1.7;
  color:#7d6234; background:#fdf4dd;
  border:2px dashed var(--m-yellow); border-radius:14px;
}
.hero-note .ico{flex:0 0 auto;}

/* 表紙画像（タップでビューア） */
.cover{margin:20px 0 0;}
.cover button{
  display:block; width:100%; padding:0; border:0; background:none; cursor:pointer;
  border-radius:18px;
}
.cover img{
  display:block; width:100%; height:auto; border-radius:18px;
  box-shadow:var(--shadow-m);
  transform:rotate(-1deg);
}
.cover button:active img{transform:rotate(-1deg) scale(.985);}

/* 「はじめから よむ」 */
.read-start{
  margin:18px auto 0;
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:min(100%,340px); min-height:56px; padding:0 22px;
  border:0; border-radius:999px; cursor:pointer;
  font-family:var(--font-head); font-size:16.5px; letter-spacing:.06em;
  color:#fff; background:linear-gradient(135deg,var(--brand),var(--brand-d));
  box-shadow:0 6px 0 rgba(0,0,0,.07), 0 10px 22px color-mix(in srgb, var(--brand-d) 40%, transparent);
  transition:transform .16s cubic-bezier(.2,.9,.3,1.4);
}
.read-start:active{transform:scale(.95);}

/* ══════════ セクション ══════════ */
.sec{margin:38px 0 0;}
.sec-head{
  display:flex; align-items:center; gap:12px; margin:0 0 14px;
  scroll-margin-top:16px;
}
.sec-head .ico{
  flex:0 0 auto; display:grid; place-items:center;
  width:46px; height:46px; border-radius:14px;
  font-size:21px; color:#fff;
  box-shadow:0 4px 10px rgba(120,105,90,.22);
  transform:rotate(-3deg);
}
.sec-head .txt{min-width:0;}
.sec-head h2{
  margin:0; font-family:var(--font-head); font-weight:400;
  font-size:18px; letter-spacing:.06em; line-height:1.35; color:var(--ink);
}
.sec-head .cnt{
  display:block; font-size:11.5px; color:var(--ink-3); letter-spacing:.06em;
}
.sec-head::after{
  content:""; flex:1 1 auto; height:8px; border-radius:2px; opacity:.5;
  background:repeating-linear-gradient(115deg,
    currentColor 0 7px, transparent 7px 14px);
}
.sec[data-sec="schedule"] .sec-head{color:var(--c-schedule);}
.sec[data-sec="subject"] .sec-head{color:var(--c-subject);}
.sec[data-sec="meditation"] .sec-head{color:var(--c-meditation);}
.sec[data-sec="main"] .sec-head{color:var(--c-main);}
.sec[data-sec="other"] .sec-head{color:var(--c-other);}
.sec[data-sec="other"] .sec-head .ico{background:var(--c-other);}
.sec[data-sec="schedule"] .sec-head .ico{background:var(--c-schedule);}
.sec[data-sec="subject"] .sec-head .ico{background:var(--c-subject);}
.sec[data-sec="meditation"] .sec-head .ico{background:var(--c-meditation);}
.sec[data-sec="main"] .sec-head .ico{background:var(--c-main);}

/* ══════════ 1ページ ══════════ */
.page{margin:0 0 26px;}
.page-cap{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  margin:0 0 9px; padding-left:2px;
}
.page-cap .wk{
  display:inline-block; padding:3px 11px; border-radius:3px;
  font-size:11.5px; letter-spacing:.04em; color:#fff;
  transform:rotate(-1deg); opacity:.92;
}
.sec[data-sec="schedule"] .wk{background:var(--c-schedule);}
.sec[data-sec="subject"] .wk{background:var(--c-subject);}
.sec[data-sec="meditation"] .wk{background:var(--c-meditation);}
.sec[data-sec="main"] .wk{background:var(--c-main);}
.sec[data-sec="other"] .wk{background:var(--c-other);}
.page-cap .ttl{
  font-family:var(--font-head); font-size:15.5px; color:var(--ink);
  line-height:1.4;
}
.page-cap .page-hint{
  margin-left:auto; font-size:11px; color:var(--ink-3); letter-spacing:.04em;
  white-space:nowrap;
}

.page-view{
  display:block; width:100%; padding:0; border:0; background:none; cursor:pointer;
  border-radius:var(--radius); position:relative;
  font:inherit; color:inherit; text-align:inherit;
}
.page-view img{
  display:block; width:100%; height:auto; border-radius:var(--radius);
  background:
    linear-gradient(110deg, #fff 40%, #f6efe6 50%, #fff 60%) no-repeat,
    var(--card);
  background-size:220% 100%;
  animation:shimmer 1.6s linear infinite;
  box-shadow:var(--shadow-m);
}
@keyframes shimmer{from{background-position:130% 0;}to{background-position:-90% 0;}}
.page-view img[data-loaded]{animation:none; background:var(--card);}
.page-view:active img{transform:scale(.99);}
/* 下が余白のページは上だけ見せて縦を詰める（余白だけのページに限る。ビューアでは全体が出る） */
.page-view.is-crop{overflow:hidden;}
.page-view.is-crop img{
  aspect-ratio:var(--ar);
  height:auto; object-fit:cover; object-position:top center;
}

/* ══════════ バックナンバー ══════════ */
.archive{
  margin:52px 0 0; padding:24px 18px 26px;
  background:var(--card); background-image:var(--grain);
  border:2px solid var(--line); border-radius:22px;
  box-shadow:var(--shadow-s);
  scroll-margin-top:16px;
}
.archive-head{
  display:flex; align-items:center; gap:10px; margin:0 0 4px;
}
.archive-head h2{
  margin:0; font-family:var(--font-head); font-weight:400;
  font-size:18px; letter-spacing:.06em;
}
.archive-head .ico{
  display:grid; place-items:center; width:42px; height:42px;
  border-radius:13px; font-size:20px;
  background:var(--paper-warm); transform:rotate(-4deg);
}
.archive-lead{
  margin:0 0 18px; padding-left:52px;
  font-size:12.5px; color:var(--ink-3); line-height:1.6;
}
.arch-list,.sheet-grid{display:grid; gap:12px;}

/* 年の区切り（号が増えても探しやすいように） */
.arch-year{
  display:flex; align-items:center; gap:10px;
  margin:10px 0 0; padding:0 2px;
  font-size:12px; color:var(--ink-3); letter-spacing:.08em;
}
.arch-year:first-child{margin-top:0;}
.arch-year b{
  font-family:var(--font-head); font-weight:400; font-size:14px; color:var(--ink-2);
}
.arch-year span{
  padding:1px 9px; border-radius:999px; font-size:11px;
  background:var(--paper-warm); color:var(--ink-2);
}
.arch-year::after{
  content:""; flex:1 1 auto; height:2px; border-radius:2px;
  background:repeating-linear-gradient(90deg,var(--line) 0 5px,transparent 5px 11px);
}

.arch-card{
  display:flex; gap:14px; align-items:stretch;
  padding:12px; text-align:left; width:100%; text-decoration:none;
  background:var(--paper); border:2px solid var(--line);
  border-radius:16px; cursor:pointer;
  font:inherit; color:inherit;
  box-shadow:var(--shadow-s);
  transition:transform .2s ease-out, border-color .2s ease-out, box-shadow .2s ease-out;
}
.arch-card:hover{transform:translateY(-2px); box-shadow:var(--shadow-m);}
.arch-card:active{transform:scale(.985);}
.arch-card[aria-current="true"]{
  border-color:var(--brand); background:var(--brand-soft);
}
.arch-thumb{
  flex:0 0 76px; position:relative;
}
.arch-thumb img{
  display:block; width:76px; height:76px; object-fit:cover; object-position:top center;
  border-radius:10px; background:#fff;
  box-shadow:0 2px 6px rgba(120,105,90,.18);
  transform:rotate(-2deg);
}
/* 小さな見本だけでは月が判別しにくいので、マステ風のラベルを貼る */
.arch-m{
  position:absolute; left:-5px; bottom:-2px;
  padding:1px 8px; border-radius:3px;
  font-family:var(--font-head); font-size:11px; line-height:1.6; color:#fff;
  background:var(--brand); transform:rotate(-4deg);
  box-shadow:0 1px 3px rgba(90,75,60,.28);
}
.arch-body{flex:1 1 auto; min-width:0;}
.arch-title{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-family:var(--font-head); font-size:16px; line-height:1.4; color:var(--ink);
}
.arch-now{
  padding:2px 9px; border-radius:3px; font-size:10.5px; letter-spacing:.06em;
  color:#fff; background:var(--brand); transform:rotate(-1.5deg);
  font-family:var(--font-body);
}
.arch-items{
  margin:5px 0 0; font-size:12.5px; line-height:1.75; color:var(--ink-2);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.arch-go{
  margin:4px 0 0; font-size:11.5px; color:var(--brand-d); letter-spacing:.04em;
}

/* ══════════ 便利ボタン ══════════ */
.tools{
  display:flex; gap:10px; flex-wrap:wrap; justify-content:center;
  margin:30px 0 0;
}
.tools button,
.tools .tool-link{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:46px; padding:0 20px; cursor:pointer;
  font-family:var(--font-head); font-size:13.5px; color:var(--ink-2);
  text-decoration:none;
  background:var(--card); border:2px dashed var(--line); border-radius:999px;
  transition:border-color .2s ease-out, color .2s ease-out;
}
.tools button:hover,
.tools .tool-link:hover{border-color:var(--brand); color:var(--brand-d);}

/* 開発日誌（この ページの あゆみ）への入口。
   赤い点は「前に見たときより新しい記事があります」の印で、
   diary.js の latest と localStorage を見て assets/pian.js が付けます。 */
.tools .tool-link{position:relative;}
.tools .tool-link .dot{
  position:absolute; top:-4px; right:-4px;
  width:13px; height:13px; border-radius:50%;
  background:var(--m-red); border:2px solid var(--paper);
}

.totop{
  position:fixed; right:12px;
  bottom:calc(var(--dock-h) + 14px + env(safe-area-inset-bottom,0px));
  z-index:40;
  min-width:48px; min-height:48px; padding:0 12px; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-head); font-size:12px; color:var(--brand-d);
  background:rgba(255,255,255,.95); border:2px solid var(--brand);
  border-radius:999px; box-shadow:0 4px 14px rgba(120,105,90,.22);
  opacity:0; transform:translateY(10px); pointer-events:none;
  transition:opacity .25s ease-out, transform .25s ease-out;
}
.totop.on{opacity:1; transform:none; pointer-events:auto;}

/* ══════════ フッター ══════════ */
.foot{
  /* 左右は auto。0 にすると .wrap の中央寄せを打ち消してしまい、
     680px より広い画面（パソコン）でフッターだけ左に寄る */
  margin:44px auto 0; padding:0 0 16px; text-align:center;
  font-size:12px; color:var(--ink-3); line-height:1.9;
}
.rainbow{
  height:11px; max-width:210px; margin:0 auto 14px; border-radius:999px;
  background:linear-gradient(90deg,
    var(--m-red),var(--m-orange),var(--m-yellow),
    var(--m-green),var(--m-blue),var(--m-indigo),var(--m-violet));
  opacity:.85;
}

/* ══════════ ドック（画面下の操作バー） ══════════ */
.dock{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  display:flex; align-items:center; gap:8px;
  min-height:var(--dock-h);
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));
  background:rgba(255,250,244,.92);
  -webkit-backdrop-filter:blur(14px) saturate(1.3);
  backdrop-filter:blur(14px) saturate(1.3);
  border-top:2px solid var(--line);
  box-shadow:0 -6px 20px rgba(150,135,115,.12);
}
.dock-issue{
  flex:0 0 auto; min-height:46px; padding:0 14px; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-head); font-size:14px; color:#fff;
  background:linear-gradient(135deg,var(--brand),var(--brand-d));
  border:0; border-radius:14px;
  box-shadow:0 3px 0 rgba(0,0,0,.08);
  transition:transform .15s cubic-bezier(.2,.9,.3,1.4);
}
.dock-issue:active{transform:scale(.94);}
.dock-issue .dk-c{font-size:10px; opacity:.9;}
.dock-tabs{
  flex:1 1 auto; display:flex; gap:6px;
  overflow-x:auto; overscroll-behavior-x:contain;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
  padding:2px;
}
.dock-tabs::-webkit-scrollbar{display:none;}
.dock-tab{
  flex:0 0 auto; min-height:44px; padding:0 13px; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-head); font-size:12.5px; color:var(--ink-2);
  background:var(--card); border:2px solid var(--line); border-radius:999px;
  transition:background .2s ease-out, border-color .2s ease-out,
             color .2s ease-out, transform .15s cubic-bezier(.2,.9,.3,1.4);
}
.dock-tab:active{transform:scale(.93);}
.dock-tab .ic{font-size:14px;}
.dock-tab[aria-current="true"]{color:#5a4a35; font-weight:700;}
.dock-tab[data-sec="schedule"][aria-current="true"]{background:#e3f5ec; border-color:var(--c-schedule);}
.dock-tab[data-sec="subject"][aria-current="true"]{background:#e3f0fa; border-color:var(--c-subject);}
.dock-tab[data-sec="meditation"][aria-current="true"]{background:#eceafa; border-color:var(--c-meditation);}
.dock-tab[data-sec="main"][aria-current="true"]{background:#fdeeda; border-color:var(--c-main);}
.dock-tab[data-sec="other"][aria-current="true"]{background:#fbf1d6; border-color:var(--c-other);}

/* ══════════ 号えらびシート（下からせり上がる） ══════════ */
.sheet{
  border:0; padding:0; margin:auto auto 0;
  width:100%; max-width:680px;
  max-height:min(78dvh, 640px);
  background:var(--paper);
  border-radius:24px 24px 0 0;
  box-shadow:0 -12px 40px rgba(80,65,55,.28);
  translate:0 100%;
  transition:translate .34s cubic-bezier(.2,.9,.3,1), opacity .3s ease-out,
             display .34s allow-discrete, overlay .34s allow-discrete;
  opacity:.5;
}
.sheet[open]{translate:0 0; opacity:1;}
@starting-style{
  .sheet[open]{translate:0 100%; opacity:.5;}
}
.sheet::backdrop{
  background:rgba(60,50,45,.36);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
}
.sheet-body{
  padding:10px 16px calc(18px + env(safe-area-inset-bottom,0px));
  overflow-y:auto; max-height:inherit;
  overscroll-behavior:contain;
}
.sheet-grip{
  width:44px; height:5px; margin:2px auto 12px; border-radius:999px;
  background:var(--ink-3); opacity:.55;
}
.sheet h2{
  margin:0 0 2px; text-align:center;
  font-family:var(--font-head); font-weight:400; font-size:17px;
  letter-spacing:.08em; color:var(--ink);
}
.sheet-lead{
  margin:0 0 14px; text-align:center;
  font-size:12px; color:var(--ink-3);
}

/* ══════════ ページビューア（フルスクリーン） ══════════ */
.viewer{
  border:0; padding:0; margin:0;
  width:100vw; height:100dvh; max-width:none; max-height:none;
  background:#221e1b; color:#fff;
  overflow:hidden;
  opacity:1;
  transition:opacity .26s ease-out, display .26s allow-discrete, overlay .26s allow-discrete;
}
.viewer[open]{display:flex; flex-direction:column;}
@starting-style{
  .viewer[open]{opacity:0;}
}
.viewer:not([open]){opacity:0;}
.viewer::backdrop{background:#221e1b;}

.v-top{
  position:absolute; top:0; left:0; right:0; z-index:5;
  display:flex; align-items:center; gap:10px;
  padding:calc(8px + env(safe-area-inset-top,0px)) 10px 14px 16px;
  background:linear-gradient(rgba(20,17,15,.72), rgba(20,17,15,0));
  transition:opacity .25s ease-out, transform .25s ease-out;
}
.v-title{
  flex:1 1 auto; min-width:0;
  font-family:var(--font-head); font-size:13.5px; line-height:1.4;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-shadow:0 1px 3px rgba(0,0,0,.5);
}
.v-title .v-issue{opacity:.75; font-size:11px; display:block; font-family:var(--font-body); letter-spacing:.08em;}
.v-close{
  flex:0 0 auto; min-width:48px; min-height:44px; padding:0 14px; cursor:pointer;
  font-family:var(--font-head); font-size:13px; color:#fff;
  background:rgba(255,255,255,.16); border:0; border-radius:999px;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
}
.v-close:active{background:rgba(255,255,255,.3);}

.v-stage{
  position:absolute; inset:0;
  touch-action:none;
  overflow:hidden;
  cursor:grab;
}
.v-track{
  position:absolute; inset:0;
  display:flex; height:100%;
  will-change:transform;
}
.v-cell{
  flex:0 0 100%; position:relative; overflow:hidden; height:100%;
}
.v-cell img{
  position:absolute; left:0; top:0;
  transform-origin:0 0;
  will-change:transform;
  user-select:none; -webkit-user-select:none; -webkit-user-drag:none;
  border-radius:6px;
  background:#fff;
  box-shadow:0 8px 30px rgba(0,0,0,.45);
}

.v-bottom{
  position:absolute; left:0; right:0; bottom:0; z-index:5;
  display:flex; align-items:center; justify-content:center; gap:12px;
  padding:16px 12px calc(10px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(rgba(20,17,15,0), rgba(20,17,15,.72));
  transition:opacity .25s ease-out, transform .25s ease-out;
}
.v-nav{
  min-width:52px; min-height:48px; cursor:pointer;
  font-size:17px; color:#fff;
  background:rgba(255,255,255,.16); border:0; border-radius:999px;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
}
.v-nav:active{background:rgba(255,255,255,.3);}
.v-nav[disabled]{opacity:.3;}
.v-pos{
  min-width:0; max-width:56vw; text-align:center;
  font-family:var(--font-head); font-size:13px; line-height:1.45;
}
.v-pos .v-pn{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; opacity:.85; font-family:var(--font-body); letter-spacing:.1em;
}
.v-pos .v-dot{width:9px; height:9px; border-radius:3px; display:inline-block; transform:rotate(8deg);}
.v-pos .v-pt{
  display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* 没入モード（単タップでバーを隠す） */
.viewer.ui-hide .v-top{opacity:0; transform:translateY(-12px); pointer-events:none;}
.viewer.ui-hide .v-bottom{opacity:0; transform:translateY(12px); pointer-events:none;}

.v-hint{
  position:absolute; left:50%; bottom:calc(96px + env(safe-area-inset-bottom,0px));
  translate:-50% 0; z-index:6;
  padding:11px 18px; border-radius:999px;
  font-family:var(--font-head); font-size:12.5px; white-space:nowrap;
  color:#fff; background:rgba(30,25,22,.85);
  box-shadow:0 6px 18px rgba(0,0,0,.4);
  opacity:0; pointer-events:none;
  transition:opacity .4s ease-out;
}
.v-hint.show{opacity:1;}

/* ══════════ 号の切り替え時のあらわれ方 ══════════ */
.issue{animation:rise .38s ease-out both;}
.issue .sec{animation:rise .42s ease-out both;}
.issue .sec:nth-of-type(1){animation-delay:.04s;}
.issue .sec:nth-of-type(2){animation-delay:.08s;}
.issue .sec:nth-of-type(3){animation-delay:.12s;}
.issue .sec:nth-of-type(4){animation-delay:.16s;}
@keyframes rise{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:none;}
}
/* View Transitions（対応ブラウザのみ）：ふわっと切り替え */
::view-transition-old(root){animation:vt-out .2s ease-in both;}
::view-transition-new(root){animation:vt-in .3s ease-out both;}
@keyframes vt-out{to{opacity:0; transform:translateY(-8px);}}
@keyframes vt-in{from{opacity:0; transform:translateY(10px);}}

/* ══════════ 配慮 ══════════ */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .cover img,.hero-kicker,.hero-title .num,.sec-head .ico,
  .arch-thumb img,.page-cap .wk,.logo .mark,.arch-m{transform:none;}
}
@media (prefers-contrast:more){
  :root{--ink:#241f1b; --ink-2:#4d453d; --ink-3:#6a6158; --line:#c9bcab;}
}

/* ══════════ 印刷 ══════════ */
@media print{
  body{background:#fff; padding-bottom:0;}
  body::before,.site,.progress,.dock,.sheet,.viewer,.read-start,
  .archive,.tools,.totop,.skip,.page-hint{display:none !important;}
  .wrap{max-width:none; padding:0;}
  .issue,.issue .sec{animation:none;}
  .page{margin:0 0 10mm; break-inside:avoid;}
  .page-view.is-crop{overflow:visible;}
  .page-view.is-crop img{aspect-ratio:auto; object-fit:fill;} /* 紙では省略せず全体を出す */
  .page-view img{box-shadow:none; border-radius:0; transform:none; animation:none;}
  .cover img{box-shadow:none; transform:none;}
  .sec-head .ico{box-shadow:none;}
}
