.ly-la-records-page {
  --ly-records-cta-teal: #2eb5a8;
  --ly-records-cta-teal-shadow: rgba(46, 181, 168, 0.38);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ly-records-top {
  background: #fff;
  padding: 24px 0;
}

.ly-records-bottom {
  background: #f9f9f9;
  padding: 24px 0;
}

.ly-records-title {
  margin-bottom: 10px;
}

.ly-records-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 12px;
}

.ly-records-actions-side {
  display: flex;
  align-items: center;
}

.ly-records-actions-side--left {
  justify-content: flex-start;
}

.ly-records-actions-side--right {
  justify-content: flex-end;
}

.ly-records-page-title {
  margin: 0;
  text-align: center;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0.4px;
  color: #222;
}

.ly-records-actions-title {
  margin: 0;
  text-align: center;
  font-size: 32px;
  line-height: 1.15;
}

.ly-records-actions-spacer {
  display: inline-block;
  width: 88px;
  height: 1px;
}

.ly-records-back-link {
  display: inline-block;
  margin: 0;
  color: #2f7dbf;
  text-decoration: none;
  font-weight: 600;
}

a.ly-records-action-btn,
button.ly-records-action-btn {
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid #34a853;
  background: #fff;
  color: #1b5e20;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease;
}

a.ly-records-action-btn {
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
}

a.ly-records-action-btn:hover,
a.ly-records-action-btn:focus,
button.ly-records-action-btn:hover,
button.ly-records-action-btn:focus {
  background: #e8f5e9;
  color: #0d3d12;
}

button.ly-records-action-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ly-records-actions-title {
  font-size: clamp(26px, 6vw, 32px);
}

.ly-la-records-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.ly-records-empty {
  margin-bottom: 8px;
}

.ly-record-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ly-record-list__item {
  margin: 0;
  padding: 0;
}

.ly-record-item-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  text-decoration: none !important;
  color: #222;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a.ly-record-item-btn:hover,
a.ly-record-item-btn:focus {
  text-decoration: none !important;
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

a.ly-record-item-btn:visited,
a.ly-record-item-btn:active {
  text-decoration: none !important;
  color: #222;
}

.ly-record-item-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.ly-record-item-date {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #333;
}

.ly-record-item-summary {
  font-size: 14px;
  line-height: 1.35;
  color: #888;
}

.ly-record-chevron {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4c4c4;
}

.ly-record-chevron svg {
  display: block;
}

.ly-records-bottom-cta {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: 20px;
  margin-left: -12px;
  margin-right: -12px;
  padding: 12px 12px max(14px, env(safe-area-inset-bottom, 0px));
  background: transparent;
  border-top: none;
  box-shadow: none;
}

.ly-records-bottom-pot-wrap {
  margin-top: 34px;
  display: flex;
  justify-content: center;
}

.ly-records-bottom-pot {
  width: clamp(108px, 18vw, 168px);
  height: auto;
  display: block;
}

.ly-records-start-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 14px 20px;
  border: none;
  border-radius: 26px;
  background: var(--ly-records-cta-teal, #2eb5a8);
  color: #fff !important;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 2px 14px var(--ly-records-cta-teal-shadow, rgba(46, 181, 168, 0.38));
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.ly-records-start-btn:hover,
.ly-records-start-btn:focus {
  color: #fff !important;
  text-decoration: none !important;
  filter: brightness(0.96);
  outline: none;
}

.ly-records-start-btn:focus-visible {
  outline: 2px solid var(--ly-records-cta-teal, #2eb5a8);
  outline-offset: 3px;
}

.ly-records-start-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ly-records-start-icon svg {
  display: block;
}

.ly-pager {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ly-pager-btn,
.ly-pager-page {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e2e2;
  text-decoration: none;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.ly-pager-page.is-current {
  background: #27c8d1;
  border-color: #27c8d1;
  color: #fff;
}

@media (max-width: 768px) {
  .ly-records-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "left right";
    align-items: center;
    column-gap: 8px;
    row-gap: 10px;
  }

  .ly-records-actions-title,
  .ly-prescription-heading-block {
    grid-area: title;
  }

  .ly-records-actions-side--left {
    grid-area: left;
    justify-content: flex-start;
    min-width: 0;
  }

  .ly-records-actions-side--right {
    grid-area: right;
    justify-content: flex-end;
    min-width: 0;
  }

  .ly-records-actions-title {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0;
  }

  .ly-records-back-link,
  a.ly-records-action-btn,
  button.ly-records-action-btn {
    white-space: nowrap;
    font-size: 14px;
  }

  a.ly-records-action-btn,
  button.ly-records-action-btn {
    padding: 7px 12px;
  }

  .ly-records-actions-spacer {
    width: 0;
    height: 0;
  }
}

@media (max-width: 480px) {
  .ly-records-back-link,
  a.ly-records-action-btn,
  button.ly-records-action-btn {
    font-size: 13px;
  }

  a.ly-records-action-btn,
  button.ly-records-action-btn {
    padding: 6px 10px;
  }
}

@media (max-width: 360px) {
  .ly-records-back-link {
    font-size: 0;
  }

  .ly-records-back-link::before {
    content: "← 返回";
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
  }
}
