* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8f6f1;
  color: #242424;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 42px;
}

.hero {
  padding: 8px 2px 18px;
}

.kicker {
  margin: 0;
  color: #8a5a35;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 8px 0 0;
  color: #1f2933;
  font-size: 34px;
  line-height: 1.12;
}

.subtitle {
  max-width: 560px;
  margin: 10px 0 0;
  color: #6b625b;
  font-size: 15px;
  line-height: 1.6;
}

.search-panel {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 0 12px;
  background: #f8f6f1;
}

.search-box {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e4ded4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(58, 48, 38, 0.07);
}

.search-box > span {
  color: #8a5a35;
  font-size: 24px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #222;
  background: transparent;
  font-size: 15px;
}

.clear-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b8178;
  font-size: 24px;
  line-height: 1;
}

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

.tab {
  min-height: 48px;
  border: 1px solid #e6dfd3;
  border-radius: 8px;
  background: #fff;
  color: #4c4742;
}

.tab.active {
  border-color: #2f6f68;
  background: #eaf4f1;
  color: #174b46;
}

.tab span,
.tab small {
  display: block;
}

.tab span {
  font-size: 14px;
  font-weight: 800;
}

.tab small {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.72;
}

.summary {
  margin: 0;
  padding: 18px 2px 10px;
  color: #786f66;
  font-size: 13px;
}

.phrase-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phrase-card {
  border: 1px solid #e7dfd2;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(48, 39, 28, 0.06);
}

.phrase-head {
  width: 100%;
  padding: 16px 16px 6px;
  border: 0;
  background: transparent;
  text-align: left;
}

.meta {
  display: flex;
  gap: 5px;
  color: #756b62;
  font-size: 12px;
}

.meta b {
  color: #2f6f68;
}

.phrase-head > strong {
  display: block;
  margin-top: 8px;
  color: #202020;
  font-size: 18px;
  line-height: 1.3;
}

.main-text {
  display: block;
  margin-top: 10px;
  color: #34302c;
  font-size: 17px;
  line-height: 1.58;
}

.actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
}

.copy-button,
.expand-button {
  min-height: 38px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.copy-button {
  flex: 1;
  border: 0;
  background: #2f6f68;
  color: #fff;
}

.expand-button {
  width: 76px;
  border: 1px solid #e0d6cb;
  background: #fff;
  color: #5e554c;
}

.details {
  padding: 0 16px 16px;
  border-top: 1px solid #f0ebe4;
  background: #fffdf9;
}

.detail-block {
  padding-top: 16px;
}

.detail-block h2 {
  margin: 0;
  color: #1f2933;
  font-size: 14px;
}

.detail-block p {
  margin: 8px 0 0;
  color: #554e47;
  font-size: 14px;
  line-height: 1.55;
}

.variant {
  position: relative;
  margin-top: 10px;
  padding: 12px 76px 12px 12px;
  border-radius: 8px;
  background: #f5f2ec;
}

.variant b {
  color: #8a5a35;
  font-size: 12px;
}

.variant button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #2f6f68;
  font-size: 12px;
  font-weight: 800;
}

.empty {
  margin-top: 28px;
  padding: 34px 18px;
  border: 1px dashed #ddd3c8;
  border-radius: 8px;
  color: #786f66;
  text-align: center;
}

.empty strong,
.empty span {
  display: block;
}

.empty strong {
  color: #2c2c2c;
  font-size: 17px;
}

.empty span {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(31, 41, 51, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (min-width: 720px) {
  .page {
    padding-top: 36px;
  }

  h1 {
    font-size: 42px;
  }
}
