:root {
    --main-color: #ee722e;
    --sub1-color: #2E5F7F;
    --sub2-color: #fff5d3;
}

button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
}

/* header */
header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: 10px 20px;
    z-index: 1001;
    margin: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-area img {
    height: 50px;
}

.site-name {
    font-size: 24px;
    font-weight: bold;
    margin-left: 10px;
    color: black;
    text-decoration: none;
}

.paw {
    font-size: 24px;
    margin-left: 5px;
}

.nav-link {
    margin-left: clamp(10px, 2vw, 20px);
    font-size: clamp(14px, 2vw, 20px);
    text-decoration: none;
    color: black;
    font-weight: bold;
}

.sns-links {
    margin-left: clamp(10px, 2vw, 40px);
    display: flex;
    flex-direction: row;
}

.sns-links img {
    width: 30px;
    height: 30px;
    margin: auto 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sns-links img:hover {
    transform: scale(1.1);
}

/* body */
body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--sub2-color);
}

.header-bar {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: start;
    z-index: 1001;
    padding-left: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: var(--main-color);
}

.probtree-logo-area {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.probtree-logo {
    /* width: clamp(20px, 10vw, 30px); */
    width: clamp(50px, 8vw, 80px);
}

.header-bar button {
    /* background-color: var(--sub1-color); */
    color: white;
    border: solid 3px white;
    border-radius: 20px;
    font-size: 22px;
    font-weight: bold;
    margin-left: auto;
    margin-right: 20px;
    width: 110px;
    height: 45px;
}

h1 {
    margin: 0;
    margin-left: clamp(10px, 2vw, 20px);
    font-size: clamp(15px, 6vw, 50px);
    color: white;
}

/* side-bar */
#sidebar {
    position: fixed;
    top: 0px;
    left: -200px;
    width: 200px;
    height: 100%;
    background-color: var(--sub1-color);
    color: white;
    padding-top: 170px;
    transition: left 0.5s ease;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

#sidebar.open {
    left: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
}

.sidebar-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-btn.active {
    font-size: 1.5em;
    font-weight: 600;
    /* background-color: rgba(255, 255, 255, 0.15); */
}

#sidebar-tab {
    position: absolute;
    top: clamp(160px, 22vw, 200px);
    left: 100%;
    width: 20px;
    height: 80px;
    background: var(--sub1-color);
    clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
    cursor: pointer;
    z-index: 1001;
}

/* main */
main {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.practice-main-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-start;
}

.practice-content-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
    max-width: 900px;
}

.practice-vert-ads-region1 {
    display: block;
    width: 160px;
    height: 600px;
    margin-top: 20px;
    /* border: solid 1px red; */
}

.practice-hori-ads-region1,
.practice-hori-ads-region2,
.practice-hori-ads-region3 {
    display: none;
}

.practice-square-ads-region1,
.practice-square-ads-region2,
.practice-square-ads-region3 {
    display: none;
}

.vert-ads-region1 {
    display: block;
    width: 160px;
    height: 600px;
    /* border: solid 1px red; */
}

.hori-ads-region1,
.hori-ads-region2,
.hori-ads-region3 {
    display: none;
}

.square-ads-region1,
.square-ads-region2,
.square-ads-region3 {
    display: none;
}

.main-section1 {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
    max-width: 1000px;
    /* border: solid 1px blue; */
}

/* canvas-container */
#Canvas-Container {
    width: 70%;
    transition: all 0.5s ease;
    /* border: solid 1px blue; */
}

#tree-canvas {
    flex-grow: 1;
    background: white;
    border: 5px solid var(--main-color);
    border-radius: 30px;
    height: 700px;
    box-sizing: border-box;
    overflow: auto;
}

/* .canvas-outer-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
} */
.canvas-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
    cursor: grab;
    position: relative;
}

.canvas-wrapper:active {
    cursor: grabbing;
}

#layer-labels {
    /* position: fixed; */
    left: 0;
    width: 100%;
    height: 40px;
    pointer-events: none;
    z-index: 0;
}

.layer-label {
    position: absolute;
    font-size: 20px;
    color: #666;
}

#tree-diagram {
    display: block;
    position: absolute;
    width: auto;
    height: auto;
    z-index: 1;
}

.canvas-button-region {
    /* width: 70%; */
    height: 50px;
    display: flex;
    flex-direction: row;
    /* border: solid 1px blue; */
    justify-content: flex-end;
    align-items: center;
    padding-right: 30px;
    gap: 5px;
    box-sizing: border-box;
}

.canvas-button-region button {
    background-color: var(--sub1-color);
    color: white;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.canvas-button-region button img {
    width: 100%;
    /* ボタン内での画像サイズ調整 */
    height: auto;
    object-fit: contain;
    pointer-events: none;
    /* クリック時に画像が邪魔しないように */
}

.canvas-button-region button:hover {
    transform: scale(1.1);
}

/* main-right-section */
.main-right-section {
    display: flex;
    flex-direction: column;
    /* border: solid 1px red; */
    min-width: 350px;
    width: 50%;
}

/* first-nav-region */
.first-nav-region {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 90%;
    height: 150px;
    margin-top: auto;
    background-color: white;
    border: solid 5px var(--main-color);
    border-radius: 15px;
    text-align: center;
    margin: 20px auto;
    box-sizing: border-box;
}

.first-nav-region .sub-container {
    height: 130px;
    width: 120px;
    /* border: solid 1px blue; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto 0;
}

.first-nav-region p {
    font-size: 25px;
    font-weight: bold;
    margin: 0;
    /* border: solid 1px green; */
}

.fnr-title {
    color: var(--sub1-color)
}

.fnr-value {
    color: var(--main-color)
}

/* second-nav-region */
.main-section2 {
    display: block;
    width: 90%;
    margin: 0 auto;
    height: 550px;
    /* border: solid 1px green; */
}

.second-nav-region {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    background-color: white;
    border: solid 5px var(--main-color);
    border-radius: 30px;
    transition: all 0.5s ease;
    height: 550px;
}

.control-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    /* height: 100%; */
    width: 100%;
    /* border: solid 1px blue; */
    transition: all 0.5s ease;
    margin-top: 20px;
    margin-bottom: 10px;
    gap: 20px;
}

.control-container.narrow {
    grid-template-columns: 1fr;
}

.control-container label {
    color: var(--sub1-color);
    font-size: clamp(15px, 4vw, 25px);
    font-weight: 600;
}

.control-container input {
    font-size: clamp(15px, 4vw, 25px);
    font-weight: bold;
    text-align: center;
    color: var(--main-color);
    border: solid 4px var(--sub1-color);
    width: clamp(60px, 3vw, 80px);
    margin-left: 20px;
}

.second-nav-region .control-container button {
    color: white;
    font-size: 25px;
    font-weight: bold;
    background-color: var(--main-color);
    border-radius: 15px;
    width: 230px;
    height: 70px;
    margin: auto;
    transition: all 0.3s ease;
}

.second-nav-region .control-container button:hover {
    transform: scale(1.1);
}

.select-layer {
    margin: auto;
}

.combination-toggle {
    margin: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ios-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
}

.ios-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #e5e5e5;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background-color 0.3s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.ios-toggle input:checked+.slider {
    background-color: #eb6321;
}

.ios-toggle input:checked+.slider::before {
    transform: translateX(32px);
}

.second-nav-region .element-container {
    height: 100%;
    width: 80%;
    margin: 0 auto;
    /* border: solid 1px green; */
}

/* element-list */
.element-panel {
    margin: 15px 0;
    width: 100%;
    height: 210px;
    border: 3px solid var(--sub1-color);
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
}

.element-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    /* border: solid 1px green; */
}

.element-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--sub1-color);
}

.element-add {
    background: none;
    border: none;
    color: var(--main-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.element-add:hover {
    transform: scale(1.1);
}

.element-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 80%;
    overflow-y: auto;
    /* 縦方向にスクロールを許可 */
    padding-right: 6px;
    /* スクロールバー分の余白 */
    border-radius: 10px;
}

.element-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 5px;
    padding-bottom: 10px;
    border-bottom: solid 1px var(--sub1-color);
}

.element-move-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 8px;
}

.element-move-controls button {
    font-size: 20px;
    font-weight: bold;
    width: 24px;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    color: var(--main-color);
    transition: transform 0.2s;
}

.element-move-controls button:hover {
    transform: scale(1.1);
    background-color: var(--sub2-color);
}

.element-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--main-color);
}

.element-name.back {
    color: var(--main-color);
}

.element-name.front {
    color: var(--main-color);
}

.element-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 9px;
    text-align: center;
    line-height: 30px;
}

.element-dot.yellow {
    background-color: gold;
}

.element-dot.gray {
    background-color: lightgray;
}

.element-list hr {
    border: none;
    border-top: 1px solid var(--sub1-color);
    margin: 4px 0;
}

/* Add-Element */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 245, 211, 0.3);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 30px;
    border: 5px solid var(--main-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 500px;
}

.modal-body {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.modal-left {
    /* border: solid 1px red; */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: 25%;
    height: 280px;
}

.modal-left p {
    /* border: solid 1px green; */
    text-align: center;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    margin: 0;
    height: 40px;
}

.modal-left strong {
    /* border: solid 1px blue; */
    color: var(--sub1-color);
    font-size: 30px;
    font-weight: bold;
    /* margin-left: 20px; */
}

.modal-value {
    /* border: solid 1px blue; */
    color: var(--main-color);
    font-size: 28px;
    font-weight: bold;
    margin-right: 20px;
    border: solid 3px var(--sub1-color);
    border-radius: 0;
    width: 80%;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
}

.modal-color {
    display: inline-block;
    width: 80%;
    height: 40px;
    padding: 0;
    border: 3px solid var(--sub1-color);
    margin-right: 20px;
}

.modal-center {
    /* border: solid 1px red; */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: 25%;
}

.modal-center p {
    /* border: solid 1px green; */
    justify-content: center;
    text-align: center;
    align-content: center;
    align-items: center;
    height: 40px;
    margin: 0;
}

.modal-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* border: solid 1px blue; */
    width: 50%;
}

.modal-title {
    font-size: 30px;
    color: var(--sub1-color);
    margin: 0;
    /* border: solid 1px green; */
}

.modal-shape-preview {
    width: 150px;
    height: 150px;
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.edit-modal-shape-preview {
    width: 130px;
    height: 130px;
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.modal-footer {
    display: flex;
    justify-content: space-around;
    width: 100%;
    gap: 20px;
}

.cancel-btn,
.add-btn {
    font-size: 30px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 10px;
    width: 200px;
    height: 65px;
    border: none;
    cursor: pointer;
    background-color: var(--main-color);
    color: white;
    transition: all 0.3s ease;
}

.cancel-btn:hover,
.add-btn:hover {
    transform: scale(1.1);
}

.template-group {
    width: 100%;
    display: flex;
    flex-direction: row;
    /* border: solid 1px red; */
    margin-top: 30px;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
    align-content: center;
}

.template-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 50%;
    /* border: solid 1px blue; */
}

.template-btn {
    background-color: var(--sub1-color);
    color: white;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 25px;
    width: 200px;
    height: 80px;
    margin-top: auto;
    margin-bottom: auto;
    border: none;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.template-btn:hover {
    transform: scale(1.1);
}

.template-options label {
    margin-left: 80px;
    font-size: 22px;
    font-weight: bold;
    height: 40px;
    color: var(--sub1-color)
}

.template-options input[type="radio"] {
    margin-right: 5px;
}

/* add-node-modal */
.add-node-modal {
    display: flex;
    position: fixed;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 245, 211, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.add-node-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.add-node-modal-content {
    background: #fff;
    border: 4px solid var(--main-color);
    border-radius: 15px;
    padding: 20px;
    width: 350px;
    height: 470px;
    text-align: center;
}

.add-node-modal h3 {
    color: var(--sub1-color);
    font-size: 30px;
    margin: 0;
    margin-top: 10px;
    font-weight: bold;
}

.add-button {
    background-color: var(--main-color);
    color: white;
    font-size: 25px;
    font-weight: bold;
    border-radius: 10px;
    width: 270px;
    height: 70px;
    margin: 10px 0;
    cursor: pointer;
}

.add-button:hover {
    transform: scale(1.1);
}

.cancel-button {
    background-color: var(--main-color);
    color: white;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    align-content: center;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 30px;
    font-weight: bold;
    /* border: solid 1px red;     */
    margin-left: auto;
    margin-top: -10px;
}

.cancel-button:hover {
    transform: scale(1.1);
}

.add-node-element-panel {
    margin: 15px 0;
    width: 60%;
    height: 40%;
    margin-left: auto;
    margin-right: auto;
    border: 3px solid var(--sub1-color);
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
}

#element-checkbox-list {
    display: flex;
    flex-direction: column;
    /* border: 2px solid #1f4f66; */
    padding: 8px;
    margin-bottom: 15px;
    height: 90%;
    overflow-y: auto;
    background: white;
}

.element-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 0;
    border-bottom: 1px solid #1f4f66;
}

.element-label {
    color: #d65f29;
    font-size: 22px;
    font-weight: bold;
    margin-left: auto;
    margin-right: auto;
}

.element-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    border: 1px solid #999;
}

/* condition-modal */
.condition-modal {
    display: flex;
    position: fixed;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 245, 211, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.condition-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.condition-modal-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 4px solid var(--main-color);
    border-radius: 15px;
    padding: 20px;
    width: 700px;
    height: 550px;
    text-align: center;
}

.condition-modal-content h3 {
    color: var(--sub1-color);
    font-size: 30px;
    font-weight: bold;
    margin: 0;
    margin-top: 10px;
    margin-bottom: 15px;
}

.condition-modal-container {
    display: flex;
    flex-direction: row;
    /* border: solid 1px blue; */
    height: 70%;
    justify-content: space-evenly;
}

.condition-modal-container label {
    font-size: 20px;
    font-weight: 600;
    color: var(--sub1-color);
}

.condition-modal-left {
    /* border: solid 1px red;     */
    width: 35%;
}

.condition-modal-right {
    /* border: solid 1px red;     */
    width: 55%;
}

.condition-modal-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-top: 30px;
}

.condition-main-button {
    font-size: 25px;
    font-weight: bold;
    background-color: var(--main-color);
    color: white;
    border-radius: 10px;
    width: 250px;
    height: 60px;
    cursor: pointer;
}

.condition-main-button:hover {
    transform: scale(1.1);
}

.condition-sub-button {
    font-size: 25px;
    font-weight: bold;
    background-color: var(--sub1-color);
    color: white;
    border-radius: 10px;
    width: 200px;
    height: 50px;
    margin: 15px 0;
    cursor: pointer;
}

.condition-sub-button:hover {
    transform: scale(1.1);
}

.condition-select-level-container {
    border: solid 3px var(--sub1-color);
    height: 90%;
}

.condition-select-element-container {
    border: solid 3px var(--sub1-color);
    height: 90%;
    overflow-y: auto;
}

.condition-type-row {
    display: flex;
    flex-direction: row;
    font-size: 25px;
    font-weight: bold;
    color: var(--sub1-color);
    justify-content: space-between;
    align-items: center;
    width: 400px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.condition-type-select {
    color: var(--main-color);
    font-size: 25px;
    font-weight: bold;
    margin-right: 20px;
    border: solid 3px var(--sub1-color);
    border-radius: 0;
    width: 200px;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
}

.numeric-mode {
    color: var(--main-color);
    margin: 5px 0;
    font-size: 20px;
    font-weight: bold;
    margin-right: 5px;
    border: solid 3px var(--sub1-color);
    border-radius: 0;
    width: 50px;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
}

.numeric-value {
    color: var(--main-color);
    font-size: 20px;
    font-weight: bold;
    margin-right: 20px;
    border: solid 3px var(--sub1-color);
    border-radius: 0;
    width: 200px;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
}

.level-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    width: 200px;
    margin: 0 auto;
    border-bottom: 1px solid #1f4f66;
}

.level-row label {
    margin: 0 auto;
    color: #dc5f36;
}

.condition-element-row {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid #1f4f66;
    padding-bottom: 10px;
    width: 350px;
    margin: 20px auto;
}

.condition-element-name {
    color: #dc5f36;
    font-size: 20px;
    font-weight: bold;
    margin: auto 0;
}

.condition-element-dot {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin: auto 0;
}

.condition-element-right {
    display: flex;
    flex-direction: column;
    /* border: solid 1px red; */
    margin: auto 0;
    gap: 4px;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.condition-count {
    font-size: 26px;
    font-weight: bold;
    color: var(--main-color);
    border: solid 3px var(--sub1-color);
    width: 80px;
    text-align: center;
    padding: 2px 4px;
    font-size: 14px;
    margin: 15px 0;
}

.condition-unit {
    margin-left: 2px;
    font-weight: 600;

    color: var(--sub1-color)
}

.condition-logic-row {
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    gap: 10px;
    height: 50px;
    margin: 0 auto;
    margin-bottom: 10px;
    width: 90%;
    border-bottom: solid 1px var(--sub1-color);
}

.condition-logic-label {
    font-weight: bold;

}

/* edit-node-panel */
.edit-node-panel {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.edit-node-header {
    display: flex;
    color: var(--sub1-color);
    font-size: 30px;
    font-weight: bold;
    /* border: solid 1px red;     */
    justify-content: center;
    text-align: center;
    align-items: center;
    height: 40px;
}

.edit-node-header p {
    /* border: solid 1px blue; */
    margin: 0;
}

.edit-node-preview {
    width: 100px;
    height: 100px;
    margin: 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    color: black;
}

.edit-node-content {
    display: flex;
    flex-direction: row;
    /* border: solid 1px red; */
    margin-bottom: 25px;
    /* height: 280px; */
}

.edit-node-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* border: solid 1px blue; */
    width: 30%;
    margin-left: auto;
}

.edit-node-label p {
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    color: var(--sub1-color);
    font-size: 30px;
    font-weight: 600;
    height: 40px;
    /* border: solid 1px green; */
    margin: 0;
    box-sizing: border-box;
}

.edit-node-value {
    display: flex;
    flex-direction: column;
    /* border: solid 1px blue; */
    width: 40%;
    gap: 5px;
    margin-right: auto;
}

.edit-node-value p {
    font-size: 30px;
    font-weight: bold;
    color: var(--main-color);
    /* border: solid 3px var(--sub1-color);     */
    height: 40px;
    width: 80%;
    margin: 0 auto;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.edit-node-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    height: 55px;
    /* border: solid 1px red; */
}

.edit-node-buttons button {
    font-size: 18px;
    font-weight: bold;
    color: white;
    border-radius: 10px;
    height: 45px;
}

.edit-node-buttons button:hover {
    transform: scale(1.1);
}

.edit-node-button-main {
    background-color: var(--main-color);
    width: 45%;
}

.edit-node-button-sub {
    background-color: var(--sub1-color);
    width: 45%;
}

.edit-node-button-sub2 {
    background-color: var(--sub1-color);
    width: 90%;
    margin-top: 30px;
}


/* practice-section */
.practice-section {
    margin: 20px;
    padding: 10px;
    max-width: 900px;
    width: 80%;
    margin: 10px auto;
    border: 3px solid var(--main-color);
    border-radius: 10px;
    background-color: white;
}

.study-section {    
    border: 3px solid var(--main-color);
    border-radius: 10px;
    background-color: white;
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.practice-section h2 {
    color: #2e5f7f;
}

.practice-questions button {
    background-color: var(--main-color);
    border: none;
    margin: 5px;
    padding: 10px 15px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    border-radius: 6px;
    width: 100px;
    height: 60px;
    cursor: pointer;
}

.practice-questions button:hover {
    transform: scale(1.1);
}

.practice-title {
    display: flex;
    color: var(--sub1-color);
    font-size: 40px;
    font-weight: bold;
    justify-content: center;

}

.study-title-container {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: solid 3px var(--main-color);    
    border-radius: 10px;
    margin: 20px;
    width: 100%;
    box-sizing: border-box;
}

.study-title {
    color: var(--sub1-color);
    font-size: clamp(40px, 5vw, 55px);
}

.study-title-desc {
    color: black;
    font-size: clamp(17px, 2vw, 25px);
}

.practice-section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.study-section-title-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    cursor: pointer;
    /* border: solid 1px blue; */
}

.study-section-title-container.active {
    border-bottom: solid 2px var(--main-color);
}

.study-section-title {
    font-size: clamp(25px, 3vw, 34px);
    font-weight: bold;
    color: var(--sub1-color);
}

.down-mark {
    font-size: clamp(25px, 3vw, 34px);
    color: var(--main-color);
    margin-left: auto;
}

.study-contents {
    font-size: clamp(17px, 2vw, 25px);
    font-weight: 600;
    max-height: 0;
    overflow: hidden;
    transition: max-height 1.0s ease;
}

.study-contents-first {
    text-indent: 1rem;
    margin-bottom: 30px;
}

.study-contents.open {
    max-height: 1200px;
    padding: 8px;
}

.study-img1 {
    width: clamp(280px, 30vw, 400px);
}

.study-img2 {
    width: clamp(280px, 30vw, 400px);
}

.study-pattern-list-highlight {
    color: var(--main-color);
}

.question-title-container {
    background-color: white;
    border: solid 3px var(--main-color);
    max-width: 900px;
    width: 80%;
    margin: 20px auto;
}

.study-container {
    max-width: 900px;
    width: 80%;
    margin: 20px auto;
}

.question-title-container .title {
    font-size: 25px;
    font-weight: bold;
    margin-left: 20px;
    color: var(--sub1-color);
}

.question-title-container .title-script {
    text-indent: 1rem;
    font-size: 24px;
    font-weight: bold;
    margin-left: 20px;
    color: black;
}

.question-content-container {
    width: 80%;
    max-width: 900px;
    margin: 0 auto;
}

.question-block {
    background-color: white;
    border: solid 3px var(--main-color);
    padding: 10px;
}

.question-block p {
    font-size: 22px;
}

.question-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 40%;
    gap: 8px 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* border: solid 1px blue; */
    box-sizing: border-box;
}

.question-options label {
    display: block;
    padding: 6px;
    border-radius: 6px;
    font-size: 22px;
    font-weight: 600;
}

.option-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: solid 3px var(--main-color);
}

.checkAnswer {
    font-size: 25px;
    font-weight: bold;
    width: clamp(100px, 25vw, 200px);
    height: 60px;
    background-color: var(--main-color);
    border-radius: 10px;
    color: white;
}

.checkAnswer-container {
    width: 40%;
    /* border: solid 1px blue; */
    justify-content: center;
    align-items: center;
    text-align: center;
}

.Ans-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin-top: 40px;
}

.Ans-container-script,
.Ans-container-tree {
    display: flex;
    flex-direction: column;
    width: 40%;
    overflow-x: auto;
    /* border: solid 1px red; */
    overflow: visible;
}

.Ans-container-tree img {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 1.0s ease, opacity 1.0s ease;
}

.Ans-container-tree img.show {
    max-height: 5000px;
    height: auto;
    opacity: 1;
}

.show-ans-button,
.show-img-button {
    background-color: var(--sub1-color);
    color: white;
    font-size: clamp(16px, 4vw, 25px);
    font-weight: bold;
    width: 90%;
    max-width: 200px;
    height: 60px;
    border-radius: 10px;
    margin: 0 auto;
    transition: transform 0.2s, background-color 0.2s;
    transform-origin: center center;
}

.show-ans-button:hover:not(:disabled) {
    transform: scale(1.1);
    background-color: #1c3e52;
}

.show-ans-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.show-img-button:hover {
    transform: scale(1.1);
}

.Ans-container-label {
    /* border: solid 1px green;     */
    padding-left: 10px;
    margin: clamp(20px, 4vw, 40px) 0;
}

.Ans-container-formula {
    display: flex;
    justify-content: center;
    text-align: center;
    /* border: solid 1px red; */
}

.setting-title-container {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: solid 3px var(--main-color);
    width: 80%;
    max-width: 600px;
    margin: 10px auto;
    border-radius: 10px;
    padding: 10px;
}

.setting-labels {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--sub1-color);
    font-size: clamp(20px, 3vw, 26px);
    height: 50px;
}

.setting-input {
    width: clamp(40px, 20vw, 60px);
    height: clamp(20px, 10vw, 30px);
}

.setting-button {
    background-color: var(--main-color);
    font-size: clamp(18px, 3vw, 25px);
    border-radius: 15px;
    font-weight: bold;
    color: white;
    width: clamp(150px, 15vw, 300px);
    height: clamp(50px, 6vw, 60px);
}

.setting-button:hover {
    transform: scale(1.1);
}

@media (max-width: 1450px) {
    main {
        flex-direction: column;
    }

    .vert-ads-region1 {
        display: none;
    }

    .hori-ads-region1 {
        display: block;
        width: 970px;
        height: 90px;
        /* border: solid 1px red; */
    }

    .square-ads-region1,
    .square-ads-region2,
    .square-ads-region3 {
        display: block;
        width: 300px;
        height: 250px;
        /* border: solid 1px red; */
    }
}

@media (max-width: 1300px) {
    .practice-main-container {
        flex-direction: column;
        align-items: center;
    }

    .practice-vert-ads-region1 {
        display: none;
    }

    .practice-hori-ads-region1 {
        display: block;
        width: 970px;
        height: 90px;
        /* border: solid 1px red; */
    }

    .practice-square-ads-region1,
    .practice-square-ads-region2,
    .practice-square-ads-region3 {
        display: block;
        width: 300px;
        height: 250px;
        /* border: solid 1px red; */
    }
}

@media (max-width: 900px) {
    .hori-ads-region1,
    .practice-hori-ads-region1 {
        display: none;
    }

    .hori-ads-region2,
    .practice-hori-ads-region2 {
        display: block;
        width: 728px;
        height: 90px;
        /* border: solid 1px red; */
    }

    .square-ads-region3,
    .practice-square-ads-region3 {
        display: none;
    }
}

@media (max-width: 700px) {
    .hori-ads-region2,
    .practice-hori-ads-region2 {
        display: none;
    }

    .hori-ads-region3,
    .practice-hori-ads-region3 {
        display: block;
        width: 468px;
        height: 60px;
        /* border: solid 1px red; */
    }

    .square-ads-region2,
    .practice-square-ads-region2 {
        display: none;
    }

    .main-section1 {
        display: flex;
        flex-direction: column;
    }

    #Canvas-Container {
        width: 100%;
    }

    #tree-canvas {
        height: 450px;
    }

    .main-right-section {
        width: 100%;
    }

    .first-nav-region {
        width: 100%;
        justify-content: space-evenly;
        border-radius: 30px;
    }

    .main-section2 {
        width: 100%;
    }

    .control-container {
        grid-template-columns: 1fr 1fr;
    }

    .control-container label {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .second-nav-region .control-container button {
        width: 220px;
        margin-bottom: 30px;
    }

    .element-panel {
        height: 280px;
    }
}