/* Ivory Mini Market — a quiet editorial index with an illustrated opening spread. */
body[data-theme="ivory-mini-market"] {
    --accent: #635132;
    --accent-strong: #443720;
    --accent-soft: #eee7d8;
    --page: #faf8f1;
    --panel: #fffefa;
    --ink: #302d25;
    --muted: #787365;
    --line: #ddd9ca;
    --radius: 5px;
    --display-font: Georgia, "Times New Roman", serif;
}
.im-content { padding-top: 22px; }
.im-edition-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 0; border-top: 1px solid #423e33; border-bottom: 1px solid #d6d0c0; color: #716852; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.im-masthead { text-align: center; }
.im-masthead h1 { max-width: 930px; margin: 42px auto 21px; font-family: var(--display-font); font-size: clamp(42px, 6.1vw, 80px); font-weight: 500; letter-spacing: -.055em; line-height: 1.07; overflow-wrap: anywhere; }
.im-masthead > p { max-width: 650px; margin: 0 auto; color: #756f60; font-size: 15px; line-height: 1.85; }
.im-masthead-search { width: 100%; max-width: 620px; margin: 27px auto 39px; text-align: left; }
.im-masthead-search form { margin-bottom: 0; }
.im-masthead-search input, .im-masthead-search button { border-radius: 3px; }
.im-feature-spread { display: grid; grid-template-columns: 1.15fr 1fr; border-top: 1px solid #c9c1ad; border-bottom: 1px solid #c9c1ad; margin-bottom: 42px; }
.im-spread-main { padding: 25px 33px 28px 0; border-right: 1px solid #c9c1ad; min-width: 0; }
.im-chapter-line { display: flex; align-items: center; gap: 13px; }
.im-chapter-line > span { flex: 0 0 auto; font-family: Georgia, serif; font-size: 13px; font-style: italic; color: #83765c; }
.im-chapter-line h2 { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .025em; line-height: 1.6; }
.im-cover-profile { display: grid; grid-template-columns: .95fr 1fr; align-items: center; gap: 28px; margin-top: 25px; }
.im-cover-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 23px; min-height: 262px; padding: 25px 16px; background: #efeada; border: 1px solid #e1d8c4; }
.im-cover-art img { width: 142px; height: 142px; max-width: 100%; object-fit: cover; border-radius: 23px; box-shadow: 0 13px 22px #5b492614; }
.im-cover-art > span { font-size: 8px; font-weight: 750; letter-spacing: .11em; color: #877855; }
.im-cover-caption { min-width: 0; }
.im-cover-caption h3 { margin: 0 0 16px; font-family: var(--display-font); font-size: clamp(25px, 2.8vw, 37px); font-weight: 500; line-height: 1.14; letter-spacing: -.035em; }
.im-cover-caption p { margin: 0 0 24px; font-size: 12px; line-height: 1.85; color: var(--muted); }
.im-cover-caption > span { display: inline-flex; align-items: center; gap: 11px; color: var(--accent); font-size: 10px; font-weight: 750; }
.im-spread-notes { min-width: 0; padding: 28px 0 28px 34px; }
.im-eyebrow { display: block; color: #837457; font-size: 9px; font-weight: 800; letter-spacing: .13em; line-height: 1.6; }
.im-spread-notes > h2 { margin: 13px 0 13px; font-family: var(--display-font); font-size: 39px; font-weight: 500; line-height: 1.06; letter-spacing: -.04em; }
.im-spread-notes > p { margin: 0 0 15px; max-width: 340px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.im-notebook-list { display: grid; }
.im-notebook-list a { display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; align-items: center; gap: 15px; padding: 13px 0; border-top: 1px solid #dfd8c7; }
.im-notebook-list img { width: 48px; height: 48px; border-radius: 11px; object-fit: cover; }
.im-notebook-list h3 { margin: 0 0 5px; font-size: 12px; line-height: 1.4; }
.im-notebook-list a > div > span { color: var(--muted); font-size: 10px; }
.im-notebook-list a > svg { color: #9d8d6c; }
.im-chapter-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
.im-plain-link { display: inline-flex; align-items: center; gap: 11px; color: var(--accent); font-size: 10px; font-weight: 750; }
.im-collection-chapter { margin-bottom: 45px; }
.im-collection-chapter [data-ui="collection-grid"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid #d8d0bd; }
.im-collection-chapter [data-ui="collection-card"] { background: #f4f0e5; border: 0; border-right: 1px solid #d8d0bd; border-radius: 0; box-shadow: none; padding: 22px; }
.im-collection-chapter [data-ui="collection-card"]:last-child { border-right: 0; }
.im-collection-chapter [data-ui="collection-card"]:hover { background: #eee8d9; transform: none; }
.im-collection-chapter [data-ui="collection-copy"] h3 { font-family: var(--display-font); font-size: 21px; font-weight: 500; }
.im-catalog-chapter { padding: 30px 0 0; border-top: 2px solid #494135; }
.im-catalog-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; flex-wrap: wrap; margin-bottom: 29px; }
.im-catalog-heading h2 { margin: 12px 0 0; font-family: var(--display-font); font-size: clamp(31px, 3.5vw, 45px); font-weight: 500; line-height: 1.13; letter-spacing: -.04em; }
.im-catalog-heading > p { margin: 0 0 4px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.im-catalog-chapter [data-ui="app-grid"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.im-catalog-chapter [data-ui="app-card"] { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 19px; background: #fffdf7; border: 1px solid #e2dccd; border-radius: 4px; box-shadow: none; }
.im-catalog-chapter [data-ui="app-card"]:hover { background: #f3eddf; border-color: #b6a688; transform: translateY(-2px); }
.im-catalog-chapter [data-ui="app-icon"] { width: 73px; height: 73px; border-radius: 16px; }
.im-catalog-chapter [data-ui="app-copy"] { width: 100%; }
.im-catalog-chapter [data-ui="app-copy"] h3 { font-size: 14px; font-weight: 650; }
.im-catalog-chapter [data-ui="app-action"] { color: #8c7452; font-size: 10px; justify-content: center; }
.im-catalog-tail { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 23px 0 25px; margin-top: 22px; border-top: 1px solid #d9d0bc; border-bottom: 1px solid #d9d0bc; font-size: 11px; color: var(--muted); }
.im-reading-spread { display: grid; grid-template-columns: 1fr 1fr; gap: 38px; margin-top: 43px; }
.im-reading-spread > * { min-width: 0; }
.im-reading-spread h2 { font-family: var(--display-font); font-weight: 500; }
.im-reading-spread [data-ui="home-note"] { display: flex; flex-direction: column; align-items: flex-start; gap: 19px; margin: 0; padding: 27px; border: 1px solid #ded5c1; border-radius: 3px; background: #f2ecde; }
.im-reading-spread [data-ui="home-note"] h2 { margin-top: 0; }
.im-reading-spread [data-ui="home-faq"] { display: block; margin: 0; padding: 27px; border: 1px solid #ded5c1; border-radius: 3px; background: #fefbf4; }
.im-reading-spread [data-ui="faq-list"] { margin-top: 21px; }
body[data-theme="ivory-mini-market"] [data-ui="detail-hero"] { background: #f2eddf; border: 1px solid #d8cdb6; border-radius: 4px; }
body[data-theme="ivory-mini-market"] [data-ui="detail-hero"] h1 { font-family: var(--display-font); font-weight: 500; }
body[data-theme="ivory-mini-market"] [data-ui="detail-layout"] { gap: 36px; }
body[data-theme="ivory-mini-market"] [data-ui="gallery"] { gap: 22px; }
@media (max-width: 1080px) {
    .im-feature-spread { grid-template-columns: 1.1fr 1fr; }
    .im-spread-main { padding-right: 25px; }
    .im-spread-notes { padding-left: 25px; }
    .im-cover-profile { gap: 20px; }
    .im-cover-art { padding: 22px 15px; min-height: 249px; }
    .im-cover-art img { width: 118px; height: 118px; border-radius: 20px; }
    .im-spread-notes > h2 { font-size: 35px; }
    .im-collection-chapter [data-ui="collection-card"] { padding: 18px; }
    .im-catalog-chapter [data-ui="app-grid"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .im-masthead h1 { margin-top: 32px; font-size: clamp(40px, 8.7vw, 59px); }
    .im-masthead > p { font-size: 14px; }
    .im-feature-spread { grid-template-columns: 1fr; }
    .im-spread-main { padding: 24px 0 28px; border-right: 0; border-bottom: 1px solid #c9c1ad; }
    .im-cover-profile { gap: 28px; }
    .im-cover-art { min-height: 230px; }
    .im-cover-art img { width: 136px; height: 136px; border-radius: 22px; }
    .im-cover-caption h3 { font-size: 32px; }
    .im-spread-notes { padding: 27px 0; }
    .im-spread-notes > h2 br { display: none; }
    .im-spread-notes > h2 { font-size: 33px; }
    .im-spread-notes > p { max-width: none; }
    .im-collection-chapter [data-ui="collection-grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .im-collection-chapter [data-ui="collection-card"] { border-bottom: 1px solid #d8d0bd; }
    .im-collection-chapter [data-ui="collection-card"]:nth-child(2n) { border-right: 0; }
    .im-collection-chapter [data-ui="collection-card"]:nth-last-child(-n + 2) { border-bottom: 0; }
    .im-catalog-chapter [data-ui="app-grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .im-reading-spread { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 430px) {
    .im-edition-line { font-size: 8px; letter-spacing: .075em; }
    .im-masthead h1 { font-size: 43px; }
    .im-masthead-search { margin-bottom: 28px; }
    .im-cover-profile { grid-template-columns: .9fr 1fr; gap: 18px; }
    .im-cover-art { min-height: 211px; gap: 21px; padding: 20px 12px; }
    .im-cover-art img { width: 100px; height: 100px; border-radius: 18px; }
    .im-cover-art > span { font-size: 6px; letter-spacing: .08em; }
    .im-cover-caption h3 { font-size: 27px; margin-bottom: 13px; }
    .im-cover-caption p { font-size: 11px; line-height: 1.75; margin-bottom: 18px; }
    .im-cover-caption > span { gap: 6px; font-size: 9px; }
    .im-chapter-line h2 { font-size: 11px; }
    .im-collection-chapter [data-ui="collection-card"] { padding: 18px 14px; }
    .im-catalog-heading h2 { font-size: 34px; }
    .im-catalog-chapter [data-ui="app-card"] { padding: 20px 12px 16px; }
    .im-catalog-chapter [data-ui="app-icon"] { width: 65px; height: 65px; border-radius: 15px; }
    .im-catalog-chapter [data-ui="app-copy"] h3 { font-size: 13px; }
}
