* {
  box-sizing: border-box;
  font-family: 'Noto Sans TC', sans-serif;
}
body {
  background-color: #F5F5F5; /* Soft off-white */
  color1: #222222;            /* Dark charcoal text for readability */
}
h1 { font-size:24px; font-weight:normal;}
h2 { font-size:20px; font-weight:normal;}
h3 { font-weight:normal;}
a {color:black;text-decoration: none;}
button {
 -webkit-user-select: none;
 user-select: none;
}
.pCenter {text-align:center;}
.fa {
  padding-top: 5px;
  font-size: 20px;
  width: 30px;
  height:30px;
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
  border-radius: 50%;
  color:white;
}
.fa:hover {opacity: 0.7;}
.fa-facebook {background:#3B59BB;}
.fa-twitter {background: #55ACEE;}
.fa-google {background: #dd4b39;}
.fa-linkedin {background: #007bb5;color:white;}
.fa-instagram {background: #125688;}
.fa-pinterest {background: #cb2027;}

div.mHeader {
 position: fixed;top:0;width:100%;height:50px;margin:0;padding:10px;z-index:1;background-color:tan;
 font-size:16px;
}
div.mHeaderT {display:inline; margin-left:10px; text-align:left; font-size:24px;
}
div.mHeaderT span {display:inline-block; font-size:28px; margin-top:-7px;
}
div.mHeaderT2 {display:inline-block; margin-left: 10px; vertical-align:top;
}
div.mHeaderC {display:inline-block; margin-right:10px;float:right;cursor:pointer;
}
.container {
 position:relative;
 top:50px;
 max-width:1200px;
 min-height: calc(100vh - 100px);
 margin:0 auto;
 font-family: 'Noto Sans TC', sans-serif;
}
.dChordButtons, .dChordButtonsM {
 display:inline-block;
 background-color:tan;
 color:black;
 padding:4px;width:auto;
 border:none;
 border-radius:8px;
}
.dChordButtons {
 margin-bottom:5px;
}
.btn-group button, .btn-group2 button, .btn-groupM button, .btn-groupM2 button {
 font-size:16px;
 background-color: rgb(240,240,240);
 color:black;
 width:60px;
 height:35px;
 vertical-align:bottom;
 text-align:center;
 border:none;
 border-radius:8px;
 margin-bottom:8px;
 margin-right:8px;
 padding:0px;
}
.btn-group2 button, .btn-groupM2 button {
 margin-bottom:0px;
}
.btn-groupM button, .btn-groupM2 button {
}
.btn-group button:last-child,.btn-group2 button:last-child,.btn-groupM button:last-child, .btn-groupM2 button:last-child {
 margin-right:0px;
}
.btn-group2 input,label {
 margin-top:0px;
}
@media (max-width: 680px) {
 .dChordButtons button {width:44px;}
 .dChordButtonsM button {width:44px;}
}
@media (max-width: 380px) {
 .dChordButtons button {width:40px;}
 .dChordButtonsM button {width:40px;}
}
@media (max-width: 370px) {
 .dChordButtons {white-space:nowrap;}
}
@media (max-height: 400px) {
 div.mHeader {position:static;}
 div.container {top:0px;}
}

/*contact form styles*/
.center {
 margin:auto;
 max-width:700px;
 }
.contact {
 position:relative;
}
.contact input, textarea {
 display:block;
 padding: 12px;
 width:100%;
 font-family:inherit;
 font-size:inherit;
 }
.contact label {
 padding-top:4px;
 display:block;
 width:100%;
 }
.contact textarea {
 height:200px;
}
.turha {
 display:none;
}

:root {
 --natural-bg-color:  green;
 --naturalm-bg-color: limegreen;
 --sharps-bg-color:  #0052D4;
 --sharpsm-bg-color: #A04000;
 --tx-color:white;
 --flats-bg-color:  #007bff;
 --flatsm-bg-color: #E67E22;
 --cof-major-lane-color: bisque;
}
.styleNoteRect {
 fill: white;
}
.styleSharpsRect {
 fill: var(--sharps-bg-color);
}
.styleSharpsText {
 fill: var(--tx-color);
 color: var(--tx-color);
 text-anchor:middle;
 dominant-baseline:central;
}
.styleSharpsmRect {
 fill: var(--sharpsm-bg-color);
}
.styleSharpsmText {
 fill: var(--tx-color);
 text-anchor:middle;
 dominant-baseline:central;
}
.styleFlatsRect {
 fill: var(--flats-bg-color);
}
.styleFlatsText {
 fill: var(--tx-color);
 color: var(--tx-color);
 text-anchor:middle;
 dominant-baseline:central;
}
.styleFlatsmRect {
 fill: LightSalmon;
}

.styleGhostFret {
 stroke-dasharray: 5px, 5px;
 stroke-linecap: round;
 stroke: black;
 stroke-width: 1px;
}

.cof-main-container {
 display:flex;
 flex-direction:row;
 align-items: flex-start;
 justify-content:center;
 gap:10px;
 /*background:tan;*/
}
.cof-container {
 position:relative; /*added 14.11.2026 17:21*/
 width:340px;
 height:420px; /*cof + title*/
 max-width: 600px;
 padding: 2px;
 /*background:red;*/
 flex-shrink: 0;
}
.svg-wrapper {
 position: relative;
 display: inline-block; /* Shrinks wrapper to fit the SVG */
 width: 100%;
 max-width: 600px;
}
#idCOFSvg {
	display:block;
	width: 100%;
	height: 100%;
	max-width1: 100vw; /*android*/
	max-height1: 100vh;
	object-fit1: contain;
	touch-action1: none; /*enable if drag*/
}
.cof-btn-container {
	background:tan;
	display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
    width: fit-content;
	border-radius:8px;
	padding:4px;
}
@media (max-width: 744px) {
	.cof-main-container {flex-direction:column;}
	.cof-container {
		margin:0 auto; /*in narrow display cof will center*/
		width: 100%;/*clamp(330px, 50dvh, 600px);*/
		max-width: 500px;
		height:auto;
		height1: clamp(420px, 60dvh, 680px);
		/*background:green;*/
	}
    .cof-btn-container {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
		margin:0 auto;
    }
}
@media (min-width: 745px) {
  .cof-container {
	width: clamp(340px, 50dvh, 600px);
	height:auto;
	/*background:blue;*/
  }
}
.cof-btn-container button {
 font-size:16px;
 background-color: rgb(240,240,240);
 color:black;
 width:50px;
 height:35px;
 border:none;
 border-radius:8px;
 box-sizing:border-box;
}
.cof-btn-container button[aria-pressed="true"] {
 background-color:#B8B8B8;
}
.cof-btn-container button[aria-pressed="false"] {
 color:darkgray;
}
.cof-title-container {
	display:flex;
	border:1px;
	border-radius: 8px 8px 0px 0px;
	background-color:bisque;
	height:80px;
	justify-content:center;
	align-items: flex-start;
	user-select:none;
	position:relative;
}
.cof-bg-rect {
	fill:#FFFFFF;
	border: 1px solid #EAEAEA;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cof-circle1 {
	fill:bisque;
	stroke:#2a374e;
	stroke-width:2px;
	cursor: default;
	touch-action:none;
	user-select:none;
	-webkit-user-select:none;
}
.sector-divider {
	stroke:#2a374e;
	stroke-width:1px;
	/*stroke-dasharray:4 4;*/
	opacity:0.6;
}
.sector-movable {
	fill:rgba(37, 99, 235, 0.20);/*best*/
	fillx:rgba(52, 152, 219, 0.3);/*original*/
	stroke:#2563EB;/*#2980b9;*/
	stroke-width:2px;
	cursor:default;
	cursor: ; /*android*/
	touch-action:none;
}
.sector-movable-minor {
	fill:rgba(230, 126, 34, 0.28);
	stroke:#D35400;
}

.auto-rot-btn {
	display:flex;
	align-items:center;
	user-select:none;
	font-size:16px;
	position: absolute;
	right: 1%;
	top: 5%;
}
/*@media (orientation:landscape) {
	.auto-rot-btn {
		top: 5vh;
	}
}*/
.i-button {
	border:none;
	border-radius:8px;
	height:30px;
	width:20px;
	color:black;
	font-weight:bold;
	background:tan;
}

.natural-major-text {font-family:system-ui,sans-serif;fill:var(--natural-bg-color);font-size:28px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;}
.natural-minor-text {font-family:system-ui,sans-serif;fill:var(--natural-bg-color);font-size:20px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;}
.sharps-major-text {font-family:system-ui,sans-serif;fill:var(--sharps-bg-color);font-size:28px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;}
.sharps-minor-text {font-family:system-ui,sans-serif;fill:var(--sharpsm-bg-color);font-size:20px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;}
.flats-major-text {font-family:system-ui,sans-serif;fill:var(--flats-bg-color);font-size:28px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;}
.flats-minor-text {font-family:system-ui,sans-serif;fill:var(--flatsm-bg-color);font-size:20px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:pointer;user-select:none;} 
.acc-label-text {font-family:system-ui,sans-serif;font-size:14px; fill:black;text-anchor:middle;dominant-baseline:central;user-select:none;pointer-events:none;cursor:default;}

.cof-center-text1 {font-family:system-ui,sans-serif;font-size:18px;font-weight:bold;fill:#d4af37;text-anchor:middle;letter-spacing:1px; user-select:none;}
.cof-center-text2 {font-family:system-ui,sans-serif;font-size:22px; font-weight:900;fill:darkgoldenrod;text-anchor:middle;letter-spacing:2px; user-select:none;}

.sector-major-degree-text {fill:dimgray;font-size:20px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:default;user-select:none;}
.sector-minor-degree-text {fill:dimgray;font-size:20px;font-weight:bold;text-anchor:middle;dominant-baseline:central;cursor:default;user-select:none;}

.major-sign-text {font-family:system-ui,sans-serif;font-size:18px;font-weight:bold;fill:var(--sharps-bg-color);text-anchor:end;letter-spacing:1px; user-select:none;pointer-events:none;}
.minor-sign-fill {fill:var(--sharpsm-bg-color);}

.svg-lasso {
  fill: rgba(0, 150, 255, 0.1); /* Subtle translucent highlight inside */
  stroke: #0096ff;              /* Rope color */
  stroke-width: 2.5px;          /* Slightly thicker for a rope feel */
  stroke-dasharray: 8, 5;       /* Length of dashed lines and spaces */
  animation: lasso-march 0.5s linear infinite;
  pointer-events:none;
  /*transform-origin: center;*/
}

@keyframes lasso-march {
  to {
    stroke-dashoffset: -13;     /* Moves the dashes forward (8 + 5 = 13) */
  }
}

.svg-lasso-text {
	text-anchor:middle;
	dominant-baseline:central;
	pointer-events:none;
}

/*TEST STYLES*/
/** {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}*/

body {
  font-family: system-ui, sans-serif;
  line-height1: 1.5;
}
.intro, footer {
  padding: 1.5rem;
  background: #f8fafc;
}

/* --- BASE / MOBILE LAYOUT (All Stacked) --- */
.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0;/*0.75rem;*/
}

.fretboard, .cof-btn-container2, .info-panel, .cof-container2 {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.fretboard {
	width:100%;
	justify-self:center;
}

.cof-btn-container2,.info-panel, .cof-container2 {
 width:100%;
 max-width:500px;
 justify-self:center;
 box-sizing:border-box;
}

.cof-btn-container2, .cof-container2 {
  padding: 0.5rem;
}
.cof-btn-container2 button {
 font-size:16px;
 background-color: rgb(240,240,240);
 color:black;
 width:50px;
 height:35px;
 border:none;
 border-radius:8px;
 box-sizing:border-box;
}
.cof-btn-container2 button[aria-pressed="true"] {
 background-color:#B8B8B8;
}
.cof-btn-container2 button[aria-pressed="false"] {
 color:darkgray;
}

/* Base SVG behavior (used by cof-container2) */
svg {
  display: block;
  width: 100%;
  height: auto;
}

/* fretboard & info-panel fill 100% of their box width at a locked height on all screens */
.fretboard, .info-panel {
  padding: 0;
}

.fretboard svg {
  width: 100%;
  height: 170px;       /* Exact fixed height for fretboard */
}

.info-panel svg {
  width: 100%;
  height: 80px;       /* Exact fixed height for info-panel */
}

/* Lock cof-btn-container2 height permanently (single-line button bar) */
.cof-btn-container2 {
  display: flex;
  flex-wrap: nowrap;
  justify-content:center;
  gap: 0.5rem;
  overflow-x: auto;
}

/* Positioning for Div 5's top-right button */
.cof-container2 {
  position: relative;
  margin-top1: -0.75rem;
}
.info-panel {
 position:relative;
 font-size:18px;
}

.corner-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

/* --- WIDE DISPLAYS (Div 5 Moves to the Right) --- */
/*@media (min-width: 768px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "rect   rect"
      "btns   square"
      "info   square";
  }

  .fretboard {
    grid-area: rect;
  }

  .cof-btn-container2 {
    grid-area: btns;
  }

  .info-panel {
    grid-area: info;
    align-self: start;
  }

  .cof-container2 {
    grid-area: square;
  }
}
@media (min-width: 768px) and (min-height: 500px) {
 .cof-btn-container2,.info-panel, .cof-container2 {
    max-width: none;
    justify-self: stretch;
  }
}*/
/* Keeps Portrait Tablets stacked, while Landscape Tablets & Split Desktops use 2 columns */
@media (min-width: 600px) and (min-height: 500px) and (pointer: fine),
/* 2. Tablets (touchscreen): Switches to 2 columns in landscape (600px+) or on very wide screens (1050px+) */
       (min-width: 600px) and (min-height: 500px) and (orientation: landscape),
       (min-width: 1050px) and (min-height: 500px) {
  /* Two-column rules here */
    .workspace {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "rect   rect"
      "btns   square"
      "info   square";
  }

  .fretboard {
    grid-area: rect;
  }

  .cof-btn-container2 {
    grid-area: btns;
  }

  .info-panel {
    grid-area: info;
    align-self: start;
  }

  .cof-container2 {
    grid-area: square;
  }
  .cof-btn-container2,.info-panel, .cof-container2 {
    max-width: none;
    justify-self: stretch;
  }
}
