/* 基本スタイル（スマホ向け） */
.container {
  box-sizing: border-box;
  display: grid;
  grid-template-areas:
    "field_menu"
    "preview"
    "setting";
  grid-template-rows: auto auto 1fr;
  width: 100%;
  height: 100svh;
  padding: 0px;
  margin: 0 0;
}

/* タブレット向け（768px以上） */
@media screen and (min-width: 768px) {
  .container {
    grid-template-areas:
      "preview field_menu"
      "preview setting";
    grid-template-rows: auto 1fr;
    grid-template-columns: auto 1fr;
    width: 768px;
    height: clamp(0, 100svh, 750px);
    margin: 0 auto;
  }
}

p{
  margin: 0 0;
  padding: 0;
  clear: both;
}

div{
  box-sizing: border-box;
}

label {
  user-select: none;
}

.field_menu {
  grid-area: field_menu;
  background-color: lightgray;
  border: 1px solid black;
  margin: 0 0;
  padding: 0.5em 1em;
  line-height: 170%;
  width: stretch;
}

.preview_pane {
  width: 100%;
  padding: 0 0;
  grid-area: preview;
}

.field_container {
  margin: 0.5em 1em;
  font-size: clamp(8px, 4svh, 15px);
  display: grid;
  grid-template-columns: auto ;
  grid-template-rows: repeat(5, auto);
  gap: 0;
}

.zone_row {
  margin: 0 0;
  display: grid;
  grid-template-columns: repeat(6, 4em);
  grid-template-rows: auto;
  gap: 0;
}

.zone_container {
  display: inline-block;
  width: 4em;
  height: auto;
  margin: 0 0;
}

.card_container {
  display: block;
  width: 4em;
  height: 4em;
  margin: 0 0;
  position: relative;
}

.outline_vertical {
  width: 69%;
  height: 4em;
  border: 1px solid #999;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.outline_horizontal {
  width: 4em;
  height: 69%;
  border: 1px solid #88F;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.status_label {
  display: block;
  width: 4em;
  height: 1em;
  margin: 0 0; 
}
.status_label > label{
  font-size: 50%;
}

.zone_spacer {
  display: inline-block;
  width: 4em;
  height: 1em;
  margin: 0 0; 
}

.field_menu:has(#speed:checked) + div .master {
  display: none;
}

.setting_pane {
  grid-area: setting;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2em auto;
  background-color: gray;
  border: 1px solid black;
  margin: 0 0;
  padding: 0 0;
  line-height: 170%;
  width: stretch;
  height: stretch;
}

.tab_button {
  grid-row: 1;
  background-color: transparent;
  margin: 0 0;
  width: stretch;
  height: 2em;
  clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
  text-align: center;
}
.tab_button:has(:checked) {
  background-color: lightgray;
}
.tab_button input {
  display: none;
}
.tab_button label  {
  display: inline-block;
  line-height: 2em;
  width: 100%;
}

.tab_content {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: auto;
  grid-auto-column: 1fr;
  grid-template-rows: auto;
  grid-auto-rows: 1fr;
  background-color: lightgray;
  margin: 0 0;
  padding: 15px;
  width: 100%;
  height: stretch;
}
.tab_button:has(:checked) + .tab_content {
  display: grid;
}

.link-marker_grid {
  display: grid;
  grid-template-columns: repeat(3, 2.5em);
  grid-template-rows: repeat(3, 2.5em);
  text-align: center;
  margin: 0 auto;
}

.link-marker > input {
  display: none;
}
.link-marker {
  display: inline-block;
  width: 100%;
  height: 100%;
  font-size: 125%;
  line-height: 200%;
  text-align: center;
  opacity: 50%;
  color: black;
  -webkit-text-stroke: 2px gray;
}
.link-marker:has(:checked) {
  color: red;
  -webkit-text-stroke: 2px white;
}

.link-marker_grid:has(#link-marker:checked) > .link-marker {
  opacity: 100%;
}
