/**
 * 静态备用样式：由 <link href="/critical-layout.css"> 直接提供，不依赖 /_next/static。
 * 当 dev 环境出现 EMFILE、多实例 dev、或 layout.css 404 时，仍能保持基本排版与配色。
 * 与 Tailwind 并存时有少量重复规则，可接受。
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f0e8;
  color: #222222;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

/* 与 globals 一致：画布底伪元素分层（主容器无 opacity） */
.tabula-rasa-backdrop {
  isolation: isolate;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none !important;
}

.tabula-rasa-backdrop--monet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/images/monet-impression-sunrise.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.18);
  transform-origin: center center;
  opacity: 0.3;
  pointer-events: none;
}

.tabula-rasa-backdrop--monet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    hsl(210 30% 95%) 0%,
    hsl(30 60% 98%) 100%
  );
  opacity: 0.35;
  pointer-events: none;
}

#site-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  pointer-events: none !important;
}

#site-shell > div,
#site-shell main,
#site-shell main * {
  pointer-events: none !important;
}

#site-shell a,
#site-shell button,
#site-shell input,
#site-shell textarea,
#site-shell select,
#site-shell summary,
#site-shell label,
#site-shell [role="button"],
#site-shell [role="link"],
#site-shell [tabindex]:not([tabindex="-1"]) {
  pointer-events: auto !important;
}

#site-shell header,
#site-shell footer {
  pointer-events: auto !important;
}

[data-tabula-rasa-palette] {
  pointer-events: auto !important;
  z-index: 40 !important;
}

[data-tabula-rasa-palette] * {
  pointer-events: auto !important;
}

canvas.tabula-rasa-draw-layer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}

/* —— 布局 —— */
.min-h-screen {
  min-height: 100vh;
}
.min-h-\[80vh\] {
  min-height: 80vh;
}
.flex {
  display: flex;
}
.inline-block {
  display: inline-block;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1 1 0%;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.relative {
  position: relative;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.inset-0 {
  inset: 0;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-\[1\] {
  z-index: 1;
}
.z-\[2\] {
  z-index: 2;
}
.z-\[30\] {
  z-index: 30;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-hidden {
  overflow-x: hidden;
}
.pointer-events-none {
  pointer-events: none;
}
.pointer-events-auto {
  pointer-events: auto;
}
.touch-none {
  touch-action: none;
}
.select-none {
  user-select: none;
}

.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.gap-1\.5 {
  gap: 0.375rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}

@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:bottom-24 {
    bottom: 6rem;
  }
  .md\:right-5 {
    right: 1.25rem;
  }
  .md\:block {
    display: block;
  }
  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
  .md\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

/* .hidden 规则交由 Tailwind 的 layout.css 提供。
   不要在此处重复定义：critical-layout.css 加载在 layout.css 之后，
   会覆盖 Tailwind 的 responsive display 规则（如 sm:flex），导致带
   "hidden sm:flex" 的元素在 ≥640px 仍然不可见。 */

/* —— 尺寸 —— */
.w-full {
  width: 100%;
}
.w-64 {
  width: 16rem;
}
.w-72 {
  width: 18rem;
}
.w-20 {
  width: 5rem;
}
.w-7 {
  width: 1.75rem;
}
.w-14 {
  width: 3.5rem;
}
.w-2 {
  width: 0.5rem;
}
.h-32 {
  height: 8rem;
}
.h-48 {
  height: 12rem;
}
.h-7 {
  height: 1.75rem;
}
.h-14 {
  height: 3.5rem;
}
.h-2 {
  height: 0.5rem;
}
.h-px {
  height: 1px;
}
.max-w-lg {
  max-width: 32rem;
}
.max-w-2xl {
  max-width: 42rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-\[min\(96vw\,42rem\)\] {
  max-width: min(96vw, 42rem);
}
.w-\[min\(17rem\,calc\(100vw-1\.5rem\)\)\] {
  width: min(17rem, calc(100vw - 1.5rem));
}

/* —— 内外边距 —— */
.p-6 {
  padding: 1.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.px-10 {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.pb-24 {
  padding-bottom: 6rem;
}
.pt-3 {
  padding-top: 0.75rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mt-0\.5 {
  margin-top: 0.125rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-12 {
  margin-top: 3rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-1\.5 {
  margin-bottom: 0.375rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-12 {
  margin-bottom: 3rem;
}
.ml-2 {
  margin-left: 0.5rem;
}
.-translate-y-1\/2 {
  transform: translateY(-50%);
}
.left-2 {
  left: 0.5rem;
}
.top-1\/2 {
  top: 50%;
}
.bottom-3 {
  bottom: 0.75rem;
}
.bottom-20 {
  bottom: 5rem;
}
.right-3 {
  right: 0.75rem;
}
.left-0 {
  left: 0;
}
.right-0 {
  right: 0;
}

/* —— 排版 —— */
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.font-serif {
  font-family: Georgia, "Times New Roman", serif;
}
.font-body {
  font-family: Georgia, "Times New Roman", serif;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-5xl {
  font-size: 3rem;
  line-height: 1;
}
.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}
.text-7xl {
  font-size: 4.5rem;
  line-height: 1;
}
.text-\[11px\] {
  font-size: 11px;
}
.text-\[0\.5rem\] {
  font-size: 0.5rem;
}
.text-\[0\.5625rem\] {
  font-size: 0.5625rem;
}
.leading-snug {
  line-height: 1.375;
}
.leading-relaxed {
  line-height: 1.625;
}
.tracking-wide {
  letter-spacing: 0.025em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.tracking-\[0\.25em\] {
  letter-spacing: 0.25em;
}
.uppercase {
  text-transform: uppercase;
}
.italic {
  font-style: italic;
}
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— 颜色（含透明度变体，类名与 Tailwind 一致） —— */
.text-sunrise-charcoal {
  color: #222222;
}
.text-sunrise-charcoal\/\[0\.22\] {
  color: rgba(34, 34, 34, 0.22);
}
.text-sunrise-charcoal\/\[0\.14\] {
  color: rgba(34, 34, 34, 0.14);
}
.text-sunrise-charcoal\/80 {
  color: rgba(34, 34, 34, 0.8);
}
.text-sunrise-charcoal\/85 {
  color: rgba(34, 34, 34, 0.85);
}
.text-sunrise-ink\/50 {
  color: rgba(51, 51, 51, 0.5);
}
.text-sunrise-ink\/60 {
  color: rgba(51, 51, 51, 0.6);
}
.text-sunrise-ink\/70 {
  color: rgba(51, 51, 51, 0.7);
}
.text-sunrise-ink\/75 {
  color: rgba(51, 51, 51, 0.75);
}
.text-sunrise-ink\/80 {
  color: rgba(51, 51, 51, 0.8);
}
.text-sunrise-ink {
  color: #333333;
}
.text-sunrise-muted {
  color: #8a8890;
}
.text-sunrise-muted\/60 {
  color: rgba(138, 136, 144, 0.6);
}
.text-sunrise-muted\/70 {
  color: rgba(138, 136, 144, 0.7);
}
.text-sunrise-muted\/90 {
  color: rgba(138, 136, 144, 0.9);
}
.text-sunrise-gold {
  color: #b8943f;
}
.text-sunrise-gold\/30 {
  color: rgba(184, 148, 63, 0.3);
}
.text-sunrise-gold\/40 {
  color: rgba(184, 148, 63, 0.4);
}
.text-sunrise-gold\/50 {
  color: rgba(184, 148, 63, 0.5);
}
.text-sunrise-gold\/60 {
  color: rgba(184, 148, 63, 0.6);
}
.text-sunrise-gold\/25 {
  color: rgba(184, 148, 63, 0.25);
}
.text-sunrise-coral {
  color: #c8785a;
}
.text-sunrise-coral\/70 {
  color: rgba(200, 120, 90, 0.7);
}
.text-sunrise-canvas {
  color: #f5f0e8;
}

.bg-sunrise-charcoal {
  background-color: #222222;
}
.bg-sunrise-charcoal\/10 {
  background-color: rgba(34, 34, 34, 0.1);
}
.bg-sunrise-gold\/8 {
  background-color: rgba(184, 148, 63, 0.08);
}
.bg-\[\#f5f0e8\] {
  background-color: #f5f0e8;
}
.bg-\[\#f5f0e8\]\/92 {
  background-color: rgba(245, 240, 232, 0.92);
}
.bg-white\/40 {
  background-color: rgba(255, 255, 255, 0.4);
}
.bg-white\/50 {
  background-color: rgba(255, 255, 255, 0.5);
}
.bg-white\/55 {
  background-color: rgba(255, 255, 255, 0.55);
}
.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}

.bg-sunrise-gold\/30 {
  background-color: rgba(184, 148, 63, 0.3);
}
.bg-gradient-to-br.from-sunrise-cream.to-white {
  background-image: linear-gradient(to bottom right, #ede7db, #ffffff);
}
.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}
.from-\[\#f5f0e8\]\/12 {
  --tw-gradient-from: rgba(245, 240, 232, 0.12);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}
.via-transparent {
  --tw-gradient-stops: var(--tw-gradient-from), transparent, var(--tw-gradient-to, transparent);
}
.to-\[\#f2ebe0\]\/8 {
  --tw-gradient-to: rgba(242, 235, 224, 0.08);
}

.bg-sunrise-ink {
  background-color: #444449;
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: rgba(184, 148, 63, 0.2);
}
.border-2 {
  border-width: 2px;
  border-style: solid;
}
.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}
.border-dashed {
  border-style: dashed;
}
.border-sunrise-gold\/10 {
  border-color: rgba(184, 148, 63, 0.1);
}
.border-sunrise-gold\/12 {
  border-color: rgba(184, 148, 63, 0.12);
}
.border-sunrise-gold\/15 {
  border-color: rgba(184, 148, 63, 0.15);
}
.border-sunrise-gold\/20 {
  border-color: rgba(184, 148, 63, 0.2);
}
.border-sunrise-gold\/25 {
  border-color: rgba(184, 148, 63, 0.25);
}
.border-sunrise-gold\/30 {
  border-color: rgba(184, 148, 63, 0.3);
}
.border-sunrise-gold\/40 {
  border-color: rgba(184, 148, 63, 0.4);
}
.border-sunrise-gold\/60 {
  border-color: rgba(184, 148, 63, 0.6);
}
.border-sunrise-gold {
  border-color: #b8943f;
}
.border-white\/80 {
  border-color: rgba(255, 255, 255, 0.8);
}

.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-xl {
  border-radius: 0.75rem;
}
.rounded-2xl {
  border-radius: 1rem;
}
.rounded-full {
  border-radius: 9999px;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.shadow-sunrise-soft {
  box-shadow: 0 4px 24px rgba(200, 120, 90, 0.12);
}
.shadow-glow {
  box-shadow: 0 0 15px rgba(184, 148, 63, 0.25);
}
.shadow-glow-strong {
  box-shadow: 0 0 30px rgba(184, 148, 63, 0.4);
}

.opacity-0 {
  opacity: 0;
}
.opacity-30 {
  opacity: 0.3;
}
.opacity-60 {
  opacity: 0.6;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-300 {
  transition-duration: 300ms;
}

.cursor-pointer {
  cursor: pointer;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.cursor-cell {
  cursor: cell;
}
.cursor-crosshair {
  cursor: crosshair;
}

.hover\:scale-105:hover {
  transform: scale(1.05);
}
.hover\:border-sunrise-gold\/60:hover {
  border-color: rgba(184, 148, 63, 0.6);
}
.hover\:bg-white\/80:hover {
  background-color: rgba(255, 255, 255, 0.8);
}
.hover\:bg-sunrise-gold\/8:hover {
  background-color: rgba(184, 148, 63, 0.08);
}
.hover\:border-sunrise-gold\/25:hover {
  border-color: rgba(184, 148, 63, 0.25);
}
.hover\:shadow-sunrise-soft:hover {
  box-shadow: 0 4px 24px rgba(200, 120, 90, 0.12);
}
.hover\:shadow-glow:hover {
  box-shadow: 0 0 15px rgba(184, 148, 63, 0.25);
}
.hover\:bg-sunrise-ink:hover {
  background-color: #444449;
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus\:border-sunrise-gold\/50:focus {
  border-color: rgba(184, 148, 63, 0.5);
}
.focus\:ring-1:focus {
  box-shadow: 0 0 0 1px rgba(184, 148, 63, 0.35);
}

.ring-2 {
  box-shadow: 0 0 0 2px rgba(184, 148, 63, 0.3);
}
.ring-sunrise-gold\/30 {
  box-shadow: 0 0 0 2px rgba(184, 148, 63, 0.3);
}

.scale-110 {
  transform: scale(1.1);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}
.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

.placeholder-sunrise-muted\/50::placeholder {
  color: rgba(138, 136, 144, 0.5);
}

.resize-none {
  resize: none;
}

/* 组件级（原 globals @layer components） */
.card-back {
  background: linear-gradient(180deg, #e8e2d6 0%, #ddd6c8 100%);
  border: 1px solid rgba(184, 148, 63, 0.25);
}

.glow-text {
  text-shadow:
    0 0 20px rgba(184, 148, 63, 0.3),
    0 0 40px rgba(200, 120, 90, 0.1);
}

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

/* 竖排小字 */
[style*="writing-mode:vertical-rl"] {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.animate-pulse {
  animation: critical-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes critical-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
