* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #f5f7f4;
    color: #202220;
    font-family: Arial, Helvetica, sans-serif;
}

button {
    font: inherit;
}

button {
    cursor: pointer;
}

.controlShell {
    min-height: 100%;
    padding: 14px;
}

.topbar {
    position: relative;
    min-height: 68px;
    padding: 10px 118px 10px 0;
}

.eyebrow {
    margin: 0 0 3px;
    color: #d04d3b;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #171817;
    font-size: 34px;
    line-height: 1;
}

.topbarActions {
    position: absolute;
    right: 0;
    top: 12px;
    width: 110px;
    text-align: right;
}

.networkStatus {
    display: block;
    margin-bottom: 8px;
    overflow: hidden;
    color: #59615d;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.backLink {
    display: inline-block;
    min-width: 64px;
    padding: 9px 12px;
    border: 1px solid #c5ccc6;
    border-radius: 8px;
    background: #ffffff;
    color: #171817;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.mainStack {
    max-width: 560px;
    margin: 0 auto;
}

.counterPanel {
    margin: 6px 0 12px;
    padding: 16px;
    border: 1px solid #d3d8d2;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.remainingCount {
    color: #168b76;
    font-size: 56px;
    font-weight: bold;
    line-height: 0.9;
}

.remainingLabel {
    margin-top: 5px;
    color: #59615d;
    font-size: 15px;
    font-weight: bold;
}

.emojiPanel {
    padding: 12px;
    border: 1px solid #d3d8d2;
    border-radius: 8px;
    background: #ffffff;
}

.emojiPicker {
    margin: -5px;
    font-size: 0;
}

.emojiGroup {
    margin-bottom: 12px;
}

.emojiGroup:last-child {
    margin-bottom: 0;
}

.emojiGroupTitle {
    margin: 7px 5px 6px;
    color: #59615d;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: uppercase;
}

.emojiGroupButtons {
    font-size: 0;
}

.emojiButton {
    display: inline-block;
    width: 25%;
    min-height: 62px;
    padding: 4px;
    border: 0;
    background: transparent;
    vertical-align: top;
}

.emojiButton span {
    display: block;
    min-height: 54px;
    padding: 6px 0;
    border: 1px solid #cfd8d5;
    border-radius: 8px;
    background: #edf3f1;
    color: #111111;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Arial, sans-serif;
    font-size: 34px;
    line-height: 1.18;
    text-align: center;
}

.emojiButton:active span {
    background: #dceae6;
}

.emojiButton.selected span {
    border-color: #168b76;
    background: #d9f0e9;
    box-shadow: inset 0 0 0 3px #168b76;
}

.emojiButton.selected:active span {
    background: #c9e6de;
}

.emojiButton[disabled] span {
    opacity: 0.45;
}

.statusText {
    min-height: 22px;
    margin: 12px 2px 0;
    color: #59615d;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
}

body.limitReached .counterPanel {
    background: #fff6e2;
    border-color: #e8cf92;
}

body.limitReached .remainingCount {
    color: #d04d3b;
}

@media (min-width: 500px) {
    .emojiButton {
        width: 16.666%;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 28px;
    }

    .emojiButton {
        min-height: 56px;
    }

    .emojiButton span {
        min-height: 48px;
        font-size: 29px;
    }
}
