/* Classic Macintosh (System 1-6) Black & White Styles */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=block');

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 16px;
  margin: 0;
  padding: 20px;
  padding-top: 20px;
  background: #fff;
  max-width: 100%;
  overflow-x: hidden;
  /* Classic Mac checkerboard pattern background */
  background-image: 
    linear-gradient(45deg, #ccc 25%, transparent 25%), 
    linear-gradient(-45deg, #ccc 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #ccc 75%), 
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
}

body.home-page,
body.home-page button,
body.home-page a {
  touch-action: manipulation;
}

body:not(.resume-page) {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  -webkit-align-items: center;
  align-items: center;
  min-height: 100vh;
}

.mac-dialog {
  background: #fff;
  border: 2px solid #000;
  max-width: 480px;
  width: 100%;
  /* Classic Mac window shadow - offset black rectangle */
  box-shadow: 2px 2px 0 #000;
}

.mac-dialog.is-closed {
  display: none;
}

.mac-dialog.is-zoom-hidden {
  visibility: hidden;
}

.window-zoom-rect {
  position: fixed;
  border: 2px solid #000;
  background: transparent;
  pointer-events: none;
  z-index: 10000;
  box-sizing: border-box;
}

.window-zoom-rect[hidden] {
  display: none;
}

.desktop {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  width: 100%;
  max-width: 480px;
}

.about-slot {
  position: relative;
  width: 100%;
}

.about-slot.is-closed,
.about-slot.is-shaded {
  position: relative;
}

.about-slot.is-closed .mac-dialog {
  display: none;
}

.about-slot.is-closed #about-desktop-icon,
.about-slot.is-shaded #about-desktop-icon,
.about-slot.is-measuring-icon #about-desktop-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.about-slot.is-shaded .mac-dialog {
  position: relative;
  z-index: 2;
}

.web-browser-slot {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 10;
  width: auto;
  margin-top: 0;
}

.web-browser-slot.is-closed {
  display: none;
}

.gallery-viewer-slot {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 12;
  width: auto;
  margin-top: 0;
}

.qr-code-slot {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 14;
  width: auto;
  margin-top: 0;
}

.gallery-viewer-slot.is-closed,
.qr-code-slot.is-closed {
  display: none;
}

.web-browser-dialog {
  max-width: 480px;
  width: 100%;
}

.gallery-viewer-dialog {
  max-width: 480px;
  width: 100%;
}

.qr-code-dialog {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}

.web-browser-content {
  padding: 8px;
}

.gallery-viewer-content {
  padding: 8px;
}

.qr-code-content {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
}

.web-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.web-browser-address {
  min-width: 0;
  padding: 3px 6px;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-size: 16px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-browser-open-external {
  appearance: none;
  -webkit-appearance: none;
  min-height: 26px;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 1px 1px 0 #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 15px;
  line-height: 1;
}

.web-browser-open-external:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(1px, 1px);
}

.web-browser-open-external:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.web-browser-frame {
  display: block;
  width: 100%;
  height: min(62vh, 520px);
  min-height: 320px;
  border: 2px solid #000;
  background: #fff;
}

.qr-code-image {
  display: block;
  width: min(100%, 280px);
  height: auto;
  image-rendering: pixelated;
  border: 2px solid #000;
  background: #fff;
}

.qr-code-caption {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.desktop-icon[hidden] {
  display: none;
}

.desktop-icon {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 88px;
  min-height: 88px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.desktop-icon-image {
  display: block;
  width: 64px;
  height: 64px;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  overflow: hidden;
}

.desktop-icon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.desktop-icon-label {
  display: inline-block;
  font-size: 18px;
  line-height: 1.1;
  max-width: 88px;
  text-align: center;
  background-color: #fff;
  color: #000;
  padding: 1px 6px;
}

html[lang="ja"] .desktop-icon-label {
  font-size: 14px;
  font-weight: bold;
}

.desktop-icon:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  button.close-box--close:hover {
    background: #999;
  }
}

button.close-box {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.title-bar {
  background: #fff;
  border-bottom: 2px solid #000;
  cursor: default;
  height: 20px;
  position: relative;
  user-select: none;
}

.close-box {
  width: 12px;
  height: 12px;
  border: 2px solid #000;
  background: #fff;
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.title-bar-stripes-full {
  position: absolute;
  left: 20px;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 12px;
  /* Classic Mac horizontal lines */
  background: repeating-linear-gradient(
    to bottom,
    #000 0px,
    #000 1px,
    #fff 1px,
    #fff 3px
  );
}

.title-text {
  font-family: 'VT323', 'Monaco', monospace;
  font-weight: normal;
  font-size: 18px;
  line-height: 14px;
  height: 14px;
  white-space: nowrap;
  padding: 0 8px;
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

html[lang="ja"] .title-text {
  font-size: 12px;
  font-weight: bold;
  line-height: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
}

.dialog-content {
  padding: 16px 20px;
}

.mac-dialog.window-shaded .title-bar,
.clock-widget.window-shaded .clock-title-bar {
  border-bottom-color: transparent;
}

.mac-dialog.window-shaded .dialog-content,
.clock-widget.window-shaded .clock-content {
  display: none;
}

.logo-section {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #000;
  margin-bottom: 12px;
}

.logo-section {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #000;
  margin-bottom: 12px;
}

.logo-section .tagline {
  margin-top: 8px;
  margin-bottom: -16px;
  font-size: 18px;
}

html[lang="en"] .logo-section .tagline {
  line-height: 1.15;
}

html[lang="ja"] .logo-section .tagline {
  line-height: 1.25;
}

html[lang="ja"] .role-label .ja-text,
html[lang="ja"] .info-value .ja-text {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.25;
}

html[lang="ja"] .info-value.latin-value,
html[lang="ja"] .info-value.latin-value a,
html[lang="ja"] .info-value .latin,
html[lang="ja"] .role-label .latin {
  font-size: 18px;
  font-weight: normal;
  line-height: 1.2;
}

.logo-img {
  max-width: 110px;
  height: auto;
}

.headshot-modern {
  display: none;
}

html[data-theme="modern"] .headshot-classic {
  display: none;
}

html[data-theme="modern"] .headshot-modern {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.language-switcher {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 8px;
}

.language-switcher > button {
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 1px 1px 0 #000;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 14px;
  padding: 2px 8px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .language-switcher > button:hover,
  .language-switcher > button:active {
    background: #000;
    color: #fff;
    box-shadow: none;
    transform: translate(1px, 1px);
  }
}

html[lang="en"] .language-switcher > button {
  font-size: 12px;
  font-weight: bold;
}

html[lang="ja"] .language-switcher > button {
  font-size: 16px;
  font-weight: normal;
}

.stack-content {
  padding: 12px 14px 14px;
}

.stack-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stack-counter {
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}

.stack-position-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stack-index-shortcut,
.qr-code-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 20px;
  padding: 2px 7px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 1px 1px 0 #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.stack-index-shortcut:active,
.qr-code-button:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(1px, 1px);
}

.stack-index-shortcut:focus-visible,
.qr-code-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.stack-visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
}

.hypercard-stack {
  position: relative;
  margin: 0 6px 6px 0;
  isolation: isolate;
}

.hypercard-stack::before,
.hypercard-stack::after {
  content: '';
  position: absolute;
  border: 2px solid #000;
  background: #fff;
}

.hypercard-stack::before {
  inset: 3px -3px -3px 3px;
  z-index: 1;
}

.hypercard-stack::after {
  inset: 6px -6px -6px 6px;
  z-index: 0;
}

.stack-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  border: 2px solid #000;
  background: #fff;
  color: #000;
}

.stack-card[hidden] {
  display: none;
}

.hypercard-stack.is-card-wiping .stack-card.is-active {
  animation-duration: 220ms;
  animation-timing-function: steps(10, end);
  animation-fill-mode: both;
  will-change: clip-path, transform;
}

.hypercard-stack.is-card-wiping[data-card-transition="next"] .stack-card.is-active {
  animation-name: stack-wipe-next;
}

.hypercard-stack.is-card-wiping[data-card-transition="prev"] .stack-card.is-active {
  animation-name: stack-wipe-prev;
}

@keyframes stack-wipe-next {
  from {
    -webkit-clip-path: inset(0 100% 0 0);
    clip-path: inset(0 100% 0 0);
    transform: translateX(10px);
  }

  to {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

@keyframes stack-wipe-prev {
  from {
    -webkit-clip-path: inset(0 0 0 100%);
    clip-path: inset(0 0 0 100%);
    transform: translateX(-10px);
  }

  to {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

.stack-card-kicker {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 1px 6px;
  border: 2px solid #000;
  background: #fff;
  font-size: 14px;
  line-height: 1;
}

html[lang="ja"] .stack-card-kicker {
  font-size: 12px;
  font-weight: bold;
}

.stack-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
}

html[lang="ja"] .stack-card h2 {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
}

html[lang="ja"] .stack-card h2 .latin {
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
}

.stack-card p {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.2;
}

html[lang="ja"] .stack-card p {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.45;
}

html[lang="ja"] .stack-card p .latin {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.1;
}

.stack-card a {
  color: #000;
  text-decoration: underline;
}

.stack-card a:hover {
  background: #000;
  color: #fff;
}

.stack-card-gallery {
  min-height: 0;
}

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

.gallery-item {
  margin: 0;
  min-width: 0;
}

.gallery-photo-frame {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid #000;
  background: #fff;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.gallery-photo-frame:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.gallery-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-photo-focus-top {
  object-position: center 28%;
}

.gallery-photo-dithered {
  image-rendering: auto;
}

.gallery-photo-color {
  display: none;
}

.gallery-item figcaption {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

html[data-theme="classic"] .gallery-photo-dithered,
html[data-theme="modern"] .gallery-photo-dithered {
  display: none;
}

html[data-theme="classic"] .gallery-photo-color,
html[data-theme="modern"] .gallery-photo-color {
  display: block;
}

.gallery-viewer-figure {
  margin: 0;
}

.gallery-viewer-image-frame {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: min(62vh, 520px);
  border: 2px solid #000;
  background: #fff;
  overflow: auto;
}

.gallery-viewer-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(58vh, 500px);
  object-fit: contain;
}

.gallery-viewer-image.is-dithered {
  image-rendering: pixelated;
}

.gallery-viewer-figure figcaption {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack-card-x-feed {
  min-height: 0;
}

.stack-card-news {
  min-height: 0;
}

.feed-panel {
  position: relative;
}

.feed-panel.has-scroll-overflow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 4px;
  bottom: 0;
  height: 22px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.7) 45%,
    #fff 100%
  );
}

.news-feed {
  max-height: 136px;
  overflow: auto;
  padding-right: 4px;
}

.stack-card .news-feed-status,
.stack-card .news-feed-updated {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.stack-card .news-feed-updated {
  margin-bottom: 8px;
}

.news-item {
  margin-bottom: 10px;
  padding: 8px;
  border: 2px solid #000;
  background: #fff;
}

.news-item:last-child {
  margin-bottom: 0;
}

.news-item-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.08;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stack-card .news-item-meta {
  margin: 3px 0 5px;
  font-size: 15px;
  line-height: 1;
}

.stack-card .news-item-description {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: normal;
  line-height: 1.12;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.x-feed {
  max-height: 136px;
  overflow: auto;
  padding-right: 4px;
}

.stack-card .x-feed-status,
.stack-card .x-feed-updated {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.stack-card .x-feed-updated {
  margin-bottom: 8px;
}

.x-post {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 2px 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 2px solid #000;
  background: #fff;
}

.x-post:last-child {
  margin-bottom: 0;
}

.x-post-header {
  display: contents;
}

.x-post-avatar {
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  min-height: 52px;
  border: 2px solid #000;
  background: #fff;
  object-fit: cover;
  image-rendering: pixelated;
}

.x-post-identity {
  grid-column: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.05;
}

.x-post-identity strong {
  font-size: 18px;
  font-weight: normal;
}

.x-post-identity span {
  font-size: 15px;
}

.stack-card .x-post-text {
  grid-column: 2;
  margin-bottom: 6px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px;
  font-weight: normal;
  line-height: 1.12;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
}

html[lang="ja"] .stack-card .x-post-text {
  font-size: 18px;
  font-weight: normal;
  line-height: 1.2;
}

.x-post-no-avatar .x-post-identity,
.x-post-no-avatar .x-post-text {
  grid-column: 1 / -1;
}

.x-post-text a {
  overflow-wrap: anywhere;
}

.x-post-media {
  grid-column: 1 / -1;
  display: block;
  max-height: 120px;
  margin: 6px 0;
  border: 2px solid #000;
  object-fit: contain;
  image-rendering: pixelated;
}

.x-post-avatar-modern,
.x-post-media-modern {
  display: none;
}

.x-post-link {
  grid-column: 1 / -1;
  display: inline;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  font-size: 16px;
  line-height: 1;
}

.stack-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stack-index-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  padding: 5px 8px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #9b9b9b;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 18px;
  line-height: 1;
  text-align: left;
  text-shadow: 1px 1px 0 #fff;
  -webkit-tap-highlight-color: transparent;
}

.stack-index-button:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(2px, 2px);
}

.stack-index-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.stack-card-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.stack-card-avatar {
  display: block;
  width: 82px;
  height: 82px;
  border: 2px solid #000;
  background: #fff;
  overflow: hidden;
}

.stack-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-topic-list {
  margin: 0;
  padding-left: 18px;
  font-size: 21px;
  line-height: 1.25;
}

html[lang="ja"] .stack-topic-list {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.45;
}

html[lang="ja"] .stack-topic-list .latin {
  font-size: 20px;
  font-weight: normal;
}

html[lang="ja"] .tokyo-recommendations-list {
  font-size: 14px;
  font-weight: normal;
}

.tokyo-recommendations {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 2px solid #000;
}

.tokyo-recommendations .stack-button {
  margin-bottom: 6px;
}

.tokyo-recommendations-list {
  font-size: 16px;
  line-height: 1.1;
}

.tokyo-recommendations-summary,
.mud-leaderboard-summary {
  margin-bottom: 3px;
}

.tokyo-recommendations-entries,
.mud-leaderboard-entries {
  margin: 0;
  padding-left: 16px;
}

.tokyo-recommendations-entries li,
.mud-leaderboard-entries li {
  margin-bottom: 2px;
}

.tokyo-recommendations-entries li:last-child,
.mud-leaderboard-entries li:last-child {
  margin-bottom: 0;
}

.stack-card-mud {
  min-height: 0;
}

.stack-card .mud-note {
  margin-bottom: 8px;
  font-size: 18px;
}

.mud-terminal {
  min-height: 132px;
  max-height: 160px;
  margin-bottom: 8px;
  padding: 8px;
  overflow: auto;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 18px;
  line-height: 1.12;
}

.mud-terminal p {
  margin: 0 0 8px;
  font-size: inherit;
  line-height: inherit;
}

.mud-terminal p:last-child {
  margin-bottom: 0;
}

.mud-line-player {
  color: #fff;
}

.mud-line-system {
  color: #ddd;
}

.mud-command-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.mud-command-buttons[hidden] {
  display: none;
}

.mud-command-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 28px;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 1px 1px 0 #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 17px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.mud-command-button:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(1px, 1px);
}

.mud-command-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.mud-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 8px;
}

.mud-form input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 7px;
  border: 2px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 20px;
  line-height: 1;
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
}

.mud-form input:disabled {
  color: #777;
  background: #eee;
}

.mud-form input:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.mud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mud-status {
  min-width: 0;
  font-size: 16px;
  line-height: 1.1;
}

.mud-leaderboard {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 2px solid #000;
  font-size: 16px;
  line-height: 1.1;
}

.world-map-frame {
  --map-zoom: 1;
  --map-pin-scale: 1;
  --map-pan-x: 0px;
  --map-pan-y: 0px;
  position: relative;
  aspect-ratio: 1000 / 507.209;
  margin-top: 8px;
  border: 2px solid #000;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%),
    #fff;
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  cursor: crosshair;
  touch-action: manipulation;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stack-card-map {
  min-height: 0;
  padding-bottom: 8px;
}

.stack-card-map .world-map-frame {
  align-self: center;
  width: 100%;
}

.world-map-frame.is-zoomed {
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}

.world-map-frame.is-panning {
  cursor: grabbing;
}

.world-map-frame:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.world-map-layer {
  position: absolute;
  inset: 0;
  transform: translate(var(--map-pan-x), var(--map-pan-y)) scale(var(--map-zoom));
  transform-origin: center;
}

.world-map-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  pointer-events: none;
  filter: invert(1) contrast(1.25);
}

.world-map-svg {
  filter: none;
  pointer-events: auto;
}

.map-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #000;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 0 0 1.5px #fff;
  transform: translate(-50%, -100%) rotate(-45deg) scale(var(--map-pin-scale));
  transform-origin: 50% 50%;
  pointer-events: none;
}

.map-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-pin[hidden] {
  display: none;
}

.world-map-note {
  margin-bottom: 0;
}

.map-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.map-control-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 30px;
  padding: 4px 10px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: 1px 1px 0 #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 18px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

#map-zoom-in,
#map-zoom-out {
  min-width: 34px;
  font-size: 24px;
  font-weight: bold;
}

.map-email-button {
  margin-left: auto;
}

.map-control-button:disabled {
  color: #777;
  cursor: default;
  box-shadow: none;
}

.map-control-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.map-location-status {
  box-sizing: border-box;
  height: 20px;
  margin: 4px 0 0;
  padding-top: 1px;
  font-size: 16px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guestbook-list {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 2px solid #000;
  font-size: 15px;
  line-height: 1.1;
}

.guestbook-summary {
  margin-bottom: 3px;
}

.guestbook-entries {
  margin: 0;
  padding-left: 16px;
}

.guestbook-entries li {
  margin-bottom: 2px;
}

.guestbook-entries li:last-child {
  margin-bottom: 0;
}

html[lang="ja"] .stack-card .map-location-status {
  font-size: 16px;
  font-weight: normal;
  line-height: 20px;
}

html[lang="ja"] .stack-card .guestbook-list {
  font-size: 14px;
  font-weight: normal;
}

.stack-card-puzzle {
  position: relative;
  min-height: 0;
}

.sliding-puzzle {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.puzzle-stage {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 278px);
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  align-self: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 3px;
  border: 2px solid #000;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%),
    #fff;
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  touch-action: manipulation;
  justify-self: center;
}

.puzzle-tile {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #000;
  border-radius: 0;
  background-color: #fff;
  background-image: url('assets/steve-puzzle-dithered.png');
  background-repeat: no-repeat;
  background-size: 400% 400%;
  image-rendering: pixelated;
}

button.puzzle-tile {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.puzzle-tile.is-movable {
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #777;
}

button.puzzle-tile:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
}

.puzzle-tile.is-empty {
  border-style: dashed;
  background-image:
    linear-gradient(45deg, #bbb 25%, transparent 25%),
    linear-gradient(-45deg, #bbb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #bbb 75%),
    linear-gradient(-45deg, transparent 75%, #bbb 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
}

button.puzzle-tile:focus-visible {
  outline: 2px solid #000;
  outline-offset: 1px;
  position: relative;
  z-index: 1;
}

.puzzle-controls {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 8px;
}

.puzzle-controls .stack-button:disabled {
  color: #777;
  cursor: default;
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #ddd,
    inset -2px -2px 0 #bbb;
  transform: none;
}

.puzzle-alert {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(88%, 228px);
  padding: 12px;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  transform: translate(-50%, -50%);
}

.puzzle-alert.has-video {
  width: calc(100% - 24px);
  max-width: 360px;
}

.puzzle-alert[hidden] {
  display: none;
}

.puzzle-alert p {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
}

.puzzle-alert-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 12px;
  border: 2px solid #000;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%),
    #fff;
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  overflow: hidden;
}

.puzzle-alert-video[hidden] {
  display: none;
}

.puzzle-alert-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.puzzle-alert-button {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  min-width: 70px;
  min-height: 30px;
  margin: 0 auto;
  padding: 4px 12px;
  border: 2px solid #000;
  border-radius: 4px;
  background: #fff;
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #9b9b9b;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 18px;
  line-height: 1;
  text-shadow: 1px 1px 0 #fff;
  -webkit-tap-highlight-color: transparent;
}

.puzzle-alert-button:active {
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(2px, 2px);
}

.puzzle-alert-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.stack-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 10px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #9b9b9b;
  background: #fff;
  color: #000;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-shadow: 1px 1px 0 #fff;
  -webkit-tap-highlight-color: transparent;
}

.stack-actions a:active {
  background: #fff;
  color: #000;
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(2px, 2px);
}

.stack-controls {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 8px;
  margin-top: 12px;
}

.stack-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 5px 10px;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #9b9b9b;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 20px;
  line-height: 1;
  text-shadow: 1px 1px 0 #fff;
  -webkit-tap-highlight-color: transparent;
}

.stack-button-secondary {
  box-shadow:
    2px 2px 0 #000,
    inset 1px 1px 0 #fff,
    inset -2px -2px 0 #9b9b9b;
}

.stack-button:active {
  background: #fff;
  color: #000;
  box-shadow:
    inset 2px 2px 0 #777,
    inset -1px -1px 0 #fff;
  transform: translate(2px, 2px);
}

.stack-button:focus-visible,
.stack-actions a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .language-segment:hover,
  .language-segment:active,
  .appearance-segment:hover,
  .appearance-segment:active,
  .clock-mode-segment:hover,
  .clock-mode-segment:active,
  .weather-unit-segment:hover,
  .weather-unit-segment:active {
    background: #000;
    color: #fff;
    box-shadow: none;
    transform: none;
  }

  .stack-actions a:hover,
  .stack-button:hover,
  .stack-index-button:hover,
  .stack-index-shortcut:hover,
  .qr-code-button:hover {
    background: #fff;
    color: #000;
    box-shadow:
      inset 2px 2px 0 #777,
      inset -1px -1px 0 #fff;
    transform: translate(2px, 2px);
  }

  .map-control-button:not(:disabled):hover,
  .map-control-button:not(:disabled):active {
    background: #000;
    color: #fff;
    box-shadow: none;
    transform: translate(2px, 2px);
  }
}

.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #000;
  margin-bottom: 12px;
}

.info-row {
  display: contents;
}

.info-label {
  font-weight: bold;
  color: #000;
  font-size: 14px;
}

html[lang="ja"] .info-label {
  line-height: 1.25;
}

html[lang="en"] .info-label {
  font-size: 18px;
  font-weight: normal;
  line-height: 1.2;
}

.info-value {
  color: #000;
  font-size: 18px;
}

html[lang="ja"] .info-value,
html[lang="en"] .info-value {
  line-height: 1.2;
}

.info-divider {
  grid-column: 1 / -1;
  border-bottom: 1px solid #000;
  margin: 4px 0;
}

.info-value a {
  color: #000;
  text-decoration: underline;
}

.info-value a:hover {
  background: #000;
  color: #fff;
}

.memory-bar-section {
  padding-top: 0px;
}

.memory-label {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  color: #000;
  font-size: 14px;
}

html[lang="ja"] .memory-label,
html[lang="en"] .memory-label {
  line-height: 1.2;
}

html[lang="en"] .memory-label strong {
  font-size: 18px;
  font-weight: normal;
}


.memory-amount {
  margin-left: auto;
  font-size: 18px;
}

.memory-bar {
  height: 14px;
  background: #fff;
  border: 2px solid #000;
  overflow: hidden;
}

.memory-bar-fill {
  height: 100%;
  width: 50%;
  /* Classic Mac diagonal stripes in black */
  background: repeating-linear-gradient(
    -45deg,
    #000,
    #000 2px,
    #fff 2px,
    #fff 4px
  );
  background-size: 5.66px 5.66px;
  animation: stripes-move 0.5s linear infinite;
  border-right: 2px solid #000;
}

@keyframes stripes-move {
  0% { background-position: 0 0; }
  100% { background-position: 5.66px 0; }
}

/* Tokyo time with blinking colon */
.tokyo-time {
  font-family: 'VT323', 'Monaco', monospace;
}

.time-separator {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Clock widgets row */
.bottom-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  max-width: 480px;
  align-items: flex-start;
}

.clock-row {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
  align-items: flex-start;
}

.appearance-panel {
  flex-shrink: 0;
  align-self: flex-start;
  width: auto;
  min-width: 162px;
}

.clock-widget {
  background: #fff;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.clock-title-bar {
  background: #fff;
  border-bottom: 2px solid #000;
  cursor: default;
  height: 18px;
  position: relative;
  padding: 0 4px;
  display: flex;
  align-items: center;
  user-select: none;
}

.clock-title-bar .close-box {
  width: 10px;
  height: 10px;
  border: 2px solid #000;
  background: #fff;
  position: static;
  transform: none;
  flex-shrink: 0;
}

.clock-title {
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 15px;
  margin-left: 6px;
}

html[lang="ja"]:not([data-theme="modern"]) .appearance-panel .clock-title {
  font-size: 12px;
  line-height: 12px;
}

.clock-content {
  padding: 6px 10px;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 14px;
  text-align: center;
}

.digital-clock {
  display: block;
}

.analog-clock {
  position: relative;
  display: none;
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
}

html[data-clock-mode="analog"] .digital-clock {
  display: none;
}

html[data-clock-mode="analog"] .analog-clock {
  display: block;
}

.analog-mark {
  position: absolute;
  font-size: 9px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.analog-mark-12 {
  left: 50%;
  top: 8px;
}

.analog-mark-3 {
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.analog-mark-6 {
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
}

.analog-mark-9 {
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.analog-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 2px;
  background: #000;
  transform-origin: 50% 100%;
}

.analog-hour {
  height: 13px;
}

.analog-minute {
  height: 18px;
}

.analog-second {
  width: 1px;
  height: 20px;
}

.analog-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #000;
  transform: translate(-50%, -50%);
}

.appearance-panel .clock-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 8px 5px;
  text-align: left;
}

.appearance-panel .language-switcher {
  justify-content: flex-start;
  margin: 0 0 2px;
}

.appearance-radios {
  display: none;
}

.language-segmented,
.appearance-segmented,
.clock-mode-segmented,
.weather-unit-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  border: 2px solid #000;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

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

.language-segment,
.appearance-segment,
.clock-mode-segment,
.weather-unit-segment {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 2px solid #000;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 14px;
  line-height: 1;
  min-height: 20px;
  padding: 3px 8px;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.language-segment:first-child,
.appearance-segment:first-child,
.clock-mode-segment:first-child,
.weather-unit-segment:first-child {
  border-left: none;
}

.language-segment[aria-pressed="true"],
.appearance-segment[aria-pressed="true"],
.clock-mode-segment[aria-pressed="true"],
.weather-unit-segment[aria-pressed="true"] {
  background:
    linear-gradient(45deg, #5f5f5f 25%, transparent 25%),
    linear-gradient(-45deg, #5f5f5f 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #5f5f5f 75%),
    linear-gradient(-45deg, transparent 75%, #5f5f5f 75%),
    #777;
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
  color: #fff;
}

.language-segment[data-language-value="ja"] {
  font-size: 12px;
  font-weight: bold;
}

html[lang="ja"] .language-segment,
html[lang="ja"] .appearance-segment,
html[lang="ja"] .clock-mode-segment,
html[lang="ja"] .weather-unit-segment {
  font-size: 12px;
  font-weight: bold;
}

html[lang="ja"]:not([data-theme="modern"]) .language-segment[data-language-value="en"] {
  font-size: 14px;
  font-weight: normal;
}

.language-segment:focus-visible,
.appearance-segment:focus-visible,
.clock-mode-segment:focus-visible,
.weather-unit-segment:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.clock-weather {
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.visitor-counter {
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.weather-attribution {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  padding-top: 1px;
  font-size: 9px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.weather-attribution a {
  color: inherit;
  text-decoration: underline;
}

.weather-attribution a:hover {
  background: #000;
  color: #fff;
}

.appearance-option {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

html[lang="en"] .appearance-option {
  font-size: 14px;
}

html[lang="ja"] .appearance-option {
  font-weight: bold;
  font-size: 12px;
}

.appearance-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.appearance-option input[type="radio"]::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #000;
  transform: scale(0);
}

.appearance-option input[type="radio"]:checked::before {
  transform: scale(1);
}

.appearance-option input[type="radio"]:focus-visible {
  outline: 1px solid #000;
  outline-offset: 1px;
}

/* Resume page styles */
body.resume-page {
  background: #fff;
  background-image: none;
  padding: 12pt;
  display: block;
}

.resume {
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Verdana', 'Geneva', sans-serif;
  font-size: 10pt;
  line-height: 1.5em;
  color: black;
}

body.resume-page .language-switcher {
  margin: 0 0 8pt;
  font: inherit;
}

body.resume-page .language-switcher button {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: none;
  color: #000;
  cursor: pointer;
  font-family: 'VT323', 'Monaco', monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  body.resume-page .language-switcher button:hover,
  body.resume-page .language-switcher button:active {
    background: #000;
    color: #fff;
  }
}

html[lang="ja"] body.resume-page .language-switcher button {
  font-family: inherit;
  font-size: 0.92em;
  font-weight: normal;
  line-height: inherit;
}

@media print {
  body.resume-page .language-switcher {
    display: none;
  }
}

div.contact-info {
  padding-bottom: 8pt;
}

div.hero {
  text-align: center;
  padding-bottom: 12pt;
}

div.hero img {
  max-width: 100%;
  height: auto;
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

div.intro {
  padding-bottom: 6pt;
}

div.contact-info > em {
  font-weight: bold;
  font-style: normal;
}

div.tagline {
  padding-bottom: 8pt;
}

span.company, span.school-name {
  font-weight: bold;
}

div.job {
  padding-bottom: 8pt;
}

div.job-metadata {
  padding-bottom: 3pt;
}

ul.accomplishments {
  padding-top: 2pt;
  padding-bottom: 0pt;
}

.role-description {
  font-weight:bold;
}

div.overview {
  padding-top: 3pt;
}

ul {
  padding: 5pt 0pt 12pt 8pt;
  margin: 0 8pt 0 8pt;
}

div.section-title {
  font-weight: bold;
  padding-bottom: 5pt;
  color: #000;
}

div.jobs {
  padding-bottom: 2pt;
}

div.school {
  padding-bottom: 2pt;
}

div.education {
  padding-bottom: 10pt;
}

div.projects {
  padding-bottom: 10pt;
}

div.patents {
  padding-bottom: 20pt;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  body {
    padding: 10px;
    padding-top: 14px;
  }

  .stack-content {
    padding: 10px;
  }

  .stack-top-row {
    gap: 8px;
  }

  .stack-card {
    min-height: 0;
    padding: 14px 12px;
  }

  .stack-card-x-feed,
  .stack-card-news {
    min-height: 0;
  }

  .stack-card-profile {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stack-card-avatar {
    width: 74px;
    height: 74px;
  }

  .stack-card h2 {
    font-size: 28px;
  }

  .stack-card p {
    font-size: 19px;
  }

  .stack-card-map {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .stack-card-map .stack-card-kicker {
    margin-bottom: 4px;
  }

  .stack-card-map h2 {
    margin-bottom: 6px;
    font-size: 26px;
  }

  .stack-card-map .world-map-note {
    margin-bottom: 0;
    font-size: 17px;
  }

  .stack-card-map .world-map-frame {
    align-self: stretch;
    width: 100%;
    margin-top: 4px;
    aspect-ratio: 1000 / 507.209;
    max-height: min(38svh, 240px);
  }

  .stack-card-map .map-controls {
    margin-top: 4px;
  }

  .stack-card-map .map-location-status {
    height: auto;
    min-height: 0;
    margin: 2px 0 0;
    line-height: 1.1;
  }

  .stack-card-puzzle {
    padding: 10px;
  }

  .stack-card-puzzle h2 {
    margin-bottom: 2px;
    font-size: 26px;
  }

  .stack-card-puzzle .puzzle-note {
    margin-bottom: 4px;
    font-size: 17px;
  }

  .stack-card-puzzle .puzzle-stage {
    width: min(100%, 236px);
  }

  .puzzle-alert p {
    font-size: 18px;
  }

  .x-feed {
    max-height: 128px;
  }

  .news-feed {
    max-height: 128px;
  }

  .x-post-media {
    max-height: 100px;
  }

  .stack-actions a,
  .stack-button,
  .stack-index-button {
    min-height: 44px;
  }

  .stack-card-index {
    padding: 10px;
  }

  .stack-card-index h2 {
    margin-bottom: 8px;
  }

  .stack-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .stack-index-button {
    min-height: 40px;
    padding: 4px 5px;
    font-size: 16px;
    line-height: 1.05;
  }
  
  .info-label {
    min-width: 90px;
  }

  html[lang="ja"] body.resume-page .language-switcher button {
    font-size: 0.92em;
    -webkit-text-size-adjust: 100%;
  }

  .bottom-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    align-items: start;
  }

  .clock-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    align-self: start;
    height: fit-content;
    min-width: 0;
  }

  .clock-widget:not(.appearance-panel) {
    width: max-content;
    max-width: 100%;
    flex: 0 0 auto;
    align-self: flex-start;
    height: fit-content;
  }

  .clock-title-bar {
    height: 18px;
    padding: 0 4px;
  }

  .clock-title-bar .close-box {
    width: 10px;
    height: 10px;
  }

  .clock-content {
    font-size: 13px;
    padding: 4px 6px;
    white-space: nowrap;
    text-align: center;
  }

  .clock-title {
    font-size: 14px;
    margin-left: 4px;
  }

  .appearance-panel {
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
  }

  .appearance-panel .clock-content {
    flex-direction: column;
    justify-content: flex-start;
    padding: 4px 8px 5px;
    gap: 4px;
  }

  .appearance-radios {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .appearance-option {
    font-size: 13px;
    gap: 5px;
  }

  html[lang="en"] .appearance-option {
    font-size: 14px;
  }

  html[lang="ja"] .appearance-option {
    font-size: 12px;
  }

  .appearance-option input[type="radio"] {
    width: 11px;
    height: 11px;
  }

  .appearance-option input[type="radio"]::before {
    width: 5px;
    height: 5px;
  }

  html[data-theme="modern"] .clock-widget:not(.appearance-panel) .clock-content {
    font-size: 12px;
    padding: 6px 4px;
  }

  html[data-theme="modern"] .clock-title-bar {
    height: 22px;
    padding: 0 2px 0 36px;
  }

  html[data-theme="modern"] .clock-title-bar .close-box {
    left: 6px;
    width: 8px;
    height: 8px;
  }

  html[data-theme="modern"] .clock-title-bar::before {
    left: 20px;
    width: 8px;
    height: 8px;
  }

  html[data-theme="modern"] .clock-title-bar::after {
    left: 30px;
    width: 8px;
    height: 8px;
  }

  html[data-theme="modern"] .clock-title {
    font-size: 10px;
  }

  html[data-theme="modern"] .language-segmented,
  html[data-theme="modern"] .appearance-segmented,
  html[data-theme="modern"] .clock-mode-segmented,
  html[data-theme="modern"] .weather-unit-segmented {
    flex-direction: row;
    flex-wrap: nowrap;
    width: auto;
    justify-content: flex-start;
  }

  html[data-theme="modern"] .language-segment,
  html[data-theme="modern"] .appearance-segment,
  html[data-theme="modern"] .clock-mode-segment,
  html[data-theme="modern"] .weather-unit-segment {
    font-size: 10px;
    padding: 3px 7px;
    white-space: nowrap;
  }

  html[lang="ja"][data-theme="modern"] .language-segment,
  html[lang="ja"][data-theme="modern"] .appearance-segment,
  html[lang="ja"][data-theme="modern"] .clock-mode-segment,
  html[lang="ja"][data-theme="modern"] .weather-unit-segment {
    font-size: 11px;
    padding: 3px 5px;
  }

  html[data-theme="modern"] .appearance-panel .clock-content {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* Classic Mac OS 9-inspired theme */
html[data-theme="classic"] {
  --classic-ink: #111;
  --classic-shadow: #777;
  --classic-mid: #bcbcbc;
  --classic-chrome: #d7d7d7;
  --classic-window: #e9e9e9;
  --classic-panel: #f4f4f4;
  --classic-highlight: #fff;
  --classic-accent: #738bd2;
  --classic-accent-dark: #4f66a8;
  --classic-link: #3f63ad;
}

html[data-theme="classic"] body {
  background: #cfcfcf;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(120, 120, 120, 0.16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(120, 120, 120, 0.16) 75%);
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
  color: var(--classic-ink);
}

html[data-theme="classic"] .headshot-classic {
  display: none;
}

html[data-theme="classic"] .headshot-modern {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

html[data-theme="classic"] .mac-dialog,
html[data-theme="classic"] .clock-widget {
  background: var(--classic-window);
  border: 1px solid var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow),
    2px 2px 0 rgba(0, 0, 0, 0.35);
}

html[data-theme="classic"] .window-zoom-rect {
  border: 1px solid var(--classic-ink);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

html[data-theme="classic"] .title-bar,
html[data-theme="classic"] .clock-title-bar {
  background: var(--classic-chrome);
  border-bottom: 1px solid var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset 0 -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .title-bar-stripes-full {
  background: repeating-linear-gradient(
    to bottom,
    var(--classic-ink) 0,
    var(--classic-ink) 1px,
    var(--classic-chrome) 1px,
    var(--classic-chrome) 3px
  );
}

html[data-theme="classic"] .title-text {
  background: var(--classic-chrome);
  color: var(--classic-ink);
}

html[data-theme="classic"] .close-box,
html[data-theme="classic"] .clock-title-bar .close-box {
  border: 1px solid var(--classic-ink);
  background: var(--classic-chrome);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .dialog-content,
html[data-theme="classic"] .clock-content {
  background: var(--classic-window);
}

html[data-theme="classic"] .desktop-icon-image,
html[data-theme="classic"] .stack-card-avatar,
html[data-theme="classic"] .x-post-avatar,
html[data-theme="classic"] .x-post-media,
html[data-theme="classic"] .gallery-photo-frame {
  border: 1px solid var(--classic-ink);
  background: var(--classic-panel);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .desktop-icon-label {
  background: rgba(244, 244, 244, 0.92);
  color: var(--classic-ink);
}

html[data-theme="classic"] .stack-card,
html[data-theme="classic"] .news-item,
html[data-theme="classic"] .x-post,
html[data-theme="classic"] .puzzle-alert {
  border: 1px solid var(--classic-ink);
  background: var(--classic-panel);
  color: var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .hypercard-stack::before,
html[data-theme="classic"] .hypercard-stack::after {
  border: 1px solid var(--classic-ink);
  background: #dedede;
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .stack-card-kicker {
  border: 1px solid var(--classic-ink);
  background: var(--classic-chrome);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .stack-counter,
html[data-theme="classic"] .visitor-counter {
  color: var(--classic-accent-dark);
}

html[data-theme="classic"] .stack-card a,
html[data-theme="classic"] .info-value a,
html[data-theme="classic"] .weather-attribution a {
  color: var(--classic-link);
}

html[data-theme="classic"] .stack-card a:hover,
html[data-theme="classic"] .info-value a:hover,
html[data-theme="classic"] .weather-attribution a:hover {
  background: var(--classic-accent);
  color: #fff;
}

html[data-theme="classic"] .logo-section,
html[data-theme="classic"] .info-grid,
html[data-theme="classic"] .tokyo-recommendations,
html[data-theme="classic"] .mud-leaderboard,
html[data-theme="classic"] .guestbook-list {
  border-color: var(--classic-shadow);
}

html[data-theme="classic"] .info-divider {
  border-bottom-color: var(--classic-mid);
}

html[data-theme="classic"] .language-segmented,
html[data-theme="classic"] .appearance-segmented,
html[data-theme="classic"] .clock-mode-segmented,
html[data-theme="classic"] .weather-unit-segmented {
  border: 1px solid var(--classic-ink);
  background: var(--classic-mid);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
}

html[data-theme="classic"] .language-segment,
html[data-theme="classic"] .appearance-segment,
html[data-theme="classic"] .clock-mode-segment,
html[data-theme="classic"] .weather-unit-segment {
  border-left: 1px solid var(--classic-shadow);
  background: #eeeeee;
  color: var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -1px -1px 0 var(--classic-shadow);
  text-shadow: 1px 1px 0 var(--classic-highlight);
}

html[data-theme="classic"] .language-segment:first-child,
html[data-theme="classic"] .appearance-segment:first-child,
html[data-theme="classic"] .clock-mode-segment:first-child,
html[data-theme="classic"] .weather-unit-segment:first-child {
  border-left: none;
}

html[data-theme="classic"] .language-segment[aria-pressed="true"],
html[data-theme="classic"] .appearance-segment[aria-pressed="true"],
html[data-theme="classic"] .clock-mode-segment[aria-pressed="true"],
html[data-theme="classic"] .weather-unit-segment[aria-pressed="true"] {
  background: #c9c9c9;
  color: var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-shadow),
    inset -1px -1px 0 var(--classic-highlight),
    inset 0 0 0 1px #a6a6a6;
  text-shadow: 1px 1px 0 var(--classic-highlight);
}

html[data-theme="classic"] .stack-actions a,
html[data-theme="classic"] .stack-button,
html[data-theme="classic"] .stack-index-button,
html[data-theme="classic"] .stack-index-shortcut,
html[data-theme="classic"] .qr-code-button,
html[data-theme="classic"] .mud-command-button,
html[data-theme="classic"] .map-control-button,
html[data-theme="classic"] .puzzle-alert-button,
html[data-theme="classic"] .web-browser-open-external {
  border: 1px solid var(--classic-ink);
  border-radius: 2px;
  background: #eeeeee;
  color: var(--classic-ink);
  box-shadow:
    inset 1px 1px 0 var(--classic-highlight),
    inset -2px -2px 0 var(--classic-shadow),
    1px 1px 0 rgba(0, 0, 0, 0.45);
  text-shadow: 1px 1px 0 var(--classic-highlight);
}

html[data-theme="classic"] .stack-button-secondary {
  background: #dedede;
}

html[data-theme="classic"] .stack-actions a:active,
html[data-theme="classic"] .stack-button:active,
html[data-theme="classic"] .stack-index-button:active,
html[data-theme="classic"] .stack-index-shortcut:active,
html[data-theme="classic"] .qr-code-button:active,
html[data-theme="classic"] .mud-command-button:active,
html[data-theme="classic"] .map-control-button:not(:disabled):active,
html[data-theme="classic"] .puzzle-alert-button:active,
html[data-theme="classic"] .web-browser-open-external:active {
  background: #c9c9c9;
  box-shadow:
    inset 2px 2px 0 var(--classic-shadow),
    inset -1px -1px 0 var(--classic-highlight);
  transform: translate(1px, 1px);
}

html[data-theme="classic"] .language-segment:focus-visible,
html[data-theme="classic"] .appearance-segment:focus-visible,
html[data-theme="classic"] .clock-mode-segment:focus-visible,
html[data-theme="classic"] .weather-unit-segment:focus-visible,
html[data-theme="classic"] .stack-button:focus-visible,
html[data-theme="classic"] .stack-actions a:focus-visible,
html[data-theme="classic"] .stack-index-button:focus-visible,
html[data-theme="classic"] .stack-index-shortcut:focus-visible,
html[data-theme="classic"] .qr-code-button:focus-visible,
html[data-theme="classic"] .mud-command-button:focus-visible,
html[data-theme="classic"] .mud-form input:focus-visible,
html[data-theme="classic"] .map-control-button:focus-visible,
html[data-theme="classic"] button.puzzle-tile:focus-visible,
html[data-theme="classic"] .puzzle-alert-button:focus-visible,
html[data-theme="classic"] .web-browser-open-external:focus-visible,
html[data-theme="classic"] .desktop-icon:focus-visible {
  outline: 2px solid var(--classic-accent);
  outline-offset: 2px;
}

html[data-theme="classic"] .memory-bar,
html[data-theme="classic"] .analog-clock,
html[data-theme="classic"] .mud-form input,
html[data-theme="classic"] .world-map-frame,
html[data-theme="classic"] .puzzle-board,
html[data-theme="classic"] .puzzle-alert-video,
html[data-theme="classic"] .web-browser-address,
html[data-theme="classic"] .web-browser-frame,
html[data-theme="classic"] .gallery-viewer-image-frame {
  border: 1px solid var(--classic-ink);
  background-color: #fff;
  box-shadow:
    inset 1px 1px 0 var(--classic-shadow),
    inset -1px -1px 0 var(--classic-highlight);
}

html[data-theme="classic"] .memory-bar-fill {
  border-right: 1px solid var(--classic-accent-dark);
  background: repeating-linear-gradient(
    -45deg,
    var(--classic-accent),
    var(--classic-accent) 3px,
    #c2ceef 3px,
    #c2ceef 6px
  );
}

html[data-theme="classic"] .analog-hand,
html[data-theme="classic"] .analog-pin {
  background: var(--classic-accent-dark);
}

html[data-theme="classic"] .mud-terminal {
  border: 1px solid var(--classic-ink);
  background: #111;
  color: #d8ffd8;
  box-shadow:
    inset 1px 1px 0 #000,
    inset -1px -1px 0 var(--classic-highlight);
}

html[data-theme="classic"] .mud-line-player {
  color: #fff;
}

html[data-theme="classic"] .mud-line-system {
  color: #9ee69e;
}

html[data-theme="classic"] .mud-form input:disabled,
html[data-theme="classic"] .map-control-button:disabled,
html[data-theme="classic"] .puzzle-controls .stack-button:disabled {
  background: #d4d4d4;
  color: #6e6e6e;
  box-shadow:
    inset 1px 1px 0 #eee,
    inset -1px -1px 0 #aaa;
}

html[data-theme="classic"] .world-map-frame,
html[data-theme="classic"] .puzzle-board,
html[data-theme="classic"] .puzzle-alert-video,
html[data-theme="classic"] .puzzle-tile.is-empty {
  background-image:
    linear-gradient(45deg, #d9d9d9 25%, transparent 25%),
    linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9d9d9 75%),
    linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
}

html[data-theme="classic"] .world-map-img {
  filter: none;
  opacity: 0.82;
}

html[data-theme="classic"] .map-pin {
  background: var(--classic-accent);
  box-shadow: 0 0 0 1.5px #fff, 1px 1px 0 rgba(0, 0, 0, 0.45);
}

html[data-theme="classic"] .x-post-avatar.has-modern-alternate,
html[data-theme="classic"] .x-post-media.has-modern-alternate {
  display: none;
}

html[data-theme="classic"] .x-post-avatar-modern,
html[data-theme="classic"] .x-post-media-modern {
  display: block;
  image-rendering: auto;
}

html[data-theme="classic"] .puzzle-tile {
  background-image: url('assets/steve-puzzle.png');
  image-rendering: auto;
}

html[data-theme="classic"] .puzzle-tile.is-empty {
  background-image:
    linear-gradient(45deg, #c8c8c8 25%, transparent 25%),
    linear-gradient(-45deg, #c8c8c8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c8c8c8 75%),
    linear-gradient(-45deg, transparent 75%, #c8c8c8 75%);
}

html[data-theme="classic"] .feed-panel.has-scroll-overflow::after {
  background: linear-gradient(
    to bottom,
    rgba(244, 244, 244, 0.2) 0%,
    rgba(244, 244, 244, 0.72) 45%,
    var(--classic-panel) 100%
  );
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="classic"] .language-segment:hover,
  html[data-theme="classic"] .appearance-segment:hover,
  html[data-theme="classic"] .clock-mode-segment:hover,
  html[data-theme="classic"] .weather-unit-segment:hover {
    background: #f8f8f8;
    color: var(--classic-ink);
    box-shadow:
      inset 1px 1px 0 var(--classic-highlight),
      inset -1px -1px 0 var(--classic-shadow);
    transform: none;
  }

  html[data-theme="classic"] .language-segment[aria-pressed="true"]:hover,
  html[data-theme="classic"] .appearance-segment[aria-pressed="true"]:hover,
  html[data-theme="classic"] .clock-mode-segment[aria-pressed="true"]:hover,
  html[data-theme="classic"] .weather-unit-segment[aria-pressed="true"]:hover {
    background: #d2d2d2;
    box-shadow:
      inset 1px 1px 0 var(--classic-shadow),
      inset -1px -1px 0 var(--classic-highlight),
      inset 0 0 0 1px #9f9f9f;
  }

  html[data-theme="classic"] button.close-box--close:hover {
    transform: translateY(-50%);
  }

  html[data-theme="classic"] .stack-actions a:hover,
  html[data-theme="classic"] .stack-button:hover,
  html[data-theme="classic"] .stack-index-button:hover,
  html[data-theme="classic"] .stack-index-shortcut:hover,
  html[data-theme="classic"] .qr-code-button:hover,
  html[data-theme="classic"] .mud-command-button:hover,
  html[data-theme="classic"] .map-control-button:not(:disabled):hover,
  html[data-theme="classic"] .puzzle-alert-button:hover,
  html[data-theme="classic"] .web-browser-open-external:hover {
    background: #f8f8f8;
    color: var(--classic-ink);
    box-shadow:
      inset 1px 1px 0 var(--classic-highlight),
      inset -1px -1px 0 var(--classic-shadow),
      1px 1px 0 rgba(0, 0, 0, 0.45);
    transform: none;
  }
}

/* Modern macOS theme */
html[data-theme="modern"] body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-size: 13px;
  background: #1a1a2e;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(120, 180, 255, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(200, 140, 255, 0.45) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 160, 200, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, #5b8fd9 0%, #9b7fd4 35%, #d4a5c9 70%, #e8c4a0 100%);
  background-attachment: fixed;
}

html[data-theme="modern"] .mac-dialog,
html[data-theme="modern"] .clock-widget {
  border: none;
  border-radius: 10px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

html[data-theme="modern"] .window-zoom-rect {
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

html[data-theme="modern"] .title-bar,
html[data-theme="modern"] .clock-title-bar {
  height: 28px;
  background: rgba(246, 246, 246, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="modern"] .title-bar-stripes-full {
  display: none;
}

html[data-theme="modern"] button.close-box--close,
html[data-theme="modern"] .title-bar .close-box:not(.close-box--close),
html[data-theme="modern"] .clock-title-bar .close-box {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] button.close-box--close {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

html[data-theme="modern"] button.close-box--close:hover {
  background: #ff4136;
}

html[data-theme="modern"] .title-bar::before,
html[data-theme="modern"] .title-bar::after,
html[data-theme="modern"] .clock-title-bar::before,
html[data-theme="modern"] .clock-title-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .title-bar::before,
html[data-theme="modern"] .clock-title-bar::before {
  left: 26px;
  background: #febc2e;
}

html[data-theme="modern"] .title-bar::after,
html[data-theme="modern"] .clock-title-bar::after {
  left: 42px;
  background: #28c840;
}

html[data-theme="modern"] .clock-title-bar {
  position: relative;
  padding: 0 10px 0 58px;
}

html[data-theme="modern"] .clock-title-bar .close-box {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

html[data-theme="modern"] .title-text {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: rgba(0, 0, 0, 0.85);
}

html[lang="ja"][data-theme="modern"] .title-text {
  font-size: 14px;
  font-weight: 600;
  height: auto;
  line-height: 1;
}

html[data-theme="modern"] .clock-title {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  margin-left: 0;
  color: rgba(0, 0, 0, 0.85);
}

html[lang="ja"][data-theme="modern"] .clock-title {
  font-size: 14px;
}

html[data-theme="modern"] .clock-widget:not(.appearance-panel) .clock-content {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  text-align: right;
}

html[data-theme="modern"] .weather-attribution {
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .weather-attribution a {
  color: #0066cc;
}

html[data-theme="modern"] .weather-attribution a:hover {
  background: transparent;
  color: #004499;
  text-decoration: underline;
}

html[data-theme="modern"] .web-browser-content,
html[data-theme="modern"] .gallery-viewer-content {
  background: rgba(255, 255, 255, 0.88);
}

html[data-theme="modern"] .web-browser-address {
  border: none;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: none;
}

html[data-theme="modern"] .web-browser-frame {
  border: none;
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

html[data-theme="modern"] .gallery-viewer-image-frame {
  border: none;
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .analog-clock {
  width: 54px;
  height: 54px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

html[data-theme="modern"] .analog-hand {
  background: rgba(0, 0, 0, 0.82);
}

html[data-theme="modern"] .analog-pin {
  border: none;
  border-radius: 50%;
  width: 4px;
  height: 4px;
  background: rgba(0, 0, 0, 0.82);
}

html[data-theme="modern"] .appearance-panel .clock-content {
  align-items: flex-end;
  justify-content: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

html[data-theme="modern"] .appearance-radios {
  display: none;
}

html[data-theme="modern"] .language-segmented,
html[data-theme="modern"] .appearance-segmented,
html[data-theme="modern"] .clock-mode-segmented,
html[data-theme="modern"] .weather-unit-segmented {
  display: grid;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

html[data-theme="modern"] .language-segment,
html[data-theme="modern"] .appearance-segment,
html[data-theme="modern"] .clock-mode-segment,
html[data-theme="modern"] .weather-unit-segment {
  display: inline-flex;
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  min-height: 0;
  padding: 3px 10px;
  border-radius: 5px;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  box-shadow: none;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}

html[lang="ja"][data-theme="modern"] .language-segment,
html[lang="ja"][data-theme="modern"] .appearance-segment,
html[lang="ja"][data-theme="modern"] .clock-mode-segment,
html[lang="ja"][data-theme="modern"] .weather-unit-segment {
  font-size: 13px;
  font-weight: 600;
}

html[data-theme="modern"] .language-segment[aria-pressed="true"],
html[data-theme="modern"] .appearance-segment[aria-pressed="true"],
html[data-theme="modern"] .clock-mode-segment[aria-pressed="true"],
html[data-theme="modern"] .weather-unit-segment[aria-pressed="true"] {
  background: #fff;
  color: rgba(0, 0, 0, 0.88);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .language-segment:focus-visible,
html[data-theme="modern"] .appearance-segment:focus-visible,
html[data-theme="modern"] .clock-mode-segment:focus-visible,
html[data-theme="modern"] .weather-unit-segment:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 1px;
}

html[data-theme="modern"] .desktop-icon-image {
  border: none;
  border-radius: 14px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.25);
}

html[data-theme="modern"] .desktop-icon-label {
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

html[lang="ja"][data-theme="modern"] .desktop-icon-label {
  font-size: 13px;
  font-weight: 600;
}

html[data-theme="modern"] .desktop-icon:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
  border-radius: 14px;
}

html[data-theme="modern"] .logo-section {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="modern"] .logo-section .tagline {
  font-size: 13px;
  line-height: 1.25;
}

html[lang="ja"][data-theme="modern"] .logo-section .tagline {
  font-size: 14px;
  line-height: 1.3;
}

html[data-theme="modern"] .info-grid {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="modern"] .info-divider {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="modern"] .info-label {
  color: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 600;
}

html[lang="en"][data-theme="modern"] .info-label {
  font-size: 12px;
  font-weight: 600;
}

html[lang="ja"][data-theme="modern"] .info-label {
  font-size: 14px;
}

html[data-theme="modern"] .info-value {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.88);
}

html[lang="ja"][data-theme="modern"] .info-value .ja-text,
html[lang="ja"][data-theme="modern"] .role-label .ja-text {
  font-size: 14px;
  font-weight: 600;
}

html[lang="ja"][data-theme="modern"] .info-value .latin,
html[lang="ja"][data-theme="modern"] .info-value .latin a,
html[lang="ja"][data-theme="modern"] .role-label .latin,
html[lang="ja"][data-theme="modern"] .info-value.latin-value,
html[lang="ja"][data-theme="modern"] .info-value.latin-value a {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

html[data-theme="modern"] .info-value a {
  color: #0066cc;
  text-decoration: none;
}

html[data-theme="modern"] .info-value a:hover {
  background: transparent;
  color: #004499;
  text-decoration: underline;
}

html[lang="ja"][data-theme="modern"] .memory-label {
  font-size: 14px;
}

html[data-theme="modern"] .stack-counter {
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  font-weight: 500;
}

html[data-theme="modern"] .hypercard-stack::before,
html[data-theme="modern"] .hypercard-stack::after {
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

html[data-theme="modern"] .stack-card {
  border: none;
  border-radius: 12px;
  min-height: 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.88);
}

html[data-theme="modern"] .stack-card-kicker {
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
  color: rgba(0, 0, 0, 0.55);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
}

html[data-theme="modern"] .stack-card h2 {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
}

html[lang="ja"][data-theme="modern"] .stack-card h2,
html[lang="ja"][data-theme="modern"] .stack-card h2 .latin {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

html[data-theme="modern"] .stack-card p,
html[data-theme="modern"] .stack-topic-list {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.78);
}

html[lang="ja"][data-theme="modern"] .stack-card p,
html[lang="ja"][data-theme="modern"] .stack-card p .latin,
html[lang="ja"][data-theme="modern"] .stack-topic-list,
html[lang="ja"][data-theme="modern"] .stack-topic-list .latin {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

html[data-theme="modern"] .stack-card a {
  color: #0066cc;
}

html[data-theme="modern"] .stack-card a:hover {
  background: transparent;
  color: #004499;
  text-decoration: underline;
}

html[data-theme="modern"] .x-post {
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="modern"] .mud-terminal {
  border: none;
  border-radius: 10px;
  background: #111;
  color: #f5f5f7;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.35;
}

html[data-theme="modern"] .mud-terminal p,
html[data-theme="modern"] .mud-terminal .mud-line-player {
  color: #f5f5f7;
}

html[data-theme="modern"] .mud-terminal .mud-line-system {
  color: rgba(245, 245, 247, 0.82);
}

html[data-theme="modern"] .mud-command-button {
  min-height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.12);
  box-shadow: none;
  color: #0066cc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
}

html[data-theme="modern"] .mud-command-button:active {
  background: rgba(0, 122, 255, 0.18);
  color: #004499;
  transform: none;
}

html[data-theme="modern"] .mud-command-button:focus-visible {
  outline: 2px solid #007aff;
}

html[data-theme="modern"] .mud-form input {
  min-height: 36px;
  border: none;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
}

html[data-theme="modern"] .mud-form input:disabled {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.35);
}

html[data-theme="modern"] .mud-status {
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .mud-leaderboard {
  border-top-color: rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .tokyo-recommendations {
  border-top-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="modern"] .tokyo-recommendations-list {
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .news-item {
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="modern"] .news-item-title {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

html[data-theme="modern"] .news-feed-status,
html[data-theme="modern"] .news-feed-updated,
html[data-theme="modern"] .stack-card .news-item-meta {
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .feed-panel.has-scroll-overflow::after {
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
}

html[data-theme="modern"] .stack-card .news-item-description {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.72);
}

html[data-theme="modern"] .x-feed-status,
html[data-theme="modern"] .x-feed-updated {
  font-family: inherit;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .x-post-avatar {
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .x-post-avatar.has-modern-alternate,
html[data-theme="modern"] .x-post-media.has-modern-alternate {
  display: none;
}

html[data-theme="modern"] .x-post-avatar-modern,
html[data-theme="modern"] .x-post-media-modern {
  display: block;
  image-rendering: auto;
}

html[data-theme="modern"] .x-post-identity strong {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

html[data-theme="modern"] .x-post-identity span,
html[data-theme="modern"] .x-post-link {
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .stack-card .x-post-text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

html[data-theme="modern"] .x-post-media {
  border: none;
  border-radius: 8px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .gallery-photo-frame {
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] .gallery-item figcaption {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .stack-card-avatar {
  border: none;
  border-radius: 18px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

html[data-theme="modern"] .world-map-frame {
  border: none;
  border-radius: 12px;
  background:
    radial-gradient(circle at 25% 20%, rgba(0, 122, 255, 0.12), transparent 28%),
    radial-gradient(circle at 72% 38%, rgba(88, 86, 214, 0.12), transparent 30%),
    rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

html[data-theme="modern"] .puzzle-board {
  gap: 3px;
  padding: 4px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

html[data-theme="modern"] .puzzle-tile {
  border: none;
  border-radius: 7px;
  background-image: url('assets/steve-puzzle.png');
  image-rendering: auto;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

html[data-theme="modern"] button.puzzle-tile.is-movable {
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

html[data-theme="modern"] .puzzle-tile.is-empty {
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.08) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

html[data-theme="modern"] button.puzzle-tile:focus-visible {
  outline: 2px solid #007aff;
}

html[data-theme="modern"] .puzzle-alert {
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.1),
    0 12px 26px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

html[data-theme="modern"] .puzzle-alert-video {
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

html[data-theme="modern"] .puzzle-alert p {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

html[data-theme="modern"] .puzzle-alert-button {
  min-height: 0;
  border: none;
  border-radius: 7px;
  background: rgba(0, 122, 255, 0.12);
  box-shadow: none;
  color: #0066cc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-shadow: none;
}

html[data-theme="modern"] .puzzle-alert-button:active {
  background: rgba(0, 122, 255, 0.18);
  color: #004499;
  transform: none;
}

html[data-theme="modern"] .puzzle-alert-button:focus-visible {
  outline: 2px solid #007aff;
}

html[data-theme="modern"] .puzzle-controls .stack-button:disabled {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.35);
  box-shadow: none;
}

html[data-theme="modern"] .world-map-img {
  filter: none;
  opacity: 0.68;
}

html[data-theme="modern"] .map-pin {
  background: #007aff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 2px #fff;
}

html[data-theme="modern"] .map-control-button {
  border: none;
  border-radius: 8px;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 122, 255, 0.12);
  color: #0066cc;
}

html[data-theme="modern"] .map-control-button:disabled {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.35);
}

html[data-theme="modern"] .map-location-status {
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .guestbook-list {
  border-top-color: rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="modern"] .stack-actions a,
html[data-theme="modern"] .stack-button,
html[data-theme="modern"] .stack-index-button,
html[data-theme="modern"] .web-browser-open-external {
  border: none;
  border-radius: 8px;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 122, 255, 0.12);
  color: #0066cc;
}

html[data-theme="modern"] .stack-index-shortcut,
html[data-theme="modern"] .qr-code-button {
  border: none;
  border-radius: 6px;
  box-shadow: none;
  background: rgba(0, 122, 255, 0.12);
  color: #0066cc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
}

html[data-theme="modern"] .stack-button-secondary {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
}

html[data-theme="modern"] .stack-actions a:active,
html[data-theme="modern"] .stack-button:active,
html[data-theme="modern"] .stack-index-button:active,
html[data-theme="modern"] .stack-index-shortcut:active,
html[data-theme="modern"] .qr-code-button:active,
html[data-theme="modern"] .web-browser-open-external:active {
  background: rgba(0, 122, 255, 0.18);
  color: #004499;
  transform: none;
}

html[data-theme="modern"] .stack-button-secondary:active {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="modern"] .stack-actions a:hover,
  html[data-theme="modern"] .stack-button:hover,
  html[data-theme="modern"] .stack-index-button:hover,
  html[data-theme="modern"] .stack-index-shortcut:hover,
  html[data-theme="modern"] .qr-code-button:hover,
  html[data-theme="modern"] .web-browser-open-external:hover {
    background: rgba(0, 122, 255, 0.18);
    color: #004499;
    transform: none;
  }

  html[data-theme="modern"] .stack-button-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.85);
  }
}

html[data-theme="modern"] .stack-button:focus-visible,
html[data-theme="modern"] .stack-actions a:focus-visible,
html[data-theme="modern"] .stack-index-button:focus-visible,
html[data-theme="modern"] .stack-index-shortcut:focus-visible,
html[data-theme="modern"] .qr-code-button:focus-visible,
html[data-theme="modern"] .web-browser-open-external:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

html[data-theme="modern"] .memory-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

html[lang="en"][data-theme="modern"] .memory-label strong {
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="modern"] .memory-amount {
  font-size: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

html[data-theme="modern"] .memory-bar {
  height: 8px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
}

html[data-theme="modern"] .memory-bar-fill {
  border-right: none;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    #007aff 0%,
    #007aff 38%,
    #3d94ff 50%,
    #007aff 62%,
    #007aff 100%
  );
  background-size: 220% 100%;
  animation: modern-progress-shimmer 1.3s ease-in-out infinite;
}

@keyframes modern-progress-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hypercard-stack.is-card-wiping .stack-card.is-active {
    animation: none;
  }

  html[data-theme="modern"] .memory-bar-fill {
    animation: none;
    background: #007aff;
  }
}

html[data-theme="modern"] body.resume-page {
  background: #f5f5f7;
  background-image: none;
}

html[data-theme="modern"] body.resume-page .language-switcher button {
  font-family: inherit;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
}

html[data-theme="modern"] body.resume-page .language-switcher button:hover,
html[data-theme="modern"] body.resume-page .language-switcher button:active {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
}

html[data-theme="modern"] body.resume-page .resume {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

html[data-theme="modern"] body.resume-page .info-value a,
html[data-theme="modern"] body.resume-page a {
  color: #0066cc;
}

html[data-theme="classic"] body.resume-page,
html[data-theme="modern"] body.resume-page {
  background: #fff;
  background-image: none;
}

html[data-theme="modern"] .mac-dialog.window-shaded .title-bar,
html[data-theme="modern"] .clock-widget.window-shaded .clock-title-bar {
  border-bottom-color: transparent;
}

.submission-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.36);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 10000;
}

.submission-overlay[hidden] {
  display: none;
}

.submission-dialog {
  max-height: calc(100vh - 36px);
  max-width: 460px;
  overflow: auto;
  width: 100%;
}

.submission-form {
  padding: 16px;
}

.submission-form label {
  display: block;
  font-weight: bold;
  margin: 0 0 12px;
}

.submission-form input,
.submission-form textarea {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  box-sizing: border-box;
  color: #000;
  display: block;
  font: inherit;
  margin-top: 4px;
  padding: 7px;
  width: 100%;
}

.submission-form textarea {
  min-height: 92px;
  resize: vertical;
}

#submission-turnstile {
  margin: 12px 0;
  min-height: 65px;
}

.submission-status {
  min-height: 1.4em;
}

.submission-status.is-error {
  color: #a40000;
}

.submission-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.submission-actions button {
  font: inherit;
  min-width: 92px;
  padding: 6px 12px;
}

html[data-theme="modern"] .submission-dialog {
  background: rgba(248, 248, 250, 0.98);
}

html[data-theme="modern"] .submission-form input,
html[data-theme="modern"] .submission-form textarea {
  border-color: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  font-family: inherit;
}
