@charset "UTF-8";

@import url('https://fonts.googleapis.com/css?family=Lexend+Exa&display=swap');

/*
* Reset
* ================================== */
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
html {
  line-height: 1.15;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%; }

body {
  margin: 0; }

article, aside, footer, header, nav, section {
  display: block; }

h1 {
  font-size: 2em;
  margin: .67em 0; }

figcaption, figure, main {
  display: block; }

figure {
  margin: 1em 40px; }

hr {
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
  height: 0;
  overflow: visible; }

pre {
  font-family: monospace,monospace;
  font-size: 1em; }

a {
  background-color: transparent;
  -webkit-text-decoration-skip: objects; }

abbr[title] {
  border-bottom: 0;
  text-decoration: underline;
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted; }

b, strong {
  font-weight: inherit; }

b, strong {
  font-weight: bolder; }

code, kbd, samp {
  font-family: monospace,monospace;
  font-size: 1em; }

dfn {
  font-style: italic; }

mark {
  background-color: #ff0;
  color: #000; }

small {
  font-size: 80%; }

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline; }

sub {
  bottom: -0.25em; }

sup {
  top: -0.5em; }

audio, video {
  display: inline-block; }

audio:not([controls]) {
  display: none;
  height: 0; }

img {
  border-style: none; }

svg:not(:root) {
  overflow: hidden; }

button, input, optgroup, select, textarea {
  font-family: sans-serif;
  font-size: 100%;
  line-height: 1.15;
  margin: 0; }

button, input {
  overflow: visible; }

button, select {
  text-transform: none; }

button, html [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button; }

button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0; }

button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText; }

fieldset {
  padding: .35em .75em .625em; }

legend {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal; }

progress {
  display: inline-block;
  vertical-align: baseline; }

textarea {
  overflow: auto; }

[type="checkbox"], [type="radio"] {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0; }

[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
  height: auto; }

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px; }

[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration {
  -webkit-appearance: none; }

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit; }

details, menu {
  display: block; }

summary {
  display: list-item; }

canvas {
  display: inline-block; }

template {
  display: none; }

[hidden] {
  display: none; }

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

ol,
ul {
  list-style: none; }

blockquote,
q {
  quotes: none; }
blockquote :before,
blockquote :after,
q :before,
q :after {
  content: '';
  content: none; }

table {
  border-collapse: collapse;
  border-spacing: 0;
  empty-cells: show; }

*,
:before,
:after {
  border: 0;
  outline: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box; }

html {
  font-size: 62.5%;
  width: 100%;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%; }

body {
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 60px 5% 40px;
  color: #444;
  background: #f3f3f3;
  font-family: 'Lexend Exa', '游ゴシック Medium', 'Yu Gothic Medium', YuGothic, '游ゴシック体', '游ゴシック', "Hiragino Kaku Gothic ProN", 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, sans-serif;
  -webkit-font-feature-settings: 'palt' 1;
  font-feature-settings: 'palt' 1;
}

.header {
  text-align: center;
}

.grid {
  max-width: 320px;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -ms-flex-pack: center; /*IE*/
  -webkit-box-pack: center;
          justify-content: center;
}

.card {
  position: relative;
  cursor: pointer;
  margin: 5px;
}

.card,
.front,
.back {
  height: 60px;
  width: 60px;
  -webkit-transition: all .5s ease;
  -o-transition: all .5s ease;
  transition: all .5s ease;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}

.front,
.back {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #fff;
  border-radius: 16px;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.front {
  background: #e0104e;
  overflow: hidden;
}

.back {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  background-color: #158bc2;
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.selected {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}

.match {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}

.message {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  font-size: 1.6rem;
  letter-spacing: .05em;
  text-align: center;
}

.reset {
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  background: none;
  display: block;
  color: #444;
  margin: 1rem auto 0;
  font-size: 1.5em;
  border-radius: 2em;
  letter-spacing: .05em;
  cursor: pointer;
  text-align: center;
}


@media only screen and (min-width: 600px) {
  .grid {
    max-width: 400px;
  }

  .card {
    margin: 10px;
  }

  .card,
  .front,
  .back {
    height: 80px;
    width: 80px;
  }

  .message {
    font-size: 2rem;
  }

  .reset {
    display: inline-block;
    margin: 0 0 0 2rem;
  }
}
