:root {
    --ink-width: 1420px;
    --ink-text: #222;
    --ink-muted: #686868;
    --ink-line: #b9b9b9;
    --ink-paper: #fbfaf7;
}

[v-cloak] { display: none !important; }
html { scroll-behavior: smooth; }
body.home-ink-page {
    margin: 0;
    color: var(--ink-text);
    background: #fbfaf7;
    font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
}

.ink-page-width,
.home-ink-page .footer-inner {
    width: min(var(--ink-width), 91%);
    margin-left: auto;
    margin-right: auto;
}

/* Header / Menu 樣式統一由 common.css 提供 */

/* Hero */
.ink-hero-wrap {
    padding: 16px 0 18px;
    background: #fff;
}
.ink-hero-frame {
    width: min(1460px, 92%);
    height: 274px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 2px solid #202020;
    background:
        linear-gradient(rgba(255,255,255,.79), rgba(255,255,255,.79)),
        url("/images/paper-texture.png");
}
.ink-hero-frame::before,
.ink-hero-frame::after {
    content: "";
    position: absolute;
    z-index: 6;
    background: #222;
}
.ink-hero-frame::before {
    width: calc(100% + 16px);
    height: 1px;
    left: -8px;
    top: 7px;
    opacity: .45;
}
.ink-hero-frame::after {
    width: 1px;
    height: calc(100% + 16px);
    top: -8px;
    left: 7px;
    opacity: .45;
}
.ink-hero-mountains {
    position: absolute;
    inset: 0;
    opacity: .14;
    background: url("/images/ink-mountain.png") center 82% / 100% auto no-repeat;
    filter: grayscale(1);
}
.ink-hero-person {
    position: absolute;
    z-index: 2;
    bottom: -2px;
    width: 34%;
    height: 105%;
    pointer-events: none;
    filter: grayscale(1);
    opacity: .88;
}
.ink-hero-person img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
}
.ink-hero-person-left { left: -3%; }
.ink-hero-person-right { right: -3%; }
.ink-hero-center {
    width: 58%;
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -48%);
    text-align: center;
}
.ink-hero-center h1 {
    margin: 0 0 20px;
    color: #070707;
    font-family: "DFKai-SB", "BiauKai", "Kaiti TC", "STKaiti", serif;
    font-size: clamp(45px, 4.7vw, 70px);
    font-weight: 700;
    letter-spacing: .15em;
    line-height: 1.1;
    text-shadow: 0 0 0 #000;
}
.ink-hero-slogan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.ink-hero-slogan span {
    width: 58px;
    height: 1px;
    background: #333;
}
.ink-hero-slogan strong {
    font-size: 21px;
    font-weight: 500;
    letter-spacing: .2em;
}
.ink-hero-corner-copy {
    position: absolute;
    z-index: 7;
    right: 8%;
    top: 20px;
    font-family: "DFKai-SB", "BiauKai", "Kaiti TC", serif;
    font-size: 18px;
    letter-spacing: .12em;
}

/* Intro */
.ink-intro-section {
    position: relative;
    padding: 20px 0 17px;
    overflow: hidden;
    background:
        linear-gradient(rgba(251,250,247,.94), rgba(251,250,247,.94)),
        url("/images/paper-texture.png");
}
.ink-intro-section::after {
    content: "";
    width: 330px;
    height: 150px;
    position: absolute;
    right: 0;
    bottom: -30px;
    opacity: .15;
    background: url("/images/ink-mountain.png") right bottom / contain no-repeat;
    filter: grayscale(1);
}
.ink-intro-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}
.ink-intro-inner h2 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .06em;
}
.ink-intro-inner p {
    max-width: 1160px;
    margin: 1px auto;
    color: #555;
    font-size: 12px;
    line-height: 1.8;
}

/* Entry cards */
.ink-entry-section {
    padding: 4px 0 14px;
    background:
        linear-gradient(rgba(251,250,247,.95), rgba(251,250,247,.95)),
        url("/images/paper-texture.png");
}
.ink-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.ink-entry-card {
    min-height: 108px;
    position: relative;
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr) 26px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #aaa;
    border-radius: 3px;
    color: #222;
    background: rgba(255,255,255,.8);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ink-entry-card:hover {
    transform: translateY(-2px);
    border-color: #666;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.ink-entry-visual {
    height: auto;
    min-height: 108px;
    align-self: stretch;
    overflow: hidden;
    background: #f4f2ee;
}
.ink-entry-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: grayscale(1);
    opacity: .88;
}
.ink-entry-copy {
    align-self: center;
    padding: 10px 14px 10px 10px;
}
.ink-entry-copy h3 {
    margin: 0 0 7px;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .08em;
}
.ink-entry-copy p {
    margin: 0;
    color: #555;
    font-size: 17px;
    line-height: 1.62;
}
.ink-entry-arrow {
    align-self: center;
    font-family: Arial, sans-serif;
    font-size: 33px;
    color: #333;
}


/* Latest + Member rights */
.ink-home-feature-section {
    padding: 18px 0 20px;
    border-top: 1px solid #e4e0d8;
    border-bottom: 1px solid #e0ddd6;
    background:
        linear-gradient(rgba(249,248,244,.97), rgba(249,248,244,.97)),
        url("/images/paper-texture.png");
}
.ink-home-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(340px, .82fr);
    gap: 24px;
    align-items: start;
}
.ink-main-panels {
    min-width: 0;
    display: grid;
    gap: 24px;
}
.ink-library-panel,
.ink-latest-panel,
.ink-rights-panel {
    min-width: 0;
    border: 1px solid #c8c2b8;
    background: rgba(255,255,255,.82);
}
.ink-library-panel,
.ink-latest-panel {
    padding: 18px 20px 20px;
}
.ink-rights-panel {
    position: relative;
    overflow: hidden;
    padding: 18px 20px 16px;
    background:
        linear-gradient(rgba(246,244,239,.94), rgba(246,244,239,.94)),
        url("/images/paper-texture.png");
}
.ink-rights-panel::after {
    content: "";
    width: 260px;
    height: 118px;
    position: absolute;
    right: -36px;
    bottom: -32px;
    opacity: .08;
    background: url("/images/ink-mountain.png") right bottom / contain no-repeat;
    filter: grayscale(1);
    pointer-events: none;
}
.ink-panel-heading {
    min-height: 48px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    margin-bottom: 12px;
    border-bottom: 1px solid #d8d2c8;
}
.ink-panel-kicker {
    display: block;
    margin-bottom: 2px;
    color: #8a8379;
    font-family: Arial, sans-serif;
    font-size: 8.5px;
    letter-spacing: .2em;
}
.ink-panel-heading h2 {
    margin: 0;
    padding-left: 13px;
    position: relative;
    font-size: 20px;
    letter-spacing: .11em;
}
.ink-panel-heading h2::before {
    content: "";
    width: 3px;
    height: 22px;
    position: absolute;
    left: 0;
    top: 50%;
    background: #1d1d1d;
    transform: translateY(-50%);
}
.ink-panel-heading-rights {
    padding-bottom: 4px;
    margin-bottom: 6px;
    border-bottom: 0;
}

.ink-panel-note {
    color: #817a70;
    font-size: 10px;
    white-space: nowrap;
}

/* Latest */
.ink-latest-list {
    display: grid;
    gap: 10px;
}
.ink-latest-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 146px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #d0c9bf;
    background: rgba(255,255,255,.88);
}
.ink-latest-thumb {
    height: 112px;
    overflow: hidden;
    display: block;
    position: relative;
    background: #f2f0ec;
}
.ink-latest-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(.9);
    transition: transform .2s ease;
}
.ink-latest-card:hover .ink-latest-thumb img { transform: scale(1.035); }
.ink-latest-copy { padding: 10px 13px; }
.ink-latest-copy h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.45;
}
.ink-latest-copy h3 a { color: #222; text-decoration: none; }
.ink-latest-copy h3 span { font-weight: 700; }
.ink-latest-copy p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: #666;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ink-latest-meta {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 9px;
}
.ink-latest-meta span + span::before {
    content: "｜";
    margin-right: 8px;
    color: #aaa;
}
.ink-state {
    padding: 32px;
    border: 1px solid #ddd;
    color: #777;
    text-align: center;
    font-size: 12px;
}
.ink-state-error { color: #8d3333; }


/* Compact online library inside latest panel */
.ink-home-books {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #d8d2c8;
}
.ink-home-books-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}
.ink-home-books-heading h3 {
    margin: 1px 0 0;
    color: #282521;
    font-size: 15px;
    letter-spacing: .11em;
}
.ink-home-books-heading a {
    color: #756d63;
    text-decoration: none;
    font-size: 10px;
    white-space: nowrap;
}
.ink-home-books-heading a:hover { color: #2d2924; }
.ink-home-books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.ink-home-book-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 8px;
    border: 1px solid #d5cec3;
    background: rgba(251,249,245,.9);
    color: #2f2a24;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.ink-home-book-card:hover {
    transform: translateY(-1px);
    border-color: #a89f92;
    background: #fff;
}
.ink-home-book-card-free {
    position: relative;
    border-color: #b6aa98;
    background: linear-gradient(135deg, rgba(250,247,239,.98), rgba(245,241,231,.95));
}
.ink-home-book-cover-wrap {
    width: 64px;
    height: 82px;
    position: relative;
    overflow: visible;
}
.ink-home-book-cover {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: 1px solid #c9c1b5;
    background: #f0ede7;
    filter: saturate(.8);
}
.ink-home-book-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px;
    text-align: center;
    background:
        linear-gradient(rgba(247,244,237,.95), rgba(247,244,237,.95)),
        url("/images/paper-texture.png");
}
.ink-home-book-cover-placeholder span {
    color: #8a8176;
    font-size: 8px;
    letter-spacing: .14em;
}
.ink-home-book-cover-placeholder strong {
    display: -webkit-box;
    overflow: hidden;
    color: #35302a;
    font-family: "Noto Serif TC", "Songti TC", serif;
    font-size: 9px;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.ink-home-book-free-badge {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 4px;
    padding: 3px 2px;
    border: 1px solid rgba(255,255,255,.75);
    background: rgba(54,55,49,.9);
    color: #fff;
    text-align: center;
    font-size: 7.5px;
    letter-spacing: .03em;
    white-space: nowrap;
}
.ink-home-book-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}
.ink-home-book-copy strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ink-home-book-copy span {
    display: -webkit-box;
    overflow: hidden;
    color: #81796e;
    font-size: 8.5px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ink-home-book-copy .ink-home-book-free-note {
    color: #6f4e35;
    font-weight: 700;
}
.ink-home-books-state {
    padding: 14px;
    border: 1px dashed #d4cdc2;
    color: #81796e;
    text-align: center;
    font-size: 10px;
}

/* Member rights */
.ink-rights-purchase-note {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid #bdb4a7;
    background: rgba(250,247,240,.98);
}
.ink-rights-purchase-note strong {
    color: #241f1b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .035em;
}
.ink-rights-purchase-note span {
    color: #342f2a;
    font-size: 15px;
    line-height: 1.75;
}

.ink-rights-guest-note {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-left: 3px solid #8d877e;
    background: rgba(255,255,255,.58);
}
.ink-rights-guest-note strong {
    font-size: 12px;
    letter-spacing: .06em;
}
.ink-rights-guest-note span {
    color: #70695f;
    font-size: 10.5px;
    line-height: 1.55;
}
.ink-rights-steps {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
}
.ink-rights-step {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0 11px;
    border-bottom: 1px solid #d7d1c7;
}
.ink-rights-step:last-child { border-bottom: 0; }
.ink-rights-step:not(:last-child)::after {
    content: "";
    width: 1px;
    position: absolute;
    left: 18px;
    top: 37px;
    bottom: -10px;
    background: #b9b2a8;
}
.ink-rights-step-index {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #aaa298;
    border-radius: 50%;
    color: #5b544b;
    background: #f8f6f1;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: .06em;
}
.ink-rights-step-copy { min-width: 0; }
.ink-rights-level {
    margin-bottom: 2px;
    color: #4e4841;
    font-size: 10px;
    letter-spacing: .07em;
}
.ink-rights-step h3 {
    margin: 0 0 3px;
    color: #282521;
    font-size: 15px;
    letter-spacing: .04em;
}
.ink-rights-step p {
    margin: 0;
    color: #403b35;
    font-size: 10.5px;
    line-height: 1.58;
}
.ink-rights-step-pro .ink-rights-step-index {
    border-color: #7d756b;
}
.ink-rights-step-vip .ink-rights-step-index {
    border-color: #3f3c38;
    color: #fff;
    background: #3f3c38;
}
.ink-rights-step-vip h3 { font-weight: 700; }
.ink-rights-notes {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed #cbc4ba;
    color: #000000;
    font-size: 9px;
    line-height: 1.55;
}

/* Member */
.ink-member-section {
    min-height: 105px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background: linear-gradient(to bottom, #f7f6f3, #f2f1ee);
}
.ink-member-mountain {
    width: 430px;
    height: 145px;
    position: absolute;
    bottom: -45px;
    opacity: .14;
    background: url("/images/ink-mountain.png") center bottom / contain no-repeat;
    filter: grayscale(1);
}
.ink-member-mountain-left { left: -50px; }
.ink-member-mountain-right { right: -50px; transform: scaleX(-1); }
.ink-member-inner {
    min-height: 105px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 17px;
    max-width: 900px;
}
.ink-member-icon {
    width: 31px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #222;
    border-radius: 50%;
    color: #222;
    font-size: 9px;
}
.ink-member-copy h2 {
    margin: 0 0 3px;
    font-size: 20px;
    letter-spacing: .14em;
}
.ink-member-copy p {
    margin: 0;
    color: #555;
    font-size: 10.5px;
    line-height: 1.65;
}
.ink-member-actions { display: flex; gap: 16px; }
.ink-button {
    min-width: 118px;
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
}
.ink-button-light { color: #222; background: #fff; }
.ink-button-dark { color: #fff; background: #292929; }

/* Footer */
.home-ink-page .site-footer { background: #fff; }
.home-ink-page .footer-inner {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #777;
    font-size: 10px;
}
.home-ink-page .footer-nav { display: flex; gap: 20px; }
.home-ink-page .footer-nav a { color: #666; text-decoration: none; }
.home-ink-page .back-to-top {
    width: 40px;
    height: 40px;
    position: fixed;
    right: 26px;
    bottom: 22px;
    z-index: 40;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #252525;
    font-size: 19px;
    cursor: pointer;
}

@media (max-width: 1120px) {
    .ink-entry-grid { gap: 14px; }
    .ink-entry-card { grid-template-columns: 115px minmax(0, 1fr) 22px; }
    .ink-home-feature-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .82fr); gap: 16px; }
    .ink-latest-card { grid-template-columns: 120px minmax(0, 1fr); }
    .ink-home-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .ink-hero-frame { height: 250px; }
    .ink-hero-person { width: 45%; opacity: .5; }
    .ink-hero-center { width: 80%; }
    .ink-hero-corner-copy { display: none; }
    .ink-entry-grid { grid-template-columns: 1fr; }
    .ink-home-feature-grid { grid-template-columns: 1fr; }
    .ink-main-panels { order: 1; }
    .ink-rights-panel { order: 2; }
    .ink-entry-card { min-height: 100px; grid-template-columns: 135px minmax(0, 1fr) 28px; }
    .ink-latest-card { grid-template-columns: 135px minmax(0, 1fr); }
    .ink-home-books-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ink-member-inner { max-width: 91%; grid-template-columns: 40px 1fr; padding: 18px 0; }
    .ink-member-actions { grid-column: 2; }
}

@media (max-width: 560px) {
    .ink-hero-wrap { padding-top: 10px; }
    .ink-hero-frame { width: 94%; height: 220px; }
    .ink-hero-center { width: 92%; }
    .ink-hero-center h1 { font-size: 37px; letter-spacing: .08em; }
    .ink-hero-slogan strong { font-size: 14px; }
    .ink-hero-slogan span { width: 28px; }
    .ink-intro-inner h2 { font-size: 16px; line-height: 1.6; }
    .ink-intro-inner p { text-align: left; }
    .ink-entry-card { grid-template-columns: 105px minmax(0, 1fr) 22px; }
    .ink-entry-copy p br { display: none; }
    .ink-latest-card { grid-template-columns: 105px minmax(0, 1fr); }
    .ink-home-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ink-home-book-card { grid-template-columns: 54px minmax(0, 1fr); }
    .ink-home-book-cover-wrap { width: 54px; height: 72px; }
    .ink-member-inner { grid-template-columns: 34px 1fr; }
    .ink-member-actions { gap: 8px; flex-wrap: wrap; }
    .ink-panel-heading { align-items: flex-start; }
    .ink-panel-note { white-space: normal; text-align: right; }
    .ink-button { min-width: 95px; }
    .home-ink-page .footer-inner { padding: 15px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
    .home-ink-page .footer-nav { flex-wrap: wrap; gap: 8px 15px; }
}

/* 2026-08-27 homepage library emphasis */
.ink-library-panel {
    padding: 20px 22px 18px;
}
.ink-home-books-primary {
    margin: 0;
    padding: 0;
    border-top: 0;
}
.ink-panel-heading-library {
    min-height: 58px;
    margin-bottom: 14px;
}
.ink-panel-heading-library h2 {
    font-size: 24px;
}
.ink-panel-link {
    color: #5f574d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.ink-panel-link:hover { color: #1f1d1a; }
.ink-library-intro {
    display: grid;
    gap: 5px;
    margin: 0 0 16px;
    padding: 12px 15px;
    border-left: 4px solid #625b52;
    background: rgba(246,243,236,.88);
}
.ink-library-intro strong {
    color: #292622;
    font-size: 16px;
    line-height: 1.5;
}
.ink-library-intro span {
    color: #665f56;
    font-size: 14px;
    line-height: 1.65;
}
.ink-home-books-primary .ink-home-books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.ink-home-books-primary .ink-home-book-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    min-height: 132px;
    padding: 11px;
}
.ink-home-books-primary .ink-home-book-cover-wrap {
    width: 92px;
    height: 120px;
}
.ink-home-books-primary .ink-home-book-copy {
    gap: 9px;
}
.ink-home-books-primary .ink-home-book-copy strong {
    font-size: 19px;
    line-height: 1.5;
}
.ink-home-books-primary .ink-home-book-copy span {
    font-size: 16px;
    line-height: 1.6;
}
.ink-home-books-primary .ink-home-book-free-badge {
    left: 5px;
    right: 5px;
    bottom: 5px;
    padding: 6px 3px;
    font-size: 12px;
    font-weight: 700;
}
.ink-home-books-primary .ink-home-book-card-free {
    border-width: 2px;
    border-color: #9f8b72;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.ink-home-books-primary .ink-home-book-free-note {
    font-size: 16px;
}
.ink-home-books-primary .ink-home-book-cover-placeholder span {
    font-size: 10px;
}
.ink-home-books-primary .ink-home-book-cover-placeholder strong {
    font-size: 12px;
}

/* Latest articles are secondary and more compact */
.ink-latest-compact {
    margin-top: 0;
}
.ink-latest-panel {
    background: rgba(255,255,255,.86);
}

.ink-latest-compact-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}
.ink-latest-compact-heading h3 {
    margin: 2px 0 0;
    color: #302c27;
    font-size: 18px;
    letter-spacing: .08em;
}
.ink-latest-compact-heading > span {
    color: #81796f;
    font-size: 12px;
}
.ink-latest-compact .ink-latest-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.ink-latest-compact .ink-latest-card {
    min-height: 0;
    display: block;
}
.ink-latest-compact .ink-latest-thumb {
    height: 92px;
}
.ink-latest-compact .ink-latest-copy {
    padding: 12px 13px 13px;
}
.ink-latest-compact .ink-latest-copy h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.55;
}
.ink-latest-compact .ink-latest-copy h3 a {
    display: block;
}
.ink-latest-compact .ink-latest-category {
    display: block;
    margin-bottom: 2px;
    color: #746c61;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .06em;
}
.ink-latest-compact .ink-latest-title {
    display: block;
    color: #222;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
}
.ink-latest-compact .ink-latest-copy p { display: none; }
.ink-latest-compact .ink-latest-meta {
    margin-top: 0;
    gap: 7px;
    font-size: 12.5px;
    line-height: 1.45;
    flex-wrap: wrap;
}
.ink-latest-compact .ink-latest-meta span + span::before {
    margin-right: 5px;
}

/* Readability: enlarge small text in the feature area */
.ink-home-feature-section .ink-panel-kicker { font-size: 10px; }
.ink-home-feature-section .ink-panel-note { font-size: 12px; }
.ink-rights-guest-note strong { font-size: 14px; }
.ink-rights-guest-note span { font-size: 13px; }
.ink-rights-level { font-size: 12px; }
.ink-rights-step h3 { font-size: 17px; }
.ink-rights-step p { font-size: 13px; line-height: 1.65; }
.ink-rights-step-index { font-size: 10.5px; }
.ink-rights-notes { font-size: 11.5px; line-height: 1.65; gap: 4px; }
.ink-home-books-state,
.ink-state { font-size: 13px; }

@media (max-width: 1120px) {
    .ink-home-books-primary .ink-home-book-card {
        grid-template-columns: 78px minmax(0, 1fr);
    }
    .ink-home-books-primary .ink-home-book-cover-wrap {
        width: 78px;
        height: 104px;
    }
    .ink-latest-compact .ink-latest-list {
        grid-template-columns: 1fr;
    }
    .ink-latest-compact .ink-latest-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
    }
    .ink-latest-compact .ink-latest-thumb { height: 82px; }
}

@media (max-width: 860px) {
    .ink-home-books-primary .ink-home-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ink-latest-compact .ink-latest-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ink-latest-compact .ink-latest-card { display: block; }
}

@media (max-width: 560px) {
    .ink-library-panel { padding: 17px 15px; }
    .ink-panel-heading-library h2 { font-size: 22px; }
    .ink-library-intro strong { font-size: 15px; }
    .ink-library-intro span { font-size: 13px; }
    .ink-home-books-primary .ink-home-books-grid { grid-template-columns: 1fr; }
    .ink-home-books-primary .ink-home-book-card {
        grid-template-columns: 82px minmax(0, 1fr);
        min-height: 116px;
    }
    .ink-home-books-primary .ink-home-book-cover-wrap {
        width: 82px;
        height: 108px;
    }
    .ink-latest-compact .ink-latest-list { grid-template-columns: 1fr; }
    .ink-latest-compact .ink-latest-card {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
    }
    .ink-latest-compact .ink-latest-thumb { height: 80px; }
    .ink-latest-compact-heading > span { display: none; }
}


/* 2026-08-27 Floating App purchase entry */
.ink-app-purchase-float {
    width: 292px;
    position: fixed;
    right: 24px;
    bottom: 78px;
    z-index: 55;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    padding: 15px 16px 14px;
    border: 1px solid #9e8d79;
    border-left: 4px solid #8e3f32;
    border-radius: 5px;
    background:
        linear-gradient(rgba(251,248,241,.98), rgba(251,248,241,.98)),
        url("/images/paper-texture.png");
    box-shadow: 0 14px 32px rgba(45,38,30,.16);
}
.ink-app-purchase-float.is-collapsed {
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.ink-app-purchase-close {
    width: 27px;
    height: 27px;
    position: absolute;
    right: 6px;
    top: 5px;
    border: 0;
    background: transparent;
    color: #82786c;
    font-family: Arial, sans-serif;
    font-size: 21px;
    line-height: 1;
}
.ink-app-purchase-close:hover { color: #2d2924; }
.ink-app-purchase-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4c4740;
    border-radius: 50%;
    color: #fff;
    background: #3b3935;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}
.ink-app-purchase-copy {
    min-width: 0;
    padding-right: 14px;
}
.ink-app-purchase-kicker {
    display: block;
    margin-bottom: 2px;
    color: #82776c;
    font-size: 11px;
    letter-spacing: .05em;
}
.ink-app-purchase-copy strong {
    display: block;
    color: #2a2723;
    font-size: 17px;
    letter-spacing: .04em;
}
.ink-app-purchase-copy p {
    margin: 5px 0 0;
    color: #655e55;
    font-size: 12px;
    line-height: 1.55;
}
.ink-app-purchase-action {
    grid-column: 1 / -1;
    min-height: 38px;
    border: 1px solid #4c4740;
    border-radius: 3px;
    color: #fff;
    background: #383633;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
}
.ink-app-purchase-action:hover { background: #232220; }
.ink-app-purchase-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px 7px 8px;
    border: 1px solid #8e7965;
    border-radius: 999px;
    color: #302c27;
    background: rgba(250,247,240,.97);
    box-shadow: 0 10px 24px rgba(45,38,30,.14);
    font-weight: 700;
    font-size: 12px;
}
.ink-app-purchase-pill span {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #3b3935;
    font-family: Arial, sans-serif;
    font-size: 8px;
    letter-spacing: .05em;
}

@media (max-width: 720px) {
    .ink-app-purchase-float {
        width: calc(100% - 24px);
        right: 12px;
        bottom: 12px;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 9px;
        padding: 10px 11px;
        border-left-width: 3px;
        box-shadow: 0 10px 28px rgba(45,38,30,.2);
    }
    .ink-app-purchase-icon {
        width: 40px;
        height: 40px;
        font-size: 9px;
    }
    .ink-app-purchase-copy { padding-right: 0; }
    .ink-app-purchase-copy strong { font-size: 14px; }
    .ink-app-purchase-kicker { font-size: 9.5px; }
    .ink-app-purchase-copy p {
        margin-top: 2px;
        font-size: 10.5px;
        line-height: 1.4;
    }
    .ink-app-purchase-action {
        grid-column: auto;
        min-height: 36px;
        padding: 7px 10px;
        white-space: nowrap;
        font-size: 11px;
    }
    .ink-app-purchase-close {
        right: -3px;
        top: -27px;
        width: 28px;
        height: 28px;
        border: 1px solid #b5aa9c;
        border-radius: 50%;
        background: rgba(250,247,240,.98);
        box-shadow: 0 4px 12px rgba(45,38,30,.12);
    }
    .ink-app-purchase-float.is-collapsed {
        width: auto;
        right: 12px;
        bottom: 12px;
    }
    .home-ink-page .back-to-top {
        bottom: 72px;
    }
}


/* App purchase detail panel: opens to the upper-left of the floating card */
.ink-app-purchase-details {
    width: 540px;
    position: absolute;
    right: calc(100% + 14px);
    bottom: 0;
    z-index: 2;
    padding: 20px;
    border: 1px solid #9e8d79;
    border-top: 4px solid #8e3f32;
    border-radius: 5px;
    background:
        linear-gradient(rgba(253,251,246,.99), rgba(253,251,246,.99)),
        url("/images/paper-texture.png");
    box-shadow: 0 18px 42px rgba(45,38,30,.2);
}
.ink-app-purchase-details::after {
    content: "";
    position: absolute;
    right: -9px;
    bottom: 26px;
    width: 16px;
    height: 16px;
    border-top: 1px solid #9e8d79;
    border-right: 1px solid #9e8d79;
    background: #fdfbf6;
    transform: rotate(45deg);
}
.ink-app-purchase-details-close {
    width: 30px;
    height: 30px;
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #776e63;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1;
}
.ink-app-purchase-details-heading {
    padding-right: 28px;
    margin-bottom: 16px;
}
.ink-app-purchase-details-heading > span {
    display: block;
    margin-bottom: 4px;
    color: #8e3f32;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}
.ink-app-purchase-details-heading > strong {
    display: block;
    color: #282521;
    font-size: 19px;
    line-height: 1.45;
    letter-spacing: .035em;
}
.ink-app-purchase-details-heading > p {
    margin: 7px 0 0;
    color: #685f55;
    font-size: 12.5px;
    line-height: 1.65;
}
.ink-app-store-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.ink-app-store-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #d0c6b8;
    background: rgba(255,255,255,.78);
    text-align: center;
}
.ink-app-store-platform {
    color: #8a8074;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ink-app-store-card h3 {
    margin: 3px 0 10px;
    color: #2e2a25;
    font-size: 16px;
}
.ink-app-store-qr {
    width: 132px;
    height: 132px;
    max-width: 100%;
    display: block;
    margin: 0 auto 10px;
    border: 1px solid #d5cec3;
    background: #fff;
    object-fit: contain;
}
.ink-app-store-card p {
    min-height: 42px;
    margin: 0 0 11px;
    color: #6b6359;
    font-size: 11.5px;
    line-height: 1.55;
    text-align: left;
}
.ink-app-store-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid #48433d;
    border-radius: 3px;
    color: #fff;
    background: #383633;
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 700;
}
.ink-app-store-link:hover { background: #22211f; }
.ink-app-purchase-sync-note {
    display: grid;
    gap: 3px;
    margin-top: 14px;
    padding: 11px 13px;
    border-left: 3px solid #8e3f32;
    background: rgba(246,242,234,.9);
}
.ink-app-purchase-sync-note strong {
    color: #40382f;
    font-size: 12px;
}
.ink-app-purchase-sync-note span {
    color: #6b6258;
    font-size: 11.5px;
    line-height: 1.6;
}

@media (max-width: 980px) and (min-width: 721px) {
    .ink-app-purchase-details {
        width: 480px;
    }
    .ink-app-store-qr {
        width: 112px;
        height: 112px;
    }
}

@media (max-width: 720px) {
    .ink-app-purchase-details {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 96px);
        right: 0;
        bottom: calc(100% + 10px);
        overflow-y: auto;
        padding: 16px;
        border-top-width: 3px;
    }
    .ink-app-purchase-details::after {
        right: 26px;
        bottom: -9px;
        border-top: 0;
        border-right: 1px solid #9e8d79;
        border-bottom: 1px solid #9e8d79;
    }
    .ink-app-store-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }
    .ink-app-store-card {
        padding: 10px;
    }
    .ink-app-store-qr {
        width: 104px;
        height: 104px;
    }
    .ink-app-store-card p {
        min-height: 0;
        font-size: 10.5px;
    }
    .ink-app-purchase-details-heading > strong { font-size: 17px; }
    .ink-app-purchase-details-heading > p { font-size: 11.5px; }
}

@media (max-width: 430px) {
    .ink-app-store-grid { grid-template-columns: 1fr; }
    .ink-app-store-card {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 10px;
        text-align: left;
    }
    .ink-app-store-platform,
    .ink-app-store-card h3,
    .ink-app-store-card p,
    .ink-app-store-link {
        grid-column: 2;
    }
    .ink-app-store-platform { align-self: end; }
    .ink-app-store-card h3 { margin-bottom: 5px; }
    .ink-app-store-qr {
        grid-column: 1;
        grid-row: 1 / span 4;
        width: 92px;
        height: 92px;
        margin: 0;
    }
    .ink-app-store-link { min-height: 32px; }
}

/* 2026-08-27: make Latest Articles heading match Online Library */
.ink-panel-heading-latest {
    min-height: 58px;
    margin-bottom: 14px;
}
.ink-panel-heading-latest h2 {
    font-size: 24px;
}
@media (max-width: 560px) {
    .ink-panel-heading-latest h2 { font-size: 22px; }
}
