/* ===================================================
   resources.css — お役立ち資料ページ
   =================================================== */

/* ---- Page hero ---- */
.res-hero {
  padding: 140px 0 72px;
  background: linear-gradient(180deg, #eef9fc 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.res-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(125,217,237,0.22) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.5;
}

.res-hero .container { position: relative; z-index: 1; }

.res-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow-light);
  border: 1.5px solid rgba(125,217,237,0.5);
  color: var(--yellow-hover);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
}

.res-hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 18px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.res-hero-title em {
  font-style: normal;
  color: var(--yellow-hover);
}

.res-hero-desc {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto 40px;
}

.res-hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.res-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.res-hero-badge svg { flex-shrink: 0; }

/* ---- Section wrapper ---- */
.res-section {
  padding: 80px 0;
}

.res-section--gray {
  background: #f8fafc;
}

.res-section-head {
  margin-bottom: 40px;
}

.res-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow-hover);
  margin-bottom: 10px;
}

.res-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

/* =============================================
   POPULAR — horizontal card layout
   ============================================= */

.res-popular-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.res-hcard {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  min-height: 180px;
}

.res-hcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  border-color: rgba(125,217,237,0.4);
}

/* Thumb — left panel */
.res-hthumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 28px;
  overflow: hidden;
}

.res-hthumb--blue   { background: linear-gradient(145deg, #1d4ed8 0%, #38bdf8 100%); }
.res-hthumb--teal   { background: linear-gradient(145deg, #0369a1 0%, #7DD9ED 100%); }
.res-hthumb--purple { background: linear-gradient(145deg, #6d28d9 0%, #c084fc 100%); }
.res-hthumb--orange { background: linear-gradient(145deg, #c2410c 0%, #fb923c 100%); }
.res-hthumb--green  { background: linear-gradient(145deg, #15803d 0%, #4ade80 100%); }

/* document icon watermark */
.res-hthumb::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.06);
  border-radius: 24px;
  transform: rotate(15deg);
}

.res-hthumb::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 10px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  transform: rotate(-8deg);
}

.res-hthumb-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.res-hthumb-type {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.res-hthumb-num {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.08);
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Content — right panel */
.res-hcard-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.res-hcard-body .res-tag { margin-bottom: 12px; }

.res-hcard-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.res-hcard-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

.res-hcard-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.res-hcard-meta {
  font-size: 0.78rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =============================================
   RESOURCE GRID CARDS
   ============================================= */

/* ---- Category filter ---- */
.res-filter-bar {
  margin-bottom: 48px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.res-filter-bar::-webkit-scrollbar { display: none; }

.res-filter-tab {
  background: transparent;
  border: none;
  padding: 14px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.18s;
}

.res-filter-tab::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.res-filter-tab:hover { color: var(--dark); }

.res-filter-tab.active {
  color: var(--dark);
}

.res-filter-tab.active::after {
  transform: scaleX(1);
}

/* Keep old pill filter hidden when bar exists */
.res-filter { display: none; }

/* ---- Grid ---- */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .res-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .res-grid { grid-template-columns: 1fr; }
}

/* ---- Card ---- */
.res-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.res-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.09);
  border-color: rgba(125,217,237,0.5);
}

.res-card--soon {
  position: relative;
}
.res-card--soon::after {
  content: '準備中';
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid #e5e7eb;
  z-index: 2;
}
.res-card--soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.res-card--soon .res-dl-btn {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Thumbnail (grid cards) ---- */
.res-thumb {
  height: 148px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.res-thumb::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.res-thumb::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.res-thumb--blue   { background: linear-gradient(145deg, #1d4ed8 0%, #38bdf8 100%); }
.res-thumb--teal   { background: linear-gradient(145deg, #0369a1 0%, #7DD9ED 100%); }
.res-thumb--purple { background: linear-gradient(145deg, #6d28d9 0%, #c084fc 100%); }
.res-thumb--orange { background: linear-gradient(145deg, #c2410c 0%, #fb923c 100%); }
.res-thumb--green  { background: linear-gradient(145deg, #15803d 0%, #4ade80 100%); }

.res-thumb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.res-thumb-inner span {
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.res-thumb-icon-wrap {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* ---- Card body ---- */
.res-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.res-card-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--dark);
  margin: 10px 0 8px;
  line-height: 1.5;
}

.res-card-desc {
  font-size: 0.83rem;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}

/* ---- Category tags ---- */
.res-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.res-tag--blue   { background: #eff6ff; color: #1d4ed8; }
.res-tag--teal   { background: #ecfeff; color: #0369a1; }
.res-tag--purple { background: #f5f3ff; color: #6d28d9; }
.res-tag--orange { background: #fff7ed; color: #c2410c; }
.res-tag--green  { background: #f0fdf4; color: #15803d; }

/* ---- Download button ---- */
.res-dl-btn {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--dark);
  background: var(--yellow-light);
  border: 1.5px solid rgba(125,217,237,0.4);
  border-radius: 99px;
  padding: 8px 18px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  align-self: flex-start;
}

.res-dl-btn:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  transform: translateY(-1px);
}

/* ---- CTA banner ---- */
.res-cta-banner {
  background: var(--dark);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

.res-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(125,217,237,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.res-cta-banner::after {
  content: '';
  position: absolute;
  left: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(125,217,237,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.res-cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.res-cta-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 10px;
}

.res-cta-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.res-cta-sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 420px;
}

.res-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.res-cta-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

.btn-cta-primary {
  background: var(--yellow);
  color: var(--dark);
  font-weight: 800;
  padding: 16px 32px;
  border-radius: 99px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.18s, transform 0.18s;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-cta-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ---- Empty state ---- */
.res-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--gray);
  font-size: 0.95rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .res-hero { padding: 120px 0 64px; }
  .res-hero-stats { gap: 0; }
  .res-hero-stat { padding: 0 20px; }

  .res-hcard {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .res-hthumb { min-height: 160px; }

  .res-cta-inner { flex-direction: column; align-items: flex-start; }
  .res-cta-actions { align-items: flex-start; }

  .res-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .res-hero-stats { flex-wrap: wrap; }
  .res-hero-stat { border-right: none; padding: 8px 16px; }
  .res-grid { grid-template-columns: 1fr; }
}

/* =============================================
   RESOURCE MODAL
   ============================================= */

.rmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.rmodal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.rmodal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 340px 1fr;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.22);
}

.rmodal-overlay.is-open .rmodal {
  transform: translateY(0) scale(1);
}

/* ---- Close button ---- */
.rmodal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.15s, transform 0.15s;
}

.rmodal-close:hover {
  background: #fff;
  transform: scale(1.08);
}

/* ---- Preview panel (left) ---- */
.rmodal-preview {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f8fafc;
  border-right: 1px solid var(--border);
}

.rmodal-cover {
  height: 180px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  overflow: hidden;
}

.rmodal-cover::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.rmodal-cover::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.rmodal-cover--teal   { background: linear-gradient(145deg, #0369a1 0%, #7DD9ED 100%); }
.rmodal-cover--blue   { background: linear-gradient(145deg, #1d4ed8 0%, #38bdf8 100%); }
.rmodal-cover--orange { background: linear-gradient(145deg, #c2410c 0%, #fb923c 100%); }
.rmodal-cover--green  { background: linear-gradient(145deg, #15803d 0%, #4ade80 100%); }
.rmodal-cover--purple { background: linear-gradient(145deg, #6d28d9 0%, #c084fc 100%); }

.rmodal-cover-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  opacity: 0.25;
}

.rmodal-cover-type {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.18);
  padding: 4px 12px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

.rmodal-preview-body {
  padding: 24px;
  flex: 1;
}

.rmodal-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.rmodal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.rmodal-desc {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

.rmodal-contents {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.rmodal-contents-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--yellow-hover);
}

.rmodal-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rmodal-contents li {
  font-size: 0.82rem;
  color: var(--dark-2);
  line-height: 1.6;
  padding: 4px 0 4px 16px;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}

.rmodal-contents li:last-child { border-bottom: none; }

.rmodal-contents li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 2px;
}

.rmodal-meta {
  font-size: 0.78rem;
  color: var(--gray);
  font-weight: 500;
}

/* ---- Form panel (right) ---- */
.rmodal-form-wrap {
  padding: 36px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rmodal-form-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow-hover);
  margin-bottom: 8px;
}

.rmodal-form-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.rmodal-form-sub {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 28px;
}

.rmodal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rmodal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rmodal-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rmodal-req {
  font-size: 0.68rem;
  font-weight: 700;
  background: #fee2e2;
  color: #dc2626;
  padding: 1px 6px;
  border-radius: 4px;
}

.rmodal-opt {
  font-size: 0.68rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 6px;
  border-radius: 4px;
}

.rmodal-field input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.rmodal-field input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(125,217,237,0.18);
}

.rmodal-field input::placeholder { color: #c4cdd6; }

.rmodal-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
}

.rmodal-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.rmodal-check a {
  color: var(--yellow-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rmodal-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.925rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  margin-top: 4px;
}

.rmodal-submit:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

/* ---- Success state ---- */
.rmodal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 0;
  gap: 16px;
  min-height: 300px;
}

.rmodal-success-icon {
  width: 72px;
  height: 72px;
  background: rgba(125,217,237,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rmodal-success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.rmodal-success-msg {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.75;
}

.rmodal-direct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark);
  color: #fff;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}

.rmodal-direct-btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.rmodal-back-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.rmodal-back-btn:hover {
  border-color: var(--dark);
  color: var(--dark);
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .rmodal {
    grid-template-columns: 1fr;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    margin-bottom: 0;
  }
  .rmodal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .rmodal-overlay.is-open .rmodal {
    transform: translateY(0);
  }
  .rmodal-overlay .rmodal {
    transform: translateY(40px);
  }
  .rmodal-preview {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .rmodal-cover { height: 140px; }
  .rmodal-form-wrap { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .rmodal-form-title { font-size: 1.1rem; }
}
