.otd {
  --otd-bg: #ffffff;
  --otd-line: #dfe4ea;
  --otd-line-hover: #9fb3c8;
  --otd-text: #1f2730;
  --otd-dim: #5f6b77;
  --otd-accent: #1a73d1;
  --otd-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
  --otd-off-bg: #f4f6f8;
  max-width: 1180px;
  margin: calc(38px + 1vw + 1.5rem) auto 4rem;
  padding: 0 1.5rem;
  color: var(--otd-text);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="dark"] .otd {
  --otd-bg: #171e26;
  --otd-line: #2a3542;
  --otd-line-hover: #4a6076;
  --otd-text: #e3e8ee;
  --otd-dim: #9aa6b2;
  --otd-accent: #5aaef0;
  --otd-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  --otd-off-bg: #121820;
}

.otd-head { text-align: center; margin-bottom: 1.75rem; }
.otd-head h1 { margin: 0 0 0.35rem; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.otd-date { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; color: var(--otd-accent); }
.otd-head p { margin: 0.5rem auto 0; max-width: 46rem; color: var(--otd-dim); font-size: 0.95rem; }

.otd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.otd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 128px;
  padding: 1rem 1.1rem 0.9rem;
  background: var(--otd-bg);
  border: 1px solid var(--otd-line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.otd-card:hover, .otd-card:focus-visible { border-color: var(--otd-line-hover); outline: none; z-index: 5; }
.otd-card.otd-off { background: var(--otd-off-bg); border-style: dashed; }

.otd-cat {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otd-dim);
  margin-bottom: 0.45rem;
}
.otd-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--otd-text);
}
.otd-card.otd-off .otd-title { color: var(--otd-dim); }
.otd-desc {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--otd-dim);
}
.otd-more {
  display: block;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--otd-accent);
}

.otd-pop {
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  min-height: calc(100% + 2px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 0.9rem;
  background: var(--otd-bg);
  border: 1px solid var(--otd-line-hover);
  border-radius: 12px;
  box-shadow: var(--otd-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  pointer-events: none;
}
.otd-card.otd-off .otd-pop { background: var(--otd-off-bg); border-style: dashed; }
.otd-card:hover .otd-pop, .otd-card:focus-visible .otd-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

@media (hover: hover) {
  .otd-card > .otd-desc {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}
@media (hover: none) {
  .otd-pop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .otd-card, .otd-pop { transition: none; }
}
@media (max-width: 799px) {
  .otd { margin-top: calc(37px + 7.4vw + 1.5rem); }
}
@media (max-width: 480px) {
  .otd { padding: 0 1rem; }
  .otd-grid { grid-template-columns: 1fr; }
}
