.ymr-widget {
  --ymr-ink: #090909;
  --ymr-paper: #f7f5ef;
  --ymr-line: #979793;
  --ymr-green: #00bc71;
  --ymr-red: #f4002f;
  width: 100%;
  max-width: 1080px;
  margin: 24px auto;
  color: var(--ymr-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
}

.ymr-widget *,
.ymr-widget *::before,
.ymr-widget *::after {
  box-sizing: border-box;
}

.ymr-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
}

.ymr-tabs {
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 7px;
  scrollbar-width: thin;
}

.ymr-tab {
  flex: 0 0 auto;
  min-width: 68px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font: 700 16px/1 "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  cursor: pointer;
}

.ymr-tab:hover,
.ymr-tab:focus-visible {
  border-color: #111;
  outline: 2px solid transparent;
}

.ymr-tab.is-active {
  border-color: #000;
  background: #000;
  color: #fff;
}

.ymr-archive-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 8px 0 11px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.ymr-archive-control select {
  width: 128px;
  height: 30px;
  margin: 0;
  padding: 0 26px 0 8px;
  border: 0;
  background-color: #fff;
  color: #111;
  font-size: 13px;
}

.ymr-panel[hidden] {
  display: none !important;
}

.ymr-report-stack {
  display: grid;
  gap: 24px;
  width: 100%;
}

.ymr-output {
  width: 100%;
}

.ymr-canvas-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ymr-paper);
}

.ymr-copy-actions {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.ymr-copy-status {
  color: #333;
  font-size: 13px;
  font-weight: 700;
}

.ymr-copy-status.is-error {
  color: #b00020;
}

.ymr-copy-button {
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #111;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font: 700 14px/1 "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  cursor: pointer;
}

.ymr-copy-button:hover {
  background: #333;
}

.ymr-copy-button:focus-visible {
  outline: 3px solid #6da7ff;
  outline-offset: 2px;
}

.ymr-copy-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ymr-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1080px;
  height: 1350px;
  overflow: hidden;
  transform: scale(var(--ymr-scale, 1));
  transform-origin: top left;
  background-color: var(--ymr-paper);
  background-image:
    radial-gradient(circle at 14% 12%, rgba(165, 145, 129, 0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 63%, rgba(163, 133, 144, 0.06) 0 1px, transparent 2px);
  background-size: 31px 29px, 37px 35px;
  color: var(--ymr-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
}

.ymr-logo {
  position: absolute;
  object-fit: contain;
}

.ymr-overview-header .ymr-logo {
  top: 28px;
  left: 58px;
  width: 112px;
  height: 112px;
}

.ymr-overview-title {
  position: absolute;
  top: 32px;
  left: 192px;
  right: 42px;
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.32;
  white-space: nowrap;
}

.ymr-overview-title > div:first-child {
  font-size: 43px;
}

.ymr-flag {
  display: inline-block;
  margin-left: 4px;
  font-size: 39px;
  vertical-align: 4px;
}

.ymr-market-section {
  position: absolute;
  left: 32px;
  right: 32px;
  border: 2px solid var(--ymr-line);
  border-radius: 24px;
}

.ymr-section-title {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 20px;
  margin: 0;
  padding: 0;
  color: #000;
  font-size: 35px;
  font-weight: 800;
  line-height: 1;
}

.ymr-section-main {
  top: 153px;
  height: 415px;
}

.ymr-section-risk {
  top: 604px;
  height: 300px;
}

.ymr-section-dividend {
  top: 942px;
  height: 299px;
}

.ymr-section-risk .ymr-section-title,
.ymr-section-dividend .ymr-section-title {
  font-size: 29px;
}

.ymr-market-grid {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(var(--ymr-columns, 6), minmax(0, 1fr));
  gap: 8px;
}

.ymr-section-main .ymr-market-grid {
  top: 66px;
  grid-template-columns: repeat(var(--ymr-columns, 4), minmax(0, 1fr));
  gap: 22px;
}

.ymr-section-risk .ymr-market-grid,
.ymr-section-dividend .ymr-market-grid {
  top: 44px;
}

.ymr-market-item {
  display: grid;
  min-width: 0;
  grid-template-rows: 1fr auto 34px;
  justify-items: center;
  text-align: center;
}

.ymr-market-item strong {
  align-self: end;
  max-width: 100%;
  overflow: hidden;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.ymr-section-risk .ymr-market-item,
.ymr-section-dividend .ymr-market-item {
  grid-template-rows: 139px 78px 23px;
}

.ymr-section-risk .ymr-market-item strong,
.ymr-section-dividend .ymr-market-item strong {
  align-self: start;
  font-size: 19px;
  line-height: 1;
}

.ymr-bar-zone {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 92px;
}

.ymr-section-main .ymr-bar-zone {
  min-height: 190px;
}

.ymr-zero-line {
  position: absolute;
  z-index: 0;
  top: var(--ymr-baseline, 50%);
  left: -7px;
  right: -7px;
  height: 1px;
  background: #84847f;
}

.ymr-bar {
  position: absolute;
  z-index: 1;
  left: 50%;
  width: 64%;
  height: var(--bar-height);
  border: 1.5px solid #151515;
  border-radius: 11px;
  transform: translateX(-50%);
}

.ymr-section-risk .ymr-bar,
.ymr-section-dividend .ymr-bar {
  width: 48%;
  border-radius: 6px;
}

.ymr-bar.is-positive {
  bottom: calc(100% - var(--ymr-baseline, 50%));
  background: var(--ymr-green);
}

.ymr-bar.is-negative {
  top: var(--ymr-baseline, 50%);
  background: var(--ymr-red);
}

.ymr-value {
  position: absolute;
  z-index: 2;
  left: 50%;
  min-width: 110px;
  color: #000;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ymr-value.is-positive {
  bottom: calc(100% - var(--ymr-baseline, 50%) + var(--bar-height) + 9px);
}

.ymr-value.is-negative {
  bottom: calc(100% - var(--ymr-baseline, 50%) + 10px);
}

.ymr-section-risk .ymr-value,
.ymr-section-dividend .ymr-value {
  min-width: 90px;
  font-size: 17px;
}

.ymr-market-icon {
  display: block;
  width: 105px;
  height: 105px;
  margin: 0 auto 2px;
  background-image: url("../images/market-icons.png");
  background-repeat: no-repeat;
  background-size: 400% 400%;
}

.ymr-section-risk .ymr-market-icon,
.ymr-section-dividend .ymr-market-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 0;
}

.ymr-icon-0 { background-position: 0 0; }
.ymr-icon-1 { background-position: 33.333% 0; }
.ymr-icon-2 { background-position: 66.667% 0; }
.ymr-icon-3 { background-position: 100% 0; }
.ymr-icon-4 { background-position: 0 33.333%; }
.ymr-icon-5 { background-position: 33.333% 33.333%; }
.ymr-icon-6 { background-position: 66.667% 33.333%; }
.ymr-icon-7 { background-position: 100% 33.333%; }
.ymr-icon-8 { background-position: 0 66.667%; }
.ymr-icon-9 { background-position: 33.333% 66.667%; }
.ymr-icon-10 { background-position: 66.667% 66.667%; }
.ymr-icon-11 { background-position: 100% 66.667%; }
.ymr-icon-12 { background-position: 0 100%; }
.ymr-icon-13 { background-position: 33.333% 100%; }
.ymr-icon-14 { background-position: 66.667% 100%; }
.ymr-icon-15 { background-position: 100% 100%; }

.ymr-icon-16,
.ymr-icon-17,
.ymr-icon-18,
.ymr-icon-19 {
  background-position: center;
  background-size: contain;
}

.ymr-icon-16 { background-image: url("../images/icon-nikkei225.png"); }
.ymr-icon-17 { background-image: url("../images/icon-innov-ai.png"); }
.ymr-icon-18 { background-image: url("../images/icon-qld.png"); }
.ymr-icon-19 { background-image: url("../images/icon-jepi.png"); }

.ymr-icon-17,
.ymr-icon-18,
.ymr-icon-19 {
  background-position: center 2px;
  background-size: 70% auto;
}

.ymr-icon-8,
.ymr-icon-9 {
  clip-path: inset(2px 0 7px);
}

.ymr-report-footer {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  text-align: center;
}

.ymr-report-footer strong {
  display: block;
  margin-top: 1px;
  font-size: 21px;
  font-weight: 800;
}

.ymr-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  height: 31px;
  font-size: 35px;
  font-weight: 900;
  line-height: 1;
}

.ymr-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 27px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 15px;
  letter-spacing: 1px;
}

.ymr-send {
  font-size: 30px;
  transform: rotate(-22deg);
}

.ymr-note {
  position: absolute;
  right: 37px;
  bottom: 42px;
  font-size: 23px;
  font-weight: 800;
}

.ymr-ranking-header .ymr-logo {
  top: 48px;
  left: 112px;
  width: 142px;
  height: 142px;
}

.ymr-ranking-title {
  position: absolute;
  top: 54px;
  left: 275px;
  right: 55px;
  text-align: center;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.42;
  white-space: nowrap;
}

.ymr-ranking-chart {
  position: absolute;
  top: 246px;
  left: 42px;
  right: 38px;
  height: 980px;
}

.ymr-ranking-zero-label {
  position: absolute;
  top: -27px;
  left: 540px;
  width: 80px;
  font-size: 17px;
  text-align: center;
  transform: translateX(-50%);
}

.ymr-ranking-zero-line {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 540px;
  width: 2px;
  background: #111;
}

.ymr-ranking-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  height: 49px;
  align-items: center;
}

.ymr-ticker {
  padding-right: 12px;
  font-size: 21px;
  font-weight: 800;
  text-align: right;
}

.ymr-ranking-axis {
  position: relative;
  height: 100%;
}

.ymr-ranking-bar {
  position: absolute;
  top: 11px;
  height: 27px;
  width: var(--bar-width);
  border-radius: 7px;
}

.ymr-ranking-bar.is-positive {
  left: 422px;
  background: var(--ymr-green);
}

.ymr-ranking-bar.is-negative {
  right: 460px;
  background: var(--ymr-red);
}

.ymr-ranking-value {
  position: absolute;
  top: 10px;
  min-width: 65px;
  font-size: 20px;
  line-height: 28px;
  white-space: nowrap;
}

.ymr-ranking-value.is-positive {
  left: calc(422px + var(--bar-width) + 7px);
}

.ymr-ranking-value.is-negative {
  right: calc(460px + var(--bar-width) + 7px);
  text-align: right;
}

.ymr-ranking-canvas .ymr-report-footer {
  bottom: 14px;
}

.ymr-empty {
  padding: 16px;
  border: 1px solid #bbb;
  background: #fff;
}

.ymr-landscape-shell {
  aspect-ratio: 16 / 9;
}

.ymr-nasdaq100-canvas {
  width: 1920px;
  height: 1080px;
}

.ymr-square-shell { aspect-ratio: 1; }
.ymr-overview-canvas { width: 1920px; height: 1920px; }
.ymr-ranking-canvas { width: 1920px; height: 1080px; }
.ymr-overview-header .ymr-logo { top: 28px; left: 50px; width: 138px; height: 138px; }
.ymr-overview-title { top: 28px; left: 218px; right: 50px; font-size: 42px; line-height: 1.35; }
.ymr-overview-title > div:first-child { font-size: 72px; }
.ymr-overview-canvas .ymr-market-section { left: 36px; right: 36px; border-radius: 8px; }
.ymr-overview-canvas .ymr-section-main { top: 200px; height: 530px; }
.ymr-overview-canvas .ymr-section-risk { top: 758px; height: 510px; }
.ymr-overview-canvas .ymr-section-dividend { top: 1296px; height: 510px; }
.ymr-overview-canvas .ymr-section-title { top: 20px; font-size: 38px; }
.ymr-overview-canvas .ymr-market-grid { top: 66px; bottom: 24px; gap: 22px; }
.ymr-overview-canvas .ymr-section-main .ymr-market-grid { top: 72px; }
.ymr-overview-canvas .ymr-market-item { grid-template-rows: 270px 110px 40px; }
.ymr-overview-canvas .ymr-section-main .ymr-market-item { grid-template-rows: 270px 120px 44px; }
.ymr-overview-canvas .ymr-bar-zone { min-height: 0; }
.ymr-overview-canvas .ymr-zero-line { left: -12px; right: -12px; }
.ymr-overview-canvas .ymr-market-icon { width: 110px; height: 110px; margin-bottom: 0; }
.ymr-overview-canvas .ymr-section-main .ymr-market-icon { width: 120px; height: 120px; }
.ymr-overview-canvas .ymr-market-item strong { align-self: center; font-size: 32px; line-height: 1; }
.ymr-overview-canvas .ymr-value { font-size: 32px; }
.ymr-overview-canvas .ymr-section-main .ymr-value { font-size: 38px; }
.ymr-overview-canvas .ymr-bar { width: min(60%, 170px); border-radius: 6px; }
.ymr-overview-canvas .ymr-report-footer { bottom: 36px; }
.ymr-overview-canvas .ymr-social { display: none; }
.ymr-overview-canvas .ymr-report-footer strong { font-size: 32px; }
.ymr-overview-canvas .ymr-note { right: 42px; bottom: 0; font-size: 26px; }

.ymr-stock-row {
  display: grid;
  grid-template-columns: 34px 56px 100px minmax(0, 1fr) 120px;
  gap: 14px;
  align-items: center;
  height: 66px;
  border-top: 1px solid #e2e1dc;
}
.ymr-stock-ticker { font-size: 28px; }
.ymr-stock-percent { font-size: 31px; text-align: right; white-space: nowrap; }
.ymr-stock-row.is-positive { --ymr-stock-color: var(--ymr-green); }
.ymr-stock-row.is-negative { --ymr-stock-color: var(--ymr-red); }
.ymr-stock-percent { color: var(--ymr-stock-color); }
.ymr-stock-axis { position: relative; height: 100%; }
.ymr-stock-axis::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #85857f; }
.ymr-stock-axis > span { position: absolute; top: 20px; height: 25px; background: var(--ymr-stock-color); }
.ymr-stock-row.is-positive .ymr-stock-axis > span { left: 50%; }
.ymr-stock-row.is-negative .ymr-stock-axis > span { right: 50%; }

.ymr-ndx-header .ymr-logo {
  top: 26px;
  left: 50px;
  width: 118px;
  height: 118px;
}

.ymr-ndx-title {
  position: absolute;
  top: 32px;
  left: 192px;
  right: 50px;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.ymr-ndx-date {
  position: absolute;
  top: 118px;
  left: 192px;
  right: 50px;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
}

.ymr-ndx-columns {
  position: absolute;
  top: 178px;
  right: 36px;
  bottom: 78px;
  left: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.ymr-ndx-column {
  min-width: 0;
  padding: 24px 22px 20px;
  border: 1.5px solid var(--ymr-line);
  border-radius: 8px;
}

.ymr-ndx-heading {
  height: 62px;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.ymr-ndx-gainers { --ymr-rank-color: var(--ymr-green); }
.ymr-ndx-losers { --ymr-rank-color: var(--ymr-red); }
.ymr-ndx-heading, .ymr-ndx-percent { color: var(--ymr-rank-color); }

.ymr-ndx-table-head {
  display: grid;
  grid-template-columns: 48px 1fr 140px;
  align-items: center;
  height: 38px;
  border-bottom: 1px solid var(--ymr-line);
  color: #555;
  font-size: 21px;
  font-weight: 700;
}

.ymr-ndx-table-head > :last-child { text-align: right; }

.ymr-ndx-row {
  display: grid;
  grid-template-columns: 34px 56px 252px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 14px;
  height: 66px;
  border-bottom: 1px solid #d8d7d2;
}

.ymr-ndx-row:last-child { border-bottom: 0; }
.ymr-ndx-rank { font-size: 24px; text-align: center; }

.ymr-company-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid #d7d7d7;
  border-radius: 50%;
  background: #fff;
  color: #444;
  font-size: 19px;
  font-weight: 800;
}

.ymr-company-icon img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 4px;
  object-fit: contain;
  background: #fff;
  border: 0;
  box-shadow: none;
}

.ymr-company-icon img[hidden] { display: none !important; }

.ymr-company-icon[data-ymr-symbol="V"] img { background: #252525; }

.ymr-company-icon:is([data-ymr-symbol="ADI"], [data-ymr-symbol="ADSK"], [data-ymr-symbol="ALNY"], [data-ymr-symbol="APP"], [data-ymr-symbol="AXON"], [data-ymr-symbol="CEG"], [data-ymr-symbol="CSX"], [data-ymr-symbol="CTAS"], [data-ymr-symbol="FAST"], [data-ymr-symbol="MRVL"], [data-ymr-symbol="REGN"], [data-ymr-symbol="VRTX"]) img {
  background: #252525;
}

.ymr-ndx-company { min-width: 0; }
.ymr-ndx-company strong { display: block; font-size: 28px; line-height: 1.15; }
.ymr-ndx-company > span {
  display: block;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ymr-ndx-bar-track { height: 25px; background: #e3e4e1; }
.ymr-ndx-bar-track > span { display: block; height: 100%; background: var(--ymr-rank-color); }
.ymr-ndx-percent { font-size: 31px; line-height: 1.2; text-align: right; white-space: nowrap; }
.ymr-ndx-row-empty { grid-template-columns: 34px 1fr; color: #777; font-size: 22px; }

.ymr-ndx-footer {
  position: absolute;
  right: 42px;
  bottom: 24px;
  left: 42px;
  text-align: center;
  font-size: 28px;
  line-height: 1;
}

.ymr-ndx-footer > span { position: absolute; right: 0; bottom: 0; font-size: 21px; }
.ymr-ndx-unavailable { position: absolute; inset: 178px 36px 78px; display: grid; place-items: center; font-size: 36px; }

@media (max-width: 680px) {
  .ymr-widget {
    margin: 16px auto;
  }

  .ymr-toolbar {
    display: block;
  }

  .ymr-tabs {
    margin-bottom: 7px;
  }

  .ymr-archive-control {
    width: 100%;
    justify-content: space-between;
  }

  .ymr-archive-control select {
    width: 62%;
  }

  .ymr-report-stack {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ymr-widget * {
    scroll-behavior: auto !important;
  }
}
