:root {
  --black: #000;
  --text: #333;
  --muted: #999;
  --line: #ccc;
  --divider: #f1f1f1;
  --page: #fff;
  --card: #fff;
  --green: #1f8f5f;
  --green-light: #e8f8ef;
  --yellow-light: #fff7df;
  --yellow-dark: #7a5a00;
  --red: #c7352f;
  --red-light: #fff1ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--divider);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.428;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  gap: 24px;
  background: var(--divider);
}

.centered-phone-page {
  padding: 0;
}

.brief,
.side-panel,
.statusbar {
  display: none;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--page);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  background: var(--page);
  border-bottom: 1px solid #eee;
}

.topbar-title {
  max-width: 280px;
  margin: 0 auto;
  overflow: hidden;
  color: var(--black);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--black);
  font-size: 24px;
  line-height: 48px;
}

.content {
  padding-bottom: 70px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 20px 16px;
  background: var(--page);
  border-bottom: 16px solid var(--divider);
}

.step {
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.step::before {
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 6px;
  background: #ddd;
}

.step.active {
  color: var(--black);
  font-weight: 700;
}

.step.active::before {
  background: var(--black);
}

.section {
  padding: 24px 20px;
  background: var(--card);
  border-bottom: 16px solid var(--divider);
}

.section:last-child {
  border-bottom: 0;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title.single {
  display: block;
}

.section-title h2 {
  margin: 0;
  color: var(--black);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-title small,
.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  text-align: right;
}

.product-list {
  display: grid;
  gap: 16px;
}

.product-summary-section {
  padding-top: 20px;
  padding-bottom: 20px;
}

.refund-product-card {
  align-items: start;
}

.product-amount-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.refund-check-list {
  display: grid;
}

.refund-check-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  padding: 16px 0;
}

.refund-check-item:first-child {
  padding-top: 0;
}

.refund-check-item:last-child {
  padding-bottom: 0;
}

.refund-check-item.with-border::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: calc(100% - 28px);
  height: 1px;
  background: var(--divider);
}

.check-dot {
  width: 18px;
  height: 18px;
  margin-top: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.check-dot.checked {
  border: 5px solid var(--black);
}

.disabled-item {
  opacity: 0.55;
}

.product {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
}

.product-art {
  width: 60px;
  height: 80px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background: #f6f6f6;
  object-fit: cover;
  overflow: hidden;
}

img.product-art {
  display: block;
}

.placeholder-art {
  display: block;
}

.product-copy h3 {
  margin: 0 0 4px;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.product-copy strong {
  display: block;
  margin: 0 0 4px;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.product-copy p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
}

.product-copy span {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
}

.product-copy .reason-result {
  color: var(--muted);
}

.product-copy .limit-reason {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--red-light);
  color: var(--black);
  font-size: 12px;
  line-height: 16px;
}

.inline-refund-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.reason-form {
  margin-top: 0;
}

.inline-field-title {
  margin: 0 !important;
  color: var(--black) !important;
  font-size: 13px !important;
  line-height: 18px !important;
  font-weight: 700;
}

.inline-reason-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.inline-textarea {
  min-height: 64px;
  font-size: 12px;
  line-height: 17px;
}

.refund-items-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.refund-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.refund-thumb {
  width: 44px;
  height: 58px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  object-fit: cover;
  background: #f6f6f6;
}

.refund-summary-copy {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.refund-summary-copy strong {
  display: block;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
}

.refund-summary-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.tag-row,
.action-row,
.slot-grid,
.reason-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.pill,
.slot,
.reason {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
}

.tag {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 4px;
}

.tag.good {
  border-color: transparent;
  background: var(--green-light);
  color: var(--green);
}

.tag.warn {
  border-color: transparent;
  background: var(--yellow-light);
  color: var(--yellow-dark);
}

.pill.active,
.slot.active,
.reason.active {
  border: 2px solid var(--black);
  color: var(--black);
  font-weight: 700;
}

.textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.upload-box {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #fafafa;
  color: var(--muted);
  font-size: 18px;
}

.address,
.plain-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

.address strong,
.plain-card strong {
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
}

.address span,
.plain-card span {
  color: var(--text);
  font-size: 12px;
  line-height: 17px;
}

.notice {
  display: grid;
  gap: 4px;
  margin: 0 20px 16px;
  padding: 12px;
  border-radius: 6px;
  background: var(--yellow-light);
  color: var(--black);
  font-size: 12px;
  line-height: 16px;
}

.section > .notice {
  margin: 0;
}

.compact-section {
  padding-top: 20px;
  padding-bottom: 20px;
}

.notice.in-section {
  margin: 0;
}

.notice strong {
  font-size: 12px;
  line-height: 16px;
}

.notice.success {
  background: var(--green-light);
  color: var(--green);
}

.notice.danger {
  background: var(--red-light);
  color: var(--red);
}

.method-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.method-card + .method-card {
  margin-top: 16px;
}

.method-card.active {
  border: 2px solid var(--black);
}

.method-head {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: start;
}

.radio-dot {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.method-card.active .radio-dot {
  border: 5px solid var(--black);
}

.method-title {
  color: var(--black);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.method-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.price {
  color: var(--green);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.price-text {
  color: var(--green) !important;
}

.coupon-row {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
}

.coupon-left,
.coupon-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.coupon-right {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
}

.coupon-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.service-index {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.service-detail-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  color: var(--black);
  text-align: left;
}

.service-detail-row strong,
.service-detail-row small {
  display: block;
}

.service-detail-row strong {
  font-size: 14px;
  line-height: 20px;
}

.service-detail-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.pickup-inline-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

.pickup-inline-head {
  display: grid;
  gap: 4px;
}

.pickup-inline-head strong {
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
}

.pickup-inline-head small,
.pickup-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.inline-slot-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.pickup-address {
  background: #fff;
}

.pickup-note {
  margin: 0;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--black);
  font-size: 14px;
}

.summary-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-row span:first-child {
  color: var(--text);
}

.summary-row strong {
  color: var(--black);
  text-align: right;
}

.primary,
.secondary,
.ghost,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 38px;
  font-size: 12px;
  line-height: 17px;
  font-weight: 700;
}

.primary {
  border: 2px solid var(--black);
  background: var(--black);
  color: #fff;
}

.secondary,
.ghost {
  border: 2px solid var(--black);
  background: #fff;
  color: var(--black);
}

.danger-btn {
  border: 2px solid var(--red);
  background: #fff;
  color: var(--red);
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 430px;
  padding: 8px 20px;
  transform: translateX(-50%);
  background: #fff;
  border-top: 2px solid var(--black);
}

.bottom-bar.single-action {
  grid-template-columns: 1fr;
}

.phone-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.bottom-sheet,
.confirm-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
}

.bottom-sheet {
  display: grid;
  gap: 16px;
  max-height: 82vh;
  overflow: auto;
  padding: 20px;
  border-radius: 12px 12px 0 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-header h2,
.confirm-dialog h2 {
  margin: 0;
  color: var(--black);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.sheet-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--black);
  font-size: 24px;
  line-height: 32px;
}

.sheet-options {
  display: grid;
}

.sheet-submit {
  width: 100%;
}

.confirm-dialog {
  width: calc(100% - 40px);
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 8px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.dialog-thumbs {
  gap: 8px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.success-hero {
  padding: 8px 0 4px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border: 2px solid var(--black);
  border-radius: 50%;
  color: var(--black);
  font-size: 24px;
  font-weight: 700;
}

.success-hero h2 {
  margin: 0 0 8px;
  color: var(--black);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.success-hero p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  left: 9px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 5px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.timeline-item.done .timeline-dot,
.timeline-item.active .timeline-dot {
  border-color: var(--black);
}

.timeline-copy h3 {
  margin: 0 0 4px;
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.timeline-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.segmented button.active {
  border: 2px solid var(--black);
  color: var(--black);
  font-weight: 700;
}

.side-state {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.state-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
}

.state-tab.active {
  border: 2px solid var(--black);
  color: var(--black);
  font-weight: 700;
}

.mock-sheet {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.mock-sheet-title {
  color: var(--black);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.small-upload {
  grid-template-columns: repeat(3, 1fr);
}

.hidden {
  display: none !important;
}

@media (max-width: 430px) {
  .phone,
  .bottom-bar {
    max-width: none;
  }
}

@media (min-width: 1100px) {
  .brief {
    display: block;
  }

  .page {
    align-items: flex-start;
    padding: 0 32px;
  }

  .centered-phone-page {
    padding: 0;
  }

  .brief {
    position: sticky;
    top: 32px;
    width: 280px;
    max-height: calc(100vh - 64px);
    overflow: auto;
    margin-top: 32px;
    color: var(--black);
  }

  .brief h1 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 34px;
  }

  .brief h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 28px;
  }

  .brief p {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 20px;
  }

  .panel-kicker {
    margin-bottom: 8px !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    line-height: 15px !important;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .brief-list,
  .state-card {
    display: grid;
    gap: 10px;
  }

  .brief-list {
    gap: 12px;
  }

  .brief-item,
  .state-card {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 18px;
  }

  .brief-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
  }

  .brief-index {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--black);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  .state-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--black);
    font-size: 14px;
    line-height: 20px;
  }

  .state-card span {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 18px;
  }
}
