/* piccTips（/tips）の一覧と記事。
   生成りの地・黒の細い線・点線の区切り・字間を広げた見出し。色は白黒と生成りだけ（甘い色・ポップな色は使わない）。
   トップ（LP）には読み込まないので、トップの見た目は変わらない */
body.tp { --tp-bg: #F7F6F3; --tp-card: #EFEDE8; --tp-ink: #111111; --tp-gray: #77767A; background: var(--tp-bg); }
body.tp .hd { background: transparent; border-bottom-color: var(--tp-ink); }

/* 色のグラデーションと粒子（グレイン）の背景。画面に固定して、文字の後ろに敷く（2026-11-30 本人の指示）
   ::before＝ぼかした色、::after＝粒子（同じ形で切り抜いて、色のところだけざらつかせる） */
body.tp::before, body.tp::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body.tp::before {
  background:
    radial-gradient(38vmax 34vmax at 96% 6%, rgba(118, 224, 196, .75), rgba(118, 224, 196, 0) 70%),
    radial-gradient(30vmax 30vmax at 104% 34%, rgba(96, 164, 255, .6), rgba(96, 164, 255, 0) 70%),
    radial-gradient(28vmax 24vmax at 78% -4%, rgba(214, 246, 120, .55), rgba(214, 246, 120, 0) 70%),
    radial-gradient(30vmax 26vmax at -6% 104%, rgba(140, 214, 238, .45), rgba(140, 214, 238, 0) 70%);
  filter: blur(24px);
}
body.tp::after {
  background: url(/assets/tips-grain.svg) repeat;
  opacity: .55;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(42vmax 38vmax at 96% 6%, #000 30%, transparent 72%), radial-gradient(32vmax 30vmax at 104% 34%, #000 25%, transparent 72%), radial-gradient(32vmax 28vmax at -6% 104%, #000 25%, transparent 72%);
          mask-image: radial-gradient(42vmax 38vmax at 96% 6%, #000 30%, transparent 72%), radial-gradient(32vmax 30vmax at 104% 34%, #000 25%, transparent 72%), radial-gradient(32vmax 28vmax at -6% 104%, #000 25%, transparent 72%);
}
body.tp .ft { background: transparent; }
.tp-emo { font-style: normal; margin-right: .5em; letter-spacing: 0; font-weight: 400; }
.tp-crumb a[aria-label="TOP"] .tp-emo { margin-right: 0; }
body.tp .wrap { max-width: none; padding: 0; }
body.tp .ft { border-top-color: var(--tp-ink); }
.tp-page { letter-spacing: .06em; }
.tp-page a { text-underline-offset: 4px; }

/* 頭：英字の大見出しと、右に説明 */
.tp-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; padding: clamp(40px, 7vw, 88px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 48px); }
.tp-hero-h { display: grid; gap: 14px; }
.tp-en { display: block; width: clamp(220px, 38vw, 460px); height: auto; }
.tp-hero-s { font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.tp-hero-l { font-size: 14px; line-height: 2.1; letter-spacing: .1em; max-width: 520px; justify-self: end; }

/* 現在地：右寄せ、上下に線 */
.tp-crumb { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 14px; padding: 12px clamp(20px, 4vw, 56px); border-top: 1px solid var(--tp-ink); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.tp-crumb a { text-decoration: none; }
.tp-crumb a:hover { text-decoration: underline; }
.tp-crumb-top { border-top: 0; border-bottom: 1px solid var(--tp-ink); }

/* 流れるタグの帯 */
.tp-band { overflow: hidden; border-top: 1px solid var(--tp-ink); border-bottom: 1px solid var(--tp-ink); }
.tp-band-move { display: flex; width: max-content; animation: tp-flow 60s linear infinite; }
.tp-band:hover .tp-band-move { animation-play-state: paused; }
.tp-band-in { display: flex; flex-shrink: 0; gap: 14px; padding: 14px 7px; }
.tp-band a { display: block; padding: .34em 1em .38em; border: 2px solid var(--tp-ink); border-radius: 999px; background: #fff; font-size: clamp(15px, 1.7vw, 20px); font-weight: 700; white-space: nowrap; letter-spacing: .04em; line-height: 1.3; text-decoration: none; transition: background .15s, color .15s; }
.tp-band a:hover, .tp-band a:focus-visible { background: var(--tp-ink); color: #fff; }
.tp-band-still .tp-band-in { flex-wrap: wrap; gap: 8px; padding: 14px clamp(20px, 4vw, 56px); }
.tp-band-still a { font-size: 13px; border-width: 1.5px; }
@keyframes tp-flow { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tp-band-move { animation: none; } }

/* 左に区分、右に一覧 */
.tp-cols { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.tp-side { border-right: 1px solid var(--tp-ink); background: #fff; }
.tp-side-h { font-size: 15px; font-weight: 700; letter-spacing: .14em; padding: 28px 32px; border-bottom: 1px dotted var(--tp-ink); }
.tp-side-l { list-style: none; margin: 0; padding: 28px 32px; display: grid; gap: 14px; font-size: 13px; font-weight: 700; }
.tp-side-l a { text-decoration: none; }
.tp-side-l a::before { content: "-"; margin-right: 10px; }
.tp-side-l a:hover, .tp-side-l a[aria-current] { text-decoration: underline; }
.tp-side-news { padding-bottom: 14px; border-bottom: 1px dotted var(--tp-ink); }   /* piccNews：ALL と並べ、区分とは線で分ける */
.tp-main { padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 72px) 96px; }
.tp-hash { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: .08em; line-height: 1.2; margin-bottom: 36px; }
.tp-hash-2 { margin-top: 72px; padding-top: 56px; border-top: 1px dotted var(--tp-ink); }   /* トップの2段目（#piccNews） */
.tp-empty { font-size: 14px; color: var(--tp-gray); }

/* カード：角丸の枠、上に表紙、下に区分・日付・題名・書いた人・タグ */
.tp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px 36px; }
.tp-card a { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--tp-ink); border-radius: 12px; overflow: hidden; text-decoration: none; background: var(--tp-card); transition: transform .2s; }
.tp-card a:hover { transform: translateY(-3px); }
.tp-card a:hover .tp-card-t { text-decoration: underline; }
.tp-card-b { display: grid; gap: 12px; padding: 20px 22px 22px; flex: 1; align-content: start; }
.tp-meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; font-size: 11px; letter-spacing: .1em; color: var(--tp-gray); }
.tp-dot { color: var(--tp-ink); font-weight: 700; }
.tp-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tp-ink); margin-right: 8px; vertical-align: 2px; }
.tp-card-t { font-size: 17px; line-height: 1.85; letter-spacing: .1em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card-au { font-size: 11px; font-weight: 700; }
.tp-card-au em { font-style: normal; margin-left: 10px; padding: 1px 8px; border: 1px solid var(--tp-ink); border-radius: 999px; }
.tp-card-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.tp-card-tags span { padding: .2em .8em .25em; border: 1.5px solid var(--tp-ink); border-radius: 999px; background: #fff; font-weight: 700; letter-spacing: .03em; line-height: 1.4; }

/* 表紙（文字だけ）：白地に大きな番号と区分 */
.tp-cover { position: relative; display: grid; grid-template-rows: auto 1fr auto; aspect-ratio: 16 / 9; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--tp-ink); overflow: hidden; }
.tp-cover-k { font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.tp-cover-no { align-self: center; font-size: clamp(48px, 6vw, 72px); font-weight: 700; line-height: 1; letter-spacing: .02em; }
.tp-cover-no small { font-size: .3em; letter-spacing: .1em; margin-right: 4px; }
.tp-cover-c { justify-self: end; font-size: 12px; font-weight: 700; letter-spacing: .14em; padding: 2px 12px; border: 1px solid var(--tp-ink); border-radius: 999px; }
.tp-cover::after { content: ""; position: absolute; right: -18%; top: -40%; width: 70%; aspect-ratio: 1; border: 1px solid var(--tp-ink); border-radius: 50%; }
.tp-cover.tp-cover-img { display: block; padding: 0; aspect-ratio: 1200 / 630; }
.tp-cover.tp-cover-img::after { content: none; }
.tp-cover-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-cover-lg { border: 1px solid var(--tp-ink); border-radius: 18px; aspect-ratio: 16 / 10; padding: 22px 28px; }
.tp-cover-lg .tp-cover-no { font-size: clamp(72px, 11vw, 150px); }
.tp-cover-sm { border: 1px solid var(--tp-ink); border-radius: 10px; padding: 8px 12px; }
.tp-cover-sm .tp-cover-no { font-size: 40px; }
.tp-cover-sm .tp-cover-k { font-size: 9px; }
.tp-cover-sm .tp-cover-c { font-size: 10px; padding: 0 8px; }

/* 記事の頭：左に見出し、右に表紙 */
.tp-ahead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.tp-ahead-t { display: grid; gap: 22px; }
.tp-ah1 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.95; letter-spacing: .14em; text-wrap: pretty; word-break: auto-phrase; }
.tp-upd { margin-left: 12px; }
.tp-au-row { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 700; }
.tp-au-ic { display: block; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tp-ink); flex-shrink: 0; }
.tp-draft { border: 1px dashed var(--tp-ink); border-radius: 12px; padding: 8px 14px; font-size: 12px; }
.tp-edit { margin: -6px 0 0; }

/* 記事の本文と、右の PICK UP */
.tp-cols-art { grid-template-columns: minmax(0, 1fr) 340px; border-bottom: 1px solid var(--tp-ink); }
.tp-art-main { padding: clamp(40px, 5vw, 72px) clamp(20px, 6vw, 96px) 96px; min-width: 0; }
.tp-art-main > * { max-width: 780px; }
.tp-pick { border-left: 1px solid var(--tp-ink); }
.tp-pick .tp-side-h { padding: 28px 32px; }
.tp-pick .tp-empty { padding: 24px 32px; }
.tp-pick-l { list-style: none; margin: 0; padding: 28px 32px; display: grid; gap: 28px; position: sticky; top: 0; }
.tp-pick-l a { display: grid; gap: 12px; text-decoration: none; }
.tp-pick-l b { font-size: 13px; line-height: 1.9; letter-spacing: .1em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-pick-l a:hover b { text-decoration: underline; }

.tp-toc { background: #fff; border: 1px solid var(--tp-ink); border-radius: 12px; padding: 20px 26px; font-size: 14px; letter-spacing: .08em; }
.tp-toc > p { font-weight: 700; font-size: 13px; letter-spacing: .16em; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dotted var(--tp-ink); }
.tp-toc ol { margin: 0; padding-left: 1.5em; display: grid; gap: 6px; line-height: 1.8; }
.tp-toc a { text-decoration: none; }
.tp-toc a:hover { text-decoration: underline; }

.tp-body { margin-top: 48px; font-size: 16px; line-height: 2.1; letter-spacing: .12em; text-align: justify; }
.tp-body > * + * { margin-top: 1.4em; }
.tp-body h2, .tp-faq h2, .tp-rel h2 { font-size: clamp(20px, 2.2vw, 24px); font-weight: 700; line-height: 1.8; letter-spacing: .12em; text-align: left; padding-top: 36px; margin-top: 64px; border-top: 1px dotted var(--tp-ink); scroll-margin-top: 16px; }
.tp-body h3 { font-size: 17px; font-weight: 700; line-height: 1.8; letter-spacing: .1em; margin-top: 2.2em; text-align: left; }
.tp-body h3::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tp-ink); margin-right: 10px; vertical-align: 4px; }
.tp-body ul, .tp-body ol { padding-left: 1.4em; display: grid; gap: 8px; text-align: left; }
.tp-body strong { font-weight: 700; }
.tp-body a { font-weight: 700; }
.tp-body .tp-memo { border: 1px dashed var(--tp-gray); border-radius: 12px; padding: 12px 16px; color: var(--tp-gray); font-size: 14px; letter-spacing: .06em; text-align: left; }
.tp-body .tp-fig { margin: 8px 0; }
.tp-body .tp-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--tp-ink); border-radius: 14px; background: #fff; }
.tp-body .tp-fig figcaption { margin-top: 8px; font-size: 12px; color: var(--tp-gray); letter-spacing: .08em; text-align: center; }
.tp-body .tp-note { font-size: 12px; color: var(--tp-gray); letter-spacing: .08em; }
.tp-tbl { overflow-x: auto; }
.tp-body table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.8; letter-spacing: .06em; text-align: left; background: #fff; border: 1px solid var(--tp-ink); border-radius: 12px; overflow: hidden; }
.tp-body th, .tp-body td { vertical-align: top; padding: 12px 16px; border-bottom: 1px dotted var(--tp-ink); }
.tp-body tr:last-child > * { border-bottom: 0; }
.tp-body thead th { border-bottom: 1px solid var(--tp-ink); white-space: nowrap; font-size: 12px; letter-spacing: .12em; }
.tp-body tbody th { white-space: nowrap; }

.tp-faq-list { margin: 24px 0 0; display: grid; gap: 14px; }
.tp-faq details { background: #fff; border: 1px solid var(--tp-ink); border-radius: 12px; }
.tp-faq summary { display: flex; gap: 10px; align-items: baseline; padding: 16px 52px 16px 22px; position: relative; cursor: pointer; list-style: none; font-weight: 700; line-height: 1.8; letter-spacing: .1em; }
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::before { content: "Q."; flex: none; }
.tp-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; line-height: 1; transition: transform .2s; }
.tp-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.tp-faq summary:focus-visible { outline: 2px solid var(--tp-ink); outline-offset: 2px; border-radius: 12px; }
.tp-faq details p { margin: 0; padding: 0 22px 18px; line-height: 2; letter-spacing: .08em; font-size: 15px; }

.tp-cta { margin-top: 64px; background: var(--tp-ink); color: #fff; border-radius: 18px; padding: 28px 30px 26px; display: grid; grid-template-columns: minmax(0, 1fr) 196px; align-items: center; gap: 20px 28px; letter-spacing: .08em; overflow: hidden; }
.tp-cta-in { display: grid; gap: 12px; }
.tp-nw { white-space: nowrap; }
/* piccのページの見本（LPの画像）を3枚、扇に重ねる */
.tp-cta-pics { grid-column: 2; grid-row: 1; position: relative; height: 190px; }
.tp-cta-pics img { position: absolute; top: 18px; left: 0; width: 96px; height: auto; border-radius: 12px; border: 2px solid #fff; transform: rotate(-8deg); transform-origin: bottom center; }
.tp-cta-pics img:nth-child(2) { top: 0; left: 50px; z-index: 2; transform: none; }
.tp-cta-pics img:nth-child(3) { left: 100px; transform: rotate(8deg); }
.tp-cta-t { font-size: 20px; font-weight: 700; line-height: 1.6; letter-spacing: .1em; }
.tp-cta .btn { background: #fff; color: var(--tp-ink); border-color: #fff; }
.tp-cta .cap { color: #c9c8c5; }
.tp-cta-b { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 6px; }
.tp-more { font-size: 14px; color: #fff; }
@media (max-width: 600px) {
  .tp-cta { grid-template-columns: 1fr; }
  .tp-cta-pics { grid-column: 1; width: 196px; height: 176px; margin: 4px auto 0; }
  .tp-cta-in { grid-row: 2; }
}

.tp-au { margin-top: 28px; background: var(--tp-card); border: 1px solid var(--tp-ink); border-radius: 18px; padding: 22px 26px; display: grid; gap: 12px; font-size: 14px; line-height: 2; letter-spacing: .08em; }
.tp-au-k { font-size: 12px; font-weight: 700; letter-spacing: .16em; padding-bottom: 8px; border-bottom: 1px dotted var(--tp-ink); }
.tp-au-top { display: flex; align-items: center; gap: 16px; }
.tp-au-n { display: grid; gap: 0; line-height: 1.7; }
.tp-au-n b { font-size: 17px; }
.tp-au-n span { color: var(--tp-gray); font-size: 12px; }
.tp-au-l { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; font-size: 13px; }

.tp-rel ul { margin-top: 16px; padding-left: 1.3em; display: grid; gap: 8px; }
.tp-back { margin-top: 40px; font-size: 13px; font-weight: 700; }

/* 右下の、回る「PAGE TOP」 */
html:has(body.tp) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(body.tp) { scroll-behavior: auto; } }
.tp-top { position: fixed; right: 20px; bottom: 20px; z-index: 5; width: 96px; height: 96px; display: grid; place-items: center; text-decoration: none; color: var(--tp-ink); background: var(--tp-bg); border-radius: 50%; }
.tp-top svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: tp-spin 14s linear infinite; overflow: visible; }
.tp-top text { font-size: 12px; font-weight: 700; fill: currentColor; font-family: var(--font); }
.tp-top i { font-style: normal; font-size: 22px; font-weight: 700; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tp-top svg { animation: none; } }

/* 狭い画面：1列にする。表は1行ずつのカードにする（td に data-label で列の名前） */
@media (max-width: 960px) {
  .tp-hero, .tp-ahead { grid-template-columns: 1fr; }
  .tp-hero-l { justify-self: start; }
  .tp-cols, .tp-cols-art { grid-template-columns: 1fr; }
  .tp-side { border-right: 0; border-bottom: 1px solid var(--tp-ink); }
  .tp-side-h { padding: 16px 20px; }
  .tp-side-l { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 16px 20px; }
  .tp-side-news { padding-bottom: 0; border-bottom: 0; }
  .tp-pick { border-left: 0; border-top: 1px solid var(--tp-ink); }
  .tp-pick .tp-side-h { padding: 20px; }
  .tp-pick-l { position: static; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 20px 20px 40px; }
  .tp-top { width: 72px; height: 72px; right: 12px; bottom: 12px; }
}
@media (max-width: 600px) {
  .tp-body { font-size: 15px; letter-spacing: .08em; text-align: left; }
  .tp-ah1 { letter-spacing: .1em; line-height: 1.8; }
  .tp-body thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tp-body table { display: block; }
  .tp-body tbody { display: block; }
  .tp-body tr { display: grid; gap: 6px; padding: 14px 16px; border-bottom: 1px dotted var(--tp-ink); }
  .tp-body th, .tp-body td { padding: 0; border: 0; }
  .tp-body tbody th { white-space: normal; font-size: 15px; }
  .tp-body td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--tp-gray); letter-spacing: .1em; }
}

/* 運営者の編集画面（/admin/tips） */
.tp-edit { margin-bottom: 12px; }
body.tpa .wrap { max-width: 900px; }
.tpa-in { max-width: 860px; margin: 0 auto; padding: 8px 0 48px; }
.tpa .tp-h1 { font-size: clamp(24px, 4vw, 30px); font-weight: 700; line-height: 1.4; }
.tpa .tp-crumb { justify-content: flex-start; border: 0; padding: 0; margin-bottom: 14px; color: var(--sub); font-weight: 400; letter-spacing: 0; font-size: 13px; }
.tpa .tp-crumb a { color: var(--sub); }
.tpa-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tpa-list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); }
.tpa-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tpa-list small { grid-column: 2; color: var(--sub); font-size: 12px; }
.tpa-t { font-weight: 700; text-decoration: none; }
.tpa-t:hover { text-decoration: underline; }
.tpa-v { grid-row: 1 / span 2; grid-column: 3; font-size: 13px; }
.tpa-st { font-size: 12px; border-radius: 999px; padding: 1px 10px; border: 1px solid var(--text); white-space: nowrap; }
.tpa-st.is-public { background: var(--text); color: #fff; }
.tpa-err { border: 1px solid var(--err); color: var(--err); border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.tpa-err ul { margin: 6px 0 0; padding-left: 1.3em; }
.tpa-form { display: grid; gap: 20px; margin-top: 16px; }
.tpa-f { display: grid; gap: 6px; }
.tpa-f > span:first-child { font-weight: 700; font-size: 14px; }
.tpa-f > span small { font-weight: 400; color: var(--sub); margin-left: 8px; }
.tpa-f small.is-off { color: var(--err); }
.tpa-f input:not([type=checkbox]):not([type=radio]), .tpa-f textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: #fff; line-height: 1.7; }
.tpa-body { font-size: 15px; line-height: 1.9; min-height: 50vh; }
.tpa-url { display: flex; align-items: center; gap: 4px; }
.tpa-url > span { color: var(--sub); font-size: 14px; white-space: nowrap; }
.tpa-row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tpa-st-pick { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 16px 12px; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.tpa-st-pick legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.tpa-help { background: var(--panel); border-radius: 14px; padding: 12px 16px; font-size: 13px; margin-top: -8px; }
.tpa-help summary { cursor: pointer; font-weight: 700; }
.tpa-help table { margin-top: 8px; border-collapse: collapse; width: 100%; }
.tpa-help th, .tpa-help td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.tpa-help th { white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-weight: 400; }
.tpa-save { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
.tpa-del { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; color: var(--sub); }

/* 記事の編集画面（/admin/tips/{id}・/admin/tips/new）。本文は公開ページと同じ見た目のまま書く（tips-admin.js）。設定は右（狭い画面では下） */
body.tpe-on .wrap { max-width: none; padding: 0; }
body:not(.tpe-ready) .tpe-js { display: none !important; }
.tpe { --tp-bg: #F7F6F3; --tp-card: #EFEDE8; --tp-ink: #111111; --tp-gray: #77767A; --tpe-bar: 57px; }
.tpe-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; min-height: var(--tpe-bar); padding: 8px clamp(12px, 2vw, 20px); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.tpe-back { padding: 8px 4px; font-size: 13px; color: var(--sub); text-decoration: none; white-space: nowrap; }
.tpe-back:hover { color: var(--text); }
.tpe-bar-gap { flex: 1; }
.tpe-hist { display: inline-flex; gap: 4px; }
.tpe-ic { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
.tpe-ic:hover:not([disabled]) { background: var(--panel); }
.tpe-ic[disabled] { opacity: .3; cursor: default; }
.tpe-bar .btn-sm { min-height: 40px; padding: 6px 14px; white-space: nowrap; }
.tpe .tpa-err { margin: 12px clamp(12px, 2vw, 20px); }

.tpe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.tpe-main { min-width: 0; min-height: calc(100vh - var(--tpe-bar)); padding: clamp(32px, 5vw, 64px) clamp(16px, 5vw, 72px) 120px; background: var(--tp-bg); border-right: 1px solid var(--line); }
.tpe-paper { max-width: 780px; margin: 0 auto; color: var(--tp-ink); letter-spacing: .06em; }
.tpe-title { display: block; width: 100%; padding: 0; border: 0; outline: none; background: transparent; resize: none; overflow: hidden; font: inherit; font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.75; letter-spacing: .12em; color: var(--tp-ink); }
.tpe-title::placeholder { color: #B5B4B0; }
.tpe-title-cap { margin-top: 2px; font-size: 12px; letter-spacing: .04em; }
.tpe-hint { margin-top: 16px; font-size: 12px; text-align: center; letter-spacing: .04em; }
.tpe-src { display: grid; gap: 12px; margin-top: 28px; }
.tpe-src[hidden], .tpe-blocks[hidden], .tpe-add[hidden], .tpe-hint[hidden] { display: none; }
.tpe-src .tpa-body { background: #fff; font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.8; letter-spacing: 0; }

/* 本文のブロック */
.tpe-blocks.tp-body { margin-top: 36px; min-height: 30vh; }
.tpe-blocks .tpe-x, .tpe-blocks .tpe-cell, .tpe-blocks .tpe-cap { outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.tpe-b { position: relative; border-radius: 4px; }
.tpe-b.is-cur { outline: 1px dashed rgba(17, 17, 17, .4); outline-offset: 6px; }
.tpe-b.is-drag { opacity: .35; }
.tpe-dropline { height: 3px; margin: 10px 0; border-radius: 3px; background: var(--tp-ink); }
.tpe-blocks p.tpe-x:empty, .tpe-blocks .tp-memo:empty { min-height: 2.1em; }
.tpe-blocks h2.tpe-x:empty::before, .tpe-blocks h3.tpe-x:empty::after, .tpe-blocks .tp-note:empty::before, .tpe-blocks .tpe-cell:empty::before, .tpe-blocks .tpe-cap:empty::before,
.tpe-b.is-cur p.tpe-x:empty::before, .tpe-b:only-child p.tpe-x:empty::before { content: attr(data-ph); color: #B0AFAB; pointer-events: none; }
.tpe-blocks .tpe-x li:empty::before { content: "項目"; color: #B0AFAB; pointer-events: none; }
.tpe-b[data-t=memo] .tp-memo { padding-top: 40px; min-height: 84px; }
.tpe-b[data-t=memo]::after { content: "下書きメモ（公開ページには出ません）"; position: absolute; top: 13px; left: 17px; font-size: 14px; font-weight: 700; color: var(--tp-gray); letter-spacing: .06em; line-height: 1.6; pointer-events: none; }
.tpe-b[data-t=memo] .tp-memo:empty::before { content: attr(data-ph); color: #B0AFAB; pointer-events: none; }
.tpe-blocks .tpe-cell:focus { background: #F2F7F4; box-shadow: inset 0 0 0 1px var(--tp-ink); }
.tpe-blocks .tpe-cell { min-width: 4em; }
.tpe-figx img { cursor: pointer; min-height: 60px; }
.tpe-b.is-nofig .tpe-figx { display: none; }
.tpe-blocks .tpe-cap { min-height: 1.8em; }
.tpe-blocks .tpe-cap:focus { color: var(--tp-ink); }

/* 道具の帯：本文の上に貼りつく（文字にかぶらない）。並べ替えのつまみは、選んだブロックの左 */
.tpe-strip { position: sticky; top: var(--tpe-bar); z-index: 20; max-width: 780px; margin: -12px auto 20px; padding: 8px 0; }
.tpe-strip[hidden] { display: none; }
.tpe-tb { display: flex; align-items: center; gap: 2px; width: max-content; max-width: 100%; min-height: 44px; padding: 3px; overflow-x: auto; background: #fff; border: 1px solid var(--tp-ink); border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); font-size: 13px; line-height: 1; letter-spacing: 0; white-space: nowrap; scrollbar-width: none; }
.tpe-tb.is-idle { border-style: dashed; border-color: #BDBCB8; box-shadow: none; background: rgba(255, 255, 255, .6); }
.tpe-tb [hidden] { display: none !important; }
.tpe-tb-idle { padding: 0 12px; color: var(--tp-gray); font-size: 12px; letter-spacing: .04em; }
.tpe-tbb { flex: none; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--tp-ink); font: inherit; font-weight: 700; cursor: pointer; }
.tpe-tbb:hover:not([disabled]), .tpe-tbb:focus-visible { background: var(--panel); outline: none; }
.tpe-tbb[disabled] { opacity: .3; cursor: default; }
.tpe-b-bold { font-size: 15px; }
.tpe-tbb-del { color: var(--err); }
.tpe-type { flex: none; height: 36px; padding: 0 6px; border: 0; border-radius: 7px; background: var(--panel); color: var(--tp-ink); font: inherit; font-weight: 700; }
.tpe-tb-lbl { flex: none; padding: 0 10px; font-weight: 700; }
.tpe-anc { flex: none; width: 128px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; font: inherit; font-size: 12px; }
.tpe-tbg { flex: none; display: inline-flex; gap: 2px; margin-left: 2px; padding-left: 4px; border-left: 1px solid var(--line-2); }
.tpe-b > .tpe-drag { position: absolute; top: 0; left: -46px; z-index: 5; width: 32px; min-width: 0; height: 40px; padding: 0; border: 1px solid var(--tp-ink); background: #fff; font-size: 13px; letter-spacing: -.15em; cursor: grab; touch-action: none; }
.tpe-b[data-t=h2] > .tpe-drag { top: 30px; }
.tpe-b > .tpe-drag:active { cursor: grabbing; }

/* 図を選ぶ */
.tpe-figpick { display: none; padding: 14px; background: #fff; border: 1px dashed var(--tp-ink); border-radius: 14px; font-size: 13px; line-height: 1.6; letter-spacing: .04em; text-align: left; }
.tpe-b.is-pick .tpe-figpick { display: block; margin-top: 10px; }
.tpe-b.is-nofig .tpe-figpick { margin-top: 0; }
.tpe-figpick-h { margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.tpe-figpick-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; }
.tpe-figpick-g button { display: grid; gap: 4px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--tp-gray); font: inherit; font-size: 10px; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.tpe-figpick-g button:hover, .tpe-figpick-g button:focus-visible { border-color: var(--tp-ink); outline: none; }
.tpe-figpick-g button.is-on { border-color: var(--tp-ink); box-shadow: inset 0 0 0 1px var(--tp-ink); color: var(--tp-ink); }
.tpe-figpick-g img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--tp-bg); border-radius: 6px; }
.tpe-figpick-r { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tpe-figpick-r input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; font-size: 13px; }
.tpe-figpick .cap { margin-top: 8px; font-size: 11px; }

/* ブロックを足す */
.tpe-add { display: block; margin: 32px auto 0; padding: 10px 22px; border: 1px dashed var(--tp-ink); border-radius: 999px; background: transparent; color: var(--tp-ink); font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.tpe-add:hover, .tpe-add:focus-visible { background: #fff; }
.tpe-menu { position: fixed; z-index: 50; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 330px; max-width: calc(100vw - 16px); padding: 8px; background: #fff; border: 1px solid #111; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.tpe-menu[hidden] { display: none; }
.tpe-menu-i { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 10px; background: transparent; color: #111; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.tpe-menu-i i { font-style: normal; font-size: 18px; line-height: 1.3; }
.tpe-menu-i:hover, .tpe-menu-i:focus-visible { background: var(--panel); outline: none; }

/* 右の設定 */
.tpe-side { position: sticky; top: var(--tpe-bar); max-height: calc(100vh - var(--tpe-bar)); overflow: auto; overscroll-behavior: contain; padding-bottom: 40px; background: #fff; }
.tpe-pn { display: grid; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
details.tpe-pn:not([open]) { gap: 0; }
.tpe-pn-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
summary.tpe-pn-h { cursor: pointer; list-style: none; }
summary.tpe-pn-h::-webkit-details-marker { display: none; }
summary.tpe-pn-h::after { content: "＋"; font-weight: 400; color: var(--sub); }
details[open] > summary.tpe-pn-h::after { content: "−"; }
.tpe-st { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.tpe-st label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.tpe-st label:has(:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.tpe-st small { font-size: 12px; font-weight: 400; color: var(--sub); }
.tpe-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpe-chk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 13px; }
.tpe-chk small { color: var(--sub); font-size: 12px; }
.tpe-side .tpa-f > span:first-child { font-size: 13px; }
.tpe-side .tpa-f input:not([type=checkbox]):not([type=radio]), .tpe-side .tpa-f textarea { padding: 8px 12px; font-size: 14px; }
.tpe-side .tpa-f textarea { resize: vertical; }
.tpe-thumb { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.tpe-view-s { justify-self: start; }
.tpe-del { border-bottom: 0; color: var(--sub); font-size: 13px; }
.tpe-del .btn { justify-self: start; }

@media (max-width: 960px) {
  .tpe-grid { grid-template-columns: 1fr; }
  .tpe-main { min-height: 0; border-right: 0; padding-bottom: 72px; }
  .tpe-side { position: static; max-height: none; overflow: visible; border-top: 1px solid var(--tp-ink); }
}
@media (max-width: 960px) {
  /* 左に余白が足りない画面：つまみは出さず、道具の帯の ↑ ↓ で並べ替える */
  .tpe-b > .tpe-drag { display: none; }
}
@media (max-width: 700px) {
  .tpe-b.is-cur { outline-offset: 4px; }
  .tpe-anc { width: 104px; }
  .tpe-strip { margin-top: -8px; }
}
@media (max-width: 600px) {
  .tpe-bar { gap: 6px; padding-inline: 10px; }
  .tpe-back span, .tpe-bar .tpa-st, .tpe-bar .tpe-view { display: none; }
  .tpe-bar .btn-sm { padding: 6px 12px; font-size: 12px; }
  .tpe-ic { width: 36px; height: 36px; }
  .tpe-tbb { min-width: 32px; padding: 0 6px; }
  .tpe-type { max-width: 92px; padding: 0 2px; font-size: 12px; }
  .tpe-tbg { margin-left: 0; padding-left: 2px; }
  .tpe-tb { flex-wrap: wrap; row-gap: 2px; overflow: visible; }
  .tpe-main { padding: 24px 16px 64px; }
  .tpe-title { font-size: 22px; letter-spacing: .08em; }
  /* 編集画面では、表をカードにせず、表のまま書けるようにする */
  .tpe-blocks thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .tpe-blocks table { display: table; }
  .tpe-blocks tbody { display: table-row-group; }
  .tpe-blocks tr { display: table-row; padding: 0; border: 0; }
  .tpe-blocks th, .tpe-blocks td { padding: 10px 12px; border-bottom: 1px dotted var(--tp-ink); }
  .tpe-blocks tbody th { white-space: nowrap; font-size: 14px; }
}
