body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f0f0;
    color: #333;
}

.container {
    max-width: 1060px;
    min-width: 330px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
}

header h1 {
    font-size: 2.3em;
    margin: 0 0 20px;
    text-align: center;
    color: #2c3e50;
}

.description {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

nav {
    margin-bottom: 20px;
}

.tabs {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    border-bottom: 2px solid #ccc;
}

.tab {
    cursor: pointer;
    padding: 10px 20px;
    font-size: 1.2em;
    background: #ecf0f1;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}

.tab:hover {
    background: #bdc3c7;
}

.tab.active {
    background: #3498db;
    color: #fff;
    border-bottom: none;
}

.tab-content {
    display: none;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

form input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

form button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
}

form button:hover {
  background: #2980b9;
}

#input_reset-button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #818181;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
}

#input_reset-button:hover {
    background: #707070;
}

.result {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

/* テキストを左上に配置 */
#result-display-tab1 {
  position: relative;
  top: 0;
  left: 0;
  margin: 0;
  /* color: white; */
  /* background-color: rgba(0, 0, 0, 0.5); */
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 25px;
  z-index: 2;
  color: black; /* 必要に応じて */
}

/* 画像を右上に配置、透明度調整 */
.result-display-tab1-img {
  position: absolute;
  top: -15px;
  right: 0;
  width: 130px;
  opacity: 0.6;  /* ←透明度 0.0 ～ 1.0 で調整可能 */
  z-index: 1;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.grid-form div {
    display: flex;
    flex-direction: column;
}

.grid-gift_normal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.grid-gift_normal div {
    display: flex;
    flex-direction: column;
}


.grid-gift_detail {
  display: none;
  /* grid-template-columns: repeat(4, 1fr); */
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#label-student-name-tab1 {
  display: none;
}

#select-student-name-tab1 {
  display: none;
}

#input_reset-button {
  display: none;
}

.result-button-tab1 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
}

.grid-gift_detail div {
  display: flex;
  flex-direction: column;
  width: 93px;
}

.grid-gift_normal-detail_label {
    margin-bottom: -10px;
}

.flex-form1 {
    display: flex;
}

.flex-form1-1 {
    gap: 200px;
    flex: 1;
}

.flex-form1-2 {
    gap: 200px;
    flex: 1;
}

.flex-form2 {
    display: flex;
    gap: 10px;
}

.grid-form3_label {
    display: flex;
}

.grid-form3_label1 {
    gap: 200px;
    flex: 1;
}

.grid-form3_label2 {
    gap: 200px;
    flex: 1;
}

.grid-form3_label3 {
    gap: 200px;
    flex: 1;
}

.grid-form3_input {
    display: flex;
    gap: 10px;
}

.radio-grid1 {
    display: flex;
    align-items: center;
}

.radio-grid1-1 {
    flex: 1;
}

.radio-grid1-2 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid1-3 {
    flex: 1;
}

.radio-grid1-4 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid1-5 {
    flex: 1;
}

.radio-grid1-6 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid1-7 {
    flex: 1;
}

.radio-grid1-8 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid2 {
    display: flex;
    align-items: center;
}

.radio-grid2-1 {
    flex: 1;
}

.radio-grid2-2 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid2-3 {
    flex: 1;
}

.radio-grid2-4 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid2-5 {
    flex: 1;
}

.radio-grid2-6 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid2-7 {
    flex: 1;
}

.radio-grid2-8 {
    flex: 1;
    position: relative;
    bottom: 6px;
}

.radio-grid2 {
    display: flex;
}

.gift-type {
	overflow: hidden;
    width: calc(100%);
    padding: 10px;
	text-align: left;
    margin-bottom: 15px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tab3_form_label {
    display: flex;
}

.tab3_form_label_1 {
    gap: 200px;
    flex: 1;
}

.tab3_form_label_2 {
    gap: 200px;
    flex: 1;
}

.tab3_form_content {
    display: flex;
    gap: 9px;
}


#hamburger-menu {
    display: none;
    position: relative;
    /* border-radius: 5px; */
    z-index: 1;
}

@media (max-width: 768px) {
  .grid-gift_detail div {
    display: flex;
    flex-direction: column;
    width: 66px;
  }
  .tabs {
      display: none;
  }
  #hamburger-menu {
      display: block;
  }
}


/* Navbar & Navmenu color */
:root {
    --background-navbar: #ecf0f1;
    /* border-radius: 5px; */
  }
  
  .header {
    background: var(--background-navbar);
    position: absolute;
    width: 100%;
    height: 52px;
    border-radius: 5px 5px 0 0;
  }
  
  /* Nav items */
  .menu {
    list-style: none;
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    margin-top: 52px;
    padding: 0 0 10px 0;
    clear: both;
    background: var(--background-navbar);
    transition: 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
    transform: scale(1, 0);
    transform-origin: top;
  }
  
  /* Hamburger menu button */
  .menu-btn:checked ~ .menu {
    transform: scale(1, 1);
    transform-origin: top;
    transition: 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
    /* border-radius: 5px; */
  }
  
  /* Hamburger menbu text */
  .menu a {
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 2px;
    font-size: 16px;
    text-transform: capitalize;
    color: #333;
    opacity: 0;
    transition: 0.5s;
  }
  
  .menu li {
    border-top: 1px solid rgb(75, 75, 75);
    padding: 15px 0;
    margin: 0 54px;
    opacity: 0;
    transition: 0.5s;
  }
  
  .menu-btn:checked ~ .menu a,
  .menu-btn:checked ~ .menu li {
    opacity: 1;
    transition: 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.2s;
  }
  
  .menu-btn {
    /* border-radius: 5px; */
    display: none;
  }
  
  .menu-icon {
    display: inline-block;
    position: relative;
    cursor: pointer;
    padding: 24px 14px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* border-radius: 5px; */
  }
  
  .navicon {
    background: #333;
    display: block;
    height: 3px;
    width: 26px;
    position: relative;
    transition: 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
    /* border-radius: 5px; */
  }
  
  .navicon:before,
  .navicon:after {
    content: "";
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    background: #333;
    transition: 0.3192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
  }
  
  .navicon:before {
    top: 9px;
  }
  
  .navicon:after {
    bottom: 9px;
  }
  
  /* Hamburger Menu Animation Start */
  .menu-btn:checked ~ .menu-icon .navicon:before {
    transform: rotate(-45deg);
  }
  
  .menu-btn:checked ~ .menu-icon .navicon:after {
    transform: rotate(45deg);
  }
  
  .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before {
    top: 0;
  }
  .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
    bottom: 0;
  }
  
  .menu-btn:checked ~ .menu-icon .navicon {
    background: rgba(0, 0, 0, 0);
    transition: 0.2192s cubic-bezier(0.04, 0.04, 0.12, 0.96) 0.1008s;
  }
  /* Hamburger Menu Animation End */
  
  /* Navbar Container */
  .navtext-container {
    width: 100%;
    height: 52px;
    position: absolute;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* Navbar Text */
  .navtext {
    position: absolute;
    text-transform: uppercase;
    color: #ddd;
    letter-spacing: 4px;
    font-size: 20px;
  }

.menu_tab {
    cursor: pointer;
    padding: 10px 20px;
    font-size: 1.2em;
    background: #ecf0f1;
    /* border-radius: 5px 5px 0 0; */
    margin-right: 5px;
}

.menu_tab:hover {
    background: #bdc3c7;
}

/* .menu_tab.active {
    background: #3498db;
    color: #fff;
    border-bottom: none;
} */

.student-name {
	overflow: hidden;
    width: calc(100%);
    padding: 10px;
	text-align: left;
    margin-bottom: 15px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.student-gift-type-table{
    width:100%;
    border-collapse:collapse;
    border:none;
    /* border:1px solid #ccc; */
    background-color: #ecf0f1;
    margin-bottom: 10px;
    th,td{
      padding:10px;
      /* border:1px solid #ccc; */
      border:none;
      border-left: 1px solid #ccc;
      border-top: 1px solid #ccc;
    }
    td:first-child,th:first-child{
        border-left:none;
    }
    tr:first-child td,tr:first-child th{
        border-top:none;
    }
}
.td_gift_type_img {
    text-align: center;
    width: 30%;
}

.img_gift_type{
    width: 35px;
    height: 35px;
}
.img_gift{
    width: 34px;
    height: 27px;
}

.grid-gift_detail_img {
  width: 35px;
  height: 35px;
}

/* トグルボタン */
  .knob,
  .btn-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  
  .btn {
    position: relative;
    /* top: 10%; */
    width: 74px;
    height: 36px;
    margin: 0 0 0 0;
    /* overflow: hidden; */
  }
  
  .btn.btn-pill,
  .btn.btn-pill > .btn-bg {
    border-radius: 100px;
  }
  
  .btn.btn-rect {
    border-radius: 2px;
  }
  
  .checkbox {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
  }

  .checkbox-label {
    margin: 0 0 0 0;
    visibility: visible;
    color: #333;
    font-size: 15px;
    position: relative;
    z-index: 4;
  }

  .checkbox-detail_change_btn {
    gap: 10px;
    width: 100%;
    margin-bottom: -15px;
    justify-content: flex-end; /* 右端に配置 */
    align-items: center;
    display: flex;
  }
  
  .knob {
    z-index: 2;
  }
  
  .btn-bg {
    width: 100%;
    background-color: #90d7f8;
    transition: 0.3s ease all;
    z-index: 1;
  }
  
  /* detail_change_btn */
  #detail_change_btn .knob:before,
  #detail_change_btn .knob:after,
  #detail_change_btn .knob span {
    position: absolute;
    top: 4px;
    width: 20px;
    height: 10px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    padding: 9px 4px;
    border-radius: 50%;
  }
  
  #detail_change_btn .knob:before {
    content: "YES";
    left: 4px;
    color: #fff;
    opacity: 1;
  }
  
  #detail_change_btn .knob:after {
    content: "N";
    left: 42px;
    color: #fff;
    width: 14px;
    text-align: left;
    padding: 9px 7px;
    background-color: #333;
    opacity: 0;
  }
  
  #detail_change_btn .knob:before,
  #detail_change_btn .knob:after {
    transition: 0.3s ease all;
    z-index: 2;
  }
  
  #detail_change_btn .knob span {
    left: 4px;
    background-color: #03a9f4;
    transition: 0.2s ease all;
    z-index: 1;
  }
  
  #detail_change_btn .checkbox:checked + .knob:before {
    opacity: 0;
  }
  
  #detail_change_btn .checkbox:checked + .knob:after {
    opacity: 1;
  }
  
  #detail_change_btn .checkbox:checked + .knob span {
    top: 14px;
    left: 57px;
    width: 2px;
    height: 2px;
    padding: 3px;
    background-color: #fff;
    z-index: 3;
  }
  
  #detail_change_btn .checkbox:checked ~ .btn-bg {
    background-color: #ffffff;
  }