.sgcw-rules,
.sgcw-rules * { box-sizing: border-box; }

.sgcw-rules {
    --sgcw-green: #008832;
    --sgcw-green-dark: #006b28;
    --sgcw-green-soft: #eef8f1;
    --sgcw-green-pale: #f7fbf8;
    --sgcw-red: #b81822;
    --sgcw-blue-soft: #e9f1fb;
    --sgcw-text: #1d2a22;
    --sgcw-muted: #607066;
    --sgcw-border: #d7e6db;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px;
    color: var(--sgcw-text);
    font-size: clamp(16px, 1.15vw, 18px);
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.sgcw-rules a {
    color: var(--sgcw-green-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.sgcw-rules__hero {
    position: relative;
    padding: clamp(28px, 5vw, 54px);
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.20), transparent 34%),
        linear-gradient(135deg, var(--sgcw-green-dark), var(--sgcw-green));
    box-shadow: 0 12px 34px rgba(0, 82, 30, .18);
    overflow: hidden;
}

.sgcw-rules__hero::after {
    content: "⛳";
    position: absolute;
    right: 22px;
    bottom: -24px;
    font-size: clamp(88px, 16vw, 160px);
    opacity: .13;
    line-height: 1;
}

.sgcw-rules__eyebrow,
.sgcw-rules__status {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-size: .84em;
    font-weight: 800;
    letter-spacing: .025em;
}

.sgcw-rules__eyebrow { text-transform: uppercase; opacity: .92; }

.sgcw-rules__hero h1 {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 8px 0 10px !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: clamp(30px, 6vw, 54px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.025em;
}

.sgcw-rules__hero p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 0 18px;
    color: #fff;
    font-size: 1.04em;
}

.sgcw-rules__status {
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 999px;
    background: rgba(255,255,255,.14);
}

.sgcw-rules__notice {
    margin: 18px 0 0;
    padding: 13px 16px;
    border-left: 4px solid var(--sgcw-green);
    border-radius: 9px;
    background: var(--sgcw-green-soft);
    color: var(--sgcw-green-dark);
    font-weight: 700;
}

.sgcw-rules__nav {
    margin: 24px 0;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--sgcw-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(23, 64, 37, .08);
}

.sgcw-rules__nav h2 {
    margin: 0 0 16px !important;
    padding: 0 !important;
    color: var(--sgcw-green-dark) !important;
    font-size: clamp(21px, 3vw, 28px) !important;
    line-height: 1.2 !important;
}

.sgcw-rules__nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sgcw-rules__nav-grid a {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 9px 11px 9px 9px;
    border: 1px solid var(--sgcw-border);
    border-radius: 12px;
    background: var(--sgcw-green-soft);
    color: var(--sgcw-text);
    font-size: .9em;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.sgcw-rules__nav-grid a:hover,
.sgcw-rules__nav-grid a:focus {
    transform: translateY(-1px);
    border-color: var(--sgcw-green);
    box-shadow: 0 5px 14px rgba(0, 136, 50, .12);
}

.sgcw-rules__nav-grid b {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-right: 9px;
    place-items: center;
    border-radius: 50%;
    background: var(--sgcw-green);
    color: #fff;
    font-size: 1.02em;
}

.sgcw-rules__content { display: grid; gap: 20px; }

.sgcw-section,
.sgcw-rule {
    scroll-margin-top: 24px;
    position: relative;
    padding: clamp(20px, 3.2vw, 34px);
    border: 1px solid var(--sgcw-border);
    border-left: 6px solid var(--sgcw-green);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(23, 64, 37, .07);
}

.sgcw-section--soft { background: linear-gradient(180deg, #fff, var(--sgcw-green-pale)); }

.sgcw-section__heading,
.sgcw-rule__heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}

.sgcw-section__heading > span,
.sgcw-rule__heading > span {
    display: grid;
    flex: 0 0 clamp(46px, 7vw, 58px);
    width: clamp(46px, 7vw, 58px);
    height: clamp(46px, 7vw, 58px);
    place-items: center;
    border-radius: 50%;
    background: var(--sgcw-green);
    color: #fff;
    font-size: clamp(19px, 3vw, 26px);
    font-weight: 850;
    line-height: 1;
}

.sgcw-section h2,
.sgcw-rule h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--sgcw-green-dark) !important;
    font-size: clamp(23px, 3.5vw, 33px) !important;
    line-height: 1.16 !important;
}

.sgcw-section h3,
.sgcw-rule h3 {
    margin: 26px 0 8px !important;
    padding: 0 !important;
    color: var(--sgcw-green-dark) !important;
    font-size: clamp(19px, 2.5vw, 25px) !important;
    line-height: 1.22 !important;
}

.sgcw-section h4,
.sgcw-rule h4 {
    margin: 22px 0 6px !important;
    color: var(--sgcw-green-dark) !important;
    font-size: 1.08em !important;
}

.sgcw-section p,
.sgcw-rule p { margin: 0 0 14px; }

.sgcw-section ul,
.sgcw-section ol,
.sgcw-rule ul,
.sgcw-rule ol {
    margin: 0 0 16px 1.1em;
    padding-left: 1.1em;
}

.sgcw-section li,
.sgcw-rule li { margin: 7px 0; }

.sgcw-alpha {
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid var(--sgcw-border);
    border-radius: 10px;
    background: var(--sgcw-green-pale);
}

.sgcw-alpha > strong {
    display: block;
    margin-bottom: 7px;
    color: var(--sgcw-green-dark);
    font-size: 1.03em;
}

.sgcw-penalty {
    margin-top: 18px !important;
    padding: 12px 14px;
    border-left: 4px solid var(--sgcw-red);
    border-radius: 8px;
    background: #fff1f1;
    color: #9f1119;
    font-weight: 850;
}

.sgcw-info {
    margin: 14px 0;
    padding: 12px 14px;
    border-left: 4px solid #4c77a8;
    border-radius: 8px;
    background: var(--sgcw-blue-soft);
}

.sgcw-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--sgcw-green-soft);
    color: var(--sgcw-green-dark) !important;
    font-size: .84em;
    font-weight: 750;
    text-decoration: none !important;
}
.sgcw-back::before { content: "↑"; margin-right: 6px; }

.sgcw-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 12px 0 22px;
    -webkit-overflow-scrolling: touch;
}

.sgcw-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .94em;
}

.sgcw-table th,
.sgcw-table td {
    padding: 10px 12px;
    border: 1px solid var(--sgcw-border);
    text-align: left;
    vertical-align: top;
}

.sgcw-table th { background: var(--sgcw-green); color: #fff; }
.sgcw-table tbody tr:nth-child(even) { background: var(--sgcw-green-soft); }

.sgcw-kv {
    display: grid;
    grid-template-columns: minmax(150px, 230px) 1fr;
    gap: 8px 18px;
    margin: 8px 0 18px;
}
.sgcw-kv dt { font-weight: 800; color: var(--sgcw-green-dark); }
.sgcw-kv dd { margin: 0; }

.sgcw-rule-index {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 22px;
}
.sgcw-rule-index a {
    padding: 8px 9px;
    border: 1px solid var(--sgcw-border);
    border-radius: 9px;
    background: var(--sgcw-green-soft);
    font-size: .83em;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

.sgcw-rules__source {
    margin: 18px 0 0;
    padding: 16px;
    border-radius: 10px;
    background: #f3f5f3;
    color: #536158;
    font-size: .88em;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .sgcw-rules__nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sgcw-rule-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .sgcw-rules { font-size: 16px; }
    .sgcw-rules__hero, .sgcw-rules__nav, .sgcw-section, .sgcw-rule { border-radius: 12px; }
    .sgcw-section, .sgcw-rule { border-left-width: 4px; }
    .sgcw-section__heading, .sgcw-rule__heading { align-items: flex-start; gap: 10px; }
    .sgcw-rules__nav-grid { grid-template-columns: 1fr; }
    .sgcw-rule-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sgcw-kv { grid-template-columns: 1fr; gap: 2px; }
    .sgcw-kv dd { margin-bottom: 9px; }
    .sgcw-table-wrap { margin-left: -8px; width: calc(100% + 16px); }
}

@media (max-width: 390px) {
    .sgcw-rule-index { grid-template-columns: 1fr; }
}

@media print {
    .sgcw-rules__nav, .sgcw-rule-index, .sgcw-back { display: none !important; }
    .sgcw-rules__hero, .sgcw-section, .sgcw-rule { box-shadow: none; break-inside: avoid; }
}
