/* The catalog page (lp/catalog/index.html). The LP's palette and type (lp/index.html), so the
   catalog reads as the same site. The small ring before a category is the viewer's reticle,
   with the LP's meaning: orange for a machine or an object, blue for a record (the space). */
:root {
  --paper: #f3f6fb;
  --paper2: #e7eef7;
  --white: #ffffff;
  --ink: #0f1e33;
  --ink2: #33445c;
  --mute: #6b7787;
  --line: #d3dce8;
  --blue: #1657a8;
  --blue-d: #0f3f7e;
  --blue-l: #3f86d6;
  --reticle: #4b9fea;
  --accent: #ff9a3c;
  --shell: min(1180px, 100% - 40px);
  --font: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue-l); outline-offset: 2px;
}

header.top { min-height: 63px; } /* room for the shared header (assets/site-chrome.js), so nothing jumps when it fills */

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

.catalog { width: var(--shell); margin-inline: auto; padding: clamp(40px, 7vw, 84px) 0 clamp(64px, 9vw, 116px); min-height: 60vh; }

/* --- the head and the form ------------------------------------------------ */
.catalog-head h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 800; line-height: 1.3; letter-spacing: 0.01em; margin: 0 0 10px; }
.catalog-head p { color: var(--ink2); max-width: 38em; margin: 0 0 30px; }

.search { display: grid; gap: 14px; margin: 0 0 26px; }
.search-words { display: flex; gap: 10px; }
.search-words input {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 11px;
}
.search-words input:hover { border-color: var(--ink2); }
.search-words input::placeholder { color: var(--mute); }
.search-words button {
  flex: none; height: 54px; padding: 0 26px;
  font: inherit; font-size: 15px; font-weight: 800; line-height: 1;
  color: var(--white); background: var(--blue); border: 0; border-radius: 11px; cursor: pointer;
}
.search-words button:hover { background: var(--blue-d); }

.search-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* The three list pages as tabs: one strip, the current page's tab lifted (search-view.js's tabsHtml) */
.catalog-kinds { display: inline-flex; margin: 0 0 22px; padding: 3px; background: var(--paper2); border-radius: 10px; }
.catalog-kinds a {
  display: block; padding: 6px 18px; border-radius: 8px; text-decoration: none;
  font-size: 13.5px; font-weight: 800; line-height: 1.6; color: var(--ink2); white-space: nowrap;
}
.catalog-kinds a:hover { color: var(--ink); }
.catalog-kinds a[aria-current="page"] { background: var(--white); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

.filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.filter select, .filter input {
  height: 38px; font: inherit; font-size: 14px; color: var(--ink);
  background-color: var(--white); border: 1.5px solid var(--line); border-radius: 9px;
}
.filter input { width: 11em; padding: 0 12px; }
.filter select {
  padding: 0 32px 0 12px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2333445c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px;
}
.filter select:hover, .filter input:hover { border-color: var(--ink2); }

.search-status { margin: 0 0 14px; font-size: 13.5px; color: var(--mute); font-variant-numeric: tabular-nums; min-height: 1.85em; }

/* --- the cards ------------------------------------------------------------ */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card-link {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 20px 22px 18px; text-decoration: none; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
}
.card-link:hover { border-color: var(--blue-l); }
.card-name { font-size: 17px; font-weight: 800; line-height: 1.5; }
/* The reference people type to pull the item: handle/name */
.card-ref { font-size: 13px; color: var(--mute); overflow-wrap: anywhere; }
.card-handle { color: var(--blue); }
.card-verified { margin-left: 3px; color: var(--blue); font-weight: 800; }
.card-slash { margin: 0 2px; color: var(--line); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; padding-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.chip::before { content: ""; width: 16px; height: 7px; flex: none; border: 2px solid var(--accent); border-radius: 50%; }
.card[data-kind="record"] .chip::before { border-color: var(--reticle); }
.card-version { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11.5px; line-height: 1.7; padding: 0 8px; color: var(--ink2); background: var(--paper); border-radius: 6px; }

/* --- an item's page (machine-view.js) ------------------------------------- */
/* The stage is the page: the machine at real size on the 1 m grid, the figure beside it. The
   side says what it is and how to get it, quietly. */
.item-back { margin: 0 0 22px; font-size: 14px; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }

.stage-frame {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--paper2); border: 1px solid var(--line); border-radius: 14px;
}
.stage-frame canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage-frame canvas:active { cursor: grabbing; }
.stage-status {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px;
  text-align: center; font-size: 14px; color: var(--ink2); pointer-events: none;
}
.stage-status[hidden] { display: none; }
.stage-scale { margin: 10px 2px 0; font-size: 13px; color: var(--mute); }

.joints { margin-top: 26px; }
.joints-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.joints-head h2, .how-made h2 { margin: 0; font-size: 15px; font-weight: 800; }
.quiet {
  font: inherit; font-size: 13px; color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.quiet:hover { color: var(--blue-d); text-decoration: underline; }
.joint-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 28px; }
.joint label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.6; }
.joint-name { color: var(--ink2); overflow-wrap: anywhere; }
.joint output { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.joint input[type="range"] { width: 100%; margin: 2px 0 10px; accent-color: var(--blue); }

.item-side { display: grid; gap: 18px; }
.item-ref { margin: 0; font-size: 14px; color: var(--mute); overflow-wrap: anywhere; }
.item-owner { margin: 2px 0 0; font-size: 13px; color: var(--mute); }
.item-name { margin: -12px 0 0; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1.35; }
.item-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.item-private { font-size: 12.5px; font-weight: 800; color: var(--ink2); padding: 0 8px; border: 1.5px solid var(--line); border-radius: 6px; }
.item-version { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); margin-left: auto; }
.item-version select {
  height: 34px; padding: 0 30px 0 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
  background-color: var(--white); border: 1.5px solid var(--line); border-radius: 9px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2333445c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 6px;
}

.pull { padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.pull-label { margin: 0 0 6px; font-size: 13px; color: var(--mute); }
.pull-row { display: flex; align-items: center; gap: 10px; }
.pull code {
  flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; color: var(--ink);
}
.pull button {
  flex: none; height: 34px; padding: 0 16px; font: inherit; font-size: 13px; font-weight: 800; line-height: 1;
  color: var(--white); background: var(--blue); border: 0; border-radius: 9px; cursor: pointer;
}
.pull button:hover { background: var(--blue-d); }

.item-description { margin: 0; color: var(--ink2); white-space: pre-line; }
.how-made p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink2); }
/* A shape generated from photos is told apart: its dimensions are only approximate */
.how-made[data-origin="ai-generated"] { padding: 12px 16px; background: var(--white); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; }
.how-made[data-origin="ai-generated"] p { color: var(--ink); font-weight: 800; }

.facts { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.guarantee { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); }

.item-missing { padding: 40px 0; }
.item-missing h1 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; margin: 0 0 8px; }
.item-missing p { color: var(--ink2); margin: 0 0 10px; }

/* --- the way to the stage (stage-links.js): 置いてみる / 再現する / 新しい記録 ------- */
/* One filled button, the LP's blue, with the reticle ring before it; a quiet line beside it says what happens */
.stage-go-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.stage-go {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 20px;
  font-size: 14.5px; font-weight: 800; line-height: 1; white-space: nowrap; text-decoration: none;
  color: var(--white); background: var(--blue); border-radius: 999px;
}
.stage-go::before { content: ""; width: 16px; height: 7px; flex: none; border: 2px solid var(--white); border-radius: 50%; opacity: 0.9; }
.stage-go:hover { background: var(--blue-d); }
.stage-go-note { font-size: 13px; color: var(--mute); }
.me-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; }

/* /catalog/me's head: the name beside the title, and the way to the settings */
.me-head-handle { margin-left: 14px; font-size: 0.55em; font-weight: 800; color: var(--blue); vertical-align: middle; }
.me-head-settings { margin-left: 12px; font-size: 13px; font-weight: 800; color: var(--ink2); text-decoration: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 12px; vertical-align: middle; }
.me-head-settings:hover { border-color: var(--ink2); color: var(--ink); }
/* /catalog/settings (settings-view.js): one block per setting */
.settings-block { margin: 0 0 26px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.settings-block h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.settings-block .me-handle-name { margin: 0 0 6px; }
.lang-form { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px; }
.lang-choice { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.lang-choice input { accent-color: var(--blue); width: 18px; height: 18px; }
/* A machine that cannot go on the stage by itself (an end effector) */
.stage-go[aria-disabled="true"] { background: var(--line); color: var(--mute); cursor: not-allowed; pointer-events: none; }
.stage-go[aria-disabled="true"]::before { border-color: var(--mute); }
/* /catalog/me's tabs (records first), the filter under them, then the tab's rows; a row's way to the
   stage sits between its state and its controls */
.me-kinds { margin-bottom: 14px; }
.me-tab-count { margin-left: 6px; font-size: 12px; font-weight: 800; color: var(--mute); font-variant-numeric: tabular-nums; }
.catalog-kinds a[aria-current="page"] .me-tab-count { color: var(--blue); }
.me-filter { margin-bottom: 18px; }
.me-section { margin: 0 0 28px; }
.me-section .me-subhead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.me-section .me-subhead .results-count { margin: 0; }
.me-section-empty { margin: 0; padding: 14px 20px; font-size: 14px; color: var(--ink2); background: var(--white); border: 1px dashed var(--line); border-radius: 12px; }
.mine-go { font-size: 13.5px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.mine-go:hover { text-decoration: underline; }

/* /catalog/new/{machine,object} (new-view.js): two fields, then the commands as steps */
.new-fields { display: grid; grid-template-columns: minmax(0, 1fr) 14em; gap: 12px 18px; align-items: end; margin: 0 0 26px; }
.new-fields .me-note { grid-column: 1 / -1; margin: 0; }
.new-fields select { height: 40px; padding: 0 11px; font: inherit; font-size: 14.5px; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 9px; }
.new-steps { margin: 0 0 22px; padding-left: 1.4em; display: grid; gap: 16px; }
.new-step p { margin: 0 0 6px; }
.new-step .pull-row { max-width: 46em; }
.new-step code { flex: 1; min-width: 0; padding: 9px 12px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); background: var(--paper2); border-radius: 8px; overflow-wrap: anywhere; }
.new-step button {
  flex: none; height: 34px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 800; line-height: 1;
  color: var(--white); background: var(--blue); border: 0; border-radius: 8px; cursor: pointer;
}
.new-step button:hover { background: var(--blue-d); }

/* /catalog/{handle} (owner-view.js): the name as /catalog/me sets it, then the search's cards by kind */
.owner-head { margin-bottom: 26px; }
.owner-head .me-handle-label { margin: 0 0 2px; }
.owner-section { margin: 0 0 30px; }
.owner-section .me-subhead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.owner-section .me-subhead .results-count { margin: 0; }
.card-updated { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }

/* --- a record's page (record-view.js) -------------------------------------- */
/* The stage and its replay bar are one block: the bar is the stage's lower edge, so the time
   reads as part of what is shown. A record is the space, so its controls take the reticle blue. */
.stage-record .stage-frame { border-bottom: 0; border-radius: 14px 14px 0 0; }
.replay {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px;
  background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px;
}
.replay-play {
  flex: none; min-width: 5.2em; height: 40px; padding: 0 18px;
  font: inherit; font-size: 14px; font-weight: 800; line-height: 1;
  color: var(--white); background: var(--blue); border: 0; border-radius: 999px; cursor: pointer;
}
.replay-play::before {
  content: ""; display: inline-block; vertical-align: -1px; margin-right: 8px;
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor;
}
.replay-play[data-state="playing"]::before { width: 10px; height: 12px; border: 0; border-left: 3px solid; border-right: 3px solid; box-sizing: border-box; }
.replay-play:hover { background: var(--blue-d); }
.replay-time { flex: 1; min-width: 0; display: flex; }
.replay-time input[type="range"] { width: 100%; margin: 0; accent-color: var(--reticle); cursor: pointer; }
.replay-out { flex: none; display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 13px; }
.replay-label { color: var(--mute); }
.replay-out output { min-width: 8.5em; text-align: right; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.record-length { font-size: 13.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.item[data-kind="record"] .chip::before { border-color: var(--reticle); }

.record-uses h2 { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
.record-machines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.record-machine { font-size: 14.5px; overflow-wrap: anywhere; }
.record-machine > a { font-weight: 800; text-decoration: none; }
.record-machine > a:hover { text-decoration: underline; }
.record-machine-version { margin-left: 10px; font-size: 12.5px; color: var(--mute); }
/* A private machine is a caution about this record: the same mark as an AI-generated shape */
.record-machine[data-private] { padding: 10px 14px; background: var(--white); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; }
.record-private { margin: 2px 0 0; font-size: 13.5px; color: var(--ink); }
.record-private code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; }
.record-publish {
  margin-top: 8px; height: 34px; padding: 0 16px; font: inherit; font-size: 13px; font-weight: 800; line-height: 1;
  color: var(--blue); background: var(--white); border: 1.5px solid var(--blue); border-radius: 9px; cursor: pointer;
}
.record-publish:hover { color: var(--white); background: var(--blue); }
.record-publish:disabled { opacity: 0.55; cursor: progress; }
.record-note { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }
.record-note:empty { display: none; }
.record-none { margin: 0; font-size: 14px; color: var(--mute); }

/* --- the owner's controls (owner-panel.js) and /catalog/me (me-view.js) ------- */
/* The owner's side of an item: a sheet under the facts, the state said in a sentence with its one
   button beside it. Deleting sits apart, below a rule, in quiet text. */
.owner { padding: 16px 18px 14px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 4px 4px 12px 12px; display: grid; gap: 12px; }
.owner h2 { margin: 0; font-size: 15px; font-weight: 800; }
.owner-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.owner-state p { margin: 0; flex: 1 1 14em; font-size: 14px; color: var(--ink2); display: flex; align-items: baseline; gap: 8px; }
/* The state mark: a filled ring when anyone can see it, a hollow one when only the owner can */
.owner-state p::before, .mine-state::before {
  content: ""; width: 9px; height: 9px; flex: none; border-radius: 50%; border: 2px solid var(--blue); transform: translateY(-1px);
}
.owner-state[data-state="public"] p::before, .mine-state[data-state="public"]::before { background: var(--blue); }
.owner-primary {
  height: 36px; padding: 0 16px; font: inherit; font-size: 13.5px; font-weight: 800; line-height: 1; white-space: nowrap;
  color: var(--white); background: var(--blue); border: 0; border-radius: 9px; cursor: pointer;
}
.owner-primary:hover { background: var(--blue-d); }
.owner-quiet { font: inherit; font-size: 13.5px; color: var(--ink2); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.owner-quiet:hover { color: var(--ink); }
.owner-primary:disabled, .owner-quiet:disabled { opacity: 0.55; cursor: progress; }
.owner-edit summary, .me-rename summary, .me-verify summary { cursor: pointer; font-size: 14px; font-weight: 800; color: var(--blue); width: fit-content; }
.owner-edit summary:hover, .me-rename summary:hover { color: var(--blue-d); }
.owner-edit summary:focus-visible, .me-rename summary:focus-visible { outline: 3px solid var(--blue-l); outline-offset: 2px; }
.owner-form, .me-rename-form { display: grid; gap: 10px; margin-top: 10px; }
.owner-form .owner-primary, .me-rename-form .owner-primary { justify-self: start; }
.owner-field { display: grid; gap: 4px; font-size: 13px; color: var(--mute); }
.owner-field input, .owner-field textarea, .owner-version select {
  font: inherit; font-size: 14.5px; color: var(--ink); padding: 7px 11px; line-height: 1.6;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 9px;
}
.owner-field input:hover, .owner-field textarea:hover, .owner-version select:hover { border-color: var(--ink2); }
.owner-field textarea { resize: vertical; min-height: 6em; }
.owner-field textarea:focus-visible { outline: 3px solid var(--blue-l); outline-offset: 2px; }
.owner-danger { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.owner-version { display: flex; align-items: center; gap: 10px; }
.owner-version select { height: 34px; padding: 0 10px; font-size: 14px; }
.owner-delete { margin-left: auto; }
.owner-status { margin: 0; font-size: 13.5px; color: var(--ink); }
.owner-status:empty { display: none; }

/* /catalog/me: the person's name in the catalog is the head of the page, set the way every
   handle is set (blue), large; their items follow as rows, not cards, since they are to be managed */
.me-head p { margin-bottom: 22px; }
.me-handle { display: grid; gap: 6px; margin: 0 0 30px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.me-handle-label { margin: 0; font-size: 13px; color: var(--mute); }
.me-handle-name { margin: 0; font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.25; color: var(--blue); overflow-wrap: anywhere; }
.me-handle-name::after { content: "/"; margin-left: 4px; color: var(--line); font-weight: 400; }
.me-rename, .me-verify { margin-top: 6px; max-width: 34em; }
.me-verify-out code { overflow-wrap: anywhere; font-size: 12.5px; }
.me-verify-result { margin: 6px 0 0; font-weight: 700; }
.me-note { margin: 6px 0 0; font-size: 13.5px; color: var(--ink2); }
.me-rename-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.me-empty { color: var(--ink2); max-width: 38em; }
.me-subhead { margin: 24px 0 10px; font-size: 15px; }
.me > .owner-status { margin: 0 0 12px; }
.results-count { margin: 0 0 10px; font-size: 13.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.mine { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.mine-row { display: grid; grid-template-columns: minmax(0, 1fr) 6em auto auto; align-items: center; gap: 8px 18px; padding: 14px 20px; }
.mine-row + .mine-row { border-top: 1px solid var(--line); }
.mine-name { display: grid; text-decoration: none; color: var(--ink); min-width: 0; }
.mine-name:hover .card-name { text-decoration: underline; }
.mine-row[data-kind="record"] .chip::before { border-color: var(--reticle); }
.mine-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.mine-actions { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.mine-actions .owner-primary { min-width: 8.5em; }

/* The one-time name question (the app's dialog markup) */
.handle-dialog { max-width: min(30em, calc(100% - 32px)); padding: 24px 24px 20px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.handle-dialog::backdrop { background: rgba(15, 30, 51, 0.38); }
.handle-dialog h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.handle-dialog .note { margin: 0 0 12px; font-size: 13.5px; color: var(--ink2); }
.handle-dialog .note.warn { color: var(--ink); border-left: 4px solid var(--accent); padding-left: 10px; }
.handle-dialog input { width: 100%; height: 44px; padding: 0 12px; font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 9px; }
.handle-dialog .actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 14px; }
.handle-dialog button { height: 38px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 800; border-radius: 9px; cursor: pointer; }
.handle-dialog #handle-ok { color: var(--white); background: var(--blue); border: 0; }
.handle-dialog #handle-cancel { color: var(--ink2); background: none; border: 1.5px solid var(--line); }

@media (max-width: 860px) {
  .item-layout { grid-template-columns: minmax(0, 1fr); }
  .stage-frame { aspect-ratio: 1 / 1; }
}

@media (max-width: 560px) {
  .catalog { width: calc(100% - 32px); }
  .replay { flex-wrap: wrap; gap: 10px; }
  .replay-time { order: 3; flex-basis: 100%; }
  .replay-out { margin-left: auto; }
  .search-words button { padding: 0 18px; }
  .catalog-kinds { width: 100%; }
  .catalog-kinds a { flex: 1; padding: 6px 8px; text-align: center; }
  .filter { width: 100%; }
  .filter select, .filter input { flex: 1; width: auto; }
  .mine-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .mine-name { grid-column: 1 / -1; }
  .mine-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .new-fields { grid-template-columns: minmax(0, 1fr); }
  .me-rename-form { grid-template-columns: minmax(0, 1fr); }
}

/* --- 「通報する」 (report-panel.js): quiet, under the owner's place --------------- */
.report { font-size: 13.5px; color: var(--ink2); }
.report summary { cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.report summary:hover { color: var(--ink); }
.report-form { display: grid; gap: 10px; margin-top: 10px; }
.report-form textarea, .report-form select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
