:root {
  color-scheme: light;
  --ink: #173f3a;
  --ink-soft: #46615d;
  --paper: #fffdf8;
  --page: #f3f6f2;
  --line: #c9d8d2;
  --mint: #dff2e9;
  --mint-strong: #1f6a5a;
  --coral: #d95d4f;
  --coral-soft: #f9e4df;
  --gold: #d99a27;
  --gold-soft: #fff1c9;
  --blue: #3f7cac;
  --blue-soft: #e2edf6;
  --danger: #a33f38;
  --shadow: 0 8px 24px rgba(23, 63, 58, 0.08);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  line-height: 1.65;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  letter-spacing: 0;
}

button {
  touch-action: manipulation;
}

a {
  color: var(--mint-strong);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hanpu-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 16px;
}

.hanpu-breadcrumb {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.hanpu-breadcrumb:hover {
  text-decoration: underline;
}

.hanpu-kicker {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hanpu-header .hanpu-kicker {
  margin-top: 14px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.28em;
  margin: 0;
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
}

.hanpu-lead {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.hanpu-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hanpu-tool {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hanpu-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #eef4f0;
}

.hanpu-tabs button {
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.hanpu-tabs button:last-child {
  border-right: 0;
}

.hanpu-tabs button span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
}

.hanpu-tabs button[aria-selected="true"] {
  background: var(--paper);
  color: var(--coral);
  box-shadow: inset 0 -4px 0 var(--coral);
}

.hanpu-tabs button:focus-visible,
.button:focus-visible,
.hanpu-sale-button:focus-visible,
input:focus-visible,
select:focus-visible,
.hanpu-color-option input:focus-visible + .hanpu-swatch {
  outline: 3px solid #1f73b7;
  outline-offset: 2px;
}

.hanpu-status {
  display: flex;
  height: 54px;
  align-items: center;
  overflow-y: auto;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.hanpu-status[data-tone="success"] {
  background: var(--mint);
  color: #174f43;
}

.hanpu-status[data-tone="warning"] {
  background: var(--gold-soft);
  color: #72500f;
}

.hanpu-status[data-tone="error"] {
  background: var(--coral-soft);
  color: #7b2d28;
}

.hanpu-view {
  min-width: 0;
  padding: 24px;
}

.hanpu-view-heading,
.hanpu-add-heading,
.hanpu-item-list-heading,
.hanpu-summary-row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hanpu-count-badge,
.hanpu-event-label {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.hanpu-event-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hanpu-event-fields label,
.field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #9db2aa;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

input:disabled,
select:disabled {
  background: #edf0ed;
  color: #72817d;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #9db2aa;
  border-radius: 4px;
  background: #fff;
}

.input-suffix input {
  border: 0;
}

.input-suffix b {
  padding: 0 10px;
  font-size: 14px;
}

.button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--mint-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--mint-strong);
  padding: 9px 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  filter: brightness(0.97);
}

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

.button-primary {
  background: var(--mint-strong);
  color: #fff;
}

.button-secondary {
  background: #fff;
}

.button-warning {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: #704d0d;
}

.button-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.button-large {
  min-height: 50px;
}

.button-undo {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: #7b2d28;
}

.button-stock {
  width: 100%;
  border-color: var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.hanpu-add-form {
  margin-top: 20px;
  padding: 18px;
  border-left: 5px solid var(--coral);
  background: #f8faf7;
}

.hanpu-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr);
  gap: 12px;
  margin: 16px 0;
}

.field strong {
  color: var(--coral);
  font-size: 11px;
}

.hanpu-color-field {
  min-width: 0;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.hanpu-color-field legend {
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.hanpu-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hanpu-color-option {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  cursor: pointer;
}

.hanpu-color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hanpu-color-option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.hanpu-swatch {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 3px;
  background: var(--swatch);
}

.hanpu-color-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.hanpu-item-list-heading {
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.hanpu-item-list-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.hanpu-settings-list {
  display: grid;
}

.hanpu-settings-row {
  display: grid;
  grid-template-columns: 72px minmax(170px, 2fr) minmax(100px, 0.8fr) minmax(110px, 0.9fr) minmax(110px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px 0 14px 10px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--item-color);
}

.hanpu-row-order {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.icon-button {
  width: 34px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.icon-button:disabled {
  opacity: 0.35;
}

.hanpu-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(66px, 1fr));
  gap: 6px;
}

.hanpu-empty {
  margin: 18px 0 0;
  padding: 24px 16px;
  border: 1px dashed #9db2aa;
  color: var(--ink-soft);
  text-align: center;
}

.hanpu-empty-action {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.hanpu-empty-action[hidden] {
  display: none;
}

.hanpu-empty-action p {
  margin: 0;
}

.hanpu-counter-heading {
  align-items: center;
}

.hanpu-counter-heading .hanpu-event-label {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hanpu-lock-status {
  display: flex;
  height: 58px;
  margin: 0 0 16px;
  padding: 9px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  background: #f2f7f4;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.hanpu-lock-status[data-mode="readonly"] {
  border-left-color: var(--gold);
  background: #fff8e8;
}

.hanpu-lock-status[data-mode="unprotected"] {
  border-left-color: var(--coral);
  background: #fff2ee;
}

.hanpu-lock-status button[hidden] {
  display: none;
}

.button-lock-takeover {
  min-width: 208px;
  min-height: 38px;
  padding: 7px 12px;
  border-color: #9b6c13;
  background: #fff;
  color: #76500b;
  white-space: nowrap;
}

.hanpu-live-totals,
.hanpu-summary-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.hanpu-live-totals > div,
.hanpu-summary-totals > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  background: #fff;
  padding: 13px 15px;
}

.hanpu-live-totals span,
.hanpu-summary-totals span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.hanpu-live-totals strong,
.hanpu-summary-totals strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hanpu-live-totals small {
  font-size: 12px;
  font-weight: 800;
}

.hanpu-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hanpu-counter-card {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--item-color);
  background: #fff;
  padding: 8px;
}

.hanpu-counter-card[data-sold-out="true"] {
  background: #f2f2ef;
}

.hanpu-sale-button {
  display: grid;
  min-width: 0;
  min-height: 218px;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  background: color-mix(in srgb, var(--item-color) 10%, white);
  color: var(--ink);
  padding: 15px;
  text-align: left;
  cursor: pointer;
}

.hanpu-sale-button:not(:disabled):active {
  transform: translateY(1px);
}

.hanpu-sale-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.hanpu-sale-name {
  min-width: 0;
  font-size: 21px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hanpu-sale-price {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}

.hanpu-sale-metrics {
  display: grid;
  align-content: center;
  gap: 3px;
  font-size: 15px;
  font-weight: 700;
}

.hanpu-sale-call {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--item-color);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.hanpu-counter-card[data-sold-out="true"] .hanpu-sale-call {
  background: #69716e;
}

.hanpu-summary-totals > div {
  grid-template-columns: 1fr auto;
}

.hanpu-summary-list {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.hanpu-summary-row {
  min-width: 0;
  padding: 16px 0 18px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid var(--item-color);
}

.hanpu-summary-row-heading {
  align-items: center;
}

.hanpu-summary-row-heading h3 {
  min-width: 0;
}

.hanpu-price-label,
.hanpu-soldout-label {
  flex: 0 0 auto;
  padding: 3px 8px;
  background: #eef4f0;
  font-size: 12px;
  font-weight: 800;
}

.hanpu-soldout-label {
  background: var(--coral-soft);
  color: #7b2d28;
}

.hanpu-item-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.hanpu-item-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  background: #f5f7f4;
}

.hanpu-item-stat span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.hanpu-item-stat strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.hanpu-stock-bar {
  display: flex;
  width: 100%;
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #edf0ed;
}

.hanpu-stock-sold {
  background: var(--item-color);
}

.hanpu-stock-remaining {
  background: #e8ece9;
}

.hanpu-stock-bar[data-unbounded="true"] .hanpu-stock-sold {
  background: color-mix(in srgb, var(--item-color) 72%, white);
}

.hanpu-stock-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.hanpu-stock-legend .sold::before,
.hanpu-stock-legend .remaining::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  background: var(--item-color);
  content: "";
}

.hanpu-stock-legend .remaining::before {
  border: 1px solid var(--line);
  background: #e8ece9;
}

.hanpu-save-section {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2fr);
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.hanpu-save-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hanpu-save-note {
  grid-column: 2;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.hanpu-ad-reserve {
  display: grid;
  min-height: 108px;
  place-items: center;
  margin: 18px 0;
  border-block: 1px solid var(--line);
  color: #7d8985;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.hanpu-guide {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 2fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hanpu-guide ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  list-style: none;
}

.hanpu-guide li {
  display: grid;
  align-content: start;
  gap: 4px;
  background: var(--paper);
  padding: 14px;
}

.hanpu-guide li strong {
  color: var(--coral);
}

.hanpu-guide li span,
.hanpu-guide > p {
  color: var(--ink-soft);
  font-size: 14px;
}

.hanpu-guide > p {
  grid-column: 2;
  margin: 0;
}

.hanpu-comments-placeholder {
  margin-top: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.hanpu-comments-placeholder h2 {
  font-size: 20px;
}

.hanpu-comments-placeholder p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.hanpu-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
}

.hanpu-related a {
  min-height: 40px;
  font-weight: 700;
}

.hanpu-footer {
  display: flex;
  width: min(1180px, calc(100% - 32px));
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.hanpu-dialog {
  width: min(460px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 16px 60px rgba(23, 63, 58, 0.3);
}

.hanpu-dialog::backdrop {
  background: rgba(18, 42, 38, 0.58);
}

.hanpu-dialog form {
  padding: 22px;
}

.hanpu-dialog-item {
  margin: 10px 0 0;
  font-size: 19px;
  font-weight: 900;
}

.hanpu-dialog-current {
  margin: 2px 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
}

.hanpu-dialog-help {
  margin: 10px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.hanpu-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 1024px) {
  .hanpu-settings-row {
    grid-template-columns: 72px minmax(160px, 1.5fr) repeat(3, minmax(100px, 1fr));
  }

  .hanpu-row-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(2, minmax(0, 140px));
    justify-content: end;
  }

  .hanpu-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hanpu-header,
  .hanpu-shell,
  .hanpu-footer {
    width: min(100% - 24px, 1180px);
  }

  .hanpu-header {
    padding-top: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .hanpu-lead {
    font-size: 14px;
  }

  .hanpu-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .hanpu-tabs button {
    min-height: 54px;
    gap: 4px;
    padding: 5px;
    font-size: 13px;
  }

  .hanpu-tabs button span {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .hanpu-status {
    height: 68px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .hanpu-lock-status {
    height: 88px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
  }

  .button-lock-takeover {
    width: min(100%, 260px);
    min-height: 36px;
  }

  .hanpu-view {
    padding: 18px 14px;
  }

  .hanpu-event-fields,
  .hanpu-form-grid,
  .hanpu-save-section,
  .hanpu-guide {
    grid-template-columns: 1fr;
  }

  .hanpu-event-fields .button {
    width: 100%;
  }

  .hanpu-add-heading,
  .hanpu-item-list-heading,
  .hanpu-counter-heading {
    align-items: stretch;
  }

  .hanpu-add-heading {
    flex-direction: column;
  }

  .hanpu-settings-row {
    grid-template-columns: 64px minmax(0, 1fr) minmax(92px, 0.7fr);
    align-items: end;
  }

  .item-name-field {
    grid-column: 2 / -1;
  }

  .hanpu-settings-row > .field:nth-of-type(2),
  .hanpu-settings-row > .field:nth-of-type(3),
  .hanpu-settings-row > .field:nth-of-type(4) {
    grid-column: auto;
  }

  .hanpu-row-order {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .hanpu-row-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hanpu-live-totals,
  .hanpu-summary-totals {
    grid-template-columns: 1fr;
  }

  .hanpu-live-totals > div,
  .hanpu-summary-totals > div {
    min-height: 58px;
  }

  .hanpu-counter-heading {
    flex-direction: column;
  }

  .hanpu-counter-heading .button {
    width: 100%;
  }

  .hanpu-item-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hanpu-save-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hanpu-save-note,
  .hanpu-guide > p {
    grid-column: 1;
  }

  .hanpu-guide ol {
    grid-template-columns: 1fr;
  }

  .hanpu-footer {
    min-height: 90px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
  }
}

@media (min-width: 321px) and (max-width: 480px) {
  .hanpu-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hanpu-counter-grid-long {
    grid-template-columns: 1fr;
  }

  .hanpu-sale-button {
    min-height: 210px;
    padding: 11px;
  }

  .hanpu-sale-name {
    font-size: 17px;
  }

  .hanpu-sale-metrics {
    font-size: 13px;
  }

  .hanpu-sale-call {
    min-height: 48px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hanpu-tabs button {
    min-height: 58px;
    flex-direction: column;
    gap: 1px;
    padding: 4px 2px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hanpu-view-heading {
    align-items: center;
  }

  .hanpu-color-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hanpu-settings-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .hanpu-settings-row > .field {
    grid-column: 2;
  }

  .hanpu-row-order {
    grid-column: 1;
    grid-row: 1 / span 5;
    grid-template-columns: 1fr;
  }

  .hanpu-row-actions {
    grid-column: 2;
  }

  .hanpu-item-stats {
    gap: 5px;
  }

  .hanpu-stock-legend {
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 320px) {
  .hanpu-header,
  .hanpu-shell,
  .hanpu-footer {
    width: calc(100% - 16px);
  }

  h1 {
    font-size: 27px;
  }

  .hanpu-tabs button {
    min-height: 58px;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
  }

  .hanpu-view {
    padding-inline: 10px;
  }

  .hanpu-counter-grid,
  .hanpu-counter-grid-long {
    grid-template-columns: 1fr;
  }

  .hanpu-sale-button {
    min-height: 200px;
  }

  .hanpu-save-actions,
  .hanpu-dialog-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
