/* Clean skin: white page, black gothic headlines, hairline rules, 4-column news grid.
   Loaded after site.css and kept outside its @layers, so these rules win without !important. */

:root {
  --paper: #FFFFFF; --paper-2: #F6F6F6; --paper-3: #ECECEC;
  --ink: #1A1A1A; --ink-2: #4D4D4D; --ink-3: #737373;
  --rule: #E3E3E3; --rule-strong: #1A1A1A;
  --btn: #1A1A1A; --on-btn: #FFFFFF; --link: #1A1A1A; --link-hover: #000000;
  --band: #1A1A1A; --on-band: #FFFFFF; --on-band-2: #CCCCCC;
  --grain: 0; --hdr-bg: rgba(255,255,255,.97);
  --fade-from: rgba(255,255,255,0); --fade-to: #FFFFFF;
  --ff-serif: var(--ff-sans);
  --sh-print: none;
  /* solid category buttons */
  --chip-bg: #EFEFEF; --chip-bg-hover: #E3E3E3; --chip-on: #141414; --chip-on-ink: #fff;
  /* No red accent: emphasis is black on white. */
  --shu: #1A1A1A; --shu-fill: #1A1A1A; --on-shu: #FFFFFF; --focus: #1A1A1A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121212; --paper-2: #1C1C1C; --paper-3: #262626;
    --ink: #EDEDED; --ink-2: #BDBDBD; --ink-3: #999999;
    --rule: #2E2E2E; --rule-strong: #EDEDED;
    --btn: #EDEDED; --on-btn: #121212; --link: #EDEDED; --link-hover: #FFFFFF;
    --band: #000000; --on-band: #EDEDED; --on-band-2: #BDBDBD;
    --chip-bg: #262626; --chip-bg-hover: #333333; --chip-on: #EDEDED; --chip-on-ink: #121212;
    --hdr-bg: rgba(18,18,18,.97); --fade-from: rgba(18,18,18,0); --fade-to: #121212;
    --shu: #EDEDED; --shu-fill: #EDEDED; --on-shu: #121212; --focus: #EDEDED;
  }
}
:root[data-theme="dark"] {
  --paper: #121212; --paper-2: #1C1C1C; --paper-3: #262626;
  --ink: #EDEDED; --ink-2: #BDBDBD; --ink-3: #999999;
  --rule: #2E2E2E; --rule-strong: #EDEDED;
  --btn: #EDEDED; --on-btn: #121212; --link: #EDEDED; --link-hover: #FFFFFF;
  --band: #000000; --on-band: #EDEDED; --on-band-2: #BDBDBD;
  --chip-bg: #262626; --chip-bg-hover: #333333; --chip-on: #EDEDED; --chip-on-ink: #121212;
  --hdr-bg: rgba(18,18,18,.97); --fade-from: rgba(18,18,18,0); --fade-to: #121212;
  --shu: #EDEDED; --shu-fill: #EDEDED; --on-shu: #121212; --focus: #EDEDED;
}

/* ---- type: one gothic family, bold headlines, no ornaments ---- */
.hd, .cat-h1, .art-title, .prose h2, .gate h2, .gate .price strong { font-weight: 700; letter-spacing: .01em; }
.hd-xl { font-weight: 700; }
.kicker { color: var(--ink-3); font-weight: 400; letter-spacing: .04em; }
.kicker::before, .cat-h1::before, .prose h2::before { display: none; }
.seal, .seal.o { background: none; color: var(--ink-2); border-color: var(--rule); font-weight: 400; }
a:hover .hd, a.hd:hover, .hd a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* ---- header ---- */
.mast { border-bottom: 1px solid var(--rule); }
.mast-line { display: none; }
/* Lattice logo is 3:1, so it needs more width than the old brush wordmark. */
body .mast-bar > .tn-logo { width: 120px; padding: 0; }
.drawer-head .tn-logo { width: 150px; }
.foot .tn-logo { width: 168px; }
.sub-cta span { background: none; color: var(--ink); border: 1px solid var(--ink); font-weight: 400; letter-spacing: .08em; }
.sub-cta:hover span { filter: none; background: var(--ink); color: var(--paper); }
.tabs { border-top: 0; border-bottom: 1px solid var(--rule); }
.tabs a { font-weight: 400; }
.tabs a[aria-current] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current]::after { background: var(--ink); height: 2px; border-radius: 0; }
@media (min-width: 64rem) {
  .mast-bar { min-height: 76px; }
  .foot .tn-logo { width: 210px; }
  .sub-cta span { height: 36px; font-size: 13.5px; }
  .nav { border-bottom: 1px solid var(--rule); }
  .nav li + li::before { display: none; }
  .nav a.t { font-weight: 400; font-size: 14px; min-height: 46px; color: var(--ink-2); }
  .nav a.t:hover, .nav a.t[aria-current] { color: var(--ink); }
  .nav a.t[aria-current] { font-weight: 700; }
  .nav a.t[aria-current]::after, .nav a.t:hover::after, .nav li:focus-within > a.t::after { height: 2px; background: var(--ink); }
  .nav .sub { border: 1px solid var(--rule); border-top: 2px solid var(--ink); box-shadow: none; }
}

/* ---- news grid (home, latest, categories, tags, search) ---- */
.g-grid { display: grid; grid-template-columns: 1fr; column-gap: 44px; margin-top: 8px; }
.g-card { display: grid; grid-template-rows: auto auto auto auto; align-content: start; padding: 28px 0 22px; border-bottom: 1px solid var(--rule); }
.g-title { font-size: 19px; line-height: 1.6; }
.g-title a { color: var(--ink); }
.g-dek { margin-top: 12px; font-size: 14px; line-height: 1.9; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.g-dek:empty { display: none; }
.g-media { margin: 0 0 16px; }   /* photo first, then headline, summary, date */
.g-media:empty { display: none; }
.g-media .ph { aspect-ratio: 16 / 10; background: var(--paper-2); outline: 1px solid var(--rule); outline-offset: -1px; }
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.g-foot .tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.g-foot .meta { flex: none; font-size: 13px; }
.g-more { display: flex; justify-content: center; margin: 40px 0 8px; }
.g-more .btn { font-weight: 400; min-width: 240px; }
.g-empty { padding: 64px 0; }
@media (min-width: 40rem) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Subgrid lines up titles, summaries, images and dates across each row, like a printed page. */
  .g-card { grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .g-dek:empty, .g-media:empty { display: block; }
}
@media (min-width: 64rem) {
  .g-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
  .g-card { padding: 36px 0 26px; }
  .g-title { font-size: 21px; line-height: 1.62; }
}

/* ---- archive headers ---- */
.cat-head, .cat-head[data-cat] { border-top: 0; border-bottom: 0; padding: 20px 0 0; }
.cat-h1 { font-size: clamp(24px, 1.2vw + 18px, 32px); }
.tn-sec-kicker { color: var(--ink-3); letter-spacing: .14em; }
.cat-layout:not(.has-aside) .cat-main { max-width: none; }
.chip[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager a, .pager span { border-color: var(--rule); }

/* ---- article ---- */
.art-title { font-size: clamp(24px, 1vw + 20px, 34px); line-height: 1.5; }
.prose h2 { border-top: 0; padding-top: 0; font-size: clamp(19px, .5vw + 17px, 22px); }
.prose blockquote, .wp-block-quote { border-left: 2px solid var(--ink); }
.gate { background: var(--paper-2); border-color: var(--rule); }
.tn-keypoints { border-radius: 0; }
.tn-aside-promo { border-color: var(--rule); border-top: 2px solid var(--ink); }
.tn-bottom-bar, :root[data-theme="dark"] .tn-bottom-bar { background: var(--hdr-bg); }

/* ---- membership band & footer ---- */
.tn-home-cta { background: var(--paper-2); border: 0; }
.btn--shu, .btn--shu:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); filter: none; }
.foot { background: var(--paper); border-top: 1px solid var(--rule); }
.foot summary::after { color: var(--ink-3); }

/* ======================================================================
   Desktop editorial layout (>= 64rem): big logo left, utilities + category pills right,
   a lead story beside the newest stories, and a paper-style Menu sheet from the right.
   Nothing below applies to phones or tablets.
   ====================================================================== */
.drawer-close { display: none; }
.paper-stage { position: fixed; inset: 0; z-index: 120; perspective: 1800px; pointer-events: none; }
.paper-strip { position: absolute; overflow: hidden; transform-origin: right center; will-change: transform; }
.paper-strip .paper-copy { position: absolute; top: 0; right: auto; bottom: auto; display: flex; box-shadow: none; }
/* The paper is blank at first; the menu text fades in as it flattens. */
.paper-copy > * { opacity: var(--ink, 1); }

@media (min-width: 64rem) {
  /* ---- header ---- */
  .mast { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 32px; align-items: start;
          padding: 20px max(24px, calc((100vw - var(--page-max)) / 2 + 24px)) 18px; border-bottom: 1px solid var(--rule); }
  .mast-bar { display: contents; }
  /* The menu panel lives inside .l, so it must stay rendered; it just takes no space. */
  .mast-bar .l { position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: visible; }
  body .mast-bar > .tn-logo { grid-column: 1; grid-row: 1; width: clamp(360px, 38vw, 540px); padding: 0; }
  .mast-bar .r { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; gap: 4px; }
  .mast-bar .icon-btn { font-size: 14px; font-weight: 500; }
  .tn-hdr-login, .sub-cta { font-size: 14px; font-weight: 500; }
  .sub-cta span { border: 0; background: none; height: auto; padding: 0 10px; font-size: 14px; font-weight: 500; letter-spacing: .04em; }
  .sub-cta:hover span { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
  .menu-pill { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px 0 20px; margin-left: 8px; border: 0; border-radius: 999px;
               background: var(--ink); color: var(--paper); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
  .menu-pill svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
  .menu-pill:hover { background: var(--ink-2); }

  /* category pills: first four categories and a "…" that opens the menu */
  /* Category buttons: a single row below the header, flush with the page edges. */
  .nav { border: 0; padding: 20px max(24px, calc((100vw - var(--page-max)) / 2 + 24px)) 4px; }
  /* 8 categories as a tidy 4 x 2 grid: same-column buttons share one width, text centred, rows line up. */
  .nav ul { display: flex; gap: 8px; justify-content: stretch; flex-wrap: nowrap; }
  .nav li { display: flex; flex: 1 1 auto; }
  .nav li .t { flex: 1; justify-content: center; text-align: center; }
  .nav li:nth-child(-n+2) { display: none; }   /* Home and Latest live in the Menu; the pills are the categories */
  .nav .nav-sub-toggle, .nav .caret, .nav .sub { display: none; }
  .nav .t, .nav a.t:has(.caret) { display: inline-flex; align-items: center; min-height: 0; padding: 9px 18px; border: 0; border-radius: 16px;
          background: var(--chip-bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; cursor: pointer;
          transition: background .18s ease, color .18s ease; }
  .nav .t::after, .nav a.t[aria-current]::after, .nav a.t:hover::after, .nav li:focus-within > a.t::after { display: none; }
  .nav .t:hover { background: var(--chip-bg-hover); }
  .nav a.t[aria-current], .nav a.t[aria-current]:hover { background: var(--chip-on); color: var(--chip-on-ink); font-weight: 500; }

  /* ---- hero: lead story + newest stories ---- */
  .home-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; padding: 56px 0 24px; border-bottom: 1px solid var(--rule); }
  .hero-title { font-size: clamp(32px, 2.6vw + 8px, 46px); line-height: 1.38; font-weight: 500; letter-spacing: 0; }
  .hero-title a:hover { text-decoration: none; }
  .hero-meta { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0 16px; font-size: 15px; }
  .hero-lead .ph { aspect-ratio: 16 / 9; background: var(--paper-2); }
  .hero-dek { margin-top: 18px; font-size: 15px; line-height: 1.9; }
  .hero-label { font-size: 15px; font-weight: 500; color: var(--ink-3); margin: 6px 0 16px; letter-spacing: .04em; }
  /* Latest news list (the rows themselves are the feature rows below). */
  .latest-list { display: block; border-top: 1px solid var(--rule); }

  /* Feature rows (first two of the latest list): headline on top, summary left, thumbnail right, date and lock below. */
  .feat-card { position: relative; padding: 22px 0 20px; border-bottom: 1px solid var(--rule); }
  .feat-title { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 700; }
  .feat-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(120px, 10.5vw, 148px); gap: 18px; margin-top: 12px; align-items: start; }
  .feat-dek { margin: 0; font-size: 15px; line-height: 1.85; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .feat-body .st-img { display: block; }
  .feat-body .ph { aspect-ratio: 1 / 1; background: var(--paper-2); }
  .feat-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
  .feat-foot .meta { font-size: 14px; }
  .feat-lock { width: 17px; height: 17px; fill: #D9A441; flex: none; }

  /* Search is just the magnifier; it spins once under the pointer. The light/dark switch sits right next to Menu. */
  /* Search: the lens flips around the handle's own axis (the diagonal through lens and handle), so the handle stays put:
     the ring squeezes to an edge-on bar, then opens again. A soft round highlight fades in behind the icon. */
  .hdr-search { display: flex; align-items: center; gap: 2px; margin: 0; }
  .hdr-search-btn { border-radius: 50%; border: 0; background: none; color: inherit; cursor: pointer; transition: background-color .22s ease; }
  .hdr-search-btn:hover, .hdr-search-btn:focus-visible, .hdr-search.is-open .hdr-search-btn { background: var(--paper-3); }
  .hdr-search-btn svg { transform-origin: 50% 50%; }
  .hdr-search:hover .hdr-search-btn svg, .hdr-search:focus-within .hdr-search-btn svg, .hdr-search.is-open .hdr-search-btn svg { animation: tn-flip .62s cubic-bezier(.45, .05, .25, 1); }
  /* the box slides out to the left of the magnifier (the buttons to its right stay put) */
  .hdr-search-input { box-sizing: border-box; width: 0; height: 42px; padding: 0; border: 0; border-radius: 16px; background: var(--chip-bg); color: var(--ink);
          font: inherit; font-size: 14.5px; opacity: 0; transition: width .32s cubic-bezier(.3, .8, .3, 1), padding .32s ease, opacity .2s ease; -webkit-appearance: none; appearance: none; outline: none; }
  .hdr-search-input::-webkit-search-cancel-button { display: none; }
  .hdr-search-input::placeholder { color: var(--ink-3); }
  .hdr-search:hover .hdr-search-input, .hdr-search:focus-within .hdr-search-input, .hdr-search.is-open .hdr-search-input { width: clamp(180px, 20vw, 280px); padding: 0 16px; opacity: 1; }
  .hdr-search-input:focus { box-shadow: 0 0 0 2px var(--ink); }
  .mast-bar .r > .theme-sw { order: 3; margin-inline: 10px 2px; }
  .mast-bar .r > .menu-pill { order: 4; }
  /* Two rows on the right: search, light/dark switch and Menu on top; sign-in and membership in the empty space below,
     sitting on the same bottom edge as the logo. */
  .mast-bar .r { align-self: stretch; flex-wrap: wrap; align-content: space-between; justify-content: flex-end; }
  .mast-bar .r::after { content: ""; order: 5; flex: 0 0 100%; height: 0; }
  /* Sign-in sits on top of Membership, both as buttons of the same width, bottom-aligned with the logo. */
  .mast-bar .r::before { content: ""; order: 7; flex: 0 0 100%; height: 0; }   /* second line break: sign-in and membership stack */
  .mast-bar .r > .tn-hdr-login, .mast-bar .r > .tn-hdr-user { order: 6; }
  .mast-bar .r > .sub-cta { order: 8; margin: 0; }
  .mast-bar .r > .tn-hdr-login, .mast-bar .r > .sub-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; width: 188px; height: 42px;
          padding: 0 20px; border-radius: 16px; font-size: 14.5px; font-weight: 500; letter-spacing: .04em; transition: background .18s ease, color .18s ease; }
  .mast-bar .r > .tn-hdr-login { background: var(--chip-bg); color: var(--ink); }
  .mast-bar .r > .tn-hdr-login:hover { background: var(--chip-bg-hover); }
  .mast-bar .r > .tn-hdr-login svg { width: 19px; height: 19px; }
  .mast-bar .r > .sub-cta { background: var(--ink); color: var(--paper); }
  .mast-bar .r > .sub-cta:hover { background: var(--ink-2); }
  .mast-bar .r > .sub-cta span, .mast-bar .r > .sub-cta:hover span { padding: 0; height: auto; background: none; color: inherit; text-decoration: none; }

  /* Keep the scrollbar's space reserved so the page doesn't jump sideways when the menu locks scrolling. */
  html { scrollbar-gutter: stable; }

  /* ---- Menu sheet: slides in from the right ---- */
  .drawer-panel { left: auto; right: 0; width: 420px; border-right: 0; border-left: 1px solid var(--rule-strong); box-shadow: none; }
  .drawer-head { justify-content: space-between; padding: 0 14px 0 28px; min-height: 92px; }
  .drawer-head .tn-logo { width: 196px; }   /* the old site's brush wordmark */
  .drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; color: var(--ink); cursor: pointer; }
  .drawer-close svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: square; }
  .scrim { background: rgba(0, 0, 0, .35); }
}
/* The dimming layer behind the menu is faded by paper-menu.js together with the sheet; a CSS animation on top of it made it flash. */
@media (min-width: 64rem) { .drawer[open] > .scrim { animation: none; } }

/* Logo animation: first page of a session only; afterwards the finished logo is shown. */
.logo-static { display: none; }
.tn-seen .logo-anim { display: none; }
.tn-seen .logo-static { display: block; }

/* ---- News blocks: the whole block is one link, and it dims a little under the pointer. ---- */
.g-card, .hero-lead, .feat-card { position: relative; }
.g-title a::after, .hero-title a::after, .feat-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.g-foot .kicker, .g-foot .seal { position: relative; z-index: 2; }   /* the category link stays clickable */
.g-card img, .hero-lead img, .feat-card img, .g-card .ph-fb, .feat-card .ph-fb { transition: filter .22s ease; }
.g-title a, .hero-title a, .feat-title a, .feat-dek, .g-dek, .hero-dek, .g-foot .meta, .hero-meta { transition: color .22s ease; }
@media (hover: hover) {
  .g-title a:hover, .hero-title a:hover, .feat-title a:hover { text-decoration: none; }   /* the dimming is the hover cue */
  .g-card:hover img, .hero-lead:hover img, .feat-card:hover img { filter: brightness(.74); }
  .g-card:hover .ph-fb, .feat-card:hover .ph-fb { filter: brightness(.92); }
  .g-card:hover .g-title a, .hero-lead:hover .hero-title a, .feat-card:hover .feat-title a { color: var(--ink-3); }
  .g-card:hover .g-dek, .hero-lead:hover .hero-dek, .feat-card:hover .feat-dek { color: var(--ink-3); }
}

@keyframes tn-flip { to { transform: rotate3d(1, 1, 0, 360deg); } }
@media (prefers-reduced-motion: reduce) { .hdr-search:hover .hdr-search-btn svg { animation: none; } .hdr-search-input { transition: none; } }

/* ---- Partner banners at the very top of the footer ---- */
.foot-partners { display: flex; flex-direction: column; gap: 22px; margin: 8px 0 8px; padding: 28px 0 30px; border-bottom: 1px solid var(--rule); }
.foot-partners .partner { display: block; text-decoration: none; color: var(--ink-3); }
.foot-partners img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); transition: filter .22s ease; }
.foot-partners span { display: block; margin-top: 8px; font-size: 13px; text-align: center; transition: color .22s ease; }
@media (min-width: 40rem) {
  .foot-partners { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 28px; }
  .foot-partners .partner { flex: 0 0 auto; }
  .foot-partners img { width: auto; height: clamp(110px, 13vw, 180px); }   /* same height, natural widths: a tidy banner strip */
}
@media (hover: hover) {
  .foot-partners .partner:hover img { filter: brightness(.78); }
  .foot-partners .partner:hover span { color: var(--ink); }
}

/* ---- Footer: logo on the left, company details on the right (replaces the three link columns) ---- */
.foot-company { font-style: normal; color: var(--ink-3); font-size: 15px; line-height: 2; }
.foot-company strong { display: block; margin-bottom: 14px; font-size: 18px; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.foot-company span { display: block; }
.foot-company a { color: inherit; }
@media (max-width: 63.999rem) { .foot-company { padding: 18px 0 6px; } }
@media (min-width: 64rem) {
  /* The "business card" (logo + company address pieced together) on the left, company-information links on the right. */
  .foot-grid { grid-template-columns: auto auto minmax(0, 1fr); gap: 24px 64px; align-items: start; }
  .foot-grid .about { grid-column: 1; grid-row: 1; }
  .foot-grid .foot-company { grid-column: 2; grid-row: 1; }
  .foot-grid .foot-company-links { grid-column: 3; grid-row: 1; justify-self: end; }
}

.foot-company-links h3 { margin: 0 0 26px; font-size: 18px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; line-height: 1.6; }
.foot-company-links ul { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 2; }
.foot-company-links li + li::before { content: "|"; margin: 0 14px; color: var(--ink-3); }
.foot-company-links a { color: var(--ink-3); text-decoration: none; }
.foot-company-links a:hover { color: var(--ink); }
@media (max-width: 63.999rem) { .foot-company, .foot-company-links { padding: 18px 0 6px; } }

/* ---- Breadcrumbs as a larger, easier "back" navigation: Home and the category are chips you can click ---- */
nav[aria-label="パンくずリスト"] { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 0 0; margin-bottom: 18px; }
.crumbs { font-size: 16px; gap: 0; align-items: center; padding: 0; }
.crumbs li { align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 10px; color: var(--ink-3); font-size: 20px; line-height: 1; }
.crumbs a { min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--chip-bg); color: var(--ink); font-weight: 500; transition: background .18s ease, color .18s ease; }
.crumbs a:hover { background: var(--chip-on); color: var(--chip-on-ink); text-decoration: none; }
.crumbs li[aria-current] { color: var(--ink-3); }

/* Back button, left of the breadcrumb chips */
.crumb-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--chip-on); color: var(--chip-on-ink); font-size: 16px; font-weight: 500; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.crumb-back span:first-child { font-size: 20px; line-height: 1; transition: transform .18s ease; }
.crumb-back:hover { background: var(--ink-2); text-decoration: none; }
.crumb-back:hover span:first-child { transform: translateX(-3px); }

/* The "戻る" button replaces the Home chip in the breadcrumb row; the list item stays in the markup (screen readers, SEO). */
.crumbs li:first-child { display: none; }
.crumbs li:nth-child(2)::before { display: none; }
/* Pages whose trail is only Home + the current page (latest, membership...) show no breadcrumb row at all. */
nav[aria-label="パンくずリスト"]:has(.crumbs li:first-child:nth-last-child(2)):not(:has(.crumb-back)) { display: none; }

/* Desktop: the back button rides in a zero-height sticky rail placed above the breadcrumb row (the script builds it), so it
   scrolls with the row and then simply stays at the top left, with no jump. */
@media (min-width: 64rem) {
  nav[aria-label="パンくずリスト"] { min-height: 40px; }
  .crumb-rail { position: sticky; top: 76px; height: 0; z-index: 60; }
  .crumb-rail .crumb-back { position: absolute; left: 0; top: 18px; box-shadow: 0 0 0 rgba(0, 0, 0, 0); transition: box-shadow .35s ease, transform .2s ease, background-color .2s ease; }
  .crumb-rail.is-stuck .crumb-back { box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .14); }
}

/* Article page: the "最新ニュース" column sits on the left, the article on the right. */
@media (min-width: 64rem) {
  .art-grid.has-aside { grid-template-columns: 300px minmax(0, 760px); }
  .art-grid.has-aside > .art-aside { order: -1; }
}

/* Floating compact header (desktop): appears when the full header has scrolled away. */
.dock { display: none; }
@media (min-width: 64rem) {
  .dock { display: flex; align-items: center; justify-content: space-between; position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 64px; box-sizing: border-box;
          padding: 0 max(24px, calc((100vw - var(--page-max)) / 2 + 24px));
          background: color-mix(in srgb, var(--paper) 62%, transparent); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
          border-bottom: 1px solid var(--rule); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35);
          transform: translateY(-110%); opacity: 0; visibility: hidden;
          transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s linear .45s; }
  .dock.is-on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .dock-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
  .dock-mark, .dock-word { display: block; background: currentColor; -webkit-mask: var(--m) no-repeat center / contain; mask: var(--m) no-repeat center / contain; }
  .dock-mark { --m: url("../brand/logo-mark.svg"); width: 30px; height: 30px; }
  .dock-word { --m: url("../brand/logo-wordmark.svg"); width: 154px; height: 26px; }
  .dock-r { display: flex; align-items: center; gap: 4px; }
  .dock-r .theme-sw { margin-inline: 4px 2px; }
  .dock-login { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); transition: background-color .22s ease; }
  .dock-login:hover, .dock-login:focus-visible { background: var(--paper-3); }
  .dock-login svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  /* The search box has to stand out from the translucent bar: solid fill, clear outline. */
  .dock .hdr-search-input { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-2); color: var(--ink); font-size: 15px; }
  .dock .hdr-search-input::placeholder { color: var(--ink-2); }
  .dock .hdr-search-input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
}
/* Category pills that drop in under the dock when scrolling up. */
.nav-float { display: none; }
@media (min-width: 64rem) {
  .nav-float { display: block; position: fixed; z-index: 69; top: 74px; left: 0; right: 0; padding: 0 max(24px, calc((100vw - var(--page-max)) / 2 + 24px)); box-sizing: border-box;
               background: none; pointer-events: none; border: 0; box-shadow: none;
               transform: translateY(-130%); opacity: 0; visibility: hidden;
               transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .25s ease, visibility 0s linear .4s; }
  .nav-float .t { pointer-events: auto; background: var(--chip-bg); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35), 0 1px 4px rgba(0, 0, 0, .1); }
  .nav-float a.t[aria-current] { background: var(--chip-on); }
  .nav-float.is-on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav-float .t { padding-block: 8px; }
  .crumb-rail .crumb-back { translate: 0 0; transition: box-shadow .35s ease, transform .2s ease, background-color .2s ease, translate .4s cubic-bezier(.2, .8, .2, 1); }
  html.tn-navfloat .crumb-rail.is-stuck .crumb-back { translate: 0 56px; }
}
@media (prefers-reduced-motion: reduce) { .dock, .nav-float { transition: none; } }

/* Menu panel: a rounder search box; sub-categories are not listed here (the category page shows them). */
.drawer-search .field { border-radius: 999px; padding-inline: 22px; }
.drawer-search .field:focus, .drawer-search .field:focus-visible { box-shadow: 0 0 0 2px var(--ink); outline: 0; }
.drawer-search-fields .btn { border-radius: 999px; padding-inline: 26px; }
body .drawer-panel nav .drawer-parent { padding-right: 0; }

/* Category pills with sub-categories: a small floating window opens under the pill on hover / keyboard focus. */
@media (min-width: 64rem) {
  body nav.nav { overflow: visible; }
  nav.nav:not(.nav-float) { position: relative; z-index: 40; }
  .nav li { position: relative; }
  .nav li > .sub { display: block; position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--rule); border-radius: 18px;
                   background: var(--paper); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .08); z-index: 5; pointer-events: auto;
                   opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .22s; }
  .nav li > .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* keeps the hover alive across the gap */
  .nav li:hover > .sub, .nav li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav .sub a { display: flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--ink); }
  .nav .sub a:hover, .nav .sub a:focus-visible { background: var(--chip-bg); color: var(--ink); }
  .nav .sub a[aria-current] { background: var(--chip-on); color: var(--chip-on-ink); }
}

/* While the Menu is open its panel already lists the categories, so the pill bars step out of the way. */
@media (min-width: 64rem) {
  nav.nav:not(.nav-float) { transition: opacity .35s ease; }
  html:has(#tn-drawer[open]) nav.nav, html:has(#tn-drawer[open]) .nav-float { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s ease, visibility 0s linear .3s; }
}

/* ---- Phone / tablet: the same clean look as the desktop layout ---- */
.g-title a, .hero-title a, .feat-title a { text-decoration: none; }
@media (max-width: 63.999rem) {
  /* category tabs become the same grey pills */
  .tabs { height: auto; border-bottom: 0; }
  .tabs ul { gap: 8px; padding: 10px 16px 12px; scroll-padding-inline: 16px; }
  .tabs a { height: auto; min-width: 0; padding: 9px 16px; border-radius: 16px; background: var(--chip-bg); color: var(--ink); font-size: 14px; font-weight: 500; }
  .tabs a[aria-current] { background: var(--chip-on); color: var(--chip-on-ink); font-weight: 500; }
  .tabs a[aria-current]::after { display: none; }
  /* back chip and category chip share one row; the long article title is left out */
  nav[aria-label="パンくずリスト"] { flex-wrap: nowrap; gap: 10px; padding-top: 14px; margin-bottom: 14px; }
  .crumb-back { min-height: 38px; padding: 0 16px 0 12px; font-size: 15px; flex: none; }
  .crumbs { flex: 1 1 auto; min-width: 0; font-size: 14px; }
  .crumbs li { min-width: 0; }
  .crumbs a { min-height: 38px; padding: 0 16px; white-space: nowrap; }
  .single .crumbs li[aria-current] { display: none; }
}

/* ---- Phone header: logo on the left; search, account, light/dark switch and menu on the right, in that order ---- */
@media (max-width: 63.999rem) {
  .mast-bar { display: flex; align-items: center; gap: 2px; padding-inline: 14px 8px; }
  .mast-bar .l, .mast-bar .r { display: contents; }
  body .mast-bar > .tn-logo { order: 0; margin-right: auto; width: 112px; flex: none; }
  .mast-bar .l > a.icon-btn { order: 1; }
  .mast-bar .r > .tn-hdr-login, .mast-bar .r > .tn-hdr-user { order: 2; }
  .mast-bar .r > .theme-sw { order: 3; margin-inline: 6px 4px; }
  .mast-bar .l > .drawer { order: 4; }
}

/* ---- Phone menu panel: same rounded look as the desktop menu ---- */
@media (max-width: 63.999rem) {
  .drawer-head { min-height: 68px; padding: 0 20px; }
  .drawer-head .tn-logo { width: 168px; }
  .drawer-footer { background: none; border-top: 1px solid var(--rule); }
  .drawer-footer .btn { border-radius: 999px; min-height: 50px; }
  .drawer-footer .btn--line { border-width: 1.5px; }
}

/* Phone menu: the panel slides in from the right, with its own close button. */
@media (max-width: 63.999rem) {
  .drawer-panel { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--rule-strong); box-shadow: none; }
  .drawer-head { justify-content: space-between; padding: 0 10px 0 20px; }
  .drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; color: var(--ink); cursor: pointer; }
  .drawer-close svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: square; }
}

/* Phone: the panel has its own close button, so the header hamburger keeps its shape instead of flipping to an X behind the opening sheet. */
@media (max-width: 63.999rem) {
  .drawer[open] .tn-ico-close { display: none; }
  .drawer[open] .tn-ico-open { display: block; }
  /* The hamburger stays where it is; the sheet (and later the panel) simply covers it. */
  #tn-drawer[open] > summary { z-index: 1; }
  html { scrollbar-gutter: stable; }
}
.drawer-panel:focus, .drawer-panel:focus-visible { outline: 0; }
.ph-fb { border-top: 0; }

/* Phone: inside an article the category tab strip is not needed. */
@media (max-width: 63.999rem) { .single .tabs { display: none; } }

/* Phone: the same frosted floating bar as on the desktop, slimmer. */
@media (max-width: 63.999rem) {
  .dock { display: flex; align-items: center; justify-content: space-between; position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 56px; box-sizing: border-box; padding: 0 8px 0 14px;
          background: color-mix(in srgb, var(--paper) 62%, transparent); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
          border-bottom: 1px solid var(--rule); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35);
          transform: translateY(-110%); opacity: 0; visibility: hidden;
          transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s linear .45s; }
  .dock.is-on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .dock-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
  .dock-mark, .dock-word { display: block; background: currentColor; -webkit-mask: var(--m) no-repeat center / contain; mask: var(--m) no-repeat center / contain; }
  .dock-mark { --m: url("../brand/logo-mark.svg"); width: 26px; height: 26px; }
  .dock-word { --m: url("../brand/logo-wordmark.svg"); width: 124px; height: 21px; }
  .dock-r { display: flex; align-items: center; gap: 2px; }
  .dock .hdr-search { display: flex; margin: 0; }
  .dock .hdr-search-input { display: none; }
  .dock .hdr-search-btn, .dock-login { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink); }
  .dock .hdr-search-btn svg, .dock-login svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .dock-r .theme-sw { margin-inline: 4px 2px; }
  .dock .menu-pill { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); }
  .dock .menu-pill span { display: none; }
  .dock .menu-pill svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
}
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }

/* Phone: the back button rides in the same sticky rail and stays under the floating bar. */
@media (max-width: 63.999rem) {
  nav[aria-label="パンくずリスト"] { min-height: 38px; }
  .crumb-rail { position: sticky; top: 62px; height: 0; z-index: 60; }
  .crumb-rail .crumb-back { position: absolute; left: 0; top: 14px; box-shadow: 0 0 0 rgba(0, 0, 0, 0); transition: box-shadow .35s ease; }
  .crumb-rail.is-stuck .crumb-back { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .14); }
}

/* While the menu is open, its dimming layer and panel sit above the floating bar, the pill bar and the back button. */
html:has(#tn-drawer[open]) .dock, html:has(#tn-drawer[open]) .nav-float, html:has(#tn-drawer[open]) .crumb-rail, html:has(#tn-drawer[open]) .tn-bottom-bar { z-index: 0 !important; }

/* Phone: the article's text-size control lives in the menu instead of the bottom bar. */
.drawer-fontsize { display: none; }
@media (max-width: 63.999rem) {
  .drawer-fontsize { display: block; padding: 18px 20px 6px; }
  .drawer-fs-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; margin-top: 8px; padding: 0 22px 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
  .drawer-fs-btn .tn-bar-text-ico { font-size: 20px; font-weight: 700; line-height: 1; }
  .drawer-fs-btn .tn-bar-text-ico small { font-size: 12px; font-weight: 500; }
  .tn-bar-btn[data-tn-fontsize-toggle] { display: none; }
}

/* ---- Reading colour: the old site's cream "washi" paper on article pages, daytime only (night colours never change) ---- */
:root[data-paper="washi"][data-theme="light"] body,
:root[data-paper="washi"]:not([data-theme]) body {
  --paper: #F6F1E6; --paper-2: #EDE5D3; --paper-3: #E3D9C2;
  --ink: #1B1814; --ink-2: #463F35; --ink-3: #665D4F;
  --rule: #CBBFA5; --rule-strong: #1B1814;
  --hdr-bg: rgba(246,241,230,.97); --fade-from: rgba(246,241,230,0); --fade-to: #F6F1E6;
  --chip-bg: #E8E0CD; --chip-bg-hover: #DDD3BC;
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root[data-paper="washi"]:not([data-theme="light"]):not([data-theme="dark"]) body { --paper: #121212; }
}
.drawer-fs-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.drawer-fs-row > * { box-sizing: border-box; height: 46px; min-height: 46px; margin: 0; }
.drawer-paper-pill { display: inline-flex; align-items: center; gap: 12px; padding: 0 16px 0 22px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); font-size: 15px; font-weight: 500; }
.paper-swatch { position: relative; box-sizing: border-box; flex: none; width: 26px; height: 26px; margin: 0; padding: 0; border: 1.5px solid #1B1814; border-radius: 50%; cursor: pointer; }
.paper-swatch[data-tn-paper-set="white"] { background: #FFFFFF; }
.paper-swatch[data-tn-paper-set="washi"] { background: #F6F1E6; }
.paper-swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #1B1814; }
:root[data-theme="dark"] .drawer-paper-pill { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .drawer-paper-pill { display: none; } }

/* Phone: the article actions (save, share) are a small floating pill with icons only; no full-width bar, no table-of-contents button. */
@media (max-width: 63.999rem) {
  .tn-bottom-bar { left: auto; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: auto; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 999px;
                   background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
                   box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .1); }
  .tn-bottom-bar-inner { min-width: 0; max-width: none; gap: 2px; justify-content: center; }
  .tn-bottom-bar .tn-bar-btn { min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
  .tn-bottom-bar .tn-bar-btn > span:not(.tn-bar-text-ico) { display: none; }
  .tn-bottom-bar .tn-bar-svg { width: 21px; height: 21px; }
  .tn-bottom-bar .tn-bar-btn[href="#tn-article-toc"] { display: none; }
}

/* Phone: while scrolling back up, a small switcher floats under the bar: current section + arrow that opens the other sections. */
.tab-float { display: none; }
@media (max-width: 63.999rem) {
  .tab-float { display: block; position: fixed; z-index: 69; top: 76px; left: 14px; right: 14px; pointer-events: none;
               transform: translateY(-140%); opacity: 0; visibility: hidden; transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .25s ease, visibility 0s linear .4s; }
  .tab-float.is-on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .tab-float { text-align: right; }
  .tf-bar { display: inline-flex; align-items: center; gap: 6px; pointer-events: auto; }
  .tf-cur, .tf-arrow { border: 0; cursor: pointer; font: inherit; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4), 0 1px 4px rgba(0, 0, 0, .12); }
  .tf-cur { min-height: 40px; padding: 0 20px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 84%, #000); color: var(--ink); font-size: 15px; font-weight: 700; }
  .tf-arrow { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: color-mix(in srgb, var(--paper) 84%, #000); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
  .tf-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
  .tab-float.is-open .tf-arrow svg { transform: rotate(180deg); }
  .tf-list { list-style: none; margin: 8px 0 0 auto; padding: 8px; display: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 340px; text-align: left; border: 1px solid var(--rule); border-radius: 20px; background: var(--paper); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .4); pointer-events: auto; }
  .tab-float.is-open .tf-list { display: flex; }
  .tf-list a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 14px; background: var(--chip-bg); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
  html:has(#tn-drawer[open]) .tab-float { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* With the menu open the see-through floating bar would show page text behind it, so it is simply taken away. */
html:has(#tn-drawer[open]) .dock { opacity: 0 !important; visibility: hidden !important; transition: none !important; }

/* Phone: back button and section switcher share one height and one baseline. */
@media (max-width: 63.999rem) {
  .crumb-back { height: 40px; min-height: 40px; box-sizing: border-box; }
  .tf-cur { height: 40px; box-sizing: border-box; }
}

/* Phone: once it has reached the share block, the save/share pill stays there and scrolls with the page. */
@media (max-width: 63.999rem) {
  .tn-bottom-bar.is-docked { position: absolute; bottom: auto; }
}

/* Phone: the share block is one tidy unit: the heading on top, then the share button with the save/share pill beside it on the same row. */
@media (max-width: 63.999rem) {
  .art-share { display: grid; grid-template-columns: minmax(0, 1fr) 126px; align-items: center; column-gap: 12px; row-gap: 12px; padding-top: 12px; }
  .art-share > span { grid-column: 1 / -1; grid-row: 1; }
  .art-share .share { grid-column: 1; grid-row: 2; width: 100%; }
  .art-share::after { content: ""; grid-column: 2; grid-row: 2; height: 54px; }
}

/* Desktop menu: the paper-colour switch is here too (the text-size control stays in the article toolbar). */
@media (min-width: 64rem) {
  .drawer-fontsize { display: block; padding: 18px 28px 8px; }
  .drawer-fs-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 22px 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
  .drawer-fs-btn .tn-bar-text-ico { font-size: 20px; font-weight: 700; line-height: 1; }
  .drawer-fs-btn .tn-bar-text-ico small { font-size: 12px; font-weight: 500; }
}

/* ---- Desktop: save and copy-link icon buttons next to the X button, with small animations ---- */
.share-ic { display: none; }
@media (min-width: 64rem) {
  .art-share .share { flex-wrap: nowrap; }
  .share-ic { display: inline-flex; position: relative; width: 44px; min-width: 44px; padding: 0; border-radius: 2px; cursor: pointer; overflow: visible; transition: background .2s ease, transform .2s ease; }
  .share-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 60%; }
  .share-ic:active { transform: scale(.92); }
  /* little label that floats up on hover */
  .share-ic::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1); }
  .share-ic:hover::after, .share-ic:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
  /* bookmark: hovers with a small tilt, fills and pops when saved */
  .share-ic:hover .ic-save { animation: ic-tilt .5s ease; }
  .tn-clip-btn.is-clipped .ic-save { fill: currentColor; animation: ic-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
  /* share arrow: lifts up out of the tray on hover, flies on click */
  .share-ic:hover .ic-share { animation: ic-lift .6s ease; }
  .share-ic:active .ic-share { animation: ic-fly .35s ease-in; }
  /* copied: the tip turns into a confirmation */
  .share-done { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; white-space: nowrap; pointer-events: none; }
  .share-done:empty { display: none; }
  .share-ic:has(.share-done:not(:empty))::after { opacity: 0; }
}
@keyframes ic-tilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-14deg); } 65% { transform: rotate(10deg); } }
@keyframes ic-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes ic-lift { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 70% { transform: translateY(1px); } }
@keyframes ic-fly { 0% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(-12px); opacity: 0; } 61% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .share-ic svg, .share-ic::after { animation: none !important; transition: none; } }

/* =====================================================================
   Account page (signed in) and My Library (saved articles / history): same rounded, quiet look as the rest of the site
   ===================================================================== */
.tn-member-hub { border: 0; border-radius: 28px; background: var(--chip-bg); padding: 28px 30px; box-shadow: none; }
.tn-member-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-bottom: 0; padding-bottom: 8px; }
.tn-member-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tn-member-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--chip-on); color: var(--chip-on-ink); font-size: 26px; font-weight: 700; flex: none; }
.tn-member-head-acts { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.tn-member-hub .btn { border-radius: 999px; min-height: 44px; padding: 0 22px; }
.tn-member-hub .btn--line { background: var(--paper); border-color: transparent; }
.tn-member-hub .my-dl, .tn-member-hub .my-note, .tn-checkout-return { border: 0; border-radius: 20px; background: var(--paper); padding: 18px 22px; }
.tn-member-hub .my-note { margin-top: 14px; }
.tn-member-hub .seal { border-radius: 999px; padding: 3px 12px; }

/* library entry cards on the account page */
.tn-member-library-hub .sec-head { border-top: 0; padding-top: 0; }
.tn-member-library-grid { gap: 16px; }
.tn-library-entry-card { border: 0; border-top: 0; border-radius: 24px; background: var(--chip-bg); padding: 26px 28px; transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .2s ease; }
.tn-library-entry-card:hover { transform: translateY(-4px); background: var(--chip-bg-hover); text-decoration: none; }
.tn-library-entry-count strong { font-size: 40px; font-weight: 700; line-height: 1; }

/* My Library pages */
.tn-library-nav { display: flex; gap: 8px; margin: 6px 0 22px; }
.tn-library-nav .btn { border-radius: 999px; min-height: 42px; padding: 0 22px; border-color: transparent; background: var(--chip-bg); color: var(--ink); }
.tn-library-nav .btn.is-active { background: var(--chip-on); color: var(--chip-on-ink); }
.tn-library-summary { padding: 18px 22px; border-radius: 20px; background: var(--chip-bg); border: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tn-library-summary p { margin: 0; }
.tn-library-summary .btn { border-radius: 999px; }
.tn-member-lib-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.tn-member-lib-item { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px; border: 0; border-radius: 24px; background: var(--chip-bg); position: relative; transition: background .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1); }
.tn-member-lib-item:hover { background: var(--chip-bg-hover); transform: translateY(-2px); }
.tn-lib-thumb .ph { border-radius: 16px; aspect-ratio: 16 / 10; overflow: hidden; }
.tn-lib-item-main { min-width: 0; }
.tn-lib-item-main .hd { text-decoration: none; }
.tn-lib-item-main h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.tn-member-lib-item .tn-clip-btn { position: relative; z-index: 2; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; border-color: transparent; background: var(--paper); font-size: 0; display: inline-grid; place-items: center; }
.tn-member-lib-item .tn-clip-btn::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .25s ease; }
.tn-member-lib-item .tn-clip-btn:hover::before { transform: rotate(-12deg) scale(1.1); }
.tn-lib-empty { text-align: center; padding: 54px 24px; border-radius: 28px; background: var(--chip-bg); margin-top: 22px; }
.tn-lib-empty p { margin: 0 0 18px; color: var(--ink-2); }
.tn-lib-empty .btn, .tn-library-back .btn, .tn-library-pagination .btn { border-radius: 999px; min-height: 44px; padding: 0 24px; }
.tn-library-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.tn-library-back { margin-top: 28px; }
@media (max-width: 47.999rem) {
  .tn-member-hub { padding: 20px; border-radius: 24px; }
  .tn-member-head-acts { margin-left: 0; width: 100%; }
  .tn-member-lib-item { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; padding: 10px; border-radius: 20px; }
  .tn-lib-thumb .ph { border-radius: 12px; aspect-ratio: 1 / 1; }
}

/* Account and library pages: no category pill bars; a floating "← ホーム" button takes their place. */
body.tn-account nav.nav, body.tn-account .nav-float, body.tn-account .tabs, body.tn-account .tab-float { display: none !important; }

/* Menu panel: shortcuts to saved articles and reading history, right under the search box (signed-in readers) */
.drawer-lib { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 28px 4px; }
@media (max-width: 63.999rem) { .drawer-lib { padding: 14px 20px 2px; } }
.drawer-lib-link { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; min-height: 46px; padding: 0 10px 0 16px; box-sizing: border-box; border-radius: 999px; background: var(--chip-bg); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1); }
.drawer-lib-link:hover { background: var(--chip-bg-hover); transform: translateY(-2px); }
.drawer-lib-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.drawer-lib-link b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

/* Account / library pages on phones and tablets, plus the gap under the Home button everywhere */
body.tn-account nav[aria-label="パンくずリスト"] { margin-bottom: 22px; }
.tn-member-dl .my-tone, .tn-member-dl .seal, .my-dl .my-tone { border-radius: 999px; padding: 4px 14px; white-space: nowrap; border-color: var(--rule); background: var(--chip-bg); font-weight: 500; }
@media (max-width: 47.999rem) {
  .tn-member-head-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .tn-member-head-acts .btn { justify-content: center; padding: 0 12px; white-space: nowrap; font-size: 14px; }
  .tn-member-dl { display: grid; grid-template-columns: 1fr; row-gap: 4px; }
  .tn-member-dl dt { margin-top: 10px; }
  .tn-member-dl dd { margin: 0; text-align: left; }
}

/* Signed-in header: the account button is the same person-icon button as the login one, labelled マイページ (no user id shown). */
.mast-bar .r > .sub-cta { display: inline-flex; }

/* Menu panel, signed in: "マイページ" button (person icon) on top, then the membership introduction button; no user id shown. */
.drawer-mypage { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.drawer-mypage svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* the two library shortcuts: equal columns, icon | label | count aligned the same in both */
.drawer-lib-link > span { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.drawer-lib-link b { justify-self: end; }
@media (max-width: 23.5rem) { .drawer-lib-link { padding-left: 12px; column-gap: 6px; font-size: 13px; } }

/* Footer at in-between window widths (tablet, narrow desktop window): the logo keeps its own height so the tagline never sits on it, and the address and company links share one row. */
.foot .about .tn-logo { display: block; height: auto; }
.foot .about .tn-logo img { display: block; width: 100%; height: auto; }
.foot .about .tag { margin: 16px 0 0; }
@media (min-width: 40rem) and (max-width: 63.999rem) {
  .foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; row-gap: 8px; align-items: start; }
  .foot-grid .about { grid-column: 1 / -1; }
  .foot-grid .foot-company { grid-column: 1; }
  .foot-grid .foot-company-links { grid-column: 2; justify-self: start; }
  .foot-company { font-size: 14px; line-height: 1.9; }
  .foot-company strong { font-size: 16px; margin-bottom: 8px; }
  .foot-company-links h3 { margin-bottom: 10px; font-size: 16px; }
  .foot-company-links ul { font-size: 14px; }
  .foot-company-links li + li::before { margin: 0 10px; }
}

/* In-between widths: the partner banners wrap onto a second line instead of running off the right edge. */
@media (min-width: 40rem) and (max-width: 63.999rem) {
  .foot-partners { flex-wrap: wrap; justify-content: center; gap: 22px 26px; }
  .foot-partners img { height: 110px; max-width: 100%; }
}

/* Footer on phones: one tidy left-aligned column with an even rhythm (logo + tagline, company details, company links). */
@media (max-width: 47.999rem) {
  .foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 26px 0 8px; }
  .foot .about .tag { margin: 12px 0 0; font-size: 13px; line-height: 1.6; }
  .foot .about .desc { display: none; }
  .foot-company { padding: 22px 0 0; margin-top: 22px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.8; }
  .foot-company strong { margin: 0 0 8px; font-size: 16px; }
  .foot-company-links { padding: 18px 0 0; margin-top: 18px; border-top: 1px solid var(--rule); }
  .foot-company-links h3 { margin: 0 0 8px; font-size: 15px; }
  .foot-company-links ul { gap: 2px 0; font-size: 14px; line-height: 1.9; }
  .foot-company-links li + li::before { margin: 0 12px; }
  .foot-bot { margin-top: 20px; }
}

.foot-company .foot-hours { margin-top: 12px; }
.foot-company .foot-hours b { font-weight: 700; color: var(--ink-2); }

/* Upgrade card on My Page: leads free members to the plan introduction. */
.tn-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 26px 0 0; padding: 26px 30px; border-radius: 28px; background: var(--chip-on); color: var(--chip-on-ink); }
.tn-upgrade .tn-sec-kicker, .tn-upgrade .dek { color: inherit; opacity: .78; }
.tn-upgrade .hd { margin: 4px 0 6px; color: inherit; }
.tn-upgrade .btn { border-radius: 999px; min-height: 46px; padding: 0 26px; background: var(--chip-on-ink); color: var(--chip-on); border-color: transparent; }
@media (max-width: 47.999rem) { .tn-upgrade { padding: 22px; border-radius: 24px; } .tn-upgrade .btn { width: 100%; justify-content: center; } }

/* Phone: the two library shortcuts in the Menu drop their icons so "保存した記事" is not cut off. */
@media (max-width: 30rem) {
  .drawer-lib-link { grid-template-columns: minmax(0, 1fr) auto; padding: 0 10px 0 16px; font-size: 13.5px; }
  .drawer-lib-link svg { display: none; }
}
