/* AIPlayCraft Instructions hub — catalog layout aligned with Programs. */
.instructions-page {
  min-height: 100vh;
  color: #202124;
  background: #f6f8fc;
}
.instructions-page .pc-container { width: min(1180px, calc(100% - 40px)); }

.instructions-hero {
  padding: 74px 0 58px;
  border-bottom: 1px solid #e2e7ef;
  background:
    radial-gradient(circle at 82% 14%, rgba(66,133,244,.14), transparent 28%),
    linear-gradient(180deg,#f8fbff 0%,#f1f6ff 100%);
}
.instructions-hero-grid { display: grid; grid-template-columns: minmax(0,760px) 1fr; align-items: end; }
.instructions-hero h1 {
  max-width: 760px;
  margin: 9px 0 16px;
  color: #071a3d;
  font-size: clamp(46px,6vw,74px);
  line-height: .98;
  letter-spacing: -.055em;
}
.instructions-hero p:not(.pc-eyebrow) {
  max-width: 710px;
  margin: 0;
  color: #5f6f85;
  font-size: 17px;
  line-height: 1.65;
}
.instructions-hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.instructions-hero-points span {
  padding: 8px 11px;
  border: 1px solid #d2e3fc;
  border-radius: 999px;
  color: #174ea6;
  background: rgba(255,255,255,.88);
  font-size: 12px;
  font-weight: 800;
}

.instructions-catalog { padding: 46px 0 92px; }
.instructions-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.instructions-heading h2,
.instructions-how-heading h2 {
  margin: 5px 0 0;
  color: #071a3d;
  font-size: clamp(32px,4.4vw,46px);
  line-height: 1;
  letter-spacing: -.045em;
}
.instructions-result-count {
  margin: 0 0 5px;
  color: #5f6368;
  font-size: 12px;
  font-weight: 750;
}

.instructions-toolbar {
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #dfe5ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(60,64,67,.045);
}
.instructions-search > span,
.instructions-filter-row label > span {
  display: block;
  margin: 0 0 6px;
  color: #5f6368;
  font-size: 11px;
  font-weight: 800;
}
.instructions-search > div { position: relative; }
.instructions-search input,
.instructions-filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d5dce6;
  border-radius: 12px;
  color: #202124;
  background: #fff;
  font: inherit;
  outline: none;
}
.instructions-search input { padding: 0 48px 0 46px; }
.instructions-search input:focus,
.instructions-filter-row select:focus {
  border-color: #8ab4f8;
  box-shadow: 0 0 0 3px rgba(66,133,244,.12);
}
.instructions-search-icon {
  width: 15px;
  height: 15px;
  position: absolute;
  left: 17px;
  top: 50%;
  border: 2px solid #6b7d97;
  border-radius: 50%;
  transform: translateY(-56%);
  pointer-events: none;
}
.instructions-search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  border-radius: 2px;
  background: #6b7d97;
  transform: rotate(45deg);
}
#instructions-search-clear {
  width: 32px;
  height: 32px;
  position: absolute;
  right: 7px;
  top: 7px;
  border: 0;
  border-radius: 9px;
  color: #5f6368;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
#instructions-search-clear:hover { background: #f1f3f4; }
.instructions-filter-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin-top: 11px;
}
.instructions-filter-row select { padding: 0 36px 0 13px; }
.instructions-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
}
.instructions-quick-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  color: #526176;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.instructions-quick-filters button:hover { border-color: #a8c7fa; color: #174ea6; background: #f8faff; }
.instructions-quick-filters button.is-active { border-color: #c4d7fa; color: #174ea6; background: #e8f0fe; }
.instructions-quick-filters .instructions-reset { margin-left: auto; border-color: transparent; background: transparent; }

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
  align-items: stretch;
}
.instruction-card {
  overflow: hidden;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid #d8e0ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(60,64,67,.05);
  transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.instruction-card:hover {
  transform: translateY(-2px);
  border-color: #b8cdf5;
  box-shadow: 0 13px 30px rgba(60,64,67,.09);
}
.instruction-card[hidden] { display: none !important; }
.instruction-card-art {
  min-height: 116px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid #edf0f4;
  background: linear-gradient(135deg,#eef7ff,#f7fbff);
}
.instruction-card-shop { background: linear-gradient(135deg,#f5fbf2,#edf8f1); }
.instruction-card-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 9px;
  border: 1px solid #d6e4d4;
  border-radius: 999px;
  color: #28704a;
  background: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 850;
}
.instruction-chest {
  width: 66px;
  height: 52px;
  position: relative;
  display: block;
  border: 3px solid #6b471f;
  border-radius: 4px 4px 7px 7px;
  background:
    linear-gradient(90deg,transparent 0 45%,rgba(89,55,20,.18) 45% 55%,transparent 55%),
    linear-gradient(180deg,#d89a42 0 50%,#b8782b 50% 100%);
  box-shadow: inset 0 0 0 2px rgba(255,213,119,.2),0 7px 13px rgba(80,55,20,.13);
}
.instruction-chest::before {
  content: "";
  position: absolute;
  inset: -3px -3px auto;
  height: 22px;
  border: 3px solid #6b471f;
  border-radius: 5px 5px 2px 2px;
  background: #e0a34b;
}
.instruction-chest i {
  width: 14px;
  height: 18px;
  position: absolute;
  left: 50%;
  top: 17px;
  z-index: 2;
  border: 2px solid #725222;
  border-radius: 2px;
  background: #f2d16d;
  transform: translateX(-50%);
}
.instruction-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.instruction-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.instruction-card-tags span {
  padding: 5px 7px;
  border-radius: 7px;
  color: #5f6f85;
  background: #f1f4f8;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .045em;
}
.instruction-card h3 {
  margin: 0;
  color: #071a3d;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.instruction-card-body > p {
  margin: 12px 0 15px;
  color: #65758b;
  font-size: 13px;
  line-height: 1.6;
}
.instruction-card ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.instruction-card li {
  position: relative;
  padding-left: 14px;
  color: #526176;
  font-size: 12px;
  line-height: 1.4;
}
.instruction-card li::before {
  content: "";
  width: 5px;
  height: 5px;
  position: absolute;
  left: 0;
  top: .47em;
  border-radius: 50%;
  background: #4285f4;
}
.instruction-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
}
.instruction-card-footer small,
.instruction-card-footer strong { display: block; }
.instruction-card-footer small { color: #7b8798; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.instruction-card-footer strong { margin-top: 4px; color: #202124; font-size: 14px; }
.instruction-card-footer .pc-button { min-width: 132px; min-height: 42px; }

.instructions-empty {
  margin-top: 16px;
  padding: 60px 20px;
  border: 1px dashed #ccd5e1;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}
.instructions-empty > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 14px;
  color: #174ea6;
  background: #e8f0fe;
  font-size: 22px;
  font-weight: 900;
}
.instructions-empty h3 { margin: 0; color: #071a3d; font-size: 24px; }
.instructions-empty p { margin: 8px 0 20px; color: #65758b; }

.instructions-how { padding: 74px 0 100px; border-top: 1px solid #e1e7ef; background: #fff; }
.instructions-how-heading { margin-bottom: 25px; }
.instructions-how-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.instructions-how-grid article {
  min-height: 180px;
  padding: 24px;
  border: 1px solid #dfe5ee;
  border-radius: 18px;
  background: #fff;
}
.instructions-how-grid article > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #174ea6;
  background: #e8f0fe;
  font-weight: 900;
}
.instructions-how-grid strong { display: block; margin-top: 22px; color: #071a3d; font-size: 17px; }
.instructions-how-grid p { margin: 8px 0 0; color: #65758b; font-size: 13px; line-height: 1.55; }

@media (max-width: 900px) {
  .instructions-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .instructions-how-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .instructions-page .pc-container { width: min(100% - 24px,1180px); }
  .instructions-hero { padding: 54px 0 42px; }
  .instructions-hero-grid { grid-template-columns: 1fr; }
  .instructions-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .instructions-filter-row { grid-template-columns: 1fr; }
  .instructions-quick-filters .instructions-reset { margin-left: 0; }
  .instructions-grid { grid-template-columns: 1fr; }
  .instruction-card { min-height: 0; }
  .instruction-card-footer { align-items: stretch; flex-direction: column; }
  .instruction-card-footer .pc-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .instruction-card { transition: none; }
}
