.deck-shell { width: min(1380px, calc(100% - 26px)); padding-top: 29px; }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 22px; color: #f0ddba; font-size: .69rem; }
.deck-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 27px; color: #f4e5c7; }
.deck-heading h1 { margin-bottom: 12px; }
.deck-heading > div:first-child > p:last-child { max-width: 770px; color: #dec9a7; font: italic .93rem/1.6 Georgia, serif; }
.deck-heading .eyebrow { color: #efc688; }
.privacy-note { position: relative; width: 210px; padding: 24px 18px 16px; color: #4d402e; background: #d9d278; box-shadow: 5px 7px 0 rgba(49, 28, 14, .15); text-align: center; transform: rotate(1deg); }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note small { margin-top: 4px; font-size: .63rem; }
.note-pin { position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: #a45139; }
.deck-name-sheet { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 18px 20px; border: 1px solid rgba(83, 61, 37, .29); background: linear-gradient(145deg, #ede1b9, #d3be8c); box-shadow: 5px 7px 0 rgba(52, 30, 16, .14); }
.deck-name-sheet label { display: grid; width: min(100%, 560px); gap: 6px; color: #725e43; font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.deck-name-sheet input { padding: 10px 12px; border: 1px solid rgba(77, 59, 37, .31); color: #362b1e; background: rgba(255, 251, 229, .62); font: 700 1.05rem Georgia, serif; }
.deck-actions { display: flex; gap: 7px; }
.deck-actions button { padding: 9px 11px; border: 1px solid #3d6549; border-radius: 3px; color: #f9edd0; background: #3d6549; font-size: .65rem; font-weight: 900; cursor: pointer; }
.deck-actions .danger-button { border-color: rgba(123, 62, 45, .45); color: #7b3e2e; background: rgba(255, 247, 218, .45); }
.deck-message { min-height: 25px; color: #f1ddbb; font-size: .72rem; font-weight: 850; }
.deck-message.warning { color: #ffd59e; }.deck-message.success { color: #d8efc7; }
.builder-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); align-items: start; gap: 20px; }
.library-sheet, .deck-sheet { border: 1px solid rgba(83, 61, 37, .3); border-radius: 4px 12px 4px 9px; background: linear-gradient(145deg, #eee2bb, #d3bf8d); box-shadow: 8px 10px 0 rgba(52, 30, 16, .15); }
.library-sheet { padding: 24px; }
.sheet-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.sheet-heading h2 { margin: 0; font: 700 1.8rem Georgia, serif; }
.sheet-heading > strong { color: #476c50; font: 700 1.35rem Georgia, serif; }
.library-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.library-filters input[type="search"], .library-filters select { min-width: 0; height: 40px; padding: 8px 10px; border: 1px solid rgba(78, 60, 37, .31); color: #3a2e20; background: rgba(255, 251, 229, .63); }
.library-filters label { grid-column: 1 / -1; color: #66563e; font-size: .66rem; font-weight: 800; }
.library-filters input[type="checkbox"] { accent-color: #40664a; }
.library-list { display: grid; max-height: 820px; gap: 7px; overflow-y: auto; padding-right: 5px; scrollbar-color: #8e704d rgba(255,255,255,.18); }
.library-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) 39px; align-items: center; gap: 10px; min-height: 84px; padding: 8px; border-left: 3px solid #886d4c; background: rgba(255, 250, 225, .37); }
.library-card img { width: 58px; height: 75px; object-fit: contain; }
.library-card h3 { margin: 2px 0; font: 700 .79rem Georgia, serif; }
.library-card h3 a { text-decoration: none; }
.library-card small, .library-card p, .library-card span { display: block; margin: 0; color: #74644d; font-size: .53rem; }
.library-card .ownership-note { display: block; margin-top: 2px; color: #8a7658; font-size: .5rem; font-style: normal; font-weight: 750; }
.library-card .ownership-note.has-copies { color: #3e6a47; }
.library-card span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.library-card > button { position: relative; width: 35px; height: 35px; border: 0; border-radius: 50%; color: #f9edcf; background: #3d6549; font-size: 1.1rem; font-weight: 900; cursor: pointer; }
.library-card > button small { position: absolute; right: -3px; bottom: -4px; display: grid; width: 17px; height: 17px; border-radius: 50%; color: #fff4dc; background: #7d5333; place-items: center; }
.empty-library, .empty-deck { padding: 22px; color: #77684f; font: italic .75rem Georgia, serif; text-align: center; }
.deck-sheet { position: sticky; top: 91px; padding: 30px 22px 24px; background: repeating-linear-gradient(0deg, transparent 0 34px, rgba(83, 72, 53, .065) 35px), linear-gradient(145deg, #f1e7c5, #d8c89e); }
.deck-tape { position: absolute; top: -10px; left: 50%; width: 94px; height: 21px; background: rgba(226, 203, 155, .85); transform: translateX(-50%) rotate(-2deg); }
.deck-status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deck-status > div { padding: 12px; border-left: 3px solid #98674a; background: rgba(255, 251, 228, .43); }
.deck-status > div.complete { border-color: #4f7a54; background: rgba(210, 229, 181, .5); }
.deck-status strong, .deck-status span { display: block; }
.deck-status strong { font: 700 1.35rem Georgia, serif; }.deck-status span { color: #76664e; font-size: .56rem; font-weight: 900; text-transform: uppercase; }
.color-status { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 14px 0; }
.color-status > span { color: #736149; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
#deck-colors { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
#deck-colors span { padding: 4px 8px; border-radius: 99px; color: white; font-size: .58rem; font-weight: 900; }
#deck-colors .red { background: #a94f47; }#deck-colors .blue { background: #41799d; }#deck-colors .green { background: #507b50; }#deck-colors .purple { background: #6e508a; }
#deck-colors em { color: #8a7b62; font: italic .7rem Georgia, serif; }
.rule-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 20px; }
.rule-checks p { display: flex; align-items: center; gap: 6px; margin: 0; color: #7b6a52; font-size: .57rem; font-weight: 800; }
.rule-checks p.pass { color: #3f6b47; }.rule-checks p span { font-size: .9rem; }
.deck-section { margin-top: 17px; }
.deck-section-title { display: flex; align-items: end; justify-content: space-between; gap: 8px; padding-bottom: 7px; border-bottom: 2px solid rgba(74, 58, 37, .22); }
.deck-section-title h2 { margin: 0; font: 700 1.12rem Georgia, serif; }
.deck-section-title span { color: #7a6a51; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.deck-list { display: grid; max-height: 300px; gap: 5px; overflow-y: auto; margin-top: 8px; }
.deck-row { display: grid; grid-template-columns: 24px 35px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 47px; padding: 5px; background: rgba(255, 251, 229, .4); }
.deck-row > strong { color: #42694b; font: 700 1rem Georgia, serif; text-align: center; }
.deck-row img { width: 33px; height: 43px; object-fit: contain; }
.deck-row div:nth-child(3) { min-width: 0; }
.deck-row a, .deck-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-row a { font: 700 .68rem Georgia, serif; text-decoration: none; }.deck-row small { color: #7e6d54; font-size: .48rem; }
.row-actions { display: flex; gap: 3px; }
.row-actions button { width: 27px; height: 27px; border: 1px solid rgba(72, 56, 36, .27); border-radius: 50%; color: #4e4231; background: rgba(255,255,255,.3); font-weight: 900; cursor: pointer; }
@media (max-width: 980px) {
  .builder-layout { grid-template-columns: 1fr; }
  .deck-sheet { position: relative; top: 0; }
}
@media (max-width: 650px) {
  .deck-heading, .deck-name-sheet { align-items: start; flex-direction: column; }
  .privacy-note { width: min(100%, 260px); }
  .deck-name-sheet label { width: 100%; }
  .library-filters { grid-template-columns: 1fr; }
  .library-filters label { grid-column: auto; }
  .rule-checks { grid-template-columns: 1fr; }
}
