@font-face {
  font-family: "Kitchen Display";
  src: url("type/display.woff") format("woff");
  font-display: swap;
  font-weight: 700 950;
}
:root {
  --ink: #27251f;
  --muted: #65615a;
  --line: #e0ded5;
  --paper: #fcfbf8;
  --card: #fffefa;
  --accent: #806324;
  --gold: #f1d387;
  --sans: "Apple SD Gothic Neo","Noto Sans CJK KR","Malgun Gothic",Arial,sans-serif;
  --display: "Kitchen Display",var(--sans);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button,input,textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button,a,input,select,summary { touch-action: manipulation; }
:is(button,a,input,select,summary):focus-visible { outline: 3px solid #8a681f; outline-offset: 3px; }
[hidden] { display: none!important; }
.skip,.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 50; inset: 8px auto auto 8px; clip-path: none; width: auto; height: auto; padding: 10px; background: #fff; color: var(--ink); }
i[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-style: normal; }
i[data-icon] svg { width: 1.2em; height: 1.2em; display: block; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.bar,.page { width: min(100%,1280px); margin-inline: auto; padding-inline: clamp(20px,4.5vw,60px); }
.bar { display: grid; grid-template-columns: auto auto minmax(160px,1fr) auto; gap: clamp(16px,2.5vw,36px); align-items: center; min-height: 78px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 800 clamp(1.05rem,1.65vw,1.42rem)/1.2 var(--display); letter-spacing: -.065em; white-space: nowrap; }
.wordmark img { width: 37px; height: 37px; }
.bar nav { display: flex; gap: clamp(10px,1.5vw,23px); align-items: center; }
.nav { display: inline-flex; gap: 5px; align-items: center; min-height: 45px; padding: 7px 0; border: 0; background: transparent; color: var(--muted); white-space: nowrap; font-size: .94rem; }
.nav.active,.nav[aria-pressed="true"] { color: var(--ink); font-weight: 750; text-decoration: underline; text-decoration-color: #ba9147; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nav i { font-size: 14px; }
.search { display: flex; justify-self: end; align-items: center; width: min(100%,345px); min-height: 43px; gap: 9px; padding: 0 6px 0 14px; border: 1px solid #e2dfd4; border-radius: 10px; background: #f6f5f0; color: var(--muted); }
.search:focus-within { border-color: #9a854e; background: white; }
.search input { flex: 1; min-width: 0; height: 40px; outline: 0; border: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.search input:focus-visible { outline: 0; }
.search button { border: 0; border-radius: 7px; background: transparent; color: #555048; padding: 6px 9px; font-size: .875rem; font-weight: 700; }
.search button:hover { background: #eae8df; }
.add,#featured,.pdf-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 8px 17px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: .94rem; white-space: nowrap; }
.add { background: var(--ink); color: white; }
.add:hover { background: #443e33; }
.page { padding-top: 25px; padding-bottom: 28px; }
.feature { position: relative; isolation: isolate; overflow: hidden; display: flex; min-height: clamp(280px,26vw,360px); border-radius: 18px; background: #302920; color: #fffaf2; }
.feature-art { position: absolute; z-index: -2; inset: 0 0 0 35%; }
.feature-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 52% 63%; }
.feature-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#302920 0%,rgba(48,41,32,.84) 9%,rgba(48,41,32,.20) 34%,transparent 64%); }
.feature-copy { position: relative; display: flex; flex-flow: column; align-items: flex-start; justify-content: center; padding: clamp(30px,3.4vw,48px) clamp(25px,4.1vw,58px); }
.feature h1 { margin: 0; font: 850 clamp(2.5rem,4.7vw,4.2rem)/1.18 var(--display); letter-spacing: -.075em; word-break: keep-all; }
.feature h1 span { display: block; margin-bottom: .24em; color: #edcf87; font-size: .53em; line-height: 1.15; letter-spacing: -.055em; }
.feature-meta { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; color: #e8e1d5; font-size: 1rem; font-weight: 500; }
.feature-action { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
#featured { background: var(--gold); color: #2a261c; }
#featured:hover { background: #ffdfa4; }
.pdf-link { color: white; border-color: #9b8e79; background: #302920d4; }
.pdf-link:hover { background: #4a4034; }
#shelf { scroll-margin-top: 15px; }
.feature + #shelf { margin-top: clamp(23px,2.8vw,37px); }
.feature[hidden] + #shelf { margin-top: 0; }
.section-head,.heading,.layout-switch { display: flex; align-items: center; }
.section-head { justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.heading { gap: 9px; min-width: 0; }
.heading h2 { margin: 0; font: 800 clamp(1.5rem,2.4vw,2.05rem)/1.3 var(--display); letter-spacing: -.06em; word-break: keep-all; overflow-wrap: anywhere; }
.heading span { flex-shrink: 0; color: #736246; font-size: .86rem; font-weight: 680; }
.layout-switch { flex: none; gap: 1px; border: 1px solid var(--line); border-radius: 9px; background: #f3f1eb; padding: 2px; }
.layout-switch button { display: grid; place-items: center; width: 35px; height: 32px; padding: 0; background: transparent; border: 0; border-radius: 6px; color: var(--muted); }
.layout-switch button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 3px #30282024; }
#chapter-nav { border: 1px solid #d9d3c5; border-radius: 12px; margin: 0 0 18px; background: #f4f1e9; }
#chapter-nav summary { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 16px; list-style: none; font-weight: 700; cursor: pointer; }
#chapter-nav summary::-webkit-details-marker { display: none; }
#chapter-nav summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
#chapter-nav[open] summary::after { transform: translateY(2px) rotate(225deg); }
#chapter-nav summary i { color: var(--accent); }
#filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; border-top: 1px solid #ddd7c8; padding: 10px; }
.chapter-choice { display: flex; align-items: center; min-width: 0; gap: 8px; min-height: 44px; padding: 8px 12px; color: #49453c; text-align: left; background: #ffffff88; border: 1px solid transparent; border-radius: 6px; }
.chapter-choice:first-child { grid-column: 1/-1; }
.chapter-choice[aria-pressed="true"],.chapter-choice.active { background: #343026; color: #fff8e7; }
.chapter-choice:hover:not([aria-pressed="true"]) { background: #fffef9; border-color: #c5b898; }
.chapter-index,.chapter-count { flex: none; font-size: .81rem; font-weight: 650; color: #766741; }
.chapter-choice[aria-pressed="true"] :is(.chapter-index,.chapter-count) { color: #ead7a6; }
.chapter-name { font-weight: 650; font-size: .94rem; word-break: keep-all; }
.chapter-count { margin-left: auto; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 17px; }
.filter { flex: none; min-height: 36px; padding: 5px 14px; background: #fffefa; border: 1px solid var(--line); border-radius: 22px; font-size: .875rem; font-weight: 550; }
.filter[aria-pressed="true"] { color: white; background: var(--ink); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.card { position: relative; min-width: 0; }
.card-open { display: block; width: 100%; color: var(--ink); text-align: left; background: none; border: 0; border-radius: 12px; padding: 0; }
.card-image,.file-cover { width: 100%; aspect-ratio: 1.78; display: block; object-fit: cover; border-radius: 12px; background: #eeebe1; }
.card-open:hover .card-image { filter: brightness(.95); }
.file-cover { display: grid; place-items: center; color: #73643f; }
.file-cover i { background: #e7ddbf; padding: 16px; border-radius: 12px; font-size: 26px; }
.card-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0 0; }
.card-tag { font-size: .82rem; font-weight: 700; color: var(--accent); }
.card :is(h3,h4) { font: 780 clamp(1.05rem,1.5vw,1.32rem)/1.45 var(--display); letter-spacing: -.045em; overflow-wrap: anywhere; word-break: keep-all; margin: 0; }
.card-meta,.card-meta span { display: inline-flex; align-items: center; }
.card-meta { flex-wrap: wrap; gap: 3px 7px; margin-top: 3px; color: var(--muted); font-size: .84rem; }
.card-meta span { gap: 3px; }
.card-meta i[data-icon] svg { width: 1em; height: 1em; }
.dot { width: 2px; height: 2px; border-radius: 50%; background: #999487; }
.bookmark { position: absolute; right: 9px; top: 9px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #fffdf5ed; color: #423c2e; }
.bookmark:hover { background: #ede8d9; }
.bookmark[aria-pressed="true"] { background: #f8e6b3; color: #71551b; }
.bookmark[aria-pressed="true"] svg { fill: currentColor; }
.book-card { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 11px; }
.book-card:hover { border-color: #b5a47c; background: #fffefb; }
.book-card .card-open { min-height: 144px; padding: 17px 18px; display: flex; }
.book-card .card-info { width: 100%; padding: 0; gap: 5px; }
.book-card .card-tag { padding-right: 37px; }
.book-card :is(h3,h4) { padding-right: 19px; }
.card-summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; color: #69665e; font-size: .89rem; line-height: 1.55; }
.book-card .card-meta { padding-top: 8px; margin-top: auto; }
.book-card .bookmark { top: 6px; right: 6px; background: transparent; color: #736b58; }
.book-card .bookmark:hover,.book-card .bookmark[aria-pressed="true"] { background: #f5e8c6; color: #644b15; }
.cards.rows { display: flex; flex-direction: column; gap: 0; }
.rows .card { border-bottom: 1px solid var(--line); padding: 11px 0; }
.rows .card-open { display: flex; align-items: center; gap: 17px; }
.rows .card-image,.rows .file-cover { width: 103px; height: 76px; flex: none; border-radius: 8px; }
.rows .card-info { padding: 0 48px 0 0; }
.rows .bookmark { right: 3px; top: 50%; transform: translateY(-50%); }
.rows .book-card { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.rows .book-card .card-open { min-height: auto; padding: 2px 0; }
.rows .book-card .card-summary { display: none; }
.rows .book-card .card-info { gap: 2px; }
.rows .book-card .card-meta { padding-top: 1px; }
.rows .book-card :is(h3,h4) { padding-right: 0; }
.empty { border: 1px dashed #d2ccbc; border-radius: 12px; text-align: center; padding: 30px 15px; background: #f8f6ef; }
.empty button { border: 1px solid #d3cbb5; background: white; border-radius: 7px; padding: 8px 15px; }
.legend { display: flex; align-items: flex-start; gap: 6px; margin: 30px 0 0; padding-top: 15px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.legend i { margin-top: 2px; }
.toast { position: fixed; z-index: 15; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 10px 19px; max-width: calc(100% - 20px); text-align: center; background: #342f24; color: white; font-size: .9rem; border-radius: 10px; }
@media (max-width:850px) {
  .bar,.page { padding-inline: 24px; }
  .bar { gap: 16px; }
  .wordmark { gap: 7px; font-size: 1.1rem; }
  .wordmark img { width: 32px; height: 32px; }
  .nav { font-size: .875rem; }
  .add { padding-inline: 11px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:725px) {
  .bar,.page { padding-inline: 17px; }
  .bar { grid-template-columns: 1fr auto; gap: 8px 14px; padding-block: 10px 0; }
  .wordmark { grid-column: 1; grid-row: 1; }
  .add { grid-column: 2; grid-row: 1; min-height: 38px; }
  .search { grid-column: 1/-1; grid-row: 2; width: 100%; }
  .bar nav { grid-column: 1/-1; grid-row: 3; gap: 23px; }
  .nav { min-height: 35px; padding: 0 1px 5px; }
  .page { padding-top: 16px; }
  .feature { min-height: 225px; border-radius: 12px; }
  .feature-art { left: 25%; }
  .feature h1 { font-size: clamp(2.15rem,6.4vw,2.8rem); }
  .feature-copy { padding: 22px; }
  .feature-action { margin-top: 16px; }
  .feature-meta { margin-top: 9px; font-size: .88rem; }
}
@media (max-width:540px) {
  .bar,.page { padding-inline: 15px; }
  .feature { min-height: 213px; }
  .feature-art { left: 20%; }
  .feature-art img { object-position: 56% 64%; }
  .feature-art::after { background: linear-gradient(90deg,#302920 0%,rgba(43,36,27,.76) 23%,rgba(44,37,28,.26) 58%,transparent); }
  .feature-copy { padding: 19px 16px; }
  .feature h1 { font-size: clamp(1.92rem,6.3vw,2.28rem); }
  .feature h1 span { font-size: .56em; margin-bottom: .45em; }
  .feature-action { gap: 5px; }
  #featured,.pdf-link { padding: 6px 10px; min-height: 38px; font-size: .84rem; }
  #filters { grid-template-columns: minmax(0,1fr); }
  .chapter-choice { padding: 8px 10px; gap: 8px; }
  .chapter-name { font-size: .91rem; }
  .cards { gap: 13px 10px; }
  .cards:has(.book-card) { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .book-card .card-open { min-height: 0; padding: 11px 14px; }
  .book-card .card-info { gap: 2px; }
  .book-card :is(h3,h4) { padding-right: 32px; }
  .book-card .card-summary { margin-top: 1px; }
  .book-card .card-meta { padding-top: 3px; }
  .book-card .bookmark { right: 7px; top: 8px; }
  .cards.rows { gap: 0; }
  .rows .card-image,.rows .file-cover { width: 84px; height: 68px; }
  .rows .bookmark { top: 50%; right: 3px; }
  .section-head { margin-bottom: 10px; }
  .heading h2 { font-size: 1.46rem; }
  .layout-switch button { width: 32px; height: 30px; }
  #chapter-nav { margin-bottom: 12px; }
  .card-image,.file-cover { aspect-ratio: 1.5; }
}
@media (prefers-reduced-motion:no-preference) {
  html { scroll-behavior: smooth; }
}

/* The index uses compact shelf labels. Recipe cards appear after a shelf is opened. */
.type-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.type-card {
  --tab-color: #857049; position: relative; display: grid; align-content: center; gap: 7px;
  min-width: 0; min-height: 99px; padding: 17px 15px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; text-align: left;
}
.type-card::before { content: ''; position: absolute; top: -1px; left: 15px; width: 27px; height: 3px; border-radius: 0 0 2px 2px; background: var(--tab-color); }
.type-card:nth-child(1),.type-card:nth-child(8) { --tab-color: #698363; }
.type-card:nth-child(2),.type-card:nth-child(6) { --tab-color: #b96e52; }
.type-card:nth-child(3),.type-card:nth-child(5) { --tab-color: #647f89; }
.type-card:nth-child(4),.type-card:nth-child(7) { --tab-color: #a5883f; }
.book-card.no-tag .card-open { min-height: 115px; }
.book-card.no-tag :is(h3,h4) { padding-right: 32px; }
.rows .book-card.no-tag .card-open { min-height: auto; }
.type-card:hover { background: #f8f7ef; border-color: var(--tab-color); }
.type-face { display: flex; flex-wrap: wrap; gap: 3px 7px; align-items: baseline; justify-content: space-between; }
.type-face strong { font: 780 clamp(1.05rem,1.5vw,1.32rem)/1.4 var(--display); letter-spacing: -.045em; word-break: keep-all; }
.type-count { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.type-preview { color: var(--muted); font-size: .88rem; line-height: 1.5; word-break: keep-all; }
.all-recipes,.back-to-types { min-height: 42px; line-height: 1.4; word-break: keep-all; background: transparent; font-weight: 650; font-size: .9rem; }
.all-recipes { padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.all-recipes:hover { background: #f3f1e8; }
.back-to-types { border: 0; padding: 0 0 0 1px; color: #635842; flex: none; text-decoration: underline; text-underline-offset: 4px; }
.back-to-types:not([hidden]) + h2 { border-left: 1px solid #ccc7b9; padding-left: 12px; }
#collection-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px 13px; margin-bottom: 17px; }
#collection-tools .filters { margin: 0; }
#own-only { border-radius: 7px; }
.filter { min-height: 40px; }
.filter-count { margin-left: .38em; font-size: .85em; font-variant-numeric: tabular-nums; opacity: .8; }
.recipe-section + .recipe-section { margin-top: 27px; }
.recipe-section-head { display: flex; align-items: baseline; gap: 7px; padding: 0 0 9px; }
.recipe-section-head h3 { margin: 0; color: #332e24; font: 750 1.13rem/1.45 var(--sans); letter-spacing: -.035em; }
.recipe-section-head span { color: var(--muted); font-size: .84rem; }
.dish-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 15px 0; }
.dish-picker label { display: flex; flex-direction: column; gap: 5px; color: inherit; font-size: .96rem; font-weight: 650; }
.dish-picker select {
  appearance: none; width: 100%; min-height: 44px; padding: 7px 29px 7px 10px; border: 1px solid #c7c9bd;
  border-radius: 7px; color: var(--ink); font: inherit; font-weight: 500;
  background: linear-gradient(45deg, transparent 50%, #686357 50%) calc(100% - 15px) center / 5px 5px no-repeat,
    linear-gradient(135deg, #686357 50%, transparent 50%) calc(100% - 10px) center / 5px 5px no-repeat, white;
}
.dish-picker select:disabled { color: #757469; background-color: #f1f1ed; }
@media (max-width:850px) {
  .type-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:540px) {
  .type-index { gap: 8px; margin-bottom: 14px; }
  .book-card.no-tag .card-open { min-height: auto; }
  .type-card { min-height: 77px; padding: 11px; gap: 3px; }
  .type-card::before { left: 11px; width: 21px; }
  .type-preview { font-size: .8rem; }
  .heading { gap: 6px; flex-wrap: wrap; }
  .back-to-types:not([hidden]) + h2 { padding-left: 7px; }
  .recipe-section + .recipe-section { margin-top: 21px; }
  .dish-picker { gap: 8px; }
}
