.hh-body {
  min-height: 100vh;
  color: var(--ink);
  accent-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, 0) 240px),
    var(--bg);
}

.hh-body ::selection {
  color: #fff7df;
  background: rgba(243, 178, 13, .42);
}

.hh-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 36px);
  background: rgba(90, 82, 55, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .15);
}

.hh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
}

.hh-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, .9);
}

.hh-topbar__logout {
  margin: 0 0 0 auto;
}

.hh-topbar__logout button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  color: #241608;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(36, 22, 8, .16);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.hh-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hh-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
}

.hh-nav a:focus-visible,
.hh-brand:focus-visible,
.hh-topbar__logout button:focus-visible,
.hh-button:focus-visible,
.hh-login button:focus-visible,
.hh-quick-actions button:focus-visible,
.hh-details summary:focus-visible {
  outline: 2px solid rgba(243, 178, 13, .58);
  outline-offset: 3px;
}

.hh-page {
  padding: clamp(28px, 5vw, 56px) 0;
}

.hh-page__header {
  max-width: var(--maxw);
  margin: 0 auto 26px;
}

.hh-page__header h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 650;
}

.hh-page__header h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 10px;
  background: var(--accent);
  border-radius: 3px;
}

.hh-page__header p {
  padding: 0;
  line-height: 1.7;
}

.hh-hints {
  display: grid;
  gap: 10px;
  max-width: var(--maxw);
  margin: 22px auto 30px;
  padding: 0;
  list-style: none;
}

.hh-hints li {
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.hh-steps {
  display: grid;
  gap: 10px;
  max-width: var(--maxw);
  margin: 22px auto 30px;
  padding: 0;
  list-style: none;
  counter-reset: honeyhex-step;
}

.hh-steps li {
  counter-increment: honeyhex-step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.hh-steps li::before {
  content: counter(honeyhex-step);
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #2b1a0c;
  background: var(--accent);
  font-weight: 850;
}

.hh-payment-note {
  display: grid;
  gap: 6px;
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(243, 178, 13, .16);
}

.hh-payment-note strong {
  color: #fff;
}

.hh-payment-note p {
  margin: 0;
  padding: 0;
  line-height: 1.55;
  opacity: .86;
}

.hh-device-status {
  display: grid;
  gap: 6px;
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 14px 16px;
  border: 1px solid rgba(246, 239, 224, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.hh-device-status strong {
  color: #fff;
}

.hh-device-status p {
  margin: 0;
  padding: 0;
  line-height: 1.55;
  opacity: .86;
}

.hh-device-status--online {
  border-color: rgba(217, 242, 201, .38);
  background: rgba(99, 140, 74, .22);
}

.hh-device-status--offline {
  border-color: rgba(255, 180, 168, .34);
  background: rgba(139, 47, 37, .20);
}

.hh-alert {
  max-width: var(--maxw);
  margin: 0 auto 18px;
  padding: 14px 16px;
  border-radius: 8px;
  color: #241608;
  background: #f7d87b;
}

.hh-alert--error {
  color: #fff;
  background: #8b2f25;
}

.hh-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.hh-admin-toolbar form {
  margin: 0;
}

.hh-hexgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--maxw);
}

.hh-hexgrid--admin {
  align-items: start;
}

.hh-cell {
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hh-cell::before,
.hh-cell::after {
  display: none;
}

.hh-cell--empty,
.hh-cell--disabled {
  color: rgba(246, 239, 224, .68);
  background: rgba(255, 255, 255, .045);
}

.hh-cell--reserved {
  background: rgba(243, 178, 13, .13);
}

.hh-cell__inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  text-align: left;
}

.hh-cell__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hh-cell__number {
  font-weight: 750;
}

.hh-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 750;
  background: rgba(255, 255, 255, .12);
}

.hh-status--available {
  color: #1d1208;
  background: #d9f2c9;
}

.hh-status--reserved {
  color: #2b1a0c;
  background: #ffe0a1;
}

.hh-status--empty,
.hh-status--disabled,
.hh-status--offline {
  color: #fff;
  background: #70644d;
}

.hh-cell__product {
  margin: 8px 0 0;
  padding: 0;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.25;
  text-shadow: none;
}

.hh-cell__price {
  margin: 0;
  padding: 0;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}

.hh-cell__meta,
.hh-command {
  margin: 0;
  padding: 0;
  font-size: .9rem;
}

.hh-command {
  font-weight: 700;
}

.hh-command--done {
  color: #d9f2c9;
}

.hh-command--expired,
.hh-command--error {
  color: #ffb4a8;
}

.hh-public-actions {
  display: block;
  margin-top: auto;
}

.hh-details {
  flex: 0 0 auto;
  text-align: left;
}

.hh-details summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  color: #2b1a0c;
  background: var(--accent);
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.hh-details summary::-webkit-details-marker {
  display: none;
}

.hh-details__body {
  display: none;
}

.hh-details[open] {
  flex-basis: 100%;
}

.hh-details[open] .hh-details__body {
  display: block;
}

.hh-details p {
  margin: 10px 0 0;
  padding: 0;
  line-height: 1.45;
}

.hh-paypal-button {
  display: inline-flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(243, 178, 13, .34);
  border-radius: 8px;
  color: rgba(255, 247, 223, .82);
  background: rgba(243, 178, 13, .18);
  font: inherit;
  font-weight: 750;
}

.hh-paypal-button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.hh-paypal-slot {
  min-height: 40px;
}

.hh-paypal-slot iframe {
  border-radius: 8px;
}

.hh-paypal-message {
  min-height: 20px;
  margin: 8px 0 0;
  padding: 0;
  color: rgba(255, 247, 223, .82);
  font-size: .86rem;
  line-height: 1.4;
}

.hh-paypal-message--error {
  color: #ffb4a8;
  font-weight: 750;
}

.hh-form,
.hh-edit-form {
  margin: 0;
}

.hh-button,
.hh-login button,
.hh-quick-actions button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  color: #271706;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.hh-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.hh-button--override {
  color: #fff;
  background: #8b2f25;
}

.hh-button--secondary,
.hh-login button {
  color: #fff7df;
  background: rgba(243, 178, 13, .36);
  box-shadow: none;
}

.hh-edit-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  text-align: left;
}

.hh-edit-form label,
.hh-login label {
  display: grid;
  gap: 4px;
  font-size: .84rem;
  font-weight: 750;
}

.hh-edit-form input,
.hh-edit-form select,
.hh-login input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(246, 239, 224, .18);
  border-radius: 8px;
  color: var(--ink);
  caret-color: var(--accent);
  accent-color: var(--accent);
  background: rgba(255, 255, 255, .09);
  font: inherit;
}

.hh-edit-form select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 48px;
  color-scheme: light;
  cursor: pointer;
  font-weight: 700;
  background-color: rgba(255, 255, 255, .09);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 247, 223, .86) 50%),
    linear-gradient(135deg, rgba(255, 247, 223, .86) 50%, transparent 50%),
    linear-gradient(to bottom, rgba(246, 239, 224, .22), rgba(246, 239, 224, .22));
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%,
    calc(100% - 42px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px, 1px 22px;
}

.hh-edit-form select:hover,
.hh-edit-form select:focus {
  border-color: rgba(243, 178, 13, .44);
  background-color: rgba(255, 255, 255, .12);
}

.hh-edit-form select::-ms-expand {
  display: none;
}

.hh-edit-form input:focus,
.hh-edit-form select:focus,
.hh-login input:focus {
  outline: 2px solid rgba(243, 178, 13, .42);
  outline-offset: 2px;
}

.hh-edit-form select option {
  color: #271706;
  background: #f6efe0;
}

.hh-edit-form select option:checked,
.hh-edit-form select option:focus,
.hh-edit-form select option:hover {
  color: #271706;
  background: #f3b20d;
}

.hh-quick-actions {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.hh-quick-actions button {
  min-height: 40px;
  padding: 9px 10px;
  font-size: .82rem;
  color: #fff;
  background: rgba(39, 23, 6, .72);
}

.hh-login {
  display: grid;
  gap: 14px;
  max-width: 440px;
  padding: 20px;
  border-radius: 8px;
  color: #271706;
  background: rgba(255, 246, 220, .92);
}

.hh-login p {
  padding: 0;
  color: #271706;
}

.hh-log {
  max-width: 1040px;
  margin-top: 32px;
}

.hh-log h2 {
  color: var(--ink);
}

.hh-log__status {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.hh-log__status p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.hh-log__status span {
  opacity: .72;
}

.hh-log__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hh-log__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.hh-log__list small {
  display: block;
  margin-top: 2px;
  opacity: .72;
}

.hh-site-footer {
  margin-top: 48px;
}

@media (max-width: 900px) {
  .hh-hexgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hh-topbar {
    align-items: center;
    flex-direction: row;
  }

  .hh-brand {
    min-width: 0;
  }

  .hh-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hh-nav {
    width: 100%;
  }

  .hh-nav a {
    flex: 1;
    justify-content: center;
  }

  .hh-hexgrid {
    grid-template-columns: 1fr;
  }

  .hh-cell__inner {
    padding: 18px;
  }

  .hh-admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hh-admin-toolbar .hh-button {
    width: auto;
  }
}
