* {
    box-sizing: border-box;
}
:root {
    --paper: #f9f6ed;
    --ink: #30271f;
    --wine: #692e30;
    --gold: #b78943;
    --line: #dacfbb;
    --muted: #66594c;
    --serif: "Noto Serif TC","Songti TC","PMingLiU",serif;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 "Microsoft JhengHei",system-ui,sans-serif;
}
.wrap {
    width: min(1200px,92vw);
    margin: auto;
}
header {
    background: #fffdf6;
    border-bottom: 1px solid var(--line);
}
.bar,.identity,nav,.row,.section-head {
    display: flex;
    align-items: center;
}
.bar {
    justify-content: space-between;
    min-height: 80px;
}
.identity {
    color: var(--ink);
    gap: 11px;
    text-decoration: none;
    font: 700 22px/1.2 var(--serif);
    letter-spacing: .14em;
}
.identity small {
    display: block;
    margin-top: 4px;
    font: 11px/1.3 sans-serif;
    letter-spacing: .2em;
}
.seal {
    background: var(--wine);
    color: #fff4d2;
    display: grid;
    place-items: center;
    border-radius: 5px;
    width: 40px;
    height: 42px;
    outline: 1px solid #c7a26a;
    outline-offset: -4px;
    font: 600 26px var(--serif);
}
button,select {
    font: inherit;
}
button {
    cursor: pointer;
}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible {
    outline: 3px solid #19816c;
    outline-offset: 3px;
}
nav {
    gap: 6px;
}
nav button,.filter {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    padding: .55rem .9rem;
    border-radius: 100px;
}
nav button[aria-pressed=true],.filter[aria-pressed=true] {
    color: var(--wine);
    background: #eee4d5;
    font-weight: 700;
}
.hero {
    margin: 25px 0 32px;
    isolation: isolate;
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: #462821 url("./hero.webp") center 53%/cover no-repeat;
    color: #fff8e8;
}
.hero:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg,rgba(41,18,14,.94),rgba(58,23,18,.83) 33%,rgba(53,22,18,.12) 80%);
}
.hero>div {
    padding: 30px clamp(22px,4vw,60px);
}
.hero-label {
    color: #f5d79f;
    font-size: 13px;
    letter-spacing: .18em;
}
.hero h1 {
    font: 600 clamp(36px,4.2vw,64px)/1.14 var(--serif);
    letter-spacing: .08em;
    margin: .2em 0;
}
.hero p {
    margin: .6em 0;
}
.workspace {
    display: grid;
    grid-template-columns: minmax(0,1.65fr) minmax(280px,.85fr);
    gap: 30px;
    align-items: start;
}
.section-head,.row {
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
h2,h3,h4,p {
    margin: 0;
}
h2,h3 {
    font-family: var(--serif);
}
h2 {
    font-size: 29px;
}
h3 {
    font-size: 21px;
}
small,.muted {
    color: var(--muted);
}
select {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--ink);
    background: #fffdf6;
    border: 1px solid var(--line);
}
.filters {
    display: flex;
    gap: 3px;
    margin: 14px 0;
}
.filter {
    border-color: var(--line);
    font-size: 14px;
}
.lamps {
    display: grid;
    gap: 9px;
}
.lamp,.household,.ticket,.record,.panel {
    border: 1px solid var(--line);
    background: #fffdf7;
    border-radius: 10px;
}
.lamp {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 15px;
    padding: 16px;
    text-align: left;
    align-items: center;
    color: var(--ink);
}
.lamp[aria-pressed=true] {
    border-color: var(--wine);
    background: #f6ece3;
    box-shadow: inset 3px 0 var(--wine);
}
.lamp-mark {
    width: 48px;
    height: 55px;
    display: grid;
    place-items: center;
    color: #8b6638;
    background: #eee3ce;
    border-radius: 46% 46% 16px 16px;
    border: 1px solid #c8aa78;
    font: 24px var(--serif);
}
.lamp-title,.lamp b {
    display: block;
}
.lamp .lamp-title {
    font: 700 21px var(--serif);
}
.lamp .meta {
    display: block;
    font-size: 12px;
    letter-spacing: .09em;
    color: var(--muted);
}
.lamp .description {
    font-size: 14px;
}
.lamp .price {
    color: var(--wine);
    white-space: nowrap;
    text-align: right;
}
.price small {
    display: block;
    font-size: 12px;
}
.panel {
    padding: 20px;
    margin-top: 24px;
}
.households,.people,.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.household,.person {
    padding: 8px 13px;
    color: var(--ink);
    background: #fffdf7;
}
.household[aria-pressed=true],.person:has(input:checked) {
    background: #f4e7db;
    border-color: var(--wine);
}
.person {
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.person input {
    accent-color: var(--wine);
}
.ticket {
    position: sticky;
    top: 18px;
    overflow: hidden;
    box-shadow: 0 8px 20px #442a1610;
}
.ticket-head {
    padding: 18px 22px;
    background: #4b2929;
    color: #fff6e3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ticket-head small {
    color: #ecd5b6;
}
.ticket-body {
    padding: 20px;
}
.ticket dl {
    margin: 0;
}
.ticket dl div {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.ticket dt {
    color: var(--muted);
}
.ticket dd {
    text-align: right;
    margin: 0;
}
.total {
    padding: 16px 0;
    border-top: 1px dashed #b7a68e;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.total b {
    font-size: 25px;
    color: var(--wine);
}
.primary,.secondary {
    border: 1px solid var(--wine);
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 700;
}
.primary {
    background: var(--wine);
    color: #fffaf0;
}
.primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.wide {
    width: 100%;
}
.secondary {
    color: var(--wine);
    background: #fffaf0;
}
.record {
    padding: 15px 18px;
    margin: 10px 0;
}
.record b {
    color: var(--wine);
}
.tag {
    border-radius: 4px;
    padding: 3px 8px;
    background: #e8e9d9;
    color: #455437;
    font-size: 13px;
}
.statusline {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}
.stats div {
    padding: 12px 18px;
    background: #eee6d7;
    border-radius: 8px;
}
.stats strong {
    font: 700 25px var(--serif);
    margin-right: 6px;
}
#notice:not(:empty) {
    padding: 12px 18px;
    border-left: 4px solid var(--wine);
    background: #f0e4d6;
    margin-bottom: 15px;
}
footer {
    padding: 27px 0;
    border-top: 1px solid var(--line);
    margin-top: 38px!important;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
@media(max-width:820px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .ticket {
        position: static;
    }
    .hero {
        min-height: 215px;
    }
    .workspace {
        gap: 15px;
    }
    .bar {
        min-height: 65px;
    }
}
@media(max-width:500px) {
    .wrap {
        width: 92vw;
    }
    .bar {
        gap: 8px;
    }
    .identity {
        font-size: 18px;
        gap: 6px;
    }
    nav {
        gap: 0;
    }
    nav button {
        font-size: 14px;
        padding: .55rem .6rem;
    }
    .hero {
        margin: 16px 0 22px;
    }
    .hero>div {
        padding: 20px;
    }
    .lamp {
        grid-template-columns: 38px 1fr auto;
        gap: 8px;
        padding: 12px 9px;
    }
    .lamp-mark {
        width: 34px;
        height: 41px;
        font-size: 20px;
    }
    .lamp .description {
        font-size: 13px;
    }
    .lamp .price {
        font-size: 14px;
    }
    .section-head h2 {
        font-size: 24px;
    }
    .panel,.ticket-body {
        padding: 15px;
    }
}

footer .inquiry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 6px 0;
}
