:root {
    --skin: #141014;       /* 스킨 바탕색 */
    --skin-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><g stroke='white' stroke-opacity='.10' stroke-width='1' fill='none'><path d='M10 40 L180 10'/><path d='M60 300 L390 250'/><path d='M200 120 L330 160'/><path d='M30 360 L120 390'/><path d='M260 20 L380 90'/><path d='M90 200 L150 170'/></g></svg>");   /* 검정 + 거친 질감 */
    --page-bg: #1c171b;    /* 바깥 배경: 차콜 */
    --page-img:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    --line: #3a2a33;
    --tab: #ff3d9a;
    --tab-dark: #b0125f;
    --tab-on: #ffffff;
    --point: #e8157a;      /* 핫핑크 */
    --link: #2a2a2a;
    --head: #ffffff;       /* 스킨 위 글씨색 */
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    background-color: var(--page-bg);
    background-image: var(--page-img);
    background-size: 220px 220px;
    background-repeat: repeat;
    background-attachment: fixed;
    font-family: "굴림", Gulim, "돋움", Dotum, "Apple SD Gothic Neo", sans-serif;
    font-size: 12px;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 24px 12px;
    min-height: 100vh;
    align-items: center;
  }
  a { color: var(--link); text-decoration: none; cursor: pointer; }
  a:hover { text-decoration: underline; }
  input, textarea, select, button { font-family: inherit; font-size: 12px; }
  .gray { color: #999; }
  .small { font-size: 11px; }
  .orange { color: var(--point); }

  /* ===== 바깥 틀 ===== */
  .hompy { position: relative; width: 880px; }
  .skin {
    background-color: var(--skin);
    background-image: var(--skin-img);
    background-size: 220px 220px, 400px 400px;
    background-repeat: repeat;
    box-shadow: 0 0 0 2px #ff3d9a, 0 8px 30px rgba(0,0,0,.6);
    border-radius: 12px;
    padding: 10px;
  }
  .dotline {
    border: 2px dashed #ff6fb5;
    border-radius: 9px;
    padding: 8px 270px 10px 10px;
  }
  .heads { display: flex; gap: 8px; height: 22px; align-items: flex-end; padding-bottom: 4px; }
  .heads .lh { width: 200px; font-size: 11px; color: var(--head); }
  .heads .lh b { color: #ff6fb5; font-weight: normal; }
  .heads .rh { flex: 1; display: flex; justify-content: space-between; }
  .heads .title { font-weight: bold; color: var(--head); font-size: 13px; }
  .heads .url { font-size: 11px; color: #ff9fcf; }
  .cols { display: flex; gap: 8px; }
  .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 500px;
  }
  .left { width: 200px; padding: 10px; display: flex; flex-direction: column; }
  .right { flex: 1; min-width: 0; padding: 12px 14px; overflow-y: auto; }

  /* ===== BGM 플레이어 ===== */
  .bgm {
    margin: 0 0 6px auto;
    width: 250px;
    background: #fff;
    border: 1px solid #ff3d9a;
    border-radius: 3px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
  }
  .bgm button {
    width: 18px; height: 16px;
    border: 1px solid #aaa;
    background: #f4f4f4;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
  }
  .bgm .now { cursor: pointer; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--point); }

  /* ===== 메뉴 탭 ===== */
  .tabs {
    position: absolute;
    left: 100%;
    margin-left: -1px;
    top: 12px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .tab {
    width: 62px;
    padding: 6px 0;
    background: var(--tab);
    color: #140a10;
    font-weight: bold;
    border: 1px solid var(--tab-dark);
    border-left: none;
    border-radius: 0 5px 5px 0;
    text-align: center;
    cursor: pointer;
  }
  .tab { position: relative; margin-left: 2px; }
  .tab.on { background: #fff; color: var(--point); font-weight: bold; border-color: var(--line); margin-left: 0; width: 64px; }
  .tab.on::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 3px; background: #fff; }

  /* ===== 왼쪽: 프로필 ===== */
  .mood { font-size: 11px; margin-bottom: 6px; }
  .mood b { color: var(--point); font-weight: normal; }
  .photo {
    height: 150px;
    background: #f2f2f2;
    border: 1px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    color: #bbb;
    margin-bottom: 8px;
  }
  .intro { flex: 1; min-height: 0; line-height: 1.6; overflow-y: auto; color: #444; }
  .history { margin: 6px 0; font-size: 11px; }
  .owner { border-top: 1px dotted #ccc; padding-top: 6px; }
  .owner b { color: #b0125f; }
  .wave { margin-top: 6px; }
  .wave select {
    width: 100%; height: 18px; font-size: 11px; font-family: inherit; color: #444;
    -webkit-appearance: none; appearance: none; border: 1px solid #aaa; border-radius: 0; padding: 0 18px 0 5px; cursor: pointer;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='%23eee'/><rect x='0' width='1' height='16' fill='%23aaa'/><path d='M5 6h7l-3.5 4z' fill='%23555'/></svg>") no-repeat right center;
  }

  /* ===== 왼쪽: 폴더/달력 ===== */
  .lt-title { font-weight: bold; color: #b0125f; padding-bottom: 4px; border-bottom: 1px solid #ffb3d6; margin-bottom: 6px; }
  .folders { list-style: none; margin-bottom: 12px; }
  .folders li { padding: 3px 0 3px 2px; cursor: pointer; }
  .folders li::before { content: "📁 "; font-size: 11px; }
  .folders li.on { color: var(--point); font-weight: bold; }
  .folders li span { color: #999; font-weight: normal; font-size: 11px; }
  .cal { width: 100%; border-collapse: collapse; font-size: 11px; text-align: center; margin-bottom: 12px; }
  .cal th { color: #888; font-weight: normal; padding: 2px 0; }
  .cal th:first-child, .cal td.sun { color: #d33; }
  .cal td { padding: 3px 0; }
  .cal td.has { background: #ffe0ef; cursor: pointer; font-weight: bold; color: var(--point); }

  /* ===== 오른쪽 공통 ===== */
  .sec { display: none; }
  .sec.on { display: block; }
  .h {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; color: var(--point);
    padding-bottom: 4px; border-bottom: 1px solid #ddd; margin-bottom: 8px;
  }
  .h small { font-weight: normal; color: #999; }

  /* 홈 */
  .news { display: flex; gap: 12px; margin-bottom: 14px; }
  .news ul { flex: 1; list-style: none; }
  .news li { display: flex; align-items: center; gap: 6px; height: 21px; line-height: 20px; padding: 0; border-bottom: 1px dotted #e3e3e3; overflow: hidden; }
  .news li a, .news li .tag { line-height: 20px; height: 20px; display: block; }
  .news li a * { display: inline !important; line-height: inherit !important; font-size: inherit !important; vertical-align: baseline !important; }
  .news li a img { display: none !important; }
  .news li .tag { color: #999; width: 60px; white-space: nowrap; flex-shrink: 0; }
  .news li a { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .cnt { width: 150px; border-collapse: collapse; }
  .cnt td { padding: 3px 2px; border-bottom: 1px dotted #e3e3e3; }
  .cnt td.n { text-align: right; }
  .cnt td.n b { color: var(--point); }
  .room {
    position: relative;
    aspect-ratio: 530 / 230;
    border: 1px solid #ddd;
    background: #fff;
    overflow: hidden;
    user-select: none;
  }
  .room-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .item { position: absolute; image-rendering: pixelated; }
  .item img { display: block; image-rendering: pixelated; pointer-events: none; }
  .room.edit .item { cursor: move; outline: 1px dashed rgba(255,102,0,.6); }
  .bubble {
    position: absolute;
    background: #fff;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    box-shadow: 1px 1px 0 rgba(0,0,0,.15);
    white-space: nowrap;
    transform: translate(-50%, -100%);
    pointer-events: none;
    z-index: 999;
  }
  .bubble::after {
    content: ""; position: absolute; left: 50%; bottom: -5px;
    border: 5px solid transparent; border-bottom: 0; border-top-color: #777;
    transform: translateX(-50%);
  }
  .room-ctrl { display: flex; justify-content: flex-end; gap: 8px; font-size: 11px; margin: 4px 0 14px; }
  .room-box { border: 1px solid #ddd; background: #fafafa; padding: 8px; margin: -8px 0 14px; display: none; }
  .room-box.on { display: block; }
  .room-box .inv { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
  .room-box label {
    border: 1px solid #ccc; background: #fff; padding: 4px 6px;
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; cursor: pointer;
  }
  .room-box label img { height: 30px; image-rendering: pixelated; }
  .mm img { image-rendering: pixelated; }
  .ilchon-form { display: flex; gap: 4px; margin-bottom: 6px; }
  .ilchon-form input { flex: 1; border: 1px solid #bbb; padding: 3px; }
  .btn { border: 1px solid #999; background: #f4f4f4; padding: 2px 8px; cursor: pointer; }
  .ilchon { list-style: none; }
  .ilchon li { padding: 4px 0; border-bottom: 1px dotted #e3e3e3; }
  .ilchon li .who { color: var(--point); }
  .ilchon li .d { color: #aaa; font-size: 11px; margin-left: 4px; }

  /* 프로필 */
  .ptable { width: 100%; border-collapse: collapse; }
  .ptable th, .ptable td { padding: 7px 8px; border-bottom: 1px dotted #ddd; text-align: left; }
  .ptable th { width: 90px; color: #b0125f; font-weight: normal; background: #fff2f8; }

  /* 다이어리 */
  .post { margin-bottom: 14px; border: 1px solid #e3e3e3; }
  .post-h { background: #f6f6f6; padding: 5px 8px; display: flex; justify-content: space-between; font-size: 11px; }
  .post-h b { color: var(--point); }
  .post-b { padding: 10px; line-height: 1.7; }
  .cmts { border-top: 1px dotted #ddd; padding: 6px 8px; background: #fbfbfb; font-size: 11px; }
  .cmts div { padding: 2px 0; }
  .cmts .who { color: var(--link); }
  .cmt-form { display: flex; gap: 4px; margin-top: 4px; }
  .cmt-form input { flex: 1; border: 1px solid #ccc; padding: 2px; font-size: 11px; }

  /* 사진첩 */
  .album { margin-bottom: 16px; border-bottom: 1px dotted #ccc; padding-bottom: 12px; }
  .album .pic {
    height: 220px; background: #f2f2f2; border: 1px solid #ddd;
    display: flex; align-items: center; justify-content: center; color: #bbb; margin: 6px 0;
  }
  .album .cap { line-height: 1.6; }
  .album .meta { font-size: 11px; color: #999; margin-top: 4px; }

  /* 쥬크박스 */
  .jb { width: 100%; border-collapse: collapse; }
  .jb th { background: #fff2f8; color: #b0125f; font-weight: normal; padding: 5px; border-bottom: 1px solid #ffb3d6; }
  .jb td { padding: 5px; border-bottom: 1px dotted #ddd; text-align: center; }
  .jb td.t { text-align: left; }
  .jb tr.playing td { background: #ffeaf4; }

  /* 게시판 */
  .board { width: 100%; border-collapse: collapse; }
  .board th { background: #fff2f8; color: #b0125f; font-weight: normal; padding: 5px; border-bottom: 1px solid #ffb3d6; }
  .board td { padding: 5px; border-bottom: 1px dotted #ddd; text-align: center; }
  .board td.t { text-align: left; }

  /* 방명록 */
  .gb-write { border: 1px solid #ffcfe5; background: #fff2f8; padding: 8px; margin-bottom: 12px; display: flex; gap: 8px; }
  .gb-write .mm { width: 70px; height: 70px; flex-shrink: 0; }
  .gb-write .f { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .gb-write input[type=text], .gb-write textarea { border: 1px solid #bbb; padding: 3px; width: 100%; }
  .gb-write textarea { height: 44px; resize: none; }
  .gb-write .row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
  .gb { border: 1px solid #ddd; margin-bottom: 8px; }
  .gb-h { background: #f6f6f6; padding: 4px 8px; font-size: 11px; display: flex; justify-content: space-between; }
  .gb-h .no { color: var(--point); }
  .gb-h .who { color: var(--link); }
  .gb-b { display: flex; gap: 10px; padding: 8px; }
  .mm {
    width: 70px; height: 70px; flex-shrink: 0;
    background: #f2f2f2; border: 1px solid #e0e0e0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #bbb;
  }
  .gb-b .txt { flex: 1; line-height: 1.6; }
  .gb-r { border-top: 1px dotted #ddd; padding: 5px 8px 5px 88px; font-size: 11px; background: #fbfbfb; }
  .gb-r .who { color: var(--point); }
  .secret { color: #aaa; font-style: italic; }

  @media (max-width: 900px) {
    .hompy { width: 100%; }
    .dotline { padding: 8px; }
    .cols { flex-direction: column; }
    .left { width: 100%; height: auto; }
    .right { height: auto; }
    .heads { display: none; }
    .tabs { position: static; flex-direction: row; flex-wrap: wrap; margin: 6px 0 0; }
    .tab.on::before { display: none; }
    .tab { border-radius: 5px 5px 0 0; border: 1px solid var(--tab-dark); }
    .bgm { width: 100%; }
    .news { flex-direction: column; }
  }
  /* 망점(하프톤): 왼쪽 위 모서리에만 은은하게 */
  body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
    background: radial-gradient(circle, rgba(255,61,154,.35) 1.8px, transparent 2.2px) 0 0 / 11px 11px;
    -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 40%);
    mask-image: linear-gradient(135deg, #000 0%, transparent 40%);
  }
  body { position: relative; z-index: 0; }
  /* 서미르: 싸이 기본 스킨 */
  body.theme-basic { --skin: #8fcde8; --skin-img: none; --page-bg: #f0f0f0; --page-img: none;
    --tab: #2b8fd0; --tab-dark: #1d6fa5; --point: #ff6600; --link: #1a5f9e; --head: #1a4f7a; }
  body.theme-basic::before { display: none; }
  body.theme-basic .skin { box-shadow: none; }
  body.theme-basic .dotline { border-color: #fff; }
  body.theme-basic .tab { color: #fff; }
  body.theme-basic .tab.on { background: #fff; color: #2b8fd0; border-color: var(--line); }
  body.theme-basic .tab.on::before { background: #fff; }
  body.theme-basic .heads .url { color: #3b6f99; }
  body.theme-basic .heads .lh b { color: #ff6600; }
  body.theme-basic .bgm { border-color: #9ecbe4; }
  body.theme-basic .bgm .now { color: #1a4f7a; }
  body.theme-basic .ilchon li .who { color: var(--link); }
  body.theme-basic .owner b, body.theme-basic .lt-title, body.theme-basic .ptable th,
  body.theme-basic .jb th, body.theme-basic .board th { color: #1a4f7a; }
  body.theme-basic .lt-title, body.theme-basic .jb th, body.theme-basic .board th { border-bottom-color: #9ecbe4; }
  body.theme-basic .ptable th, body.theme-basic .jb th, body.theme-basic .board th, body.theme-basic .gb-write { background: #f4f9fc; }
  body.theme-basic .gb-write { border-color: #cfe3ef; }
  body.theme-basic .jb tr.playing td { background: #fff4ea; }
  body.theme-basic .cal td.has { background: #ffe9d6; }
  .bgm { width: 230px; }
  .bgm { position: relative; }
  .bgm button { width: 20px; height: 16px; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  #volBtn { font-size: 9px; letter-spacing: 0; color: #555; }
  #repBtn { position: relative; letter-spacing: 0; }
  #repBtn.off svg { opacity: .3; }
  #repBtn b { position: absolute; right: 1px; bottom: 0; font-size: 7px; color: var(--point); font-weight: bold; }
  .volpop { display: none; position: absolute; right: 0; top: 100%; margin-top: 3px; z-index: 50;
    background: #fff; border: 1px solid #999; padding: 4px 8px; align-items: center; gap: 6px; font-size: 10px; color: #666;
    box-shadow: 1px 1px 0 rgba(0,0,0,.15); }
  .volpop.on { display: flex; }
  .volpop #bgmVol { width: 80px; }
  #volNum { display: inline-block; width: 20px; text-align: right; }
  .bgm .now { position: relative; overflow: hidden; white-space: nowrap; text-overflow: clip; }
  .bgm .now .run { display: inline-block; animation: bgmRun 10s linear infinite; }
  .bgm .now .run i { font-style: normal; padding-right: 40px; }
  @keyframes bgmRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  #bgmVol { -webkit-appearance: none; appearance: none; width: 50px; height: 12px; background: transparent; cursor: pointer; margin: 0 2px; }
  #bgmVol::-webkit-slider-runnable-track { height: 3px; background: #ccc; border: 1px solid #aaa; }
  #bgmVol::-moz-range-track { height: 3px; background: #ccc; border: 1px solid #aaa; }
  #bgmVol::-webkit-slider-thumb { -webkit-appearance: none; width: 6px; height: 10px; margin-top: -4px; background: #fff; border: 1px solid #777; }
  #bgmVol::-moz-range-thumb { width: 5px; height: 9px; border-radius: 0; background: #fff; border: 1px solid #777; }
  .cols { position: relative; }
  .rings { display: none; position: absolute; left: 200px; top: 0; bottom: 0; width: 8px; pointer-events: none; z-index: 5; }
  .rings { display: block; }
  .ring { position: absolute; left: -6px; line-height: 0; }
  .spine { position: absolute; left: 1px; top: 4px; bottom: 4px; width: 6px; border-radius: 3px;
    background: #c4c4cc; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
  .ring:nth-child(1) { top: 56px; } .ring:nth-child(2) { top: 72px; }
  .ring:nth-child(3) { bottom: 72px; } .ring:nth-child(4) { bottom: 56px; }
  @media (max-width: 900px) { .rings { display: none !important; } }
  #surfMsg { display: none; position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%);
    background: #fff; border: 1px solid #999; padding: 14px 22px; font-size: 12px; z-index: 9999; box-shadow: 2px 2px 0 rgba(0,0,0,.2); }

  /* 탭 글씨: 싸이월드 때처럼 굴림 12px (윈도우에선 비트맵이라 또렷함) + 테두리 */
  .tab { font-family: "굴림", Gulim, "돋움", Dotum, "Apple SD Gothic Neo", sans-serif; font-size: 12px; font-weight: bold !important;
    letter-spacing: 0; color: #fff !important;
    text-shadow: none !important; }
  .tab.on { color: #222 !important; text-shadow: none; }
  /* 오른쪽 칸 크게 */
  .hompy { width: 1156px; }
  .panel { height: 560px; }

  /* ===== 오른쪽 위젯 (메뉴 + BGM) ===== */
  .dotline { position: relative; }
  .sidew { position: absolute; top: 10px; right: 0; width: 176px; z-index: 7; display: flex; flex-direction: column; gap: 6px; }
  .sbox { background: #fff; border: 1px solid #9a9a9a; border-radius: 3px; font-size: 11px; color: #333; }
  .shead { background: #4a4a4a; color: #fff; text-align: center; font-weight: bold; padding: 3px 0; border-radius: 2px 2px 0 0; }
  body.theme-goth .shead { background: #141014; color: #ff6fb5; }
  .sbody { padding: 5px 7px 6px; }
  .stat { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
  .stat span { width: 46px; }
  .stat i { flex: 1; height: 5px; background: #ddd; border: 1px solid #bbb; position: relative; }
  .stat i b { position: absolute; left: 0; top: 0; bottom: 0; }
  .stat:nth-child(1) i b { background: #f07a2a; } .stat:nth-child(2) i b { background: #8cc63f; } .stat:nth-child(3) i b { background: #3aa0dc; }
  .sline { padding: 3px 0; border-top: 1px dotted #ddd; }
  .sline b { color: var(--point); font-weight: normal; }
  .sline .blue { color: #1a5f9e; }
  .sbgm .bgm { width: auto !important; margin: 0 !important; border: none !important; padding: 4px 6px !important; flex-wrap: wrap; row-gap: 3px; }
  .sbgm .bgm .now { order: -1; flex: 0 0 100%; }
  .sbgm .volpop { right: auto; left: 0; }
  /* 점선 없음 + 겉선 얇게 + 겉 틀 넓게 */
  .dotline { border: none !important; }
  .skin { padding: 40px !important; box-shadow: 0 0 0 1px #ff3d9a, 0 8px 30px rgba(0,0,0,.6) !important; }
  body.theme-basic .skin { box-shadow: 0 0 0 1px #6cb6dc !important; }
  .hompy { width: 1216px !important; }
  /* ===== 수첩 겉표지: SVG로 그림 (가운데 위아래 둥근 홈 + 바깥 바느질 점선) ===== */
  :root { --cv: #e6e6e6; --cv-line: #b4b4b4; --cv-stitch: #ffffff; }
  body.theme-goth { --cv: #f1dbe6; --cv-line: #d8a6bf; --cv-stitch: #ff6fb5; }
  .coversvg { position: absolute; left: 0; top: 0; overflow: visible; z-index: 0; pointer-events: none; }
  .heads, .cols { position: relative; z-index: 1; }
  .dotline { padding: 14px 280px 18px 20px !important; }
  .cover { margin: 0; }
  .tabs { margin-left: -1px !important; }
  .rings { left: 196px !important; }

  /* ===== 그 시절 스크롤바 (회색 박스 + 화살표 버튼) ===== */
  .right { overflow: hidden !important; display: flex; flex-direction: column; }
  .rscroll { flex: 1; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; scrollbar-color: #c8c8c8 #f2f2f2; }
  .rscroll::-webkit-scrollbar { width: 15px; }
  .rscroll::-webkit-scrollbar-track { background: #f4f4f4; border-left: 1px solid #ddd; }
  .rscroll::-webkit-scrollbar-thumb { background: #e2e2e2; border: 1px solid #a8a8a8; box-shadow: inset 1px 1px 0 #fff; }
  .rscroll::-webkit-scrollbar-thumb:hover { background: #d6d6d6; }
  .rscroll::-webkit-scrollbar-button:single-button { display: block; height: 15px; background: #e2e2e2 no-repeat center; border: 1px solid #a8a8a8; box-shadow: inset 1px 1px 0 #fff; }
  .rscroll::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4'><path d='M0 4h7L3.5 0z' fill='%23666'/></svg>"); }
  .rscroll::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='7' height='4'><path d='M0 0h7L3.5 4z' fill='%23666'/></svg>"); }
  /* ===== 모바일 ===== */
  @media (max-width: 900px) {
    body { padding: 8px !important; display: block !important; }
    .hompy { width: 100% !important; margin: 0 !important; }
    .skin { padding: 8px !important; border-radius: 10px; }
    .dotline { padding: 6px !important; display: flex; flex-direction: column; }
    .coversvg, .rings { display: none !important; }
    .sidew { position: static !important; width: auto !important; flex-direction: column; margin-bottom: 8px; order: -1; }
    .heads { display: flex !important; flex-wrap: wrap; height: auto !important; gap: 4px; }
    .heads .lh { width: auto !important; }
    .heads .rh { flex-direction: column; }
    .cols { flex-direction: column !important; gap: 8px !important; }
    .panel, .left, .right { width: 100% !important; height: auto !important; }
    .right { overflow: visible !important; }
    .rscroll { overflow: visible !important; margin: 0; padding: 0; }
    .photo { height: 220px !important; }
    .tabs { position: static !important; flex-direction: row !important; flex-wrap: wrap; gap: 3px !important; margin: 0 !important; order: -1; }
    .tab { width: auto !important; padding: 6px 10px !important; border-radius: 5px !important; border: 1px solid var(--tab-dark) !important; }
    .news { flex-direction: column; }
    .cnt { width: 100% !important; }
    .ilchon-form { flex-wrap: wrap; }
    .ilchon-form input { flex: 1 1 100% !important; }
    .room-box .inv label { flex: 0 0 calc(33% - 6px); }
  }
  #bgmFab { display: none; }
  @media (max-width: 900px) {
    .sidew { display: none !important; }
    #bgmFab { display: block; position: fixed; right: 12px; bottom: 14px; width: 44px; height: 44px; padding: 0; border: 0; background: none;
      filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); z-index: 50; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    #bgmFab .cd { position: absolute; left: 2px; top: 2px; width: 40px; height: 40px; line-height: 0; }
    #bgmFab.on .cd { animation: fabSpin 2.4s linear infinite; }
    body.theme-basic #bgmFab { --fab-label: #2b8fd0; }
    @keyframes fabSpin { to { transform: rotate(360deg); } }
  }
  /* 미소 표지가 밝아서 표지 위 글씨는 진하게 */
  body.theme-goth .heads .lh, body.theme-goth .heads .title { color: #3a2030 !important; }
  body.theme-goth .heads .lh b { color: #e0157f !important; }
  body.theme-goth .heads .url { color: #c4126c !important; }
  /* 미소: 겉선 안쪽 배경 = 어둡게 */
  body.theme-goth .skin { background-color: var(--skin) !important; background-image: var(--skin-img) !important; background-size: 220px 220px, 400px 400px !important; background-repeat: repeat !important; }
  /* 표지: 연핑크 + 흰 바느질 */
  body.theme-goth { --cv: #f1dbe6 !important; --cv-line: #d8a6bf !important; --cv-stitch: #f6e9ef !important; }
  body.theme-goth .heads .lh, body.theme-goth .heads .title { color: #3a2030 !important; }
  body.theme-goth .heads .lh b { color: #e0157f !important; }
  body.theme-goth .heads .url { color: #c4126c !important; }
  /* 레이스 리본: 검정 배경을 지워서(screen) 리본만 보이게, 페이지 뒤로 */
  .ribbon { display: none; position: absolute; pointer-events: none; mix-blend-mode: screen; z-index: 1; background: center / contain no-repeat; }
  body.theme-goth .ribbon { display: block; }
  .ribbon.r1 { left: -36px; top: -36px; width: 120px; height: 200px; }
  .ribbon.r2 { right: -40px; bottom: -40px; width: 150px; height: 250px; transform: rotate(180deg); }
  .cols, .heads { z-index: 2 !important; }
  @media (max-width: 900px) { .ribbon { display: none !important; } }
  .cdicon { display: inline-flex; flex-shrink: 0; line-height: 0; }
  .cdicon.spin svg { animation: cdSpin 2.4s linear infinite; }
  @keyframes cdSpin { to { transform: rotate(360deg); } }
  .sbgm .bgm .cdicon { order: -2; }
  .sbgm .bgm .now { order: -1; flex: 1 1 0 !important; min-width: 0; }
  .sbgm .bgm::after { content: ''; order: -1; flex-basis: 100%; height: 0; }
  /* 고리: 두 페이지 사이 정가운데 */
  .rings { left: 200px !important; width: 8px !important; }
  .rings .ring { left: -6px !important; }
  .rings .ring svg { width: 20px; }
  /* 레이스 리본: 오른쪽 어두운 공간에 */
  .ribbon.r1 { left: auto !important; right: 14px; top: 300px !important; width: 150px !important; height: 250px !important; }
  /* 오른쪽 아래 핑크 별 (미소): 배경 투명 그림, 오른쪽 아래 모서리에 붙여서 페이지 뒤로 */
  .cornerpic { display: none; position: absolute; right: -40px; bottom: -40px; width: 620px; height: 737px; z-index: 0; pointer-events: none; image-rendering: -webkit-optimize-contrast;
    background: url(./images/bg1.png) right bottom / contain no-repeat; border-bottom-right-radius: 11px; }
  body.theme-goth .cornerpic { display: block; }
  /* 왼쪽 아래: 돌려서 일부 잘리게 */
  .cornerpic.c2 { right: auto; left: 60px; bottom: -300px; width: 520px; height: 618px; transform: rotate(-110deg) scaleX(-1); transform-origin: center; }
  body.theme-goth .skin { overflow: hidden; }
  @media (max-width: 900px) { .cornerpic { display: none !important; } }
  /* 표지 뒤 그림자: 별 위에 표지가 떠 있는 느낌 */
  body.theme-goth .coversvg { filter: drop-shadow(0 6px 14px rgba(0,0,0,.75)) drop-shadow(0 0 4px rgba(0,0,0,.6)); }
  body.theme-goth .sbox { box-shadow: 0 4px 12px rgba(0,0,0,.7); }
  body.theme-goth .cornerpic { filter: hue-rotate(-40deg) saturate(.9) brightness(.55); }
  /* 그런지 폰트 (영어만) */
  .grunge { font-family: 'Rubik Dirt', 'Arial Black', sans-serif; font-weight: normal; font-size: 15px; letter-spacing: .5px; color: #141014; }
  .grunge i { font-style: normal; background: var(--point); color: #fff; padding: 0 2px; margin: 0 1px; display: inline-block; transform: rotate(-4deg); }
  body.theme-basic .grunge { color: #1a4f7a; }
  #counter { font-family: 'Rubik Dirt', 'Arial Black', sans-serif; letter-spacing: .5px; }
  #counter b { font-family: inherit; }
  /* 홈피 바깥 배경 장식 (미소): 크기·각도 제각각, 화면 끝에 걸쳐 잘리게 */
  #deco { display: none; position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
  body.theme-goth #deco { display: block; }
  #deco img { position: absolute; }
  @media (max-width: 900px) { #deco { display: none !important; } }
  /* 큰 별에 망점(도트) 효과 */
  body.theme-goth .cornerpic {
    -webkit-mask-image: radial-gradient(circle, #000 1.6px, transparent 2px);
    -webkit-mask-size: 5px 5px;
    mask-image: radial-gradient(circle, #000 1.6px, transparent 2px);
    mask-size: 5px 5px;
  }
  /* 서미르: 스킨은 싸이 기본 하늘색, 페이지 뒷배경은 회색 체크 */
  body.theme-basic {
    background-color: #a3a3a3 !important;
    background-image:
      repeating-linear-gradient(90deg, transparent 0 21px, rgba(0,0,0,.08) 21px 22px),
      repeating-linear-gradient(0deg,  transparent 0 21px, rgba(0,0,0,.08) 21px 22px) !important;
    background-attachment: fixed !important;
  }
  /* 날개: 원본 그림 그대로, 홈피 위 가운데 */
  .wingimg { display: none; position: absolute; left: 50%; top: -76px; width: 170px; transform: translateX(-50%); pointer-events: none; z-index: 3; }
  body.theme-goth .wingimg { display: block; }
  @media (max-width: 900px) { .wingimg { display: none !important; } }
  /* ===== 싸이월드 홈 상자 인터랙션 ===== */
  .sbody a[data-act] { cursor: pointer; }
  .sbody a[data-act]:hover { text-decoration: underline; }
  .sbtns { display: flex; gap: 3px; padding-top: 5px; border-top: 1px dotted #ddd; margin-top: 2px; }
  .sbtns button { flex: 1; font-size: 11px; padding: 2px 0; border: 1px solid #999; background: linear-gradient(#fff, #e6e6e6); cursor: pointer; font-family: inherit; }
  .sbtns button:active { background: #ddd; }
  #cyPop { display: none; position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 280px; z-index: 10000;
    background: #fff; border: 1px solid #777; box-shadow: 3px 3px 0 rgba(0,0,0,.25); font-size: 12px; }
  #cyPop.on { display: block; }
  .cp-head { background: var(--tab); color: #fff; font-weight: bold; padding: 5px 8px; display: flex; justify-content: space-between; }
  .cp-head a { color: #fff; cursor: pointer; text-decoration: none; }
  .cp-body { padding: 10px 12px; line-height: 1.7; }
  .cp-body input, .cp-body textarea { width: 100%; border: 1px solid #aaa; padding: 3px; font-family: inherit; font-size: 12px; margin: 2px 0 6px; }
  .cp-body textarea { height: 56px; resize: none; }
  .cp-body .row { display: flex; justify-content: flex-end; gap: 4px; margin-top: 4px; }
  .cp-body button { border: 1px solid #999; background: linear-gradient(#fff, #e6e6e6); padding: 2px 10px; cursor: pointer; font-family: inherit; font-size: 11px; }
  .cp-body .cpi { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px dotted #ddd; }
  .cp-body .cpi i { font-style: normal; width: 22px; text-align: center; }
  .picimg { display: block; width: 100%; max-height: 360px; object-fit: cover; border: 1px solid #ddd; margin: 6px 0; }
  body.theme-basic .grunge, body.theme-basic #counter, body.theme-basic #counter b { font-family: "굴림", Gulim, "돋움", Dotum, "Apple SD Gothic Neo", sans-serif; letter-spacing: 0; }
  body.theme-basic .grunge { font-size: 13px; font-weight: bold; }
  body.theme-basic #counter { font-size: 11px; }
  .photo, .picimg { cursor: pointer; }
  #picView { display: none; position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.7); align-items: center; justify-content: center; cursor: pointer; }
  #picView.on { display: flex; }
  #picView .pv-box { background: #fff; border: 1px solid #777; box-shadow: 3px 3px 0 rgba(0,0,0,.3); padding: 6px; max-width: 92vw; max-height: 92vh; }
  #picView img { display: block; max-width: min(800px, calc(92vw - 12px)); max-height: min(560px, calc(80vh - 34px)); }
  #picView .pv-foot { text-align: right; font-size: 11px; color: #666; padding-top: 5px; }
  img { -webkit-user-drag: none; -webkit-touch-callout: none; }
  body.theme-basic .grunge i { background: none; color: inherit; padding: 0; margin: 0; transform: none; display: inline; }
  .home .h, .h { height: 22px; box-sizing: border-box; }
  @media (max-width: 900px) {
    body.theme-goth #counter, body.theme-goth #counter *, body.theme-goth #hTitle { color: #f1dbe8 !important; text-shadow: 0 1px 2px #000; }
    body.theme-goth #counter b { color: #ff4fa3 !important; }
    body.theme-goth #hUrl { color: #ff8cc6 !important; }
  }
  .board tr.bbody { display: none; }
  .board tr.bbody.on { display: table-row; }
  .board tr.bbody td { text-align: left; padding: 10px 8px 14px; line-height: 1.7; background: #fbfbfb; }
  .board td.t a { cursor: pointer; }
  /* 모바일: 메뉴를 위쪽 책갈피로 */
  @media (max-width: 900px) {
    .tabs { position: static !important; left: auto !important; top: auto !important; z-index: 30; display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
      overflow-x: auto; gap: 2px !important; padding: 8px 2px 0 !important; margin: 0 0 -1px !important; order: -1;
      background: var(--skin); border-bottom: 1px solid var(--line); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { flex: 0 0 auto; width: auto !important; margin: 0 !important; padding: 7px 11px 6px !important;
      border-radius: 8px 8px 0 0 !important; border: 1px solid var(--tab-dark) !important; border-bottom: 0 !important; }
    .tab.on { width: auto !important; background: #fff !important; border-color: var(--line) !important; position: relative; top: 1px; padding-bottom: 7px !important; left: auto !important; }
    .tab.on::before { display: none !important; }
    .tab { flex: 1 1 auto !important; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; padding: 7px 1px 6px !important; font-size: clamp(10px, 3.1vw, 12px) !important; letter-spacing: -.5px; }
    .tabs { padding: 8px 0 0 !important; gap: 2px !important; overflow: visible !important; }
    .tabs { border-bottom: 0 !important; }
    .tabs + * , .tabs ~ .panel.left { margin-top: 0 !important; }
    .cols { gap: 0 !important; }
    .panel.left { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
    .panel.right { margin-top: 8px !important; }
    /* 제목 · 방문자 수 · 주소 왼쪽 정렬 */
    .heads { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; gap: 2px !important; padding: 0 2px 6px !important; }
    .heads .rh { display: contents !important; }
    .heads .title { order: 1; font-size: 15px !important; text-align: left !important; margin: 0 !important; }
    .heads .lh { order: 2; text-align: left !important; }
    .heads .url { order: 3; text-align: left !important; }
  }
  #roomCanvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
  #roomSvg.ghost { opacity: 0; }
  .room.edit #roomSvg.ghost .it { opacity: 1; }

/* ======================= 티스토리 스킨: 바깥 틀 / 안쪽 창 ======================= */
html.m-shell #innerRoot { display: none !important; }
html.m-inner #shellRoot { display: none !important; }
#tData { display: none !important; }
#s-frame { margin: -2px 0 0; }
iframe.tframe { display: block; width: 100%; border: 0; background: transparent; min-height: 380px; }
iframe.ilframe { min-height: 0; }

/* 안쪽 창 문서 */
html.m-inner, html.m-inner body { background: transparent !important; background-image: none !important; }
html.m-inner body { min-width: 0 !important; padding: 0 2px 0 0 !important; margin: 0 !important; overflow-x: hidden; }
html.m-inner body::before, html.m-inner body::after { display: none !important; }
html.m-inner #menubar, html.m-inner .tt_menubar, html.m-inner #tistorytoolbarid, html.m-inner .tistory-toolbar { display: none !important; }
#innerRoot { font-size: 12px; color: #333; }
#innerRoot a { color: var(--link); text-decoration: none; }
#innerRoot a:hover { text-decoration: underline; }
#innerRoot .h small { color: #999; font-weight: normal; margin-left: 4px; }
#innerRoot .empty { padding: 30px 0; text-align: center; }
#innerRoot img { max-width: 100%; height: auto; }

/* 다이어리 목록 */
.ilist.as-diary .it-row { margin-bottom: 10px; border: 1px solid #e3e3e3; }
.ilist.as-diary .it-row .it-h { background: #f6f6f6; padding: 5px 8px; display: flex; justify-content: space-between; font-size: 11px; }
.ilist.as-diary .it-row .it-h b { color: var(--point); }
.ilist.as-diary .it-row .it-b { padding: 9px 10px; line-height: 1.7; display: flex; gap: 10px; }
.ilist.as-diary .it-title { display: block; font-weight: bold; margin-bottom: 2px; }
.ilist.as-diary .it-sum { color: #666; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ilist .it-thumb { flex: 0 0 72px; height: 72px; background: #eee center / cover no-repeat; border: 1px solid #ddd; display: block; }
.ilist .it-thumb:empty { display: none; }

/* 사진첩 목록: 원래 싸이 사진첩처럼 한 장씩 크게 */
.ilist .it-big { display: none; }
.ilist.as-photo .it-row.album { margin-bottom: 16px; border-bottom: 1px dotted #ccc; padding-bottom: 12px; }
.ilist.as-photo .al-h { margin-bottom: 2px; }
.ilist.as-photo .al-h a { color: inherit; }
.ilist.as-photo .picimg { display: block; width: 100%; max-height: 360px; object-fit: cover; border: 1px solid #ddd; margin: 6px 0; cursor: pointer; }
.ilist.as-photo .cap { line-height: 1.6; }
.ilist.as-photo .meta { font-size: 11px; color: #999; margin-top: 4px; }
/* 게시판 목록 */
.ilist.as-board .ilist-items { border-top: 2px solid var(--point); }
.ilist.as-board .it-row .it-h { display: none; }
.ilist.as-board .it-row .it-b { display: flex; padding: 6px 4px; border-bottom: 1px dotted #ddd; gap: 8px; align-items: center; }
.ilist.as-board .it-thumb, .ilist.as-board .it-sum { display: none; }
.ilist.as-board .it-title { flex: 1; }
.ilist.as-board .it-date { color: #999; font-size: 11px; }
.it-date-in { display: none; }
.ilist.as-photo .it-date-in, .ilist.as-board .it-date-in { display: inline; }
.it-rpc { color: var(--point); font-size: 11px; }

/* 글 보기 */
.ipost { margin-bottom: 14px; border: 1px solid #e3e3e3; }
.ipost .post-t { padding: 10px 10px 0; font-size: 13px; font-weight: bold; }
.ipost .post-b { padding: 10px; line-height: 1.8; word-break: break-all; }
.ipost .post-b p { margin: 0 0 4px; }
.ipost .post-b figure { margin: 6px 0; }
.ipost .post-b img { cursor: pointer; }
.ipost .admin { padding: 4px 10px 8px; font-size: 11px; color: #999; text-align: right; }
.ipost .admin a { color: #999; margin-left: 6px; }
.prevnext { font-size: 11px; margin: 6px 0 12px; border-top: 1px dotted #ddd; }
.prevnext a { display: block; padding: 5px 2px; border-bottom: 1px dotted #ddd; }
.prevnext span { color: #999; margin-right: 8px; }
.cmt-area { border-top: 1px solid #eee; padding: 8px 10px 10px; background: #fafafa; }
.iprotect { padding: 30px 10px; text-align: center; border: 1px solid #e3e3e3; }
.iprotect input[type=password] { border: 1px solid #bbb; padding: 3px; width: 140px; }

/* 페이지 번호 */
.ipaging { text-align: center; margin: 12px 0 4px; font-size: 11px; }
.ipaging a { margin: 0 3px; color: #666; }
.ipaging .selected, .ipaging a.on { color: var(--point); font-weight: bold; }
.ipaging .no-more-prev, .ipaging .no-more-next { color: #ccc; pointer-events: none; }

/* 티스토리 댓글·방명록 칸을 싸이 느낌으로 */
#innerRoot .tt-comment-cont, #innerRoot .tt-comment-cont * { font-size: 12px !important; font-family: inherit !important; }
#innerRoot .tt-box-total { padding: 2px 0 6px; color: #999; }
#innerRoot .tt-list-reply { list-style: none; margin: 0; padding: 0; }
#innerRoot .tt-item-reply { border-bottom: 1px dotted #ddd; padding: 6px 0 !important; }
#innerRoot .tt-link-user { color: var(--point) !important; font-weight: bold; }
#innerRoot .tt_date { color: #aaa !important; font-size: 11px !important; }
#innerRoot .tt-box-thumb { display: none !important; }
#innerRoot textarea, #innerRoot input[type=text], #innerRoot input[type=password] { border: 1px solid #bbb !important; border-radius: 0 !important; background: #fff !important; }
#innerRoot .tt-btn_register, #innerRoot button[type=submit] {
  border: 1px solid #999 !important; background: linear-gradient(#fff, #e6e6e6) !important; color: #333 !important; border-radius: 0 !important; padding: 3px 12px !important; }
.iguest .gb-top { background: #f6f6f6; border: 1px solid #e3e3e3; padding: 8px 10px; margin-bottom: 10px; }

/* 일촌평 칸 (홈 아래) */
html.m-ilchon .ipost { border: 0; margin: 0; }
html.m-ilchon .cmt-area { border: 0; background: none; padding: 0; }
html.m-ilchon .prevnext, html.m-ilchon .ipost > .post-h, html.m-ilchon .ipost > .post-t, html.m-ilchon .ipost > .post-b, html.m-ilchon .ipost > .admin, html.m-ilchon .ilist { display: none !important; }
@media (max-width: 900px) { iframe.tframe { min-height: 160px; } }
/* 주인용 글쓰기 / 관리 링크 (홈피 아래 작게) */
.tadmin { text-align: center; font-size: 11px; margin: 10px auto 24px; position: relative; z-index: 5; }
.tadmin a { color: rgba(255,255,255,.45); text-decoration: none; }
.tadmin a:hover { color: #fff; }
.tadmin span { color: rgba(255,255,255,.25); margin: 0 6px; }
body.theme-basic .tadmin a { color: #555; }
body.theme-basic .tadmin a:hover { color: #000; }
body.theme-basic .tadmin span { color: #888; }
/* 원래 HTML에 있던 옛 글 */
.ilist.as-diary .it-row.old .post-b { padding: 10px; line-height: 1.7; }
.ilist.as-photo .oldpic { cursor: pointer; }
.gb-old { margin-top: 12px; }
.gb-old .gb-b .mm { width: 70px; flex: 0 0 70px; display: flex; justify-content: center; }

/* 옛 게시판 글 펼치기 */
.ilist.as-board .oldboard { cursor: pointer; }
.ilist.as-board .bbody { display: none; padding: 10px 10px 14px; line-height: 1.7; background: #fbfbfb; border-bottom: 1px dotted #ddd; }
.ilist.as-board .it-row.open .bbody { display: block; }

/* ===== 티스토리 방명록·댓글 입력칸을 싸이 방명록처럼 ===== */
#innerRoot .tt-area-write, #innerRoot form { margin: 0 !important; }
#innerRoot .tt-box-total { font-size: 11px !important; color: #999 !important; padding: 0 0 6px !important; border: 0 !important; }
#innerRoot .tt-box-account { display: flex !important; gap: 4px !important; margin: 0 0 4px !important; padding: 0 !important; border: 0 !important; }
#innerRoot .tt-box-account input { flex: 0 1 130px !important; height: 22px !important; padding: 2px 6px !important; font-size: 12px !important;
  border: 1px solid #bbb !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
#innerRoot .tt-box-textarea { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important;
  height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; box-shadow: none !important; }
#innerRoot .tt-box-textarea * { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; overflow: visible !important; height: auto !important; box-shadow: none !important; }
#innerRoot .tt-box-textarea textarea { display: block !important; width: 100% !important; height: 64px !important; min-height: 64px !important;
  padding: 6px !important; border: 1px solid #bbb !important; background: #fff !important; resize: none !important; overflow: auto !important;
  font-size: 12px !important; line-height: 1.5 !important; box-sizing: border-box !important; }
#innerRoot .tt-box-write { display: flex !important; justify-content: flex-end !important; align-items: center !important; gap: 8px !important;
  margin: 5px 0 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
#innerRoot .tt-box-write button, #innerRoot .tt-box-write .tt-btn_register {
  height: 22px !important; padding: 0 12px !important; font-size: 11px !important; line-height: 20px !important; min-width: 0 !important; width: auto !important; }
#innerRoot .tt-box-write * { font-size: 11px !important; }
.iguest .gb-top { padding: 8px 10px !important; }

/* 티스토리 입력칸이 textarea가 아니라 글쓰기 div(contenteditable)일 때도 칸 모양 주기 */
#innerRoot .tt-box-textarea [contenteditable], #innerRoot .tt-box-textarea .tt-cmt, #innerRoot .tt-box-textarea textarea {
  display: block !important; width: 100% !important; min-height: 64px !important; padding: 6px !important;
  border: 1px solid #bbb !important; background: #fff !important; box-sizing: border-box !important;
  font-size: 12px !important; line-height: 1.5 !important; color: #333 !important; text-align: left !important; outline: none; overflow: auto !important; }
#innerRoot .tt-box-textarea [contenteditable]:focus, #innerRoot .tt-box-textarea textarea:focus { border-color: var(--point) !important; }
#innerRoot .tt-box-textarea [contenteditable]:empty::before { color: #aaa; }
/* 로그인했을 때 이름 줄 */
#innerRoot .tt-box-account, #innerRoot .tt-box-profile, #innerRoot .tt-txt-name { font-size: 11px !important; color: var(--point) !important; font-weight: bold; margin: 0 0 4px !important; }
#innerRoot .tt-box-total { margin-bottom: 4px !important; }
#innerRoot .tt-area-write > *:empty { display: none !important; }

/* 방명록·댓글의 ⋮ 메뉴(수정/삭제) 작게, 파란 칠 없애기 */
#innerRoot .iguest button, #innerRoot .cmt-area button:not([type=submit]):not(.tt-btn_register) {
  background: none !important; border: 0 !important; box-shadow: none !important; outline: none !important; color: #999 !important; font-size: 11px !important; padding: 0 2px !important; }
#innerRoot [class*="modify"], #innerRoot [class*="Modify"], #innerRoot [class*="layer"], #innerRoot [class*="menu"] {
  font-size: 11px !important; }
#innerRoot ul[class*="modify"], #innerRoot div[class*="modify"] ul, #innerRoot [class*="layer"] ul, #innerRoot [class*="menu"] ul {
  position: absolute !important; right: 4px; z-index: 20; background: #fff !important; border: 1px solid #bbb !important; box-shadow: 2px 2px 0 rgba(0,0,0,.12) !important;
  padding: 2px 0 !important; margin: 0 !important; list-style: none; min-width: 52px; }
#innerRoot [class*="modify"] li a, #innerRoot [class*="modify"] li button, #innerRoot [class*="layer"] li a, #innerRoot [class*="layer"] li button, #innerRoot [class*="menu"] li a, #innerRoot [class*="menu"] li button {
  display: block !important; padding: 3px 10px !important; color: #333 !important; background: none !important; text-align: left !important; white-space: nowrap; }
#innerRoot [class*="modify"] li a:hover, #innerRoot [class*="modify"] li button:hover, #innerRoot [class*="layer"] li a:hover, #innerRoot [class*="menu"] li a:hover { background: #f4f4f4 !important; color: var(--point) !important; }
#innerRoot *::selection { background: rgba(255, 79, 163, .25); }
#innerRoot .tt-box-write button, #innerRoot .tt-btn_register { color: #333 !important; border: 1px solid #999 !important; background: linear-gradient(#fff, #e6e6e6) !important; padding: 0 12px !important; }
/* 목록 본문 (줄바꿈 그대로) */
.ilist .it-sum.full, .ilist .cap.full { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; color: #333; line-height: 1.7; margin-top: 4px; white-space: normal; }
.ilist .it-sum.full p, .ilist .cap.full p, .ilist .it-sum.full div, .ilist .cap.full div { margin: 0 !important; min-height: 1.7em; }
.ilist.as-diary .it-row:not(.old) .it-b { cursor: pointer; }
/* 티스토리가 본문에 붙이는 공유·공감 버튼: 목록에선 숨기기 */
.ilist .container_postbtn, .ilist [class*="postbtn"], .ilist [data-tistory-react-app] { display: none !important; }

/* 새 다이어리 글 = 옛날 다이어리 모양 */
.ilist.as-diary .it-row .post-b { padding: 10px; line-height: 1.7; }
.ilist.as-diary .it-row .post-b p { margin: 0 !important; min-height: 1.7em; }
.ilist.as-diary .dcmt { text-align: right; }
.ilist.as-diary .dcmt a { color: #888 !important; font-size: 11px; }
.ilist.as-diary .dcmt a:hover { color: var(--point) !important; }

/* 프로필 편집 연필 */
#profEditRow { text-align: right; margin-top: 6px; }
.profEdit { display: inline-block; color: #aaa !important; opacity: .7; line-height: 0; padding: 3px; }
.profEdit:hover { color: var(--point) !important; opacity: 1; }

/* ===== 방명록 v3: 티스토리 목록은 숨기고 직접 그린 카드(#gbNew) 보여주기 ===== */
#innerRoot .iguest .tt-area-reply { display: none !important; }
#innerRoot .iguest.manage .tt-area-reply { display: block !important; }
#innerRoot .iguest.manage #gbNew, #innerRoot .iguest.manage .gb-old { display: none !important; }
.gbManage { text-align: right; margin: -4px 0 6px; font-size: 11px; }
.gbManage a { color: #aaa !important; cursor: pointer; }
.gbManage a:hover { color: var(--point) !important; }
#gbNew .gb-b .mm { width: 70px; flex: 0 0 70px; display: flex; justify-content: center; align-items: center; border: 1px solid #ddd; background: #f8f8f8; height: 70px; }
#gbNew .gb-b .mm img { image-rendering: pixelated; }
#gbNew .txt p { margin: 0 !important; }
#gbNew .gb-r p { display: inline; margin: 0; }
/* ===== 방명록 관리 모드 (티스토리 원래 목록): 단순하게 ===== */
#innerRoot .iguest.manage .tt-area-reply { background: #fff; border: 1px solid #e3e3e3; padding: 6px 10px !important; }
#innerRoot .iguest.manage .tt-list-reply { list-style: none; margin: 0; padding: 0; }
#innerRoot .iguest.manage .tt-item-reply { padding: 6px 0 !important; border-bottom: 1px dotted #ddd; }
#innerRoot .iguest.manage .tt-item-reply .tt-item-reply { padding-left: 18px !important; border-bottom: 0; }
#innerRoot .iguest.manage .tt-box-meta, #innerRoot .iguest.manage .tt-wrap-info { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; }
#innerRoot .iguest.manage .tt-wrap-desc { margin: 2px 0; }
#innerRoot .iguest.manage .tt_img_area_reply { display: none !important; }
#innerRoot .iguest.manage .tt_cmt_profile, #innerRoot .iguest.manage .tt_cmt_profile * { display: inline !important; }
/* 답글 쓰기 칸 (관리 모드에서 열림) */
#innerRoot .iguest.manage .tt-item-reply .tt-area-write, #innerRoot .iguest.manage .tt-item-reply form { background: #f6f6f6; border: 1px solid #e3e3e3; padding: 8px !important; margin: 6px 0 !important; }
/* 쓰기칸: 이름·비번 나란히, 빈 공간 줄이기 */
#innerRoot .tt-box-account { justify-content: flex-start !important; }
#innerRoot .tt-box-account > * { margin: 0 !important; flex: 0 1 140px !important; }
#innerRoot .tt-box-account input { width: 100% !important; }
#innerRoot .tt-area-write > div, #innerRoot form > div { min-height: 0 !important; }
#innerRoot .tt-box-textarea, #innerRoot .tt-box-textarea > div { height: auto !important; min-height: 0 !important; padding: 0 !important; }
#innerRoot .iguest .tt-box-total { display: none !important; }
#innerRoot .iguest .tt-comment-cont { display: flex !important; flex-direction: column !important; }
#innerRoot .iguest .tt-area-write, #innerRoot .iguest .tt-comment-cont > form { order: 1; }
#innerRoot .iguest .tt-area-reply { order: 2; margin-top: 8px !important; }
#innerRoot .iguest.manage .tt_cmt_profile .tt_img_area_reply, #innerRoot .iguest .tt_ico_profile { display: none !important; }
/* 카테고리 화면 맨 밑에 티스토리가 덧붙이는 '글 미리보기' 줄 숨기기 */
#innerRoot .it-row.idx { display: none !important; }
/* 관리 모드: 답글 앞 'ㄴ' 표시랑 글자가 안 겹치게 */
#innerRoot .iguest.manage .tt-item-reply .tt-item-reply { position: relative; padding-left: 34px !important; }
#innerRoot .iguest.manage .tt-item-reply .tt-item-reply::before { left: 12px !important; }
#innerRoot .iguest.manage .tt-item-reply .tt-item-reply > * { margin-left: 0 !important; }
/* 관리 모드: 이름 보이게 */
#innerRoot .iguest.manage .tt-box-meta, #innerRoot .iguest.manage .tt-link-user, #innerRoot .iguest.manage .tt_btn_profile { display: inline !important; visibility: visible !important; font-size: 12px !important; font-weight: bold; color: var(--point) !important; }
#innerRoot .iguest.manage .tt-item-reply .tt-item-reply::before, #innerRoot .iguest.manage .tt-item-reply .tt-item-reply::after { top: 6px !important; bottom: auto !important; margin-top: 0 !important; }
/* 글 보기: 티스토리가 붙이는 블로그 소개 카드 · 구독 버튼 숨기고, 공감 버튼은 작게 */
#innerRoot .ipost [data-tistory-react-app="Namecard"], #innerRoot .ipost [class*="namecard"], #innerRoot .ipost [class*="Namecard"],
#innerRoot .ipost [class*="name_card"], #innerRoot .ipost [class*="subscri"], #innerRoot .ipost [class*="Subscri"],
#innerRoot .ipost [class*="btn_subscription"], #innerRoot .ipost [class*="box_profile"], #innerRoot .ipost [class*="blogger"] { display: none !important; }
#innerRoot .ipost .container_postbtn { margin: 8px 0 0 !important; padding: 0 !important; transform: scale(.8); transform-origin: left top; height: 32px; overflow: visible; }
#innerRoot .ipost .container_postbtn ~ *:empty { display: none !important; }

/* 안쪽 창은 자체 스크롤 없이 (바깥 페이지만 스크롤) */
html.m-inner, html.m-inner body { overflow: hidden !important; height: auto !important; }
iframe.tframe { overflow: hidden; }
/* 사진첩 설명 아래 여백 줄이기 */
.ilist.as-photo .cap.full:empty { display: none; }
.ilist.as-photo .cap.full p { min-height: 0 !important; }
.ilist.as-photo .cap.full p:empty, .ilist.as-photo .cap.full p:has(> br:only-child) { display: none; }
.ilist.as-photo .it-row.album .meta { margin-top: 2px; }

/* BGM 선물 */
.giftBtn { float: right; font-size: 11px; font-weight: normal; color: var(--point) !important; cursor: pointer; }
.jb .gift, td .gift { font-size: 10px; color: var(--point); margin-left: 3px; }
#gbNew .bgmgift { color: var(--point); margin-bottom: 4px; }

html.m-mmq body { display: none !important; }
/* 답글·삭제 화면: 숨겨졌던 ⋮ 메뉴 버튼을 '수정·삭제' 글자로 보이게 */
#innerRoot .iguest.manage .tt-wrap-cmt, #innerRoot .iguest.manage .tt-box-content { position: relative; }
#innerRoot .iguest.manage .tt-box-modify { display: block !important; position: absolute !important; right: 0; top: 0; z-index: 5; }
#innerRoot .tt-box-modify > button, #innerRoot .tt_btn_modify { display: inline-block !important; visibility: visible !important; cursor: pointer; color: #888 !important; font-size: 11px !important; }
#innerRoot .tt-box-modify > button::after, #innerRoot .tt_btn_modify::after { content: '수정·삭제 ▾'; }
#innerRoot .tt-box-modify > button:hover::after, #innerRoot .tt_btn_modify:hover::after { color: var(--point); }
#innerRoot .tt-box-modify > button, #innerRoot .tt_btn_modify {
  width: auto !important; height: auto !important; min-width: 0 !important; line-height: 16px !important; white-space: nowrap !important;
  text-indent: 0 !important; overflow: visible !important; font-size: 0 !important; background-image: none !important; padding: 0 2px !important; }
#innerRoot .tt-box-modify > button > span, #innerRoot .tt-box-modify > button > i, #innerRoot .tt-box-modify > button > img, #innerRoot .tt_btn_modify > span, #innerRoot .tt_btn_modify > i, #innerRoot .tt_btn_modify > img { display: none !important; }
#innerRoot .tt-box-modify > button::after, #innerRoot .tt_btn_modify::after { font-size: 11px !important; line-height: 16px; display: inline-block; white-space: nowrap; }
#innerRoot .tt-box-modify > button::before, #innerRoot .tt_btn_modify::before { display: none !important; content: none !important; }


/* 다이어리 목록 댓글 */
.ilist.as-diary .dcl { border-top: 1px dotted #ddd; margin: 8px 0 0; padding: 6px 10px; font-size: 12px; line-height: 1.6; }
.ilist.as-diary .dcl > div { padding: 1px 0; }
.ilist.as-diary .dcl .who { color: var(--point); }
.ilist.as-diary .dcl .rp { padding-left: 14px; }
.ilist.as-diary .dcl .gray { font-size: 11px; }
/* 버튼 안 원래 글자('더보기' 등)가 같이 보이지 않게 (위 방명록 버튼 규칙보다 우선) */
html body #innerRoot .tt-box-modify > button, html body #innerRoot button.tt_btn_modify { font-size: 0 !important; }
html body #innerRoot .tt-box-modify > button::after, html body #innerRoot button.tt_btn_modify::after { font-size: 11px !important; }

/* 홈 일촌평 칸: 쓰기 칸만 (달린 일촌평은 바깥 목록에 한 줄씩 보여줌) */
html.m-ilchon .cmt-area .tt-box-total, html.m-ilchon .cmt-area .tt-list-reply, html.m-ilchon .cmt-area .tt-area-reply { display: none !important; }
html.m-ilchon .cmt-area textarea { height: 40px !important; min-height: 0 !important; max-height: 40px; }
html.m-ilchon .cmt-area .tt-box-textarea, html.m-ilchon .cmt-area .tt-inner-g { height: auto !important; min-height: 0 !important; }
html.m-ilchon .cmt-area [contenteditable="true"] { min-height: 40px !important; height: auto !important; max-height: 80px; overflow: auto; }
html.m-ilchon .cmt-area .tt-area-write [class*="textarea"], html.m-ilchon .cmt-area .tt-area-write [class*="inner"] { height: auto !important; min-height: 0 !important; }
html.m-ilchon .cmt-area .tt-cmt:empty::before, html.m-ilchon .cmt-area [contenteditable="true"]:empty::before,
html.m-ilchon .cmt-area .tt-cmt::placeholder { content: '일촌평을 남겨주세요' !important; }
/* 일촌평 쓰기 칸 위아래로 좁게 */
html.m-ilchon .cmt-area .tt-box-textarea, html.m-ilchon .cmt-area .tt-inner-g { height: auto !important; min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
html.m-ilchon .cmt-area .tt-cmt, html.m-ilchon .cmt-area [contenteditable="true"] { height: auto !important; min-height: 34px !important; max-height: 70px !important; padding: 6px 8px !important; line-height: 20px !important; overflow-y: auto !important; box-sizing: border-box !important; }

/* 옛날 HTML판 일촌평 입력칸 (티스토리 스킨에선 안 씀) */
.ilchon-form { display: none !important; }

/* ===== 홈 일촌평: 싸이월드처럼 한 줄 [일촌명][비밀번호][일촌평............][확인] ===== */
html.m-ilchon body #innerRoot .cmt-area .tt-area-write { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-thumb, html.m-ilchon body #innerRoot .cmt-area .tt-xe-label, html.m-ilchon body #innerRoot .cmt-area .tt-box-write label { display: none !important; }
html.m-ilchon body #innerRoot .cmt-area .tt_wrap_write { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-account { display: flex !important; gap: 4px; flex: 0 0 auto; margin: 0 !important; padding: 0 !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-account input { width: 80px !important; height: 24px !important; padding: 2px 5px !important; border: 1px solid #bbb !important; font-size: 12px !important; margin: 0 !important; box-sizing: border-box; background: #fff !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-textarea { flex: 1 1 160px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-inner-g { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-cmt, html.m-ilchon body #innerRoot .cmt-area [contenteditable="true"] {
  height: 24px !important; min-height: 24px !important; max-height: 24px !important; padding: 2px 6px !important; line-height: 18px !important;
  border: 1px solid #bbb !important; background: #fff !important; font-size: 12px !important; white-space: nowrap !important; overflow: hidden !important; box-sizing: border-box !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-write { display: flex !important; align-items: center; margin: 0 !important; padding: 0 !important; flex: 0 0 auto; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-write button, html.m-ilchon body #innerRoot .cmt-area .tt-btn_register {
  height: 24px !important; padding: 0 10px !important; font-size: 0 !important; margin: 0 !important; min-width: 0 !important; width: auto !important; }
html.m-ilchon body #innerRoot .cmt-area .tt-box-write button::after, html.m-ilchon body #innerRoot .cmt-area .tt-btn_register::after { content: '확인'; font-size: 12px; }

/* 스킨이 다 그려지기 전엔 숨기기 (새로고침할 때 원래 모습이 비치지 않게) */
html.m-shell:not(.ready) body, html.m-inner:not(.ready) body { visibility: hidden !important; }
/* 다이어리: 옛 싸이 모양으로 다시 그려지기 전 원래 목록은 안 보이게 */
html:not(.dshow) .ilist.as-diary .it-row:not(.newd):not(.old) { visibility: hidden; }
/* 로그인 상태: 이름만 글자로 나오는 칸은 숨기기 (한 줄 유지) */
html.m-ilchon body #innerRoot .cmt-area .tt-box-account:not(:has(input)) { display: none !important; }


/* 왼쪽 History 자리 저작권 문구 */
#left .history .copyr { margin-top: 3px; font-size: 10px; line-height: 1.6; color: #999; letter-spacing: 0; }
#left .history .hisT { cursor: pointer; }
#left .history .copyr a { color: inherit !important; text-decoration: underline; cursor: pointer; }