
:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --paper: #fff;
  --ink: #172821;
  --muted: #53655d;
  --line: #dce5dd;
  --green: #125d43;
  --soft: #e7f2e9;
  font: 100%/1.55 "Geist", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); }
h1, h2, p { margin: 0 0 .75rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
a { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #29805f;
  outline-offset: 3px;
}
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .shell { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.header-inner, nav, .brand { display: flex; align-items: center; gap: .7rem; }
.header-inner { min-height: 4.25rem; justify-content: space-between; flex-wrap: wrap; }
.brand { color: var(--ink); font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 9px; }
nav a, .back { font-size: .9rem; }
nav a, .back, .link-button { text-underline-offset: .2em; }
.shell { padding-block: clamp(2rem, 5vw, 4.5rem); }
.heading { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 2rem; justify-content: space-between; margin-bottom: 1.5rem; }
.heading p { margin-bottom: 0; }
.back { display: inline-block; margin-bottom: 1.1rem; }
.muted, small { color: var(--muted); }
.card, .offer-row {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 1.1rem;
  padding: clamp(1.05rem, 3.5vw, 1.8rem);
}
.card { min-width: 0; }
.empty { background: #edf5ed; }
.empty p { max-width: 39ch; margin-bottom: 0; }
.login-card { max-width: 30rem; margin-inline: auto; }
.login-card h1 { margin-bottom: 1.5rem; }
.button, .link-button { font: inherit; font-weight: 650; cursor: pointer; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border: 1px solid transparent; border-radius: .7rem; padding: .6rem 1rem; text-decoration: none;
  text-align: center;
}
.primary { color: #fff; background: var(--green); }
.primary:hover { background: #0b4b35; }
.secondary { color: var(--green); background: var(--soft); border-color: var(--line); }
.secondary:hover { background: #d8eddd; }
.link-button { border: 0; background: transparent; color: var(--green); text-decoration: underline; padding: .45rem .15rem; }
.upload { border: 1px dashed #8cae98; border-radius: .9rem; background: var(--soft); padding: 1rem; margin-bottom: 1rem; }
.upload p { margin: .65rem 0 0; }
.upload input { padding: .6rem; }
.upload input::file-selector-button {
  border: 0; border-radius: .45rem; color: var(--green); background: var(--soft);
  padding: .45rem .6rem; margin-right: .55rem; font: inherit; cursor: pointer;
}
input:not([type=hidden]), textarea, select {
  display: block; width: 100%; min-height: 44px; border: 1px solid #a9bdb0;
  background: #fcfdfa; color: var(--ink); border-radius: .6rem; padding: .65rem .75rem; font: inherit;
}
textarea { resize: vertical; }
label { display: block; font-weight: 650; margin-bottom: .3rem; }
.helptext { display: block; color: var(--muted); font-size: .87rem; margin-bottom: .3rem; }
.offers, .sources { padding: 0; margin: 0; list-style: none; }
.offers, .stack, .detail-layout { display: grid; gap: .85rem; }
.offer-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem; text-decoration: none; }
.offer-row:hover { border-color: #83a793; }
.offer-row small { display: block; }
.state { color: var(--muted); font-size: .88rem; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.gallery a, .photo-thumbnail {
  display: grid; place-items: center; aspect-ratio: 1; overflow: hidden;
  border: 1px solid var(--line); border-radius: .55rem; background: var(--bg);
}
.gallery img { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: cover; }
.photo-thumbnail { padding: .4rem; text-align: center; overflow-wrap: anywhere; font-size: .8rem; }
.photo-previews:not(:empty) { margin-top: .8rem; }
.photo-add { margin: .85rem 0 0; }
.photo-previews > div { min-width: 0; }
.photo-remove { display: block; width: 100%; min-height: 44px; font-size: .85rem; }
.photo-error { color: #972b25; }
.photo-preview { max-width: 94vw; padding: .75rem; border: 1px solid var(--line); border-radius: .85rem; }
.photo-preview::backdrop { background: rgb(0 0 0 / 65%); }
.photo-preview form { display: flex; justify-content: flex-end; margin-bottom: .55rem; }
.photo-preview img { display: block; max-width: 100%; max-height: 74dvh; margin-inline: auto; object-fit: contain; }
.sources { margin-bottom: .8rem; }
.sources li { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: .6rem; overflow-wrap: anywhere; }
.sources strong { white-space: nowrap; }
.market-price { font-size: 1.35rem; font-weight: 750; }
.market-price span { color: var(--muted); font-weight: 400; font-size: .9rem; }
.notice { border: 1px solid #b1ccba; border-radius: .65rem; background: var(--soft); padding: .8rem; margin-bottom: 1.25rem; }
.notice.error, .errorlist { color: #972b25; }
.notice.error { background: #fff0ed; border-color: #e8bcb5; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.danger { background: #972b25; color: white; }
#publikacja form { margin-top: 1rem; }
#publikacja .actions + p { margin-top: .75rem; }
#publikacja p a + a { margin-left: .7rem; }
input.allegro-checkbox { display: inline; width: auto; min-height: auto; }
#allegro-background-status { white-space: pre-line; }
.busy { margin: .75rem 0 0; color: var(--muted); }
@media (min-width: 46rem) {
  .detail-layout { grid-template-columns: 2fr 3fr; align-items: start; gap: 1.25rem; }
}
