.tpl-switch { border: 1px solid #e3ddd2; border-radius: 10px; padding: 8px 10px 10px; margin: 0 0 14px; background: #fbf8f2; }
.tpl-h { font-weight: 700; font-size: 13px; color: #5a3d1e; text-transform: uppercase; letter-spacing: .04em; }
.tpl-h span { text-transform: none; letter-spacing: 0; font-weight: 400; color: #7a7266; font-size: 12px; margin-left: 4px; }
.tpl-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 3px 6px; border: 2px solid transparent; border-radius: 8px; text-decoration: none; color: #3b3227; font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; background: #fff; }
.tpl small { font-weight: 500; color: #7a7266; font-size: 11px; }
.tpl img { width: 100%; max-width: 72px; height: auto; aspect-ratio: 8.5 / 11; object-fit: cover; border: 1px solid #d9d2c6; display: block; background: #eee; }
.tpl:hover { border-color: #d8c9ad; }
.tpl.cur { border-color: #8a6a3f; background: #f5ecdc; }
.shared-badge { display: inline-block; text-transform: none; letter-spacing: 0; font-size: 10.5px; font-weight: 600; color: #2f6b3a; background: #e3f1e4; border-radius: 9px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.nu { font-weight: 400; color: #9a8f80; font-size: 11.5px; margin-left: 4px; }
.dd { position: relative; display: inline-block; }
.dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.28); padding: 6px; min-width: 250px; }
.dd.open .dd-menu { display: block; }
.dd-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: 600 14px var(--ui); color: #111; padding: 10px 12px; border-radius: 7px; cursor: pointer; }
.dd-menu button:hover { background: #f1ece3; }
.all-box { max-width: 760px; }
.all-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.all-grid figure { margin: 0; }
.all-grid figcaption { font-size: 13px; color: #555; margin-top: 3px; }
@media (max-width: 860px) { .dd-menu { right: auto; left: 0; } }
/* Xuất ảnh đại diện (cover.js) */
.tcpc-box { max-width: 760px; text-align: left; padding: 14px 16px 16px; }
.tcpc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.tcpc-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: #555; padding: 2px 6px; }
.tcpc-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.tcpc-seg.two { grid-template-columns: 1fr 1fr; }
.tcpc-seg button { border: 1.5px solid #d9d2c6; background: #fff; border-radius: 8px; padding: 6px 4px; font: 700 13px var(--ui); color: #3b3227; cursor: pointer; line-height: 1.2; }
.tcpc-seg button small { display: block; font-weight: 500; font-size: 11.5px; color: #7a7266; }
.tcpc-seg button.cur { border-color: #8a6a3f; background: #f5ecdc; }
.tcpc-prev { position: relative; width: 100%; aspect-ratio: 1200 / 700; background: #eee; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.tcpc-box .tcpc-prev img { display: block; width: 100%; height: 100%; border: 0; -webkit-touch-callout: default; }
.tcpc-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.75); font: 600 14px var(--ui); color: #555; }
.tcpc-box .tcpc-hint { font-size: 12.5px; color: #666; margin: 5px 0 8px; word-break: break-all; }
.tcpc-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font: 14px var(--ui); }
.tcpc-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tcpc-rest { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 260px; }
.tcpc-rest input { flex: 1; min-width: 0; font: 14px var(--ui); padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; }
.tcpc-box .tcpc-note { font-size: 12px; color: #7a7266; margin: 8px 0 4px; }
.tcpc-box .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.tcpc-box .btn { background: #2c2c2c; }
.tcpc-box .btn.primary { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }
.tcpc-grid { margin-top: 10px; }
.tcpc-grid:empty { display: none; }
@media (max-width: 560px) { .tcpc-seg { grid-template-columns: 1fr 1fr; } .tcpc-box { padding: 12px; } }
@media print { .tpl-switch, .dd { display: none !important; } }
.overflow-warn.soft { color: #7a5a1e; font-weight: 500; }
