/* add all special styles used for displaying the rules */
/* .rules: used for all elements loading rules (rules at main site, rules ingame, popup with rules extract
   #rules: div with complete rules used at main site
   #rulesPage: ingame rules page display
   #panelRules: ingame rules sidepanel display
   #popup.rules: popup with rules extract only */


/* add special fonts if wanted */

/* add styles for headers h1-h5 if needed*/

/* cover picture only in main rules */
#rules .cover {    width: 60%;    margin-left: 20%;}
#panelRules .cover {    display: none;}

.rules .content ul {list-style-type: none;}

/* flex style for responsive display */
.rules .flex { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5em; }
@media (max-width: 768px) {
    .rules .flex.mobile { flex-direction: column; /* columns below each other */  }
}
#panelRules .flex.mobile { flex-direction: column; }
.rules .flex .column {    flex: 1; }
.rules .flex .column.wide {    flex: 2; }


/* example variable flex structure putting flexboxes half their wide on wide screen full rules
.rules  .flex.appendix .flexbox { flex: 2 2 23%;  padding:0.5em; padding-right: 1em;}
.rules  .flex.appendix .flexbox img { height:5em; float: left; margin-right: 1em; }
@media (max-width: 1024px) {
    .rules .flex.appendix .flexbox { flex: 2 2 48%; }
}
#panelRules .flex.appendix .flexbox { flex: 2 2 48%; }
*/


/* Examples */
.rules .example { font-style: italic; } /* put your example style here */
#panelRules .example { display: none; } /* examples should not be shown in sidebar */

.gm-rules {
    --ink:#263a2e;
    --green:#3f624b;
    box-sizing:border-box;
    max-width:980px;
    margin:0 auto;
    padding:clamp(12px,4vw,38px);
    color:var(--ink);
    background:#fffcf4;
    font:16px/1.65 system-ui,sans-serif;
    overflow-wrap:anywhere
}
.gm-rules * {
    box-sizing:border-box
}
.gm-rules h2 {
    font-family:Georgia,serif;
    color:#34553e;
    font-size:clamp(22px,3.5vw,32px);
    line-height:1.2;
    margin:1.5em 0 .6em;
    border-bottom:1px solid #ced9be;
    padding-bottom:.3em
}
.gm-rules h1 {
    font-size:clamp(28px,5vw,44px);
    margin-top:0;
    border:0
}
.gm-rules h3 {
    font-size:20px;
    color:#34553e
}
.gm-rules p {
    margin:.7em 0;
    text-align:left
}
.gm-rules img {
    max-width:100%;
    height:auto;
    object-fit:contain;
    vertical-align:middle;
    border-radius:5px
}
.gm-rules .gm-rule-pairs {
    margin:12px 0
}
.gm-rules .flex.mobile > .column {
    min-width:0;
    padding:8px
}
#panelRules .gm-rules .noSidebar {
    display:none
}
.gm-rules ul,.gm-rules ol {
    padding-left:1.4em
}
.gm-rules li {
    margin:.45em 0
}
.gm-rules hr {
    border:0;
    border-top:1px solid #d7dfcd;
    margin:24px 0
}
.gm-rules .gm-rule-nav {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    background:#e9eedf;
    padding:12px;
    border-radius:8px
}
.gm-rules .gm-rule-nav a {
    color:#34553e;
    text-decoration:none;
    font-size:13px;
    border:1px solid #becdb2;
    border-radius:16px;
    padding:4px 10px;
    background:#fffcf4
}
#panelRules .gm-rules {
    font-size:14px;
    padding:12px
}
#panelRules .gm-rules table,#panelRules .gm-rules tbody,#panelRules .gm-rules tr,#panelRules .gm-rules .flex.mobile > .column {
    display:block;
    width:100%
}
#panelRules .gm-rules h2 {
    font-size:23px
}
@media(max-width:600px) {
    .gm-rules table,.gm-rules tbody,.gm-rules tr,.gm-rules .flex.mobile > .column {
        display:block;
        width:100%
    }
    .gm-rules {
        font-size:15px
    }
    .gm-rules .flex.mobile > .column {
        padding:6px 0
    }
}
