:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: #293443;
  background: #fff8ee;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible { outline: 3px solid #826ce0; outline-offset: 3px; }
::selection { background: #ffddbb; }

.app-shell { min-height: 100dvh; overflow: clip; }
.site-header { position: relative; z-index: 3; background: rgba(255, 248, 238, .94); border-bottom: 1px solid #eee5d9; }
.header-inner { max-width: 1152px; min-height: 74px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 10px; color: #263345; padding: 6px 0; text-align: left; }
.logo-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: #f37760; box-shadow: 0 4px 0 #d95642; transform: rotate(-7deg); }
.logo-mark svg { width: 25px; height: 25px; transform: rotate(7deg); }
.logo-text { display: block; font-size: 1.45rem; font-weight: 900; letter-spacing: -.055em; line-height: 1; }
.logo-sub { display: block; margin-top: 3px; font-size: .62rem; font-weight: 700; color: #8e8c91; letter-spacing: .14em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.saved-link { min-height: 41px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1.5px solid #eadfd2; border-radius: 999px; background: #fff; color: #303f50; font-size: .81rem; font-weight: 800; box-shadow: 0 3px 8px #7153410d; }
.saved-link:hover, .saved-link[aria-current="page"] { border-color: #f37760; background: #fff0e8; }
.saved-link svg { width: 17px; height: 17px; color: #f37760; }
.saved-count { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 3px; background: #f37760; border-radius: 50%; color: white; font-size: .66rem; }

.page-main { max-width: 1152px; margin: auto; padding: 0 28px; }
.browse-main { padding-bottom: 180px; }
.hero { position: relative; margin-top: 24px; padding: 27px 34px 28px; min-height: 209px; border-radius: 30px; background: #fce4cc; overflow: hidden; display: flex; align-items: center; box-shadow: inset 0 0 0 1px #f5d7bb; }
.hero::before { content: ""; position: absolute; width: 430px; height: 430px; right: -70px; top: -165px; background: #ffeedc; border-radius: 50%; }
.hero::after { content: ""; position: absolute; width: 310px; height: 310px; right: 155px; bottom: -252px; background: #ffd4b1; border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .71rem; font-weight: 900; letter-spacing: .15em; color: #bc5c48; }
.eyebrow svg { width: 15px; height: 15px; }
.hero h1, .result-heading h1, .collection-heading h1 { margin: 10px 0 9px; font-size: clamp(1.8rem, 4vw, 2.95rem); letter-spacing: -.07em; line-height: 1.35; font-weight: 900; }
.hero h1 .accent { color: #e46c55; }
.hero p { margin: 0; color: #5f5f66; font-size: .89rem; line-height: 1.75; font-weight: 600; }
.hero-doodle { position: absolute; z-index: 1; right: 70px; top: 13px; width: 190px; height: 190px; color: #de735a; transform: rotate(-11deg); opacity: .8; }
.hero-doodle svg { width: 100%; height: 100%; }

.picker-area { margin-top: 27px; }
.section-topline { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 15px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.18rem; font-weight: 900; letter-spacing: -.045em; }
.section-title svg { width: 21px; height: 21px; color: #f37760; }
.section-hint { color: #8c898a; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.finder-row { display: flex; align-items: stretch; gap: 12px; margin-bottom: 14px; }
.search-wrap { position: relative; flex: 1; max-width: 520px; }
.search-wrap > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: #a1a2a5; pointer-events: none; }
.search-input { width: 100%; height: 48px; padding: 0 43px 0 45px; border: 1.5px solid #ece5dc; border-radius: 15px; background: #fff; color: #293443; box-shadow: 0 3px 9px #48332408; outline: none; font-size: .83rem; font-weight: 650; }
.search-input::placeholder { color: #aaa6a1; }
.search-input:focus { border-color: #e9826d; box-shadow: 0 0 0 3px #f9c8b758; }
.clear-search { position: absolute; right: 7px; top: 7px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #a7a1a1; }
.clear-search svg { width: 16px; height: 16px; }
.clear-search:hover { background: #f8eee7; color: #5e636a; }
.clear-search[hidden] { display: none; }
.tab-group { display: inline-flex; gap: 4px; padding: 4px; background: #efe8dc; border-radius: 14px; }
.tab { min-height: 40px; border: 0; border-radius: 11px; padding: 0 17px; color: #78787c; background: transparent; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.tab:hover { color: #e56b56; }
.tab[aria-selected="true"] { background: #fff; color: #293443; box-shadow: 0 2px 5px #584e4219; }
.tab svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.breed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.breed-card { position: relative; min-width: 0; border: 1.5px solid #eee5db; border-radius: 20px; background: #fff; box-shadow: 0 5px 12px #4e392408; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.breed-card:hover { transform: translateY(-3px); box-shadow: 0 11px 22px #533f2414; }
.breed-card.is-selected { border-color: #ef806c; box-shadow: 0 0 0 2px #f9b5a5, 0 8px 18px #9f56491e; }
.breed-pick { display: block; width: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; overflow: hidden; }
.breed-picture { height: 155px; margin: 7px 7px 0; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: var(--card-bg, #f8f0e6); }
.breed-picture svg { width: 98%; height: 98%; object-fit: contain; }
.breed-picture .dog-fallback { font-size: 4rem; }
.dog-fallback { color: #8ca08d; }
.breed-info { padding: 13px 14px 15px; }
.breed-name { display: block; min-height: 1.5em; font-size: .91rem; font-weight: 900; letter-spacing: -.04em; line-height: 1.5; }
.breed-sub { display: block; margin-top: 2px; color: #979296; font-size: .68rem; font-weight: 700; }
.favorite-breed { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 1px solid #fff; border-radius: 12px; background: #ffffffed; box-shadow: 0 3px 8px #5a372522; color: #a1a0a1; display: grid; place-items: center; transition: transform .18s, color .18s; }
.favorite-breed:hover { transform: scale(1.08); }
.favorite-breed[aria-pressed="true"] { color: #ef6b65; }
.favorite-breed svg { width: 20px; height: 20px; }
.selected-badge { position: absolute; top: 17px; left: 17px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; background: #f37760; color: #fff; font-weight: 900; font-size: .84rem; box-shadow: 0 2px 6px #b9544547; }
.empty-state { grid-column: 1 / -1; padding: 44px 20px; border: 1px dashed #e4d9cb; border-radius: 20px; background: #fffdf9; text-align: center; }
.empty-icon { font-size: 2.15rem; line-height: 1; }
.empty-state h3 { margin: 12px 0 5px; font-size: .96rem; }
.empty-state p { margin: 0; color: #888487; font-size: .8rem; line-height: 1.7; }
.empty-state .secondary-button { margin-top: 19px; }

.selection-tray { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; padding: 12px max(18px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-right)); background: #fffcf6f5; border-top: 1px solid #eadfd3; box-shadow: 0 -10px 30px #48322414; backdrop-filter: blur(18px); }
.tray-inner { max-width: 1096px; margin: auto; display: flex; align-items: center; gap: 20px; }
.tray-label { min-width: 120px; }
.tray-label strong { display: block; font-size: .82rem; font-weight: 900; }
.tray-label span { display: block; margin-top: 3px; color: #9a9492; font-size: .68rem; font-weight: 700; }
.slots { display: flex; align-items: center; flex: 1; max-width: 490px; gap: 8px; }
.slot { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; height: 64px; padding: 5px 9px 5px 5px; background: #fff; border: 1.5px dashed #d8cdc2; border-radius: 17px; color: #858187; text-align: left; }
.slot:hover, .slot.is-active { border-color: #ed7c66; background: #fff6f0; }
.slot.is-filled { border-style: solid; color: #293443; }
.slot-art { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: #f8efe8; overflow: hidden; }
.slot-art svg { width: 100%; height: 100%; }
.slot-art .slot-number { font-size: 1.05rem; font-weight: 900; color: #d6bfb2; }
.slot-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; font-weight: 900; }
.slot-plus { flex: 0 0 auto; color: #ed8c73; font-size: 1.3rem; font-weight: 900; }
.mix-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; border: 0; border-radius: 15px; padding: 0 22px; background: #f27860; color: #fff; box-shadow: 0 5px 0 #d95847, 0 10px 15px #b9634e1c; font-size: .86rem; font-weight: 900; white-space: nowrap; transition: transform .18s, box-shadow .18s, background .18s; }
.mix-button:hover:not(:disabled), .primary-button:hover:not(:disabled) { transform: translateY(-2px); background: #e96b55; box-shadow: 0 7px 0 #d95847, 0 12px 17px #b9634e25; }
.mix-button:active:not(:disabled), .primary-button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #d95847; }
.mix-button:disabled { background: #cfc7be; color: #f6f2ee; box-shadow: 0 4px 0 #b6aca3; }
.mix-button svg, .primary-button svg { width: 18px; height: 18px; }

.result-main, .collection-main { padding-top: 26px; padding-bottom: 70px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 6px 0; background: transparent; color: #77747b; font-size: .79rem; font-weight: 850; }
.back-link:hover { color: #e86e58; }
.back-link svg { width: 17px; height: 17px; }
.result-panel { position: relative; margin-top: 18px; padding: 30px; border: 1px solid #f0dfcb; border-radius: 30px; background: #fff; box-shadow: 0 12px 35px #5437200c; overflow: hidden; }
.result-panel::before { content: ""; position: absolute; z-index: 0; top: -160px; right: -130px; width: 490px; height: 490px; border-radius: 50%; background: #fff2df; }
.result-heading, .result-content { position: relative; z-index: 1; }
.result-heading h1 { margin-bottom: 8px; font-size: clamp(1.65rem, 3.7vw, 2.6rem); }
.result-heading p { margin: 0; color: #68676d; font-size: .87rem; line-height: 1.7; font-weight: 650; }
.notice { max-width: 760px; display: flex; gap: 9px; align-items: flex-start; margin: 17px 0 0; padding: 12px 14px; border-radius: 13px; background: #fff5e9; color: #6f5e50; font-size: .75rem; line-height: 1.7; font-weight: 750; }
.notice svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: #e68a62; }
.result-content { margin-top: 23px; }
.result-art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.result-art-card { min-width: 0; padding: 12px; border-radius: 20px; background: #f8eee4; }
.result-art-card:nth-child(2) { background: #f2ebf4; }
.result-art { height: min(35vw, 350px); min-height: 220px; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: #fff8f1; }
.result-art-card:nth-child(2) .result-art { background: #faf7fc; }
.result-art svg { width: 100%; height: 100%; }
.result-art .dog-fallback { font-size: 6rem; }
.result-art-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 3px 2px; font-size: .84rem; font-weight: 900; }
.result-art-label span:last-child { padding: 4px 8px; border-radius: 7px; background: #fff; color: #947f71; font-size: .65rem; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 0 18px; border: 1.5px solid #e9dfd5; border-radius: 14px; background: #fff; color: #354251; font-size: .82rem; font-weight: 900; box-shadow: 0 3px 0 #e6ddd3; }
.secondary-button:hover { border-color: #ef9d88; background: #fff9f5; }
.secondary-button svg { width: 18px; height: 18px; }
.secondary-button.is-saved { border-color: #f4b5a5; background: #fff1eb; color: #e26553; }
.result-footnote { margin: 17px 0 0; color: #999399; font-size: .7rem; line-height: 1.65; }
.collection-heading { margin: 22px 0 23px; }
.collection-heading h1 { margin-bottom: 8px; }
.collection-heading p { margin: 0; color: #77747a; font-size: .84rem; line-height: 1.6; font-weight: 650; }
.saved-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.saved-card { border: 1px solid #ece1d6; border-radius: 20px; background: #fff; box-shadow: 0 5px 12px #4e392408; overflow: hidden; }
.saved-card-button { display: block; width: 100%; padding: 9px; border: 0; background: transparent; color: inherit; text-align: left; }
.saved-card-button:hover .saved-title { color: #e66e58; }
.saved-art { height: 170px; display: grid; place-items: center; border-radius: 14px; background: #f7eee7; overflow: hidden; }
.saved-art svg { width: 100%; height: 100%; }
.saved-card:nth-child(3n + 2) .saved-art { background: #f4eef8; }
.saved-card:nth-child(3n + 3) .saved-art { background: #f0f3e9; }
.saved-details { padding: 11px 6px 8px; }
.saved-title { display: block; font-size: .87rem; font-weight: 900; letter-spacing: -.03em; }
.saved-sub { display: block; margin-top: 4px; color: #aaa0a0; font-size: .68rem; font-weight: 700; }
.collection-empty { padding: 70px 20px; }

.site-footer { max-width: 1152px; margin: 0 auto; padding: 12px 28px 26px; color: #aaa2a0; font-size: .7rem; line-height: 1.5; display: flex; gap: 14px; justify-content: space-between; border-top: 1px solid #eee7dc; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); max-width: min(90vw, 500px); padding: 12px 17px; border-radius: 12px; background: #293443; color: #fff; box-shadow: 0 10px 30px #2228; font-size: .78rem; font-weight: 800; line-height: 1.5; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero-doodle { right: 20px; opacity: .35; }
  .breed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tray-label { display: none; }
  .saved-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .header-inner { min-height: 62px; padding: 0 18px; }
  .logo-mark { width: 36px; height: 36px; border-radius: 12px; }
  .logo-text { font-size: 1.31rem; }
  .saved-link { min-height: 37px; padding: 0 11px; font-size: .72rem; }
  .page-main { padding-left: 17px; padding-right: 17px; }
  .browse-main { padding-bottom: 176px; }
  .hero { min-height: 185px; margin-top: 17px; padding: 22px 22px; border-radius: 22px; }
  .hero h1 { font-size: clamp(1.72rem, 7vw, 2.25rem); }
  .hero p { font-size: .76rem; max-width: 275px; }
  .hero-doodle { width: 155px; height: 155px; top: 5px; right: -25px; opacity: .25; }
  .picker-area { margin-top: 23px; }
  .section-title { font-size: 1.02rem; }
  .section-hint { font-size: .67rem; }
  .finder-row { display: block; }
  .search-wrap { max-width: none; }
  .tab-group { width: 100%; margin-top: 11px; }
  .tab { flex: 1; }
  .breed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .breed-card { border-radius: 17px; }
  .breed-picture { height: clamp(112px, 34vw, 155px); margin: 5px 5px 0; border-radius: 12px; }
  .breed-info { padding: 9px 10px 11px; }
  .breed-name { font-size: .78rem; }
  .breed-sub { font-size: .62rem; }
  .favorite-breed { top: 11px; right: 11px; width: 31px; height: 31px; border-radius: 10px; }
  .favorite-breed svg { width: 18px; height: 18px; }
  .selected-badge { top: 12px; left: 12px; width: 27px; height: 27px; }
  .selection-tray { padding-top: 9px; padding-bottom: calc(9px + env(safe-area-inset-bottom)); }
  .tray-inner { display: block; }
  .slots { max-width: none; gap: 6px; }
  .slot { height: 51px; border-radius: 12px; gap: 6px; }
  .slot-art { flex-basis: 40px; width: 40px; height: 40px; border-radius: 9px; }
  .slot-name { font-size: .7rem; }
  .slot-plus { font-size: 1rem; }
  .mix-button { width: 100%; min-height: 45px; margin-top: 8px; border-radius: 12px; font-size: .82rem; }
  .result-main, .collection-main { padding-top: 16px; padding-bottom: 40px; }
  .result-panel { margin-top: 12px; padding: 19px 14px 23px; border-radius: 21px; }
  .result-heading h1 { font-size: 1.55rem; }
  .result-heading p { font-size: .78rem; }
  .notice { font-size: .7rem; margin-top: 13px; }
  .result-content { margin-top: 15px; }
  .result-art-grid { gap: 8px; }
  .result-art-card { padding: 6px; border-radius: 14px; }
  .result-art { height: clamp(147px, 43vw, 230px); min-height: 0; border-radius: 10px; }
  .result-art-label { padding: 8px 1px 1px; font-size: .69rem; }
  .result-art-label span:last-child { font-size: .56rem; padding: 3px 5px; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .result-actions .primary-button { grid-column: 1 / -1; }
  .result-actions .primary-button, .result-actions .secondary-button { min-height: 45px; padding: 0 8px; font-size: .72rem; }
  .saved-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .saved-art { height: 130px; }
  .saved-title { font-size: .74rem; }
  .site-footer { padding: 12px 17px 23px; display: block; }
  .site-footer span + span { display: block; margin-top: 5px; }
}
@media (max-width: 370px) {
  .result-art-label span:last-child { display: none; }
  .section-hint { display: none; }
  .slot-name { font-size: .63rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* A quiet, photo-led layout shared by breed, mix, and saved-image cards. */
:root {
  color: #25342b;
  background: #f7f8f5;
  --ink: #25342b;
  --accent: #426b50;
  --accent-dark: #31533b;
  --line: #e0e7df;
  --photo-bg: #e9ebe5;
}
img { display: block; max-width: 100%; }
button:focus-visible, input:focus-visible { outline-color: #79a882; }
::selection { background: #cde1ce; }
.site-header { background: #fffffff2; border-bottom-color: var(--line); }
.header-inner, .page-main, .site-footer { max-width: 1180px; }
.logo-button, .saved-link, .tab[aria-selected="true"], .breed-pick, .slot.is-filled, .secondary-button { color: var(--ink); }
.logo-mark, .saved-count, .selected-badge, .mix-button, .primary-button { background: var(--accent); }
.logo-mark { box-shadow: none; transform: none; }
.logo-mark svg { transform: none; }
.logo-sub, .section-hint, .breed-sub, .tray-label span, .result-footnote, .saved-sub, .site-footer { color: #859188; }
.saved-link { border-color: var(--line); box-shadow: none; }
.saved-link:hover, .saved-link[aria-current="page"] { border-color: #a5bca8; background: #e8f0e8; }
.saved-link svg, .section-title svg, .notice svg { color: var(--accent); }
.hero { min-height: 190px; border-radius: 24px; background: linear-gradient(115deg, #e5eee4, #f0f2e9 64%, #e7ebde); box-shadow: none; }
.hero::before { width: 300px; height: 300px; right: -90px; top: -158px; background: transparent; border: 1px solid #cddacc; }
.hero::after { width: 360px; height: 360px; right: 80px; bottom: -320px; background: transparent; border: 1px solid #cddacc; }
.hero-copy { max-width: 760px; }
.hero-doodle { display: none; }
.eyebrow, .hero h1 .accent { color: var(--accent); }
.hero p, .result-heading p, .collection-heading p { color: #5d6b5f; }
.picker-area { margin-top: 29px; }
.search-input { border-color: var(--line); box-shadow: none; }
.search-input:focus { border-color: #83a68b; box-shadow: 0 0 0 3px #dae9d9; }
.tab-group { background: #e9eee8; }
.tab:hover { color: var(--accent-dark); }
.breed-grid, .saved-grid { gap: 16px; }
.breed-card, .saved-card { border: 1px solid #e6eae3; background: #fff; box-shadow: 0 5px 18px #263a2810; }
.breed-card:hover { box-shadow: 0 11px 24px #263a281c; }
.breed-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px #b8d4bb, 0 11px 24px #263a281a; }
.breed-picture, .result-art, .saved-art { display: block; height: auto; min-height: 0; aspect-ratio: 1 / 1; background: var(--photo-bg); }
.breed-picture { margin: 6px 6px 0; border-radius: 13px; }
.breed-picture img, .breed-picture picture, .breed-picture svg,
.slot-art img, .slot-art svg,
.result-art img, .result-art svg,
.saved-art img, .saved-art svg { width: 100%; height: 100%; object-fit: cover; }
.breed-picture picture img { height: 100%; }
.breed-picture .dog-fallback, .result-art .dog-fallback { width: 100%; height: 100%; display: grid; place-items: center; }
.breed-info { padding: 13px 14px 15px; }
.favorite-breed { border: 0; border-radius: 50%; color: #66816c; box-shadow: 0 3px 12px #283a2c2c; }
.favorite-breed[aria-pressed="true"] { color: #d56d6b; }
.selected-badge { border-radius: 50%; box-shadow: 0 2px 9px #2438285c; }
.empty-state { border-color: #d6dfd4; background: #fff; }
.selection-tray { background: #fffffff2; border-top-color: var(--line); box-shadow: 0 -9px 30px #263a2818; }
.slot { border-color: #cbd6cb; }
.slot:hover, .slot.is-active { border-color: #82a98a; background: #f5faf4; }
.slot-art { background: var(--photo-bg); }
.slot-plus { color: #86a48a; }
.mix-button, .primary-button { border-radius: 12px; box-shadow: 0 4px 0 var(--accent-dark); }
.mix-button:hover:not(:disabled), .primary-button:hover:not(:disabled) { background: #3a6047; box-shadow: 0 6px 0 var(--accent-dark); }
.mix-button:active:not(:disabled), .primary-button:active:not(:disabled) { box-shadow: 0 1px 0 var(--accent-dark); }
.mix-button:disabled { background: #c3cdc1; color: #f7faf6; box-shadow: 0 4px 0 #a9b7a8; }
.back-link:hover, .saved-card-button:hover .saved-title { color: var(--accent-dark); }
.result-panel { border-color: var(--line); border-radius: 23px; box-shadow: 0 12px 35px #263a280d; }
.result-panel::before { display: none; }
.notice { max-width: 830px; background: #f0f5ee; color: #566659; }
.result-art-card { border: 1px solid #e7ece6; background: #fff !important; }
.result-art-card .result-art { background: var(--photo-bg) !important; }
.result-art-label span:last-child { background: #edf4ec; color: #5e795f; }
.secondary-button { border-color: #d8e1d7; box-shadow: none; }
.secondary-button:hover { border-color: #91b398; background: #f7fbf6; }
.secondary-button.is-saved { border-color: #a7c6ac; background: #eef6ed; color: var(--accent); }
.saved-art { border-radius: 14px; }
.saved-card:nth-child(n) .saved-art { background: var(--photo-bg); }
.site-footer { border-top-color: var(--line); }
.toast { background: var(--ink); }

@media (max-width: 650px) {
  .hero { min-height: 165px; border-radius: 18px; }
  .hero h1 { font-size: clamp(1.55rem, 6.7vw, 2.2rem); }
  .breed-grid, .saved-grid { gap: 10px; }
  .breed-picture { margin: 5px 5px 0; border-radius: 11px; }
  .breed-info { padding: 10px 10px 12px; }
  .result-art-grid { grid-template-columns: 1fr; gap: 13px; }
  .result-art { border-radius: 10px; }
  .result-art-card { padding: 6px; }
}

/* Real photograph result and attribution details. */
.result-art-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: stretch; }
.result-art-card { margin: 0; }
.result-art { overflow: hidden; }
.result-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-byline { margin: 2px 3px 0; color: #758077; font-size: .68rem; line-height: 1.55; overflow-wrap: anywhere; }
.photo-byline a, .credit-row a { color: #315d3e; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.missing-mix-photo { min-height: 280px; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 5vw, 54px); border: 1px dashed #b7cbb8; border-radius: 20px; background: linear-gradient(140deg, #f0f5ee, #e7efe5); }
.missing-kicker { color: #608568; font-size: .68rem; font-weight: 900; letter-spacing: .16em; }
.missing-mix-photo h2 { margin: 15px 0 10px; font-size: clamp(1.3rem, 2.7vw, 2rem); line-height: 1.4; letter-spacing: -.045em; }
.missing-mix-photo p { margin: 0; color: #68796c; font-size: .84rem; line-height: 1.7; }
.parent-photo-panel { padding: 15px; border: 1px solid #e1e9df; border-radius: 20px; background: #f8faf7; }
.parent-photo-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 15px; margin: 0 2px 14px; }
.parent-photo-heading span:first-child { font-size: .9rem; font-weight: 900; }
.parent-photo-heading span:last-child { color: #88988a; font-size: .68rem; font-weight: 700; }
.parent-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.parent-photo { min-width: 0; margin: 0; }
.parent-photo-image { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 13px; background: var(--photo-bg); }
.parent-photo-image img { width: 100%; height: 100%; object-fit: cover; }
.parent-photo figcaption { margin-top: 8px; font-size: .75rem; font-weight: 800; text-align: center; }
.saved-photo-pair { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.saved-photo-pair img { min-width: 0; width: 100%; height: 100%; object-fit: cover; }
.footer-credits { border: 0; padding: 0; background: transparent; color: #597965; font-size: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-credits:hover { color: #294f34; }
.credits-main { padding-top: 26px; padding-bottom: 70px; }
.credit-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.photo-policy { margin: 0 0 24px; padding: 20px; border: 1px solid #dce6d9; border-radius: 14px; background: #f0f5ed; color: #4e6253; }
.photo-policy h2 { margin: 0 0 10px; color: var(--ink); font-size: 1rem; }
.photo-policy p { margin: 8px 0 0; font-size: .8rem; line-height: 1.8; }
.credit-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 17px; border: 1px solid #e0e8df; border-radius: 12px; background: #fff; color: #617064; font-size: .75rem; }
.credit-thumbnail { display: block; width: 76px; aspect-ratio: 1; overflow: hidden; border-radius: 9px; background: var(--photo-bg); }
.credit-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.credit-details { display: grid; gap: 5px; min-width: 0; line-height: 1.65; overflow-wrap: anywhere; }
.credit-name { color: var(--ink); font-weight: 900; }
.credit-changes { color: #617064; font-size: .7rem; }
@media (max-width: 650px) {
  .result-art-grid { grid-template-columns: 1fr; }
  .missing-mix-photo { min-height: 180px; }
  .parent-photo-panel { padding: 11px; }
  .credits-main { padding-top: 16px; padding-bottom: 40px; }
  .photo-policy { padding: 16px; }
  .credit-row { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 14px 12px; }
  .credit-thumbnail { width: 54px; }
}

/* Browse verified photographs while keeping unphotographed pairs visible. */
.catalog-hero-link { display: inline-flex; align-items: center; gap: 15px; margin-top: 16px; padding: 9px 13px; border: 1px solid #b7cdb6; border-radius: 9px; background: #fff9; color: #315d3e; font-size: .78rem; font-weight: 900; }
.catalog-hero-link:hover { background: #fff; border-color: #82a987; }
.catalog-hero-link span { color: #547d5d; white-space: nowrap; }
.catalog-main { padding-top: 26px; padding-bottom: 75px; }
.catalog-heading { margin-bottom: 19px; }
.catalog-heading p { max-width: 760px; }
.catalog-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.catalog-stats span { display: inline-flex; align-items: baseline; gap: 5px; padding: 8px 11px; border: 1px solid #dae6d9; border-radius: 9px; background: #ecf3ea; color: #4f6b54; font-size: .72rem; font-weight: 800; }
.catalog-stats strong { color: #315d3e; font-size: 1.1rem; }
.catalog-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.catalog-controls .search-wrap { max-width: 450px; }
.catalog-count { margin: 0 0 11px; color: #6b7c6f; font-size: .75rem; font-weight: 800; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.catalog-card { min-width: 0; border: 1px solid #e3e9e1; border-radius: 17px; background: #fff; box-shadow: 0 5px 18px #263a2810; overflow: hidden; }
.catalog-card-button { display: block; width: 100%; padding: 6px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.catalog-card-button:hover .catalog-card-name { color: var(--accent-dark); }
.catalog-picture { display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: var(--photo-bg); }
.catalog-picture > img { width: 100%; height: 100%; object-fit: cover; }
.catalog-parent-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; width: 100%; height: 100%; }
.catalog-parent-pair img { width: 100%; height: 100%; min-width: 0; object-fit: cover; }
.catalog-card-info { display: block; padding: 11px 7px 10px; }
.catalog-card-name { display: block; min-height: 2.8em; font-size: .82rem; line-height: 1.4; font-weight: 900; }
.catalog-card-status { display: inline-block; margin-top: 5px; padding: 4px 7px; border-radius: 6px; background: #f0f1ed; color: #667368; font-size: .64rem; font-weight: 800; }
.catalog-card-status.has-photo { background: #e7f2e4; color: #396346; }
.catalog-more { display: flex; justify-content: center; margin-top: 21px; }
.breed-more { display: flex; justify-content: center; margin: 12px 0 0; }
.catalog-note { max-width: 760px; margin: 24px 0 0; color: #748076; font-size: .72rem; line-height: 1.7; }
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .catalog-main { padding-top: 16px; padding-bottom: 40px; }
  .catalog-controls { display: block; }
  .catalog-controls .search-wrap { max-width: none; }
  .catalog-controls .tab-group { display: flex; margin-top: 10px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-card { border-radius: 13px; }
  .catalog-card-button { padding: 4px; }
  .catalog-picture { border-radius: 9px; }
  .catalog-card-info { padding: 8px 5px 7px; }
  .catalog-card-name { font-size: .73rem; }
  .catalog-card-status { font-size: .58rem; }
}

/* The mix stays on top of the current breed, catalog, or saved view. */
.mix-modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: #14271ab8; backdrop-filter: blur(5px); }
.mix-modal-dialog { width: min(100%, 980px); max-height: min(92dvh, 900px); overflow: auto; overscroll-behavior: contain; border: 1px solid #dce7db; border-radius: 23px; background: #fff; box-shadow: 0 28px 80px #0b201a55; }
.mix-modal-close { position: sticky; z-index: 2; top: 12px; display: grid; place-items: center; width: 40px; height: 40px; margin: 12px 12px -52px auto; border: 1px solid #dce6dc; border-radius: 50%; background: #fff; color: #30483a; box-shadow: 0 3px 14px #172f1d20; }
.mix-modal-close:hover { background: #f0f6ef; }
.mix-modal-close svg { width: 19px; height: 19px; }
.mix-modal-body { padding: 29px 30px 28px; }
.mix-modal-heading { padding-right: 47px; }
.mix-modal-heading h2 { margin: 7px 0 4px; color: var(--ink); font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.25; letter-spacing: -.055em; }
.mix-modal-heading p { margin: 0; color: #647568; font-size: .84rem; line-height: 1.6; font-weight: 650; }
.mix-modal-gallery { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); align-items: start; gap: 16px; margin-top: 19px; }
.mix-modal-photo-column { min-width: 0; }
.mix-modal-gallery .result-art-card { padding: 7px; }
.mix-modal-visual .result-art { width: 100%; height: min(48vh, 460px); aspect-ratio: auto; background: #edf1eb !important; }
.mix-modal-visual .result-art img { object-fit: contain; }
.mix-modal-visual .photo-byline { margin: 7px 5px 5px; }
.mix-modal-gallery .result-art-label { padding: 10px 5px 4px; }
.mix-modal-gallery .parent-photo-panel { align-self: stretch; }
.mix-modal-gallery .parent-photos { gap: 9px; }
.mix-modal-gallery .parent-photo figcaption { font-size: .68rem; }
.mix-modal-thumbnails { display: flex; gap: 9px; overflow-x: auto; padding: 11px 2px 3px; }
.mix-modal-thumbnail { flex: 0 0 68px; width: 68px; height: 68px; padding: 3px; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #edf1eb; }
.mix-modal-thumbnail[aria-pressed="true"] { border-color: var(--accent); }
.mix-modal-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.mix-modal-gallery.no-mix-photo { grid-template-columns: minmax(0, 1fr) minmax(200px, .65fr); }
.mix-modal-unavailable { align-self: center; padding: 20px; border: 1px solid #dce7db; border-radius: 15px; background: #f3f7f1; }
.mix-modal-unavailable-label { color: #52735a; font-size: .8rem; font-weight: 900; }
.mix-modal-unavailable p { margin: 7px 0 0; color: #65766a; font-size: .76rem; line-height: 1.65; }
.mix-modal-note { margin: 17px 0 0; color: #6c7c70; font-size: .74rem; line-height: 1.6; }
.mix-modal-dialog .result-actions { margin-top: 16px; }
.mix-modal-dialog .result-actions .primary-button, .mix-modal-dialog .result-actions .secondary-button { min-height: 44px; }

@media (max-width: 650px) {
  .mix-modal-backdrop { align-items: end; padding: 0; }
  .mix-modal-dialog { width: 100%; max-height: 94dvh; border-radius: 21px 21px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .mix-modal-body { padding: 20px 15px 23px; }
  .mix-modal-heading { padding-right: 39px; }
  .mix-modal-heading h2 { font-size: 1.55rem; }
  .mix-modal-gallery, .mix-modal-gallery.no-mix-photo { grid-template-columns: 1fr; gap: 11px; margin-top: 14px; }
  .mix-modal-visual .result-art { height: min(43vh, 340px); }
  .mix-modal-gallery .parent-photo-panel { padding: 10px; }
  .mix-modal-gallery .parent-photo-heading { margin-bottom: 8px; }
  .mix-modal-gallery .parent-photo-image { max-height: 130px; }
  .mix-modal-gallery .parent-photo-image img { height: 100%; }
  .mix-modal-unavailable { padding: 12px 14px; }
  .mix-modal-dialog .result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mix-modal-dialog .result-actions .primary-button, .mix-modal-dialog .result-actions .secondary-button:last-child { grid-column: 1 / -1; }
}
