/* たてよみ堂 — 白×黒×ピンク、マンガ誌のコマ割り */
:root {
  --paper: #ffffff;
  --paper2: #f6f4f1;
  --ink: #111111;
  --ink2: #555555;
  --pink: #d8105a;
  --pink-hi: #ff2e74;
  --pink-soft: #ffe3ee;
  --line: 2.5px solid var(--ink);
  --f-logo: 'Potta One', 'BIZ UDPGothic', sans-serif;
  --f-ui: 'BIZ UDPGothic', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --f-talk: 'Zen Antique Soft', 'BIZ UDPGothic', serif;
  --f-ep: 'Bangers', 'BIZ UDPGothic', sans-serif;
  --pop: cubic-bezier(.3, 1.6, .5, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --tab-h: 64px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
  --dots: radial-gradient(circle, rgba(255, 46, 116, .22) 1.3px, transparent 1.6px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); font-size: 15px; line-height: 1.7;
  line-break: strict; overflow: hidden;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 24px; height: 24px; flex: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.kp { word-break: keep-all; }
@supports (word-break: auto-phrase) { .kp, .ph { word-break: auto-phrase; } }

/* ---- 本体 ---- */
.book {
  position: relative; width: 100%; max-width: 430px; height: 100vh; height: 100dvh;
  margin: 0 auto; overflow: hidden; overflow: clip; background: var(--paper);
}
@media (min-width: 600px) {
  body { background-color: #ffe3ee; background-image: var(--dots); background-size: 14px 14px; }
  .book { box-shadow: 0 0 0 3px var(--ink), 14px 14px 0 var(--ink); }
}
.pages { position: absolute; inset: 0; display: block; }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); }
.page.flip-in { animation: flipIn 380ms var(--ease) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); }
.page.flip-out { animation: flipOut 380ms var(--ease) both; z-index: 1; }
.page.flip-back-in { animation: flipBackIn 340ms var(--ease) both; z-index: 1; }
.page.flip-back-out { animation: flipBackOut 340ms var(--ease) both; z-index: 2; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); }
.page.tab-in { animation: tabIn 260ms var(--ease) both; z-index: 2; }
@keyframes flipIn { from { transform: translateX(100%); } }
@keyframes flipOut { to { transform: translateX(-25%); filter: brightness(.9); } }
@keyframes flipBackIn { from { transform: translateX(-25%); filter: brightness(.9); } }
@keyframes flipBackOut { to { transform: translateX(100%); } }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } }
.scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.page.has-tabs .scroll { padding-bottom: calc(var(--tab-h) + var(--sb) + 28px); }

/* 上のバー */
.top {
  flex: none; position: relative; z-index: 5;
  display: flex; align-items: center; gap: 4px;
  min-height: calc(56px + var(--st)); padding: var(--st) 8px 0;
  background: var(--paper); border-bottom: var(--line);
}
.top__t { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ib {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px;
  display: grid; place-items: center; background: transparent; color: var(--ink); text-decoration: none;
  transition: transform 140ms var(--ease), background-color 140ms;
}
.ib:active { transform: scale(.88); background: var(--pink-soft); }
.ib[aria-pressed="true"] { color: var(--pink); }

/* ロゴ */
.mast { display: flex; align-items: flex-end; gap: 10px; padding: calc(var(--st) + 16px) 18px 12px; border-bottom: var(--line); background: var(--paper); }
.logo { font-family: var(--f-logo); font-size: 30px; line-height: 1; letter-spacing: .02em; display: flex; align-items: center; gap: 2px; }
.logo b { font-weight: 400; display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: 2px; background: var(--pink-hi); color: var(--ink); border: var(--line); transform: rotate(-6deg); font-size: 26px; }
.mast__d { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink2); padding-bottom: 2px; }

/* 見出し */
.h2 { display: flex; align-items: center; gap: 10px; margin: 26px 16px 12px; font-family: var(--f-logo); font-size: 21px; font-weight: 400; line-height: 1.3; }
.h2::before { content: ""; width: 12px; height: 24px; background: var(--pink-hi); border: 2px solid var(--ink); transform: skewX(-12deg); }
.h2 small { margin-left: auto; font-family: var(--f-ui); font-size: 13px; font-weight: 700; color: var(--ink2); }

/* 今日のおすすめ */
.feature { position: relative; display: block; margin: 18px 16px 0; text-decoration: none; color: inherit; }
.feature__frame { position: relative; border: 3px solid var(--ink); background: var(--ink); transform: rotate(-1.2deg); box-shadow: 8px 8px 0 var(--pink-hi); overflow: hidden; transition: transform 200ms var(--ease); }
.feature:active .feature__frame { transform: rotate(0) scale(.98); }
.feature__frame img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: center 70%; }
.burst {
  position: absolute; z-index: 2; right: -6px; top: -14px; width: 92px; height: 92px;
  display: grid; place-items: center; text-align: center;
  background: var(--pink-hi); color: var(--ink); font-family: var(--f-logo); font-size: 14px; line-height: 1.15;
  clip-path: polygon(50% 0, 61% 18%, 82% 8%, 80% 30%, 100% 36%, 85% 52%, 98% 70%, 76% 72%, 74% 94%, 56% 82%, 40% 100%, 34% 78%, 12% 86%, 18% 64%, 0 52%, 16% 38%, 6% 16%, 28% 20%, 34% 0);
  transform: rotate(10deg); animation: wobble 2.6s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.05); } }
.feature__card { position: relative; z-index: 1; margin: -26px 14px 0 26px; padding: 12px 16px 14px; background: var(--paper); border: var(--line); transform: rotate(1deg); }
.feature__t { font-family: var(--f-logo); font-size: 24px; line-height: 1.35; font-weight: 400; }
.feature__m { margin-top: 2px; font-size: 13px; color: var(--ink2); font-weight: 700; }
.feature__c { margin-top: 4px; font-family: var(--f-talk); font-size: 15px; line-height: 1.5; }
.feature__go { margin-top: 10px; display: flex; gap: 8px; }

/* ボタン */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: var(--line); border-radius: 0;
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 20px; height: 20px; }
.btn--pink { background: var(--pink-hi); color: var(--ink); }
.btn--ink { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--pink-hi); }
.btn--wide { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { background: var(--paper2); color: #6a6a6a; box-shadow: none; border-color: #9a9a9a; }

/* 続きから */
.cont { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; scroll-padding-inline: 16px; scroll-snap-type: x proximity; }
.cont::-webkit-scrollbar { display: none; }
.contc { flex: none; width: 260px; display: flex; gap: 10px; padding: 10px; border: var(--line); text-decoration: none; color: inherit; background: var(--paper); scroll-snap-align: start; transition: transform 120ms var(--ease); }
.contc:active { transform: scale(.97); }
.contc img { width: 64px; height: 84px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.contc__b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contc__w { font-size: 12px; font-weight: 700; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contc__e { font-weight: 700; font-size: 14px; line-height: 1.5; }
.ep { font-family: var(--f-ep); font-weight: 400; letter-spacing: .04em; color: var(--pink); font-size: 16px; }
.bar { margin-top: auto; height: 8px; border: 2px solid var(--ink); background: var(--paper); }
.bar i { display: block; height: 100%; background: var(--pink-hi); }
.contc__p { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; color: var(--ink2); }

/* 作品カード */
.works { display: flex; flex-direction: column; gap: 16px; padding: 0 16px; }
.workc { display: flex; gap: 14px; padding: 12px; border: var(--line); text-decoration: none; color: inherit; background: var(--paper); position: relative; transition: transform 120ms var(--ease); }
.workc:nth-child(even) { flex-direction: row-reverse; }
.workc:active { transform: scale(.98); }
.workc img { width: 112px; height: 150px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.workc__b { flex: 1; min-width: 0; }
.workc__t { font-family: var(--f-logo); font-size: 19px; line-height: 1.35; font-weight: 400; }
.workc__a { font-size: 12px; font-weight: 700; color: var(--ink2); margin-top: 2px; }
.workc__s { margin-top: 6px; font-size: 13.5px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { padding: 0 8px; border: 1.5px solid var(--ink); font-size: 12px; font-weight: 700; line-height: 22px; background: var(--paper); }
.tag--pink { background: var(--pink-soft); }
.likes { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--pink); }
.likes svg { width: 16px; height: 16px; }

/* 連載予告（文字だけの表紙） */
.soon { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; scroll-padding-inline: 16px; }
.soon::-webkit-scrollbar { display: none; }
.soonc {
  flex: none; width: 150px; height: 208px; position: relative; overflow: hidden;
  padding: 14px 12px; border: var(--line); background-color: var(--ink); color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.soonc::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 46, 116, .55) 1.6px, transparent 2px); background-size: 9px 9px; -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%); mask-image: linear-gradient(160deg, #000, transparent 70%); }
.soonc > * { position: relative; }
.soonc__k { align-self: flex-start; margin-bottom: auto; padding: 0 8px; background: var(--pink-hi); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 22px; }
.soonc__t { font-family: var(--f-logo); font-size: 20px; line-height: 1.3; }
.soonc__d { margin-top: 4px; font-size: 12px; line-height: 1.5; color: #e9e9e9; }

/* ---- 話の一覧 ---- */
.cover { position: relative; border-bottom: var(--line); background: var(--ink); }
.cover img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 70%; }
.cover .ib { position: absolute; top: calc(var(--st) + 8px); background: var(--paper); border: var(--line); }
.cover .ib--l { left: 10px; }
.cover .ib--r { right: 10px; }
.wtitle { position: relative; margin: -34px 16px 0; padding: 14px 16px; background: var(--paper); border: var(--line); box-shadow: 6px 6px 0 var(--pink-hi); }
.wtitle h1 { font-family: var(--f-logo); font-size: 26px; font-weight: 400; line-height: 1.3; }
.wtitle p { font-size: 13px; color: var(--ink2); font-weight: 700; }
.synop { padding: 18px 18px 0; font-size: 14.5px; line-height: 1.85; word-break: normal; }
.wacts { display: flex; gap: 10px; padding: 16px 16px 0; }
.wacts .btn:first-child { flex: 1; }
.eplist { margin: 22px 16px 0; border-top: var(--line); }
.eprow { display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 10px 0; border-bottom: 2px solid var(--ink); text-decoration: none; color: inherit; transition: background-color 120ms; }
.eprow:active { background: var(--pink-soft); }
.eprow img { width: 88px; height: 62px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.eprow__b { flex: 1; min-width: 0; }
.eprow__t { font-weight: 700; font-size: 15px; line-height: 1.45; }
.eprow__m { font-size: 12px; color: var(--ink2); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.state { padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 20px; border: 1.5px solid var(--ink); white-space: nowrap; }
.state--new { background: var(--pink-hi); color: var(--ink); }
.state--mid { background: var(--ink); color: #fff; }
.state--read { background: var(--paper2); color: #4a4a4a; border-color: #8a8a8a; }
.eprow--lock { color: #4a4a4a; }
.lockimg { width: 88px; height: 62px; flex: none; border: 2px dashed #8a8a8a; display: grid; place-items: center; background: var(--paper2); color: #4a4a4a; }

/* ---- ビューア ---- */
.viewer { background: var(--vbg, #fff); }
.viewer .scroll { padding: 0; }
.vtop, .vbot {
  position: absolute; left: 0; right: 0; z-index: 10;
  background: var(--paper); transition: transform 260ms var(--ease);
}
.vtop { top: 0; display: flex; align-items: center; gap: 2px; padding: var(--st) 6px 0; min-height: calc(54px + var(--st)); border-bottom: var(--line); }
.vtop__t { flex: 1; min-width: 0; text-align: center; line-height: 1.3; }
.vtop__t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtop__t span { font-size: 12px; color: var(--ink2); font-weight: 700; white-space: nowrap; }
.prog { position: absolute; left: 0; right: 0; bottom: -5px; height: 3px; background: transparent; }
.prog i { display: block; height: 100%; width: 0; background: var(--pink-hi); }
.vbot { bottom: 0; display: flex; align-items: center; justify-content: space-around; padding: 6px 6px calc(6px + var(--sb)); border-top: var(--line); }
.vbot button, .vbot a { min-width: 64px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; background: transparent; font-size: 11px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 10px; }
.vbot button:active, .vbot a:active { background: var(--pink-soft); }
.vbot svg { width: 22px; height: 22px; }
.vbot [aria-pressed="true"] { color: var(--pink); }
.viewer.ui-off .vtop { transform: translateY(-110%); }
.viewer.ui-off .vbot { transform: translateY(110%); }
.dim { position: absolute; inset: 0; z-index: 6; background: #000; opacity: 0; pointer-events: none; transition: opacity 200ms; }
.strip { padding: calc(var(--st) + 70px) 0 0; }
.koma { position: relative; margin: 0 0 44px; opacity: 0; transform: translateY(26px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.koma.is-in { opacity: 1; transform: none; }
.koma img { width: 100%; height: auto; background: #eee; }
.koma--gap { margin-bottom: 90px; }
.viewer.is-dark .koma img { background: #222; }

/* コマの上の余白（吹き出しを置く） */
.koma__gut { display: flex; flex-direction: column; gap: 14px; padding: 0 14px 16px; }
.koma__gut .fk { position: relative; }
.fk--l { align-self: flex-start; }
.fk--c { align-self: center; }
.fk--r { align-self: flex-end; }
.koma__art { position: relative; }
.koma__art .fk { position: absolute; }
.viewer.is-dark .narr { box-shadow: 0 0 0 2px #fff, 5px 5px 0 var(--pink-hi); }
/* 吹き出し */
.fk { z-index: 2; transform: scale(.6); opacity: 0; transition: transform 420ms var(--pop), opacity 200ms; transition-delay: var(--d, 250ms); }
.koma.is-in .fk { transform: none; opacity: 1; }
.say {
  padding: 10px 14px; background: #fff; color: #111; border: 2.5px solid #111; border-radius: 50% / 46%;
  font-family: var(--f-talk); font-size: 15px; line-height: 1.5; text-align: center; word-break: keep-all;
}
@supports (word-break: auto-phrase) { .say, .narr, .think { word-break: auto-phrase; } }
.say::after {
  content: ""; position: absolute; width: 18px; height: 20px; background: #fff;
  border-right: 2.5px solid #111; border-bottom: 2.5px solid #111;
  bottom: -9px; left: var(--tx, 30%); transform: skewX(var(--sk, 30deg)) rotate(45deg);
}
.say--up::after { bottom: auto; top: -9px; transform: skewX(var(--sk, 30deg)) rotate(-135deg); }
.say--loud { border-radius: 4px; border-width: 3px; font-weight: 700; font-size: 16px; clip-path: none; box-shadow: 4px 4px 0 #111; }
.say--robot { border-radius: 10px; font-family: var(--f-ui); letter-spacing: .12em; font-weight: 700; background: #e9fbff; }
.say--robot::after { background: #e9fbff; }
.think { padding: 10px 14px; background: #fff; color: #111; border: 2.5px dashed #111; border-radius: 40%; font-family: var(--f-talk); font-size: 15px; text-align: center; }
.narr { padding: 8px 12px; background: #111; color: #fff; font-family: var(--f-talk); font-size: 14.5px; line-height: 1.6; box-shadow: 4px 4px 0 var(--pink-hi); }
.sfx {
  font-family: var(--f-logo); font-size: 34px; line-height: 1; color: var(--pink); letter-spacing: .04em;
  -webkit-text-stroke: 7px #fff; paint-order: stroke fill; transform-origin: center;
}
.koma.is-in .sfx { animation: sfx 600ms var(--pop) var(--d, 250ms) both; }
@keyframes sfx { from { transform: scale(.3) rotate(-14deg); opacity: 0; } to { transform: rotate(var(--r, -8deg)); opacity: 1; } }
.label { padding: 4px 12px; background: #fff; color: #111; border: 2px solid #111; font-family: var(--f-talk); font-size: 15px; transform: rotate(var(--r, -3deg)); }

/* 話の終わり */
.endcard { position: relative; margin: 0 16px; padding: 30px 16px 22px; text-align: center; border: 3px solid var(--ink); background-color: var(--paper); overflow: hidden; }
.endcard::before { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(17, 17, 17, .07) 0 3deg, transparent 3deg 9deg); pointer-events: none; }
.endcard > * { position: relative; }
.endcard .tsuzuku { margin-top: 0; color: var(--ink); font-family: var(--f-logo); font-size: 40px; line-height: 1.2; transform: rotate(-4deg); display: inline-block; padding: 2px 18px; background: var(--paper); border: var(--line); box-shadow: 6px 6px 0 var(--pink-hi); }
.endcard p { margin-top: 14px; font-size: 13.5px; color: var(--ink2); font-weight: 700; }
.likebig { margin: 16px auto 0; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; padding: 10px 16px; border: var(--line); background: var(--paper); font-weight: 700; font-size: 13px; box-shadow: 4px 4px 0 var(--ink); transition: transform 120ms var(--ease), box-shadow 120ms; }
.likebig:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.likebig svg { width: 34px; height: 34px; color: var(--ink); transition: transform 300ms var(--pop); }
.likebig[aria-pressed="true"] { background: var(--pink-soft); }
.likebig[aria-pressed="true"] svg { color: var(--pink); animation: heart 500ms var(--pop); }
@keyframes heart { 40% { transform: scale(1.4); } }
.nextbox { margin: 18px 16px 0; }
.lockbox { margin: 18px 16px 0; padding: 14px 16px; border: 2px dashed #6a6a6a; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 700; background: var(--paper2); }
.lockbox svg { color: var(--pink); }
.cmts { margin: 26px 16px 0; }
.cmt { padding: 12px 0; border-bottom: 2px solid #e3e3e3; display: flex; gap: 10px; }
.cmt__av { width: 36px; height: 36px; flex: none; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--av, #fff); }
.cmt__b { flex: 1; min-width: 0; }
.cmt__n { font-size: 12px; font-weight: 700; color: var(--ink2); }
.cmt__t { font-size: 14.5px; line-height: 1.7; word-break: normal; overflow-wrap: anywhere; }
.cmt__l { margin-left: auto; align-self: flex-start; display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; min-height: 44px; justify-content: center; border: 0; background: transparent; font-size: 12px; font-weight: 700; color: var(--ink2); }
.cmt__l svg { width: 20px; height: 20px; }
.cmt__l[aria-pressed="true"] { color: var(--pink); }
.cmt--mine .cmt__av { background: var(--pink-hi); }
.compose { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--sb)); background: var(--paper); border-top: var(--line); }
.compose textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 120px; padding: 12px; border: var(--line); border-radius: 0; resize: none; outline: none; font-size: 16px; line-height: 1.5; background: #fff; }
.compose textarea:focus { box-shadow: 4px 4px 0 var(--pink-hi); }
.cnt { font-size: 12px; font-weight: 700; color: var(--ink2); text-align: right; padding: 0 16px; }
.err { padding: 4px 16px 0; font-size: 13px; color: #b0003a; font-weight: 700; }

/* ---- 本棚 ---- */
.tabs { display: flex; margin: 14px 16px 0; border: var(--line); }
.tabs button { flex: 1; min-height: 46px; border: 0; background: var(--paper); font-weight: 700; font-size: 14px; position: relative; }
.tabs button + button { border-left: var(--line); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: var(--ink); transform: rotate(45deg); }
.shelf { padding: 22px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.mark { display: flex; gap: 12px; align-items: center; padding: 10px; border: var(--line); text-decoration: none; color: inherit; background: var(--paper); }
.mark img { width: 96px; height: 72px; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.mark__b { flex: 1; min-width: 0; }
.mark__t { font-weight: 700; font-size: 14px; line-height: 1.5; }
.mark__m { font-size: 12px; color: var(--ink2); font-weight: 700; }
.mark .ib { align-self: center; }
.empty { padding: 20px 28px 30px; text-align: center; }
.empty img { width: 210px; height: 210px; object-fit: cover; margin: 0 auto 14px; border: var(--line); box-shadow: 6px 6px 0 var(--pink-hi); }
.empty h2 { font-family: var(--f-logo); font-size: 20px; font-weight: 400; line-height: 1.4; }
.empty p { margin: 8px auto 16px; max-width: 290px; font-size: 14px; color: var(--ink2); word-break: normal; }

/* ---- 設定・アプリについて ---- */
.list { margin: 16px; border: var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px; border: 0; background: var(--paper); text-align: left; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 700; }
.row + .row { border-top: 2px solid var(--ink); }
.row__t { flex: 1; min-width: 0; }
.row__t small { display: block; font-size: 12.5px; color: var(--ink2); font-weight: 400; line-height: 1.5; }
.row--danger { color: #b0003a; }
.sw { position: relative; width: 56px; height: 32px; flex: none; border: var(--line); background: var(--paper); padding: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; background: var(--ink); transition: transform 200ms var(--pop); }
.sw[aria-checked="true"] { background: var(--pink-hi); }
.sw[aria-checked="true"]::after { transform: translateX(24px); }
.about { padding: 18px 16px 0; }
.about__h { display: flex; align-items: center; gap: 14px; }
.about__h img { width: 76px; height: 76px; border: var(--line); box-shadow: 4px 4px 0 var(--ink); }
.about__h b { display: block; font-family: var(--f-logo); font-size: 24px; font-weight: 400; }
.about__h span { font-size: 13px; color: var(--ink2); font-weight: 700; }
.box { margin-top: 16px; padding: 14px 16px; border: var(--line); font-size: 14px; line-height: 1.85; word-break: normal; }
.box h2 { font-size: 15px; margin-bottom: 4px; }
.box ul { margin: 0; padding-left: 1.2em; }
.box .btn { margin-top: 12px; }

/* ---- タブバー ---- */
.tabbar {
  position: absolute; z-index: 20; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--sb)); padding-bottom: var(--sb);
  display: flex; background: var(--paper); border-top: 3px solid var(--ink);
  transition: transform 260ms var(--ease);
}
.tabbar.is-away { transform: translateY(115%); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink); font-size: 11.5px; font-weight: 700; position: relative; }
.tabbar a + a { border-left: 2px solid var(--ink); }
.tabbar a.is-here { background: var(--pink-hi); }
.tabbar a.is-here svg { animation: tabPop 360ms var(--pop); }
@keyframes tabPop { 40% { transform: scale(1.25) rotate(-8deg); } }

/* ---- シート・トースト ---- */
.mask { position: absolute; inset: 0; z-index: 40; background: rgba(17, 17, 17, .55); animation: tabIn 200ms both; }
.sheet { position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 86%; display: flex; flex-direction: column; background: var(--paper); border-top: 3px solid var(--ink); padding-bottom: var(--sb); animation: up 300ms var(--ease) both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet__h { display: flex; align-items: center; gap: 8px; padding: 12px 8px 8px 18px; border-bottom: 2px solid var(--ink); }
.sheet__h h2 { flex: 1; font-family: var(--f-logo); font-size: 19px; font-weight: 400; }
.sheet__b { overflow-y: auto; padding: 14px 18px 20px; }
.sheet__lbl { margin: 12px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.range { width: 100%; height: 44px; accent-color: #d8105a; }
.seg { display: flex; border: var(--line); }
.seg button { flex: 1; min-height: 46px; border: 0; background: var(--paper); font-weight: 700; }
.seg button + button { border-left: var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.toast { position: absolute; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--sb) + 24px); padding: 12px 16px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--pink-hi); display: flex; align-items: center; gap: 10px; transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform 260ms var(--pop), opacity 160ms; }
.toast.is-on { transform: none; opacity: 1; pointer-events: auto; }
.toast span { flex: 1; }
.toast button { border: 0; background: transparent; color: #ff8fb5; font-weight: 700; min-height: 36px; }

/* 起動・はじめに */
.splash { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background-color: var(--paper); background-image: var(--dots); background-size: 12px 12px; }
.splash img { border: var(--line); box-shadow: 6px 6px 0 var(--ink); animation: slam 500ms var(--pop) both; }
.splash p { font-family: var(--f-logo); font-size: 28px; animation: slam 500ms 120ms var(--pop) both; background: var(--paper); padding: 0 10px; }
.splash.is-off { animation: tabIn 260ms reverse both; }
@keyframes slam { from { transform: scale(1.8) rotate(-10deg); opacity: 0; } }
.howto { position: absolute; inset: 0; z-index: 80; background: var(--paper); display: flex; flex-direction: column; }
.howto__pics { flex: 1; min-height: 0; position: relative; overflow: hidden; border-bottom: 3px solid var(--ink); background: var(--ink); }
.howto__pics img { position: absolute; width: 62%; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--pink-hi); transition: transform 500ms var(--ease); }
.howto__pics img:nth-child(1) { left: 6%; top: 8%; transform: rotate(-6deg); }
.howto__pics img:nth-child(2) { right: 6%; top: 22%; transform: rotate(5deg); }
.howto__body { flex: none; padding: 20px 22px calc(18px + var(--sb)); }
.howto__n { font-family: var(--f-ep); font-size: 18px; color: var(--pink); letter-spacing: .06em; }
.howto__t { font-family: var(--f-logo); font-size: 24px; font-weight: 400; line-height: 1.4; }
.howto__d { margin-top: 8px; font-size: 15px; line-height: 1.8; color: var(--ink2); min-height: 5.4em; }
.howto__btns { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; }
.howto.is-off { animation: tabIn 260ms reverse both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .koma, .fk { opacity: 1 !important; transform: none !important; }
}
