@charset "UTF-8";

:root {
  color-scheme: dark;

  --background: #05070d;
  --background-soft: #0a0f19;
  --panel: rgba(13, 19, 31, 0.88);
  --panel-strong: #101827;
  --panel-border: rgba(255, 255, 255, 0.10);

  --text: #f4f7fb;
  --text-soft: #aeb8c8;
  --text-muted: #748197;

  --accent: #58a6ff;
  --accent-strong: #2478ff;
  --accent-soft: rgba(88, 166, 255, 0.16);

  --positive: #42d69a;
  --negative: #ff7188;
  --neutral: #9aa7b8;
  --sample: #f2c66d;

  --radius-large: 30px;
  --radius-medium: 22px;
  --radius-small: 14px;

  --shadow-large: 0 30px 80px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.24);

  --page-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;

  color: var(--text);
  background:
    radial-gradient(
      circle at 10% 5%,
      rgba(36, 120, 255, 0.18),
      transparent 34rem
    ),
    radial-gradient(
      circle at 95% 38%,
      rgba(103, 70, 255, 0.12),
      transparent 30rem
    ),
    linear-gradient(180deg, #060910 0%, #05070d 100%);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;

  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    );

  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.24;
}

.ambient-one {
  top: 10%;
  left: -10rem;
  background: #2478ff;
}

.ambient-two {
  right: -12rem;
  bottom: 10%;
  background: #6946ff;
}

.app-shell {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 14px)
    max(18px, env(safe-area-inset-right))
    calc(env(safe-area-inset-bottom) + 30px)
    max(18px, env(safe-area-inset-left));
}

.site-header {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 10px);
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-height: 60px;
  margin-bottom: 22px;
  padding: 10px 12px 10px 16px;

  background: rgba(7, 11, 18, 0.76);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);

  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.14em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;

  color: #07101e;
  background: linear-gradient(145deg, #ffffff, #9fcaff);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.28);

  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.brand-name {
  font-size: 0.86rem;
  font-weight: 800;
}

.data-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 38px;
  padding: 8px 12px;

  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;

  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--neutral);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(154, 167, 184, 0.10);
}

.data-status.is-ready .status-dot {
  background: var(--positive);
  box-shadow: 0 0 0 5px rgba(66, 214, 154, 0.10);
}

.data-status.is-sample .status-dot {
  background: var(--sample);
  box-shadow: 0 0 0 5px rgba(242, 198, 109, 0.10);
}

.data-status.is-error .status-dot {
  background: var(--negative);
  box-shadow: 0 0 0 5px rgba(255, 113, 136, 0.10);
}

main {
  display: grid;
  gap: 24px;
}

.briefing {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
  min-height: 660px;
  overflow: hidden;

  background:
    linear-gradient(
      125deg,
      rgba(17, 27, 44, 0.98),
      rgba(7, 11, 18, 0.96)
    );
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-large);
}

.briefing::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      rgba(88, 166, 255, 0.18) 0,
      transparent 1px
    );
  background-size: 94px 100%;
  opacity: 0.24;
}

.briefing-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  padding: clamp(32px, 6vw, 72px);
}

.eyebrow,
.section-kicker {
  margin: 0;

  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.briefing h1 {
  max-width: 720px;
  margin: 18px 0 20px;

  font-size: clamp(2.25rem, 6vw, 4.9rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.briefing h1 span {
  display: block;
  margin-top: 0.18em;

  color: transparent;
  background: linear-gradient(110deg, #ffffff 4%, #86bfff 48%, #7c8cff);
  background-clip: text;
  -webkit-background-clip: text;
}

.arc-message {
  max-width: 560px;
  min-height: 5.4em;
  margin: 0;

  color: #d8e0ec;
  font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.9;
}

.briefing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.speak-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 52px;
  padding: 13px 20px;

  color: #06101f;
  background: linear-gradient(135deg, #ffffff, #8bc1ff);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(36, 120, 255, 0.25);

  font-size: 0.92rem;
  font-weight: 850;
  cursor: pointer;

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.speak-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(36, 120, 255, 0.34);
}

.speak-button:not(:disabled):active {
  transform: translateY(0);
}

.speak-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.speech-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.arc-visual {
  position: relative;
  min-width: 0;
  min-height: 660px;
  margin: 0;
  overflow: hidden;
}

.arc-visual::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      var(--panel-strong) 0%,
      transparent 28%
    ),
    linear-gradient(
      0deg,
      rgba(5, 7, 13, 0.92) 0%,
      transparent 30%
    );
}

.arc-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;

  filter:
    saturate(0.96)
    contrast(1.03);

  transform: scale(1.01);
  animation: arc-breathe 5.2s ease-in-out infinite;
}

@keyframes arc-breathe {
  0%,
  100% {
    transform: scale(1.01) translateY(0);
  }

  50% {
    transform: scale(1.015) translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arc-visual img {
    animation: none;
  }
}

.arc-visual figcaption {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;

  display: grid;
  justify-items: end;

  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.arc-visual figcaption span {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

.dashboard-section,
.update-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);

  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.dashboard-section {
  padding: clamp(22px, 4vw, 38px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2,
.update-panel h2 {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.market-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.025)
    );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-medium);
}

.market-card::after {
  position: absolute;
  top: -28px;
  right: -28px;
  width: 84px;
  height: 84px;
  content: "";
  pointer-events: none;

  background: var(--accent-soft);
  border-radius: 999px;
  filter: blur(20px);
}

.market-card-top,
.stock-main,
.stock-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-name,
.stock-name {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.market-symbol,
.stock-symbol {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.market-value {
  margin: 22px 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.035em;
}

.market-unit {
  margin-left: 5px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.change {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  margin: 0;
  font-size: 0.78rem;
  font-weight: 850;
}

.change.up {
  color: var(--positive);
}

.change.down {
  color: var(--negative);
}

.change.flat {
  color: var(--neutral);
}

.stock-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stock-item {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 17px 18px;

  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 18px;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.stock-item:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(88, 166, 255, 0.22);
  transform: translateY(-1px);
}

.stock-title {
  min-width: 0;
}

.stock-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-price {
  margin: 0;
  font-size: 1.17rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.stock-unit {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.stock-date {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.69rem;
}

.stock-error {
  color: var(--negative);
  font-size: 0.82rem;
  font-weight: 750;
}

.update-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
}

.update-panel > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  text-align: right;
}

.update-panel .sample-label {
  display: block;
  margin-top: 4px;
  color: var(--sample);
  font-size: 0.7rem;
  font-weight: 800;
}

.loading-message,
.error-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;

  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-small);

  text-align: center;
}

.error-message {
  color: #ffd4dc;
  border-color: rgba(255, 113, 136, 0.30);
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 6px 4px;

  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-footer p {
  margin: 0;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;

  margin: 0;
  padding: 16px;

  color: #ffffff;
  background: #8c2437;
  border-radius: 14px;

  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(88, 166, 255, 0.82);
  outline-offset: 4px;
}

@media (max-width: 820px) {
  .briefing {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .briefing-copy {
    padding: 34px 26px 10px;
  }

  .briefing h1 {
    font-size: clamp(2.1rem, 10vw, 3.5rem);
  }

  .arc-message {
    min-height: auto;
  }

  .arc-visual {
    min-height: 560px;
  }

  .arc-visual::before {
    background:
      linear-gradient(
        180deg,
        var(--panel-strong) 0%,
        transparent 16%
      ),
      linear-gradient(
        0deg,
        rgba(5, 7, 13, 0.92) 0%,
        transparent 28%
      );
  }

  .arc-visual img {
    object-position: 50% 14%;
  }

  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .site-header {
    top: calc(env(safe-area-inset-top) + 6px);
    margin-bottom: 14px;
  }

  .brand-name {
    display: none;
  }

  .data-status {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  main {
    gap: 14px;
  }

  .briefing,
  .dashboard-section,
  .update-panel {
    border-radius: 24px;
  }

  .briefing-copy {
    padding: 30px 22px 8px;
  }

  .briefing h1 {
    margin-top: 14px;
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .arc-message {
    font-size: 0.94rem;
    line-height: 1.8;
  }

  .briefing-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 22px;
  }

  .speak-button {
    width: 100%;
    min-height: 54px;
  }

  .speech-status {
    text-align: center;
  }

  .arc-visual {
    min-height: 520px;
  }

  .arc-visual figcaption {
    right: 18px;
    bottom: 18px;
  }

  .dashboard-section {
    padding: 22px 16px;
  }

  .section-heading {
    align-items: center;
    margin-bottom: 18px;
  }

  .market-grid {
    gap: 10px;
  }

  .market-card {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .market-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .market-value {
    margin-top: 18px;
    font-size: 1.25rem;
  }

  .stock-list {
    grid-template-columns: 1fr;
  }

  .stock-item {
    padding: 16px;
  }

  .update-panel {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .update-panel > p {
    text-align: left;
  }
}

@media (max-width: 370px) {
  .market-grid {
    grid-template-columns: 1fr;
  }

  .arc-visual {
    min-height: 470px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
