@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --main-bg-opacity: 0.95;
  --text-color: #333;
  --heading-color: #B71C1C;     
  --accent-color: #1976D2;       
  --link-hover-color: #E64A19;
  --visited-color:#E64A19;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --wrapper-bg: rgba(255, 255, 255, var(--main-bg-opacity));
  --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-color);
  background: url('hatter.png') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.wrapper {
  background-color: var(--wrapper-bg);
  width: 100%;
  max-width: 793px;
  padding: 2rem;
  margin: 2rem;
  box-shadow: 0 0 10px var(--shadow-color);
  box-sizing: border-box;
  border-radius: 8px;
}

nav {
  background-color: var(--nav-bg);
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 2rem;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--heading-color);
  font-weight: 700;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--link-hover-color);
}

nav a:visited {
  color: var(--visited-color);
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

h2 {
  text-align: center;
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--heading-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

h3 {
  font-size: 1.4rem;
  color: var(--accent-color);
  margin-top: 1.5rem;
}

p, ul, table, form {
  margin-top: 1rem;
  line-height: 1.6;
}

ul li {
  margin-bottom: 0.5rem;
}

hr.dashed {
  border: none;
  border-top: 2px dashed #ccc;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th {
  background-color: var(--accent-color);
  color: #fff;
  padding: 10px;
  text-align: left;
}

td {
  border: 1px solid #ccc;
  padding: 8px;
}

input, textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 4px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}

.radio-group, .checkbox-group {
  margin-top: 1rem;
}

label {
  display: block;
  margin-top: 1rem;
}

button {
  padding: 10px 20px;
  margin-right: 8px;
  margin-top: 1rem;
  border: none;
  border-radius: 4px;
  background-color: var(--heading-color);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: var(--link-hover-color);
}

small {
  color: #555;
}

.section-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.interests-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.interests-text {
  flex: 1 1 60%;
}

.interests-image {
  flex: 1 1 auto;
  max-width: 180px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  align-self: flex-end;  
  margin-top: 1.5rem;    
  margin-bottom: 1rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--heading-color);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

@media (max-width: 820px) {
  .wrapper {
    margin: 1rem;
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  nav a {
    display: inline-block;
    margin: 0.5rem;
  }
}

@media (max-width: 480px) {
  .food-entry {
    flex-direction: column;
  }
}
@media (min-width: 481px) and (max-width: 1024px) {
  .food-entry {
    flex-direction: row;
  }
}
@media (min-width: 1025px) {
  .food-entry {
    flex-direction: row;
  }
}


@media print {
  body {
    background: none !important;
    color: #000 !important;
  }
  .wrapper {
    box-shadow: none !important;
    margin: 0;
    padding: 0;
    border: none;
    width: auto;
  }
  header, nav, .breadcrumbs, .form-buttons, footer, .button, #toggle-contrast {
    display: none !important;
  }
  iframe, video {
    display: none !important;
  }
  img {
    max-width: 50% !important;
    height: auto !important;
  }

  * {
    background: none !important;
    box-shadow: none !important;
    color: #000 !important;
    text-shadow: none !important;
  }
}