.project-rules{
  --rules-panel:#101217;
  --rules-panel-strong:#151820;
  --rules-line:rgba(255,255,255,.12);
  --rules-line-soft:rgba(255,255,255,.075);
  --rules-text:#f7f7f4;
  --rules-muted:#aeb3bd;
  --rules-red:#f1545b;
  --rules-red-soft:rgba(241,84,91,.12);
  width:min(1240px,calc(100% - 32px));
  margin:0 auto;
  padding:28px 0 48px;
  color:var(--rules-text);
}
.project-rules *{box-sizing:border-box}
.project-rules h1,.project-rules h2,.project-rules h3,.project-rules p{margin-top:0}
.project-rules__sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.project-rules__hero{
  position:relative;
  overflow:hidden;
  min-height:360px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:clamp(28px,5vw,64px);
  border:1px solid var(--rules-line);
  border-radius:24px;
  background:
    linear-gradient(90deg,rgba(5,6,9,.98) 0%,rgba(7,8,12,.9) 53%,rgba(12,7,10,.38) 100%),
    url('/static/art/miki-rp-city-night-v1.webp') center/cover;
  box-shadow:0 28px 90px rgba(0,0,0,.36);
}
.project-rules__hero:after{
  content:"";
  position:absolute;
  inset:auto -10% -70% 36%;
  height:320px;
  border:1px solid rgba(241,84,91,.3);
  border-radius:50%;
  transform:rotate(-8deg);
  pointer-events:none;
}
.project-rules__eyebrow{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.project-rules__eyebrow span{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 11px;
  border:1px solid var(--rules-line);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#e6e8ee;
  font-size:12px;
  font-weight:850;
}
.project-rules__hero h1{max-width:800px;margin-bottom:14px;color:#fff!important;font-size:clamp(46px,7vw,82px);line-height:.94;letter-spacing:-.055em}
.project-rules__hero>p{max-width:720px;margin-bottom:24px;color:#d3d6de!important;font-size:clamp(16px,1.6vw,20px);line-height:1.55}
.project-rules__hero-actions{position:relative;z-index:1;display:flex;gap:10px;flex-wrap:wrap}
.project-rules .project-rules__hero-actions a.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 16px;
  border:1px solid rgba(241,84,91,.5)!important;
  border-radius:12px;
  background:linear-gradient(180deg,#f1545b,#bd303d)!important;
  color:#fff!important;
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}
.project-rules .project-rules__hero-actions a.button+a.button{border-color:var(--rules-line)!important;background:rgba(18,21,27,.92)!important;color:#fff!important}
.project-rules__search,.project-rules__catalog,.project-rules__foot{
  margin-top:16px;
  padding:24px;
  border:1px solid var(--rules-line);
  border-radius:18px;
  background:linear-gradient(180deg,var(--rules-panel-strong),var(--rules-panel));
}
.project-rules__search{
  display:grid;
  grid-template-columns:minmax(260px,.42fr) minmax(360px,.58fr);
  gap:22px 28px;
  align-items:center;
  scroll-margin-top:90px;
}
.project-rules__search>div:first-child>span,.project-rules__catalog>header>span{
  color:var(--rules-red);
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.1em;
}
.project-rules__search h2,.project-rules__catalog h2{margin:4px 0 6px;font-size:clamp(25px,3vw,34px);letter-spacing:-.025em}
.project-rules__search>div:first-child>p{margin:0;color:var(--rules-muted);font-size:14px}
.project-rules__search form>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.project-rules__search input{
  min-width:0;
  min-height:52px;
  border:1px solid var(--rules-line);
  border-radius:13px;
  background:#080a0e;
  color:#fff;
  padding:0 15px;
  font:inherit;
}
.project-rules__search input:focus{outline:2px solid rgba(241,84,91,.48);outline-offset:1px}
.project-rules #project-rules-search button{
  min-height:52px;
  border:1px solid rgba(241,84,91,.48)!important;
  border-radius:13px;
  background:#d9434c!important;
  color:#fff!important;
  padding:0 20px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
.project-rules__search-meta{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:14px;border-top:1px solid var(--rules-line-soft)}
.project-rules__result-count{margin:0;color:#e6e8ed;font-size:13px;font-weight:850}
.project-rules__search-meta a{color:#ff858a;font-size:13px;font-weight:850;text-decoration:none}
.project-rules__catalog>header{display:block;margin-bottom:16px}
.project-rules__catalog h2{margin-bottom:0}
.project-rules__contents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.project-rules__contents a{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-height:56px;
  padding:10px 12px;
  border:1px solid var(--rules-line-soft);
  border-radius:12px;
  background:#0a0c10;
  color:#e1e3e8;
  text-decoration:none;
  font-size:13px;
  font-weight:780;
  line-height:1.3;
}
.project-rules__contents a:hover{border-color:rgba(241,84,91,.43);background:#141217}
.project-rules__contents span{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--rules-red-soft);color:#ff7c82;font-size:11px;font-weight:950}
.project-rules__topics{display:grid;gap:10px;margin-top:16px}
.project-rules__topic{border:1px solid var(--rules-line);border-radius:15px;background:#0d0f14;overflow:hidden;scroll-margin-top:90px}
.project-rules__topic[open]{border-color:rgba(241,84,91,.36);background:#111318;box-shadow:0 18px 48px rgba(0,0,0,.18)}
.project-rules__topic summary{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:13px;align-items:center;padding:17px 20px;cursor:pointer;list-style:none}
.project-rules__topic summary::-webkit-details-marker{display:none}
.project-rules__number{display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(241,84,91,.32);border-radius:11px;background:var(--rules-red-soft);color:#ff7d83;font-size:12px;font-weight:950}
.project-rules__topic summary small{display:block;margin-bottom:3px;color:var(--rules-muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.055em}
.project-rules__topic summary b{display:block;color:var(--rules-text);font-size:16px;line-height:1.28}
.project-rules__topic summary em{font-style:normal;color:var(--rules-muted);font-size:12px;font-weight:800;white-space:nowrap}
.project-rules__close-label{display:none}
.project-rules__topic[open] .project-rules__open-label{display:none}
.project-rules__topic[open] .project-rules__close-label{display:inline}
.project-rules__topic-body{padding:0 20px 24px 75px;border-top:1px solid var(--rules-line-soft)}
.project-rules__source-line{display:flex;justify-content:space-between;gap:18px;align-items:center;max-width:940px;margin:0 0 12px;padding:15px 0;color:var(--rules-muted);font-size:12px}
.project-rules__source-line a{color:#ff858a;font-weight:850;text-decoration:none}
.project-rules__rule-group{display:grid;gap:7px;max-width:940px;margin:0 0 18px;padding:0;border:0}
.project-rules__rule-heading{margin:16px 0 4px!important;color:#fff;font-size:18px;line-height:1.35;letter-spacing:-.01em}
.project-rules__rule-group:first-of-type .project-rules__rule-heading:first-child{margin-top:0!important}
.project-rules__rule-line,.project-rules__bullet,.project-rules__callout,.project-rules__plain{
  display:grid;
  min-width:0;
  margin:0;
  border:1px solid var(--rules-line-soft);
  border-radius:11px;
  background:#090b0f;
  color:#e9ebf0!important;
  font-size:15px;
  line-height:1.64;
}
.project-rules__rule-line{grid-template-columns:54px minmax(0,1fr);align-items:stretch}
.project-rules__rule-number{display:flex;align-items:flex-start;justify-content:center;padding:13px 8px;border-right:1px solid var(--rules-line-soft);background:rgba(241,84,91,.075);color:#ff858a;font-size:12px;font-weight:950}
.project-rules__copy{display:block;min-width:0;padding:12px 14px;color:inherit!important;overflow-wrap:anywhere}
.project-rules__penalty{display:inline-flex;margin:8px 0 0 0;padding:4px 8px;border:1px solid rgba(241,84,91,.28);border-radius:8px;background:rgba(241,84,91,.09);color:#ffb4b7!important;font-size:12px;font-weight:800}
.project-rules__bullet{grid-template-columns:13px minmax(0,1fr);align-items:start;padding-left:15px}
.project-rules__bullet>span:first-child{width:6px;height:6px;margin-top:20px;border-radius:50%;background:var(--rules-red)}
.project-rules__bullet .project-rules__copy{padding-left:4px}
.project-rules__callout{grid-template-columns:auto minmax(0,1fr);align-items:start;border-color:rgba(241,84,91,.18);background:rgba(241,84,91,.055)}
.project-rules__callout>b{margin:12px 0 0 12px;padding:4px 8px;border-radius:7px;background:rgba(241,84,91,.13);color:#ff969b;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.project-rules__plain .project-rules__copy{padding:12px 14px}
.project-rules__empty{padding:34px;border:1px dashed rgba(241,84,91,.45);border-radius:15px;background:#100d11;text-align:center}
.project-rules__empty b{font-size:20px}.project-rules__empty p{margin:8px 0 16px;color:var(--rules-muted)}.project-rules__empty a{color:#ff858a;font-weight:850}
.project-rules__foot{color:var(--rules-muted);font-size:13px;line-height:1.55}
.project-rules__foot p{margin-bottom:5px}.project-rules__foot small{color:#7f8590}
html[data-theme="light"] .project-rules{
  --rules-panel:#f6f3ed;
  --rules-panel-strong:#fff;
  --rules-line:rgba(42,35,35,.16);
  --rules-line-soft:rgba(42,35,35,.1);
  --rules-text:#151316;
  --rules-muted:#68636c;
}
html[data-theme="light"] .project-rules__contents a,
html[data-theme="light"] .project-rules__topic,
html[data-theme="light"] .project-rules__rule-line,
html[data-theme="light"] .project-rules__bullet,
html[data-theme="light"] .project-rules__callout,
html[data-theme="light"] .project-rules__plain,
html[data-theme="light"] .project-rules__search input{background:#fff;color:#181519!important}
html[data-theme="light"] .project-rules__topic[open]{background:#fff}
html[data-theme="light"] .project-rules__rule-heading{color:#171419}
@media(max-width:820px){
  .project-rules__search{grid-template-columns:1fr;align-items:stretch}
  .project-rules__search-meta{grid-column:1}
  .project-rules__contents{grid-template-columns:1fr}
}
@media(max-width:620px){
  .project-rules{width:min(100% - 20px,1240px);padding-top:14px}
  .project-rules__hero{min-height:320px;padding:26px 20px;border-radius:17px}
  .project-rules__hero h1{font-size:44px}
  .project-rules__hero-actions{display:grid;grid-template-columns:1fr}
  .project-rules__search,.project-rules__catalog,.project-rules__foot{padding:18px;border-radius:15px}
  .project-rules__search form>div{grid-template-columns:1fr}
  .project-rules__search button{width:100%}
  .project-rules__search-meta{align-items:flex-start;flex-direction:column}
  .project-rules__topic summary{grid-template-columns:36px minmax(0,1fr);padding:14px 12px}
  .project-rules__topic summary em{grid-column:2}
  .project-rules__number{width:34px;height:34px}
  .project-rules__topic-body{padding:0 12px 16px}
  .project-rules__source-line{align-items:flex-start;flex-direction:column;gap:6px}
  .project-rules__rule-line{grid-template-columns:46px minmax(0,1fr)}
  .project-rules__rule-number{padding:12px 5px}
  .project-rules__copy{padding:11px 12px}
  .project-rules__callout{grid-template-columns:1fr}
  .project-rules__callout>b{justify-self:start;margin-bottom:-4px}
}

/* Public density v4 — compact reference rhythm without losing rule content. */
.project-rules{
  width:min(1180px,calc(100% - 32px));
  padding:20px 0 52px;
}
.project-rules__hero{
  min-height:260px;
  padding:30px;
  border-radius:15px;
}
.project-rules__eyebrow{margin-bottom:12px}
.project-rules__eyebrow span{min-height:28px;padding:4px 9px;font-size:11px}
.project-rules__hero h1{max-width:720px;margin-bottom:9px;font-size:clamp(36px,4vw,46px);line-height:1}
.project-rules__hero>p{max-width:680px;margin-bottom:16px;font-size:15px;line-height:1.48}
.project-rules .project-rules__hero-actions a.button{min-height:38px;padding:8px 13px;border-radius:9px;font-size:12px}
.project-rules__search,.project-rules__catalog,.project-rules__foot{margin-top:12px;padding:16px;border-radius:12px}
.project-rules__search{gap:14px 22px}
.project-rules__search h2,.project-rules__catalog h2{font-size:clamp(22px,2.4vw,28px)}
.project-rules__search input,.project-rules #project-rules-search button{min-height:40px;border-radius:9px}
.project-rules__search-meta{padding-top:10px}
.project-rules__catalog>header{margin-bottom:12px}
.project-rules__contents{gap:6px}
.project-rules__contents a{min-height:44px;grid-template-columns:28px minmax(0,1fr);gap:8px;padding:7px 9px;border-radius:9px;font-size:12px}
.project-rules__contents span{width:27px;height:27px;border-radius:7px}
.project-rules__topics{gap:7px;margin-top:12px}
.project-rules__topic{border-radius:10px}
.project-rules__topic summary{grid-template-columns:34px minmax(0,1fr) auto;gap:10px;padding:11px 14px}
.project-rules__number{width:32px;height:32px;border-radius:8px}
.project-rules__topic summary b{font-size:14px}
.project-rules__topic-body{padding:0 14px 18px 58px}
.project-rules__foot{font-size:12px}
@media(max-width:620px){
  .project-rules{width:min(100% - 20px,1180px);padding-top:12px}
  .project-rules__hero{min-height:0;padding:22px 16px;border-radius:12px}
  .project-rules__hero h1{font-size:36px}
  .project-rules__search,.project-rules__catalog,.project-rules__foot{padding:14px}
  .project-rules__search{gap:12px}
  .project-rules__contents a{min-height:42px}
  .project-rules__topic summary{grid-template-columns:32px minmax(0,1fr);padding:10px}
  .project-rules__topic-body{padding:0 10px 14px}
}
