:root {
    --primary: #05a3ff;
    --primary-soft: rgba(5, 163, 255, 0.16);
    --primary-border: rgba(5, 163, 255, 0.35);

    --bg: #070b12;
    --bg2: #0b1220;
    --body-bg:
        radial-gradient(circle at top left, rgba(5, 163, 255, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(5, 163, 255, 0.08), transparent 30%),
        var(--bg);
    --card: #111827;
    --card2: #1f2937;
    --card-gradient: linear-gradient(180deg,#1b2432,#121a28);
    --border: rgba(255, 255, 255, 0.12);

    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --description: #d1d5db;
    --sensor-bg: rgba(255,255,255,.05);
    --sensor-border: rgba(255,255,255,.08);
    --progress-bg: rgba(255,255,255,.1);
    --progress-fade: rgba(5, 163, 255, .45);
    --shadow: rgba(0,0,0,.35);

    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    --header-height: clamp(72px, 10vh, 130px);
    --footer-height: clamp(34px, 5vh, 58px);
    --display-padding: clamp(10px, 2vw, 28px);
    --display-gap: clamp(8px, 1.4vw, 20px);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--body-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    min-height: 100vh;
}

body.display-theme-nautilis {
    --primary: #05a3ff;
    --primary-soft: rgba(5, 163, 255, 0.16);
    --primary-border: rgba(5, 163, 255, 0.35);
}

body.display-theme-dark_pub {
    --primary: #f59e0b;
    --primary-soft: rgba(245, 158, 11, 0.16);
    --primary-border: rgba(245, 158, 11, 0.36);
    --bg: #080604;
    --body-bg:
        radial-gradient(circle at top left, rgba(245, 158, 11, .14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(120, 53, 15, .22), transparent 34%),
        #080604;
    --card-gradient: linear-gradient(180deg,#201915,#120d0a);
    --card: #15100c;
    --card2: #211813;
    --border: rgba(255, 237, 213, .14);
    --text: #fff7ed;
    --muted: #c7a982;
    --soft: #ead6bd;
    --description: #e7cdb1;
    --sensor-bg: rgba(245, 158, 11, .09);
    --sensor-border: rgba(245, 158, 11, .22);
    --progress-fade: rgba(245, 158, 11, .45);
}

body.display-theme-copper_amber {
    --primary: #d97706;
    --primary-soft: rgba(217, 119, 6, .16);
    --primary-border: rgba(217, 119, 6, .34);
    --body-bg:
        radial-gradient(circle at top left, rgba(217, 119, 6, .17), transparent 34%),
        radial-gradient(circle at bottom right, rgba(127, 29, 29, .16), transparent 30%),
        #11100d;
    --card-gradient: linear-gradient(180deg,#2a2118,#17120d);
    --border: rgba(253, 230, 138, .16);
    --text: #fffaf0;
    --muted: #d7b98c;
    --soft: #f1d2a8;
    --description: #ead4b5;
    --sensor-bg: rgba(251, 191, 36, .1);
    --sensor-border: rgba(251, 191, 36, .24);
    --progress-fade: rgba(217, 119, 6, .42);
}

body.display-theme-green_hop {
    --primary: #84cc16;
    --primary-soft: rgba(132, 204, 22, .16);
    --primary-border: rgba(132, 204, 22, .34);
    --body-bg:
        radial-gradient(circle at top left, rgba(132, 204, 22, .15), transparent 34%),
        radial-gradient(circle at bottom right, rgba(20, 83, 45, .2), transparent 32%),
        #06100b;
    --card-gradient: linear-gradient(180deg,#132118,#0a140e);
    --border: rgba(190, 242, 100, .14);
    --text: #f7fee7;
    --muted: #b7d58f;
    --soft: #d9f99d;
    --description: #d4e8bf;
    --sensor-bg: rgba(132, 204, 22, .1);
    --sensor-border: rgba(132, 204, 22, .24);
    --progress-fade: rgba(132, 204, 22, .42);
}

body.display-theme-red_bar {
    --primary: #ef4444;
    --primary-soft: rgba(239, 68, 68, .17);
    --primary-border: rgba(248, 113, 113, .36);
    --body-bg:
        radial-gradient(circle at top left, rgba(239, 68, 68, .18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(127, 29, 29, .28), transparent 33%),
        #110608;
    --card-gradient: linear-gradient(180deg,#241013,#14080a);
    --card: #170b0d;
    --card2: #261014;
    --border: rgba(254, 202, 202, .16);
    --text: #fff5f5;
    --muted: #e6a5a5;
    --soft: #fecaca;
    --description: #f3c4c4;
    --sensor-bg: rgba(239, 68, 68, .1);
    --sensor-border: rgba(248, 113, 113, .25);
    --progress-fade: rgba(239, 68, 68, .46);
    --shadow: rgba(20, 0, 0, .42);
}

body.display-theme-minimal_black {
    --primary: #e5e7eb;
    --primary-soft: rgba(229, 231, 235, .1);
    --primary-border: rgba(229, 231, 235, .24);
    --body-bg: #030303;
    --card-gradient: linear-gradient(180deg,#111111,#070707);
    --card: #090909;
    --card2: #111111;
    --border: rgba(255, 255, 255, .12);
    --text: #ffffff;
    --muted: #a3a3a3;
    --soft: #d4d4d4;
    --description: #d6d6d6;
    --sensor-bg: rgba(255,255,255,.06);
    --sensor-border: rgba(255,255,255,.12);
    --progress-fade: rgba(255,255,255,.38);
}

body.display-theme-light_menu {
    --primary: #0369a1;
    --primary-soft: rgba(3, 105, 161, .1);
    --primary-border: rgba(3, 105, 161, .24);
    --body-bg:
        radial-gradient(circle at top left, rgba(14, 165, 233, .13), transparent 32%),
        #f8fafc;
    --card-gradient: linear-gradient(180deg,#ffffff,#edf4f8);
    --card: #ffffff;
    --card2: #f1f5f9;
    --border: rgba(15, 23, 42, .14);
    --text: #111827;
    --muted: #64748b;
    --soft: #334155;
    --description: #334155;
    --sensor-bg: rgba(3, 105, 161, .08);
    --sensor-border: rgba(3, 105, 161, .2);
    --progress-bg: rgba(15, 23, 42, .12);
    --progress-fade: rgba(3, 105, 161, .38);
    --shadow: rgba(15, 23, 42, .14);
}

/* ======================================================
   MAIN DISPLAY WRAPPER
   ====================================================== */

.display-wrapper {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;

    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--display-gap);

    padding: var(--display-padding);
}

/* ======================================================
   HEADER
   ====================================================== */

.display-header {
    min-height: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(10px, 2vw, 28px);

    padding-bottom: clamp(8px, 1.2vh, 18px);
    border-bottom: 1px solid var(--border);
}

.display-header h1 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(1.15rem, 2.6vw, 3rem);
    line-height: 1.18;
    letter-spacing: 0;
    font-weight: 850;

    max-width: 72vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.display-header p {
    margin: clamp(4px, 0.6vh, 10px) 0 0 0;
    color: var(--muted);
    font-size: clamp(0.82rem, 1.4vw, 1.35rem);

    max-width: 72vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.display-logo-slot {
    width: clamp(120px, 16vw, 260px);
    min-height: clamp(44px, 7vh, 96px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.display-logo-slot img {
    display: block;
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}
/* ======================================================
   STATUS MESSAGE
   ====================================================== */

.status-message {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;

    color: var(--muted);
    text-align: center;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

/* ======================================================
   GRID
   ====================================================== */

.tap-grid {

    width: 100%;
    height: 100%;

    display: grid;

    gap: var(--display-gap);

    align-content: stretch;
    justify-content: stretch;

    overflow: hidden;
}

/* ======================================================
   CARD
   ====================================================== */

.tap-card {

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    background: var(--card-gradient);

    border: 1px solid var(--border);

    border-radius: 22px;

    padding: clamp(10px,1.4vw,24px);

    box-shadow:
        0 8px 30px var(--shadow);
}

/* ======================================================
   HEADER INSIDE CARD
   ====================================================== */

.tap-header{

    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:16px;
}

.tap-left{

    flex:1;
    min-width:0;
}

.tap-right{

    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;

    justify-content:flex-end;
}

.tap-number{

    color:var(--primary);

    font-size:.9rem;

    font-weight:800;

    letter-spacing:.18em;

    text-transform:uppercase;

    line-height:1;

    white-space:nowrap;
}

.sensor-badge{

    background:var(--sensor-bg);

    border:1px solid var(--sensor-border);

    border-radius:999px;

    padding:6px 10px;

    display:flex;
    align-items:center;
    gap:6px;

    white-space:nowrap;

    font-size:.85rem;

    font-weight:700;
}

.sensor-badge b{

    color:var(--muted);
    font-weight:600;
}

.sensor-badge span{

    color:var(--text);
}

.sensor-badge.sensor-offline{
    background:rgba(245, 158, 11, .12);
    border-color:rgba(245, 158, 11, .32);
}

.sensor-badge.sensor-offline b,
.sensor-badge.sensor-offline span{
    color:var(--warning);
}

/* ======================================================
   COLOR BAR
   ====================================================== */

.tap-color-bar{

    height:6px;

    margin:10px 0 16px;

    border-radius:999px;

    background:var(--tap-color,var(--primary));

    box-shadow:
        0 0 20px var(--tap-color,var(--primary));
}
/* ======================================================
   TEXT CONTENT
   ====================================================== */

.tap-card h2{

    margin:0 0 8px;

    color:var(--text);

    text-transform:uppercase;

    font-size:clamp(1.35rem,2.8vw,3.8rem);

    line-height:.96;

    letter-spacing:.02em;

    font-weight:850;

    display:-webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

    overflow:hidden;

    overflow-wrap:break-word;
}

.tap-feature-badges{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin:-2px 0 10px;
}

.new-on-tap-badge{
    display:inline-flex;
    align-items:center;
    align-self:flex-start;
    width:max-content;
    max-width:100%;
    margin:0;
    padding:5px 10px;
    border-radius:999px;
    border:1px solid var(--tap-color,var(--primary));
    background:rgba(255,255,255,.08);
    color:var(--text);
    font-size:clamp(.7rem,.9vw,.9rem);
    font-weight:850;
    line-height:1;
    text-transform:uppercase;
    white-space:nowrap;
    box-shadow:0 0 12px rgba(255,255,255,.08);
}

.limited-release-badge{
    border-color:#fbbf24;
    background:rgba(251,191,36,.12);
    color:#fde68a;
}

.tap-list-main .tap-feature-badges,
.tap-column-item .tap-feature-badges{
    margin:2px auto 8px;
}

.tap-list-main .new-on-tap-badge,
.tap-column-item .new-on-tap-badge{
    font-size:clamp(.68rem,.8vw,.82rem);
}

.tap-list-main .tap-feature-badges{
    margin-left:0;
}

.brewery{

    color:var(--soft);

    font-size:clamp(.9rem,1.25vw,1.25rem);

    font-weight:650;

    margin-top:auto;
    margin-bottom:0;
    padding-top:8px;
    text-align:right;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.style{

    color:var(--muted);

    font-size:clamp(.82rem,1.1vw,1.12rem);

    margin-bottom:10px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.tap-meta{

    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    align-self:center;

    color:var(--text);

    background:var(--primary-soft);

    border:1px solid var(--primary-border);

    padding:6px 10px;

    border-radius:999px;

    font-weight:750;

    font-size:clamp(.78rem,1vw,.98rem);

    margin:0 auto 10px;

    max-width:100%;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.tap-description{

    color:var(--description);

    font-size:clamp(.82rem,1vw,1.05rem);

    line-height:1.28;

    margin:0;

    display:-webkit-box;

    -webkit-line-clamp:3;

    -webkit-box-orient:vertical;

    overflow:hidden;
}

.qr-note{

    margin-top:auto;

    padding-top:8px;

    color:var(--muted);

    font-size:.82rem;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

/* old sensor grid is intentionally hidden because sensors are now in header */
.sensor-grid{
    display:none;
}

/* ======================================================
   FOOTER
   ====================================================== */

.display-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:16px;

    padding-top:clamp(6px,1vh,14px);

    border-top:1px solid var(--border);

    color:var(--muted);

    font-size:clamp(.78rem,1vw,.95rem);

    min-height:0;
}

.display-footer span{

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.page-progress{
    flex:1 1 auto;
    height:4px;
    min-width:80px;
    max-width:520px;
    border-radius:999px;
    overflow:hidden;
    background:var(--progress-bg);
}

.page-progress.is-hidden{
    visibility:hidden;
}

.page-progress-bar{
    width:100%;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg, var(--primary), var(--progress-fade));
    transform-origin:left center;
    transform:scaleX(1);
}

.page-progress.is-running .page-progress-bar{
    animation:pageProgress var(--page-progress-duration, 10000ms) linear forwards;
}

@keyframes pageProgress{
    from{
        transform:scaleX(1);
    }

    to{
        transform:scaleX(0);
    }
}
/* ======================================================
   AUTO LAYOUTS - TV / DESKTOP
   ====================================================== */

/* 1–2 taps */
.tap-grid.layout-hero{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:1fr;
}

.tap-grid.layout-hero .tap-card{
    padding:clamp(16px,2vw,34px);
}

.tap-grid.layout-hero .tap-card h2{
    font-size:clamp(1.75rem,3.6vw,4.1rem);
    line-height:1;
    -webkit-line-clamp:3;
}

.tap-grid.layout-hero .sensor-badge{
    font-size:clamp(.85rem,1.15vw,1.25rem);
    padding:8px 12px;
}

.tap-grid.layout-hero .price-list-header .price-chip{
    font-size:clamp(.85rem,1.15vw,1.25rem);
    padding:8px 12px;
}

/* 3–4 taps */
.tap-grid.layout-standard{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr));
}

/* 5–6 taps */
.tap-grid.layout-six{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
}

.tap-grid.layout-paged .tap-card{
    padding:clamp(14px,1.7vw,28px);
    border-radius:22px;
}

.tap-grid.layout-paged .tap-card h2{
    font-size:clamp(1.65rem,3vw,3.8rem);
    line-height:1;
    -webkit-line-clamp:2;
    margin:0 0 10px;
}

.tap-grid.layout-paged .tap-description{
    -webkit-line-clamp:3;
    font-size:clamp(.9rem,1.12vw,1.15rem);
    line-height:1.3;
}

.tap-grid.layout-paged .tap-meta{
    font-size:clamp(.82rem,1vw,1rem);
    padding:6px 10px;
    gap:6px;
    margin:0 auto 10px;
}

.tap-grid.layout-paged .tap-meta-icon{
    font-size:.68em;
}

.tap-grid.layout-paged .sensor-badge{
    font-size:clamp(.78rem,.95vw,1rem);
    padding:6px 10px;
}

.tap-grid.layout-paged .price-list{
    gap:8px;
    margin:8px 0 10px;
}

.tap-grid.layout-paged .price-chip{
    font-size:clamp(.85rem,1vw,1.05rem);
}

.tap-grid.layout-paged .qr-note{
    display:none;
}

.tap-grid.layout-list{
    display:block;
    overflow:hidden;
    position:relative;
}

.tap-list-track{
    display:flex;
    flex-direction:column;
    gap:clamp(10px,1.2vw,18px);
    will-change:transform;
}

.tap-grid.layout-list.is-auto-scrolling .tap-list-track{
    animation:listAutoScroll var(--list-scroll-duration,24000ms) ease-in-out infinite alternate;
}

@keyframes listAutoScroll{
    from{
        transform:translateY(0);
    }

    to{
        transform:translateY(calc(var(--list-scroll-distance,0px) * -1));
    }
}

.tap-list-item{
    min-width:0;
    min-height:clamp(86px,12vh,132px);
    flex:0 0 auto;
    overflow:hidden;
    display:grid;
    grid-template-columns:minmax(74px,clamp(82px,8vw,130px)) minmax(0,1fr) auto;
    gap:clamp(12px,1.4vw,24px);
    align-items:stretch;
    padding:clamp(10px,1vw,16px);
    border:1px solid var(--border);
    border-left:7px solid var(--tap-color,var(--primary));
    border-radius:18px;
    background:var(--card-gradient);
    box-shadow:0 8px 30px var(--shadow);
}

.tap-list-number{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    height:100%;
    padding:0 clamp(8px,1vw,14px);
    border-right:1px solid rgba(255,255,255,.1);
    color:var(--primary);
    font-size:clamp(.78rem,1vw,1.08rem);
    font-weight:850;
    letter-spacing:.12em;
    text-transform:uppercase;
    white-space:nowrap;
    text-align:center;
}

.tap-column-top .tap-list-number{
    display:block;
    height:auto;
    min-width:0;
    padding:0;
    border-right:0;
    text-align:left;
}

.tap-list-main{
    min-width:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.tap-list-main h2,
.tap-column-item h2{
    margin:0 0 8px;
    color:var(--text);
    text-transform:uppercase;
    font-size:clamp(1.45rem,2.45vw,3rem);
    line-height:1;
    font-weight:850;
    display:-webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient:vertical;
    overflow:hidden;
    overflow-wrap:break-word;
}

.tap-list-details{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:clamp(5px,.6vw,9px);
    color:rgba(249,250,251,.72);
    font-size:clamp(.82rem,1.05vw,1.14rem);
    line-height:1.2;
    font-weight:600;
}

.tap-list-brewery{
    font-size:.92em;
    color:rgba(249,250,251,.64);
    font-weight:500;
}

.tap-list-divider{
    color:rgba(249,250,251,.35);
}

.tap-column-item .tap-description{
    -webkit-line-clamp:6;
    font-size:clamp(1.04rem,1.22vw,1.34rem);
    line-height:1.28;
    margin:0 0 clamp(8px,.9vw,14px);
    flex:0 1 auto;
}

.tap-column-item .brewery{
    display:block;
    margin:auto 0 clamp(10px,1vw,16px);
    color:rgba(249,250,251,.72);
    font-size:.92em;
    font-weight:650;
    text-align:center;
    flex:0 0 auto;
}

.tap-list-side{
    min-width:clamp(180px,22vw,360px);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-end;
    gap:8px;
}

.tap-list-sensors{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

.price-list-list,
.price-list-column{
    justify-content:flex-end;
    gap:6px;
    margin:0;
}

.price-list-list .price-chip,
.price-list-column .price-chip{
    background:rgba(5, 163, 255, .12);
    border:1px solid rgba(5, 163, 255, .28);
    border-radius:999px;
    padding:5px 9px;
    font-size:clamp(.74rem,.9vw,.95rem);
}

.tap-grid.layout-columns{
    display:block;
    overflow:hidden;
    position:relative;
}

.tap-column-track{
    height:100%;
    display:flex;
    gap:clamp(14px,1.6vw,28px);
    will-change:transform;
}

.tap-grid.layout-columns.is-column-scrolling .tap-column-track{
    animation:columnAutoScroll var(--column-scroll-duration,28000ms) ease-in-out infinite alternate;
}

@keyframes columnAutoScroll{
    from{
        transform:translateX(0);
    }

    to{
        transform:translateX(calc(var(--column-scroll-distance,0px) * -1));
    }
}

.tap-column-item{
    flex:0 0 clamp(280px,30vw,440px);
    height:100%;
    min-width:0;
    min-height:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    padding:clamp(16px,1.7vw,32px);
    border:1px solid var(--border);
    border-radius:18px;
    background:var(--card-gradient);
    box-shadow:0 14px 36px var(--shadow);
}

.tap-column-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:0;
}

.tap-column-top .tap-list-number{
    color:var(--primary);
    font-size:clamp(.82rem,.95vw,1.08rem);
    letter-spacing:.12em;
}

.tap-column-item h2{
    margin:0;
    font-size:clamp(1.7rem,2.7vw,3.6rem);
    line-height:.98;
    -webkit-line-clamp:3;
}

.tap-column-style{
    margin:clamp(12px,1.2vw,18px) 0 0;
    color:var(--tap-color,var(--primary));
    font-size:clamp(1.05rem,1.35vw,1.42rem);
    line-height:1.15;
    font-weight:750;
    text-transform:uppercase;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.tap-column-color-bar{
    width:100%;
    height:clamp(5px,.65vw,9px);
    margin:clamp(10px,1vw,16px) 0 clamp(14px,1.35vw,22px);
    border-radius:999px;
    background:var(--tap-color,var(--primary));
    box-shadow:0 0 18px rgba(5,163,255,.22);
}

.tap-column-item .tap-meta{
    margin:clamp(12px,1.2vw,18px) 0 clamp(12px,1.2vw,18px);
    font-size:clamp(.82rem,1vw,1.08rem);
    padding:7px 10px;
    gap:6px;
}

.tap-column-item .price-list-column{
    margin-top:0;
    justify-content:center;
    flex-wrap:wrap;
    align-self:center;
    flex:0 0 auto;
}

.tap-grid.layout-columns .tap-column-item .tap-meta{
    margin:clamp(12px,1.2vw,18px) 0 clamp(12px,1.2vw,18px);
}

.tap-grid.layout-columns .tap-column-item .tap-description{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:6;
}

.tap-grid.layout-columns .tap-column-item .price-list-column{
    margin-top:0;
    justify-content:center;
    align-self:center;
}

.tap-column-item .tap-list-sensors{
    gap:6px;
    flex-wrap:nowrap;
}

.tap-column-item .sensor-badge{
    font-size:clamp(.72rem,.86vw,.95rem);
    padding:5px 8px;
}

/* 7–9 taps */
.tap-grid.layout-nine{
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
}

.tap-grid.layout-nine .tap-card{
    padding:clamp(8px,1vw,16px);
    border-radius:18px;
}

.tap-grid.layout-nine .tap-card h2{
    font-size:clamp(1.25rem,2.3vw,2.7rem);
}

.tap-grid.layout-nine .tap-description{
    -webkit-line-clamp:2;
}

/* 10–12 taps */
.tap-grid.layout-twelve{
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
}

.tap-grid.layout-twelve .tap-card{
    padding:clamp(8px,.9vw,14px);
    border-radius:16px;
}

.tap-grid.layout-twelve .tap-card h2{
    font-size:clamp(1.05rem,1.8vw,2.1rem);
}

.tap-grid.layout-twelve .tap-description{
    display:none;
}

.tap-grid.layout-twelve .tap-meta{
    font-size:.78rem;
    padding:5px 8px;
}

.tap-grid.layout-twelve .sensor-badge{
    font-size:.72rem;
    padding:5px 7px;
}

/* 13–16 taps */
.tap-grid.layout-sixteen{
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-rows:repeat(4,minmax(0,1fr));
}

.tap-grid.layout-sixteen .tap-card{
    padding:clamp(7px,.8vw,12px);
    border-radius:14px;
}

.tap-grid.layout-sixteen .tap-color-bar{
    height:4px;
    margin:7px 0 9px;
}

.tap-grid.layout-sixteen .tap-card h2{
    font-size:clamp(.95rem,1.45vw,1.65rem);
    margin-bottom:5px;
}

.tap-grid.layout-sixteen .brewery,
.tap-grid.layout-sixteen .style,
.tap-grid.layout-sixteen .tap-description,
.tap-grid.layout-sixteen .qr-note{
    display:none;
}

.tap-grid.layout-sixteen .tap-meta{
    font-size:.68rem;
    padding:4px 7px;
    margin-bottom:0;
}

.tap-grid.layout-sixteen .tap-number{
    font-size:.68rem;
}

.tap-grid.layout-sixteen .sensor-badge{
    font-size:.65rem;
    padding:4px 6px;
}
/* ======================================================
   MOBILE
   ====================================================== */

@media (max-width:900px){

    html,
    body{
        overflow:auto;
    }

    .display-wrapper{

        height:auto;
        min-height:100vh;

        display:block;

        padding:12px;
    }

    .display-header{

        display:block;

        padding-bottom:12px;
        margin-bottom:12px;
    }

    .display-logo-slot{

        margin-top:10px;
        width:100%;
        justify-content:flex-start;
        min-height:0;
    }

    .display-logo-slot img{
        max-height:70px;
    }

    .tap-grid{

        display:grid;

        grid-template-columns:1fr;

        gap:12px;

        height:auto;
    }

    .tap-card{

        width:100%;
        min-width:0;

        padding:14px;

        border-radius:18px;
    }

    .tap-header{

        gap:10px;

        align-items:center;
    }

.tap-right{
    align-items:center;
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:flex-end;
    max-width:72%;
}

.tap-right .sensor-badge{
    order:1;
}

.tap-right .price-list-header{
    order:2;
    flex-basis:100%;
    max-width:100%;
    justify-content:flex-end;
    margin-top:4px;
}

.tap-right .price-list-header .price-chip{
    font-size:.82rem;
    padding:5px 9px;
}

    .tap-card h2{

        font-size:1.55rem;
    }

    .tap-description{

        -webkit-line-clamp:4;
    }

    .sensor-badge{

        font-size:.82rem;

        padding:5px 9px;
    }

    .display-footer{

        display:block;

        margin-top:16px;
        text-align:center;
    }

    .display-footer span{

        display:block;
        margin-top:4px;
    }

    .page-progress{
        display:none;
    }
}

/* ======================================================
   LARGE TV
   ====================================================== */

@media (min-width:1800px){

    .tap-card{

        border-radius:26px;
    }

    .tap-card h2{

        font-size:clamp(2rem,3vw,4.8rem);
    }

    .brewery{

        font-size:1.3rem;
    }

    .style{

        font-size:1.15rem;
    }

    .tap-description{

        font-size:1.05rem;
    }

    .sensor-badge{

        font-size:1rem;
        padding:8px 12px;
    }
}

/* ======================================================
   LAPTOP / LOW HEIGHT DESKTOP
   Keep 4 cards visible, but reduce text depth.
   ====================================================== */

@media (min-width:901px) and (max-height:850px){

    .tap-grid.layout-standard .tap-card,
    .tap-grid.layout-paged .tap-card{
        padding:clamp(10px,1.15vw,18px);
        border-radius:18px;
    }

    .tap-grid.layout-standard .tap-card h2,
    .tap-grid.layout-paged .tap-card h2{
        font-size:clamp(1.2rem,2.15vw,2.55rem);
        line-height:1;
        -webkit-line-clamp:1;
        margin-bottom:8px;
    }

    .tap-grid.layout-standard .tap-description,
    .tap-grid.layout-paged .tap-description{
        -webkit-line-clamp:2;
        font-size:clamp(.78rem,.95vw,.98rem);
        line-height:1.25;
    }

    .tap-grid.layout-standard .tap-meta,
    .tap-grid.layout-paged .tap-meta{
        font-size:clamp(.72rem,.9vw,.92rem);
        padding:5px 8px;
        margin-bottom:8px;
    }

    .tap-grid.layout-standard .brewery,
    .tap-grid.layout-paged .brewery{
        font-size:clamp(.78rem,.95vw,1rem);
        padding-top:6px;
    }
}

/* ======================================================
   ANIMATION
   ====================================================== */

.tap-card{

    animation:fadeIn .35s ease;
}

@keyframes fadeIn{

    from{

        opacity:0;
        transform:translateY(10px);
    }

    to{

        opacity:1;
        transform:none;
    }
}
/* ======================================================
   MOBILE FIX - always 1 card per row
   ====================================================== */

@media (max-width: 900px) {
    .tap-grid,
    .tap-grid.layout-hero,
    .tap-grid.layout-standard,
    .tap-grid.layout-six,
    .tap-grid.layout-nine,
    .tap-grid.layout-twelve,
    .tap-grid.layout-sixteen {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    .tap-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ======================================================
   PAGE FADE FOR TV AUTO PAGES
   ====================================================== */

.tap-grid.page-fade {
    animation: pageFade .8s ease;
}

@keyframes pageFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* ======================================================
   MOBILE SCROLL FIX
   ====================================================== */

@media (max-width: 900px) {
    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    body {
        position: static !important;
    }

    .display-wrapper {
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .tap-grid,
    .tap-grid.layout-hero,
    .tap-grid.layout-standard,
    .tap-grid.layout-six,
    .tap-grid.layout-nine,
    .tap-grid.layout-twelve,
    .tap-grid.layout-sixteen {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    .tap-card {
        min-height: auto !important;
        height: auto !important;
    }
}
/* ======================================================
   MOBILE FLICKER FIX
   ====================================================== */

@media (max-width: 900px) {
    .tap-card,
    .tap-grid,
    .tap-grid.page-fade {
        animation: none !important;
        transform: none !important;
    }

    .tap-card {
        box-shadow: 0 4px 14px rgba(0,0,0,.28) !important;
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
    }

    .tap-color-bar {
        box-shadow: none !important;
    }
}
/* ======================================================
   PRICE LIST
   ====================================================== */

.price-list{

    display:flex;

    flex-wrap:wrap;

    align-items:center;

    gap:8px;

    margin:12px 0;
}

.price-list-header{
    margin:0;
    flex:0 1 auto;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    max-width:clamp(130px, 24vw, 340px);
    overflow:hidden;
}

.price-list-header .price-chip{
    background:rgba(5, 163, 255, .12);
    border:1px solid rgba(5, 163, 255, .28);
    border-radius:999px;
    padding:6px 10px;
    display:flex;
    align-items:center;
    gap:4px;
    font-size:.85rem;
    line-height:1;
    overflow:hidden;
    text-overflow:ellipsis;
}

.tap-meta-item{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-width:0;
}

.tap-meta-icon{
    width:1.55em;
    min-width:1.55em;
    height:1.55em;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:rgba(5, 163, 255, .22);
    color:var(--primary);
    font-size:.72em;
    font-weight:850;
    line-height:1;
}

.tap-meta-icon-ibu{
    width:auto;
    min-width:2.25em;
    padding:0 .35em;
}

.price-list-header .price-separator{
    display:none;
}

.tap-grid.layout-paged .price-list-header{
    margin:0;
    gap:8px;
}

.tap-grid.layout-paged .price-list-header .price-chip{
    font-size:clamp(.78rem,.95vw,1rem);
    padding:6px 10px;
}

.price-chip{

    color:var(--soft);

    font-size:clamp(.88rem,1.05vw,1.05rem);

    font-weight:600;

    white-space:nowrap;
}

.price-chip strong{

    color:var(--primary);

    margin-left:4px;

    font-weight:800;
}

.price-separator{

    color:var(--muted);

    opacity:.6;
}

/* 10-12 taps */

.tap-grid.layout-twelve .price-chip{

    font-size:.76rem;
}

/* 13-16 taps */

.tap-grid.layout-sixteen .price-list{

    display:none;
}

/* Mobile */

@media (max-width:900px){

    .price-list{

        gap:6px;

        margin:10px 0;
    }

    .price-chip{

        font-size:.95rem;
    }
}

@media (max-width:900px){

    .tap-description,
    .tap-grid.layout-nine .tap-description,
    .tap-grid.layout-twelve .tap-description,
    .tap-grid.layout-sixteen .tap-description,
    .tap-grid.layout-paged .tap-description{
        display:block !important;
        overflow:visible !important;
        -webkit-line-clamp:unset !important;
        -webkit-box-orient:initial !important;
    }
}

@media (min-width:901px){
    .tap-grid.layout-columns .tap-column-item{
        min-height:0;
    }

    .tap-grid.layout-columns .tap-column-item .tap-meta{
        margin-top:clamp(12px,1.2vw,18px) !important;
    }

    .tap-grid.layout-columns .tap-column-item .tap-description{
        display:-webkit-box !important;
        overflow:hidden !important;
        -webkit-box-orient:vertical !important;
        -webkit-line-clamp:6 !important;
        flex:0 1 auto;
    }

    .tap-grid.layout-columns .tap-column-item .brewery{
        margin-top:auto !important;
        text-align:center;
        flex:0 0 auto;
    }

    .tap-grid.layout-columns .tap-column-item .price-list-column{
        margin-top:0 !important;
        align-self:center;
        justify-content:center !important;
        flex:0 0 auto;
    }
}
