* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #353140;
  color: #fdfdfa;
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* Typography */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { font-size: 1rem; }

h1, h2, h3, h4, h5, h6 {
  padding: 1rem 0;
}

a {
  color: #9bdf77;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #59fb00;
  text-decoration: none;
}

/* HEADER */

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  padding: 0 2rem;
  background-color: #1e1c28;
  border-bottom: 1px solid #1e1c28;
}

header a {
  color: #fdfdfa;
}

header a:hover {
  color: white;
}

.header-left {
  display: flex;
  align-items: flex-end;
  position: relative;
  top: 0.2rem;
}

.logo {
  position: relative;
  top: 0.375rem;
}

.logo img {
  width: 1.5rem;
  height: auto;
  margin-right: 0.375rem;
  margin-bottom: 0;
}

.logo h2 {
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: -1px;
  color: #02aec6;
  font-weight: 500;
  padding: 0;
  margin-bottom: 0;
}

.desktop-nav {
    display: none;
}

nav {
  display: flex;
  align-items: flex-end;
}

nav ul {
  display: flex;
  align-items: flex-end;
  list-style-type: none;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: -1px;
  padding: 0;
  margin: 0;
}

nav ul li {
  margin-left: 0.75rem;
  margin-bottom: -1px;
}

/* Hamburger icon initially hidden */

.hamburger {
    display: none;
}

.profile-icon {
  position: relative;
  bottom: 0.175rem;
  margin-left: 0.75rem;
}

.authenticated-icon {
    color: #02aec6;
}

.dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  min-width: 120px;
  background-color: #474256;
  color: #fdfdfa;
  padding: 0;
  margin-top: 0;
}

.dropdown-item {
  color: #fdfdfa;
}

.dropdown-item:first-of-type {
  padding-top: 0.5rem;
}

.dropdown-item:hover {
  background-color: #353140;
  color: #59fb00;
}

/* BASIC STRUCTURE */

/* Content Container */
.content-container {
  flex: 1 1 auto;
  margin: 0 auto;
}

.content-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1.75rem 2rem 1rem;
  color: black;
}

.content-top h2 {
  font-family: 'Josefin Sans', sans-serif;
  padding: 0;
  font-weight: bold;
}

.content-top p {
  margin-top: 0.35rem;
  margin-bottom: 0.875rem;
}

.content-bottom {
  display: block;
  padding: 2rem 2rem 1rem;
  max-width: 1020px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

/* INDEX VIEW */

.index-slide {
  max-width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin: 0 auto;
}

.index-slide img {
  width: 250px;
  height: auto;
  padding: 2rem;
}

.index-slide.top {

}

.index-slide.bottom {
  text-align: right;
}

.index-slide.middle p {
  max-width: 80%;
  text-align: center;
  padding: 0.75rem 1.5rem;
  margin: 1.5rem auto 2rem;
  background-color: #fdfdfa;
  color: #1e1c28;
  font-size: 1.125rem;
}

.index-slide a {
  font-family: 'Josefin Sans', 'Sans-Serif';
}

.index-slide.middle a {
  color: #7cb25f;
}

.index-slide a:hover {
  color: #59fb00;
  text-decoration: none;
}

.index-slide-text {
  max-width: 60%;
}

.top .index-slide-text {
  padding-left: 2rem;
}

.bottom .index-slide-text {
  padding-right: 2rem;
}

/* COLLECTION VIEW */

.splash {
  position: relative;
}

.splash::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.splash.classic {
  background-image: url('../../assets/bg-orange.webp');
}

.splash.classic::before {
  background-color: rgba(255, 255, 235, 0.6);
}

.splash.contemporary {
  background-image: url('../../assets/bg-blue.webp');
}

.splash.contemporary::before {
  background-color: rgba(200, 255, 245, 0.6);
}

.splash.smoothreader {
  background-image: url('../../assets/bg-green.webp');
}

.splash.smoothreader::before {
  background-color: rgba(225, 255, 225, 0.6);
}

.splash.profile {
  background-image: url('../../assets/bg-purple.webp');
}

/* Ensure content on top of the overlay is visible */
.splash.classic *, .splash.contemporary *, .splash.smoothreader *, .splash.profile * {
  position: relative;
  z-index: 2;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #1e1c28;
}

.book-item img {
  width: 100px;
  height: auto;
  border-radius: 2px;
}

.book-item h3 {
  padding-top: 0;
}

.book-info {
  display: flex;
  flex-direction: column;
}

.book-info p {
  margin-bottom: 0.25rem;
}

.book-info p:last-of-type {
  margin-bottom: 0;
}

.page-title {
  padding-bottom: 1rem;
}

/* WORK INTRO VIEW */

.intro.splash.classic::before {
  background-color: rgba(255, 255, 235, 0.9);
}

.intro.splash.contemporary::before {
  background-color: rgba(225, 255, 250, 0.85);
}

.work-intro {
  display: flex;
  padding-bottom: 0.5rem;
  align-items: center;
}

.work-intro-left p {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.work-intro-right {
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
  margin: auto 0;
}

.work-intro img {
  width: 200px;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5); /* Horizontal offset, Vertical offset, Blur radius, Shadow color */
}

#search-button {
  margin-top: 0.5rem;
  align-self: flex-end;
}

.work-intro .flex-gap-container {
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.25rem;
}

.work-intro .credits {
  min-width: 160px;
  max-width: 240px;
  margin-top: 0.125rem;
}

.work-intro .credits p {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.splash.contemporary a, .work-intro a {
  color: #2b7800;;
}

.splash.contemporary a:hover .work-intro a:hover {
  color: #59fb00;
}

.star-rating {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.star-rating .fa-star {
  font-size: 1.25rem;
  color: #ccc;
  position: relative;
}

.star-rating .fa-star.checked {
  color: #ffcc00;
}

.star-rating .fa-star.partial {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.star-rating .fa-star.partial .fa-star.checked {
  position: absolute;
  top: 0;
  left: 0;
  color: #ffcc00;
}

.star-rating .count {
  margin-top: 0.125rem;
  margin-left: 0.25rem;
}

/* search modal */

#search-form-element .form-group {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

#search-form-element .form-group button {
  margin-left: 0.375rem;
  height: 2.375rem;
}

#search-form-element .form-group.inline {
  display: inline-block;
}

#search-form-element .form-group input[type="checkbox"] {
  width: auto;
  margin: 0.4rem 0 0 1rem;
}

/* popup for artists and parts */

.modal, .popup {
  display: none;
  position: fixed;
  z-index: 1000;
  background-color: rgba(14, 13, 18, 0.92);
  border: 1px solid #888;
  padding: 0.5rem 0 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  min-width: 350px;
  max-width: 750px;
  max-height: 90vh;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Perfect centering */
  overflow-y: auto;
}

.popup-header {
  display: flex;
  justify-content: space-between;
}

.popup-header h3 {
  margin: 0;
  padding: 0.25rem 0;
}

.popup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 1rem;
}

.popup-content p {
  padding: 0;
}

.close {
  color: #ccc;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

/* review section */
#edit-review {
  margin-left: 0.5rem;
  margin-bottom: -0.125rem;
}

.reviews-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.review-item {
  padding: 1rem 0;
}

.review-item:last-child {
  border-bottom: none; /* Remove bottom border for the last review item */
}

.review-user {
  display: flex;
  align-items: baseline;
}

.review-user .user {
  font-weight: bold;
  margin: 0 0.5rem;
}

.review-user .date {
  font-size: 0.875rem;
}

.review-item .star-rating .fa-star {
  font-size: 1rem;
}

.review-item p {
  margin: 0.25rem 0 0.75rem;
}

.review-item p:last-of-type {
  margin-bottom: 0.25rem;
}

.review-form h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.review-form form {
    display: flex;
    flex-direction: column;
}

.review-form form button {
  align-self: flex-start;
}

#cancel-review {
  margin-left: 0.5rem;
}

.spoiler {
  background-color: #1e1c28;
  color: #1e1c28;
  cursor: pointer;
  padding: 2px;
}

.spoiler.revealed {
  background-color: transparent;
  color: inherit;
}

.like-link {
    text-decoration: none;
    color: inherit;
}

.like-link.none {
  color: #9a959a;
}

.like-link {
  color: #fd0f6a;
}

.like-link:hover, .like-link.liked {
  color: #ac0e4a;
}

.content-related {
  background-color: #1e1c28;
  padding: 0.5rem 2rem 1.5rem;
}

.related {
  width: 100%;
  padding: 1rem 0;
  margin: 0 auto;
  color: #fdfdfa;
}

.swiper-container {
  position: relative;  /* Ensure arrows are positioned relative to this container */
  overflow: hidden;
  padding: 1rem 0 0;
}

.swiper-button-next,
.swiper-button-prev {
  color: #fdfdfa !important;
  width: 4px !important;
  height: 0 !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 1.25rem !important;
}

.original-wrapper {
  display: flex;
  align-items: start;
  padding: 1rem 0 0;
}

.related-work {
  margin: 0 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.related-work img {
  width: auto;
  height: 160px;
  margin-bottom: 0.5rem;
  border-radius: 0.1rem;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5); /* Horizontal offset, Vertical offset, Blur radius, Shadow color */
}

.related-work p {
  margin: 0;
}

#toc {
  min-width: 75%;
}

td.date {
  word-break: keep-all;
  hyphens: none;
  white-space: nowrap;
}

#toc, #review-guidelines {
  padding: 1rem;
  background-color: #1e1c28;
  margin: 0 auto 1rem;
}

#review-guidelines h2 {
  text-align: center;
}

.inline-alert {
    display: inline-block;
    font-weight: bold;
    margin-top: 0.5rem;
}

.inline-alert.success {
    color: #59fb00;
}

.inline-alert.error {
    color: red;
}

.notice {
  background-color: green;
  border: 1px solid #353140;
  padding: 0.5rem;
  margin-bottom: 0;
  text-align: center;
  display: flex;
  justify-content: center;
}

.notice p {
  position: relative;
  top: 0.25rem;
  padding: 0;
  margin: 0;
  color: #fff;
  font-weight: bold;
}

.notice .btn, .notice .btn:hover {
  margin-left: 2rem;
  border-radius: 1.25rem;
  padding: 0.25rem 1.25rem;
}

#notice_b {
  display: none;
}

a.disabled {
  pointer-events: none;
  cursor: not-allowed;
}

.toggle {
  margin-left: 1rem;
}

.work-title {
  font-family: 'Vollkorn', serif !important;
  padding: 0 !important;
}

.work-title-original {
  font-family: 'Noto Sans SC', sans-serif;
  padding: 0 !important;
}

.work-author {
  font-weight: bold;
  padding: 0.5rem 0;
  margin-bottom: 0;
}

.hidden {
    display: none;
}


/* PART VIEW */

#body-content-div {
  line-height: 1.75;
}

.part-nav {
  padding: 2rem 0;
}

.part-nav a {
  margin-right: 3rem;
}

#description-content-div {
  font-style: italic;
  color: #fff7cc;
}

.translator-note {
    font-size: 1.125em;
    color: #02aec6;
    cursor: pointer;
    display: inline-block;
    transform: scale(1.375);
    transform-origin: left;
}

.note-popup {
    font-family: "Noto Sans", sans-serif;
    font-size: 0.875rem;
    line-height: 1.375rem;
    position: absolute;
    color: #fff7cc;
    background-color: #222129;
    border: 1px solid #121212;
    padding: 0.5rem 0.75rem;
    z-index: 1000;
}

.illustration {
    margin: 3em auto 0;
    text-align: center;
}

.illustration figure {
    padding: 0;
    margin: 0;
    display: inline-block;
}

.illustration img, .illustration video {
    max-width: 100%;
    max-height: 800px;
    height: auto;
    border: 1px solid black;
}

.fullscreen-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 999; /* Ensure it is below the image */
}

.fullscreen-simulated {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    z-index: 1000; /* Ensure it is above the background */
    object-fit: contain;
}

.illustration h4 {
    font-family: "Noto Sans", sans-serif;
    font-size: 1em;
    margin-bottom: 2em;
}

.illustration figcaption {
    font-family: "Noto Sans", sans-serif;
    font-size: 0.875em;
    color: silver;
    margin-top: 0.5em;
    font-style: italic;
    text-align: right;
}

.illustration figcaption a {
    color: #02aec6;
    cursor: pointer;
}

/* SMOOTH-READER */

.page-title h1, .page-title h2, .page-title h3, .page-title h4 {
  padding: 0;
}

.webstore-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 2rem;
}

.webstore-link .add-to-chrome {
  margin-right: 1rem; /* Adjust the spacing as needed */
}

.webstore-link h4 {
  margin: 0;
  line-height: 1.75;
}

.img-comparison {
  max-width: 90%;
  display: flex;
  justify-content: space-between;
  padding: 1rem 0 2rem;
  margin: 0 auto;
}

.img-comparison img {
  max-width: 80%;
  padding: 0 1rem;
}

figure {
  text-align: center;
}

figcaption {
  font-weight: bold;
  padding: 0.5rem 0;
}

/* Feature Section */
.feature {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.feature img {
  width: 50px;
  margin-right: 1rem;
}

.feature p {
  margin-bottom: 0;
}

.download-buttons {
  padding: 3rem 2rem;
  display: flex;
  gap: 3rem;
}

.download-buttons .btn {
  padding: 1rem 2rem;
  text-align: center;
  font-size: 1.5rem;
  text-decoration: none;
  font-weight: bold;
  color: white;
  border-radius: 5px;
}

.download-buttons .btn:active {
  outline: none;
  box-shadow: none;
}

.download-buttons .btn-desktop {
    background-color: #02aec6;
}

.download-buttons .btn-desktop:active {
  border-color: #01f0ff;
}

.download-buttons .btn-mobile {
  background-color: #9bdf77;
}

.download-buttons .btn-mobile:active {
  border-color: #59fb00;
}

.api-instruction {
  display: flex;
  align-items: center;
  padding-bottom: 0.5rem;
}

.api-instruction ol {
  margin-bottom: 0;
}

.api-instruction li {
  margin-bottom: 0.5rem;
}

.api-instruction .img-div {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.api-instruction img {
  width: 260px;
  border: 1px solid #121212;
  border-radius: 2px;
  margin: 1rem;
}

.troubleshooting li {
  margin-bottom: 0.5rem;
}

/* PROFILE */

#edit-username {
  cursor: pointer;
  color: #9bdf77;
}

#edit-username:hover {
  color: #59fb00;
}

#username-form input[name="username"] {
  width: 200px;
}

#username-form label, #username-form input, #username-form button {
  font-size: 1rem;
  margin-bottom: 0;
}

#username-form {
  margin-bottom: 1rem;
}

#username-requirements {
  color: silver;
  font-size: 0.875rem;
  margin-top: -0.5rem;
}

.error-message {
  color: red;
  font-size: 0.875rem;
  margin-top: -0.5rem;
}

#username-form button {
  padding: 0.375rem 0.75rem;
}

.warning {
  color: silver;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: 0;
}

/* GENERIC */

.body-text {
  padding: 1rem 0 0;
}

.center-horizontal {
  text-align: center;
}

.center-horizontal * {
  margin: 0 auto !important;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.flex-container {
  display: flex;
  align-items: baseline;
}

.featured {
  background-color: #1e1c28;
  padding: 1rem 1rem 1.25rem;
  margin-bottom: 1rem;
}

table {
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

table th, table td {
  padding: 0.5rem 0 1rem 0.5rem;
}

table td:first-of-type {
  padding-left: 0;
}

table td:last-of-type {
  padding-right: 0;
  text-align: right;
}

input, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 0;
  background-color: #f8f8f8;
  font-size: 16px;
  color: black;
}

.inline-form {
  display: flex;
  align-items: center;
}
.inline-form input {
  width: 300px;
  padding: 0.25rem;
}
.inline-form label, .inline-form input, .inline-form button {
  font-size: 1rem;
  margin-bottom: 0;
}
.inline-form button {
  padding: 0.35rem 0.75rem;
  margin-left: 0.5rem;
}

/* Footer */
footer {
  flex-shrink: 0;
  background-color: #222129;
  color: dimgrey;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.25rem 0 0;
  margin-top: 1rem;
  width: 100%;
}

.footer-links {
  max-width: min(45%, 460px);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
}

.footer-links a {
  color: grey;
}

.footer-text {
  padding-bottom: 2px;
}

/* Utility classes */

/* containers */

.flex-gap-container {
  display: flex;
  gap: 1rem;
  flex-direction: row;
  align-items: flex-start;
}

.gap-container {
  display: flex;
  gap: 1rem;
  flex-direction: row;
}

.right-container {
  display: flex;
  justify-content: flex-end;
}

.spread-container {
  display: flex;
  justify-content: space-between;
}

/* margins and paddings */

.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.pb-1 { padding-bottom: 1rem; }
.pt-1 { padding-top: 1rem; }

.bold { font-weight: bold; }
.small { font-size: 0.875rem; }
.fs-2 { font-size: 2rem; margin-bottom: -0.125rem; }
.fs-25 { font-size: 2.5rem; }
.fs-15 { font-size: 1.5rem; position: relative; top: 0.03rem; }

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Special classes */
.text-accent1 { color: #9bdf77; }
.text-accent2 { color: #02aec6; }
.text-accent3 { color: #fff766; }
.text-silver { color: silver; }
.bg-accent1 { background-color: #9bdf77; }
.bg-accent2 { background-color: #02aec6; }

.link-red { color: red; }
.link-red:hover { color: #ff1010; }
.link-silver { color: silver; }
.link-silver:hover { color: #fdfdfa; }

.light-gray {
    color: #AAA;
}

.no-wordwrap { white-space: nowrap; }
.code { font-family: 'Courier New', monospace; }

/* Button Styles */
button:focus, .btn-primary:focus, .btn-secondary:focus, .btn-subscribe:focus {
  outline: none;
  box-shadow: none;
  background-color: inherit;
}

button.disabled, .btn-disabled {
  pointer-events: none;
  cursor: not-allowed;
  background-color: silver;
  color: dimgrey;
}

.btn-primary {
  background-color: #9bdf77;
  border-color: #9bdf77;
  color: #000;
  padding: 8px 14px;
  border-radius: 2px;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.btn-primary:hover, .btn-primary:active {
  background-color: #9bdf77;
  border-color: #68fb18;
  border-radius: 2px;
  color: #000;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
  padding: 8px 14px;
  border-radius: 2px;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  color: #fff;
}

.btn-secondary:active {
  background-color: #4e555b;
  border-color: #4e555b;
  color: #fff;
}

.badge {
  position: relative;
  top: -2px;
  margin-left: 2px;
}

.badge-redeem {
  background-color: #2b7800;
  color: white !important;
}

.badge-redeem:hover {
  background-color: #3a9f02;
  color: white !important;
}

.badge-redeem.disabled {
  background-color: gray;
  pointer-events: none;
  cursor: not-allowed;
}

.badge-blue {
  background-color: #02aec6;
  color: white;
}

.badge-yellow {
  background-color: #fff766;
  color: black;
}

.messages {
  font-size: 0.875rem;
}

.error {
  color: red;
}

.alert {
    padding: 15px;
    border: 1px solid transparent;
}

.inline-alert {
  display: inline-block;
  font-weight: bold;
  margin-top: 0.5rem;
}

.inline-alert.success {
    color: #59fb00;
}

.inline-alert.error {
    color: red;
}

/* Responsive Styles */

@media screen and (min-width: 769px) {
    .desktop-nav {
        display: block; /* Show desktop navigation */
    }
    .mobile-nav {
        display: none; /* Hide mobile navigation */
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .desktop-nav {
        display: none;
    }
    .mobile-nav {
        display: block;
    }
    .mobile-nav .mobile-dropdown.is-visible {
        display: block;
    }
    .work-intro .credits {
      max-width: 100%;
    }
    .webstore-link {
        flex-direction: column;
        align-items: center;
    }
    .webstore-link .add-to-chrome {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .api-instruction {
      flex-direction: column;
      justify-content: flex-end;
    }
    .api-instruction .img-div {
      flex-direction: row;
      flex-wrap: wrap;
    }
    .footer-links {
      max-width: 60%;
    }
    .flex-gap-container {
      flex-direction: column;
    }
}

@media screen and (max-width: 42rem) {
  body {
    font-size: 1rem;
  }
  header {
    padding: 0.25rem 0.5rem 0;
  }
  .logo {
    top: 0.275rem;
  }
  .logo img {
    width: 1.375rem;
  }
  .logo h2 {
    font-size: 1.75rem !important;
  }
  .header-left {
    top: 0;
  }
  .profile-icon {
    bottom: 0;
  }
  nav {
    display: none;
  }
  .profile-icon {
    position: relative;
    bottom: 1px;
  }
  .notice p {
    top: 0;
  }
  .notice .btn, .notice .btn:hover {
    margin-left: 0.5rem;
  }
  h1, h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  .content-top, .work-intro {
    flex-direction: column;
  }
  .content-top {
    padding: 1rem 1rem 0.25rem;
    align-items: flex-start;
  }
  .content-bottom {
    padding: 1.5rem 0.5rem 0.5rem;
  }
  .content-related {
    padding: 0.5rem;
  }
  .index-slide {
    max-width: 100%;
    flex-direction: column;
  }
  .index-slide-text {
    max-width: 100%;
  }
  .top .index-slide-text {
    padding-left: 0;
  }
  .bottom .index-slide-text {
    padding-right: 0;
  }
  .index-slide.middle p {
    margin: 2.5rem auto 3rem;
  }
  .work-intro-right {
    order: -1;
    padding: 1rem 0;
    text-align: center;
  }
  .work-intro img {
    margin-bottom: 1rem;
  }
  .modal, .popup {
    max-width: 100%;
    max-height: 100%;
  }
  #search-button {
    margin-top: -0.5rem;
  }
  .work h4, .work span {
    flex-basis: 100%;
  }
  .img-comparison {
    max-width: 90%;
    flex-direction: column;
    padding-bottom: 1rem;
  }
  .img-comparison img {
    max-width: 100%;
    padding: 0 0 1rem;
  }
  .download-buttons {
    flex-direction: column;
    padding: 2rem 1rem;
  }
  .download-buttons .btn {
    padding: 1rem 1.75rem;
  }
  #username-form input[name="username"] {
    width: 150px;
  }
  .inline-form {
    display: block;
  }
  .inline-form button {
    margin-left: 0;
    margin-top: 0.75rem;
  }
  .footer-links {
    max-width: 85%;
  }
}
