:root {
  color-scheme: dark;
  --gm-base: #171d2e;
  --gm-raised: #1a2338;
  --gm-panel: #1e273e;
  --gm-border: rgba(255, 255, 255, .1);
  --gm-text: #e2e8f0;
  --gm-muted: #94a3b8;
  --gm-blue: #60a5fa;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--gm-base); color: var(--gm-text); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gm-blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.gm-icon { display: block; width: 21px; height: 21px; flex: none; }
.gm-skip { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; border-radius: 8px; background: #2563eb; color: #fff; transform: translateY(-160%); }
.gm-skip:focus { transform: translateY(0); }
.gm-layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.gm-sidebar { position: sticky; top: 0; display: flex; flex: 0 0 288px; flex-direction: column; align-self: flex-start; height: 100vh; height: 100dvh; padding: 24px 16px 16px; border-right: 1px solid var(--gm-border); background: var(--gm-raised); }
.gm-brand { display: flex; align-items: center; min-height: 36px; gap: 11px; padding: 0 6px; }
.gm-brand-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(96, 165, 250, .25); border-radius: 11px; background: rgba(59, 130, 246, .12); color: #93c5fd; }
.gm-brand-icon .gm-icon { width: 23px; height: 23px; }
.gm-brand-label { white-space: nowrap; font-size: 19px; font-weight: 720; letter-spacing: -.45px; color: #f8fafc; }
.gm-navigation { margin-top: 36px; }
.gm-nav-current { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 12px 14px; border: 1px solid rgba(59, 130, 246, .22); border-radius: 12px; background: rgba(59, 130, 246, .1); color: #bfdbfe; font-size: 14px; font-weight: 600; text-decoration: none; }
.gm-surface { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gm-topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; gap: 14px; height: 65px; flex: none; padding: 0 40px; border-bottom: 1px solid var(--gm-border); background: var(--gm-base); }
.gm-topbar-title { min-width: 0; overflow: hidden; color: #f8fafc; font-size: 17px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gm-icon-button { display: grid; width: 36px; height: 36px; place-items: center; flex: none; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--gm-muted); cursor: pointer; }
.gm-icon-button:hover { background: rgba(255, 255, 255, .06); color: #f8fafc; }
.gm-menu-button, .gm-sidebar-close { display: none; }
.gm-main { width: 100%; flex: 1; padding: 32px 30px; outline: none; }
.gm-content { width: 100%; max-width: 1152px; margin: 0 auto; }
.gm-panel { border: 1px solid var(--gm-border); border-radius: 16px; background: var(--gm-panel); }
.gm-panel + .gm-panel { margin-top: 12px; }
.gm-description { padding: 16px 20px; overflow-wrap: anywhere; color: #cbd5e1; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.gm-description-link { color: #60a5fa; text-decoration: underline; text-underline-offset: 2px; }
.gm-description-link:hover { color: #93c5fd; }
.gm-folder { display: flex; align-items: flex-start; gap: 12px; min-height: 116px; padding: 20px; }
.gm-folder-icon { display: grid; width: 44px; height: 44px; place-items: center; flex: none; margin-top: 1px; border: 1px solid var(--gm-border); border-radius: 12px; background: rgba(255, 255, 255, .04); color: #fbbf24; }
.gm-folder-icon .gm-icon { width: 25px; height: 25px; }
.gm-folder-body { min-width: 0; flex: 1; }
.gm-title { min-height: 25px; margin: 0; overflow-wrap: anywhere; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.45; }
.gm-metadata { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 6px; color: var(--gm-muted); font-size: 12px; line-height: 1.5; }
.gm-metadata > span { display: inline-flex; align-items: center; gap: 5px; }
.gm-metadata .gm-icon { width: 13px; height: 13px; }
.gm-public-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 2px 6px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 5px; background: rgba(255, 255, 255, .06); color: #cbd5e1; font-size: 10px; line-height: 14px; }
.gm-public-badge .gm-icon { width: 12px; height: 12px; }
.gm-folder-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.gm-import-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--gm-border); border-radius: 12px; background: rgba(255, 255, 255, .05); color: #e2e8f0; font: inherit; font-size: 12px; font-weight: 500; line-height: 18px; text-decoration: none; cursor: pointer; }
.gm-import-button .gm-icon { width: 15px; height: 15px; }
.gm-import-button:hover { background: rgba(255, 255, 255, .09); }
.gm-import-button:disabled { opacity: .55; cursor: default; }
.gm-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 6px 11px; }
.gm-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.gm-toolbar .gm-icon-button { width: 36px; height: 36px; }
.gm-toolbar .gm-icon { width: 20px; height: 20px; }
.gm-list { overflow: hidden; }
.gm-card { display: grid; grid-template-columns: 32px 24px minmax(0, 1fr) auto; column-gap: 16px; align-items: start; padding: 8px 18px 4px 22px; color: inherit; }
.gm-card + .gm-card { border-top: 1px solid var(--gm-border); }
.gm-selectbox { appearance: none; -webkit-appearance: none; display: block; width: 20px; height: 20px; margin: 10px 0 0; border: 2px solid #64748b; border-radius: 6px; background: transparent; cursor: pointer; }
.gm-selectbox:checked { border-color: #60a5fa; background-color: #3b82f6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4.5 10 3.5 3.5 7.5-7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.gm-selectbox:focus-visible { outline: 2px solid var(--gm-blue); outline-offset: 4px; }
.gm-file-icon { width: 24px; height: 24px; flex: none; margin-top: 8px; color: #fb7185; }
.gm-file-body { min-width: 0; }
.gm-card-heading { min-width: 0; min-height: 37px; margin-bottom: 8px; }
.gm-item-name { display: block; min-width: 0; overflow: hidden; color: #f8fafc; font-size: 14px; font-weight: 400; line-height: 22px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
a.gm-item-name:hover { color: #93c5fd; }
.gm-item-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: #94a3b8; font-size: 12px; line-height: 16px; }
.gm-item-metadata > span { display: inline-flex; align-items: center; gap: 4px; }
.gm-item-metadata .gm-icon { width: 12px; height: 12px; }
.gm-row-actions { display: flex; align-items: center; gap: 4px; padding-top: 5px; }
.gm-action-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 25px; padding: 3px 10px; border: 1px solid var(--gm-border); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #e2e8f0; font: inherit; font-size: 12px; font-weight: 500; line-height: 16px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.gm-action-button .gm-icon { width: 14px; height: 14px; }
.gm-action-button:hover { background: rgba(255, 255, 255, .1); }
.gm-action-button:disabled { opacity: .5; cursor: default; }
.gm-more-button { width: 30px; height: 28px; margin-left: 2px; }
.gm-more-button .gm-icon { width: 18px; height: 18px; }
.gm-thumbnail-frame { display: flex; align-items: flex-start; width: fit-content; max-width: 100%; min-height: 0; border: 1px solid var(--gm-border); border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .12); text-decoration: none; }
.gm-thumbnail-link { cursor: pointer; }
.gm-thumbnail-link:hover { border-color: rgba(147, 197, 253, .4); }
.gm-thumbnail { display: block; max-width: 100%; max-height: 288px; width: auto; height: auto; object-fit: contain; }
.gm-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; width: 288px; max-width: 100%; aspect-ratio: 16 / 9; background: #263247; color: #68778c; font-size: 12px; }
.gm-placeholder-icon { width: 32px; height: 32px; opacity: .7; }
.gm-backdrop { position: fixed; z-index: 30; inset: 0; border: 0; background: rgba(2, 6, 23, .68); }
.gm-noscript { margin: 32px; color: var(--gm-muted); font-size: 14px; }

@media (max-width: 1023px) {
  .gm-sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 288px; max-width: calc(100vw - 36px); transform: translateX(-100%); transition: transform .18s ease; }
  .gm-menu-open .gm-sidebar { transform: translateX(0); }
  .gm-sidebar-close { display: grid; margin-left: auto; }
  .gm-menu-button { display: grid; margin-left: -7px; }
  .gm-topbar { padding: 0 24px; }
  .gm-main { padding: 24px; }
}

@media (max-width: 639px) {
  .gm-topbar { height: 60px; padding: 0 16px; }
  .gm-topbar-title { font-size: 16px; }
  .gm-main { padding: 20px 16px; }
  .gm-folder { gap: 11px; min-height: 94px; padding: 16px; }
  .gm-title { font-size: 16px; }
  .gm-folder-icon { width: 41px; height: 41px; }
  .gm-description { padding: 13px 16px; }
  .gm-folder-actions { gap: 3px; }
  .gm-import-button { gap: 5px; padding: 5px 8px; }
  .gm-toolbar { padding-right: 8px; padding-left: 8px; }
  .gm-toolbar-actions { gap: 0; }
  .gm-toolbar .gm-icon-button { width: 34px; }
  .gm-card { grid-template-columns: 22px 20px minmax(0, 1fr); column-gap: 10px; padding: 10px 12px 8px; }
  .gm-selectbox { width: 18px; height: 18px; }
  .gm-file-icon { width: 21px; height: 21px; }
  .gm-row-actions { grid-column: 3; grid-row: 2; justify-content: flex-start; margin-top: 6px; padding: 0; }
  .gm-card-heading { margin-bottom: 8px; }
  .gm-placeholder { width: min(288px, calc(100vw - 124px)); }
  .gm-action-button { padding: 3px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
