@layer common, base, components, utilities;

@layer common {
  * { margin: 0; padding: 0; }
  @font-face { font-family: "04b"; src: url("../font/04b.ttf"); }
  @font-face { font-family: "04bf"; src: url("../font/04bf.woff"); }
  @font-face { font-family: "mother"; src: url("../font/mother.ttf"); }
  @font-face { font-family: "3x3"; src: url("../font/3x3.ttf"); }
  body,html,:where(body),:where(html) {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
    -webkit-overflow-scrolling: touch !important;
    -webkit-user-select: none !important;
    -webkit-font-smoothing: antialiased;
    cursor: default !important;
    user-select: none !important;
    text-rendering: optimizeLegibility;
  }
  /*Common-open*/
  :root {
    --profile-1:  rgba(197, 175, 144, 1.00); 
    --profile-2:  rgba(197, 175, 144, 0.60); 
    --profile-3:  rgba(197, 175, 144, 0.40);
    --profile-4:  rgba(197, 175, 144, 0.32);
    --profile-5:  rgba(197, 175, 144, 0.20);
    --profile-6:  #1D1A15;
    --profile-bg: rgba(197, 175, 144, 0.04);
    --profile-o:  rgba(10, 10, 10, 0);
    --profile-black: #000000;
    --profile-orange: #DD5639;
    --profile-cyan: #20A5A6;
    --profile-green: #243E2E;
  }
  body {
    font-size: 8px;
    color: var(--profile-1);
    font-family: "3x3";
    text-align: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--profile-black);
  }
  body::after, notif::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: url("data:image/svg+xml,%3Csvg width='1' height='1' viewBox='0 0 1 1' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.333333 0.333333H0.666667V0.666667H0.333333V0.333333Z' fill='black'/%3E%3Cpath d='M0.666667 0H1V0.333333H0.666667V0Z' fill='black'/%3E%3Cpath d='M0 0.666667H0.333333V1H0V0.666667Z' fill='black'/%3E%3C/svg%3E%0A");
    background-repeat: repeat;
    filter: brightness(1) contrast(1.2) saturate(0.8) sepia(0.2) grayscale(0);
    mix-blend-mode: overlay;
    pointer-events: none;
  }
}
@layer base {
  page01, list, list01, list02, file, cta, 
  page02, display, gamepad, notif {
    display: grid;
    width: 100%; 
  }
  page01, page02 {
    position: absolute;
    height: 100vh;
    padding: 20px 20px 40px 20px;
    box-sizing: border-box;
  }
  rom, file, logo, setting, vertical, label, screen, opti, state-button, l-button, r-button, menu-button, dpad-section, a-button, b-button, f-button, select-button, start-button {
    background-color: var(--profile-bg) !important;
    outline: 1px solid var(--profile-6);
  }
  [hidden] { display: none !important }
  [op4] { opacity: 0.4 !important }
  [op8] { opacity: 0.8 !important }
  [jus], opti { justify-content: center }
}
@layer page-1 {
  page01 {
    grid-template-rows: 1fr 50px;
    gap:8px;
  }
  list, list01, list02 {
    grid-template-rows: repeat(12, auto);
    text-align: left;
    align-content: start;
    transform: rotate(180deg);
    gap:1px;
  }
  rom, titl, file, cont {
    display: flex;
    column-gap: 1px;
    transform: rotate(180deg);
  }
  titl {
    padding: 16px 0px 6px 0px;
    color:var(--profile-4);
  }
  name, ver, opti {
    display: flex;
    flex:1;
    padding: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  cta {
    grid-template-columns: auto 50px 50px 90px;
    gap: 8px; 
  }
  logo {
    background: url("data:image/svg+xml,%3Csvg width='64' height='14' viewBox='0 0 64 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 1V7M6 13V7M6 7H12M12 3H16M12 11H16M22 13V7H26M30 13V7H26M26 7V1' stroke='%23243E2E' stroke-width='4'/%3E%3Cpath d='M2 1V13M8 3H12M8 11H12M18 13V5M20 3H24M24 11H28' stroke='%23243E2E' stroke-opacity='0.4' stroke-width='4'/%3E%3Cpath d='M54 1V11H62V1M38 3H42V7H46V11H38V3Z' stroke='%23C5AF90' stroke-width='4'/%3E%3C/svg%3E%0A");
  }
  setting {
    background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 5H3V3H5V0M0 9H3V11H5V14M9 14V11H11V9H14' stroke='%23C5AF90' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M9 0V3H11V5H14' stroke='%23C5AF90' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  label { 
    background: url("data:image/svg+xml,%3Csvg width='64' height='14' viewBox='0 0 64 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 5H16M17 4V0M23 0V6M31 0V6' stroke='%23243E2E' stroke-opacity='0.6' stroke-width='2'/%3E%3Cpath d='M22 9H19M22 13H19M19 13H17V9H19M19 13V9M30 9H25V13H30M32 9H35M38 9H35M35 9V14M43 0V3M43 3H45V5H47V7M43 3V7M47 7H50M47 7V9H45V11H43M47 7H43M43 11V14M43 11V7' stroke='%23C5AF90' stroke-width='2'/%3E%3Cpath d='M16 5H19V1H22M30 1H27M30 5H27M27 5H25V1H27M27 5V1M33 0V5H38' stroke='%23243E2E' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  more { 
    width: 40px;
    background: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 1H2M0 5H2M0 9H2M4 1H6M8 1H10M4 5H6M8 5H10M4 9H6M8 9H10' stroke='%23C5AF90' stroke-opacity='0.32' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  dele {
    width: 40px;
    background: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 5H10M6 5H4M2 5H0' stroke='%23C5AF90' stroke-opacity='0.32' stroke-width='2'/%3E%3Cpath d='M8 9H10M6 9H4M2 9H0' stroke='%23C5AF90' stroke-opacity='0.08' stroke-width='2'/%3E%3Cpath d='M8 1H10M6 1H4M2 1H0' stroke='%23C5AF90' stroke-opacity='0.08' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  logo, setting, label, more, down, dele {
    background-position: center;
    background-repeat: no-repeat;
  }
}
@layer page-2 {
  page02 {
    justify-items: center;
    padding: 5px;
  }
  /* layer display */
  display {
    z-index: 2;
    grid-template-rows: 1fr 10px;
    position: relative;
  }
  display::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    filter: brightness(1) contrast(1.2) saturate(0.8) sepia(0.2) grayscale(0);
    background: var(--background);
    background-repeat: repeat;
    width: var(--width);
    height: var(--height);
    transform: scale(var(--scale));
    transform-origin: top left;
    mix-blend-mode: overlay;
    pointer-events: none;
  }
  display canvas {
    filter: brightness(0.8) contrast(1.2) saturate(0.8) sepia(0.2) grayscale(0);
  }
  page02 canvas, notif {
    width:100%;
    image-rendering: pixelated;
  }
  notif {
    font-family: "04b";
    position: relative;
    grid-template-columns: 1fr auto;
    color: var(--profile-3);
    text-align: left;
    align-items: end;
    transition: all 0.5s ease-in-out;
  }
  notif titles, times{
    line-height: 6px;
    height: 7px;
  }
  notif times{
    font-family: "04bf";
    position: relative;
    right: -1px;
  }
  /* layer gamepad */
  page02 gamepad {
    padding: 1px;
    grid-template-columns: 1fr 1px 1fr 1px 1fr 1px 1fr 1px 10px 1px 1fr 1px 1fr 1px 1fr 1px 1fr;
    grid-template-rows: 24px 8px 1fr 1px 1fr 1px 24px;
  }
  state-button  {position: relative; grid-area: state-button;  grid-row: 1 / 1; grid-column: 1 / 1}
  l-button      {position: relative; grid-area: l-button;      grid-row: 1 / 1; grid-column: 3 / 9}
  r-button      {position: relative; grid-area: r-button;      grid-row: 1 / 1; grid-column: 11 / 16}
  menu-button   {position: relative; grid-area: menu-button;   grid-row: 1 / 1; grid-column: 17 / 18}
  dpad-section  {position: relative; grid-area: dpad-section;  grid-row: 3 / 8; grid-column: 1 / 9}
  a-button      {position: relative; grid-area: a-button;      grid-row: 3 / 3; grid-column: 11 / 18}
  wrap-button   {position: relative; grid-area: a-button;      grid-row: 3 / 3; grid-column: 11 / 16}
  b-button      {position: relative; grid-area: b-button;      grid-row: 5 / 5; grid-column: 11 / 16}
  f-button      {position: relative; grid-area: f-button;      grid-row: 5 / 5; grid-column: 17 / 18}
  select-button {position: relative; grid-area: select-button; grid-row: 7 / 7; grid-column: 11 / 14}
  start-button  {position: relative; grid-area: start-button;  grid-row: 7 / 7; grid-column: 15 / 18}

  state-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='6' viewBox='0 0 23 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3H14' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  l-button {
    background: url("data:image/svg+xml,%3Csvg width='22' height='6' viewBox='0 0 22 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 0V5H10M20 5H22M13 5V1H15V3H17V5H13Z' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  r-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='6' viewBox='0 0 23 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6V1H11M21 5H23M14 5V1H16V3H18V5H14Z' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  menu-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='6' viewBox='0 0 23 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3H14' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  dpad-section {
    background: url("data:image/svg+xml,%3Csvg width='136' height='136' viewBox='0 0 136 136' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68 0V6M0 68H6M68 130V136M130 68H136' stroke='%23C5AF90' stroke-width='3'/%3E%3C/svg%3E%0A");
  }
  wrap-button {
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='23' height='9' viewBox='0 0 23 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 9V4.5H11.5M14.5 9V4.5H11.5M11.5 4.5V0' stroke='%23C5AF90' stroke-width='3'/%3E%3C/svg%3E%0A");
  }
  b-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='9' viewBox='0 0 23 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.5V7.5H14.5V4.5H11.5V1.5H8.5Z' stroke='%23C5AF90' stroke-width='3'/%3E%3C/svg%3E%0A");
  }
  f-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='9' viewBox='0 0 23 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 1H14' stroke='%23C5AF90' stroke-width='2'/%3E%3Cpath d='M9 8H14' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  f-button.active {
    background: url("data:image/svg+xml,%3Csvg width='23' height='9' viewBox='0 0 23 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 1H14' stroke='%23C5AF90' stroke-width='2'/%3E%3Cpath d='M9 8H14' stroke='%23C5AF90' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  select-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='6' viewBox='0 0 23 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5H8V1H11M19 5H14V1H19M21 5H23' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  start-button {
    background: url("data:image/svg+xml,%3Csvg width='23' height='6' viewBox='0 0 23 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5H8V1H11M13 1H16M16 1V6M16 1H19M21 5H23' stroke='%23C5AF90' stroke-opacity='0.4' stroke-width='2'/%3E%3C/svg%3E%0A");
  }
  state-button, menu-button, l-button, r-button, dpad-section, a-button, wrap-button, b-button, f-button, select-button, start-button {
  background-position: center !important;
  background-repeat: no-repeat !important;
  }
}
@layer page-3 {}