:root { font-family: system-ui, sans-serif; color: #20372b; background: #f6f8f4; }
body { margin: 0; }
main { max-width: 42rem; margin: 12vh auto; padding: 1.5rem; }
h1 { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 1rem; }
p { font-size: 1.125rem; line-height: 1.6; }
header { margin-bottom: 2rem; }
nav { margin-top: .75rem; }
a { color: #245d43; }
form, section { margin-block: 1rem; }
label { display: block; margin-block: 1rem; }
input:not([type=hidden]):not([type=checkbox]) { display: block; box-sizing: border-box; width: 100%; padding: .8rem; margin-top: .35rem; font: inherit; border: 1px solid #93a79b; border-radius: .3rem; }
button { padding: .8rem 1rem; margin: .25rem .25rem .25rem 0; background: #245d43; color: white; border: 0; border-radius: .3rem; font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #b86913; outline-offset: 3px; }
section { padding: 1rem; border: 1px solid #c4d0c5; border-radius: .4rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th,td { padding: .6rem; text-align: left; border-bottom: 1px solid #c4d0c5; }
select,textarea { display:block; box-sizing:border-box; width:100%; padding:.7rem; font:inherit; }
fieldset { margin:1rem 0; border:1px solid #93a79b; min-width:0; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; }
small { overflow-wrap:anywhere; }

.phone-main { margin: 0 auto; padding: 1rem 1rem 7rem; max-width: 46rem; }
.phone-main h1 { font-size: 2rem; }
.phone-main h2 { font-size: 1.35rem; }
.phone-main p { font-size: 1rem; line-height: 1.45; }
.phone-main header { margin-bottom: 1.5rem; }
.phone-nav { position: fixed; inset: auto 0 0; margin: 0; display: flex; background: #fff;
  border-top: 1px solid #93a79b; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.phone-nav a { flex: 1; text-align: center; padding: 1.2rem .25rem; text-decoration: none; }
.phone-nav a[aria-current=page] { background: #245d43; color: #fff; font-weight: 700; }
.offer, .purchase-item { padding: 1rem 0; border-bottom: 1px solid #c4d0c5; overflow-wrap: anywhere; }
.offer-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.offer-head strong { min-width: 0; }
.chain { text-align: right; flex: 0 0 auto; max-width: 35%; }
.offer .price { font-weight: 750; margin: .5rem 0 .2rem; }
.condition { background: #fff0cf; padding: .4rem; border-left: 4px solid #b86913; }
.choice-list { padding: 0; list-style: none; }
.choice-list a { display: block; padding: 1rem; margin: .4rem 0; border: 1px solid #93a79b; border-radius: .4rem; }
.choices { display: flex; flex-wrap: wrap; }
summary { cursor: pointer; padding: .75rem 0; }
.checked { background: #e9f1e8; padding-inline: .6rem; }
.list-line { padding: .75rem 0; border-bottom: 1px solid #c4d0c5; }
.list-line:last-child { border: 0; }
.primary-link { display: inline-block; padding: .85rem 1rem; color: #fff; background: #245d43; border-radius: .3rem; }

/* Tilbud: compact controls and wrapping choices in both orientations. */
.phone-main .offers-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.offers-header h1 { margin: 0; }
.account-menu { position: relative; flex: 0 0 auto; }
.account-menu summary { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #93a79b; border-radius: .4rem; list-style: none; background: #fff; }
.account-menu summary::-webkit-details-marker { display: none; }
.menu-icon { display: grid; gap: 5px; width: 23px; }
.menu-icon span { height: 2px; background: #245d43; }
.account-menu nav { position: absolute; right: 0; top: 100%; z-index: 20; width: max-content; max-width: calc(100vw - 3rem); margin-top: .4rem; padding: .4rem; border: 1px solid #93a79b; border-radius: .4rem; background: #fff; box-shadow: 0 5px 18px #20372b25; }
.account-menu nav a { display: block; padding: .8rem; text-decoration: none; }
.account-menu nav a:hover { background: #e9f1e8; }
.offers-controls { display: flex; align-items: end; gap: .4rem; }
.offers-controls button { flex: 0 1 auto; padding: .7rem .6rem; margin: 0; min-height: 44px; font-size: .9rem; }
.offers-controls button[aria-pressed=true] { box-shadow: inset 0 0 0 2px #20372b; background: #193e2d; }
.offers-controls label { flex: 1 1 8rem; min-width: 0; margin: 0; font-size: .8rem; }
.offers-controls select { min-height: 44px; padding: .6rem .2rem; font-size: .9rem; }
.offer-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.offer-choices li { max-width: 100%; }
.offer-choices a { box-sizing: border-box; margin: 0; padding: .75rem 1rem; min-height: 44px; background: #fff; text-decoration: none; overflow-wrap: anywhere; }
.offer-choices a:hover { background: #e9f1e8; }
.account-menu summary:focus-visible, .offers-controls select:focus-visible { outline: 3px solid #b86913; outline-offset: 3px; }
@media (max-width: 360px) {
  .offers-controls { gap: .25rem; }
  .offers-controls button { padding-inline: .35rem; font-size: .8rem; }
  .offers-controls select { font-size: .8rem; }
}

.home-button { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: .65rem .85rem; border: 1px solid #93a79b; border-radius: .4rem; background: #fff; text-decoration: none; }
.chain-settings { border-top: 1px solid #c4d0c5; }
.chain-setting { display: flex; align-items: center; gap: 1rem; margin: 0; padding: .65rem 0; border-bottom: 1px solid #c4d0c5; }
.chain-setting label { flex: 1 1 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.chain-setting select { flex: 0 0 8.5rem; width: 8.5rem; min-height: 44px; }
.chain-setting select:focus-visible { outline: 3px solid #b86913; outline-offset: 2px; }
.settings-saving:empty { display: none; }

.offers-title { display: flex; align-items: baseline; flex-wrap: nowrap; gap: .65rem; min-width: 0; }
.offers-title a { text-decoration: none; }
.offers-title span { font-size: .65em; overflow-wrap: anywhere; min-width: 0; }
.offer-search { display: flex; align-items: stretch; gap: 0; }
.offer-search input[type=search] { flex: 1; min-width: 0; width: auto; margin: 0; border-radius: .3rem 0 0 .3rem; }
.offer-search button { margin: 0; border-radius: 0 .3rem .3rem 0; display: grid; place-items: center; }
.offer-search svg { fill: none; stroke: currentColor; stroke-width: 2; }
.phone-main .offer-count, .phone-main .offer-instruction { font-size: .8rem; }
.offers-table-wrap { width: 100%; }
.offers-table { table-layout: fixed; font-size: .85rem; }
.offers-table col:first-child { width: 32%; }
.offers-table col:not(:first-child) { width: 17%; }
.offers-table th, .offers-table td { padding: .6rem .35rem; vertical-align: top; overflow-wrap: anywhere; }
.offers-table small { display: block; margin-top: .35rem; font-size: .85em; }
.offers-table details p { font-size: inherit; }
.offers-table summary { padding: .45rem 0; }
.offer-category th { background: #e9f1e8; }
.offer-row[data-addable] { cursor: pointer; touch-action: manipulation; }
.offer-row[data-addable]:hover { background: #edf3eb; }
.offer-row[data-addable]:focus-visible { outline: 3px solid #b86913; outline-offset: -3px; }
.offer-condition { background: #fff0cf; padding: .25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 420px) {
  .offers-table { font-size: .75rem; }
  .offers-table th, .offers-table td { padding: .5rem .2rem; }
}

.offers-heading { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.offers-back { flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.offers-back svg { fill: none; stroke: currentColor; stroke-width: 2; }
.offer-row.offer-added, .offer-row.offer-added:hover { background: #fff2a6; }
.offer-transferred { font-weight: 600; }

.list-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; font-size: .85rem; }
.list-table col:nth-child(1) { width: 32%; }
.list-table col:nth-child(2) { width: 12%; }
.list-table col:nth-child(3) { width: 14%; }
.list-table col:nth-child(4) { width: 24%; }
.list-table col:nth-child(5) { width: 18%; }
.list-editor-row > td { padding-top: 0; }
.list-editor-row summary { font-size: .85em; padding: .3rem 0; }
.list-editor-row details[open] { padding: .5rem; background: #fff; border: 1px solid #c4d0c5; border-radius: .3rem; }
.list-panel { margin-top: .6rem; border: 1px solid #c4d0c5; border-radius: .3rem; padding: 0 .75rem; }
.phone-main .list-price-note { font-size: .75rem; }
