:root {
  --bg: #f5f2eb;
  --ink: #1f1a16;
  --muted: #6b5f56;
  --accent: #d46a4a;
  --accent-deep: #9b3f2c;
  --card: #fff8ef;
  --line: #e2d6c8;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff3e6 0%, #f5f2eb 55%);
  color: var(--ink);
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  min-height: 100vh;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 18px 40px;
  display: grid;
  gap: 10px;
}

.header {
  display: grid;
  gap: 8px;
}

.back {
  display: inline-block;
  color: #fffaf3;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px 6px 30px;
  border-radius: 999px;
  background: linear-gradient(120deg, #d46a4a, #9b3f2c);
  box-shadow: 0 8px 16px rgba(212, 106, 74, 0.22);
  position: relative;
  width: fit-content;
}

.back::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fffaf3;
  border-bottom: 2px solid #fffaf3;
  transform: translateY(-50%) rotate(45deg);
}

.header h1 {
  margin: 0;
  font-size: 22px;
}

.poster {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.poster-box {
  height: 150px;
  display: grid;
  place-items: center;
  background: #ececec;
  font-size: 18px;
  color: #7a6f66;
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.calendar-value {
  font-size: 12px;
  color: var(--muted);
}

.laydate-theme-lunar .layui-laydate-main {
  width: auto;
}

.laydate-theme-lunar .date-cell-inner {
  padding: 6px;
  width: 44px;
  height: 40px;
  border-radius: 4px !important;
}

.laydate-theme-lunar .layui-this {
  border-radius: 4px !important;
}

.laydate-theme-lunar .date-cell-inner b {
  display: block;
  font-weight: 400;
  height: 16px;
  font-size: 14px;
}

.laydate-theme-lunar .date-cell-inner i {
  display: block;
  font-style: normal;
  font-size: 10px;
}

.laydate-theme-lunar .badge {
  position: absolute;
  right: 0px;
  top: 0px;
  background-color: #4e5877;
  color: #fff;
  font-size: 12px;
  line-height: 14px;
  padding: 1px 2px;
  border-radius: 4px;
  text-decoration: none;
  transform: scale(0.7);
}

.laydate-theme-lunar .holiday .badge {
  background-color: #eb3333 !important;
}

.laydate-theme-lunar .hightlight i {
  color: #1e9fff;
}

.laydate-theme-lunar .layui-this .hightlight i {
  color: #fff;
}

.laydate-theme-lunar .laydate-month-list > li {
  height: 50px !important;
  line-height: 50px !important;
  width: 24.2% !important;
  margin: 18px 1px !important;
}

.laydate-theme-lunar .laydate-year-list > li {
  height: 40px !important;
  line-height: normal !important;
  width: 31.3% !important;
  margin: 8px 2px !important;
}

.laydate-theme-lunar .preview-inner > * {
  display: inline-block;
  margin-right: 5px;
  position: relative;
  font-size: 12px;
}

.laydate-theme-lunar .preview-inner > .badge {
  margin-right: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(75, 54, 40, 0.08);
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(226, 214, 200, 0.9);
  background: #fff;
  font-size: 14px;
  font-family: inherit;
}

.type-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.type-toggle.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.type-option {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 214, 200, 0.9);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 180ms ease;
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option span {
  display: inline-block;
  width: 100%;
  text-align: center;
}

.type-option.is-active {
  border-color: rgba(212, 106, 74, 0.6);
  color: var(--accent);
  background: rgba(212, 106, 74, 0.08);
}

.type-option.is-active span {
  font-weight: 600;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.submit {
  border: 0;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  background: linear-gradient(120deg, #d46a4a, #9b3f2c);
  color: #fffaf3;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(212, 106, 74, 0.2);
}

.record-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 20px rgba(31, 26, 22, 0.06);
  display: grid;
  gap: 12px;
}

.feature-title {
  text-align: center;
  color: var(--accent-deep);
  font-weight: 600;
}

.feature-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.feature-item {
  background: #fff8ef;
  border: 1px solid rgba(226, 214, 200, 0.8);
  border-radius: 999px;
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink);
}

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