/* 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 */

/* ==========================================================================
   Hawaii Rulebook Theme & Layout
   ========================================================================== */

#rules.hawaii-rules,
.rules.hawaii-rules {
    box-sizing: border-box;
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 34px 44px;
    background: linear-gradient(180deg, #fffdf8 0%, #f9f3e3 100%);
    color: #262118;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.65;
    border-radius: 14px;
    border: 1px solid #dfd1b0;
    box-shadow: 0 8px 28px rgba(34, 28, 16, 0.08);
    overflow-wrap: break-word;
}

#rules.hawaii-rules *,
.rules.hawaii-rules * {
    box-sizing: border-box;
}

.hawaii-rules img {
    max-width: 100%;
    height: auto;
}

/* Cover Banner & Sidebar Title */
#rules.hawaii-rules .cover {
    width: 100%;
    max-width: 540px;
    margin: 0 auto 20px;
    text-align: center;
}

#rules.hawaii-rules .cover img {
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(20, 62, 77, 0.18);
    border: 2px solid #d5c195;
}

.hawaii-rules .gameTitle {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65em;
    font-weight: 700;
    color: #0e4b5c;
    text-align: center;
    letter-spacing: 0.04em;
    margin: 4px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d7c397;
}

/* Flavor / Intro Box */
.hawaii-rules .description {
    background: linear-gradient(135deg, rgba(16, 92, 112, 0.08) 0%, rgba(214, 179, 106, 0.16) 100%);
    border-left: 4px solid #13687d;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 0 22px;
    color: #2f3b3c;
    font-style: italic;
}

.hawaii-rules .description p {
    margin: 0 0 8px;
}

.hawaii-rules .description p:last-child {
    margin-bottom: 0;
}

/* Table of Contents (.content) */
.hawaii-rules .content {
    background: #f4ebd4;
    border: 1px solid #d5c299;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 0 0 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hawaii-rules .hw-toc-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08em;
    font-weight: 700;
    color: #0e4b5c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d8c69f;
}

.hawaii-rules .content ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.hawaii-rules .content li {
    margin: 4px 0;
    padding: 0;
}

.hawaii-rules .content a.internal_anchor {
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    color: #0f4c5c;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hawaii-rules .content a.internal_anchor:hover {
    background: rgba(15, 76, 92, 0.11);
    color: #072f3a;
    text-decoration: none;
}

/* Rule Deviations / Yucata Specifics (.deviation) */
.hawaii-rules .deviation {
    background: linear-gradient(135deg, #fff5e4 0%, #fde9c9 100%);
    border: 1px solid #e0a958;
    border-left: 5px solid #c96a1b;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 0 0 28px;
    box-shadow: 0 3px 10px rgba(180, 98, 24, 0.08);
}

.hawaii-rules .deviation h2 {
    margin: 0 0 10px;
    padding: 0;
    border: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2em;
    color: #8c3f08;
}

.hawaii-rules .deviation ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.hawaii-rules .deviation li {
    margin: 6px 0;
    color: #3a2612;
}

/* Chapters & Headings */
.hawaii-rules .chapter {
    margin: 0 0 30px;
    padding-top: 4px;
}

.hawaii-rules .chapter h1,
.hawaii-rules .chapter h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.42em;
    font-weight: 700;
    color: #0d4a5a;
    margin: 0 0 14px;
    padding: 8px 14px;
    background: linear-gradient(90deg, rgba(15, 86, 105, 0.11) 0%, rgba(15, 86, 105, 0.02) 100%);
    border-left: 4px solid #0f5c70;
    border-bottom: 1px solid #d8c7a0;
    border-radius: 0 8px 8px 0;
    line-height: 1.3;
}

.hawaii-rules .chapter h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.16em;
    font-weight: 700;
    color: #704214;
    margin: 20px 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #d3be92;
}

.hawaii-rules .chapter h4 {
    font-size: 1.03em;
    font-weight: 700;
    color: #125163;
    margin: 14px 0 6px;
}

.hawaii-rules p {
    margin: 0 0 12px;
}

/* Standard Lists inside Chapters */
.hawaii-rules .chapter ul {
    list-style-type: disc;
    margin: 0 0 14px;
    padding-left: 22px;
}

.hawaii-rules .chapter ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.hawaii-rules .chapter li {
    margin: 6px 0;
}

.hawaii-rules .chapter li::marker {
    color: #13687d;
    font-weight: 700;
}

/* Inline Resource / Component Icons */
.hawaii-rules .hw-inline-icon {
    display: inline-block;
    vertical-align: middle;
    max-height: 1.85em;
    width: auto;
    margin: 0 2px;
}

/* Callout Notes & Summary Boxes */
.hawaii-rules .hw-note {
    background: #eef6f7;
    border: 1px solid #b6d4da;
    border-left: 4px solid #196f84;
    border-radius: 8px;
    padding: 11px 15px;
    margin: 12px 0 16px;
    font-size: 0.96em;
    color: #1d3840;
}

.hawaii-rules .hw-note p:last-child {
    margin-bottom: 0;
}

.hawaii-rules .hw-summary-box {
    background: #faf1dc;
    border: 1px solid #d5bd8a;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 16px 0;
}

.hawaii-rules .hw-summary-box h3 {
    margin-top: 0;
    color: #5b3710;
    border-bottom-color: #d5bd8a;
}

.hawaii-rules .hw-summary-box ul {
    margin-bottom: 0;
}

/* Examples & Figures */
.hawaii-rules .example {
    font-style: normal;
    background: #f5efe0;
    border: 1px solid #d6c59e;
    border-left: 4px solid #8a6d3b;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 14px 0 18px;
    color: #362c1c;
}

.hawaii-rules .example strong {
    color: #5a3e14;
}

.hawaii-rules .hw-rule-figure {
    margin: 14px auto;
    padding: 12px;
    background: #fffdf9;
    border: 1px solid #ded0b1;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hawaii-rules .hw-rule-figure img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.hawaii-rules .hw-figure-caption {
    margin-top: 8px;
    font-size: 0.92em;
    color: #4f4330;
    text-align: left;
}

/* Setup Fruit Distribution Cards & Round Marker Strip */
.hawaii-rules .hw-fruit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 6px;
}

.hawaii-rules .hw-fruit-card {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fffdf7;
    border: 1px solid #d9c8a1;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.hawaii-rules .hw-fruit-title {
    font-weight: 700;
    color: #0e4b5c;
    font-size: 0.98em;
    white-space: nowrap;
}

.hawaii-rules .hw-fruit-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 26px;
}

.hawaii-rules .hw-fruit-icons img {
    height: 22px;
    width: auto;
    display: block;
}

.hawaii-rules .hw-realm-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 6px 12px;
}

.hawaii-rules .hw-realm-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hawaii-rules .hw-realm-preview-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #4f4330;
}

.hawaii-rules .hw-round-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 18px;
}

.hawaii-rules .hw-round-card {
    flex: 1 1 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    background: #fffdf7;
    border: 1px solid #d9c8a1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95em;
}

.hawaii-rules .hw-round-title {
    font-weight: 700;
    color: #0e4b5c;
    font-size: 1.02em;
}

.hawaii-rules .hw-round-card img {
    max-height: 62px;
    width: auto;
    display: block;
    border-radius: 4px;
}

.hawaii-rules .hw-round-sub {
    font-size: 0.92em;
    color: #3a2e1e;
    white-space: nowrap;
}

/* Section 14 & 15: Tile & Island Reference Cards */
.hawaii-rules .hw-tile-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 22px;
}

.hawaii-rules .hw-tile-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fffdf8;
    border: 1px solid #dccba6;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(34, 28, 16, 0.04);
}

.hawaii-rules .hw-tile-art {
    flex: 0 0 150px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f6eedb;
    border: 1px solid #e2d3b1;
    border-radius: 8px;
    padding: 8px;
}

.hawaii-rules .hw-tile-art img {
    max-height: 68px;
    width: auto;
    border-radius: 4px;
}

.hawaii-rules .hw-tile-body {
    flex: 1 1 auto;
    min-width: 0;
}

.hawaii-rules .hw-tile-body h4 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08em;
    color: #0e4b5c;
}

.hawaii-rules .hw-tile-body p {
    margin: 0 0 8px;
}

.hawaii-rules .hw-tile-body p:last-child {
    margin-bottom: 0;
}

/* Island Reference Cards (Section 15) */
.hawaii-rules .hw-island-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 16px;
}

.hawaii-rules .hw-island-card {
    flex: 1 1 46%;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fffdf8;
    border: 1px solid #dccba6;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(34, 28, 16, 0.04);
}

.hawaii-rules .hw-island-art {
    flex: 0 0 108px;
    text-align: center;
}

.hawaii-rules .hw-island-art img {
    max-width: 100%;
    max-height: 76px;
    height: auto;
    display: inline-block;
}

.hawaii-rules .hw-island-body {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.96em;
}

.hawaii-rules .hw-island-cost {
    display: inline-block;
    font-weight: 700;
    font-size: 0.86em;
    color: #0d4a5a;
    background: #e4f1f4;
    border: 1px solid #b4d5dd;
    border-radius: 999px;
    padding: 1px 9px;
    margin-bottom: 5px;
}

.hawaii-rules .hw-island-body p {
    margin: 0;
}

/* ==========================================================================
   Sidebar (#panelRules) & Mobile Responsive Adaptation
   ========================================================================== */

@media (max-width: 720px) {
    #rules.hawaii-rules,
    .rules.hawaii-rules {
        padding: 16px 14px 28px;
        font-size: 14.5px;
    }

    .hawaii-rules .hw-tile-card {
        flex-direction: column;
        gap: 10px;
    }

    .hawaii-rules .hw-tile-art {
        flex: 0 0 auto;
        width: 100%;
    }

    .hawaii-rules .hw-island-card {
        flex: 1 1 100%;
        min-width: 0;
    }
}

#panelRules #rules.hawaii-rules,
#panelRules .hawaii-rules {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 10px 10px 20px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

#panelRules .hawaii-rules .content {
    padding: 10px 12px;
    margin-bottom: 16px;
}

#panelRules .hawaii-rules .content a.internal_anchor {
    padding: 4px 6px;
    font-size: 0.93em;
}

#panelRules .hawaii-rules .deviation {
    padding: 10px 12px;
    margin-bottom: 18px;
}

#panelRules .hawaii-rules .chapter {
    margin-bottom: 20px;
}

#panelRules .hawaii-rules .chapter h1,
#panelRules .hawaii-rules .chapter h2 {
    font-size: 1.15em;
    padding: 6px 10px;
    margin-bottom: 10px;
}

#panelRules .hawaii-rules .chapter h3 {
    font-size: 1.04em;
    margin: 14px 0 6px;
}

#panelRules .hawaii-rules .chapter ul,
#panelRules .hawaii-rules .chapter ol {
    padding-left: 18px;
}

#panelRules .hawaii-rules .hw-fruit-card,
#panelRules .hawaii-rules .hw-round-card {
    flex: 1 1 100%;
    min-width: 0;
    padding: 6px 8px;
}

#panelRules .hawaii-rules .hw-tile-card {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

#panelRules .hawaii-rules .hw-tile-art {
    flex: 0 0 auto;
    width: 100%;
    padding: 6px;
}

#panelRules .hawaii-rules .hw-tile-art img {
    max-height: 52px;
}

#panelRules .hawaii-rules .hw-island-card {
    flex: 1 1 100%;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
}

#panelRules .hawaii-rules .hw-island-art {
    flex: 0 0 auto;
    width: 100%;
}
