.gm-reward-page {
    --reward-ink: #264651;
    --reward-muted: #52655e;
    --reward-edge: #ccd7c6;
    --reward-paper: #fffdf7;
    --reward-wash: #f0f3e8;
    --reward-blue: #30525e;
    margin: 14px 0;
    color: var(--reward-ink);
    font-size: 14px;
    line-height: 1.5;
}

.gm-reward-page h1,
.gm-reward-page h2 {
    margin: 0;
    color: var(--reward-ink);
    font-family: Georgia, serif;
    font-weight: 400;
    line-height: 1.15;
}

.gm-reward-page h1 { font-size: clamp(25px, 4vw, 38px); }
.gm-reward-page h2 { font-size: 21px; }
.gm-reward-page p { margin: 8px 0 0; }
.gm-reward-page small,
.gm-reward-page .gm-reward-muted { color: var(--reward-muted); }

.gm-reward-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(215px, 1fr);
    gap: 22px;
    align-items: center;
    padding: clamp(14px, 3vw, 27px);
    border: 1px solid var(--reward-edge);
    border-radius: 7px;
    background: linear-gradient(112deg, #f6f0df, var(--reward-wash) 72%);
}

.gm-reward-action {
    padding: 14px 16px;
    border: 1px solid var(--reward-edge);
    border-radius: 5px;
    background: var(--reward-paper);
}

.gm-reward-action > :first-child { margin-top: 0; }
.gm-reward-action > small { display: block; margin-top: 5px; }

.gm-reward-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 13px;
    margin-top: 13px;
    align-items: start;
}

.gm-reward-panel {
    min-width: 0;
    padding: clamp(13px, 2vw, 19px);
    border: 1px solid var(--reward-edge);
    border-radius: 6px;
    background: var(--reward-paper);
}

.gm-reward-panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: baseline;
    justify-content: space-between;
}

.gm-reward-steps {
    margin: 10px 0 0;
    padding-inline-start: 19px;
}

.gm-reward-steps li + li { margin-top: 7px; }
.gm-reward-steps li::marker { color: #7d5728; font-weight: bold; }

.gm-reward-page :is(a, button).gm-reward-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 35px;
    max-width: 100%;
    padding: 7px 12px;
    margin: 10px 0 0;
    border: 1px solid #294651;
    border-radius: 4px;
    background: var(--reward-blue);
    color: #fff9e9;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.gm-reward-page :is(a, button).gm-reward-button:hover {
    background: #3e636e;
    color: #fff9e9;
    text-decoration: none;
}

.gm-reward-page :is(a, button).gm-reward-button-secondary {
    border-color: var(--reward-edge);
    background: var(--reward-wash);
    color: var(--reward-ink);
}

.gm-reward-page :is(a, button).gm-reward-button-secondary:hover {
    background: #dfe8db;
    color: var(--reward-ink);
}

.gm-reward-page :is(a, button, input, select):focus-visible {
    outline: 2px solid #916732;
    outline-offset: 2px;
}

.gm-reward-status {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #c6d8c0;
    border-radius: 4px;
    background: #e9f1df;
    color: #375d3d;
    font-size: 12px;
}

.gm-reward-status-wait,
.gm-reward-notice {
    border: 1px solid #ded1af;
    border-radius: 4px;
    background: #f7efdb;
    color: #634923;
}

.gm-reward-notice { padding: 7px 9px; }

.gm-reward-history,
.gm-gift-items {
    padding: 0;
    margin: 12px 0 0;
    list-style: none;
}

.gm-reward-history > li {
    padding: 9px 10px;
    border: 1px solid var(--reward-edge);
    border-radius: 4px;
    background: var(--reward-wash);
}

.gm-reward-history > li + li { margin-top: 7px; }
.gm-reward-history time { margin-right: 4px; }
.gm-reward-history code { overflow-wrap: anywhere; }

.gm-reward-item {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--reward-edge);
    border-radius: 5px;
    background: var(--reward-paper);
}

.gm-reward-icon {
    display: grid;
    flex: none;
    place-items: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 3px;
    border: 1px solid #cbbb97;
    border-radius: 4px;
    background: #eee6d1;
}

.gm-reward-icon img { display: block; width: 100%; height: auto; }
.gm-vote-item { width: fit-content; margin-top: 12px; }
.gm-vote-item-icon {
    display: block;
    flex: none;
    width: 52px;
    height: auto;
    filter: drop-shadow(0 1px 2px #9d8879);
}
.gm-vote-item small { display: block; }

.gm-gift-hero { grid-template-columns: minmax(0, 1fr) auto; }
.gm-gift-hero-art { width: clamp(60px, 12vw, 112px); height: auto; }
.gm-gift-items { display: grid; gap: 7px; }
.gm-gift-items li { background: var(--reward-wash); }
.gm-gift-quantity { margin-inline-start: auto; color: var(--reward-muted); }

.gm-reward-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 9px;
    margin-top: 10px;
}

.gm-reward-form > div { flex: 1 1 150px; min-width: 0; }
.gm-reward-form label { display: block; margin-bottom: 4px; font-weight: 700; }
.gm-reward-form :is(input, select):not([type=hidden]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 35px;
    padding: 6px 8px;
    border: 1px solid #adbcae;
    border-radius: 4px;
    background: var(--reward-paper);
    color: var(--reward-ink);
    font: inherit;
}

.gm-reward-form button.gm-reward-button { margin: 0; }
.gm-reward-page .gm-reward-back {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 14px;
    margin: 13px 0 0;
}

@media (max-width: 610px) {
    .gm-reward-hero:not(.gm-gift-hero),
    .gm-reward-columns { grid-template-columns: minmax(0, 1fr); }
    .gm-reward-hero { gap: 12px; }
}
